summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:18:22 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:18:22 +0000
commit14ebaf2a3db09aa95029e985f0146b8db013764e (patch)
treec28abab411b9e7b9758c44144e65f50636c7470f
parent77531710fb5bd3d01e97f70da4158109a4de3f82 (diff)
downloadpdf-over-14ebaf2a3db09aa95029e985f0146b8db013764e.tar.gz
pdf-over-14ebaf2a3db09aa95029e985f0146b8db013764e.tar.bz2
pdf-over-14ebaf2a3db09aa95029e985f0146b8db013764e.zip
Display error if unable to load SWT lib
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@245 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java9
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java2
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties18
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties16
4 files changed, 27 insertions, 18 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 42a811be..c84f28cf 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
@@ -18,6 +18,8 @@ package at.asit.pdfover.gui;
//Imports
import java.io.File;
+import javax.swing.JOptionPane;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,8 +45,11 @@ public class Main {
try {
SWTLoader.loadSWT();
} catch (InitializationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ log.error("Could not load SWT libraries", e); //$NON-NLS-1$
+ JOptionPane.showMessageDialog(null,
+ Messages.getString("error.SWTLib"), //$NON-NLS-1$
+ Messages.getString("error.TitleFatal"), //$NON-NLS-1$
+ JOptionPane.ERROR_MESSAGE);
}
File configDir = new File(System.getProperty("user.home")+"/.pdfover"); //$NON-NLS-1$//$NON-NLS-2$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
index 7cefb857..7839ed16 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java
@@ -72,7 +72,7 @@ public class ErrorDialog {
this.box = new MessageBox(parent, boxstyle);
this.box.setMessage(message);
- this.box.setText(Messages.getString("error.title")); //$NON-NLS-1$
+ this.box.setText(Messages.getString("error.Title")); //$NON-NLS-1$
}
/**
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
index 740a09d1..f6bf904c 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties
@@ -20,8 +20,8 @@ advanced_config.Signature_Title=Si&gnature
advanced_config.SigPHTransparency=Signature placeholder transparency
advanced_config.SigPHTransparencyMax=Opaque
advanced_config.SigPHTransparencyMin=Invisible
-advanced_config.SigBlockLang=Signature block language
-advanced_config.SigBlockLang_ToolTip=Select the language used in the signature block
+advanced_config.SigBlockLang=Signature block language:
+advanced_config.SigBlockLang_ToolTip=Select the language to be used in the signature block
argument.error.output=is not a directory
argument.help.bku=Select the CCE to use. Values are: LOCAL, MOBILE. Example: -b <option>
argument.help.config=Defines which configuration file to use. Example: -c <config file>
@@ -69,21 +69,23 @@ error.FailedToSaveSettings=Failed to save configuration file!
error.FileNotExist=File %s does not exist!
error.Initialization=Initialization failed. Please check your configuration.
error.InvalidBKU=Invalid CCE selection. Please check.
+error.InvalidLocale=Locale not valid
error.InvalidPhoneNumber=Given phone number is invalid! Example: +43664123456789
error.InvalidSettings=Invalid settings are still present. Please check your input.
error.LocalBKU=Please check if a local CCE is running
+error.MayNotBeAPDF=This may not be a PDF File
+error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning.
error.PrepareDocument=Failed to prepare document for signature.
error.Retry=Retry
error.SaveOutputFolder=Failed to save signed document to configured output folder.
error.Signatur=Signature error
-error.SignaturePanel.NoPage="No page selected"
-error.SignaturePanel.NoRender="Could not render page"
+error.SignaturePanel.NoPage=No page selected
+error.SignaturePanel.NoRender=Could not render page
+error.SWTLib=Error loading SWT library
error.TanTooLong=Entered TAN too long
+error.Title=Error
+error.TitleFatal=Fatal Error
error.Unexpected=Unexpected Error
-error.title=Error
-error.MayNotBeAPDF=This may not be a PDF File
-error.InvalidLocale=Locale not valid
-error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning.
exception.InvalidEmblemFile=%s is an invalid signature logo file!
exception.InvalidPort=%s is invalid: has to be a number between %d and %d
exception.PasswordTooLong=Given password is too long!
diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
index 419496b2..ec557208 100644
--- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
+++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties
@@ -20,7 +20,7 @@ advanced_config.Signature_Title=Si&gnatur
advanced_config.SigPHTransparency=Signaturplatzhalter-Transparenz
advanced_config.SigPHTransparencyMax=Undurchsichtig
advanced_config.SigPHTransparencyMin=Unsichtbar
-advanced_config.SigBlockLang=Sprache für Signaturblock
+advanced_config.SigBlockLang=Sprache des Signaturblocks:
advanced_config.SigBlockLang_ToolTip=Wählen Sie eine Sprache für den Signaturblock
argument.error.output=ist kein Ordner
argument.help.bku=Wählen Sie die BKU. Gültige Werte: LOCAL, MOBILE. Bsp.: -b <bku>
@@ -69,21 +69,23 @@ error.FailedToSaveSettings=Konnte Konfigurationsdatei nicht speichern!
error.FileNotExist=Datei %s existiert nicht!
error.Initialization=Initialisierung fehlgeschlagen. Bitte überprüfen Sie Ihre Konfiguration.
error.InvalidBKU=Ungültige BKU-Auswahl. Bitte überprüfen.
+error.InvalidLocale=Ungültige Sprache
error.InvalidPhoneNumber=Telefonnummer ungültig! Beispiel: +43664123456789
error.InvalidSettings=Ungültige Einstellungen vorhanden. Bitte überprüfen.
error.LocalBKU=Bitte prüfen sie, ob Ihre lokale BKU läuft
+error.MayNotBeAPDF=Dies ist möglicherweise keine PDF Datei
+error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verfügbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten.
error.Retry=Wiederholen
error.SaveOutputFolder=Konnte Dokument nicht in den konfigurierten Ausgabeordner speichern.
error.Signatur=Signatur-Fehler
-error.SignaturePanel.NoPage="Keine Seite gewählt"
-error.SignaturePanel.NoRender="Konnte Seite nicht darstellen"
+error.SignaturePanel.NoPage=Keine Seite gewählt
+error.SignaturePanel.NoRender=Konnte Seite nicht darstellen
+error.SWTLib=Fehler beim Laden der SWT-Bibliothek
error.TanTooLong=Eingegebener TAN zu lange
+error.Title=Fehler
+error.TitleFatal=Fataler Fehler
error.Unexpected=Unerwarteter Fehler
-error.title=Fehler
-error.MayNotBeAPDF=Dies ist möglicherweise keine PDF Datei
-error.InvalidLocale=Ungültige Sprache
-error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verfügbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
exception.InvalidEmblemFile=%s ist eine ungültige Bildmarken-Datei!
exception.InvalidPort=%s ist ungültig: muss eine Nummer zwischen %d und %d sein.
exception.PasswordTooLong=Eingegebenes Passwort ist zu lange!