summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-08-24 17:05:49 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-08-24 17:05:49 +0000
commitee39c68248d511cb63e9b30506201fd19a2e400a (patch)
treef5304d2578750678e1647cbef84612e3dd65720d /trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui
parentfe0792b721755bee25c8cdd62c417f16f09fc1c1 (diff)
downloadpdf-over-ee39c68248d511cb63e9b30506201fd19a2e400a.tar.gz
pdf-over-ee39c68248d511cb63e9b30506201fd19a2e400a.tar.bz2
pdf-over-ee39c68248d511cb63e9b30506201fd19a2e400a.zip
Use SelectionAdapter to make code more concise
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12400 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java18
1 files changed, 3 insertions, 15 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
index 9b6539d2..18dcd9c2 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
+++ b/trunk/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();
/*