summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:54:53 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 18:54:53 +0000
commit0e5916a51b082513dfb3be0ca486c046649a239d (patch)
tree65135c18ac42464de587e493b6fc8d2164b1758d
parentabd82d6cbfdf4f8977dde1f3d03d56be8665f882 (diff)
downloadpdf-over-0e5916a51b082513dfb3be0ca486c046649a239d.tar.gz
pdf-over-0e5916a51b082513dfb3be0ca486c046649a239d.tar.bz2
pdf-over-0e5916a51b082513dfb3be0ca486c046649a239d.zip
Use SelectionAdapter to make code more concise
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@35 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
index 9b6539d2..18dcd9c2 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
@@ -25,8 +25,8 @@ import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.DropTargetListener;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
@@ -53,14 +53,7 @@ public class DataSourceSelectComposite extends StateComposite {
/**
*
*/
- private final class FileBrowseDialog implements SelectionListener {
- /**
- *
- */
- public FileBrowseDialog() {
- // Nothing to do here
- }
-
+ private final class FileBrowseDialogListener extends SelectionAdapter {
@Override
public void widgetSelected(SelectionEvent e) {
FileDialog dialog = new FileDialog(DataSourceSelectComposite.this.getShell(), SWT.OPEN);
@@ -75,11 +68,6 @@ public class DataSourceSelectComposite extends StateComposite {
}
}
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing to do here
- }
}
/**
@@ -241,7 +229,7 @@ public class DataSourceSelectComposite extends StateComposite {
fd_btn_open.bottom = new FormAttachment(100, -5);
btn_open.setLayoutData(fd_btn_open);
btn_open.setBackground(back);
- btn_open.addSelectionListener(new FileBrowseDialog());
+ btn_open.addSelectionListener(new FileBrowseDialogListener());
this.drop_area.pack();
/*