org.eclipse.swt.widgets.TabFolder源码实例Demo

类org.eclipse.swt.widgets.TabFolder源码实例Demo

下面列出了org.eclipse.swt.widgets.TabFolder 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: ermaster-b   文件: 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 = super.createRootComposite(this.tabFolder);
	this.tabItem.setControl(composite);

	this.tabItem = new TabItem(this.tabFolder, SWT.NONE);
	this.tabItem.setText(ResourceString.getResourceString("label.detail"));

	Composite detailComposite = this.createDetailTab(this.tabFolder);
	this.initializeDetailTab(detailComposite);
	this.tabItem.setControl(detailComposite);

	return composite;
}
 
源代码2 项目: ermaster-b   文件: TestDataDialog.java
private void createBottomComposite(Composite composite) {
	GridData bottomGridData = new GridData();
	bottomGridData.grabExcessHorizontalSpace = true;
	bottomGridData.horizontalAlignment = GridData.FILL;
	bottomGridData.widthHint = WIDTH;

	this.createOutputOrderGroup(composite);
	
	// �^�u
	this.tabFolder = new TabFolder(composite, SWT.NONE);
	this.tabFolder.setLayoutData(bottomGridData);

	this.directTestDataTabWrapper = new DirectTestDataTabWrapper(this,
			this.tabFolder, SWT.NONE);
	this.tabWrapperList.add(this.directTestDataTabWrapper);

	this.repeatTestDataTabWrapper = new RepeatTestDataTabWrapper(this,
			this.tabFolder, SWT.NONE);
	this.tabWrapperList.add(this.repeatTestDataTabWrapper);

}
 
源代码3 项目: birt   文件: AggregationDialog.java
private TabFolder createTabFolder( Composite parent )
{
	tabFolder = new TabFolder( parent, SWT.NONE );
	// Should not set layout for TabFolder.
	// GridData gd = new GridData( GridData.FILL_BOTH );
	// tabFolder.setLayoutData( gd );
	// GridLayout layout = new GridLayout( );
	// tabFolder.setLayout( layout );

	rowArea = new TabItem( tabFolder, SWT.NONE );
	rowArea.setText( Messages.getString( "AggregationDialog.TabItem.Title.RowArea" ) ); //$NON-NLS-1$
	rowArea.setImage( CrosstabUIHelper.getImage( CrosstabUIHelper.ROWS_AREA_IMAGE ) );

	columnArea = new TabItem( tabFolder, SWT.NONE );
	columnArea.setText( Messages.getString( "AggregationDialog.TabItem.Title.ColumnArea" ) ); //$NON-NLS-1$
	columnArea.setImage( CrosstabUIHelper.getImage( CrosstabUIHelper.COLUMNS_AREA_IMAGE ) );

	return tabFolder;
}
 
源代码4 项目: M2Doc   文件: TemplateCustomPropertiesPage.java
@Override
public void createControl(Composite parent) {

    final Composite container = new Composite(parent, parent.getStyle());
    setControl(container);
    container.setLayout(new GridLayout(1, false));

    final TabFolder tabFolder = new TabFolder(container, SWT.BORDER);
    tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    final CheckboxTableViewer tokenViewer = addTokenTabItem(tabFolder, registry, properties);
    addNSURITabItem(tabFolder, tokenViewer, properties);
    addServicesTabItem(tabFolder, tokenViewer, properties);
    if (!M2DocUtils.VERSION.equals(properties.getM2DocVersion())) {
        setMessage("M2Doc version mismatch: template version is " + properties.getM2DocVersion()
            + " and current M2Doc version is " + M2DocUtils.VERSION, IMessageProvider.WARNING);
    } else {
        setMessage("Select services and packages");
    }
}
 
源代码5 项目: tmxeditor8   文件: 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;
}
 
源代码6 项目: slr-toolkit   文件: SettingsDialog.java
private void buildBubbleSettings() {
	pageBubbleChart.setLayout(new FillLayout());
	TabFolder folderBubbleChart = new TabFolder(pageBubbleChart, SWT.NONE);
	
	TabItem itemFolderBubbleChart_1 = new TabItem(folderBubbleChart, SWT.NONE);
	TabItem itemFolderBubbleChart_2 = new TabItem(folderBubbleChart, SWT.NONE);
	TabItem itemFolderBubbleChart_3 = new TabItem(folderBubbleChart, SWT.NONE);
	
	gerneralPageBubble = new GeneralPageBubble(folderBubbleChart, SWT.NONE);
	seriesPageBubble = new SeriesPageBubble(folderBubbleChart, SWT.NONE);
	axisPageBubble = new AxisPageBubble(folderBubbleChart, SWT.NONE);
	
	itemFolderBubbleChart_1.setControl(gerneralPageBubble);
	itemFolderBubbleChart_2.setControl(seriesPageBubble);
	itemFolderBubbleChart_3.setControl(axisPageBubble);
	
	itemFolderBubbleChart_1.setText("General Settings");
	itemFolderBubbleChart_2.setText("Series Settings");
	itemFolderBubbleChart_3.setText("Axis Settings");
}
 
源代码7 项目: 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);
}
 
源代码8 项目: erflute   文件: SearchDialog.java
private void initialize(Composite parent) {
    final GridLayout gridLayout = new GridLayout();
    gridLayout.numColumns = 3;
    gridLayout.verticalSpacing = 15;

    createKeywordCombo(parent);

    createReplaceCombo(parent);

    final GridData gridData = new GridData();
    gridData.horizontalAlignment = GridData.FILL;
    gridData.horizontalSpan = 3;
    gridData.grabExcessHorizontalSpace = true;

    this.tabFolder = new TabFolder(parent, SWT.NONE);
    tabFolder.setLayoutData(gridData);

    createRegionGroup(tabFolder);
    createResultGroup(tabFolder);

    parent.setLayout(gridLayout);

    selectAllCheckBox(true);
}
 
源代码9 项目: ermaster-b   文件: RepeatTestDataTabWrapper.java
public RepeatTestDataTabWrapper(TestDataDialog dialog, TabFolder parent,
		int style) {
	super(dialog, parent, style, "label.testdata.repeat.input");

	this.dialog = dialog;

	this.init();
}
 
源代码10 项目: LogViewer   文件: LogViewer.java
public void createPartControl(Composite parent) {
    //viewer
    this.parent = parent;
    documentListener = new ViewDocumentListener();
    tabfolder = new TabFolder(parent,0);
    tabfolder.addSelectionListener(new TabSelectionListener());
    viewer = new LogFileViewer(tabfolder,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);

    // DnD
    DropTarget target = new DropTarget(parent, DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK);
    target.setTransfer(new Transfer[] {FileTransfer.getInstance(), TextTransfer.getInstance()});
    target.addDropListener (new DropTargetAdapter() {
        public void dragEnter(DropTargetEvent e) {
            if (e.detail == DND.DROP_NONE)
                e.detail = DND.DROP_COPY;
        }
        public void drop(DropTargetEvent event) {
            if (event.data == null || ((String[])event.data).length < 1) {
                event.detail = DND.DROP_NONE;
                return;
            }
            //File file = new File(((String[])event.data)[0]);
            if (!checkAndOpenFile(LogFileType.LOGFILE_SYSTEM_FILE,((String[])event.data)[0], null, false))
                event.detail = DND.DROP_NONE;
        }
    });

    // fill the menues
    makeActions();
    hookContextMenu();
    contributeToActionBars();
    openAllLastOpenFiles();
}
 
源代码11 项目: nebula   文件: PropertyTableSnippet.java
/**
 * @param args
 */
public static void main(final String[] args) {

	Locale.setDefault(Locale.ENGLISH);

	final Display display = new Display();
	final Shell shell = new Shell(display);
	shell.setText("PropertyTable snippet");
	shell.setLayout(new FillLayout(SWT.VERTICAL));

	final TabFolder tabFolder = new TabFolder(shell, SWT.BORDER);

	final TabItem item1 = new TabItem(tabFolder, SWT.NONE);
	item1.setText("First");
	item1.setControl(buildPropertyTable(tabFolder, true, true, true));

	final TabItem item2 = new TabItem(tabFolder, SWT.NONE);
	item2.setText("Second");
	item2.setControl(buildPropertyTable(tabFolder, false, true, false));

	final TabItem item3 = new TabItem(tabFolder, SWT.NONE);
	item3.setText("Third");
	item3.setControl(buildPropertyTable(tabFolder, true, false, true));

	final TabItem item4 = new TabItem(tabFolder, SWT.NONE);
	item4.setText("Forth");
	item4.setControl(buildPropertyTable(tabFolder, true, false, false));

	shell.setSize(800, 600);
	shell.open();
	SWTGraphicUtil.centerShell(shell);

	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) {
			display.sleep();
		}
	}

	display.dispose();
}
 
源代码12 项目: ermaster-b   文件: AttributeTabWrapper.java
public AttributeTabWrapper(ViewDialog viewDialog, TabFolder parent,
		int style, View copyData) {
	super(viewDialog, parent, style, "label.table.attribute");

	this.copyData = copyData;
	this.viewDialog = viewDialog;

	this.init();
}
 
源代码13 项目: ermaster-b   文件: DescriptionTabWrapper.java
public DescriptionTabWrapper(AbstractDialog dialog, TabFolder parent,
		int style, View copyData) {
	super(dialog, parent, style, "label.table.description");

	this.copyData = copyData;

	this.init();
}
 
源代码14 项目: neoscada   文件: InterfacesTab.java
@Override
public void createTab ( final TabFolder tabFolder )
{
    this.item = new TabItem ( tabFolder, SWT.NONE );
    this.item.setText ( Messages.InterfacesTab_TabItem_Label );

    this.viewer = new ListViewer ( tabFolder );
    this.item.setControl ( this.viewer.getControl () );
    this.viewer.setContentProvider ( new ArrayContentProvider () );
}
 
源代码15 项目: birt   文件: JdbcDriverManagerDialog.java
/**
 * Add jarPage and driverPage
 * @param tabFolder parent Composite
 */
private void addTabPages( TabFolder tabFolder )
{
	localizeButtonWidth( );
	addJarPage( tabFolder );
	addDriverPage( tabFolder );
}
 
源代码16 项目: neoscada   文件: PrivilegeTab.java
@Override
public void createTab ( final TabFolder tabFolder )
{
    this.display = tabFolder.getDisplay ();
    this.item = new TabItem ( tabFolder, SWT.NONE );
    this.item.setText ( "Privileges" );

    this.viewer = new ListViewer ( tabFolder );

    this.viewer.setContentProvider ( new ObservableSetContentProvider () );

    this.item.setControl ( this.viewer.getControl () );
}
 
源代码17 项目: neoscada   文件: DetailsView.java
public DetailsView ( final Composite parent )
{
    this.tabFolder = new TabFolder ( parent, SWT.NONE );

    this.tabs.add ( new InterfacesTab () );
    this.tabs.add ( new StatisticsTab () );
    this.tabs.add ( new PrivilegeTab () );
    this.tabs.add ( new PropertiesTab () );

    for ( final DetailsTab tab : this.tabs )
    {
        tab.createTab ( this.tabFolder );
    }
}
 
源代码18 项目: neoscada   文件: EventHistorySearchDialog.java
@Override
protected Control createDialogArea ( final Composite parent )
{
    // initialize header area
    setTitle ( Messages.search_for_events );
    setMessage ( Messages.search_for_events_description );
    // setHelpAvailable ( true );

    // initialize content
    final Composite rootComposite = (Composite)super.createDialogArea ( parent );

    String filterString = ""; //$NON-NLS-1$
    if ( this.initialFilter != null && this.initialFilter.second != null )
    {
        filterString = this.initialFilter.second;
    }

    final TabFolder tabFolder = new TabFolder ( rootComposite, SWT.NONE );

    // create tabs
    for ( final FilterTab tab : getFilterTabs () )
    {
        final TabItem tabItem = new TabItem ( tabFolder, SWT.NONE );
        tabItem.setText ( tab.getName () );
        tabItem.setControl ( tab.createControl ( tabFolder, this, SWT.NONE, filterString ) );
    }

    final GridData layoutData = new GridData ();
    layoutData.horizontalAlignment = GridData.FILL;
    layoutData.grabExcessHorizontalSpace = true;
    layoutData.verticalAlignment = GridData.FILL;
    layoutData.grabExcessVerticalSpace = true;
    tabFolder.setLayoutData ( layoutData );

    selectInitialFilterPage ( tabFolder );

    return rootComposite;
}
 
@Override
public void createControl(final Composite parent) {
    final Composite tabComposite = new Composite(parent, SWT.NONE);
    tabComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
    tabComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).create());

    final Label descriptionLabel = new Label(tabComposite, SWT.WRAP);
    descriptionLabel.setText(getDescription());
    descriptionLabel.setLayoutData(GridDataFactory.swtDefaults().grab(true, false).create());

    final TabFolder tabFolder = new TabFolder(tabComposite, SWT.TOP);
    tabFolder.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
    tabFolder.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(final SelectionEvent e) {
            if (treeViewer != null) {
                treeViewer.refresh();
            }
            if (rawViewer != null) {
                rawViewer.refresh();
            }
        }
    });

    final TabItem treeClasspathItem = new TabItem(tabFolder, SWT.NONE);
    treeClasspathItem.setText(Messages.hiearachical);
    treeClasspathItem.setControl(createTreeClasspathControl(tabFolder));

    final TabItem rawClasspathItem = new TabItem(tabFolder, SWT.NONE);
    rawClasspathItem.setText(Messages.raw);
    rawClasspathItem.setControl(createRawClasspathControl(tabFolder));

    setControl(tabComposite);
}
 
源代码20 项目: neoscada   文件: NativeTabProvider.java
private FolderImplementation ( final TabFolder folder, final Composite container, final int index, final String label, final MenuManager mgr )
{
    super ( index, label, mgr );
    this.folder = folder;
    this.container = container;

}
 
源代码21 项目: BiglyBT   文件: SubscriptionWizard.java
private Composite createCreateComposite(Composite parent) {
	Composite composite = new Composite(parent,SWT.NONE);

	FillLayout layout = new FillLayout();
	layout.marginHeight = 8;
	layout.marginWidth  = 8;

	composite.setLayout(layout);

	createTabFolder = new TabFolder(composite,SWT.NONE);
	createTabFolder.setFont(subTitleFont);

	createSearchTabItem = new TabItem(createTabFolder,SWT.NONE);
	createSearchTabItem.setText(MessageText.getString("Wizard.Subscription.create.search"));
	createSearchTabItem.setControl(createCreateSearchComposite(createTabFolder));

	createRSSTabItem = new TabItem(createTabFolder,SWT.NONE);
	createRSSTabItem.setText("  " + MessageText.getString("Wizard.Subscription.create.rss"));
	createRSSTabItem.setControl(createCreateRSSComposite(createTabFolder));

	createTabFolder.addListener(SWT.Selection, new Listener() {
		@Override
		public void handleEvent(Event event) {
			TabItem[] selectedItems = createTabFolder.getSelection();
			if(selectedItems.length != 1) {
				return;
			}
			TabItem selectedItem = selectedItems[0];
			if(selectedItem == createRSSTabItem) {
				setMode(MODE_CREATE_RSS);
			} else {
				setMode(MODE_CREATE_SEARCH);
			}
		}
	});

	return composite;
}
 
源代码22 项目: tm4e   文件: GrammarPreferencePage.java
/**
 * Create detail grammar content which is filled when a grammar is selected in
 * the grammar list.
 * 
 * @param parent
 */
private void createGrammarDetailContent(Composite parent) {
	TabFolder folder = new TabFolder(parent, SWT.NONE);

	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	folder.setLayoutData(gd);

	createGeneralTab(folder);
	createContentTypeTab(folder);
	createThemeTab(folder);
	createInjectionTab(folder);
}
 
源代码23 项目: tm4e   文件: GrammarPreferencePage.java
/**
 * Create "General" tab
 * 
 * @param folder
 */
private void createGeneralTab(TabFolder folder) {
	TabItem tab = new TabItem(folder, SWT.NONE);
	tab.setText(TMUIMessages.GrammarPreferencePage_tab_general_text);

	Composite parent = new Composite(folder, SWT.NONE);
	parent.setLayout(new GridLayout());
	parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	grammarInfoWidget = new GrammarInfoWidget(parent, SWT.NONE);
	grammarInfoWidget.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	tab.setControl(parent);

}
 
源代码24 项目: tm4e   文件: GrammarPreferencePage.java
/**
 * Create "Content type" tab
 * 
 * @param folder
 */
private void createContentTypeTab(TabFolder folder) {
	TabItem tab = new TabItem(folder, SWT.NONE);
	tab.setText(TMUIMessages.GrammarPreferencePage_tab_contentType_text);

	Composite parent = new Composite(folder, SWT.NONE);
	parent.setLayout(new GridLayout());
	parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	contentTypesWidget = new ContentTypesBindingWidget(parent, SWT.NONE);
	contentTypesWidget.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	tab.setControl(parent);
}
 
源代码25 项目: ermaster-b   文件: DirectTestDataTabWrapper.java
public DirectTestDataTabWrapper(TestDataDialog dialog, TabFolder parent,
		int style) {
	super(dialog, parent, style, "label.testdata.direct.input");

	this.dialog = dialog;

	this.init();
}
 
源代码26 项目: ermaster-b   文件: AttributeTabWrapper.java
public AttributeTabWrapper(TableDialog tableDialog, TabFolder parent,
		int style, ERTable copyData) {
	super(tableDialog, parent, style, "label.table.attribute");

	this.copyData = copyData;
	this.tableDialog = tableDialog;

	this.init();
}
 
源代码27 项目: tm4e   文件: LanguageConfigurationInfoWidget.java
protected void createCommentsTab(TabFolder folder) {
	commentsTab = createTab(folder, LanguageConfigurationMessages.LanguageConfigurationInfoWidget_comments);
	Composite parent = (Composite) commentsTab.getControl();

	lineCommentText = createText(parent,
			LanguageConfigurationMessages.LanguageConfigurationInfoWidget_lineComments);
	blockCommentStartText = createText(parent,
			LanguageConfigurationMessages.LanguageConfigurationInfoWidget_blockCommentsStart);
	blockCommentEndText = createText(parent,
			LanguageConfigurationMessages.LanguageConfigurationInfoWidget_blockCommentsEnd);
}
 
源代码28 项目: tm4e   文件: LanguageConfigurationInfoWidget.java
protected void createFoldingTab(TabFolder folder) {
	foldingTab = createTab(folder, LanguageConfigurationMessages.LanguageConfigurationInfoWidget_folding_title);
	Composite parent = (Composite) foldingTab.getControl();

	offsideText = createText(parent, LanguageConfigurationMessages.LanguageConfigurationInfoWidget_offSide);
	offsideText.setToolTipText(LanguageConfigurationMessages.LanguageConfigurationInfoWidget_offSide_tooltip);
	new Label(parent, SWT.NONE).setText(LanguageConfigurationMessages.LanguageConfigurationInfoWidget_markers);
	markersStartText = createText(parent, LanguageConfigurationMessages.LanguageConfigurationInfoWidget_start);
	markersEndText = createText(parent, LanguageConfigurationMessages.LanguageConfigurationInfoWidget_end);
}
 
源代码29 项目: tm4e   文件: LanguageConfigurationInfoWidget.java
protected void createWordPatternTab(TabFolder folder) {
	wordPatternTab = createTab(folder,
			LanguageConfigurationMessages.LanguageConfigurationInfoWidget_wordPattern_title);
	Composite parent = (Composite) wordPatternTab.getControl();

	wordPatternText = createText(parent,
			LanguageConfigurationMessages.LanguageConfigurationInfoWidget_wordPattern_message);
}
 
源代码30 项目: tm4e   文件: LanguageConfigurationInfoWidget.java
private TabItem createTab(TabFolder folder, String title) {
	TabItem tab = new TabItem(folder, SWT.NONE);
	tab.setText(title);

	Composite parent = new Composite(folder, SWT.NONE);
	parent.setLayout(new GridLayout());
	parent.setLayoutData(new GridData(GridData.FILL_BOTH));
	tab.setControl(parent);

	return tab;
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法