Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void createPartControl(Composite parent) {
- // make a grid layout with two columns: one for a table, the other for a composite containing buttons
- GridLayout layout = new GridLayout(2, true);
- parent.setLayout(layout);
- // create the composite containing the table. we make a composite to use TableColumnLayout
- Composite comp = createHeaderTable(parent);
- comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
- // create a composite for rows of buttons
- comp = new Composite(parent, SWT.NONE);
- layout = new GridLayout(1, true);
- comp.setLayout(layout);
- Button b = new Button(comp, SWT.PUSH);
- b.setText("create");
- b.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- b = new Button(comp, SWT.PUSH);
- b.setText("remove");
- b.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- b = new Button(comp, SWT.PUSH);
- b.setText("move up");
- b.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- b = new Button(comp, SWT.PUSH);
- b.setText("move down");
- b.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
- comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
- comp.pack();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement