From ec583b87cc79ec72b8e0f53d5f499cebde2f90bd Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:11:18 +0000 Subject: Use sign button git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@182 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../at/asit/pdfover/gui/composites/PositioningComposite.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pdf-over-gui') 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 988965b3..b7adaddd 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 @@ -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