本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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());
}
示例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());
}
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}