summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java50
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java32
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java31
3 files changed, 16 insertions, 97 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
index c8455d3f..d981189d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java
@@ -22,8 +22,8 @@ import java.util.Map;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.layout.FormAttachment;
@@ -212,7 +212,7 @@ public class MainWindow {
this.btn_config.setText(Messages.getString("main.configuration")); //$NON-NLS-1$
this.btn_config
.setToolTipText(Messages.getString("main.configuration")); //$NON-NLS-1$
- this.btn_config.addMouseListener(new MouseListener() {
+ this.btn_config.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
@@ -220,16 +220,6 @@ public class MainWindow {
.jumpToState(new ConfigurationUIState(
MainWindow.this.stateMachine));
}
-
- @Override
- public void mouseDown(MouseEvent e) {
- // NOTHING TO DO HERE
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- // NOTHING TO DO HERE
- }
});
this.buttonMap.put(Buttons.CONFIG, this.btn_config);
@@ -247,23 +237,13 @@ public class MainWindow {
this.btn_open.setLayoutData(fd_btn_open);
this.btn_open.setText(Messages.getString("common.open")); //$NON-NLS-1$
this.btn_open.setToolTipText(Messages.getString("common.open")); //$NON-NLS-1$
- this.btn_open.addMouseListener(new MouseListener() {
+ this.btn_open.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
MainWindow.this.stateMachine.jumpToState(new OpenState(
MainWindow.this.stateMachine));
}
-
- @Override
- public void mouseDown(MouseEvent e) {
- // NOTHING TO DO HERE
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- // NOTHING TO DO HERE
- }
});
this.buttonMap.put(Buttons.OPEN, this.btn_open);
@@ -276,23 +256,13 @@ public class MainWindow {
this.btn_position.setLayoutData(fd_btn_position);
this.btn_position.setText(Messages.getString("main.position")); //$NON-NLS-1$
this.btn_position.setToolTipText(Messages.getString("main.position")); //$NON-NLS-1$
- this.btn_position.addMouseListener(new MouseListener() {
+ this.btn_position.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
MainWindow.this.stateMachine.jumpToState(new PositioningState(
MainWindow.this.stateMachine));
}
-
- @Override
- public void mouseDown(MouseEvent e) {
- // NOTHING TO DO HERE
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- // NOTHING TO DO HERE
- }
});
this.buttonMap.put(Buttons.POSITION, this.btn_position);
@@ -305,23 +275,13 @@ public class MainWindow {
this.btn_sign.setLayoutData(fd_btn_sign);
this.btn_sign.setText(Messages.getString("main.signature")); //$NON-NLS-1$
this.btn_sign.setToolTipText(Messages.getString("main.signature")); //$NON-NLS-1$
- this.btn_sign.addMouseListener(new MouseListener() {
+ this.btn_sign.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
MainWindow.this.stateMachine.jumpToState(new BKUSelectionState(
MainWindow.this.stateMachine));
}
-
- @Override
- public void mouseDown(MouseEvent e) {
- // NOTHING TO DO HERE
- }
-
- @Override
- public void mouseDoubleClick(MouseEvent e) {
- // NOTHING TO DO HERE
- }
});
this.buttonMap.put(Buttons.SIGN, this.btn_sign);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
index 67cd7253..c3b7973f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java
@@ -30,10 +30,10 @@ import at.asit.pdfover.signator.BKUs;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.FormLayout;
@@ -117,18 +117,13 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fD_btnAutomatischePositionierung[0].setHeight(TEXT_SIZE_BUTTON);
this.btnAutomatischePositionierung.setFont(new Font(Display.getCurrent(), fD_btnAutomatischePositionierung[0]));
- this.btnAutomatischePositionierung.addSelectionListener(new SelectionListener() {
+ this.btnAutomatischePositionierung.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
AdvancedConfigurationComposite.this.performPositionSelection(
AdvancedConfigurationComposite.this.btnAutomatischePositionierung.getSelection());
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing to do
- }
});
Group grpBkuAuswahl = new Group(advancedComposite, SWT.NONE);
@@ -168,7 +163,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.cmbBKUAuswahl.setLayoutData(fd_cmbBKUAuswahl);
- this.cmbBKUAuswahl.addSelectionListener(new SelectionListener() {
+ this.cmbBKUAuswahl.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -178,11 +173,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
performBKUSelectionChanged(AdvancedConfigurationComposite.this.cmbBKUAuswahl.getItem(selectionIndex));
}
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing to do here
- }
});
Group grpSpeicherort = new Group(advancedComposite, SWT.NONE);
@@ -220,17 +210,12 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fD_txtOutputFolder[0].setHeight(TEXT_SIZE_NORMAL);
this.txtOutputFolder.setFont(new Font(Display.getCurrent(), fD_txtOutputFolder[0]));
- this.txtOutputFolder.addFocusListener(new FocusListener() {
+ this.txtOutputFolder.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder.getText());
}
-
- @Override
- public void focusGained(FocusEvent e) {
- // Nothing to do here!
- }
});
Button btnBrowse = new Button(grpSpeicherort, SWT.NONE);
@@ -246,7 +231,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
btnBrowse.setLayoutData(fd_btnBrowse);
btnBrowse.setText(Messages.getString("common.browse")); //$NON-NLS-1$
- btnBrowse.addSelectionListener(new SelectionListener() {
+ btnBrowse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -273,11 +258,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
performOutputFolderChanged(dir);
}
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing to do
- }
});
tabFolder.setSelection(advancedTabItem);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
index c8e7f84a..07a0da53 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
@@ -25,11 +25,10 @@ import org.eclipse.swt.dnd.DropTargetAdapter;
import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.TraverseEvent;
import org.eclipse.swt.events.TraverseListener;
import org.eclipse.swt.graphics.Font;
@@ -409,17 +408,12 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.txtMobileNumber.setMessage(Messages.getString("simple_config.ExampleNumber")); //$NON-NLS-1$
- this.txtMobileNumber.addFocusListener(new FocusListener() {
+ this.txtMobileNumber.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
processNumberChanged();
}
-
- @Override
- public void focusGained(FocusEvent e) {
- // Nothing to do here!
- }
});
Group grpBildmarke = new Group(this, SWT.NONE);
@@ -524,7 +518,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.btnUseImage = new Button(grpBildmarke, SWT.CHECK);
this.btnUseImage.setText(Messages.getString("simple_config.UseEmblem")); //$NON-NLS-1$
- this.btnUseImage.addSelectionListener(new SelectionListener() {
+ this.btnUseImage.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -541,11 +535,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
}
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- // Nothing to do
- }
});
new Label(grpBildmarke, SWT.NONE);
@@ -620,17 +609,12 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.txtProxyHost.setMessage(Messages.getString("simple_config.ProxyHostTemplate")); //$NON-NLS-1$
- this.txtProxyHost.addFocusListener(new FocusListener() {
+ this.txtProxyHost.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
processProxyHostChanged();
}
-
- @Override
- public void focusGained(FocusEvent e) {
- // Nothing to do here!
- }
});
this.txtProxyHost.addTraverseListener(new TraverseListener() {
@@ -690,17 +674,12 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.txtProxyPort.setMessage(Messages.getString("simple_config.ProxyPortTemplate")); //$NON-NLS-1$
- this.txtProxyPort.addFocusListener(new FocusListener() {
+ this.txtProxyPort.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
processProxyPortChanged();
}
-
- @Override
- public void focusGained(FocusEvent e) {
- // Nothing to do here!
- }
});
this.addListener(SWT.Resize, new Listener() {