From 20db2e230e1247e2d9351442db3ff7e03fa669f0 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 31 Oct 2012 16:36:44 +0000 Subject: Windows focus issues again git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12715 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../gui/composites/PositioningComposite.java | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'trunk/pdf-over-gui/src/main') 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 @@ -69,6 +69,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 @@ -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) { -- cgit v1.2.3