import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
}
private void createRotationButton( Composite rotationComposite){
- Button rotation0 = formUtil.createButton(rotationComposite, "Portrait", SWT.PUSH);
- Button rotation90 = formUtil.createButton(rotationComposite, "Landscape", SWT.PUSH);
- Button rotation180 = formUtil.createButton(rotationComposite, "Reverse Portrait", SWT.PUSH);
- Button rotation270 = formUtil.createButton(rotationComposite, "Reverse Landscape", SWT.PUSH);
+ Composite buttonComposite = formUtil.createComposite(rotationComposite);
+ buttonComposite.setLayout(new GridLayout(4, true));
+ Button rotation0 = formUtil.createButton(buttonComposite, "Portrait", SWT.PUSH);
+ rotation0.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ Button rotation90 = formUtil.createButton(buttonComposite, "Landscape", SWT.PUSH);
+ rotation90.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ Button rotation180 = formUtil.createButton(buttonComposite, "Reverse Portrait", SWT.PUSH);
+ rotation180.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ Button rotation270 = formUtil.createButton(buttonComposite, "Reverse Landscape", SWT.PUSH);
+ rotation270.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
rotation0.addSelectionListener(new SelectionListener(){
@Override
public void widgetDefaultSelected(SelectionEvent e) {