本文整理汇总了Java中org.eclipse.swt.custom.CTabFolder.setSelection方法的典型用法代码示例。如果您正苦于以下问题:Java CTabFolder.setSelection方法的具体用法?Java CTabFolder.setSelection怎么用?Java CTabFolder.setSelection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.CTabFolder
的用法示例。
在下文中一共展示了CTabFolder.setSelection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: 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;
}