From 2e8a43112506bd73a31002a83454b50fb9472ba4 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 31 Oct 2012 16:37:03 +0000 Subject: Use sign button git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12768 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../at/asit/pdfover/gui/composites/PositioningComposite.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'trunk/pdf-over-gui/src/main/java') 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 988965b3..b7adaddd 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 @@ -99,12 +99,19 @@ public class PositioningComposite extends StateComposite { bottomBar.setLayoutData(fd_bottomBar); bottomBar.setLayout(new FormLayout()); - Button btnSign = new Button(bottomBar, SWT.NONE); + Button btnSign = new Button(bottomBar, SWT.PUSH); btnSign.setText(Messages.getString("positioning.sign")); //$NON-NLS-1$ FormData fd_btnSign = new FormData(); fd_btnSign.right = new FormAttachment(100); fd_btnSign.top = new FormAttachment(0); btnSign.setLayoutData(fd_btnSign); + this.getShell().setDefaultButton(btnSign); + btnSign.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + PositioningComposite.this.setFinalPosition(); + } + }); this.lblPage = new Label(bottomBar, SWT.CENTER); FormData fd_lblPage = new FormData(); -- cgit v1.2.3