summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:10:00 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:10:00 +0000
commit782c82871bdea8d6091e9335823240af8e0f04d7 (patch)
tree03bdcb6ce04b7bd1022bfcbf2e091d95515e0ee9 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java
parent880f96c5fd18d760f85e6814cb77ca908c4d8dc4 (diff)
downloadpdf-over-782c82871bdea8d6091e9335823240af8e0f04d7.tar.gz
pdf-over-782c82871bdea8d6091e9335823240af8e0f04d7.tar.bz2
pdf-over-782c82871bdea8d6091e9335823240af8e0f04d7.zip
+ ignore option for error dialog
+ resumeable exception for settings validation git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@168 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java26
1 files changed, 18 insertions, 8 deletions
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 f5fc34ce..6e707156 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
@@ -60,6 +60,7 @@ import at.asit.pdfover.gui.Constants;
import at.asit.pdfover.gui.Messages;
import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.controls.ErrorMarker;
+import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS;
import at.asit.pdfover.gui.exceptions.InvalidNumberException;
import at.asit.pdfover.gui.exceptions.InvalidPortException;
import at.asit.pdfover.gui.utils.ImageConverter;
@@ -125,6 +126,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.fd_txtMobileNumber.bottom = new FormAttachment(100);
this.fd_txtMobileNumber.right = new FormAttachment(100, -42);
this.txtMobileNumber.setLayoutData(this.fd_txtMobileNumber);
+ this.txtMobileNumber.setToolTipText(Messages.getString("simple_config.ExampleNumber_ToolTip")); //$NON-NLS-1$
this.txtMobileNumberErrorMarker = new ErrorMarker(composite_2,
SWT.NATIVE, null, "", this.txtMobileNumber); //$NON-NLS-1$
@@ -407,7 +409,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.proxyHostErrorMarker.setLayoutData(fd_marker);
this.proxyHostErrorMarker.setVisible(false);
this.txtProxyHost.setLayoutData(fd_txtProxyHost);
-
+ this.txtProxyHost.setToolTipText(Messages.getString("simple_config.ProxyHost_ToolTip")); //$NON-NLS-1$
this.txtProxyHost.setMessage(Messages
.getString("simple_config.ProxyHostTemplate")); //$NON-NLS-1$
@@ -450,7 +452,8 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.fd_txtProxyPort.right = new FormAttachment(100, -42);
this.fd_txtProxyPort.bottom = new FormAttachment(100);
this.txtProxyPort.setLayoutData(this.fd_txtProxyPort);
-
+ this.txtProxyPort.setToolTipText(Messages.getString("simple_config.ProxyPort_ToolTip")); //$NON-NLS-1$
+
FontData[] fD_txtProxyPort = this.txtProxyPort.getFont().getFontData();
fD_txtProxyPort[0].setHeight(Constants.TEXT_SIZE_NORMAL);
this.txtProxyPort.setFont(new Font(Display.getCurrent(),
@@ -711,7 +714,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
} catch (Exception ex) {
log.error("processEmblemChanged: ", ex); //$NON-NLS-1$
ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.getString("error.FailedToLoadEmblem"), false); //$NON-NLS-1$
+ Messages.getString("error.FailedToLoadEmblem"), ERROR_BUTTONS.OK); //$NON-NLS-1$
dialog.open();
}
}
@@ -865,7 +868,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
log.error("Failed to load emblem: ", e1); //$NON-NLS-1$
ErrorDialog dialog = new ErrorDialog(
getShell(),
- Messages.getString("error.FailedToLoadEmblem"), false); //$NON-NLS-1$
+ Messages.getString("error.FailedToLoadEmblem"), ERROR_BUTTONS.OK); //$NON-NLS-1$
dialog.open();
}
}
@@ -892,10 +895,17 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
* ()
*/
@Override
- public void validateSettings() throws Exception {
- this.plainMobileNumberSetter();
+ public void validateSettings(int resumeFrom) throws Exception {
+ switch (resumeFrom) {
+ case 0:
+ this.plainMobileNumberSetter();
+ // Fall through
+ case 1:
+ this.plainProxyHostSetter();
+ // Fall through
+ case 2:
+ this.plainProxyPortSetter();
+ }
//this.plainEmblemSetter(this.emblemFile);
- this.plainProxyHostSetter();
- this.plainProxyPortSetter();
}
}