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


Java CTabFolder.setLayoutData方法代碼示例

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


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

示例1: 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

示例2: createDialogArea

import org.eclipse.swt.custom.CTabFolder; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	composite.getShell().setMinimumSize(950, 500);
	folder = new CTabFolder(composite, SWT.NONE);
	configureFolder();
	createFolderItems(folder);

	GridData folderData = new GridData(SWT.FILL, SWT.FILL, true, true);
	folderData.widthHint = convertHorizontalDLUsToPixels(TAB_WIDTH_IN_DLUS);
	folderData.heightHint = convertVerticalDLUsToPixels(TAB_HEIGHT_IN_DLUS);
	folder.setLayoutData(folderData);
	folder.addSelectionListener(createFolderSelectionListener());
	folder.addDisposeListener(new DisposeListener() {
		@Override
		public void widgetDisposed(DisposeEvent e) {
			releaseContributions();
		}
	});
	return composite;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:22,代碼來源:HydrographInstallationDialog.java

示例3: createTabPart

import org.eclipse.swt.custom.CTabFolder; //導入方法依賴的package包/類
private static void createTabPart(Composite parent) {
	CTabFolder tabFolder = new CTabFolder(parent, BORDER);
	tabFolder.setLayoutData(new GridData(FILL, FILL, true, true));

	addTabPage("Simple", new SimpleViewer(tabFolder, NONE));
	// addTabPage("News", new NewsViewer(tabFolder, NONE));
}
 
開發者ID:sergueik,項目名稱:SWET,代碼行數:8,代碼來源:Demo.java

示例4: createContents

import org.eclipse.swt.custom.CTabFolder; //導入方法依賴的package包/類
/**
 * Create contents of the application window.
 * 
 * @param parent
 */
@Override
protected Control createContents(Composite parent) {
	setDataViewerWindowTitle();
	getShell().setMinimumSize(ControlConstants.DATA_VIEWER_MINIMUM_SIZE);
	Composite container = new Composite(parent, SWT.NONE);
	container.setLayout(new GridLayout(1, false));
	tabFolder = new CTabFolder(container, SWT.BORDER);
	tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	/*Below code is to color the tabs of data viewer window*/
	/*tabFolder.setSelectionBackground(new Color(null, 14, 76, 145));
	tabFolder.setBackground(SWTResourceManager.getColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND));
	tabFolder.setSelectionForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));*/

	createGridViewTabItem();
	
	dataViewerListeners = new DataViewerListeners();		
	dataViewerListeners.setWindowControls(windowControls);
	dataViewerListeners.addTabFolderSelectionChangeListener(tabFolder);
	dataViewerListeners.setStatusManager(statusManager);
	dataViewerListeners.setDebugDataViewer(this);
	
	statusManager.setWindowControls(windowControls);
	createPaginationPanel(container);
	
	tabFolder.setSelection(0);
	downloadDebugFiles(false,false);
	
	return container;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:35,代碼來源:DebugDataViewer.java

示例5: createDialogArea

import org.eclipse.swt.custom.CTabFolder; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(final Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	parent.getShell().setText(Messages.DATA_VIEWER + " " + Messages.FILTER);
	container.setLayout(new GridLayout(1, false));
	container.getShell().setMinimumSize(800,355);
	Composite mainComposite = new Composite(container, SWT.NONE);
	mainComposite.setLayout(new GridLayout(1, false));
	GridData gdMainComposite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
	gdMainComposite.heightHint = 355;
	gdMainComposite.widthHint = 832;
	mainComposite.setLayoutData(gdMainComposite);
	
	CTabFolder tabFolder = new CTabFolder(mainComposite, SWT.NONE);
	tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	createRemoteTabItem(tabFolder, remoteTableViewer);
	createLocalTabItem(tabFolder, localTableViewer);
	parent.getShell().setDefaultButton(remoteSaveButton);
	 tabFolder.addSelectionListener(new SelectionAdapter() {

           @Override
           public void widgetSelected(SelectionEvent e) {
                 CTabItem tabItem = (CTabItem) e.item;
                 if (StringUtils.equalsIgnoreCase(tabItem.getText(),Messages.ORIGINAL_DATASET)) {
                       parent.getShell().setDefaultButton(remoteSaveButton);
                 } else if(StringUtils.equalsIgnoreCase(tabItem.getText(),Messages.DOWNLOADED_DATASET)){
                       parent.getShell().setDefaultButton(localSaveButton);
                 }
           }
     });

	FilterHelper.INSTANCE.setDataViewerAdapter(dataViewerAdapter,this);
	FilterHelper.INSTANCE.setDebugDataViewer(debugDataViewer);
	return container;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:41,代碼來源:FilterConditionsDialog.java


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