From 31c595076c0574bd3f084c68fcd2f9a7ac163477 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:08:50 +0000 Subject: Move constants to separate class git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@157 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../src/main/java/at/asit/pdfover/gui/MainWindow.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java') 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 a69d7096..c3f9b529 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 @@ -61,10 +61,6 @@ public class MainWindow { **/ static final Logger log = LoggerFactory.getLogger(MainWindow.class); - /** Main bar height */ - private static final int MAINBAR_HEIGHT = 60; - - private Shell shell; private Composite mainbar; private FormData mainBarFormData; @@ -173,7 +169,7 @@ public class MainWindow { */ protected void createContents() { this.shell = new Shell(); - getShell().setSize(550, 768); + getShell().setSize(Constants.MAINWINDOW_WIDTH, Constants.MAINWINDOW_HEIGHT); try { Display display = Display.getCurrent(); Monitor primary = display.getPrimaryMonitor(); @@ -202,7 +198,7 @@ public class MainWindow { this.mainBarFormData.left = new FormAttachment(0, 10); this.mainBarFormData.right = new FormAttachment(100, -10); this.mainBarFormData.top = new FormAttachment(0, 10); - this.mainBarFormData.bottom = new FormAttachment(0, MAINBAR_HEIGHT); + this.mainBarFormData.bottom = new FormAttachment(0, Constants.MAINBAR_HEIGHT); this.mainbar.setLayoutData(this.mainBarFormData); this.btn_config = new MainBarRectangleButton(this.mainbar, SWT.NONE); @@ -303,7 +299,7 @@ public class MainWindow { 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.top = new FormAttachment(0, Constants.MAINBAR_HEIGHT + 10); this.containerFormData.left = new FormAttachment(0, 10); this.container.setLayoutData(this.containerFormData); this.stack = new StackLayout(); @@ -332,8 +328,8 @@ public class MainWindow { } if (behavior.getMainBarVisible()) { - this.mainBarFormData.bottom = new FormAttachment(0, MAINBAR_HEIGHT); - this.containerFormData.top = new FormAttachment(0, MAINBAR_HEIGHT + 10); + this.mainBarFormData.bottom = new FormAttachment(0, Constants.MAINBAR_HEIGHT); + this.containerFormData.top = new FormAttachment(0, Constants.MAINBAR_HEIGHT + 10); } else { this.mainBarFormData.bottom = new FormAttachment(0, 0); this.containerFormData.top = new FormAttachment(0, 10); -- cgit v1.2.3