當前位置: 首頁>>代碼示例>>Java>>正文


Java TabItem類代碼示例

本文整理匯總了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 );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:23,代碼來源:NativeTabProvider.java

示例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);
}
 
開發者ID:wso2,項目名稱:developer-studio,代碼行數:22,代碼來源:UpdaterDialog.java

示例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();
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:24,代碼來源:ConnectorEditorPart.java

示例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);
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:18,代碼來源:TableModifyWizardPage.java

示例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();
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:19,代碼來源:SupportDialog.java

示例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);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:17,代碼來源:SupportDialog.java

示例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);
    }
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:17,代碼來源:SupportDialog.java

示例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);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:18,代碼來源:BuildPolicyDialog.java

示例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;
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:22,代碼來源:AbstractRealColumnDialog.java

示例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;
}
 
開發者ID:arisona,項目名稱:ether,代碼行數:20,代碼來源:TabPanel.java

示例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;

}
 
開發者ID:aroog,項目名稱:code,代碼行數:17,代碼來源:SummaryView.java

示例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());
//		}

	}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:25,代碼來源:BTSConfigurationDialog.java

示例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;
}
 
開發者ID:anb0s,項目名稱:LogViewer,代碼行數:27,代碼來源:LogViewer.java

示例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");
}
 
開發者ID:nspilka,項目名稱:robotFrameworkDebugger,代碼行數:25,代碼來源:RobotFrameworkDebuggerUIThread.java

示例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");
}
 
開發者ID:nspilka,項目名稱:robotFrameworkDebugger,代碼行數:21,代碼來源:RobotFrameworkDebuggerUIThread.java


注:本文中的org.eclipse.swt.widgets.TabItem類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。