本文整理汇总了Java中org.eclipse.swt.widgets.TabItem类的典型用法代码示例。如果您正苦于以下问题:Java TabItem类的具体用法?Java TabItem怎么用?Java TabItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TabItem类属于org.eclipse.swt.widgets包,在下文中一共展示了TabItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: show
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
@Override
protected void show ()
{
super.show ();
final int tabIndex = findIndex ( this.index );
if ( tabIndex < 0 )
{
this.item = new TabItem ( this.folder, SWT.NONE );
this.item.setData ( "order", this.index );
}
else
{
this.item = new TabItem ( this.folder, SWT.NONE, tabIndex );
this.item.setData ( "order", this.index );
}
this.item.setControl ( this.container );
useItem ( this.item );
}
示例2: createFeatureListTab
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
if (type == ActiveTab.ALL_FEATURES) {
tabItem.setText(ALL_FEATURES_TAB_TITLE);
} else {
tabItem.setText(UPDATES_TAB_TITLE);
}
ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scroll.setLayout(new GridLayout());
scroll.setLayoutData(new GridData());
Group group = new Group(scroll, SWT.NONE);
group.setLayout(new GridLayout());
group.setLayoutData(new GridData());
listFeatures(group, type);
scroll.setContent(group);
scroll.setExpandHorizontal(true);
scroll.setExpandVertical(true);
scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
tabItem.setControl(scroll);
}
示例3: createTabFolderOutputDesign
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
/**
* This method initializes tabFolder
*
*/
private void createTabFolderOutputDesign() {
GridData gridData2 = new org.eclipse.swt.layout.GridData();
gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData2.grabExcessVerticalSpace = true;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
tabFolderOutputDesign = new TabFolder(this, SWT.BOTTOM);
tabFolderOutputDesign.setLayoutData(gridData2);
createCompositeDesign();
createCompositeOutput();
tabItemOutput = new TabItem(tabFolderOutputDesign, SWT.NONE);
tabItemOutput.setText("Output");
tabItemOutput.setControl(compositeOutput);
tabItemDesign = new TabItem(tabFolderOutputDesign, SWT.NONE);
tabItemDesign.setText("Design");
tabItemDesign.setControl(compositeDesign);
if (connector instanceof HtmlConnector)
selectTabDesign();
}
示例4: createControl
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
@Override
public void createControl(Composite parent) {
final TabFolder tabFolder = new TabFolder(parent, SWT.NULL);
String[] tabIndex = new String[] { "基本属性", "备注", "其他" };
for (int i = 0; i < tabIndex.length - 1; i++) {
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
tabItem.setText(tabIndex[i]);
Composite composite = new Composite(tabFolder, SWT.NULL);
if (i == 0) {
createBasicControl(composite);
} else if (i == 1) {
createCommentControl(composite);
}
tabItem.setControl(composite);
}
setControl(parent);
}
示例5: refresh
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
public void refresh() {
final DataProviderCollection newCollection = InternalSupportUtils.createDataProviderCollection(getShell());
if (newCollection == null) {
/*
* cancelled
*/
return;
}
dataProviderCollection = newCollection;
final TabItem[] items = tabFolder.getItems();
for (int i = 0; i < items.length; i++) {
items[i].dispose();
}
createUI();
}
示例6: createTabForDataProvider
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
private void createTabForDataProvider(final DataProviderWrapper dataProvider) {
final TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
tabItem.setText(dataProvider.getDataProviderInfo().getLabel());
final Composite outputComposite = new Composite(tabFolder, SWT.NONE);
final FillLayout outputLayout = new FillLayout();
outputLayout.marginWidth = getHorizontalMargin();
outputLayout.marginHeight = getVerticalMargin();
outputComposite.setLayout(outputLayout);
final DataProviderOutputControl outputControl = new DataProviderOutputControl(outputComposite, SWT.NONE);
outputControl.setData(dataProvider);
tabItem.setControl(outputComposite);
}
示例7: createOptionalExportsTab
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
private void createOptionalExportsTab() {
if (dataProviderCollection.hasOptionalExportDataProviders()) {
final TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
tabItem.setText(Messages.getString("SupportDialog.OptionalExportsTablItemText")); //$NON-NLS-1$
final Composite optionalComposite = new Composite(tabFolder, SWT.NONE);
final FillLayout optionalLayout = new FillLayout();
optionalLayout.marginWidth = getHorizontalMargin();
optionalLayout.marginHeight = getVerticalMargin();
optionalComposite.setLayout(optionalLayout);
new OptionalExportsControl(optionalComposite, SWT.NONE, dataProviderCollection, dataProviderTreeControl);
tabItem.setControl(optionalComposite);
}
}
示例8: hookAddToDialogArea
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
@Override
protected void hookAddToDialogArea(final Composite dialogArea) {
SWTUtil.gridLayout(dialogArea);
final TabFolder folder = new TabFolder(dialogArea, SWT.TOP);
GridDataBuilder.newInstance().fill().grab().applyTo(folder);
generalTabItem = new TabItem(folder, SWT.NONE);
generalTabItem.setText(Messages.getString("BuildPolicyDialog.GeneralTabItemText")); //$NON-NLS-1$
final GeneralTabControl generalTabControl = new GeneralTabControl(folder, SWT.NONE, configuration);
generalTabItem.setControl(generalTabControl);
markersTabItem = new TabItem(folder, SWT.NONE);
markersTabItem.setText(Messages.getString("BuildPolicyDialog.MarkersTabItemText")); //$NON-NLS-1$
final MarkerTabControl markerTabControl = new MarkerTabControl(folder, SWT.NONE, configuration);
markersTabItem.setControl(markerTabControl);
}
示例9: createRootComposite
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
@Override
protected Composite createRootComposite(Composite parent) {
this.tabFolder = new TabFolder(parent, SWT.NONE);
this.tabItem = new TabItem(this.tabFolder, SWT.NONE);
this.tabItem.setText(ResourceString.getResourceString("label.basic"));
Composite composite = CompositeFactory.createComposite(this.tabFolder,
this.getCompositeNumColumns(), true);
this.tabItem.setControl(composite);
this.tabItem = new TabItem(this.tabFolder, SWT.NONE);
this.tabItem.setText(ResourceString.getResourceString("label.detail"));
Composite detailComposite = CompositeFactory.createComposite(
this.tabFolder, 2, true);
this.initializeDetailTab(detailComposite);
this.tabItem.setControl(detailComposite);
return composite;
}
示例10: createTabPanel
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
public TabItem createTabPanel(TabFolder folder) {
this.folder = folder;
tabIdx = folder.getItemCount();
Composite panel = new Composite(folder, SWT.NONE);
GridLayout layout = new GridLayout(1, true);
layout.marginWidth = 0;
layout.marginHeight = 0;
panel.setLayout(layout);
panel.setLayoutData(GridDataFactory.fill(true, true));
fillContent(panel);
TabItem result = new TabItem(folder, SWT.NONE);
result.setControl(panel);
result.setText(label);
return result;
}
示例11: getCurrentTab
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
public Tab getCurrentTab() {
if (tabFolder != null && !this.tabFolder.isDisposed()) {
TabItem tabItem = SummaryView.this.tabFolder.getSelection()[0];
if (tabItem.getText().compareTo("MIC") == 0) {
return Tab.MIC;
} else if (tabItem.getText().compareTo("MIRC") == 0) {
return Tab.MIRC;
} else if (tabItem.getText().compareTo("MIM") == 0) {
return Tab.MIM;
} else if (tabItem.getText().compareTo("MCBI") == 0) {
return Tab.MCBI;
}
}
return Tab.UNK;
}
示例12: loadSelectConfigReferencedObjectsTabItem
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
private void loadSelectConfigReferencedObjectsTabItem(TabFolder tabfolder,
TabItem referencedtabItem, BTSConfigItem configItem) {
Composite referencedEditComp = (Composite) referencedtabItem
.getControl();
referencedTypeSelector = new ObjectTypeSelectionTreeComposite(
configurationController, referencedEditComp, SWT.NONE);
if (configItem.getPassportEditorConfig() == null) {
}
//FIXME update
// else {
// if (configItem.getPassportEditorConfig().getReferencedTypesPath() == null) {
// configItem.getPassportEditorConfig()
// .setReferencedTypesPath(
// BtsmodelFactory.eINSTANCE
// .createBTSObjectTypePathRoot());
// }
// referencedTypeSelector.setPathInput(configItem
// .getPassportEditorConfig().getReferencedTypesPath(),
// getEditingDomain(configItem), configurationController
// .getActiveConfiguration());
// }
}
示例13: widgetSelected
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
public void widgetSelected(SelectionEvent e) {
TabItem item = (TabItem)e.item;
if(item == null) {
return;
}
// get new
LogFileTab tab = getSelectedTab(item);
if(tab == null || tab.getDocument() == null) {
return;
}
// save old selection
if (oldTabItem != null) {
LogFileTab oldTab = getSelectedTab(oldTabItem);
if((oldTab != null) && (oldTab.getDocument() != null)) {
oldTab.setSelection(viewer.getSelection());
oldTab.setTopIndex(viewer.getTopIndex());
}
}
// restore
fileEncodingAction.setText(LogViewerPlugin.getResourceString("menu.encodingchange.text",new Object[] {tab.getDocument().getEncoding()})); //$NON-NLS-1$
showDocument(tab.getDocument(), tab.getSelection(), tab.getTopIndex(),false);
updateTailStartStopButtons(tab.getDocument().isMonitor());
refreshCurrentFileAction.setEnabled(true);
// set act tab item
oldTabItem = item;
}
示例14: createCallStackTab
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
/**
* Create the callstack tab
*/
private void createCallStackTab(){
TabItem tbtmCallStack = new TabItem(tabFolder, SWT.NONE);
tbtmCallStack.setText("Call Stack");
tblCallStackItem = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);
tblCallStackItem.setHeaderVisible(true);
tbtmCallStack.setControl(tblCallStackItem);
tblCallStackItem.setLinesVisible(true);
TableColumn tblclmnCallstackType = new TableColumn(tblCallStackItem, SWT.NONE);
tblclmnCallstackType.setText("Type");
tblclmnCallstackType.setWidth(100);
TableColumn tblclmnCallStack = new TableColumn(tblCallStackItem, SWT.NONE);
tblclmnCallStack.setText("Name");
tblclmnCallStack.setWidth(300);
TableColumn tblclmnLineNumber = new TableColumn(tblCallStackItem, SWT.LEFT);
tblclmnLineNumber.setWidth(90);
tblclmnLineNumber.setText("Line Number");
}
示例15: createVariablesTab
import org.eclipse.swt.widgets.TabItem; //导入依赖的package包/类
/**
* Create the variables tab
*/
private void createVariablesTab(){
TabItem tbtmVariables = new TabItem(tabFolder, SWT.NONE);
tbtmVariables.setText("Variables");
tblVariables = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);
tblVariables.setHeaderVisible(true);
tbtmVariables.setControl(tblVariables);
tblVariables.setLinesVisible(true);
TableColumn tblclmnVariableName = new TableColumn(tblVariables, SWT.NONE);
tblclmnVariableName.setWidth(100);
tblclmnVariableName.setText("Variable Name");
TableColumn tblclmnValue = new TableColumn(tblVariables, SWT.NONE);
tblclmnValue.setWidth(389);
tblclmnValue.setText("Value");
}