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


Java CTabFolder類代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.CTabFolder的典型用法代碼示例。如果您正苦於以下問題:Java CTabFolder類的具體用法?Java CTabFolder怎麽用?Java CTabFolder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CTabFolder類屬於org.eclipse.swt.custom包,在下文中一共展示了CTabFolder類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createPartControl

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * Create contents of the editor part.
 * @param parent
 */
@Override
@PostConstruct
public void createPartControl(Composite parent) {
	
	this.sashForm = new SashForm(parent, SWT.NONE);
	
	this.treeViewer = new TreeViewer(this.sashForm, SWT.BORDER);
	this.tree = this.treeViewer.getTree();
	
	this.tabFolder = new CTabFolder(this.sashForm, SWT.BORDER);
	this.tabFolder.setTabPosition(SWT.BOTTOM);
	this.tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
	
	this.tabItem = new CTabItem(this.tabFolder, SWT.NONE);
	this.tabItem.setText("New Item");
	
	this.tabItem_1 = new CTabItem(this.tabFolder, SWT.NONE);
	this.tabItem_1.setText("New Item");
													
	this.sashForm.setWeights(new int[] { 3, 10 });
	
}
 
開發者ID:EnFlexIT,項目名稱:AgentWorkbench,代碼行數:27,代碼來源:ProjectEditor.java

示例2: createTabFolder

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
private void createTabFolder ( final Composite parent )
{
    this.tabFolder = new CTabFolder ( parent, SWT.TOP );
    this.tabFolder.setLayoutData ( new GridData ( GridData.FILL, GridData.FILL, true, true ) );

    for ( final GeneratorPageInformation page : this.pages )
    {
        final CTabItem tabItem = new CTabItem ( this.tabFolder, SWT.NONE );
        final Composite tabComposite = new Composite ( this.tabFolder, SWT.NONE );
        tabComposite.setLayout ( new FillLayout () );
        page.getGeneratorPage ().createPage ( tabComposite );
        tabItem.setText ( page.getLabel () );
        tabItem.setControl ( tabComposite );
        page.getGeneratorPage ().setTarget ( this );
    }

    this.tabFolder.setSelection ( 0 );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:19,代碼來源:GeneratorView.java

示例3: open

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * Setup the Disk window and display (open) it.
 */
public void open() {
	shell = new Shell(parentShell, SWT.SHELL_TRIM);
	shell.setLayout(new FillLayout());
	shell.setImage(imageManager.get(ImageManager.ICON_DISK));
	setStandardWindowTitle();
	shell.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent event) {
				dispose(event);
			}
		});
		
	CTabFolder tabFolder = new CTabFolder(shell, SWT.BOTTOM);
	new DiskExplorerTab(tabFolder, disks, imageManager, this);
	diskMapTabs = new DiskMapTab[disks.length];
	for (int i=0; i<disks.length; i++) {
		if (disks[i].supportsDiskMap()) {
			diskMapTabs[i] = new DiskMapTab(tabFolder, disks[i]);
		}
	}
	diskInfoTab = new DiskInfoTab(tabFolder, disks);
	tabFolder.setSelection(tabFolder.getItems()[0]);
	
	
	shell.open();
}
 
開發者ID:AppleCommander,項目名稱:AppleCommander,代碼行數:29,代碼來源:DiskWindow.java

示例4: addTabFolderToPropertyWindow

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * Adds the tab folder to property window.
 * 
 * @return the tab folder
 */
public CTabFolder addTabFolderToPropertyWindow(){
	CTabFolder tabFolder = new CTabFolder(container, SWT.NONE);
	
	GridData tabFolderGridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
	
	tabFolder.setLayoutData(tabFolderGridData);
	tabFolder.addListener(SWT.FOCUSED,getMouseClickListener() );
      
	container.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			tabFolderGridData.heightHint = container.getBounds().height - 500;
		}
	});
	
	tabFolder.addListener(SWT.FOCUSED,getMouseClickListener() );
	
	return tabFolder;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:25,代碼來源:PropertyDialogBuilder.java

示例5: hideTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   protected void hideTabs() {
	if (getPageCount() <= 1) {
		setPageText(0, "");
		if (getContainer() instanceof CTabFolder) {
			((CTabFolder)getContainer()).setTabHeight(1);
			Point point = getContainer().getSize();
			getContainer().setSize(point.x, point.y + 6);
		}
	}
}
 
開發者ID:IncQueryLabs,項目名稱:smarthome-cep-demonstrator,代碼行數:18,代碼來源:SmarthomeEditor.java

示例6: showTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is more than one page in the multi-page editor part,
 * this shows the tabs at the bottom.
 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
 * @generated
 */
   protected void showTabs() {
	if (getPageCount() > 1) {
		setPageText(0, getString("_UI_SelectionPage_label"));
		if (getContainer() instanceof CTabFolder) {
			((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
			Point point = getContainer().getSize();
			getContainer().setSize(point.x, point.y - 6);
		}
	}
}
 
開發者ID:IncQueryLabs,項目名稱:smarthome-cep-demonstrator,代碼行數:18,代碼來源:SmarthomeEditor.java

示例7: hideTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void hideTabs() {
	if (getPageCount() <= 1) {
		setPageText(0, "");
		if (getContainer() instanceof CTabFolder) {
			((CTabFolder)getContainer()).setTabHeight(1);
			Point point = getContainer().getSize();
			getContainer().setSize(point.x, point.y + 6);
		}
	}
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:18,代碼來源:MetamodelEditor.java

示例8: showTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is more than one page in the multi-page editor part,
 * this shows the tabs at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void showTabs() {
	if (getPageCount() > 1) {
		setPageText(0, getString("_UI_SelectionPage_label"));
		if (getContainer() instanceof CTabFolder) {
			((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
			Point point = getContainer().getSize();
			getContainer().setSize(point.x, point.y - 6);
		}
	}
}
 
開發者ID:cetic,項目名稱:SimQRI,代碼行數:18,代碼來源:MetamodelEditor.java

示例9: hideTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void hideTabs ()
{
    if ( getPageCount () <= 1 )
    {
        setPageText ( 0, "" ); //$NON-NLS-1$
        if ( getContainer () instanceof CTabFolder )
        {
            ( (CTabFolder)getContainer () ).setTabHeight ( 1 );
            Point point = getContainer ().getSize ();
            getContainer ().setSize ( point.x, point.y + 6 );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:ProtocolEditor.java

示例10: hideTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
protected void hideTabs ()
{
    if ( getPageCount () <= 1 )
    {
        setPageText ( 0, "" ); //$NON-NLS-1$
        if ( getContainer () instanceof CTabFolder )
        {
            ( (CTabFolder)getContainer () ).setTabHeight ( 1 );
            final Point point = getContainer ().getSize ();
            getContainer ().setSize ( point.x, point.y + 6 );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:ChartEditor.java

示例11: showTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is more than one page in the multi-page editor part,
 * this shows the tabs at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
protected void showTabs ()
{
    if ( getPageCount () > 1 )
    {
        setPageText ( 0, getString ( "_UI_SelectionPage_label" ) ); //$NON-NLS-1$
        if ( getContainer () instanceof CTabFolder )
        {
            ( (CTabFolder)getContainer () ).setTabHeight ( SWT.DEFAULT );
            final Point point = getContainer ().getSize ();
            getContainer ().setSize ( point.x, point.y - 6 );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:22,代碼來源:ChartEditor.java

示例12: FilterAdvancedComposite

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
public FilterAdvancedComposite ( final FilterChangedListener filterChangedListener, final Composite parent, final int style )
{
    // fields
    super ( parent, style );

    // widgets
    this.tabFolder = new CTabFolder ( this, SWT.TOP | SWT.BORDER | SWT.CLOSE );
    this.addOrConditionButton = creteAddOrConditionButton ();
    addOrCondition ();

    // layout
    final GridLayout layout = new GridLayout ( 1, true );
    layout.marginLeft = 6;
    layout.marginRight = 6;
    layout.marginTop = 6;
    layout.marginBottom = 6;
    layout.verticalSpacing = 12;
    this.setLayout ( layout );

    final GridData tabFolderLayoutData = new GridData ();
    tabFolderLayoutData.horizontalAlignment = GridData.FILL;
    tabFolderLayoutData.grabExcessHorizontalSpace = true;
    tabFolderLayoutData.verticalAlignment = GridData.FILL;
    tabFolderLayoutData.grabExcessVerticalSpace = true;
    this.tabFolder.setLayoutData ( tabFolderLayoutData );
    this.tabFolder.setBackgroundMode ( SWT.INHERIT_FORCE );

    final GridData addOrConditionButtonLayoutdata = new GridData ();
    addOrConditionButtonLayoutdata.horizontalAlignment = GridData.END;
    this.addOrConditionButton.setLayoutData ( addOrConditionButtonLayoutdata );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:32,代碼來源:FilterAdvancedComposite.java

示例13: showTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is more than one page in the multi-page editor part,
 * this shows the tabs at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void showTabs ()
{
    if ( getPageCount () > 1 )
    {
        setPageText ( 0, getString ( "_UI_SelectionPage_label" ) ); //$NON-NLS-1$
        if ( getContainer () instanceof CTabFolder )
        {
            ( (CTabFolder)getContainer () ).setTabHeight ( SWT.DEFAULT );
            Point point = getContainer ().getSize ();
            getContainer ().setSize ( point.x, point.y - 6 );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:DetailViewEditor.java

示例14: EclipseTabProvider

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
public EclipseTabProvider ( final Composite parent )
{
    this.folder = new CTabFolder ( parent, SWT.TOP | SWT.FLAT | SWT.BORDER );
    this.folder.setTabHeight ( 24 );
    this.folder.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.mgr = new MenuManager ();
    final Menu menu = this.mgr.createContextMenu ( this.folder );
    this.folder.setMenu ( menu );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:11,代碼來源:EclipseTabProvider.java

示例15: hideTabs

import org.eclipse.swt.custom.CTabFolder; //導入依賴的package包/類
/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void hideTabs ()
{
    if ( getPageCount () <= 1 )
    {
        setPageText ( 0, "" );
        if ( getContainer () instanceof CTabFolder )
        {
            ( (CTabFolder)getContainer () ).setTabHeight ( 1 );
            Point point = getContainer ().getSize ();
            getContainer ().setSize ( point.x, point.y + 6 );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:MemoryEditor.java


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