当前位置: 首页>>代码示例>>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;未经允许,请勿转载。