1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| CTabFolder tabFolder = new CTabFolder(parent, SWT.BORDER | SWT.BOTTOM);
tabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
/**
* Editor part
*/
CTabItem tbtmSource = new CTabItem(tabFolder, SWT.NONE);
tbtmSource.setText("Source");
// XMLEditor
/**
* Design part
*/
CTabItem tbtmDesign = new CTabItem(tabFolder, SWT.NONE);
tbtmDesign.setText("Design");
Composite composite = new Composite(tabFolder, SWT.EMBEDDED);
tbtmDesign.setControl(composite);
Frame frame = SWT_AWT.new_Frame(composite);
Panel panel = new Panel();
graph = new Graphic2dDesigner(this);
frame.add(panel);
frame.add(graph);
panel.setLayout(new BorderLayout(0, 0));
JRootPane rootPane = new JRootPane();
panel.add(rootPane);
tabFolder.setSelection(tbtmSource); |
Partager