summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:10:29 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:10:29 +0000
commitae1074cf21e3f5942e7e9ba1971cd2f68f99385d (patch)
treef670ab6a719cf07bd7e4e74a1c4f629917fbf462 /pdf-over-gui/src/main/java
parent917d9c771393cf5e146da8f0fd295fec50fd698a (diff)
downloadmocca-ae1074cf21e3f5942e7e9ba1971cd2f68f99385d.tar.gz
mocca-ae1074cf21e3f5942e7e9ba1971cd2f68f99385d.tar.bz2
mocca-ae1074cf21e3f5942e7e9ba1971cd2f68f99385d.zip
Add bottom bar to Positioning
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@173 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java37
1 files changed, 32 insertions, 5 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index d6efe5da..f4949c52 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -35,6 +35,10 @@ import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ScrollBar;
import org.slf4j.Logger;
@@ -77,11 +81,34 @@ public class PositioningComposite extends StateComposite {
* @param state
*/
public PositioningComposite(Composite parent, int style, State state) {
- super(parent, style | SWT.EMBEDDED | SWT.V_SCROLL, state);
- //this.setLayout(null);
- this.setBounds(0, 0, 10, 10);
- this.scrollbar = this.getVerticalBar();
- this.frame = SWT_AWT.new_Frame(this);
+ super(parent, style, state);
+ this.setLayout(new FormLayout());
+
+ Composite bottomBar = new Composite(this, SWT.NONE);
+ FormData fd_bottomBar = new FormData();
+ fd_bottomBar.left = new FormAttachment(0);
+ fd_bottomBar.right = new FormAttachment(100);
+ fd_bottomBar.bottom = new FormAttachment(100);
+ bottomBar.setLayoutData(fd_bottomBar);
+ bottomBar.setLayout(new FormLayout());
+
+ Button btnSign = new Button(bottomBar, SWT.NONE);
+ btnSign.setText("Sign");
+ FormData fd_btnSign = new FormData();
+ fd_btnSign.right = new FormAttachment(100);
+ fd_btnSign.bottom = new FormAttachment(100);
+ btnSign.setLayoutData(fd_btnSign);
+
+ Composite mainArea = new Composite(this, SWT.BORDER | SWT.EMBEDDED | SWT.V_SCROLL);
+ FormData fd_mainArea = new FormData();
+ fd_mainArea.left = new FormAttachment(0);
+ fd_mainArea.right = new FormAttachment(100);
+ fd_mainArea.top = new FormAttachment(0);
+ fd_mainArea.bottom = new FormAttachment(bottomBar, -5);
+ mainArea.setLayoutData(fd_mainArea);
+ this.scrollbar = mainArea.getVerticalBar();
+
+ this.frame = SWT_AWT.new_Frame(mainArea);
this.addKeyListener(this.keyListener);
this.frame.addMouseWheelListener(this.mouseListener);
this.scrollbar.addSelectionListener(this.selectionListener);