From 3aa8217f8920559df6a1d77814746ea501007442 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:06:06 +0000 Subject: Windows focus issues again git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@129 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../gui/composites/PositioningComposite.java | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'pdf-over-gui/src/main/java/at') 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 f841ae6f..33506f00 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 @@ -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