Java 类org.eclipse.swt.widgets.TabItem 实例源码

项目:developer-studio    文件:UpdaterDialog.java   
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);
}
项目:neoscada    文件:NativeTabProvider.java   
@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 );
}
项目:convertigo-eclipse    文件:ConnectorEditorPart.java   
/**
 * 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();
}
项目:bdf2    文件:TableModifyWizardPage.java   
@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);
}
项目:team-explorer-everywhere    文件:SupportDialog.java   
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();
}
项目:team-explorer-everywhere    文件:SupportDialog.java   
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);
}
项目:team-explorer-everywhere    文件:SupportDialog.java   
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);
    }
}
项目:team-explorer-everywhere    文件:BuildPolicyDialog.java   
@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);
}
项目:ermaster-k    文件:AbstractRealColumnDialog.java   
@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;
}
项目:ether    文件:TabPanel.java   
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;
}
项目:code    文件:SummaryView.java   
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;

}
项目:bts    文件:BTSConfigurationDialog.java   
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());
//      }

    }
项目:LogViewer    文件:LogViewer.java   
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;
}
项目:robotFrameworkDebugger    文件:RobotFrameworkDebuggerUIThread.java   
/**
 * 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");
}
项目:robotFrameworkDebugger    文件:RobotFrameworkDebuggerUIThread.java   
/**
 * 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");
}
项目:robotFrameworkDebugger    文件:RobotFrameworkDebuggerUIThread.java   
/**
 * 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");
}
项目:mipa    文件:LatticeTabUI.java   
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 });
}
项目:datahierarchy    文件:DataHierarchyPreferencePage.java   
@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);
}
项目:SPELL    文件:PropertiesDialog.java   
/***************************************************************************
 * 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();
}
项目:SPELL    文件:PropertiesDialog.java   
/***************************************************************************
 * 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();
}
项目:jdepend4eclipse    文件:JDependPreferencePage.java   
@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);

    createFilterPreferences(defPanel);

    return tabFolder;
}
项目:gama    文件:EditboxPreferencePage.java   
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);
}
项目:gama    文件:EditboxPreferencePage.java   
@Override
public boolean performOk() {
    final TabItem[] items = folder.getItems();
    for (int i = 1; i < items.length; i++) {
        final Object o = items[i].getData();
        if (o instanceof BoxSettingsTab) {
            final BoxSettingsTab pref = (BoxSettingsTab) o;
            final String msg = pref.validate();
            if (msg != null) {
                folder.setSelection(i);
                setMessage(msg);
                return false;
            }
            pref.save();
        }
    }
    if (providersChanged) {
        BoxProviderRegistry.getInstance().storeProviders();
    }
    return true;
}
项目:gama    文件:EditboxPreferencePage.java   
@Override
public void widgetSelected(final SelectionEvent e) {
    final int i = categoryList.getSelectionIndex();
    if (i > -1) {
        final String name = categoryList.getItem(i);
        categoryList.remove(i);
        categoryFiles.remove(name);
        namesList.setItems(new String[0]);
        bAddFile.setEnabled(false);
        final TabItem ti = folder.getItem(i + 1);
        final Object o = ti.getData();
        ti.dispose();
        if (o instanceof BoxSettingsTab) {
            ((BoxSettingsTab) o).dispose();
        }
        BoxProviderRegistry.getInstance().removeProvider(name);
        providersChanged = true;
    }
}
项目:gama    文件:CRSChooser.java   
/**
 * Creates the CRS PreferencePage root control with no CRS selected
 * 
 * @param parent
 *            PreferencePage for this chooser
 * @return control for the PreferencePage
 */
public Control createControl(final Composite parent) {
    GridData gridData = null;

    gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
    folder = new TabFolder(parent, SWT.NONE);
    folder.setLayoutData(gridData);

    final TabItem standard = new TabItem(folder, SWT.NONE);
    standard.setText("Standard CRS");
    final Control stdCRS = createStandardCRSControl(folder);
    standard.setControl(stdCRS);

    final TabItem custom = new TabItem(folder, SWT.NONE);
    custom.setText("Custom CRS");
    final Control cstCRS = createCustomCRSControl(folder);
    custom.setControl(cstCRS);

    return folder;
}
项目:CooperateModelingEnvironment    文件:DiffView.java   
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());

    }
项目:mytourbook    文件:PrefPagePeople.java   
private void createUI_30_Person_Folder(final Composite parent) {

        _tabFolderPerson = new TabFolder(parent, SWT.NONE);
        GridDataFactory.fillDefaults()//
                .grab(true, false)
                .span(2, 1)
                .applyTo(_tabFolderPerson);
        {
            // tab: person
            final TabItem tabItemDetails = new TabItem(_tabFolderPerson, SWT.NONE);
            tabItemDetails.setText(Messages.Pref_People_Tab_Person);
            tabItemDetails.setControl(createUI_50_Tab_Person(_tabFolderPerson));

            // tab: hr zone
            final TabItem tabItemHRZone = new TabItem(_tabFolderPerson, SWT.NONE);
            tabItemHRZone.setText(Messages.Pref_People_Tab_HRZone);
            tabItemHRZone.setControl(createUI_60_Tab_HRZone(_tabFolderPerson));

            // tab: data transfer
            final TabItem tabItemDataTransfer = new TabItem(_tabFolderPerson, SWT.NONE);
            tabItemDataTransfer.setText(Messages.Pref_People_Tab_DataTransfer);
            tabItemDataTransfer.setControl(createUI_90_Tab_DataTransfer(_tabFolderPerson));
        }
    }
项目:mytourbook    文件:ColorChooser.java   
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();
    }
项目:mytourbook    文件:ColorChooser.java   
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);
    }
项目:mytourbook    文件:LocalizeDialog.java   
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);
    }
项目:mytourbook    文件:LocalizeDialog.java   
private void addPluginsTab(TabFolder tabFolder) {
    TabItem tabItem = new TabItem(tabFolder, SWT.NONE);
    languageSet.associate(tabItem, Messages.LocalizeDialog_TabTitle_Plugins);

    AboutBundleData[] bundleInfos;



    // create a data object for each bundle, remove duplicates, and include only resolved bundles (bug 65548)
    Map map = new HashMap();
    Bundle[] bundles = WorkbenchPlugin.getDefault().getBundles();
    for (int i = 0; i < bundles.length; ++i) {
        AboutBundleData data = new AboutBundleData(bundles[i]);
        if (BundleUtility.isReady(data.getState()) && !map.containsKey(data.getVersionedId())) {
            map.put(data.getVersionedId(), data);
        }
    }
    bundleInfos = (AboutBundleData[]) map.values().toArray(
            new AboutBundleData[0]);

    Composite c = new Composite(tabFolder, SWT.NONE);
    tabItem.setControl(c);

    createPluginsTab(c, bundleInfos);
}
项目:mytourbook    文件:PluginLocalizationDialog.java   
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));
}
项目:OpenSPIFe    文件:OpenPlanSearchHandler.java   
@Override
protected Control createPageArea(Composite parent) {
    Control pageArea = super.createPageArea(parent);
    if(pageArea instanceof Composite) {
        Composite composite = (Composite)pageArea;
        Control[] children = composite.getChildren();
        for(Control control : children) {
            if(control instanceof TabFolder) {
                TabFolder tabFolder = (TabFolder)control;
                TabItem[] tabItems = tabFolder.getItems();
                for(TabItem tabItem : tabItems) {
                    if(tabItem.getText().equals("Java Search") ||
                       tabItem.getText().equals("Task Search")) {
                        tabItem.dispose();
                    }
                }
            }
        }
    }
    return pageArea;
}
项目:Eclipse-Postfix-Code-Completion    文件:ChangeSignatureWizard.java   
private void createParameterExceptionsFolder(Composite composite) {
    TabFolder folder= new TabFolder(composite, SWT.TOP);
    folder.setLayoutData(new GridData(GridData.FILL_BOTH));

    TabItem item= new TabItem(folder, SWT.NONE);
    item.setText(RefactoringMessages.ChangeSignatureInputPage_parameters);
    item.setControl(createParameterTableControl(folder));

    TabItem itemEx= new TabItem(folder, SWT.NONE);
    itemEx.setText(RefactoringMessages.ChangeSignatureInputPage_exceptions);
    itemEx.setControl(createExceptionsTableControl(folder));

    folder.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            ((TabItem) e.item).getControl().setFocus();
        }
    });
}
项目:translationstudio8    文件:SpellPage.java   
@Override
protected Control createContents(Composite parent) {
    isInit = true;
    Composite tParent = new Composite(parent, SWT.BORDER);
    tParent.setLayoutData(new GridData(GridData.FILL_BOTH));
    tParent.setLayout(new GridLayout());

    addSpellInstalGroup(tParent);

    tabFolder = new TabFolder(tParent, SWT.NONE);
    tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));

    hunspellTabItem = new TabItem(tabFolder, SWT.NONE);
    hunspellTabItem.setText(Messages.getString("qa.preference.SpellPage.hunspellTab"));

    aspellTabItem = new TabItem(tabFolder, SWT.NONE);
    aspellTabItem.setText(Messages.getString("qa.preference.SpellPage.aspellTab"));

    createHunspellCmp();
    createAspellCmp();

    initData();
    return parent;
}
项目:ermaster-nhit    文件:AbstractRealColumnDialog.java   
@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;
}
项目:DroidNavi    文件:OptionEffect.java   
public OptionEffect(TabFolder folder, EventHandler handler) {
    if(folder == null) { throw new NullPointerException("Tab Folder cannot be null."); }
    if(handler == null) { throw new NullPointerException("Event Handler cannot be null."); }

    m_parentFolder = folder;
    m_tabItem = new TabItem(m_parentFolder, SWT.NONE);
    m_tabItem.setText("Notify Effects");
    m_handler = handler;

    m_oldLocation = (WindowLocation) PreferenceManager.getPreferenceManager()
            .get(PreferenceKey.WINDOW_LOCATION, WindowLocation.BOTTOM_RIGHT);

    @SuppressWarnings("unchecked")
    Class<? extends EventWindowEffect> clazz = (Class<? extends EventWindowEffect>) PreferenceManager.getPreferenceManager()
            .get(PreferenceKey.EFFECT_TYPE, StandardShowEffect.class);
    m_oldEffect = EffectType.getTypeFromClass(clazz);

    init();
}
项目:idecore    文件:LogViewShell.java   
private void createTabLogView() {
    tabLogView = new TabFolder(shell, SWT.NONE);
    tabLogView.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));

    TabItem itmSummaryLog = new TabItem(tabLogView, SWT.NONE);
    itmSummaryLog.setText("Summary Log");
    txtSummaryArea = new Text(tabLogView, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL);
    txtSummaryArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    txtSummaryArea.setText(deployLog);
    txtSummaryArea.setEditable(false);
    itmSummaryLog.setControl(txtSummaryArea);

    TabItem itmDebugLog = new TabItem(tabLogView, SWT.NONE);
    itmDebugLog.setText("Debug Log");
    txtDebugArea = new Text(tabLogView, SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL);
    txtDebugArea.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    txtDebugArea.setText(Utils.isNotEmpty(debugLog) ? debugLog : "n/a");
    txtDebugArea.setEditable(false);
    itmDebugLog.setControl(txtDebugArea);

}
项目:SPLevo    文件:SPLProfileTab.java   
/**
 * 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));

}
项目:SPLevo    文件:ConfigurationTab.java   
/**
 * 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("Configuration");

    ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder, SWT.V_SCROLL);
    scrolledComposite.setExpandHorizontal(true);
    scrolledComposite.setExpandVertical(true);

    Composite composite = new Composite(scrolledComposite, SWT.FILL);
    composite.setLayout(new GridLayout(1, false));
    composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL));

    createHeader(composite);
    buildFeatureModelBuilderGroup(composite);
    buildDifferConfigurationGroup(composite);
    scrolledComposite.setContent(composite);
    scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
    configurationTab.setControl(scrolledComposite);
}