本文整理匯總了Java中org.eclipse.swt.widgets.TabItem.setText方法的典型用法代碼示例。如果您正苦於以下問題:Java TabItem.setText方法的具體用法?Java TabItem.setText怎麽用?Java TabItem.setText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.widgets.TabItem
的用法示例。
在下文中一共展示了TabItem.setText方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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);
}
示例2: 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();
}
示例3: 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);
}
示例4: 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;
}
示例5: 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);
}
示例6: 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);
}
}
示例7: 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);
}
示例8: 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);
}
示例9: 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");
}
示例10: setUpTabs
import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private void setUpTabs(Composite parent) {
tabFolder = new TabFolder(parent, SWT.BOTTOM);
commitHistoryTab = new TabItem(tabFolder, SWT.NULL);
commitHistoryTab.setText("Commit History");
commitHistoryComposite = new Composite(tabFolder, SWT.NULL);
commitHistoryTab.setControl(commitHistoryComposite);
commitHistoryComposite.setLayout(new FormLayout());
diffViewTab = new TabItem(tabFolder, SWT.NULL);
diffViewTab.setText("Diff View");
diffViewComposite = new Composite(tabFolder, SWT.NULL);
diffViewTab.setControl(diffViewComposite);
diffViewComposite.setLayout(new FormLayout());
}
示例11: createUI_10_Tabs
import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private void createUI_10_Tabs(final Composite parent) {
_tabFolder = new TabFolder(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, false).applyTo(_tabFolder);
_tabFolder.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
// hexagon
final TabItem hexagonTab = new TabItem(_tabFolder, SWT.NONE);
hexagonTab.setText(Messages.color_chooser_hexagon);
createUI_22_Tab_Hexagon(_tabFolder, hexagonTab);
// rgb / hsb
final TabItem rgbTab = new TabItem(_tabFolder, SWT.NONE);
rgbTab.setText(Messages.color_chooser_rgb);
createUI_30_Tab_RGB_HSB(_tabFolder, rgbTab);
_tabFolder.pack();
}
示例12: addPostActivationResourceTab
import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
private void addPostActivationResourceTab(TabFolder tabFolder, TranslatableResourceBundle resourceBundle) {
TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
tabItem.setText(resourceBundle.getDescription());
Composite c = new Composite(tabFolder, SWT.NONE);
tabItem.setControl(c);
c.setLayout(new GridLayout());
ArrayList<ITranslatableText> texts = new ArrayList<ITranslatableText>();
Enumeration<String> e = resourceBundle.getKeys();
while (e.hasMoreElements()) {
texts.add(new TranslatableText(resourceBundle, e.nextElement()));
}
Control tv = new TranslatableTreeComposite(c, new TextInputContentProvider(), texts.toArray(new ITranslatableText[0]), languageSet, updatedBundles);
tv.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
}
示例13: createContents
import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
@Override
protected Control createContents(Composite parent) {
TabFolder tabFolder = new TabFolder(parent, SWT.TOP);
tabFolder.setLayout(new GridLayout(1, true));
tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem tabFilter = new TabItem(tabFolder, SWT.NONE);
tabFilter.setText("Filters");
Group defPanel = new Group(tabFolder, SWT.NONE);
defPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
defPanel.setLayout(new GridLayout(1, false));
defPanel.setText("Search Filters");
tabFilter.setControl(defPanel);
TabItem support = new TabItem(tabFolder, SWT.NONE);
support.setText("Misc...");
Composite supportPanel = createContainer(tabFolder);
support.setControl(supportPanel);
SupportPanel.createSupportLinks(supportPanel);
return super.createContents(defPanel);
}
示例14: createGenericProperties
import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
/***************************************************************************
* Create the generic properties
**************************************************************************/
protected void createGenericProperties(TabFolder folder)
{
TabItem itemGenerics = new TabItem(folder, SWT.NONE);
itemGenerics.setText("General properties");
m_tabGenerics = new Composite(folder, SWT.BORDER);
m_tabGenerics.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout tabLayout1 = new GridLayout();
tabLayout1.numColumns = 2;
tabLayout1.marginHeight = 15;
m_tabGenerics.setLayout(tabLayout1);
itemGenerics.setControl(m_tabGenerics);
for (ProcProperties prop : ProcProperties.values())
{
if (prop.equals(ProcProperties.PROC_HISTORY))
continue;
String title = prop.tag.substring(0, 1).toUpperCase() + prop.tag.substring(1);
addGeneric(title, prop, prop.multiline);
}
m_tabGenerics.pack();
}
示例15: createTab
import org.eclipse.swt.widgets.TabItem; //導入方法依賴的package包/類
/**
* Create the tab.
*
* @param tabFolder
* The folder to add the tab to.
* @param tabIndex
* The index of the tab within the parent tab folder.
*/
private void createTab(TabFolder tabFolder, int tabIndex) {
TabItem configurationTab = new TabItem(tabFolder, SWT.NONE, tabIndex);
configurationTab.setText("SPL Profile");
ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder, SWT.V_SCROLL);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
configurationTab.setControl(scrolledComposite);
Composite composite = new Composite(scrolledComposite, SWT.FILL);
composite.setLayout(new GridLayout(1, false));
composite.setLayoutData(new GridData(GridData.FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false));
createHeader(composite);
createQualityGoalGroup(composite);
createMechanismGroup(composite);
scrolledComposite.setContent(composite);
scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}