SWT 中CTabFolder选项卡设置右上角的控件
CTabFolder tabFolder = new CTabFolder(parent, SWT.BORDER);
tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE);
tabItem.setText("New Item");
ToolBar toolBar = new ToolBar(tabFolder, SWT.RIGHT);
ToolItem toolItem = new ToolItem(toolBar, SWT.NONE);
toolItem.setToolTipText("工具栏");
toolItem.setImage(ResourceManager.getPluginImage("com.ge.test.plugin", "icons/eclipse16.png"));
tabFolder.setTopRight(toolBar);//默认右对齐
// tabFolder.setTopRight(toolBar, SWT.FILL);//设置填充样式
结果: