當前位置: 首頁>>代碼示例>>Java>>正文


Java TabItem.setData方法代碼示例

本文整理匯總了Java中org.eclipse.swt.widgets.TabItem.setData方法的典型用法代碼示例。如果您正苦於以下問題:Java TabItem.setData方法的具體用法?Java TabItem.setData怎麽用?Java TabItem.setData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.widgets.TabItem的用法示例。


在下文中一共展示了TabItem.setData方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: newTab

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
protected void newTab(final String value) {
	categoryList.add(value);
	final TabItem item = new TabItem(folder, SWT.NONE);
	item.setText(value);
	final BoxSettingsTab p = new BoxSettingsTab();
	final IBoxProvider provider = BoxProviderRegistry.getInstance().providerForName(value);
	item.setControl(p.createContro(folder, provider));
	item.setData(p);
	if (categoryFiles == null) {
		categoryFiles = new LinkedHashMap<String, LinkedHashSet<String>>();
	}
	Collection<String> fileNames = p.getSettings().getFileNames();
	if (fileNames == null) {
		fileNames = Collections.emptyList();
	}
	categoryFiles.put(value, new LinkedHashSet<String>(fileNames));
	categoryList.setSelection(new String[] { value });
	namesList.setItems(fileNames.toArray(new String[0]));
	bAddFile.setEnabled(true);
}
 
開發者ID:gama-platform,項目名稱:gama,代碼行數:21,代碼來源:EditboxPreferencePage.java

示例2: getOpenCommand

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
@Override
	protected Command getOpenCommand(Request request) {

		retrieveParameters(request);

		Shell shell = new Shell(SWT.SHELL_TRIM);
		shell.setLayout(new FillLayout());

		TabFolder tabFolder = new TabFolder(shell, SWT.NONE);
		Tab[] tabs = createTabs();

		for (int i = 0; i < tabs.length; i++) {
			TabItem item = new TabItem(tabFolder, SWT.NONE);
			item.setText(tabs[i].getTabText());
			item.setControl(tabs[i].createTabFolderPage(tabFolder));
			item.setData(tabs[i]);
		}

		shell.setText("Edit Role \"" + role.getName() + "\"");
		shell.setMaximized(true);
//		shell.setSize(900, 500);
		shell.open();

		return null;
	}
 
開發者ID:road-framework,項目名稱:ROADDesigner,代碼行數:26,代碼來源:RoleEditorEditPolicy.java

示例3: getOpenCommand

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
@Override
protected Command getOpenCommand(Request request) {

	retrieveParameters(request);

	Shell shell = new Shell(SWT.SHELL_TRIM);
	shell.setLayout(new FillLayout());

	TabFolder tabFolder = new TabFolder(shell, SWT.NONE);
	Tab[] tabs = createTabs();

	for (int i = 0; i < tabs.length; i++) {
		TabItem item = new TabItem(tabFolder, SWT.NONE);
		item.setText(tabs[i].getTabText());
		item.setControl(tabs[i].createTabFolderPage(tabFolder));
		item.setData(tabs[i]);
	}

	shell.setText("Edit Contract \"" + contract.getName() + "\"");
	shell.setSize(900, 500);
	shell.open();

	return null;
}
 
開發者ID:road-framework,項目名稱:ROADDesigner,代碼行數:25,代碼來源:ContractEditorEditPolicy.java

示例4: createNotificationsTabFolder

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private void createNotificationsTabFolder()
{
    _notificationTabFolder = new TabFolder(_form.getBody(), SWT.NONE);
    FormData layoutData = new FormData();
    layoutData.left = new FormAttachment(0);
    layoutData.top = new FormAttachment(0);
    layoutData.right = new FormAttachment(100);
    layoutData.bottom = new FormAttachment(100);
    _notificationTabFolder.setLayoutData(layoutData);
    _notificationTabFolder.setVisible(false);
    
    VHNotificationsTabControl controller = new VHNotificationsTabControl(_notificationTabFolder);       
    TabItem tab = new TabItem(_notificationTabFolder, SWT.NONE);
    tab.setText(NOTIFICATIONS);
    tab.setData(TabControl.CONTROLLER, controller);
    tab.setControl(controller.getControl());
}
 
開發者ID:wso2,項目名稱:andes,代碼行數:18,代碼來源:MBeanView.java

示例5: createOperationTabs

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private static void createOperationTabs(TabFolder tabFolder, JMXManagedObject mbean)
{
    ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(mbean);        
    int operationsCount = serverRegistry.getOperationModel(mbean).getCount();
    if(operationsCount == 0)
    {
        return;
    }
    
    OperationDataModel operationModel = serverRegistry.getOperationModel(mbean);
    for(OperationData operationData : operationModel.getOperations())
    {
        TabItem operationTab = new TabItem(tabFolder, SWT.NONE);
        operationTab.setText(ViewUtility.getDisplayText(operationData.getName()));
        operationTab.setData(operationData);
        OperationTabControl control = new OperationTabControl(tabFolder, operationData);
        operationTab.setData(TabControl.CONTROLLER, control);
        operationTab.setControl(control.getControl());
    }
}
 
開發者ID:wso2,項目名稱:andes,代碼行數:21,代碼來源:MBeanTabFolderFactory.java

示例6: createNotificationsTabIfNecessary

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private static void createNotificationsTabIfNecessary(TabFolder tabFolder, JMXManagedObject mbean)
{
    NotificationInfoModel[] items = MBeanUtility.getNotificationInfo(mbean);
    if(items == null || items.length == 0)
    {
        //the mbean has no notifications to subscribe for, do not create the tab.
        return;
    }
    
    NotificationsTabControl controller = new NotificationsTabControl(tabFolder, mbean);
    
    TabItem tab = new TabItem(tabFolder, SWT.NONE);
    tab.setText(NOTIFICATIONS);
    tab.setData(TabControl.CONTROLLER, controller);
    tab.setControl(controller.getControl());
}
 
開發者ID:wso2,項目名稱:andes,代碼行數:17,代碼來源:MBeanTabFolderFactory.java

示例7: createFolderItems

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
@Override
protected void createFolderItems(TabFolder folder) {
	final TabItem item = new TabItem(folder, SWT.NONE);
	item.setText(title);
	final Composite control = new Composite(folder, SWT.BORDER);
	control.setLayout(new GridLayout());
	item.setControl(control);
	page.createControl(control);
	item.setData(page);
	item.setData(ID, page.getId());
	page.setPageContainer(this);
	item.addDisposeListener(new DisposeListener() {

		@Override
		public void widgetDisposed(DisposeEvent e) {
			page.dispose();
		}
	});
	control.layout(true, true);
}
 
開發者ID:aktion-hip,項目名稱:relations,代碼行數:21,代碼來源:ProductInfoDialog.java

示例8: addTabPage

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
protected void addTabPage(String title, IFormatterModifiyTabPage tabPage)
{
	final TabItem tabItem = new TabItem(fTabFolder, SWT.NONE);
	applyDialogFont(tabItem.getControl());
	tabItem.setText(title);
	tabItem.setData(tabPage);
	tabItem.setControl(tabPage.createContents(controlManager, fTabFolder));
	fTabPages.add(tabPage);
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:10,代碼來源:FormatterModifyDialog.java

示例9: addTabPage

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
protected final void addTabPage(String title, IModifyDialogTabPage tabPage) {
	final TabItem tabItem= new TabItem(fTabFolder, SWT.NONE);
	applyDialogFont(tabItem.getControl());
	tabItem.setText(title);
	tabItem.setData(tabPage);
	tabItem.setControl(tabPage.createContents(fTabFolder));
	fTabPages.add(tabPage);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:9,代碼來源:ModifyDialog.java

示例10: addTabPage

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private final void addTabPage(String title, IModifyDialogTabPage tabPage) {
	final TabItem tabItem= new TabItem(fTabFolder, SWT.NONE);
	applyDialogFont(tabItem.getControl());
	tabItem.setText(title);
	tabItem.setData(tabPage);
	tabItem.setControl(tabPage.createContents(fTabFolder));
	fTabPages.add(tabPage);
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:9,代碼來源:CleanUpSelectionDialog.java

示例11: createAttributesTab

import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private static void createAttributesTab(TabFolder tabFolder, JMXManagedObject mbean)
{
    ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(mbean);
    if(serverRegistry.getAttributeModel(mbean).getCount() == 0)
    {
        return;
    }
    
    TabItem tab = new TabItem(tabFolder, SWT.NONE);
    tab.setText(ATTRIBUTES);
    AttributesTabControl controller = new AttributesTabControl(tabFolder);
    tab.setControl(controller.getControl());
    tab.setData(TabControl.CONTROLLER, controller);
}
 
開發者ID:wso2,項目名稱:andes,代碼行數:15,代碼來源:MBeanTabFolderFactory.java


注:本文中的org.eclipse.swt.widgets.TabItem.setData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。