From fe4ba84c9bb717aba073aa5b74502d176e00b7ff Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:07:39 +0000 Subject: Move config dialog up git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@146 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../main/java/at/asit/pdfover/gui/MainWindow.java | 42 ++++++---------------- 1 file changed, 11 insertions(+), 31 deletions(-) (limited to 'pdf-over-gui') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index 57fe4902..7b57d46d 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java @@ -63,7 +63,10 @@ public class MainWindow { private Shell shell; + private Composite mainbar; + private FormData mainBarFormData; private Composite container; + private FormData containerFormData; private StackLayout stack; StateMachine stateMachine; private MainBarButton btn_sign; @@ -103,10 +106,6 @@ public class MainWindow { private Map buttonMap; - private FormData mainBarFormData; - - private Composite mainbar; - /** * Default constructor * @@ -157,27 +156,6 @@ public class MainWindow { return this.container; } - /** - * Entrance point for swt designer - * - * @param args - */ - public static void main(String[] args) { - Display display = Display.getDefault(); - - MainWindow window = new MainWindow(null); - - window.open(); - - window.getShell().open(); - window.getShell().layout(); - while (!window.getShell().isDisposed()) { - if (!display.readAndDispatch()) { - display.sleep(); - } - } - } - /** * Open the window. * @@ -307,12 +285,12 @@ public class MainWindow { this.buttonMap.put(Buttons.FINAL, end); this.container = new Composite(getShell(), SWT.RESIZE); - FormData fd_composite_1 = new FormData(); - fd_composite_1.bottom = new FormAttachment(100, -10); - fd_composite_1.right = new FormAttachment(100, -10); - fd_composite_1.top = new FormAttachment(0, 70); - fd_composite_1.left = new FormAttachment(0, 10); - this.container.setLayoutData(fd_composite_1); + this.containerFormData = new FormData(); + this.containerFormData.bottom = new FormAttachment(100, -10); + this.containerFormData.right = new FormAttachment(100, -10); + this.containerFormData.top = new FormAttachment(0, MAINBAR_HEIGHT + 10); + this.containerFormData.left = new FormAttachment(0, 10); + this.container.setLayoutData(this.containerFormData); this.stack = new StackLayout(); this.container.setLayout(this.stack); } @@ -340,8 +318,10 @@ public class MainWindow { if (behavior.getMainBarVisible()) { this.mainBarFormData.bottom = new FormAttachment(0, MAINBAR_HEIGHT); + this.containerFormData.top = new FormAttachment(0, MAINBAR_HEIGHT + 10); } else { this.mainBarFormData.bottom = new FormAttachment(0, 0); + this.containerFormData.top = new FormAttachment(0, 10); } this.getShell().getDisplay().update(); -- cgit v1.2.3