summaryrefslogtreecommitdiff
path: root/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-08-24 17:05:50 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-08-24 17:05:50 +0000
commit56f0f632e4c23e7678b70a7458499d118d5f2848 (patch)
treeb69e401097f6a1e73605a4ff8a91069560ab1bc1 /trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java
parentee39c68248d511cb63e9b30506201fd19a2e400a (diff)
downloadpdf-over-56f0f632e4c23e7678b70a7458499d118d5f2848.tar.gz
pdf-over-56f0f632e4c23e7678b70a7458499d118d5f2848.tar.bz2
pdf-over-56f0f632e4c23e7678b70a7458499d118d5f2848.zip
replace Listeners with the corresponding Adapters
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12401 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java')
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java28
1 files changed, 8 insertions, 20 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 18dcd9c2..91ac7d6d 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
@@ -21,8 +21,8 @@ import java.io.File;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTarget;
+import org.eclipse.swt.dnd.DropTargetAdapter;
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;
@@ -54,6 +54,12 @@ public class DataSourceSelectComposite extends StateComposite {
*
*/
private final class FileBrowseDialogListener extends SelectionAdapter {
+ /**
+ * Empty constructor
+ */
+ public FileBrowseDialogListener() {
+ }
+
@Override
public void widgetSelected(SelectionEvent e) {
FileDialog dialog = new FileDialog(DataSourceSelectComposite.this.getShell(), SWT.OPEN);
@@ -130,14 +136,7 @@ public class DataSourceSelectComposite extends StateComposite {
Transfer[] types = new Transfer[] { fileTransfer };
dnd_target.setTransfer(types);
- dnd_target.addDropListener(new DropTargetListener() {
-
- @Override
- public void dropAccept(DropTargetEvent event) {
- // TODO Auto-generated method stub
-
- }
-
+ dnd_target.addDropListener(new DropTargetAdapter() {
@Override
public void drop(DropTargetEvent event) {
if (fileTransfer.isSupportedType(event.currentDataType)){
@@ -156,12 +155,6 @@ public class DataSourceSelectComposite extends StateComposite {
}
@Override
- public void dragOver(DropTargetEvent event) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
public void dragOperationChanged(DropTargetEvent event) {
if (event.detail == DND.DROP_DEFAULT) {
if ((event.operations & DND.DROP_COPY) != 0) {
@@ -173,11 +166,6 @@ public class DataSourceSelectComposite extends StateComposite {
}
@Override
- public void dragLeave(DropTargetEvent event) {
- // No need to do anything here...
- }
-
- @Override
public void dragEnter(DropTargetEvent event) {
if (event.detail == DND.DROP_DEFAULT) {
if ((event.operations & DND.DROP_COPY) != 0) {