本文整理汇总了Java中org.eclipse.swt.widgets.TabItem.setControl方法的典型用法代码示例。如果您正苦于以下问题:Java TabItem.setControl方法的具体用法?Java TabItem.setControl怎么用?Java TabItem.setControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.widgets.TabItem
的用法示例。
在下文中一共展示了TabItem.setControl方法的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: 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);
}
示例5: 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;
}
示例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: 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());
}
示例9: createUI_30_Tab_RGB_HSB
import org.eclipse.swt.widgets.TabItem; //导入方法依赖的package包/类
private void createUI_30_Tab_RGB_HSB(final Composite parent, final TabItem rgbTab) {
final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
final int scaleStyle = SWT.NONE;
final Composite container = new Composite(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(false, false).applyTo(container);
GridLayoutFactory.swtDefaults()//
.numColumns(3)
// .spacing(5, 10)
.applyTo(container);
// container.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
{
createUI_32_RGB(container, gd, scaleStyle);
// vertical spacer
final Label label = new Label(container, SWT.NONE);
GridDataFactory.fillDefaults().span(3, 1).indent(0, 10).applyTo(label);
createUI_34_HSB(container, gd, scaleStyle);
}
rgbTab.setControl(container);
}
示例10: addFeaturesTab
import org.eclipse.swt.widgets.TabItem; //导入方法依赖的package包/类
private void addFeaturesTab(TabFolder tabFolder) {
final TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
languageSet.associate(
"features", //$NON-NLS-1$
new TranslatableTextInput(Activator.getLocalizableText("LocalizeDialog.featuresTab")) { //$NON-NLS-1$
@Override
public void updateControl(String text) {
tabItem.setText(text);
}
}
);
Composite c = new Composite(tabFolder, SWT.NONE);
tabItem.setControl(c);
// createFeaturesTable(c, bundleInfos);
}
示例11: 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");
}
示例12: createTestResultsTab
import org.eclipse.swt.widgets.TabItem; //导入方法依赖的package包/类
/**
* Create the test results tab
*/
private void createTestResultsTab(){
TabItem tbtmTestresults = new TabItem(tabFolder, SWT.NONE);
tbtmTestresults.setText("TestResults");
tblTestResults = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);
tbtmTestresults.setControl(tblTestResults);
tblTestResults.setHeaderVisible(true);
tblTestResults.setLinesVisible(true);
TableColumn tblclmTestName = new TableColumn(tblTestResults, SWT.NONE);
tblclmTestName.setWidth(395);
tblclmTestName.setText("Test Name");
TableColumn tblclmnResult = new TableColumn(tblTestResults, SWT.NONE);
tblclmnResult.setWidth(100);
tblclmnResult.setText("Result");
}
示例13: LatticeTabUI
import org.eclipse.swt.widgets.TabItem; //导入方法依赖的package包/类
private LatticeTabUI(TabFolder tabFolderMIPA)
{
TabItem tabItemLattice = new TabItem(tabFolderMIPA, SWT.NONE);
tabItemLattice.setToolTipText("representation of lattice");
tabItemLattice.setText("Lattice");
SashForm sashLattice = new SashForm(tabFolderMIPA, SWT.NONE);
tabItemLattice.setControl(sashLattice);
StyledText styledTextLattice = new StyledText(sashLattice, SWT.BORDER
| SWT.READ_ONLY);
styledTextLattice.setText("Information for lattice are given here \n.");
styledTextLattice.setToolTipText("Information for lattice.");
Group grpLatticeTree = new Group(sashLattice, SWT.NONE);
grpLatticeTree.setToolTipText("tree view of lattice");
grpLatticeTree.setText("Lattice Tree View");
latticeTreeViewer = new TreeViewer(grpLatticeTree, SWT.BORDER);
Tree latticeTree = latticeTreeViewer.getTree();
latticeTree.setBounds(10, 29, 444, 526);
//latticeTreeViewer.setLabelProvider(new LatticeTreeLabelProvider());
//latticeTreeViewer.setContentProvider(new LatticeTreeContentProvider());
sashLattice.setWeights(new int[] { 1, 1 });
}
示例14: 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);
}
示例15: createHistoryOfChanges
import org.eclipse.swt.widgets.TabItem; //导入方法依赖的package包/类
/***************************************************************************
* Create the history of changes
**************************************************************************/
protected void createHistoryOfChanges(TabFolder folder)
{
TabItem itemHistory = new TabItem(folder, SWT.NONE);
itemHistory.setText("History of changes");
m_tabHistory = new Composite(folder, SWT.BORDER);
GridLayout tabLayout2 = new GridLayout();
tabLayout2.numColumns = 1;
m_tabHistory.setLayout(tabLayout2);
itemHistory.setControl(m_tabHistory);
m_history = new ArrayList<String>();
parseHistory();
m_table = new Table(m_tabHistory, SWT.NONE);
m_historyViewer = new TableViewer(m_table);
m_historyViewer.setContentProvider(new HistoryContentProvider());
m_historyViewer.setInput(m_history);
m_table.setHeaderVisible(true);
m_table.setLinesVisible(true);
m_table.setLayoutData(new GridData(GridData.FILL_BOTH));
IConfigurationManager mgr = (IConfigurationManager) ServiceManager.get(IConfigurationManager.class);
m_table.setFont(mgr.getFont(FontKey.CODE));
m_tabHistory.pack();
}