summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/pdf-over-gui/src')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java35
1 files changed, 18 insertions, 17 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 f841ae6f..33506f00 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
@@ -70,6 +70,24 @@ public class PositioningComposite extends StateComposite {
ScrollBar scrollbar = null;
/**
+ * Create the composite.
+ * @param parent
+ * @param style
+ * @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);
+ this.addKeyListener(this.keyListener);
+ this.frame.addMouseWheelListener(this.mouseListener);
+ this.scrollbar.addSelectionListener(this.selectionListener);
+ requestFocus();
+ }
+
+ /**
* Set the PDF Document to display
* @param document document to display
* @throws IOException I/O Error
@@ -117,23 +135,6 @@ public class PositioningComposite extends StateComposite {
this.viewer.setSignaturePlaceholder(placeholder, width, height, transparency);
}
- /**
- * Create the composite.
- * @param parent
- * @param style
- * @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);
- this.addKeyListener(this.keyListener);
- this.frame.addMouseWheelListener(this.mouseListener);
- this.scrollbar.addSelectionListener(this.selectionListener);
- }
-
private KeyListener keyListener = new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {