summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:37:01 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:37:01 +0000
commite1eee5730e290a7a2dd23438ff219e867b3fe4e3 (patch)
treee6e45264febc5ace3ca45d575b9a736d613ccdc9 /trunk/pdf-over-gui/src
parentc7b4c76d239be49680b1d69657fb45990cc3a4a5 (diff)
downloadpdf-over-e1eee5730e290a7a2dd23438ff219e867b3fe4e3.tar.gz
pdf-over-e1eee5730e290a7a2dd23438ff219e867b3fe4e3.tar.bz2
pdf-over-e1eee5730e290a7a2dd23438ff219e867b3fe4e3.zip
Add bottom bar to Positioning
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12759 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java37
1 files changed, 32 insertions, 5 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index d6efe5da..f4949c52 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/trunk/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);