summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
authorAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-20 07:48:18 +0100
committerAndreas Abraham <andreas.abraham@egiz.gv.at>2020-11-20 07:48:18 +0100
commit0923276e0184164ce6ace56383dde59b984d8acf (patch)
tree1dc54ac709580dbf5af0c594864ca67c8dda7286 /pdf-over-gui
parent5e6d94b46394a3e0a66abe05d490d20131ae6f4a (diff)
parent86d77f8df8e831a2794be6a96c005f5eaf5b3016 (diff)
downloadpdf-over-0923276e0184164ce6ace56383dde59b984d8acf.tar.gz
pdf-over-0923276e0184164ce6ace56383dde59b984d8acf.tar.bz2
pdf-over-0923276e0184164ce6ace56383dde59b984d8acf.zip
merge
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/.classpath33
-rw-r--r--pdf-over-gui/.gitignore29
-rw-r--r--pdf-over-gui/.project24
-rw-r--r--pdf-over-gui/.settings/org.eclipse.core.resources.prefs7
-rw-r--r--pdf-over-gui/.settings/org.eclipse.jdt.core.prefs105
-rw-r--r--pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--pdf-over-gui/.settings/org.eclipse.m2e.core.prefs5
-rw-r--r--pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--pdf-over-gui/pom.xml6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java19
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java838
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java1200
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java985
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java1
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java198
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java10
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java15
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java15
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java59
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java22
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java31
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java1
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java4
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties484
-rw-r--r--pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties468
-rw-r--r--pdf-over-gui/src/main/resources/cfg/PDFASConfig.zipbin971868 -> 1269817 bytes
32 files changed, 2187 insertions, 2406 deletions
diff --git a/pdf-over-gui/.classpath b/pdf-over-gui/.classpath
deleted file mode 100644
index a6e09d11..00000000
--- a/pdf-over-gui/.classpath
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry exported="true" kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry kind="lib" path="swing2swt.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/pdf-over-gui/.gitignore b/pdf-over-gui/.gitignore
index cc8bf14e..d344eef6 100644
--- a/pdf-over-gui/.gitignore
+++ b/pdf-over-gui/.gitignore
@@ -1,14 +1,15 @@
-# SVN repo files
-.svn/
-
-# Eclipse project files
-.project
-.classpath
-.settings/
-.euml2
-.umlproject
-
-# Other
-target/
-log/
-*~
+# SVN repo files
+.svn/
+
+# Eclipse project files
+.project
+.classpath
+.settings/
+.euml2
+.umlproject
+
+# Other
+target/
+log/
+*~
+/bin/
diff --git a/pdf-over-gui/.project b/pdf-over-gui/.project
deleted file mode 100644
index c7fd44f6..00000000
--- a/pdf-over-gui/.project
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>pdf-over-gui</name>
- <comment></comment>
- <projects>
- <project>pdf-as-lib</project>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- </natures>
-</projectDescription>
diff --git a/pdf-over-gui/.settings/org.eclipse.core.resources.prefs b/pdf-over-gui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 3ce90f38..00000000
--- a/pdf-over-gui/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Fri Aug 03 17:20:36 CEST 2012
-eclipse.preferences.version=1
-encoding//src/main/java=UTF-8
-encoding//src/main/resources=UTF-8
-encoding//src/test/java=UTF-8
-encoding//src/test/resources=UTF-8
-encoding/<project>=UTF-8
diff --git a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs b/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 0e650d49..00000000
--- a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,105 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
-org.eclipse.jdt.core.compiler.compliance=1.8
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.8
-org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
-org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW
-org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE
diff --git a/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs b/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 05288cb4..00000000
--- a/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.ui.javadoc=true
-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*\n * Copyright 2012 by A-SIT, Secure Information Technology Center Austria\n *\n * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by\n * the European Commission - subsequent versions of the EUPL (the "Licence");\n * You may not use this work except in compliance with the Licence.\n * You may obtain a copy of the Licence at\:\n * http\://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the Licence for the specific language governing permissions and\n * limitations under the Licence.\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * \n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n// Imports\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">/**\n * SLF4J Logger instance\n **/\nprivate static final Logger log \= LoggerFactory.getLogger(${type_name}.class);\n\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/pdf-over-gui/.settings/org.eclipse.m2e.core.prefs b/pdf-over-gui/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index 22a219d4..00000000
--- a/pdf-over-gui/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-#Thu Aug 02 12:06:01 CEST 2012
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs b/pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index 9d4b915d..00000000
--- a/pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Fri Aug 03 18:56:11 CEST 2012
-eclipse.preferences.version=1
-project.repository.kind=jira
-project.repository.url=http\://jira.egovlabs.gv.at
diff --git a/pdf-over-gui/pom.xml b/pdf-over-gui/pom.xml
index 3c108817..37d35469 100644
--- a/pdf-over-gui/pom.xml
+++ b/pdf-over-gui/pom.xml
@@ -66,6 +66,12 @@
<artifactId>commons-configuration</artifactId>
<version>1.10</version>
</dependency>
+ <dependency>
+ <groupId>at.a-sit</groupId>
+ <artifactId>pdf-over-commons</artifactId>
+ <version>4.2.4-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
<dependencyManagement>
<dependencies>
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
index a1ebfc44..105eedd5 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java
@@ -23,7 +23,7 @@ import java.util.Properties;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
-import at.asit.pdfover.gui.bku.mobile.MobileBKUHelper;
+
import at.asit.pdfover.gui.bku.mobile.MobileBKUs;
/**
@@ -39,8 +39,11 @@ public class Constants {
/** Application name + version */
public static final String APP_NAME_VERSION = (APP_VERSION == null ? APP_NAME : APP_NAME + " v" + APP_VERSION); //$NON-NLS-1$
+
+ public static final String SIGNATURE_PROFILE = "SIGNATURE_PROFILE"; //$NON-NLS-1$
+ public static final String DEFAULT_POSTFIX = "_signed";
- static {
+ static {
// Has to be set before (implicitly) initializing Display
Display.setAppName(APP_NAME);
}
@@ -55,7 +58,7 @@ public class Constants {
/** Supported locales */
public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH };
-
+
/** Configuration directory */
public static final String CONFIG_DIRECTORY = System.getProperty("user.home") + File.separator + ".pdf-over"; //$NON-NLS-1$ //$NON-NLS-2$
@@ -78,7 +81,7 @@ public class Constants {
* The minimum PDF-AS configuration version (older ones will be backed up
* and updated
*/
- public static final String MIN_PDF_AS_CONFIG_VERSION = "4.1.0"; //$NON-NLS-1$
+ public static final String MIN_PDF_AS_CONFIG_VERSION = "4.1.6"; //$NON-NLS-1$
/** The configuration backup filename */
public static final String PDF_AS_CONFIG_BACKUP_FILENAME = "cfg_backup"; //$NON-NLS-1$
@@ -103,13 +106,13 @@ public class Constants {
public static final int SIGNATURE_KEYBOARD_POSITIONING_OFFSET = 15;
/** PDF-Over User Agent string */
- public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.1" : APP_VERSION); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.3" : APP_VERSION); //$NON-NLS-1$ //$NON-NLS-2$
/** Current release file */
- public static final String CURRENT_RELEASE_URL = "http://webstart.buergerkarte.at/PDF-Over/Release.txt"; //$NON-NLS-1$
+ public static final String CURRENT_RELEASE_URL = "https://updates.a-sit.at/pdf-over/Release.txt"; //$NON-NLS-1$
/** Update URL */
- public static final String UPDATE_URL = "http://webstart.buergerkarte.at/PDF-Over/"; //$NON-NLS-1$
+ public static final String UPDATE_URL = "https://technology.a-sit.at/en/pdf-over/"; //$NON-NLS-1$
/** True */
public static final String TRUE = "true"; //$NON-NLS-1$
@@ -207,6 +210,8 @@ public class Constants {
/** The output folder config parameter */
public static final String CFG_OUTPUT_FOLDER = "OUTPUT_FOLDER"; //$NON-NLS-1$
+ public static final String CFG_POSTFIX = "SAVE_FILE_POSTFIX";
+
/** The main window size (Format: width,height) */
public static final String CFG_MAINWINDOW_SIZE = "MAINWINDOW_SIZE"; //$NON-NLS-1$
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java
index 4c8b42e8..fe91dfa9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java
@@ -245,7 +245,7 @@ public class ATrustStatus extends AbstractMobileBKUStatusImpl {
* @return the smsTan
*/
public boolean isSmsTan() {
- return smsTan;
+ return this.smsTan;
}
/**
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
index b833ce9d..4bb3890f 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java
@@ -54,8 +54,8 @@ public class InvisibleProfile extends Argument {
log.info("Set Profile Invisible");
if (args.length > argOffset + 1) {
-
PdfAs4SignatureParameter.PROFILE_VISIBILITY=false;
+ log.debug("We are setting the profile visibility to false");
return argOffset + 1;
}
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 bbcf6b9c..d2dabc5f 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
@@ -26,8 +26,6 @@ import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.layout.FormAttachment;
@@ -48,6 +46,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.Constants;
+import at.asit.pdfover.commons.Profile;
import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.controls.ErrorMarker;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
@@ -72,19 +71,17 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
/**
* SLF4J Logger instance
**/
- private static final Logger log = LoggerFactory
- .getLogger(AdvancedConfigurationComposite.class);
-
+ private static final Logger log = LoggerFactory.getLogger(AdvancedConfigurationComposite.class);
private ConfigurationComposite configurationComposite;
private Group grpSignatur;
- private Group grpPlaceholder;
+ private Group grpPlaceholder;
Button btnAutomatischePositionierung;
Button btnPdfACompat;
Button btnPlatzhalterVerwenden;
- Button btnSignatureFieldsUsage;
- Button btnEnablePlaceholderUsage;
+ Button btnSignatureFieldsUsage;
+ Button btnEnablePlaceholderUsage;
private Label lblTransparenz;
private Label lblTransparenzLinks;
private Label lblTransparenzRechts;
@@ -95,12 +92,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
List<String> bkuStrings;
Button btnKeystoreEnabled;
- private Group grpSpeicherort;
- private Label lblDefaultOutputFolder;
+ private final Group grpSpeicherort;
+ private final Label lblDefaultOutputFolder;
Text txtOutputFolder;
- private Button btnBrowse;
+ private final Button btnBrowse;
+ private final Label lblSaveFilePostFix;
+ private final Text txtSaveFilePostFix;
- private Group grpLocaleAuswahl;
+ private final Group grpLocaleAuswahl;
Combo cmbLocaleAuswahl;
private Group grpUpdateCheck;
@@ -113,16 +112,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
private Label lblProxyPort;
private Text txtProxyPort;
private ErrorMarker txtProxyPortErrorMarker;
-// private Label lblProxyUser;
-// private Text txtProxyUser;
-// private ErrorMarker proxyUserErrorMarker;
-// private Label lblProxyPass;
-// private Text txtProxyPass;
-// private ErrorMarker proxyPassErrorMarker;
FormData fd_txtProxyPort;
FormData fd_txtProxyPortErrorMarker;
-
/**
* @param parent
* @param style
@@ -130,8 +122,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
* @param container
* @param config
*/
- public AdvancedConfigurationComposite(Composite parent, int style,
- State state, ConfigurationContainer container,
+ public AdvancedConfigurationComposite(Composite parent, int style, State state, ConfigurationContainer container,
ConfigurationComposite config) {
super(parent, style, state, container);
this.configurationComposite = config;
@@ -150,73 +141,55 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
FontData[] fD_grpSignaturPosition = this.grpSignatur.getFont().getFontData();
fD_grpSignaturPosition[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.grpSignatur.setFont(new Font(Display.getCurrent(),
- fD_grpSignaturPosition[0]));
+ this.grpSignatur.setFont(new Font(Display.getCurrent(), fD_grpSignaturPosition[0]));
this.btnAutomatischePositionierung = new Button(this.grpSignatur, SWT.CHECK);
FormData fd_btnAutomatischePositionierung = new FormData();
fd_btnAutomatischePositionierung.right = new FormAttachment(100, -5);
fd_btnAutomatischePositionierung.top = new FormAttachment(0);
fd_btnAutomatischePositionierung.left = new FormAttachment(0, 5);
- this.btnAutomatischePositionierung
- .setLayoutData(fd_btnAutomatischePositionierung);
-
- FontData[] fD_btnAutomatischePositionierung = this.btnAutomatischePositionierung
- .getFont().getFontData();
- fD_btnAutomatischePositionierung[0]
- .setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btnAutomatischePositionierung.setFont(new Font(Display
- .getCurrent(), fD_btnAutomatischePositionierung[0]));
-
- this.btnAutomatischePositionierung
- .addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- AdvancedConfigurationComposite.this
- .performPositionSelection(AdvancedConfigurationComposite.this.btnAutomatischePositionierung
- .getSelection());
- }
- });
-
-
+ this.btnAutomatischePositionierung.setLayoutData(fd_btnAutomatischePositionierung);
+
+ FontData[] fD_btnAutomatischePositionierung = this.btnAutomatischePositionierung.getFont().getFontData();
+ fD_btnAutomatischePositionierung[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btnAutomatischePositionierung.setFont(new Font(Display.getCurrent(), fD_btnAutomatischePositionierung[0]));
+
+ this.btnAutomatischePositionierung.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ AdvancedConfigurationComposite.this.performPositionSelection(
+ AdvancedConfigurationComposite.this.btnAutomatischePositionierung.getSelection());
+ }
+ });
this.btnPdfACompat = new Button(this.grpSignatur, SWT.CHECK);
FormData fd_btnPdfACompat = new FormData();
fd_btnPdfACompat.right = new FormAttachment(100, -5);
- fd_btnPdfACompat.top = new FormAttachment(
- this.btnAutomatischePositionierung, 5);
+ fd_btnPdfACompat.top = new FormAttachment(this.btnAutomatischePositionierung, 5);
fd_btnPdfACompat.left = new FormAttachment(0, 5);
- this.btnPdfACompat
- .setLayoutData(fd_btnPdfACompat);
-
- FontData[] fD_btnPdfACompat = this.btnPdfACompat
- .getFont().getFontData();
- fD_btnPdfACompat[0]
- .setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btnPdfACompat.setFont(new Font(Display
- .getCurrent(), fD_btnPdfACompat[0]));
-
- this.btnPdfACompat
- .addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- AdvancedConfigurationComposite.this
- .performPdfACompatSelection(AdvancedConfigurationComposite.this.btnPdfACompat
- .getSelection());
- }
- });
+ this.btnPdfACompat.setLayoutData(fd_btnPdfACompat);
+
+ FontData[] fD_btnPdfACompat = this.btnPdfACompat.getFont().getFontData();
+ fD_btnPdfACompat[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btnPdfACompat.setFont(new Font(Display.getCurrent(), fD_btnPdfACompat[0]));
+
+ this.btnPdfACompat.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ AdvancedConfigurationComposite.this
+ .performPdfACompatSelection(AdvancedConfigurationComposite.this.btnPdfACompat.getSelection());
+ }
+ });
this.lblTransparenz = new Label(this.grpSignatur, SWT.HORIZONTAL);
FormData fd_lblTransparenz = new FormData();
- fd_lblTransparenz.top = new FormAttachment(
- this.btnPdfACompat, 5);
+ fd_lblTransparenz.top = new FormAttachment(this.btnPdfACompat, 5);
fd_lblTransparenz.left = new FormAttachment(0, 5);
this.lblTransparenz.setLayoutData(fd_lblTransparenz);
FontData[] fD_lblTransparenz = this.lblTransparenz.getFont().getFontData();
fD_lblTransparenz[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lblTransparenz.setFont(new Font(Display.getCurrent(),
- fD_lblTransparenz[0]));
+ this.lblTransparenz.setFont(new Font(Display.getCurrent(), fD_lblTransparenz[0]));
this.lblTransparenzLinks = new Label(this.grpSignatur, SWT.HORIZONTAL);
FormData fd_lblTransparenzLinks = new FormData();
@@ -224,11 +197,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_lblTransparenzLinks.left = new FormAttachment(0, 15);
this.lblTransparenzLinks.setLayoutData(fd_lblTransparenzLinks);
- FontData[] fD_lblTransparenzLinks = this.lblTransparenzLinks.getFont()
- .getFontData();
+ FontData[] fD_lblTransparenzLinks = this.lblTransparenzLinks.getFont().getFontData();
fD_lblTransparenzLinks[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lblTransparenzLinks.setFont(new Font(Display.getCurrent(),
- fD_lblTransparenzLinks[0]));
+ this.lblTransparenzLinks.setFont(new Font(Display.getCurrent(), fD_lblTransparenzLinks[0]));
this.lblTransparenzRechts = new Label(this.grpSignatur, SWT.HORIZONTAL);
FormData fd_lblTransparenzRechts = new FormData();
@@ -236,11 +207,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_lblTransparenzRechts.right = new FormAttachment(100, -5);
this.lblTransparenzRechts.setLayoutData(fd_lblTransparenzRechts);
- FontData[] fD_lblTransparenzRechts = this.lblTransparenzRechts.getFont()
- .getFontData();
+ FontData[] fD_lblTransparenzRechts = this.lblTransparenzRechts.getFont().getFontData();
fD_lblTransparenzRechts[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lblTransparenzRechts.setFont(new Font(Display.getCurrent(),
- fD_lblTransparenzRechts[0]));
+ this.lblTransparenzRechts.setFont(new Font(Display.getCurrent(), fD_lblTransparenzRechts[0]));
this.sclTransparenz = new Scale(this.grpSignatur, SWT.HORIZONTAL);
FormData fd_sldTransparenz = new FormData();
@@ -255,30 +224,26 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.sclTransparenz.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- performPlaceholderTransparency(AdvancedConfigurationComposite.this.sclTransparenz
- .getSelection());
+ performPlaceholderTransparency(AdvancedConfigurationComposite.this.sclTransparenz.getSelection());
}
});
-
-
+
this.grpPlaceholder = new Group(this, SWT.NONE);
FormLayout layout_grpPlaceholder = new FormLayout();
layout_grpPlaceholder.marginHeight = 10;
layout_grpPlaceholder.marginWidth = 5;
this.grpPlaceholder.setLayout(layout_grpPlaceholder);
-
+
FormData fd_grpPlaceholder = new FormData();
fd_grpPlaceholder.top = new FormAttachment(this.grpSignatur, 5);
fd_grpPlaceholder.right = new FormAttachment(100, -5);
fd_grpPlaceholder.left = new FormAttachment(0, 5);
this.grpPlaceholder.setLayoutData(fd_grpPlaceholder);
-
+
FontData[] fD_grpPlaceholder = this.grpPlaceholder.getFont().getFontData();
fD_grpPlaceholder[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.grpPlaceholder.setFont(new Font(Display.getCurrent(),
- fD_grpPlaceholder[0]));
-
-
+ this.grpPlaceholder.setFont(new Font(Display.getCurrent(), fD_grpPlaceholder[0]));
+
this.btnEnablePlaceholderUsage = new Button(this.grpPlaceholder, SWT.CHECK);
FormData fd_btnEnablePlaceholderUsage = new FormData();
fd_btnEnablePlaceholderUsage.right = new FormAttachment(100, -5);
@@ -316,19 +281,18 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
AdvancedConfigurationComposite.this.btnPlatzhalterVerwenden.getSelection());
}
});
-
+
this.btnSignatureFieldsUsage = new Button(this.grpPlaceholder, SWT.RADIO);
FormData fd_btnSignatureFieldsUsage = new FormData();
fd_btnSignatureFieldsUsage.right = new FormAttachment(100, -5);
fd_btnSignatureFieldsUsage.top = new FormAttachment(this.btnPlatzhalterVerwenden, 5);
fd_btnSignatureFieldsUsage.left = new FormAttachment(0, 5);
this.btnSignatureFieldsUsage.setLayoutData(fd_btnSignatureFieldsUsage);
-
-
+
FontData[] fD_btnSignatureFieldsUsage = this.btnSignatureFieldsUsage.getFont().getFontData();
fD_btnSignatureFieldsUsage[0].setHeight(Constants.TEXT_SIZE_BUTTON);
this.btnSignatureFieldsUsage.setFont(new Font(Display.getCurrent(), fD_btnSignatureFieldsUsage[0]));
-
+
this.btnSignatureFieldsUsage.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -336,7 +300,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
AdvancedConfigurationComposite.this.btnSignatureFieldsUsage.getSelection());
}
});
-
this.grpBkuAuswahl = new Group(this, SWT.NONE);
layout = new FormLayout();
@@ -351,8 +314,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
FontData[] fD_grpBkuAuswahl = this.grpBkuAuswahl.getFont().getFontData();
fD_grpBkuAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.grpBkuAuswahl.setFont(new Font(Display.getCurrent(),
- fD_grpBkuAuswahl[0]));
+ this.grpBkuAuswahl.setFont(new Font(Display.getCurrent(), fD_grpBkuAuswahl[0]));
this.cmbBKUAuswahl = new Combo(this.grpBkuAuswahl, SWT.READ_ONLY);
FormData fd_cmbBKUAuswahl = new FormData();
@@ -361,14 +323,12 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_cmbBKUAuswahl.left = new FormAttachment(0, 5);
this.cmbBKUAuswahl.setLayoutData(fd_cmbBKUAuswahl);
- FontData[] fD_cmbBKUAuswahl = this.cmbBKUAuswahl.getFont()
- .getFontData();
+ FontData[] fD_cmbBKUAuswahl = this.cmbBKUAuswahl.getFont().getFontData();
fD_cmbBKUAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.cmbBKUAuswahl.setFont(new Font(Display.getCurrent(),
- fD_cmbBKUAuswahl[0]));
+ this.cmbBKUAuswahl.setFont(new Font(Display.getCurrent(), fD_cmbBKUAuswahl[0]));
int blen = BKUs.values().length;
- this.bkuStrings = new ArrayList<String>(blen);
+ this.bkuStrings = new ArrayList<>(blen);
for (int i = 0; i < blen; i++) {
String lookup = "BKU." + BKUs.values()[i].toString(); //$NON-NLS-1$
String text = Messages.getString(lookup);
@@ -379,15 +339,11 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
@Override
public void widgetSelected(SelectionEvent e) {
int selectionIndex = getBKUElementIndex(
- AdvancedConfigurationComposite.this.configurationContainer
- .getDefaultBKU());
- if (AdvancedConfigurationComposite.this.cmbBKUAuswahl
- .getSelectionIndex() != selectionIndex) {
- selectionIndex = AdvancedConfigurationComposite.this.cmbBKUAuswahl
- .getSelectionIndex();
+ AdvancedConfigurationComposite.this.configurationContainer.getDefaultBKU());
+ if (AdvancedConfigurationComposite.this.cmbBKUAuswahl.getSelectionIndex() != selectionIndex) {
+ selectionIndex = AdvancedConfigurationComposite.this.cmbBKUAuswahl.getSelectionIndex();
performBKUSelectionChanged(
- AdvancedConfigurationComposite.this.cmbBKUAuswahl
- .getItem(selectionIndex));
+ AdvancedConfigurationComposite.this.cmbBKUAuswahl.getItem(selectionIndex));
}
}
});
@@ -395,18 +351,13 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.btnKeystoreEnabled = new Button(this.grpBkuAuswahl, SWT.CHECK);
FormData fd_btnKeystoreEnabled = new FormData();
fd_btnKeystoreEnabled.right = new FormAttachment(100, -5);
- fd_btnKeystoreEnabled.top = new FormAttachment(
- this.cmbBKUAuswahl, 5);
+ fd_btnKeystoreEnabled.top = new FormAttachment(this.cmbBKUAuswahl, 5);
fd_btnKeystoreEnabled.left = new FormAttachment(0, 5);
- this.btnKeystoreEnabled
- .setLayoutData(fd_btnKeystoreEnabled);
+ this.btnKeystoreEnabled.setLayoutData(fd_btnKeystoreEnabled);
- FontData[] fD_btnKeystoreEnabled = this.btnKeystoreEnabled
- .getFont().getFontData();
- fD_btnKeystoreEnabled[0]
- .setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btnKeystoreEnabled.setFont(new Font(Display
- .getCurrent(), fD_btnKeystoreEnabled[0]));
+ FontData[] fD_btnKeystoreEnabled = this.btnKeystoreEnabled.getFont().getFontData();
+ fD_btnKeystoreEnabled[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btnKeystoreEnabled.setFont(new Font(Display.getCurrent(), fD_btnKeystoreEnabled[0]));
this.btnKeystoreEnabled.addSelectionListener(new SelectionAdapter() {
@Override
@@ -417,85 +368,63 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
});
this.grpSpeicherort = new Group(this, SWT.NONE);
- layout = new FormLayout();
- layout.marginHeight = 10;
- layout.marginWidth = 5;
- this.grpSpeicherort.setLayout(layout);
+ GridLayout gl_grpSpeicherort = new GridLayout(3, false);
+ grpSpeicherort.setLayout(gl_grpSpeicherort);
FormData fd_grpSpeicherort = new FormData();
+ fd_grpSpeicherort.left = new FormAttachment(0,5);
fd_grpSpeicherort.top = new FormAttachment(this.grpBkuAuswahl, 5);
- fd_grpSpeicherort.left = new FormAttachment(0, 5);
fd_grpSpeicherort.right = new FormAttachment(100, -5);
this.grpSpeicherort.setLayoutData(fd_grpSpeicherort);
+
FontData[] fD_grpSpeicherort = this.grpSpeicherort.getFont().getFontData();
fD_grpSpeicherort[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.grpSpeicherort.setFont(new Font(Display.getCurrent(),
- fD_grpSpeicherort[0]));
+ this.grpSpeicherort.setFont(new Font(Display.getCurrent(), fD_grpSpeicherort[0]));
this.lblDefaultOutputFolder = new Label(this.grpSpeicherort, SWT.NONE);
- FormData fd_lblDefaultOutputFolder = new FormData();
- fd_lblDefaultOutputFolder.top = new FormAttachment(0);
- fd_lblDefaultOutputFolder.left = new FormAttachment(0, 5);
- this.lblDefaultOutputFolder.setLayoutData(fd_lblDefaultOutputFolder);
- FontData[] fD_lblDefaultOutputFolder = this.lblDefaultOutputFolder.getFont()
- .getFontData();
+ FontData[] fD_lblDefaultOutputFolder = this.lblDefaultOutputFolder.getFont().getFontData();
fD_lblDefaultOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(),
- fD_lblDefaultOutputFolder[0]));
+ this.lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(), fD_lblDefaultOutputFolder[0]));
this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER);
- FormData fd_text = new FormData();
- fd_text.top = new FormAttachment(this.lblDefaultOutputFolder, 5);
- fd_text.left = new FormAttachment(0, 15);
- this.txtOutputFolder.setLayoutData(fd_text);
+ GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
+ txtOutputFolder.setLayoutData(gd_txtOutputFolder);
- FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont()
- .getFontData();
+ FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont().getFontData();
fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.txtOutputFolder.setFont(new Font(Display.getCurrent(),
- fD_txtOutputFolder[0]));
+ this.txtOutputFolder.setFont(new Font(Display.getCurrent(), fD_txtOutputFolder[0]));
this.txtOutputFolder.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
- performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder
- .getText());
+ performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder.getText());
}
});
+ fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL);
this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE);
- fd_text.right = new FormAttachment(this.btnBrowse, -5);
+ btnBrowse.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
FontData[] fD_btnBrowse = this.btnBrowse.getFont().getFontData();
fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON);
this.btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0]));
-
- FormData fd_btnBrowse = new FormData();
- fd_btnBrowse.top = new FormAttachment(this.lblDefaultOutputFolder, 5);
- fd_btnBrowse.right = new FormAttachment(100, -5);
- this.btnBrowse.setLayoutData(fd_btnBrowse);
-
this.btnBrowse.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- DirectoryDialog dlg = new DirectoryDialog(
- AdvancedConfigurationComposite.this.getShell());
+ DirectoryDialog dlg = new DirectoryDialog(AdvancedConfigurationComposite.this.getShell());
// Set the initial filter path according
// to anything they've selected or typed in
- dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder
- .getText());
+ dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder.getText());
// Change the title bar text
- dlg.setText(Messages
- .getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$
+ dlg.setText(Messages.getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$
// Customizable message displayed in the dialog
- dlg.setMessage(Messages
- .getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$
+ dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$
// Calling open() will open and run the dialog.
// It will return the selected directory, or
@@ -507,22 +436,48 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
}
}
});
-
+
+ this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE);
+ lblSaveFilePostFix.setText(Messages.getString("AdvancedConfigurationComposite.lblSaveFilePostFix.text"));
+
+ FontData[] fD_lblSaveFilePostFix = this.lblSaveFilePostFix.getFont().getFontData();
+ fD_lblSaveFilePostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), fD_lblSaveFilePostFix[0]));
+
+ this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER);
+ GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
+
+ txtSaveFilePostFix.setLayoutData(gd_txtSaveFilePostFix);
+
+ FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont().getFontData();
+ fD_txtPostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), fD_txtPostFix[0]));
+
+ this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() {
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ performPostFixChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix.getText());
+ }
+ });
+ new Label(grpSpeicherort, SWT.NONE);
+ fD_lblSaveFilePostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ fD_txtPostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+
this.grpLocaleAuswahl = new Group(this, SWT.NONE);
FormLayout layout_grpLocaleAuswahl = new FormLayout();
layout_grpLocaleAuswahl.marginHeight = 10;
layout_grpLocaleAuswahl.marginWidth = 5;
this.grpLocaleAuswahl.setLayout(layout_grpLocaleAuswahl);
FormData fd_grpLocaleAuswahl = new FormData();
- fd_grpLocaleAuswahl.top = new FormAttachment(this.grpSpeicherort, 5);
+ fd_grpLocaleAuswahl.top = new FormAttachment(grpSpeicherort, 5);
fd_grpLocaleAuswahl.left = new FormAttachment(0, 5);
fd_grpLocaleAuswahl.right = new FormAttachment(100, -5);
this.grpLocaleAuswahl.setLayoutData(fd_grpLocaleAuswahl);
FontData[] fD_grpLocaleAuswahl = this.grpLocaleAuswahl.getFont().getFontData();
fD_grpLocaleAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.grpLocaleAuswahl.setFont(new Font(Display.getCurrent(),
- fD_grpLocaleAuswahl[0]));
+ this.grpLocaleAuswahl.setFont(new Font(Display.getCurrent(), fD_grpLocaleAuswahl[0]));
this.cmbLocaleAuswahl = new Combo(this.grpLocaleAuswahl, SWT.READ_ONLY);
FormData fd_cmbLocaleAuswahl = new FormData();
@@ -531,11 +486,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
fd_cmbLocaleAuswahl.left = new FormAttachment(0, 5);
this.cmbLocaleAuswahl.setLayoutData(fd_cmbLocaleAuswahl);
- FontData[] fD_cmbLocaleAuswahl = this.cmbLocaleAuswahl.getFont()
- .getFontData();
+ FontData[] fD_cmbLocaleAuswahl = this.cmbLocaleAuswahl.getFont().getFontData();
fD_cmbLocaleAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.cmbLocaleAuswahl.setFont(new Font(Display.getCurrent(),
- fD_cmbLocaleAuswahl[0]));
+ this.cmbLocaleAuswahl.setFont(new Font(Display.getCurrent(), fD_cmbLocaleAuswahl[0]));
String[] localeStrings = new String[Constants.SUPPORTED_LOCALES.length];
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) {
@@ -545,11 +498,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.cmbLocaleAuswahl.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- Locale currentLocale = AdvancedConfigurationComposite.this.configurationContainer
- .getLocale();
- Locale selectedLocale = Constants.
- SUPPORTED_LOCALES[AdvancedConfigurationComposite.this.cmbLocaleAuswahl
- .getSelectionIndex()];
+ Locale currentLocale = AdvancedConfigurationComposite.this.configurationContainer.getLocale();
+ Locale selectedLocale = Constants.SUPPORTED_LOCALES[AdvancedConfigurationComposite.this.cmbLocaleAuswahl
+ .getSelectionIndex()];
if (!currentLocale.equals(selectedLocale)) {
performLocaleSelectionChanged(selectedLocale);
}
@@ -569,33 +520,26 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
FontData[] fD_grpUpdateCheck = this.grpUpdateCheck.getFont().getFontData();
fD_grpUpdateCheck[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.grpUpdateCheck.setFont(new Font(Display.getCurrent(),
- fD_grpUpdateCheck[0]));
+ this.grpUpdateCheck.setFont(new Font(Display.getCurrent(), fD_grpUpdateCheck[0]));
this.btnUpdateCheck = new Button(this.grpUpdateCheck, SWT.CHECK);
FormData fd_btnUpdateCheck = new FormData();
fd_btnUpdateCheck.right = new FormAttachment(100, -5);
fd_btnUpdateCheck.top = new FormAttachment(0);
fd_btnUpdateCheck.left = new FormAttachment(0, 5);
- this.btnUpdateCheck
- .setLayoutData(fd_btnUpdateCheck);
-
- FontData[] fD_btnUpdateCheck = this.btnUpdateCheck
- .getFont().getFontData();
- fD_btnUpdateCheck[0]
- .setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btnUpdateCheck.setFont(new Font(Display
- .getCurrent(), fD_btnUpdateCheck[0]));
-
- this.btnUpdateCheck
- .addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- AdvancedConfigurationComposite.this
- .performUpdateCheckSelection(AdvancedConfigurationComposite.this.btnUpdateCheck
- .getSelection());
- }
- });
+ this.btnUpdateCheck.setLayoutData(fd_btnUpdateCheck);
+
+ FontData[] fD_btnUpdateCheck = this.btnUpdateCheck.getFont().getFontData();
+ fD_btnUpdateCheck[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btnUpdateCheck.setFont(new Font(Display.getCurrent(), fD_btnUpdateCheck[0]));
+
+ this.btnUpdateCheck.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ AdvancedConfigurationComposite.this
+ .performUpdateCheckSelection(AdvancedConfigurationComposite.this.btnUpdateCheck.getSelection());
+ }
+ });
this.grpProxy = new Group(this, SWT.NONE);
FormData fd_grpProxy = new FormData();
@@ -610,21 +554,18 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.grpProxy.setFont(new Font(Display.getCurrent(), fD_grpProxy[0]));
this.lblProxyHost = new Label(this.grpProxy, SWT.NONE);
- GridData gd_lblProxyHost = new GridData(SWT.LEFT, SWT.CENTER, false,
- false, 1, 1);
+ GridData gd_lblProxyHost = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
gd_lblProxyHost.widthHint = 66;
this.lblProxyHost.setLayoutData(gd_lblProxyHost);
this.lblProxyHost.setBounds(0, 0, 57, 15);
FontData[] fD_lblProxyHost = this.lblProxyHost.getFont().getFontData();
fD_lblProxyHost[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lblProxyHost.setFont(new Font(Display.getCurrent(),
- fD_lblProxyHost[0]));
+ this.lblProxyHost.setFont(new Font(Display.getCurrent(), fD_lblProxyHost[0]));
Composite compProxyHostContainer = new Composite(this.grpProxy, SWT.NONE);
compProxyHostContainer.setLayout(new FormLayout());
- compProxyHostContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
- 1, 1));
+ compProxyHostContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
this.txtProxyHost = new Text(compProxyHostContainer, SWT.BORDER);
FormData fd_txtProxyHost = new FormData();
fd_txtProxyHost.right = new FormAttachment(100, -42);
@@ -633,8 +574,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
FontData[] fD_txtProxyHost = this.txtProxyHost.getFont().getFontData();
fD_txtProxyHost[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.txtProxyHost.setFont(new Font(Display.getCurrent(),
- fD_txtProxyHost[0]));
+ this.txtProxyHost.setFont(new Font(Display.getCurrent(), fD_txtProxyHost[0]));
this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, ""); //$NON-NLS-1$
@@ -656,29 +596,22 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
}
});
- this.txtProxyHost.addTraverseListener(new TraverseListener() {
-
- @Override
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processProxyHostChanged();
- }
+ this.txtProxyHost.addTraverseListener(e -> {
+ if (e.detail == SWT.TRAVERSE_RETURN) {
+ processProxyHostChanged();
}
});
this.lblProxyPort = new Label(this.grpProxy, SWT.NONE);
this.lblProxyPort.setBounds(0, 0, 57, 15);
- FontData[] fD_lblProxyPort = this.lblProxyPort.getFont()
- .getFontData();
+ FontData[] fD_lblProxyPort = this.lblProxyPort.getFont().getFontData();
fD_lblProxyPort[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lblProxyPort.setFont(new Font(Display.getCurrent(),
- fD_lblProxyPort[0]));
+ this.lblProxyPort.setFont(new Font(Display.getCurrent(), fD_lblProxyPort[0]));
Composite compProxyPortContainer = new Composite(this.grpProxy, SWT.NONE);
compProxyPortContainer.setLayout(new FormLayout());
- compProxyPortContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
- 1, 1));
+ compProxyPortContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
this.txtProxyPort = new Text(compProxyPortContainer, SWT.BORDER);
this.fd_txtProxyPort = new FormData();
@@ -689,16 +622,11 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
FontData[] fD_txtProxyPort = this.txtProxyPort.getFont().getFontData();
fD_txtProxyPort[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.txtProxyPort.setFont(new Font(Display.getCurrent(),
- fD_txtProxyPort[0]));
+ this.txtProxyPort.setFont(new Font(Display.getCurrent(), fD_txtProxyPort[0]));
- this.txtProxyPort.addTraverseListener(new TraverseListener() {
-
- @Override
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processProxyPortChanged();
- }
+ this.txtProxyPort.addTraverseListener(e -> {
+ if (e.detail == SWT.TRAVERSE_RETURN) {
+ processProxyPortChanged();
}
});
@@ -708,8 +636,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.fd_txtProxyPortErrorMarker.right = new FormAttachment(100);
this.fd_txtProxyPortErrorMarker.top = new FormAttachment(0);
this.fd_txtProxyPortErrorMarker.bottom = new FormAttachment(0, 32);
- this.txtProxyPortErrorMarker
- .setLayoutData(this.fd_txtProxyPortErrorMarker);
+ this.txtProxyPortErrorMarker.setLayoutData(this.fd_txtProxyPortErrorMarker);
this.txtProxyPortErrorMarker.setVisible(false);
this.txtProxyPort.addFocusListener(new FocusAdapter() {
@@ -719,120 +646,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
processProxyPortChanged();
}
});
+ reloadResources();
+ }
-// this.lblProxyUser = new Label(this.grpProxy, SWT.NONE);
-// GridData gd_lblProxyUser = new GridData(SWT.LEFT, SWT.CENTER, false,
-// false, 1, 1);
-// gd_lblProxyUser.widthHint = 80;
-// this.lblProxyUser.setLayoutData(gd_lblProxyUser);
-// this.lblProxyUser.setBounds(0, 0, 57, 15);
-//
-// FontData[] fD_lblProxyUser = this.lblProxyUser.getFont().getFontData();
-// fD_lblProxyUser[0].setHeight(Constants.TEXT_SIZE_NORMAL);
-// this.lblProxyUser.setFont(new Font(Display.getCurrent(),
-// fD_lblProxyUser[0]));
-//
-// Composite compProxyUserContainer = new Composite(this.grpProxy, SWT.NONE);
-// compProxyUserContainer.setLayout(new FormLayout());
-// compProxyUserContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
-// 1, 1));
-// this.txtProxyUser = new Text(compProxyUserContainer, SWT.BORDER);
-// FormData fd_txtProxyUser = new FormData();
-// fd_txtProxyUser.right = new FormAttachment(100, -42);
-// fd_txtProxyUser.top = new FormAttachment(0);
-// fd_txtProxyUser.left = new FormAttachment(0, 5);
-//
-// FontData[] fD_txtProxyUser = this.txtProxyUser.getFont().getFontData();
-// fD_txtProxyUser[0].setHeight(Constants.TEXT_SIZE_NORMAL);
-// this.txtProxyUser.setFont(new Font(Display.getCurrent(),
-// fD_txtProxyUser[0]));
-//
-// this.proxyUserErrorMarker = new ErrorMarker(compProxyUserContainer, SWT.NONE, ""); //$NON-NLS-1$
-//
-// FormData fd_proxyUserErrorMarker = new FormData();
-// fd_proxyUserErrorMarker.left = new FormAttachment(100, -32);
-// fd_proxyUserErrorMarker.right = new FormAttachment(100);
-// fd_proxyUserErrorMarker.top = new FormAttachment(0);
-// fd_proxyUserErrorMarker.bottom = new FormAttachment(0, 32);
-//
-// this.proxyUserErrorMarker.setLayoutData(fd_proxyUserErrorMarker);
-// this.proxyUserErrorMarker.setVisible(false);
-// this.txtProxyUser.setLayoutData(fd_txtProxyUser);
-//
-// this.txtProxyUser.addFocusListener(new FocusAdapter() {
-//
-// @Override
-// public void focusLost(FocusEvent e) {
-// processProxyUserChanged();
-// }
-// });
-//
-// this.txtProxyUser.addTraverseListener(new TraverseListener() {
-//
-// @Override
-// public void keyTraversed(TraverseEvent e) {
-// if (e.detail == SWT.TRAVERSE_RETURN) {
-// processProxyUserChanged();
-// }
-// }
-// });
-//
-// this.lblProxyPass = new Label(this.grpProxy, SWT.NONE);
-// this.lblProxyPass.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER,
-// false, false, 1, 1));
-// this.lblProxyPass.setBounds(0, 0, 57, 15);
-//
-// FontData[] fD_lblProxyPass = this.lblProxyPass.getFont().getFontData();
-// fD_lblProxyPass[0].setHeight(Constants.TEXT_SIZE_NORMAL);
-// this.lblProxyPass.setFont(new Font(Display.getCurrent(),
-// fD_lblProxyPass[0]));
-//
-// Composite compProxyPassContainer = new Composite(this.grpProxy, SWT.NONE);
-// compProxyPassContainer.setLayout(new FormLayout());
-// compProxyPassContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false,
-// 1, 1));
-// this.txtProxyPass = new Text(compProxyPassContainer, SWT.PASSWORD | SWT.BORDER);
-// FormData fd_txtProxyPass = new FormData();
-// fd_txtProxyPass.right = new FormAttachment(100, -42);
-// fd_txtProxyPass.top = new FormAttachment(0);
-// fd_txtProxyPass.left = new FormAttachment(0, 5);
-//
-// FontData[] fD_txtProxyPass = this.txtProxyPass.getFont().getFontData();
-// fD_txtProxyPass[0].setHeight(Constants.TEXT_SIZE_NORMAL);
-// this.txtProxyPass.setFont(new Font(Display.getCurrent(),
-// fD_txtProxyPass[0]));
-//
-// this.proxyPassErrorMarker = new ErrorMarker(compProxyPassContainer, SWT.NONE, ""); //$NON-NLS-1$
-//
-// FormData fd_proxyPassErrorMarker = new FormData();
-// fd_proxyPassErrorMarker.left = new FormAttachment(100, -32);
-// fd_proxyPassErrorMarker.right = new FormAttachment(100);
-// fd_proxyPassErrorMarker.top = new FormAttachment(0);
-// fd_proxyPassErrorMarker.bottom = new FormAttachment(0, 32);
-//
-// this.proxyPassErrorMarker.setLayoutData(fd_proxyPassErrorMarker);
-// this.proxyPassErrorMarker.setVisible(false);
-// this.txtProxyPass.setLayoutData(fd_txtProxyPass);
-//
-// this.txtProxyPass.addFocusListener(new FocusAdapter() {
-//
-// @Override
-// public void focusLost(FocusEvent e) {
-// processProxyPassChanged();
-// }
-// });
-//
-// this.txtProxyPass.addTraverseListener(new TraverseListener() {
-//
-// @Override
-// public void keyTraversed(TraverseEvent e) {
-// if (e.detail == SWT.TRAVERSE_RETURN) {
-// processProxyPassChanged();
-// }
-// }
-// });
+ private void performPostFixChanged(String postfix) {
- reloadResources();
+ log.debug("Save file postfix changed to : {}", postfix); //$NON-NLS-1$
+ this.configurationContainer.setSaveFilePostFix(postfix);
+ AdvancedConfigurationComposite.this.txtSaveFilePostFix.setText(postfix);
}
/*
@@ -847,7 +668,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
}
void performOutputFolderChanged(String foldername) {
- log.debug("Selected Output folder: " + foldername); //$NON-NLS-1$
+ log.debug("Selected Output folder: {}", foldername); //$NON-NLS-1$
this.configurationContainer.setOutputFolder(foldername);
AdvancedConfigurationComposite.this.txtOutputFolder.setText(foldername);
}
@@ -858,14 +679,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
int i = this.bkuStrings.indexOf(bkuName);
if (i == -1) {
- log.warn("NO BKU match for " + bkuName); //$NON-NLS-1$
+ log.warn("NO BKU match for {}", bkuName); //$NON-NLS-1$
return 0;
}
return i;
}
void performBKUSelectionChanged(BKUs selected) {
- log.debug("Selected BKU: " + selected.toString()); //$NON-NLS-1$
+ log.debug("Selected BKU: {}", selected); //$NON-NLS-1$
this.configurationContainer.setDefaultBKU(selected);
this.cmbBKUAuswahl.select(this.getBKUElementIndex(selected));
}
@@ -875,9 +696,8 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
BKUs bkuvalue = resolveBKU(selected);
this.performBKUSelectionChanged(bkuvalue);
} catch (Exception ex) {
- log.error("Failed to parse BKU value: " + selected, ex); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.getString("error.InvalidBKU"), BUTTONS.OK); //$NON-NLS-1$
+ log.error("Failed to parse BKU value: {} {}", selected, ex); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK); //$NON-NLS-1$
dialog.open();
}
}
@@ -898,23 +718,23 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
int getLocaleElementIndex(Locale locale) {
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) {
if (Constants.SUPPORTED_LOCALES[i].equals(locale)) {
- log.debug("Locale: " + locale + " IDX: " + i); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Locale: {} IDX: {}", locale, i); //$NON-NLS-1$ //$NON-NLS-2$
return i;
}
}
- log.warn("NO Locale match for " + locale); //$NON-NLS-1$
+ log.warn("NO Locale match for {}", locale); //$NON-NLS-1$
return 0;
}
-
+
void performLocaleSelectionChanged(Locale selected) {
- log.debug("Selected Locale: " + selected); //$NON-NLS-1$
+ log.debug("Selected Locale: {}", selected); //$NON-NLS-1$
this.configurationContainer.setLocale(selected);
this.cmbLocaleAuswahl.select(this.getLocaleElementIndex(selected));
}
void performPositionSelection(boolean automatic) {
- log.debug("Selected Position: " + automatic); //$NON-NLS-1$
+ log.debug("Selected Position: {}", automatic); //$NON-NLS-1$
SignaturePosition pos = automatic ? new SignaturePosition() : null;
this.configurationContainer.setDefaultSignaturePosition(pos);
this.btnAutomatischePositionierung.setSelection(automatic);
@@ -929,14 +749,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.configurationContainer.setUseSignatureFields(useFields);
this.btnSignatureFieldsUsage.setSelection(useFields);
}
-
+
void performEnableUsePlaceholder(boolean enable) {
this.btnPlatzhalterVerwenden.setEnabled(enable);
this.btnSignatureFieldsUsage.setEnabled(enable);
this.configurationContainer.setEnablePlaceholderUsage(enable);
this.btnEnablePlaceholderUsage.setSelection(enable);
}
-
+
void performPdfACompatSelection(boolean compat) {
this.configurationContainer.setSignaturePdfACompat(compat);
this.btnPdfACompat.setSelection(compat);
@@ -990,44 +810,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.configurationContainer.setProxyHost(host);
}
-// void processProxyUserChanged() {
-// try {
-// this.proxyUserErrorMarker.setVisible(false);
-// plainProxyUserSetter();
-// } catch (Exception ex) {
-// this.proxyUserErrorMarker.setVisible(true);
-// this.proxyUserErrorMarker.setToolTipText(ex.getMessage());
-// log.error("processProxyUser: ", ex); //$NON-NLS-1$
-// }
-// }
-//
-// /**
-// *
-// */
-// private void plainProxyUserSetter() {
-// String user = this.txtProxyUser.getText();
-// this.configurationContainer.setProxyUser(user);
-// }
-//
-// void processProxyPassChanged() {
-// try {
-// this.proxyPassErrorMarker.setVisible(false);
-// plainProxyPassSetter();
-// } catch (Exception ex) {
-// this.proxyPassErrorMarker.setVisible(true);
-// this.proxyPassErrorMarker.setToolTipText(ex.getMessage());
-// log.error("processProxyPass: ", ex); //$NON-NLS-1$
-// }
-// }
-//
-// /**
-// *
-// */
-// private void plainProxyPassSetter() {
-// String pass = this.txtProxyPass.getText();
-// this.configurationContainer.setProxyPass(pass);
-// }
-
void processProxyPortChanged() {
try {
this.txtProxyPortErrorMarker.setVisible(false);
@@ -1059,6 +841,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
/*
* (non-Javadoc)
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
*/
@Override
@@ -1066,76 +849,74 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
// Nothing to do here
}
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#initConfiguration(at.asit.pdfover.gui.workflow.config.PersistentConfigProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.asit.pdfover.gui.composites.BaseConfigurationComposite#initConfiguration(
+ * at.asit.pdfover.gui.workflow.config.PersistentConfigProvider)
*/
@Override
public void initConfiguration(PersistentConfigProvider provider) {
- this.configurationContainer.setDefaultSignaturePosition(
- provider.getDefaultSignaturePositionPersistent());
+ this.configurationContainer.setDefaultSignaturePosition(provider.getDefaultSignaturePositionPersistent());
this.configurationContainer.setUseMarker(provider.getUseMarker());
this.configurationContainer.setUseSignatureFields(provider.getUseSignatureFields());
this.configurationContainer.setEnablePlaceholderUsage(provider.getEnablePlaceholderUsage());
- /*this.configurationContainer.setDownloadURL(
- provider.getDownloadURL());*/
- this.configurationContainer.setSignaturePdfACompat(
- provider.getSignaturePdfACompat());
- this.configurationContainer.setPlaceholderTransparency(
- provider.getPlaceholderTransparency());
+ this.configurationContainer.setSignaturePdfACompat(provider.getSignaturePdfACompat());
+ this.configurationContainer.setPlaceholderTransparency(provider.getPlaceholderTransparency());
- this.configurationContainer.setDefaultBKU(
- provider.getDefaultBKUPersistent());
- this.configurationContainer.setKeyStoreEnabled(
- provider.getKeyStoreEnabledPersistent());
+ this.configurationContainer.setDefaultBKU(provider.getDefaultBKUPersistent());
+ this.configurationContainer.setKeyStoreEnabled(provider.getKeyStoreEnabledPersistent());
- this.configurationContainer.setOutputFolder(
- provider.getDefaultOutputFolderPersistent());
+ this.configurationContainer.setOutputFolder(provider.getDefaultOutputFolderPersistent());
+ this.configurationContainer.setSaveFilePostFix(provider.getSaveFilePostFix());
this.configurationContainer.setLocale(provider.getLocale());
- this.configurationContainer.setUpdateCheck(
- provider.getUpdateCheck());
+ this.configurationContainer.setUpdateCheck(provider.getUpdateCheck());
- this.configurationContainer.setProxyHost(
- provider.getProxyHostPersistent());
+ this.configurationContainer.setProxyHost(provider.getProxyHostPersistent());
try {
- this.configurationContainer.setProxyPort(
- provider.getProxyPortPersistent());
+ this.configurationContainer.setProxyPort(provider.getProxyPortPersistent());
} catch (InvalidPortException e) {
log.error("Failed to set proxy port!", e); //$NON-NLS-1$
}
- this.configurationContainer.setProxyUser(
- provider.getProxyUserPersistent());
- this.configurationContainer.setProxyPass(
- provider.getProxyPassPersistent());
+ this.configurationContainer.setProxyUser(provider.getProxyUserPersistent());
+ this.configurationContainer.setProxyPass(provider.getProxyPassPersistent());
+ this.configurationContainer.setSignatureProfile(Profile.getProfile(provider.getSignatureProfile()));
}
/*
* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration()
+ *
+ * @see
+ * at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration()
*/
@Override
public void loadConfiguration() {
// load advanced settings
- performBKUSelectionChanged(this.configurationContainer
- .getDefaultBKU());
+ performBKUSelectionChanged(this.configurationContainer.getDefaultBKU());
String outputFolder = this.configurationContainer.getOutputFolder();
if (outputFolder != null) {
performOutputFolderChanged(outputFolder);
}
- SignaturePosition pos = this.configurationContainer
- .getDefaultSignaturePosition();
+ String postFix = this.configurationContainer.getSaveFilePostFix();
+ if (postFix != null) {
+ performPostFixChanged(postFix);
+ } else {
+ performPostFixChanged(Constants.DEFAULT_POSTFIX);
+ }
+ SignaturePosition pos = this.configurationContainer.getDefaultSignaturePosition();
performPositionSelection(pos != null && pos.useAutoPositioning());
performUseMarkerSelection(this.configurationContainer.getUseMarker());
performUseSignatureFieldsSelection(this.configurationContainer.getUseSignatureFields());
performEnableUsePlaceholder(this.configurationContainer.getEnablePlaceholderUsage());
- this.sclTransparenz.setSelection(this.configurationContainer
- .getPlaceholderTransparency());
+ this.sclTransparenz.setSelection(this.configurationContainer.getPlaceholderTransparency());
performLocaleSelectionChanged(this.configurationContainer.getLocale());
performPdfACompatSelection(this.configurationContainer.getSignaturePdfACompat());
performKeystoreEnabledSelection(this.configurationContainer.getKeyStoreEnabled());
performUpdateCheckSelection(this.configurationContainer.getUpdateCheck());
+ performSetSignatureProfile(this.configurationContainer.getSignatureProfile());
int port = this.configurationContainer.getProxyPort();
if (port > 0) {
@@ -1147,47 +928,58 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
this.txtProxyHost.setText(host);
}
- /*String user = this.configurationContainer.getProxyUser();
- if (user != null) {
- this.txtProxyUser.setText(user);
}
- String pass = this.configurationContainer.getProxyPass();
- if (pass != null) {
- this.txtProxyPass.setText(pass);
- }*/
-}
-
+ /**
+ * @param profile
+ *
+ */
+ public void performSetSignatureProfile(Profile profile) {
+ switch (profile) {
+ case INVISIBLE:
+ case AMTSSIGNATURBLOCK:
+ this.performPositionSelection(true);
+ this.btnAutomatischePositionierung.setEnabled(false);
+ this.btnEnablePlaceholderUsage.setEnabled(false);
+ this.performEnableUsePlaceholder(false);
+ break;
+ default:
+ this.btnAutomatischePositionierung.setEnabled(true);
+ this.btnEnablePlaceholderUsage.setEnabled(true);
+ }
+ }
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#storeConfiguration(at.asit.pdfover.gui.workflow.config.ConfigManipulator, at.asit.pdfover.gui.workflow.config.PersistentConfigProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.asit.pdfover.gui.composites.BaseConfigurationComposite#storeConfiguration(
+ * at.asit.pdfover.gui.workflow.config.ConfigManipulator,
+ * at.asit.pdfover.gui.workflow.config.PersistentConfigProvider)
*/
@Override
- public void storeConfiguration(ConfigManipulator store,
- PersistentConfigProvider provider) {
- store.setDefaultSignaturePosition(
- this.configurationContainer.getDefaultSignaturePosition());
+ public void storeConfiguration(ConfigManipulator store, PersistentConfigProvider provider) {
+ store.setDefaultSignaturePosition(this.configurationContainer.getDefaultSignaturePosition());
store.setUseMarker(this.configurationContainer.getUseMarker());
store.setUseSignatureFields(this.configurationContainer.getUseSignatureFields());
store.setEnablePlaceholderUsage(this.configurationContainer.getEnablePlaceholderUsage());
- store.setSignaturePdfACompat(
- this.configurationContainer.getSignaturePdfACompat());
- store.setPlaceholderTransparency(
- this.configurationContainer.getPlaceholderTransparency());
+ store.setSignaturePdfACompat(this.configurationContainer.getSignaturePdfACompat());
+ store.setPlaceholderTransparency(this.configurationContainer.getPlaceholderTransparency());
store.setDefaultBKU(this.configurationContainer.getDefaultBKU());
store.setKeyStoreEnabled(this.configurationContainer.getKeyStoreEnabled());
store.setDefaultOutputFolder(this.configurationContainer.getOutputFolder());
-
+ store.setSaveFilePostFix(this.configurationContainer.getSaveFilePostFix());
store.setLocale(this.configurationContainer.getLocale());
store.setUpdateCheck(this.configurationContainer.getUpdateCheck());
+ store.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName());
+
String hostOld = provider.getProxyHostPersistent();
String hostNew = this.configurationContainer.getProxyHost();
- if (hostOld != null && !hostOld.isEmpty() &&
- (hostNew == null || hostNew.isEmpty())) {
+ if (hostOld != null && !hostOld.isEmpty() && (hostNew == null || hostNew.isEmpty())) {
// Proxy has been removed, let's clear the system properties
// Otherwise, the proxy settings wouldn't get removed
System.clearProperty("http.proxyHost"); //$NON-NLS-1$
@@ -1206,8 +998,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
String userOld = provider.getProxyUserPersistent();
String userNew = this.configurationContainer.getProxyUser();
- if (userOld != null && !userOld.isEmpty() &&
- (userNew == null || userNew.isEmpty())) {
+ if (userOld != null && !userOld.isEmpty() && (userNew == null || userNew.isEmpty())) {
// cf. above
System.clearProperty("http.proxyUser"); //$NON-NLS-1$
System.clearProperty("https.proxyUser"); //$NON-NLS-1$
@@ -1223,121 +1014,102 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
}
store.setProxyPass(passNew);
}
+
/*
* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings()
+ *
+ * @see
+ * at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings()
*/
@Override
public void validateSettings(int resumeIndex) throws Exception {
-
+
String foldername = this.configurationContainer.getOutputFolder();
-
+
switch (resumeIndex) {
- case 0:
- if (foldername != null && !foldername.isEmpty()) {
- File outputFolder = new File(foldername);
- if (!outputFolder.exists()) {
- throw new OutputfolderDoesntExistException(outputFolder, 1);
- }
- if (!outputFolder.isDirectory()) {
- throw new OutputfolderNotADirectoryException(outputFolder);
- }
+ case 0:
+ if (foldername != null && !foldername.isEmpty()) {
+ File outputFolder = new File(foldername);
+ if (!outputFolder.exists()) {
+ throw new OutputfolderDoesntExistException(outputFolder, 1);
}
- // Fall through
- case 1:
- this.plainProxyHostSetter();
- // Fall through
- case 2:
- this.plainProxyPortSetter();
- // Fall through
-// case 3:
-// this.plainProxyUserSetter();
-// // Fall through
-// case 4:
-// this.plainProxyPassSetter();
+ if (!outputFolder.isDirectory()) {
+ throw new OutputfolderNotADirectoryException(outputFolder);
+ }
+ }
+ // Fall through
+ case 1:
+ this.plainProxyHostSetter();
+ // Fall through
+ case 2:
+ this.plainProxyPortSetter();
+ // Fall through
+ // case 3:
+ // this.plainProxyUserSetter();
+ // // Fall through
+ // case 4:
+ // this.plainProxyPassSetter();
}
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
*/
@Override
public void reloadResources() {
- this.grpSignatur.setText(Messages
- .getString("advanced_config.Signature_Title")); //$NON-NLS-1$
- this.btnAutomatischePositionierung.setText(Messages
- .getString("advanced_config.AutoPosition")); //$NON-NLS-1$
- this.btnAutomatischePositionierung.setToolTipText(Messages
- .getString("advanced_config.AutoPosition_ToolTip")); //$NON-NLS-1$
+ this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title")); //$NON-NLS-1$
+ this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition")); //$NON-NLS-1$
+ this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip")); //$NON-NLS-1$
this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title")); //$NON-NLS-1$
this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker")); //$NON-NLS-1$
this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip")); //$NON-NLS-1$
this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields")); //$NON-NLS-1$
this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip")); //$NON-NLS-1$
this.btnEnablePlaceholderUsage.setText(Messages.getString("advanced_config.Placeholder_Enabled"));
- this.btnPdfACompat.setText(Messages
- .getString("advanced_config.PdfACompat")); //$NON-NLS-1$
- this.btnPdfACompat.setToolTipText(Messages
- .getString("advanced_config.PdfACompat_ToolTip")); //$NON-NLS-1$
- this.lblTransparenz.setText(Messages
- .getString("advanced_config.SigPHTransparency")); //$NON-NLS-1$
- this.lblTransparenzLinks.setText(Messages
- .getString("advanced_config.SigPHTransparencyMin")); //$NON-NLS-1$
- this.lblTransparenzRechts.setText(Messages
- .getString("advanced_config.SigPHTransparencyMax")); //$NON-NLS-1$
- this.sclTransparenz.setToolTipText(Messages
- .getString("advanced_config.SigPHTransparencyTooltip")); //$NON-NLS-1$
-
- this.grpBkuAuswahl.setText(Messages
- .getString("advanced_config.BKUSelection_Title")); //$NON-NLS-1$
- this.cmbBKUAuswahl.setToolTipText(Messages
- .getString("advanced_config.BKUSelection_ToolTip")); //$NON-NLS-1$
- this.btnKeystoreEnabled.setText(Messages
- .getString("advanced_config.KeystoreEnabled")); //$NON-NLS-1$
- this.btnKeystoreEnabled.setToolTipText(Messages
- .getString("advanced_config.KeystoreEnabled_ToolTip")); //$NON-NLS-1$
-
- this.grpSpeicherort.setText(Messages
- .getString("advanced_config.OutputFolder_Title")); //$NON-NLS-1$
- this.lblDefaultOutputFolder.setText(Messages
- .getString("advanced_config.OutputFolder")); //$NON-NLS-1$
- this.txtOutputFolder.setToolTipText(Messages
- .getString("advanced_config.OutputFolder_ToolTip")); //$NON-NLS-1$
+ this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat")); //$NON-NLS-1$
+ this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip")); //$NON-NLS-1$
+ this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency")); //$NON-NLS-1$
+ this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin")); //$NON-NLS-1$
+ this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax")); //$NON-NLS-1$
+ this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip")); //$NON-NLS-1$
+
+ this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title")); //$NON-NLS-1$
+ this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip")); //$NON-NLS-1$
+ this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled")); //$NON-NLS-1$
+ this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip")); //$NON-NLS-1$
+
+ this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title")); //$NON-NLS-1$
+ this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder")); //$NON-NLS-1$
+ this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip")); //$NON-NLS-1$
this.btnBrowse.setText(Messages.getString("common.browse")); //$NON-NLS-1$
- this.grpLocaleAuswahl.setText(Messages
- .getString("advanced_config.LocaleSelection_Title")); //$NON-NLS-1$
- this.cmbLocaleAuswahl.setToolTipText(Messages
- .getString("advanced_config.LocaleSelection_ToolTip")); //$NON-NLS-1$
+ this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title")); //$NON-NLS-1$
+ this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip")); //$NON-NLS-1$
- this.grpUpdateCheck.setText(Messages
- .getString("advanced_config.UpdateCheck_Title")); //$NON-NLS-1$
- this.btnUpdateCheck.setText(Messages
- .getString("advanced_config.UpdateCheck")); //$NON-NLS-1$
- this.btnUpdateCheck.setToolTipText(Messages
- .getString("advanced_config.UpdateCheck_ToolTip")); //$NON-NLS-1$
+ this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title")); //$NON-NLS-1$
+ this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck")); //$NON-NLS-1$
+ this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip")); //$NON-NLS-1$
this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title")); //$NON-NLS-1$
this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost")); //$NON-NLS-1$
- this.txtProxyHost.setToolTipText(Messages
- .getString("advanced_config.ProxyHost_ToolTip")); //$NON-NLS-1$
- this.txtProxyHost.setMessage(Messages
- .getString("advanced_config.ProxyHost_Template")); //$NON-NLS-1$
- this.lblProxyPort.setText(Messages
- .getString("advanced_config.ProxyPort")); //$NON-NLS-1$
- this.txtProxyPort.setToolTipText(Messages
- .getString("advanced_config.ProxyPort_ToolTip")); //$NON-NLS-1$
- this.txtProxyPort.setMessage(Messages
- .getString("advanced_config.ProxyPort_Template")); //$NON-NLS-1$
-// this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser")); //$NON-NLS-1$
-// this.txtProxyUser.setToolTipText(Messages
-// .getString("advanced_config.ProxyUser_ToolTip")); //$NON-NLS-1$
-// this.txtProxyUser.setMessage(Messages
-// .getString("advanced_config.ProxyUser_Template")); //$NON-NLS-1$
-// this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass")); //$NON-NLS-1$
-// this.txtProxyPass.setToolTipText(Messages
-// .getString("advanced_config.ProxyPass_ToolTip")); //$NON-NLS-1$
-// this.txtProxyPass.setMessage(Messages
-// .getString("advanced_config.ProxyPass_Template")); //$NON-NLS-1$
+ this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip")); //$NON-NLS-1$
+ this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template")); //$NON-NLS-1$
+ this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort")); //$NON-NLS-1$
+ this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip")); //$NON-NLS-1$
+ this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template")); //$NON-NLS-1$
+ // this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser"));
+ // //$NON-NLS-1$
+ // this.txtProxyUser.setToolTipText(Messages
+ // .getString("advanced_config.ProxyUser_ToolTip")); //$NON-NLS-1$
+ // this.txtProxyUser.setMessage(Messages
+ // .getString("advanced_config.ProxyUser_Template")); //$NON-NLS-1$
+ // this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass"));
+ // //$NON-NLS-1$
+ // this.txtProxyPass.setToolTipText(Messages
+ // .getString("advanced_config.ProxyPass_ToolTip")); //$NON-NLS-1$
+ // this.txtProxyPass.setMessage(Messages
+ // .getString("advanced_config.ProxyPass_Template")); //$NON-NLS-1$
}
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
index 7396a6b0..0940ea67 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java
@@ -1,599 +1,601 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import java.awt.Desktop;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.swt.widgets.TabItem;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.Constants;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.exceptions.ResumableException;
-import at.asit.pdfover.gui.utils.Messages;
-import at.asit.pdfover.gui.workflow.PDFSigner;
-import at.asit.pdfover.gui.workflow.config.ConfigManipulator;
-import at.asit.pdfover.gui.workflow.config.ConfigurationContainer;
-import at.asit.pdfover.gui.workflow.config.ConfigurationContainerImpl;
-import at.asit.pdfover.gui.workflow.config.PersistentConfigProvider;
-import at.asit.pdfover.gui.workflow.states.State;
-
-/**
- * Composite for hosting configuration composites
- */
-public class ConfigurationComposite extends StateComposite {
-
- /**
- * The PDF Signer used to produce signature block preview
- */
- protected PDFSigner signer;
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory
- .getLogger(ConfigurationComposite.class);
-
- /**
- * configuration manipulator
- */
- ConfigManipulator configManipulator = null;
-
- /**
- * configuration provider
- */
- PersistentConfigProvider configProvider = null;
-
- /**
- * simple configuration composite
- */
- BaseConfigurationComposite simpleConfigComposite;
-
- /**
- * advanced configuration composite
- */
- BaseConfigurationComposite advancedConfigComposite;
-
- /**
- * advanced configuration composite
- */
- BaseConfigurationComposite keystoreConfigComposite = null;
-
- /**
- * The TabFolder
- */
- TabFolder tabFolder;
-
- /**
- * configuration container Keeps state for current configuration changes
- */
- ConfigurationContainer configurationContainer = new ConfigurationContainerImpl();
-
- /**
- * The stack layout
- */
- StackLayout compositeStack = new StackLayout();
-
- /**
- * SWT style
- */
- int style;
-
- /**
- * base configuration container
- */
- Composite containerComposite;
-
- /**
- * checks whether the user is done
- */
- boolean userDone = false;
-
- private TabItem simpleTabItem;
-
- private TabItem advancedTabItem;
-
- private TabItem keystoreTabItem;
-
- private TabItem aboutTabItem;
-
- private Button btnSpeichern;
-
- private Button btnAbbrechen;
-
- /**
- * @return the signer
- */
- public PDFSigner getSigner() {
- return this.signer;
- }
-
- /**
- * Create the composite.
- *
- * @param parent
- * @param style
- * @param state
- */
- public ConfigurationComposite(Composite parent, int style, State state) {
- super(parent, SWT.FILL | style, state);
- this.style = SWT.FILL | style;
-
- this.setLayout(new FormLayout());
-
- this.containerComposite = new Composite(this, SWT.FILL | SWT.RESIZE);
-
- this.tabFolder = new TabFolder(this.containerComposite, SWT.NONE);
- FormData fd_tabFolder = new FormData();
- fd_tabFolder.bottom = new FormAttachment(100, -5);
- fd_tabFolder.right = new FormAttachment(100, -5);
- fd_tabFolder.top = new FormAttachment(0, 5);
- fd_tabFolder.left = new FormAttachment(0, 5);
- this.tabFolder.setLayoutData(fd_tabFolder);
-
- FontData[] fD_tabFolder = this.tabFolder.getFont().getFontData();
- fD_tabFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0]));
-
- this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
-
- ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder,
- SWT.H_SCROLL | SWT.V_SCROLL);
- this.simpleTabItem.setControl(simpleCompositeScr);
- this.simpleConfigComposite = new SimpleConfigurationComposite(
- simpleCompositeScr, SWT.NONE, state,
- this.configurationContainer);
- simpleCompositeScr.setContent(this.simpleConfigComposite);
- simpleCompositeScr.setExpandHorizontal(true);
- simpleCompositeScr.setExpandVertical(true);
- simpleCompositeScr.setMinSize(this.simpleConfigComposite.computeSize(
- SWT.DEFAULT, SWT.DEFAULT));
-
- this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
-
- ScrolledComposite advancedCompositeScr = new ScrolledComposite(
- this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
- this.advancedTabItem.setControl(advancedCompositeScr);
- this.advancedConfigComposite = new AdvancedConfigurationComposite(
- advancedCompositeScr, SWT.NONE, state,
- this.configurationContainer, this);
- advancedCompositeScr.setContent(this.advancedConfigComposite);
- advancedCompositeScr.setExpandHorizontal(true);
- advancedCompositeScr.setExpandVertical(true);
- advancedCompositeScr.setMinSize(this.advancedConfigComposite
- .computeSize(SWT.DEFAULT, SWT.DEFAULT));
-
- this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE);
- this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$
-
- ScrolledComposite aboutCompositeScr = new ScrolledComposite(
- this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
- this.aboutTabItem.setControl(aboutCompositeScr);
- AboutComposite aboutConfigComposite = new AboutComposite(
- aboutCompositeScr, SWT.NONE);
- aboutCompositeScr.setContent(aboutConfigComposite);
- aboutCompositeScr.setExpandHorizontal(true);
- aboutCompositeScr.setExpandVertical(true);
- aboutCompositeScr.setMinSize(aboutConfigComposite
- .computeSize(SWT.DEFAULT, SWT.DEFAULT));
-
- this.tabFolder.setSelection(this.simpleTabItem);
-
- this.btnSpeichern = new Button(this, SWT.NONE);
- FormData fd_btnSpeichern = new FormData();
- fd_btnSpeichern.right = new FormAttachment(100, -5);
- fd_btnSpeichern.bottom = new FormAttachment(100);
- this.btnSpeichern.setLayoutData(fd_btnSpeichern);
- this.btnSpeichern.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- getShell().setText(Constants.APP_NAME);
- if (ConfigurationComposite.this.storeConfiguration()) {
- ConfigurationComposite.this.userDone = true;
- ConfigurationComposite.this.state.updateStateMachine();
- }
- }
- });
- this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
- getShell().setDefaultButton(this.btnSpeichern);
-
- FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData();
- fD_btnSpeichern[0].setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btnSpeichern
- .setFont(new Font(Display.getCurrent(), fD_btnSpeichern[0]));
-
- this.btnAbbrechen = new Button(this, SWT.NONE);
- FormData fd_btnAbrechen = new FormData();
- fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10);
- fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM);
- this.btnAbbrechen.setLayoutData(fd_btnAbrechen);
- this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
- this.btnAbbrechen.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- getShell().setText(Constants.APP_NAME);
- ConfigurationComposite.this.userDone = true;
- ConfigurationComposite.this.state.updateStateMachine();
- }
- });
-
- FontData[] fD_btnAbbrechen = this.btnAbbrechen.getFont().getFontData();
- fD_btnAbbrechen[0].setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btnAbbrechen
- .setFont(new Font(Display.getCurrent(), fD_btnAbbrechen[0]));
-
- FormData fd_composite = new FormData();
- fd_composite.top = new FormAttachment(0, 5);
- fd_composite.bottom = new FormAttachment(this.btnSpeichern, -10);
- fd_composite.left = new FormAttachment(0, 5);
- fd_composite.right = new FormAttachment(100, -5);
- this.containerComposite.setLayoutData(fd_composite);
- this.containerComposite.setLayout(this.compositeStack);
- this.compositeStack.topControl = this.tabFolder;
-
- getShell().setText(Constants.APP_NAME_VERSION);
-
- this.doLayout();
- }
-
- /**
- * @param signer
- * the signer to set
- */
- public void setSigner(PDFSigner signer) {
- this.signer = signer;
- if (this.simpleConfigComposite != null) {
- this.simpleConfigComposite.setSigner(getSigner());
- }
- if (this.advancedConfigComposite != null) {
- // not needed at the moment
- this.advancedConfigComposite.setSigner(getSigner());
- }
- if (this.keystoreConfigComposite != null) {
- // not needed at the moment
- this.keystoreConfigComposite.setSigner(getSigner());
- }
- }
-
- private class AboutComposite extends StateComposite {
- private Link lnkAbout;
- /**
- * @param parent
- * @param style
- */
- public AboutComposite(Composite parent, int style) {
- super(parent, style, null);
-
- setLayout(new FormLayout());
-
- this.lnkAbout = new Link(this, SWT.WRAP);
-
- FormData fd_lnkAbout = new FormData();
- fd_lnkAbout.right = new FormAttachment(100, -5);
- fd_lnkAbout.left = new FormAttachment(0, 5);
- fd_lnkAbout.top = new FormAttachment(0, 5);
- fd_lnkAbout.width = 100;
- this.lnkAbout.setLayoutData(fd_lnkAbout);
-
- FontData[] fD_lnkAbout = this.lnkAbout.getFont().getFontData();
- fD_lnkAbout[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lnkAbout.setFont(new Font(Display.getCurrent(),
- fD_lnkAbout[0]));
-
- this.lnkAbout.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- URI url = new URI("https://technology.a-sit.at/lizenzbedingungen/"); //$NON-NLS-1$
- log.debug("Trying to open " + url.toString()); //$NON-NLS-1$
- if (Desktop.isDesktopSupported()) {
- Desktop.getDesktop().browse(url);
- } else {
- log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$
- Program.launch(url.toString());
- }
- } catch (IOException ex) {
- log.error("AboutComposite: ", ex); //$NON-NLS-1$
- } catch (URISyntaxException ex) {
- log.error("AboutComposite: ", ex); //$NON-NLS-1$
- }
- }
- });
-
- // Load localized strings
- reloadResources();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
- */
- @Override
- public void doLayout() {
- // Nothing to do here
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- this.lnkAbout.setText(Messages.getString("config.AboutText")); //$NON-NLS-1$
- }
- }
-
- private boolean keystoreInitialized = false;
-
- /**
- * Set whether keystore tab is enabled
- * @param enabled whether keystore tab is enabled
- */
- public void keystoreEnabled(boolean enabled) {
- if (enabled && this.keystoreConfigComposite == null) {
- this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2);
- this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //$NON-NLS-1$
-
- ScrolledComposite keystoreCompositeScr = new ScrolledComposite(
- this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
- this.keystoreTabItem.setControl(keystoreCompositeScr);
- this.keystoreConfigComposite = new KeystoreConfigurationComposite(
- keystoreCompositeScr, SWT.NONE, this.state,
- this.configurationContainer);
- keystoreCompositeScr.setContent(this.keystoreConfigComposite);
- keystoreCompositeScr.setExpandHorizontal(true);
- keystoreCompositeScr.setExpandVertical(true);
- keystoreCompositeScr.setMinSize(this.keystoreConfigComposite
- .computeSize(SWT.DEFAULT, SWT.DEFAULT));
- if (!this.keystoreInitialized) {
- this.keystoreConfigComposite.initConfiguration(this.configProvider);
- this.keystoreInitialized = true;
- }
- this.keystoreConfigComposite.loadConfiguration();
- } else if (!enabled && this.keystoreConfigComposite != null){
- this.keystoreTabItem.dispose();
- this.keystoreConfigComposite = null;
- }
- }
-
- /**
- * Sets the configuration manipulator
- *
- * @param manipulator
- */
- public void setConfigManipulator(ConfigManipulator manipulator) {
- this.configManipulator = manipulator;
- }
-
- /**
- * Sets the configuration provider
- *
- * @param provider
- */
- public void setConfigProvider(PersistentConfigProvider provider) {
- this.configProvider = provider;
- if (this.configProvider != null) {
- // Initialize Configuration Container
- this.simpleConfigComposite.initConfiguration(this.configProvider);
- this.advancedConfigComposite.initConfiguration(this.configProvider);
-
- this.simpleConfigComposite.loadConfiguration();
- this.advancedConfigComposite.loadConfiguration();
- if (this.keystoreConfigComposite != null)
- this.keystoreConfigComposite.loadConfiguration();
- }
- }
-
- boolean storeConfiguration() {
- boolean status = false;
- boolean redo = false;
- int resumeIndex = 0;
- try {
- do {
- try {
- this.simpleConfigComposite.validateSettings(resumeIndex);
-
- redo = false;
- status = true;
- } catch (ResumableException e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
- int rc = dialog.open();
-
- redo = (rc == SWT.RETRY);
- if (rc == SWT.IGNORE)
- {
- resumeIndex = e.getResumeIndex();
- redo = true;
- }
- }
- } while (redo);
-
- if (!status) {
- return false;
- }
-
- status = false;
- redo = false;
- resumeIndex = 0;
-
- do {
- try {
- this.advancedConfigComposite.validateSettings(resumeIndex);
-
- redo = false;
- status = true;
- } catch (ResumableException e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
- int rc = dialog.open();
-
- redo = (rc == SWT.RETRY);
- if (rc == SWT.IGNORE)
- {
- resumeIndex = e.getResumeIndex();
- redo = true;
- }
- }
- } while (redo);
-
- if (!status) {
- return false;
- }
-
- if (this.keystoreConfigComposite != null) {
- status = false;
- redo = false;
- resumeIndex = 0;
-
- do {
- try {
- this.keystoreConfigComposite.validateSettings(resumeIndex);
-
- redo = false;
- status = true;
- } catch (ResumableException e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
- int rc = dialog.open();
-
- redo = (rc == SWT.RETRY);
- if (rc == SWT.IGNORE)
- {
- resumeIndex = e.getResumeIndex();
- redo = true;
- }
- }
- } while (redo);
-
- if (!status) {
- return false;
- }
- }
- } catch (Exception e) {
- log.error("Settings validation failed!", e); //$NON-NLS-1$
- String message = e.getMessage();
- if (message == null)
- message = Messages.getString("error.Unexpected"); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(), message,
- BUTTONS.OK);
- dialog.open();
- return false;
- }
-
- if (!status) {
- return false;
- }
-
- // Write current Configuration
- this.simpleConfigComposite.storeConfiguration(
- this.configManipulator, this.configProvider);
- this.advancedConfigComposite.storeConfiguration(
- this.configManipulator, this.configProvider);
- if (this.keystoreConfigComposite != null)
- this.keystoreConfigComposite.storeConfiguration(
- this.configManipulator, this.configProvider);
-
- status = false;
- redo = false;
- do {
- // Save current config to file
- try {
- this.configManipulator.saveCurrentConfiguration();
- redo = false;
- status = true;
- } catch (IOException e) {
- log.error("Failed to save configuration to file!", e); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$
- redo = (dialog.open() == SWT.RETRY);
-
- // return false;
- }
- } while (redo);
-
- return status;
- }
-
- /**
- * Checks if the user has finished working with the configuration composite
- *
- * @return if the user is done
- */
- public boolean isUserDone() {
- return this.userDone;
- }
-
- @Override
- protected void checkSubclass() {
- // Disable the check that prevents subclassing of SWT components
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
- */
- @Override
- public void doLayout() {
- Control ctrl = this.compositeStack.topControl;
- this.containerComposite.layout(true, true);
- getShell().layout(true, true);
- // Note: SWT only layouts children! No grandchildren!
- if (ctrl instanceof StateComposite) {
- ((StateComposite) ctrl).doLayout();
- }
- setFocus();
- }
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
- this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
- this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$
- this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
- this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
- }
-}
+/*
+ * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://joinup.ec.europa.eu/software/page/eupl
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ */
+package at.asit.pdfover.gui.composites;
+
+// Imports
+import java.awt.Desktop;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.custom.StackLayout;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import at.asit.pdfover.gui.Constants;
+import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
+import at.asit.pdfover.gui.controls.ErrorDialog;
+import at.asit.pdfover.gui.exceptions.ResumableException;
+import at.asit.pdfover.gui.utils.Messages;
+import at.asit.pdfover.gui.workflow.PDFSigner;
+import at.asit.pdfover.gui.workflow.config.ConfigManipulator;
+import at.asit.pdfover.gui.workflow.config.ConfigurationContainer;
+import at.asit.pdfover.gui.workflow.config.ConfigurationContainerImpl;
+import at.asit.pdfover.gui.workflow.config.PersistentConfigProvider;
+import at.asit.pdfover.gui.workflow.states.State;
+
+/**
+ * Composite for hosting configuration composites
+ */
+public class ConfigurationComposite extends StateComposite {
+
+ /**
+ * The PDF Signer used to produce signature block preview
+ */
+ protected PDFSigner signer;
+
+ /**
+ * SLF4J Logger instance
+ **/
+ static final Logger log = LoggerFactory
+ .getLogger(ConfigurationComposite.class);
+
+ /**
+ * configuration manipulator
+ */
+ ConfigManipulator configManipulator = null;
+
+ /**
+ * configuration provider
+ */
+ PersistentConfigProvider configProvider = null;
+
+ /**
+ * simple configuration composite
+ */
+ BaseConfigurationComposite simpleConfigComposite;
+
+ /**
+ * advanced configuration composite
+ */
+ BaseConfigurationComposite advancedConfigComposite;
+
+ /**
+ * advanced configuration composite
+ */
+ BaseConfigurationComposite keystoreConfigComposite = null;
+
+ /**
+ * The TabFolder
+ */
+ TabFolder tabFolder;
+
+ /**
+ * configuration container Keeps state for current configuration changes
+ */
+ ConfigurationContainer configurationContainer = new ConfigurationContainerImpl();
+
+ /**
+ * The stack layout
+ */
+ StackLayout compositeStack = new StackLayout();
+
+ /**
+ * SWT style
+ */
+ int style;
+
+ /**
+ * base configuration container
+ */
+ Composite containerComposite;
+
+ /**
+ * checks whether the user is done
+ */
+ boolean userDone = false;
+
+ private TabItem simpleTabItem;
+
+ private TabItem advancedTabItem;
+
+ private TabItem keystoreTabItem;
+
+ private TabItem aboutTabItem;
+
+ private Button btnSpeichern;
+
+ private Button btnAbbrechen;
+
+ /**
+ * @return the signer
+ */
+ public PDFSigner getSigner() {
+ return this.signer;
+ }
+
+ /**
+ * Create the composite.
+ *
+ * @param parent
+ * @param style
+ * @param state
+ */
+ public ConfigurationComposite(Composite parent, int style, State state) {
+ super(parent, SWT.FILL | style, state);
+ this.style = SWT.FILL | style;
+
+ this.setLayout(new FormLayout());
+
+ this.containerComposite = new Composite(this, SWT.FILL | SWT.RESIZE);
+
+ this.tabFolder = new TabFolder(this.containerComposite, SWT.NONE);
+ FormData fd_tabFolder = new FormData();
+ fd_tabFolder.bottom = new FormAttachment(100, -5);
+ fd_tabFolder.right = new FormAttachment(100, -5);
+ fd_tabFolder.top = new FormAttachment(0, 5);
+ fd_tabFolder.left = new FormAttachment(0, 5);
+ this.tabFolder.setLayoutData(fd_tabFolder);
+
+ FontData[] fD_tabFolder = this.tabFolder.getFont().getFontData();
+ fD_tabFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0]));
+
+ this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE);
+ this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
+ System.out.println(Messages.getString("config.Simple"));
+
+ ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder,
+ SWT.H_SCROLL | SWT.V_SCROLL);
+ this.simpleTabItem.setControl(simpleCompositeScr);
+ this.simpleConfigComposite = new SimpleConfigurationComposite(
+ simpleCompositeScr, SWT.NONE, state,
+ this.configurationContainer);
+ simpleCompositeScr.setContent(this.simpleConfigComposite);
+ simpleCompositeScr.setExpandHorizontal(true);
+ simpleCompositeScr.setExpandVertical(true);
+ simpleCompositeScr.setMinSize(this.simpleConfigComposite.computeSize(
+ SWT.DEFAULT, SWT.DEFAULT));
+
+ this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE);
+ this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
+ System.out.print(Messages.getString("config.Advanced"));
+
+ ScrolledComposite advancedCompositeScr = new ScrolledComposite(
+ this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
+ this.advancedTabItem.setControl(advancedCompositeScr);
+ this.advancedConfigComposite = new AdvancedConfigurationComposite(
+ advancedCompositeScr, SWT.NONE, state,
+ this.configurationContainer, this);
+ advancedCompositeScr.setContent(this.advancedConfigComposite);
+ advancedCompositeScr.setExpandHorizontal(true);
+ advancedCompositeScr.setExpandVertical(true);
+ advancedCompositeScr.setMinSize(this.advancedConfigComposite
+ .computeSize(SWT.DEFAULT, SWT.DEFAULT));
+
+ this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE);
+ this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$
+
+ ScrolledComposite aboutCompositeScr = new ScrolledComposite(
+ this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
+ this.aboutTabItem.setControl(aboutCompositeScr);
+ AboutComposite aboutConfigComposite = new AboutComposite(
+ aboutCompositeScr, SWT.NONE);
+ aboutCompositeScr.setContent(aboutConfigComposite);
+ aboutCompositeScr.setExpandHorizontal(true);
+ aboutCompositeScr.setExpandVertical(true);
+ aboutCompositeScr.setMinSize(aboutConfigComposite
+ .computeSize(SWT.DEFAULT, SWT.DEFAULT));
+
+ this.tabFolder.setSelection(this.simpleTabItem);
+
+ this.btnSpeichern = new Button(this, SWT.NONE);
+ FormData fd_btnSpeichern = new FormData();
+ fd_btnSpeichern.right = new FormAttachment(100, -5);
+ fd_btnSpeichern.bottom = new FormAttachment(100);
+ this.btnSpeichern.setLayoutData(fd_btnSpeichern);
+ this.btnSpeichern.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getShell().setText(Constants.APP_NAME);
+ if (ConfigurationComposite.this.storeConfiguration()) {
+ ConfigurationComposite.this.userDone = true;
+ ConfigurationComposite.this.state.updateStateMachine();
+ }
+ }
+ });
+ this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ getShell().setDefaultButton(this.btnSpeichern);
+
+ FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData();
+ fD_btnSpeichern[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btnSpeichern
+ .setFont(new Font(Display.getCurrent(), fD_btnSpeichern[0]));
+
+ this.btnAbbrechen = new Button(this, SWT.NONE);
+ FormData fd_btnAbrechen = new FormData();
+ fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10);
+ fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM);
+ this.btnAbbrechen.setLayoutData(fd_btnAbrechen);
+ this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ this.btnAbbrechen.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ getShell().setText(Constants.APP_NAME);
+ ConfigurationComposite.this.userDone = true;
+ ConfigurationComposite.this.state.updateStateMachine();
+ }
+ });
+
+ FontData[] fD_btnAbbrechen = this.btnAbbrechen.getFont().getFontData();
+ fD_btnAbbrechen[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btnAbbrechen
+ .setFont(new Font(Display.getCurrent(), fD_btnAbbrechen[0]));
+
+ FormData fd_composite = new FormData();
+ fd_composite.top = new FormAttachment(0, 5);
+ fd_composite.bottom = new FormAttachment(this.btnSpeichern, -10);
+ fd_composite.left = new FormAttachment(0, 5);
+ fd_composite.right = new FormAttachment(100, -5);
+ this.containerComposite.setLayoutData(fd_composite);
+ this.containerComposite.setLayout(this.compositeStack);
+ this.compositeStack.topControl = this.tabFolder;
+
+ getShell().setText(Constants.APP_NAME_VERSION);
+
+ this.doLayout();
+ }
+
+ /**
+ * @param signer
+ * the signer to set
+ */
+ public void setSigner(PDFSigner signer) {
+ this.signer = signer;
+ if (this.simpleConfigComposite != null) {
+ this.simpleConfigComposite.setSigner(getSigner());
+ }
+ if (this.advancedConfigComposite != null) {
+ // not needed at the moment
+ this.advancedConfigComposite.setSigner(getSigner());
+ }
+ if (this.keystoreConfigComposite != null) {
+ // not needed at the moment
+ this.keystoreConfigComposite.setSigner(getSigner());
+ }
+ }
+
+ private class AboutComposite extends StateComposite {
+ private Link lnkAbout;
+ /**
+ * @param parent
+ * @param style
+ */
+ public AboutComposite(Composite parent, int style) {
+ super(parent, style, null);
+
+ setLayout(new FormLayout());
+
+ this.lnkAbout = new Link(this, SWT.WRAP);
+
+ FormData fd_lnkAbout = new FormData();
+ fd_lnkAbout.right = new FormAttachment(100, -5);
+ fd_lnkAbout.left = new FormAttachment(0, 5);
+ fd_lnkAbout.top = new FormAttachment(0, 5);
+ fd_lnkAbout.width = 100;
+ this.lnkAbout.setLayoutData(fd_lnkAbout);
+
+ FontData[] fD_lnkAbout = this.lnkAbout.getFont().getFontData();
+ fD_lnkAbout[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.lnkAbout.setFont(new Font(Display.getCurrent(),
+ fD_lnkAbout[0]));
+
+ this.lnkAbout.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ URI url = new URI(Messages.getString("config.LicenseURL")); //$NON-NLS-1$
+ log.debug("Trying to open " + url.toString()); //$NON-NLS-1$
+ if (Desktop.isDesktopSupported()) {
+ Desktop.getDesktop().browse(url);
+ } else {
+ log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ Program.launch(url.toString());
+ }
+ } catch (IOException ex) {
+ log.error("AboutComposite: ", ex); //$NON-NLS-1$
+ } catch (URISyntaxException ex) {
+ log.error("AboutComposite: ", ex); //$NON-NLS-1$
+ }
+ }
+ });
+
+ // Load localized strings
+ reloadResources();
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
+ */
+ @Override
+ public void doLayout() {
+ // Nothing to do here
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
+ */
+ @Override
+ public void reloadResources() {
+ this.lnkAbout.setText(Messages.getString("config.AboutText")); //$NON-NLS-1$
+ }
+ }
+
+ private boolean keystoreInitialized = false;
+
+ /**
+ * Set whether keystore tab is enabled
+ * @param enabled whether keystore tab is enabled
+ */
+ public void keystoreEnabled(boolean enabled) {
+ if (enabled && this.keystoreConfigComposite == null) {
+ this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2);
+ this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //$NON-NLS-1$
+
+ ScrolledComposite keystoreCompositeScr = new ScrolledComposite(
+ this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
+ this.keystoreTabItem.setControl(keystoreCompositeScr);
+ this.keystoreConfigComposite = new KeystoreConfigurationComposite(
+ keystoreCompositeScr, SWT.NONE, this.state,
+ this.configurationContainer);
+ keystoreCompositeScr.setContent(this.keystoreConfigComposite);
+ keystoreCompositeScr.setExpandHorizontal(true);
+ keystoreCompositeScr.setExpandVertical(true);
+ keystoreCompositeScr.setMinSize(this.keystoreConfigComposite
+ .computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ if (!this.keystoreInitialized) {
+ this.keystoreConfigComposite.initConfiguration(this.configProvider);
+ this.keystoreInitialized = true;
+ }
+ this.keystoreConfigComposite.loadConfiguration();
+ } else if (!enabled && this.keystoreConfigComposite != null){
+ this.keystoreTabItem.dispose();
+ this.keystoreConfigComposite = null;
+ }
+ }
+
+ /**
+ * Sets the configuration manipulator
+ *
+ * @param manipulator
+ */
+ public void setConfigManipulator(ConfigManipulator manipulator) {
+ this.configManipulator = manipulator;
+ }
+
+ /**
+ * Sets the configuration provider
+ *
+ * @param provider
+ */
+ public void setConfigProvider(PersistentConfigProvider provider) {
+ this.configProvider = provider;
+ if (this.configProvider != null) {
+ // Initialize Configuration Container
+ this.simpleConfigComposite.initConfiguration(this.configProvider);
+ this.advancedConfigComposite.initConfiguration(this.configProvider);
+
+ this.simpleConfigComposite.loadConfiguration();
+ this.advancedConfigComposite.loadConfiguration();
+ if (this.keystoreConfigComposite != null)
+ this.keystoreConfigComposite.loadConfiguration();
+ }
+ }
+
+ boolean storeConfiguration() {
+ boolean status = false;
+ boolean redo = false;
+ int resumeIndex = 0;
+ try {
+ do {
+ try {
+ this.simpleConfigComposite.validateSettings(resumeIndex);
+
+ redo = false;
+ status = true;
+ } catch (ResumableException e) {
+ log.error("Settings validation failed!", e); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(),
+ e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
+ int rc = dialog.open();
+
+ redo = (rc == SWT.RETRY);
+ if (rc == SWT.IGNORE)
+ {
+ resumeIndex = e.getResumeIndex();
+ redo = true;
+ }
+ }
+ } while (redo);
+
+ if (!status) {
+ return false;
+ }
+
+ status = false;
+ redo = false;
+ resumeIndex = 0;
+
+ do {
+ try {
+ this.advancedConfigComposite.validateSettings(resumeIndex);
+
+ redo = false;
+ status = true;
+ } catch (ResumableException e) {
+ log.error("Settings validation failed!", e); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(),
+ e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
+ int rc = dialog.open();
+
+ redo = (rc == SWT.RETRY);
+ if (rc == SWT.IGNORE)
+ {
+ resumeIndex = e.getResumeIndex();
+ redo = true;
+ }
+ }
+ } while (redo);
+
+ if (!status) {
+ return false;
+ }
+
+ if (this.keystoreConfigComposite != null) {
+ status = false;
+ redo = false;
+ resumeIndex = 0;
+
+ do {
+ try {
+ this.keystoreConfigComposite.validateSettings(resumeIndex);
+
+ redo = false;
+ status = true;
+ } catch (ResumableException e) {
+ log.error("Settings validation failed!", e); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(),
+ e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE);
+ int rc = dialog.open();
+
+ redo = (rc == SWT.RETRY);
+ if (rc == SWT.IGNORE)
+ {
+ resumeIndex = e.getResumeIndex();
+ redo = true;
+ }
+ }
+ } while (redo);
+
+ if (!status) {
+ return false;
+ }
+ }
+ } catch (Exception e) {
+ log.error("Settings validation failed!", e); //$NON-NLS-1$
+ String message = e.getMessage();
+ if (message == null)
+ message = Messages.getString("error.Unexpected"); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(), message,
+ BUTTONS.OK);
+ dialog.open();
+ return false;
+ }
+
+ if (!status) {
+ return false;
+ }
+
+ // Write current Configuration
+ this.simpleConfigComposite.storeConfiguration(
+ this.configManipulator, this.configProvider);
+ this.advancedConfigComposite.storeConfiguration(
+ this.configManipulator, this.configProvider);
+ if (this.keystoreConfigComposite != null)
+ this.keystoreConfigComposite.storeConfiguration(
+ this.configManipulator, this.configProvider);
+
+ status = false;
+ redo = false;
+ do {
+ // Save current config to file
+ try {
+ this.configManipulator.saveCurrentConfiguration();
+ redo = false;
+ status = true;
+ } catch (IOException e) {
+ log.error("Failed to save configuration to file!", e); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(),
+ Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$
+ redo = (dialog.open() == SWT.RETRY);
+
+ // return false;
+ }
+ } while (redo);
+
+ return status;
+ }
+
+ /**
+ * Checks if the user has finished working with the configuration composite
+ *
+ * @return if the user is done
+ */
+ public boolean isUserDone() {
+ return this.userDone;
+ }
+
+ @Override
+ protected void checkSubclass() {
+ // Disable the check that prevents subclassing of SWT components
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
+ */
+ @Override
+ public void doLayout() {
+ Control ctrl = this.compositeStack.topControl;
+ this.containerComposite.layout(true, true);
+ getShell().layout(true, true);
+ // Note: SWT only layouts children! No grandchildren!
+ if (ctrl instanceof StateComposite) {
+ ((StateComposite) ctrl).doLayout();
+ }
+ setFocus();
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
+ */
+ @Override
+ public void reloadResources() {
+ this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$
+ this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$
+ this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$
+ this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$
+ }
+}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
index f49ebdc4..f10ea855 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java
@@ -360,6 +360,8 @@ public class MobileBKUEnterNumberComposite extends StateComposite {
public String getMobilePassword() {
return this.mobilePassword;
}
+
+
/**
* @param mobilePassword
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
index f879f82c..31bf6f93 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java
@@ -1,486 +1,499 @@
-/*
- * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
- *
- * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
- * the European Commission - subsequent versions of the EUPL (the "Licence");
- * You may not use this work except in compliance with the Licence.
- * You may obtain a copy of the Licence at:
- * http://joinup.ec.europa.eu/software/page/eupl
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the Licence is distributed on an "AS IS" basis,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the Licence for the specific language governing permissions and
- * limitations under the Licence.
- */
-package at.asit.pdfover.gui.composites;
-
-// Imports
-import java.awt.Desktop;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import org.apache.commons.io.FilenameUtils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.program.Program;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import at.asit.pdfover.gui.Constants;
-import at.asit.pdfover.gui.controls.Dialog;
-import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
-import at.asit.pdfover.gui.controls.Dialog.ICON;
-import at.asit.pdfover.gui.controls.ErrorDialog;
-import at.asit.pdfover.gui.utils.Messages;
-import at.asit.pdfover.gui.workflow.states.State;
-import at.asit.pdfover.signator.DocumentSource;
-
-/**
- * GUI component for Output State
- */
-public class OutputComposite extends StateComposite {
-
- /**
- * SLF4J Logger instance
- **/
- static final Logger log = LoggerFactory.getLogger(OutputComposite.class);
-
- private Link lnk_saved_file;
-
- private Button btn_save;
-
- private Label lbl_success_message;
-
- private DocumentSource signedDocument;
-
- private File inputFile;
-
- String outputDir = null;
-
- String tempDirectory = null;
-
- File outputFile = null;
-
- private boolean saveFailed = false;
-
- /**
- * Create the composite.
- *
- * @param parent
- * The parent composite
- * @param style
- * The swt style
- * @param state
- * The owning state
- */
- public OutputComposite(Composite parent, int style, State state) {
- super(parent, style, state);
-
- this.setLayout(new FormLayout());
-
- this.lbl_success_message = new Label(this, SWT.NATIVE | SWT.RESIZE);
- FormData fd_lbl_success_message = new FormData();
- fd_lbl_success_message.top = new FormAttachment(40, 0);
- fd_lbl_success_message.left = new FormAttachment(0);
- fd_lbl_success_message.right = new FormAttachment(100);
- this.lbl_success_message.setLayoutData(fd_lbl_success_message);
- this.lbl_success_message.setAlignment(SWT.CENTER);
-
- FontData[] fD1 = this.lbl_success_message.getFont().getFontData();
- fD1[0].setHeight(Constants.TEXT_SIZE_BIG);
- this.lbl_success_message.setFont(new Font(Display.getCurrent(), fD1[0]));
-
- this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE);
- FormData fd_lnk_saved_file = new FormData();
- fd_lnk_saved_file.top = new FormAttachment(this.lbl_success_message, 10);
- fd_lnk_saved_file.left = new FormAttachment(this.lbl_success_message, 0,
- SWT.CENTER);
- // fd_lnk_saved_file.right = new FormAttachment(100);
- this.lnk_saved_file.setLayoutData(fd_lnk_saved_file);
-
- this.lnk_saved_file.addSelectionListener(new OpenSelectionListener());
-
- FontData[] fD2 = this.lnk_saved_file.getFont().getFontData();
- fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL);
- this.lnk_saved_file.setFont(new Font(Display.getCurrent(), fD2[0]));
-
- this.btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE);
-
- FontData[] fD_btn_save = this.btn_save.getFont().getFontData();
- fD_btn_save[0].setHeight(Constants.TEXT_SIZE_BUTTON);
- this.btn_save.setFont(new Font(Display.getCurrent(), fD_btn_save[0]));
-
- FormData fd_btn_save = new FormData();
- fd_btn_save.top = new FormAttachment(this.lnk_saved_file, 10);
- fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0,
- SWT.CENTER);
- this.btn_save.setLayoutData(fd_btn_save);
-
- this.btn_save.addSelectionListener(new SaveSelectionListener());
- enableSaveButton(false);
-
- reloadResources();
- }
-
- /**
- * @param outputDir
- * the outputDir to set
- */
- public void setOutputDir(String outputDir) {
- this.outputDir = outputDir;
- }
-
- /**
- * @return the outputDir
- */
- public String getOutputDir() {
- return this.outputDir;
- }
-
- /**
- * Sets the input file
- *
- * @param inputFile
- * the input file
- */
- public void setInputFile(File inputFile) {
- this.inputFile = inputFile;
- }
-
- /**
- * Gets the input file
- *
- * @return the input file
- */
- public File getInputFile() {
- return this.inputFile;
- }
-
- /**
- * @param tempDirectory
- */
- public void setTempDir(String tempDirectory) {
- this.tempDirectory = tempDirectory;
- }
-
- /**
- * Gets the signed document
- *
- * @return the signed document
- */
- public DocumentSource getSignedDocument() {
- return this.signedDocument;
- }
-
- /**
- * Sets the signed document
- *
- * @param signedDocument
- * the signed document
- */
- public void setSignedDocument(final DocumentSource signedDocument) {
- this.signedDocument = signedDocument;
- }
-
- /**
- * Return whether the last save was successful
- * @return whether the last save was successful
- */
- public boolean getSaveSuccessful() {
- return !this.saveFailed;
- }
-
- private void enableSaveButton(boolean doEnable)
- {
- this.btn_save.setEnabled(doEnable);
- this.btn_save.setVisible(doEnable);
- }
-
- /**
- * Saves the signed document.
- *
- * If user has a default output directory set, try to save there.
- * If not (or if directory unavailable), ask user for location.
- */
- public void saveDocument() {
- File inputFolder = getInputFile().getAbsoluteFile().getParentFile();
- String fileName = getInputFile().getName();
- String proposedName = getSignedFileName(fileName);
- String outputFileName;
-
- String outputFolder = getOutputDir();
- if (!this.saveFailed && outputFolder != null && !outputFolder.trim().isEmpty()) {
- // Output folder configured, try to save there
-
- File f = new File(outputFolder);
- if (f.isDirectory()) {
- if (!outputFolder.endsWith(File.separator)) {
- outputFolder += File.separator;
- }
- outputFileName = outputFolder + proposedName;
- } else {
- outputFileName = outputFolder;
- }
- } else {
- // Ask user where to save
-
- FileDialog save = new FileDialog(this.getShell(),
- SWT.SAVE | SWT.NATIVE);
- save.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$
- save.setFilterNames(new String[] {
- Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$
- Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$
- save.setFilterPath(inputFolder.getAbsolutePath());
- save.setFileName(proposedName);
-
- outputFileName = save.open();
- inputFolder = null;
- }
- log.debug("Trying to save to '" + outputFileName + "'"); //$NON-NLS-1$ //$NON-NLS-2$
-
- this.outputFile = saveResultAsFile(inputFolder, outputFileName);
- this.saveFailed = (this.outputFile == null);
-
- // If saving failed, enable save button
- enableSaveButton(this.saveFailed);
- reloadResources();
- layout(true);
- }
-
- /**
- * Save the signed document under the given filename
- * @param inputFolder the Folder the original document is located at
- * @param target the filename to save the document as
- *
- * @return saved File (or null if unsuccessful)
- * @throws FileNotFoundException
- * @throws IOException
- */
- private File saveResultAsFile(File inputFolder, String target) {
- if (target == null)
- return null;
-
- File targetFile = new File(target);
- if (!targetFile.isAbsolute())
- targetFile = new File(inputFolder, target);
-
- if (targetFile.exists()) {
- Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //$NON-NLS-1$
- String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //$NON-NLS-1$
- BUTTONS.OK_CANCEL, ICON.QUESTION);
- if (dialog.open() == SWT.CANCEL)
- {
- return null;
- }
- }
-
- DocumentSource source = this.getSignedDocument();
- boolean retry;
-
- do {
- retry = false;
- try {
- FileOutputStream outstream = new FileOutputStream(targetFile);
- outstream.write(source.getByteArray(), 0,
- source.getByteArray().length);
- outstream.close();
- } catch (FileNotFoundException e) {
- log.error("File not found", e); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$
- targetFile.getName(), e.getLocalizedMessage()),
- BUTTONS.RETRY_CANCEL);
- if (dialog.open() == SWT.CANCEL)
- return null;
- retry = true;
- } catch (IOException e) {
- log.error("IO Error", e); //$NON-NLS-1$
- ErrorDialog dialog = new ErrorDialog(getShell(),
- String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$
- targetFile.getName(), e.getLocalizedMessage()),
- BUTTONS.RETRY_CANCEL);
- if (dialog.open() == SWT.CANCEL)
- return null;
- retry = true;
- }
- } while (retry);
-
- if (!targetFile.exists())
- {
- log.error("Tried to save file " + targetFile.getName() + //$NON-NLS-1$
- ", but it doesn't exist"); //$NON-NLS-1$
- return null;
- }
- return targetFile;
- }
-
- /**
- * Get the proposed filename of a signed document for a given input filename
- * @param name input filename
- * @return proposed output filename
- */
- private static String getSignedFileName(String name) {
- name = FilenameUtils.getName(name);
- String extension = FilenameUtils.getExtension(name);
- name = FilenameUtils.removeExtension(name);
- return name + Constants.SIGNED_SUFFIX + FilenameUtils.EXTENSION_SEPARATOR + extension;
- }
-
- /**
- * SelectionListener for save button
- */
- private final class SaveSelectionListener extends SelectionAdapter {
- /**
- * Empty constructor
- */
- public SaveSelectionListener() {
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- OutputComposite.this.saveDocument();
- } catch (Exception ex) {
- log.error("SaveSelectionListener: ", ex); //$NON-NLS-1$
- }
- }
- }
-
- /**
- * Selection Listener for open button
- */
- private final class OpenSelectionListener extends SelectionAdapter {
- /**
- * Empty constructor
- */
- public OpenSelectionListener() {
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- try {
- if (OutputComposite.this.outputFile == null)
- return;
-
- if (!OutputComposite.this.outputFile.exists())
- return;
-
- // Normalize filename
- File f = new File(FilenameUtils.normalize(
- OutputComposite.this.outputFile.getAbsolutePath()));
- log.debug("Trying to open " + f.toString()); //$NON-NLS-1$
- // work around for the case of Linux and Java version 8
- if (isSpecialCase()) {
- reReloadResources(f.toString());
- return;
- }
- else if (Desktop.isDesktopSupported()) {
- Desktop.getDesktop().open(f);
- } else {
- log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$
- Program.launch(f.getAbsolutePath());
- }
- } catch (IOException ex) {
- log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$
- ErrorDialog error = new ErrorDialog(getShell(),
- String.format(Messages.getString("error.FailedToOpenDocument"), //$NON-NLS-1$
- ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL);
- if (error.open() == SWT.RETRY)
- widgetSelected(e);
- }
- }
- }
-
- @Override
- protected void checkSubclass() {
- // Disable the check that prevents subclassing of SWT components
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
- */
- @Override
- public void doLayout() {
- // Nothing to do
- this.layout(true);
- }
-
- /**
- * @return true when linux and java version <= 8
- *
- */
- public boolean isSpecialCase() {
-
- boolean isSCase = false;
- try {
- String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- if (os.contains("linux")) { //$NON-NLS-1$
- String version = System.getProperty("java.version"); //$NON-NLS-1$
- if (version.contains(".")) { //$NON-NLS-1$
- String[] parts = version.split("\\."); //$NON-NLS-1$
- isSCase = Integer.valueOf(parts[0]) <= 8 ? true : false;
- } else {
- isSCase = Integer.valueOf(version) <= 8 ? true : false;
- }
- }
- } catch (Exception e) {
- log.debug("Error: " + e.getMessage()); //$NON-NLS-1$
- isSCase = false;
- }
- return isSCase;
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
- */
- @Override
- public void reloadResources() {
- this.lbl_success_message.setText(Messages
- .getString("output.success_message")); //$NON-NLS-1$
- if (this.outputFile == null) {
- this.lnk_saved_file.setText(Messages
- .getString("output.link_save_message")); //$NON-NLS-1$
- } else {
- this.lnk_saved_file.setText(Messages
- .getString("output.link_open_message")); //$NON-NLS-1$
- }
- this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
- }
-
- /**
- * @param str
- */
- public void reReloadResources(String str) {
- this.lbl_success_message.setText(Messages.getString("output.success_message")); //$NON-NLS-1$
- if (this.outputFile == null) {
- this.lnk_saved_file.setText(Messages
- .getString("output.link_save_message")); //$NON-NLS-1$
- } else {
- String str2 = "File location: " + str; //$NON-NLS-1$
- this.lbl_success_message.setText(str2);
- this.lnk_saved_file.setText(""); //$NON-NLS-1$
- }
- this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
- }
-
-
-
-}
+/*
+ * Copyright 2012 by A-SIT, Secure Information Technology Center Austria
+ *
+ * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by
+ * the European Commission - subsequent versions of the EUPL (the "Licence");
+ * You may not use this work except in compliance with the Licence.
+ * You may obtain a copy of the Licence at:
+ * http://joinup.ec.europa.eu/software/page/eupl
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the Licence is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licence for the specific language governing permissions and
+ * limitations under the Licence.
+ */
+package at.asit.pdfover.gui.composites;
+
+// Imports
+import java.awt.Desktop;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+import org.apache.commons.io.FilenameUtils;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.program.Program;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import at.asit.pdfover.gui.Constants;
+import at.asit.pdfover.gui.controls.Dialog;
+import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
+import at.asit.pdfover.gui.controls.Dialog.ICON;
+import at.asit.pdfover.gui.controls.ErrorDialog;
+import at.asit.pdfover.gui.utils.Messages;
+import at.asit.pdfover.gui.workflow.states.State;
+import at.asit.pdfover.signator.DocumentSource;
+
+/**
+ * GUI component for Output State
+ */
+public class OutputComposite extends StateComposite {
+
+ /**
+ * SLF4J Logger instance
+ **/
+ static final Logger log = LoggerFactory.getLogger(OutputComposite.class);
+
+ private Link lnk_saved_file;
+
+ private Button btn_save;
+
+ private Label lbl_success_message;
+
+ private DocumentSource signedDocument;
+
+ private File inputFile;
+
+ String outputDir = null;
+
+ String tempDirectory = null;
+
+ File outputFile = null;
+
+ private boolean saveFailed = false;
+
+ private String postFix = null;
+
+ /**
+ * Create the composite.
+ *
+ * @param parent
+ * The parent composite
+ * @param style
+ * The swt style
+ * @param state
+ * The owning state
+ */
+ public OutputComposite(Composite parent, int style, State state) {
+ super(parent, style, state);
+
+ this.setLayout(new FormLayout());
+
+ this.lbl_success_message = new Label(this, SWT.NATIVE | SWT.RESIZE);
+ FormData fd_lbl_success_message = new FormData();
+ fd_lbl_success_message.top = new FormAttachment(40, 0);
+ fd_lbl_success_message.left = new FormAttachment(0);
+ fd_lbl_success_message.right = new FormAttachment(100);
+ this.lbl_success_message.setLayoutData(fd_lbl_success_message);
+ this.lbl_success_message.setAlignment(SWT.CENTER);
+
+ FontData[] fD1 = this.lbl_success_message.getFont().getFontData();
+ fD1[0].setHeight(Constants.TEXT_SIZE_BIG);
+ this.lbl_success_message.setFont(new Font(Display.getCurrent(), fD1[0]));
+
+ this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE);
+ FormData fd_lnk_saved_file = new FormData();
+ fd_lnk_saved_file.top = new FormAttachment(this.lbl_success_message, 10);
+ fd_lnk_saved_file.left = new FormAttachment(this.lbl_success_message, 0,
+ SWT.CENTER);
+ // fd_lnk_saved_file.right = new FormAttachment(100);
+ this.lnk_saved_file.setLayoutData(fd_lnk_saved_file);
+
+ this.lnk_saved_file.addSelectionListener(new OpenSelectionListener());
+
+ FontData[] fD2 = this.lnk_saved_file.getFont().getFontData();
+ fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.lnk_saved_file.setFont(new Font(Display.getCurrent(), fD2[0]));
+
+ this.btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE);
+
+ FontData[] fD_btn_save = this.btn_save.getFont().getFontData();
+ fD_btn_save[0].setHeight(Constants.TEXT_SIZE_BUTTON);
+ this.btn_save.setFont(new Font(Display.getCurrent(), fD_btn_save[0]));
+
+ FormData fd_btn_save = new FormData();
+ fd_btn_save.top = new FormAttachment(this.lnk_saved_file, 10);
+ fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0,
+ SWT.CENTER);
+ this.btn_save.setLayoutData(fd_btn_save);
+
+ this.btn_save.addSelectionListener(new SaveSelectionListener());
+ enableSaveButton(false);
+
+ reloadResources();
+ }
+
+ /**
+ * @param outputDir
+ * the outputDir to set
+ */
+ public void setOutputDir(String outputDir) {
+ this.outputDir = outputDir;
+ }
+
+ /**
+ * @return the outputDir
+ */
+ public String getOutputDir() {
+ return this.outputDir;
+ }
+
+ /**
+ * Sets the input file
+ *
+ * @param inputFile
+ * the input file
+ */
+ public void setInputFile(File inputFile) {
+ this.inputFile = inputFile;
+ }
+
+ /**
+ * Gets the input file
+ *
+ * @return the input file
+ */
+ public File getInputFile() {
+ return this.inputFile;
+ }
+
+ /**
+ * @param tempDirectory
+ */
+ public void setTempDir(String tempDirectory) {
+ this.tempDirectory = tempDirectory;
+ }
+
+ /**
+ * Gets the signed document
+ *
+ * @return the signed document
+ */
+ public DocumentSource getSignedDocument() {
+ return this.signedDocument;
+ }
+
+ /**
+ * Sets the signed document
+ *
+ * @param signedDocument
+ * the signed document
+ */
+ public void setSignedDocument(final DocumentSource signedDocument) {
+ this.signedDocument = signedDocument;
+ }
+
+ /**
+ * Return whether the last save was successful
+ * @return whether the last save was successful
+ */
+ public boolean getSaveSuccessful() {
+ return !this.saveFailed;
+ }
+
+ private void enableSaveButton(boolean doEnable)
+ {
+ this.btn_save.setEnabled(doEnable);
+ this.btn_save.setVisible(doEnable);
+ }
+
+ public void setSaveFilePostFix(String postFix){
+ this.postFix = postFix;
+ }
+
+ public String getSaveFilePostFix(){
+ if (this.postFix == null){
+ this.postFix = Constants.DEFAULT_POSTFIX;
+ }
+ return this.postFix;
+ }
+
+ /**
+ * Saves the signed document.
+ *
+ * If user has a default output directory set, try to save there.
+ * If not (or if directory unavailable), ask user for location.
+ */
+ public void saveDocument() {
+ File inputFolder = getInputFile().getAbsoluteFile().getParentFile();
+ String fileName = getInputFile().getName();
+ String proposedName = getSignedFileName(fileName);
+ String outputFileName;
+
+ String outputFolder = getOutputDir();
+ if (!this.saveFailed && outputFolder != null && !outputFolder.trim().isEmpty()) {
+ // Output folder configured, try to save there
+
+ File f = new File(outputFolder);
+ if (f.isDirectory()) {
+ if (!outputFolder.endsWith(File.separator)) {
+ outputFolder += File.separator;
+ }
+ outputFileName = outputFolder + proposedName;
+ } else {
+ outputFileName = outputFolder;
+ }
+ } else {
+ // Ask user where to save
+
+ FileDialog save = new FileDialog(this.getShell(),
+ SWT.SAVE | SWT.NATIVE);
+ save.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$
+ save.setFilterNames(new String[] {
+ Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$
+ Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$
+ save.setFilterPath(inputFolder.getAbsolutePath());
+ save.setFileName(proposedName);
+
+ outputFileName = save.open();
+ inputFolder = null;
+ }
+ log.debug("Trying to save to '" + outputFileName + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ this.outputFile = saveResultAsFile(inputFolder, outputFileName);
+ this.saveFailed = (this.outputFile == null);
+
+ // If saving failed, enable save button
+ enableSaveButton(this.saveFailed);
+ reloadResources();
+ layout(true);
+ }
+
+ /**
+ * Save the signed document under the given filename
+ * @param inputFolder the Folder the original document is located at
+ * @param target the filename to save the document as
+ *
+ * @return saved File (or null if unsuccessful)
+ * @throws FileNotFoundException
+ * @throws IOException
+ */
+ private File saveResultAsFile(File inputFolder, String target) {
+ if (target == null)
+ return null;
+
+ File targetFile = new File(target);
+ if (!targetFile.isAbsolute())
+ targetFile = new File(inputFolder, target);
+
+ if (targetFile.exists()) {
+ Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //$NON-NLS-1$
+ String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //$NON-NLS-1$
+ BUTTONS.OK_CANCEL, ICON.QUESTION);
+ if (dialog.open() == SWT.CANCEL)
+ {
+ return null;
+ }
+ }
+
+ DocumentSource source = this.getSignedDocument();
+ boolean retry;
+
+ do {
+ retry = false;
+ try {
+ FileOutputStream outstream = new FileOutputStream(targetFile);
+ outstream.write(source.getByteArray(), 0,
+ source.getByteArray().length);
+ outstream.close();
+ } catch (FileNotFoundException e) {
+ log.error("File not found", e); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(),
+ String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$
+ targetFile.getName(), e.getLocalizedMessage()),
+ BUTTONS.RETRY_CANCEL);
+ if (dialog.open() == SWT.CANCEL)
+ return null;
+ retry = true;
+ } catch (IOException e) {
+ log.error("IO Error", e); //$NON-NLS-1$
+ ErrorDialog dialog = new ErrorDialog(getShell(),
+ String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$
+ targetFile.getName(), e.getLocalizedMessage()),
+ BUTTONS.RETRY_CANCEL);
+ if (dialog.open() == SWT.CANCEL)
+ return null;
+ retry = true;
+ }
+ } while (retry);
+
+ if (!targetFile.exists())
+ {
+ log.error("Tried to save file " + targetFile.getName() + //$NON-NLS-1$
+ ", but it doesn't exist"); //$NON-NLS-1$
+ return null;
+ }
+ return targetFile;
+ }
+
+ /**
+ * Get the proposed filename of a signed document for a given input filename
+ * @param name input filename
+ * @return proposed output filename
+ */
+ private String getSignedFileName(String name) {
+ name = FilenameUtils.getName(name);
+ String extension = FilenameUtils.getExtension(name);
+ name = FilenameUtils.removeExtension(name);
+ return name + getSaveFilePostFix() + FilenameUtils.EXTENSION_SEPARATOR + extension;
+ }
+
+ /**
+ * SelectionListener for save button
+ */
+ private final class SaveSelectionListener extends SelectionAdapter {
+ /**
+ * Empty constructor
+ */
+ public SaveSelectionListener() {
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ OutputComposite.this.saveDocument();
+ } catch (Exception ex) {
+ log.error("SaveSelectionListener: ", ex); //$NON-NLS-1$
+ }
+ }
+ }
+
+ /**
+ * Selection Listener for open button
+ */
+ private final class OpenSelectionListener extends SelectionAdapter {
+ /**
+ * Empty constructor
+ */
+ public OpenSelectionListener() {
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ try {
+ if (OutputComposite.this.outputFile == null)
+ return;
+
+ if (!OutputComposite.this.outputFile.exists())
+ return;
+
+ // Normalize filename
+ File f = new File(FilenameUtils.normalize(
+ OutputComposite.this.outputFile.getAbsolutePath()));
+ log.debug("Trying to open " + f.toString()); //$NON-NLS-1$
+ // work around for the case of Linux and Java version 8
+ if (isSpecialCase()) {
+ reReloadResources(f.toString());
+ return;
+ }
+ else if (Desktop.isDesktopSupported()) {
+ Desktop.getDesktop().open(f);
+ } else {
+ log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$
+ Program.launch(f.getAbsolutePath());
+ }
+ } catch (IOException ex) {
+ log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$
+ ErrorDialog error = new ErrorDialog(getShell(),
+ String.format(Messages.getString("error.FailedToOpenDocument"), //$NON-NLS-1$
+ ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL);
+ if (error.open() == SWT.RETRY)
+ widgetSelected(e);
+ }
+ }
+ }
+
+ @Override
+ protected void checkSubclass() {
+ // Disable the check that prevents subclassing of SWT components
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.asit.pdfover.gui.composites.StateComposite#doLayout()
+ */
+ @Override
+ public void doLayout() {
+ // Nothing to do
+ this.layout(true);
+ }
+
+ /**
+ * @return true when linux and java version <= 8
+ *
+ */
+ public boolean isSpecialCase() {
+
+ boolean isSCase = false;
+ try {
+ String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
+ if (os.contains("linux")) { //$NON-NLS-1$
+ String version = System.getProperty("java.version"); //$NON-NLS-1$
+ if (version.contains(".")) { //$NON-NLS-1$
+ String[] parts = version.split("\\."); //$NON-NLS-1$
+ isSCase = Integer.valueOf(parts[0]) <= 8 ? true : false;
+ } else {
+ isSCase = Integer.valueOf(version) <= 8 ? true : false;
+ }
+ }
+ } catch (Exception e) {
+ log.debug("Error: " + e.getMessage()); //$NON-NLS-1$
+ isSCase = false;
+ }
+ return isSCase;
+ }
+
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources()
+ */
+ @Override
+ public void reloadResources() {
+ this.lbl_success_message.setText(Messages
+ .getString("output.success_message")); //$NON-NLS-1$
+ if (this.outputFile == null) {
+ this.lnk_saved_file.setText(Messages
+ .getString("output.link_save_message")); //$NON-NLS-1$
+ } else {
+ this.lnk_saved_file.setText(Messages
+ .getString("output.link_open_message")); //$NON-NLS-1$
+ }
+ this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ }
+
+ /**
+ * @param str
+ */
+ public void reReloadResources(String str) {
+ this.lbl_success_message.setText(Messages.getString("output.success_message")); //$NON-NLS-1$
+ if (this.outputFile == null) {
+ this.lnk_saved_file.setText(Messages
+ .getString("output.link_save_message")); //$NON-NLS-1$
+ } else {
+ String str2 = "File location: " + str; //$NON-NLS-1$
+ this.lbl_success_message.setText(str2);
+ this.lnk_saved_file.setText(""); //$NON-NLS-1$
+ }
+ this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$
+ }
+
+
+
+}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index 7f42db8f..22d18f2d 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -310,6 +310,7 @@ public class PositioningComposite extends StateComposite {
if (e.getWheelRotation() < 0) {
if (PositioningComposite.this.currentPage > 1)
+ System.out.println("################## page " + newPage);
newPage--;
} else if (e.getWheelRotation() > 0) {
if (PositioningComposite.this.currentPage < PositioningComposite.this.numPages)
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 e54b4a59..75482b60 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
@@ -22,6 +22,7 @@ import java.util.Locale;
import javax.imageio.ImageIO;
+import at.asit.pdfover.signator.SignaturePosition;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTarget;
@@ -32,11 +33,8 @@ import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
@@ -62,6 +60,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import at.asit.pdfover.gui.Constants;
+import at.asit.pdfover.commons.Profile;
import at.asit.pdfover.gui.controls.Dialog.BUTTONS;
import at.asit.pdfover.gui.controls.ErrorDialog;
import at.asit.pdfover.gui.controls.ErrorMarker;
@@ -90,29 +89,35 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
private Group grpHandySignatur;
private Label lblMobileNumber;
- Text txtMobileNumber;
- FormData fd_txtMobileNumber;
- ErrorMarker txtMobileNumberErrorMarker;
- FormData fd_txtMobileNumberErrorMarker;
+ protected Text txtMobileNumber;
+ protected FormData fd_txtMobileNumber;
+ protected ErrorMarker txtMobileNumberErrorMarker;
+ protected FormData fd_txtMobileNumberErrorMarker;
private Group grpLogo;
private Canvas cLogo;
private Label lblDropLogo;
- Button btnClearImage;
+ protected Button btnClearImage;
private Button btnBrowseLogo;
- Canvas cSigPreview;
+ protected Canvas cSigPreview;
private Group grpSignatureNote;
private Label lblSignatureNote;
- Text txtSignatureNote;
+ protected Text txtSignatureNote;
private Button btnSignatureNoteDefault;
- private Group grpSignatureLang;
- Combo cmbSignatureLang;
+ protected final Group grpSignatureLang;
+ protected final Combo cmbSignatureLang;
- String logoFile;
- Image sigPreview = null;
- Image logo = null;
+ protected String logoFile = null;
+ protected Image sigPreview = null;
+ protected Image logo = null;
+
+ protected final Group grpSignatureProfile;
+ protected final Combo cmbSignatureProfiles;
+
+
+
/**
* @param parent
@@ -181,13 +186,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.txtMobileNumber.setFont(new Font(Display.getCurrent(),
fD_txtMobileNumber[0]));
- this.txtMobileNumber.addTraverseListener(new TraverseListener() {
-
- @Override
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processNumberChanged();
- }
+ this.txtMobileNumber.addTraverseListener(e -> {
+ if (e.detail == SWT.TRAVERSE_RETURN) {
+ processNumberChanged();
}
});
@@ -199,11 +200,62 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
});
+ this.grpSignatureProfile = new Group(this, SWT.NONE);
+ FormData fd_grpSingnatureProfile = new FormData();
+ fd_grpSingnatureProfile.right = new FormAttachment(100, -5);
+ fd_grpSingnatureProfile.left = new FormAttachment(0, 5);
+ fd_grpSingnatureProfile.top = new FormAttachment(this.grpHandySignatur, 5);
+ this.grpSignatureProfile.setLayoutData(fd_grpSingnatureProfile);
+ this.grpSignatureProfile.setText("Signature Profile"); //$NON-NLS-1$
+ this.grpSignatureProfile.setLayout(new FormLayout());
+
+ FontData[] fD_grpSignatureProfile = this.grpSignatureProfile.getFont()
+ .getFontData();
+ fD_grpSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.grpSignatureProfile.setFont(new Font(Display.getCurrent(),
+ fD_grpSignatureProfile[0]));
+
+
+ this.cmbSignatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY);
+
+ FormData fd_cmbSingatureProfiles = new FormData();
+ fd_cmbSingatureProfiles.left = new FormAttachment(0, 10);
+ fd_cmbSingatureProfiles.right = new FormAttachment(100, -10);
+ fd_cmbSingatureProfiles.top = new FormAttachment(0, 10);
+ fd_cmbSingatureProfiles.bottom = new FormAttachment(100, -10);
+ this.cmbSignatureProfiles.setLayoutData(fd_cmbSingatureProfiles);
+
+ FontData[] fD_cmbSignatureProfile = this.cmbSignatureProfiles.getFont()
+ .getFontData();
+ fD_cmbSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL);
+ this.cmbSignatureProfiles.setFont(new Font(Display.getCurrent(),
+ fD_cmbSignatureProfile[0]));
+
+ String[] items = new String[Profile.values().length];
+ int i = 0;
+ for (Profile profile : Profile.values()) {
+ items[i] = Messages.getString("simple_config." + profile.name());
+ i++;
+ }
+
+ this.cmbSignatureProfiles.setItems(items);
+ this.cmbSignatureProfiles.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Profile current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile();
+ Profile selected = Profile.getProfileByIndex(SimpleConfigurationComposite.this.cmbSignatureProfiles
+ .getSelectionIndex());
+ if (!current.equals(selected)) {
+ preformProfileSelectionChanged(selected);
+ }
+ }
+ });
+
this.grpLogo = new Group(this, SWT.NONE);
FormData fd_grpBildmarke = new FormData();
fd_grpBildmarke.left = new FormAttachment(0, 5);
fd_grpBildmarke.right = new FormAttachment(100, -5);
- fd_grpBildmarke.top = new FormAttachment(this.grpHandySignatur, 5);
+ fd_grpBildmarke.top = new FormAttachment(this.grpSignatureProfile, 5);
this.grpLogo.setLayoutData(fd_grpBildmarke);
this.grpLogo.setLayout(new FormLayout());
@@ -230,16 +282,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fd_controlComposite.top = new FormAttachment(0, 20);
fd_controlComposite.bottom = new FormAttachment(100, -20);
controlComposite.setLayoutData(fd_controlComposite);
- controlComposite.addPaintListener(new PaintListener() {
- @Override
- public void paintControl(PaintEvent e) {
- e.gc.setForeground(Constants.DROP_BORDER_COLOR);
- e.gc.setLineWidth(3);
- e.gc.setLineStyle(SWT.LINE_DASH);
- Point size = controlComposite.getSize();
- e.gc.drawRoundRectangle(0, 0, size.x - 2, size.y - 2,
- 10, 10);
- }
+ controlComposite.addPaintListener(e -> {
+ e.gc.setForeground(Constants.DROP_BORDER_COLOR);
+ e.gc.setLineWidth(3);
+ e.gc.setLineStyle(SWT.LINE_DASH);
+ Point size = controlComposite.getSize();
+ e.gc.drawRoundRectangle(0, 0, size.x - 2, size.y - 2,
+ 10, 10);
});
this.cSigPreview = new Canvas(containerComposite, SWT.RESIZE);
@@ -257,19 +306,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fd_cLogo.height = 40;
fd_cLogo.width = 40;
this.cLogo.setLayoutData(fd_cLogo);
- this.cLogo.addPaintListener(new PaintListener() {
- @Override
- public void paintControl(PaintEvent e) {
- imagePaintControl(e, SimpleConfigurationComposite.this.logo);
- }
- });
+ this.cLogo.addPaintListener(e -> imagePaintControl(e, SimpleConfigurationComposite.this.logo));
this.btnClearImage = new Button(controlComposite, SWT.NATIVE);
FormData fd_lbl_drop = new FormData();
fd_lbl_drop.left = new FormAttachment(0, 20);
fd_lbl_drop.right = new FormAttachment(100, -20);
- // fd_lbl_drop.top = new FormAttachment(50, -20);
fd_lbl_drop.bottom = new FormAttachment(this.btnBrowseLogo, -20);
this.lblDropLogo.setLayoutData(fd_lbl_drop);
@@ -281,12 +324,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fd_cSigPreview.bottom = new FormAttachment(100, -20);
this.cSigPreview.setLayoutData(fd_cSigPreview);
- this.cSigPreview.addPaintListener(new PaintListener() {
- @Override
- public void paintControl(PaintEvent e) {
- imagePaintControl(e, SimpleConfigurationComposite.this.sigPreview);
- }
- });
+ this.cSigPreview.addPaintListener(e -> imagePaintControl(e, SimpleConfigurationComposite.this.sigPreview));
FontData[] fD_cSigPreview = this.cSigPreview.getFont().getFontData();
fD_cSigPreview[0].setHeight(Constants.TEXT_SIZE_NORMAL);
@@ -307,7 +345,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
// Only taking first file ...
File file = new File(files[0]);
if (!file.exists()) {
- log.error("File: " + files[0] + " does not exist!"); //$NON-NLS-1$//$NON-NLS-2$
+ log.error("File: {} does not exist!", files[0]); //$NON-NLS-1$//$NON-NLS-2$
return;
}
processEmblemChanged(file.getAbsolutePath());
@@ -418,8 +456,8 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
fD_cmbSignatureLang[0]));
String[] localeSignStrings = new String[Constants.SUPPORTED_LOCALES.length];
- for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) {
- localeSignStrings[i] = Constants.SUPPORTED_LOCALES[i].getDisplayLanguage();
+ for (int idx = 0; idx < Constants.SUPPORTED_LOCALES.length; ++idx) {
+ localeSignStrings[idx] = Constants.SUPPORTED_LOCALES[idx].getDisplayLanguage();
}
this.cmbSignatureLang.setItems(localeSignStrings);
this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() {
@@ -489,12 +527,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
});
- this.txtSignatureNote.addTraverseListener(new TraverseListener() {
- @Override
- public void keyTraversed(TraverseEvent e) {
- if (e.detail == SWT.TRAVERSE_RETURN) {
- processSignatureNoteChanged();
- }
+ this.txtSignatureNote.addTraverseListener(e -> {
+ if (e.detail == SWT.TRAVERSE_RETURN) {
+ processSignatureNoteChanged();
}
});
@@ -577,10 +612,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
if (fileName != null) {
file = new File(fileName);
if (file.exists()) {
- /*
- * SimpleConfigurationComposite.this.txtEmblemFile
- * .setText(fileName);
- */
processEmblemChanged(fileName);
}
}
@@ -593,11 +624,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
private void setEmblemFileInternal(final String filename, boolean force)
throws Exception {
- if (!force) {
- if (this.configurationContainer.getEmblem() != null) {
- if (this.configurationContainer.getEmblem().equals(filename)) {
- return; // Ignore ...
- }
+ if (!force && this.configurationContainer.getEmblem() != null) {
+ if (this.configurationContainer.getEmblem().equals(filename)) {
+ return; // Ignore ...
}
}
@@ -613,8 +642,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
try {
if (this.signer != null) {
- SignatureParameter param = this.signer.getPDFSigner()
- .newParameter();
+ SignatureParameter param = this.signer.getPDFSigner().newParameter();
if(this.configurationContainer.getSignatureNote() != null && !this.configurationContainer.getSignatureNote().isEmpty()) {
param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote()); //$NON-NLS-1$
}
@@ -684,17 +712,17 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
int getLocaleElementIndex(Locale locale) {
for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) {
if (Constants.SUPPORTED_LOCALES[i].equals(locale)) {
- log.debug("Locale: " + locale + " IDX: " + i); //$NON-NLS-1$ //$NON-NLS-2$
+ log.debug("Locale: {} IDX: {}",locale, i); //$NON-NLS-1$ //$NON-NLS-2$
return i;
}
}
- log.warn("NO Locale match for " + locale); //$NON-NLS-1$
+ log.warn("NO Locale match for {}", locale); //$NON-NLS-1$
return 0;
}
void performSignatureLangSelectionChanged(Locale selected, Locale previous) {
- log.debug("Selected Sign Locale: " + selected); //$NON-NLS-1$
+ log.debug("Selected Sign Locale: {}", selected); //$NON-NLS-1$
this.configurationContainer.setSignatureLocale(selected);
this.cmbSignatureLang.select(this.getLocaleElementIndex(selected));
if (previous != null) {
@@ -705,6 +733,27 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
}
}
}
+
+ void preformProfileSelectionChanged(Profile selected) {
+ log.debug("Signature Profile {} was selected", selected.getName()); //$NON-NLS-1$
+ this.configurationContainer.setSignatureProfile(selected);
+ this.cmbSignatureProfiles.select(selected.ordinal());
+
+ if (selected.equals(Profile.AMTSSIGNATURBLOCK) || selected.equals(Profile.INVISIBLE)){
+ this.configurationContainer.setDefaultSignaturePosition(new SignaturePosition());
+ }
+
+ }
+
+ void setSignatureProfileSetting(){
+ try {
+ SignatureParameter param = this.signer.getPDFSigner().newParameter();
+ param.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName());
+
+ } catch (Exception e){
+ log.debug("Cannot save signature profile {}", e.getMessage());
+ }
+ }
/*
* (non-Javadoc)
@@ -715,6 +764,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
@Override
protected void signerChanged() {
this.setVisibleImage();
+ this.setSignatureProfileSetting();
}
/**
@@ -788,7 +838,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
String emblemFile = this.configurationContainer.getEmblem();
if (emblemFile != null && !emblemFile.trim().isEmpty()) {
- // this.txtEmblemFile.setText(emblemFile);
this.logoFile = emblemFile;
try {
setEmblemFileInternal(emblemFile, true);
@@ -811,6 +860,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
this.setVisibleImage();
this.performSignatureLangSelectionChanged(this.configurationContainer.getSignatureLocale(), null);
+
+ this.preformProfileSelectionChanged(this.configurationContainer.getSignatureProfile());
+
}
/* (non-Javadoc)
@@ -826,6 +878,8 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
store.setSignatureLocale(this.configurationContainer.getSignatureLocale());
store.setSignatureNote(this.configurationContainer.getSignatureNote());
+
+ store.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName());
}
/*
@@ -843,8 +897,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite {
// Fall through
case 1:
this.processSignatureNoteChanged();
+ break;
+ default:
+ //Fall through
}
- // this.plainEmblemSetter(this.emblemFile);
}
/*
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
index ad4fa70e..6ce5b176 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
@@ -85,7 +85,7 @@ public class CertificateDownloadSource {
- if (!cp.getProxyHost().equals("")) {
+ if (!cp.getProxyHost().equals("")) { //$NON-NLS-1$
log.info("Found PDF-Over Host settings: "+cp.getProxyHost().toString()); //$NON-NLS-1$
try{
@@ -103,7 +103,7 @@ public class CertificateDownloadSource {
{log.info("Illegal Argument for Proxy and/or Host)");} //$NON-NLS-1$
} else {
- log.info("Opening default connection");
+ log.info("Opening default connection"); //$NON-NLS-1$
connection = url.openConnection();
}
@@ -131,7 +131,7 @@ public class CertificateDownloadSource {
Document doc = dBuilder.newDocument();
// root element
- Node rootElement = doc.createElement("certificates");
+ Node rootElement = doc.createElement("certificates"); //$NON-NLS-1$
doc.appendChild(rootElement);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
@@ -169,7 +169,7 @@ public class CertificateDownloadSource {
Node certificates_added = doc_added.getFirstChild();
NodeList certificates_added_list = certificates_added.getChildNodes();
- log.info("===== Starting to download accepted certificates =====");
+ log.info("===== Starting to download accepted certificates ====="); //$NON-NLS-1$
// identify the certificate that has to be downloaded
for (int i = 0; i < certificates_added_list.getLength(); i++) {
@@ -187,7 +187,7 @@ public class CertificateDownloadSource {
}
URLConnection connection;
- if (!certificateNode.getTextContent().equals("")) {
+ if (!certificateNode.getTextContent().equals("")) { //$NON-NLS-1$
String certResource = Constants.CERTIFICATE_DOWNLOAD_XML_URL
+ certificateNode.getTextContent();
URL url = new URL(certResource);
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java
index 6271656c..c48337e6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java
@@ -38,10 +38,7 @@ public class Messages {
private static final String BUNDLE_NAME = "at.asit.pdfover.gui.messages"; //$NON-NLS-1$
- private static HashMap<Locale, ResourceBundle> bundles = new HashMap<Locale, ResourceBundle>();
-
- //private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- // .getBundle(BUNDLE_NAME);
+ private static HashMap<Locale, ResourceBundle> bundles = new HashMap<>();
private static Locale currentLocale = getDefaultLocale();
@@ -71,17 +68,17 @@ public class Messages {
private static ResourceBundle getBundle(Locale locale) {
if(!bundles.containsKey(locale)) {
- log.debug("Loading resource bundle for " + locale); //$NON-NLS-1$
+ log.debug("Loading resource bundle for {}", locale); //$NON-NLS-1$
ResourceBundle tmp = null;
try {
tmp = ResourceBundle.getBundle(BUNDLE_NAME, locale);
- log.debug("Received bundle for " + tmp.getLocale()); //$NON-NLS-1$
+ log.debug("Received bundle for {}", tmp.getLocale()); //$NON-NLS-1$
} catch(Exception e) {
- log.error("NO RESOURCE BUNDLE FOR " + locale.toString(), e); //$NON-NLS-1$
+ log.error("NO RESOURCE BUNDLE FOR {} {}", locale, e); //$NON-NLS-1$
tmp = ResourceBundle.getBundle(BUNDLE_NAME);
}
if(tmp == null) {
- log.error("NO RESOURCE BUNDLE FOR " + locale.toString()); //$NON-NLS-1$
+ log.error("NO RESOURCE BUNDLE FOR {}", locale); //$NON-NLS-1$
tmp = ResourceBundle.getBundle(BUNDLE_NAME);
}
bundles.put(locale, tmp);
@@ -98,7 +95,6 @@ public class Messages {
public static String getString(String key) {
try {
return getBundle(currentLocale).getString(key);
- //return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
@@ -113,7 +109,6 @@ public class Messages {
public static String getString(String key, Locale locale) {
try {
return getBundle(locale).getString(key);
- //return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
index abed492a..befb244b 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
@@ -197,6 +197,13 @@ public interface ConfigManipulator {
* @return
*/
public boolean getEnablePlaceholderUsage();
+
+ /**
+ * @param profile
+ */
+ public void setSignatureProfile(String profile);
+
+ public void setSaveFilePostFix(String postFix);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
index 44c4a9c9..9b54f4ee 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
@@ -131,4 +131,10 @@ public interface ConfigOverlayManipulator {
* @param configurationFile
*/
public void setConfigurationFile(String configurationFile);
+
+ /**
+ *
+ * @param profile
+ */
+ public void setSignatureProfile(String profile);
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
index 4c674d17..b6935206 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java
@@ -265,4 +265,19 @@ public interface ConfigProvider {
* @return
*/
public boolean getEnablePlaceholderUsage();
+
+ /**
+ * @param profile
+ */
+ public void setSignatureProfile(String profile);
+
+
+ /**
+ * @return
+ */
+ public String getSignatureProfile();
+
+ public String getSaveFilePostFix();
}
+
+
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
index bd149cf7..c3a15cb3 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java
@@ -25,6 +25,7 @@ import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import at.asit.pdfover.commons.Profile;
import org.eclipse.swt.graphics.Point;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -112,11 +113,13 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
// Set Output Folder
setDefaultOutputFolder(config
.getProperty(Constants.CFG_OUTPUT_FOLDER));
-
- // Set Default Certificate Download URL
- // .getProperty(Constants.CFG_DOWNLOAD_URL));
-
-
+
+ String postFix = config.getProperty(Constants.CFG_POSTFIX);
+ if (postFix == null){
+ setSaveFilePostFix(Constants.DEFAULT_POSTFIX);
+ } else {
+ setSaveFilePostFix(postFix);
+ }
String localeString = config.getProperty(Constants.CFG_LOCALE);
@@ -146,6 +149,11 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
setEnablePlaceholderUsage(enablePlaceholder.equalsIgnoreCase(Constants.TRUE));
}
+ String signatureProfile = config.getProperty(Constants.SIGNATURE_PROFILE);
+ if (signatureProfile != null) {
+ this.configuration.setSignatureProfile(Profile.getProfile(signatureProfile));
+ this.configurationOverlay.setSignatureProfile(Profile.getProfile(signatureProfile));
+ }
String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT);
if (compat != null)
@@ -158,14 +166,6 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configuration.setMobileBKUURL(bkuUrl);
}
- /*String downloadURL = config
- .getProperty(Constants.CFG_DOWNLOAD_URL);
-
- if (downloadURL != null && !downloadURL.isEmpty()) {
- this.configuration.setDownloadURL(downloadURL);
- }*/
-
-
String bkuType = config
.getProperty(Constants.CFG_MOBILE_BKU_TYPE);
@@ -358,6 +358,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
props.setProperty(Constants.CFG_SIGNATURE_NOTE, getSignatureNote());
props.setProperty(Constants.CFG_MOBILE_NUMBER, getDefaultMobileNumberPersistent());
props.setProperty(Constants.CFG_OUTPUT_FOLDER, getDefaultOutputFolderPersistent());
+ props.setProperty(Constants.CFG_POSTFIX, getSaveFilePostFix());
props.setProperty(Constants.CFG_SIGNATURE_PLACEHOLDER_TRANSPARENCY,
Integer.toString(getPlaceholderTransparency()));
@@ -434,6 +435,8 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
if (!getUpdateCheck())
props.setProperty(Constants.CFG_UPDATE_CHECK, Constants.FALSE);
+ props.setProperty(Constants.SIGNATURE_PROFILE, getSignatureProfile());
+
FileOutputStream outputstream = new FileOutputStream(configFile, false);
@@ -990,16 +993,6 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
}
}
-
- /*@Override
- public void setDefaultDownloadURL(String downloadURL) {
- if (downloadURL == null || downloadURL.trim().isEmpty()) {
- this.configuration.setDownloadURL(Constants.CERTIFICATE_DOWNLOAD_XML_URL+Constants.CERTIFICATE_XML_FILE);
- } else {
- this.configuration.setDownloadURL(downloadURL);
- }
- }
-
/* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.ConfigOverlayManipulator#setDefaultOutputFolderOverlay(java.lang.String)
*/
@@ -1511,6 +1504,26 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
if (useFields) setUseMarker(false);
}
+ @Override
+ public void setSignatureProfile(String profile) {
+ this.configurationOverlay.setSignatureProfile(Profile.getProfile(profile));
+ }
+
+ @Override
+ public void setSaveFilePostFix(String postFix) {
+ this.configurationOverlay.setSaveFilePostFix(postFix);
+ }
+
+ @Override
+ public String getSaveFilePostFix(){
+ return this.configurationOverlay.getSaveFilePostFix();
+ }
+
+ @Override
+ public String getSignatureProfile() {
+ return this.configurationOverlay.getSignatureProfile().getName();
+ }
+
@Override
public void setEnablePlaceholderUsage(boolean bool) {
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
index d5976b3c..4c634fd6 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java
@@ -17,6 +17,7 @@ package at.asit.pdfover.gui.workflow.config;
import java.util.Locale;
+import at.asit.pdfover.commons.Profile;
import org.eclipse.swt.graphics.Point;
import at.asit.pdfover.gui.bku.mobile.MobileBKUs;
@@ -152,10 +153,6 @@ public interface ConfigurationContainer {
* @return the default BKU
*/
public BKUs getDefaultBKU();
-
-
-
-
/**
* Sets the default BKU
@@ -412,4 +409,21 @@ public interface ConfigurationContainer {
* @return boolean
*/
public boolean getEnablePlaceholderUsage();
+
+
+ /**
+ * @param profile set the selected profile
+ */
+ public void setSignatureProfile(Profile profile);
+
+
+ /**
+ * @return selected signature profile as string
+ */
+ public Profile getSignatureProfile();
+
+
+ public void setSaveFilePostFix(String postFix);
+
+ public String getSaveFilePostFix();
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
index 8269cb0b..47094aa7 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.util.Locale;
+import at.asit.pdfover.commons.Profile;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.Point;
@@ -144,6 +145,11 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/** Either QR-Code or signature fields as marker */
protected boolean useSignatureFields = false;
+
+ /** The Signature Profile */
+ protected Profile signatureProfile = null;
+
+ protected String saveFilePostFix = "_signed";
/* (non-Javadoc)
* @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem()
@@ -723,4 +729,29 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
return this.enabledPlaceholderUsage;
}
+
+ @Override
+ public Profile getSignatureProfile() {
+ if (this.signatureProfile == null) {
+ this.signatureProfile = Profile.SIGNATURBLOCK_SMALL;
+ }
+ return this.signatureProfile;
+ }
+
+ @Override
+ public String getSaveFilePostFix() {
+ return this.saveFilePostFix;
+ }
+
+ @Override
+ public void setSaveFilePostFix(String postfix){
+ this.saveFilePostFix = postfix;
+ }
+
+
+ @Override
+ public void setSignatureProfile(Profile profile) {
+ this.signatureProfile = profile;
+ }
+
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
index e217b3c8..1175ca9a 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
@@ -199,4 +199,12 @@ public interface PersistentConfigProvider {
* @return
*/
public boolean getEnablePlaceholderUsage();
+
+ /***
+ *
+ * @return the signature profile
+ */
+ public String getSignatureProfile();
+
+ public String getSaveFilePostFix();
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
index 7b88f887..3b3c2098 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java
@@ -59,6 +59,7 @@ public class OutputState extends State {
}
this.outputComposite.setOutputDir(config.getDefaultOutputFolder());
+ this.outputComposite.setSaveFilePostFix(config.getSaveFilePostFix());
this.outputComposite.setTempDir(tmpDir.getAbsolutePath());
this.outputComposite.setInputFile(status.getDocument());
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
index f9827ba4..9d17a3e8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java
@@ -166,6 +166,8 @@ public class PrepareSigningState extends State {
this.state.signatureParameter
.setSignaturePdfACompat(configuration.getSignaturePdfACompat());
+ this.state.signatureParameter.setSignatureProfile(configuration.getSignatureProfile());
+
this.state.signingState = this.state.signer
.prepare(this.state.signatureParameter);
@@ -199,7 +201,7 @@ public class PrepareSigningState extends State {
at.asit.pdfover.signator.SigningState signingState = null;
- Signer signer;
+ Signer signer;
Exception threadException = null;
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 cf33c2a2..66cc2986 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
@@ -1,239 +1,245 @@
-#Eclipse messages class
-#Mon Dec 02 13:17:21 CET 2019
-BKU.KS=Keystore
-BKU.LOCAL=Local CCE
-BKU.MOBILE=Mobile CCE
-BKU.NONE=no default
-BKUSelectionComposite.btnMobile.text=MOBILE
-PlaceholderSelectionGui.lblNewLabel.text=New Label
-PlaceholderSelectionGui.shlInfo.text=Info
-TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection
-WaitingForAppComposite.btnCancel.text=Cancel
-WaitingForAppComposite.btnCancel_1.text=Cancel
-WaitingForAppComposite.btnNewButton.text=New Button
-WaitingForAppComposite.btnRequestSms.text=Request SMS
-WaitingForAppComposite.lblNewLabel.text=New Label
-advanced_config.AutoPosition=Automatic positioning
-advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature
-advanced_config.BKUSelection_Title=CC&E Selection
-advanced_config.BKUSelection_ToolTip=Select the default CCE to use during signature
-advanced_config.KeystoreEnabled=Enable keystore signing
-advanced_config.KeystoreEnabled_ToolTip=Enables the possibility to sign with a local keystore
-advanced_config.LocaleSelection_Title=Interface &language selection
-advanced_config.LocaleSelection_ToolTip=Select the interface language for PDF-Over
-advanced_config.OutputFolder=Default output folder\:
-advanced_config.OutputFolder.Dialog=Select a folder
-advanced_config.OutputFolder.Dialog_Title=Select Output folder
-advanced_config.OutputFolder_Title=&Output location
-advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory)
-advanced_config.PdfACompat=PDF/A compatibility
-advanced_config.PdfACompat_ToolTip=Whether to make signature PDF/A compatible (increases pdf size)
-advanced_config.ProxyHost=Host\:
-advanced_config.ProxyHost_Template=Hostname or IP of the proxy server
-advanced_config.ProxyHost_ToolTip=To use a proxy server enter the hostname or the IP here
-advanced_config.ProxyPass=Password\:
-advanced_config.ProxyPass_Template=Password for proxy authentication
-advanced_config.ProxyPass_ToolTip=To use proxy authentication enter password here
-advanced_config.ProxyPort=Port\:
-advanced_config.ProxyPort_Template=Port of the proxy server [1-65535]
-advanced_config.ProxyPort_ToolTip=To use a proxy server enter the port number here
-advanced_config.ProxyUser=Username\:
-advanced_config.ProxyUser_Template=Username for proxy authentication
-advanced_config.ProxyUser_ToolTip=To use proxy authentication enter username here
-advanced_config.Proxy_Title=&Proxy
-advanced_config.SigPHTransparency=Signature placeholder transparency
-advanced_config.SigPHTransparencyMax=Opaque
-advanced_config.SigPHTransparencyMin=Invisible
-advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step
-advanced_config.Signature_Title=Si&gnature
-advanced_config.Placeholder_Title=Placeholder
-advanced_config.Placeholder_Enabled=Enable placeholder search
-advanced_config.UpdateCheck=Automatically check for updates
-advanced_config.UpdateCheck_Title=Updates
-advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available
-advanced_config.UseMarker=Search for QR-Code signature markers
-advanced_config.UseMarker_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker.
-advanced_config.UseSignatureFields=Search for signature fields
-advanced_config.UseSignatureFields_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker.
-argument.error.output=is not a directory
-argument.help.autopos=Enables automatic signature positioning
-argument.help.bku=Select the CCE to use. Possible values are\: LOCAL, MOBILE, KS. Example\: -b MOBILE
-argument.help.config=Defines which configuration file to use. Example\: -c <config file>
-argument.help.emblem=Sets the signature logo file to use for the signature. Example\: -e <emblem file>
-argument.help.help=Shows this help message
-argument.help.input=Sets the document to sign. Example\: -i <input document>
-argument.help.keystorealias=Sets the keystore key alias. Example \: -ksalias <alias>
-argument.help.keystorefile=Sets the keystore file. Example \: -ks <keystore file>
-argument.help.keystorekeypass=Sets the keystore password. Example \: -kspass <password>
-argument.help.keystorestorepass=Sets the keystore key password. Example \: -kskeypass <password>
-argument.help.keystoretype=Sets the keystore type. Example \: -kstype [PKCS12|JKS|JCEKS]
-argument.help.number=Sets the telephone number to use for mobile CCE. Example\: -n <number>
-argument.help.output=Sets the output folder or file to use. Example\: -o <folder>
-argument.help.password=Sets the password to use for mobile CCE. Example\: -p <password>
-argument.help.proxyhost=Sets the proxy host to use. Example\: -proxy <hostname/IP>
-argument.help.proxypass=Sets the proxy password to use. Example\: -proxypass <password>
-argument.help.proxyport=Sets the proxy port to use. Example\: -proxyport <port>
-argument.help.proxyuser=Sets the proxy username to use. Example\: -proxyuser <username>
-argument.help.skipfinish=Enables skipping of the "Finish" dialog (if successfully saved)
-argument.help.vis=Sets the visibility of a signature. Example\: -v "true"
-argument.info.help=The following options are available\:
-argument.invalid.bku=CCE argument invalid\! Usage\:
-argument.invalid.config=Configuration file argument invalid\! Usage\:
-argument.invalid.emblem=Signature logo argument invalid\! Usage\:
-argument.invalid.input=Document to sign argument invalid\! Usage\:
-argument.invalid.keystorealias=Keystore alias invalid\! Usage\:
-argument.invalid.keystorefile=Keystore file invalid\! Usage\:
-argument.invalid.keystorekeypass=Keystore key password invalid\! Usage\:
-argument.invalid.keystorestorepass=Keystore password invalid\! Usage\:
-argument.invalid.keystoretype=Keystore type invalid\! Usage\:
-argument.invalid.number=Phone number argument invalid\! Usage\:
-argument.invalid.output=Output folder argument invalid\! Usage\:
-argument.invalid.password=Mobile CCE password invalid\! Usage\:
-argument.invalid.proxyhost=Proxy host argument invalid\! Usage\:
-argument.invalid.proxypass=Proxy password argument invalid\! Usage\:
-argument.invalid.proxyport=Proxy port argument invalid\! Usage\:
-argument.invalid.proxyuser=Proxy username argument invalid\! Usage\:
-argument.invalid.vis=Profile Visbility argument invalid\! Usage\:
-bku_selection.card=&Card
-bku_selection.ks=&Keystore
-bku_selection.mobile=&Mobile
-common.AllExtension_Description=All files
-common.Cancel=C&ancel
-common.GIFExtension_Description=GIF files
-common.ImageExtension_Description=All supported image files
-common.JPGExtension_Description=JPG files
-common.KSExtension_Description=Java keystore files
-common.KeystoreExtension_Description=Keystore files
-common.Ok=O&K
-common.PDFExtension_Description=PDF documents
-common.PKCS12Extension_Description=PKCS12 keystore files
-common.PNGExtension_Description=PNG files
-common.Save=&Save
-common.browse=&Browse
-common.info=Information
-common.open=Open
-common.warning=Warning
-config.About=A&bout %s
-config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at <a>http\://demo.a-sit.at/lizenzbedingungen/</a>.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software.
-config.Advanced=Ad&vanced
-config.Keystore=&Keystore
-config.Simple=Basi&c
-dataSourceSelection.DropLabel=Drag document here
-dataSourceSelection.DropLabel2=or...
-dataSourceSelection.browse=&Browse for PDF on your computer
-dataSourceSelection.usePlaceholderText=A marker has been found where the creator of the document wants you to put your signature. Do you want to use it?
-dataSourceSelection.usePlaceholderTitle=Info
-error.ATrustConnection=Connection to A-Trust could not be established
-error.CmdLineArgs=Error parsing the command-line arguments\:
-error.Details=Details
-error.EnteredReferenceValue=You entered the reference value\!
-error.FailedToGetSignedDocument=Failed to get signed document.
-error.FailedToLoadEmblem=Failed to load the signature logo
-error.FailedToLoadQRCode=Failed to load the QR code
-error.FailedToOpenDocument=Failed to open signed document\: %s.
-error.FailedToSaveSettings=Failed to save configuration file\!
-error.FileNotExist=File %s does not exist\!
-error.IOError=Input/Output Error
-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.KeyStore=Error loading they keystore. Wrong password?
-error.KeyStoreAliasExist=Key alias %s not found in keystore
-error.KeyStoreAliasNoKey=Alias %s is not a key
-error.KeyStoreFileNotExist=Keystore file %s does not exist\!
-error.KeyStoreKeyPass=Key password invalid
-error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at
-error.MayNotBeAPDF=This may not be a PDF file
-error.NoTan=No TAN entered
-error.PDFProtected=This PDF file is encrypted and can therefore not be signed
-error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed
-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.SWTLib=Error loading SWT library
-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.TanTooLong=Entered TAN too long
-error.Title=Error
-error.TitleFatal=Fatal Error
-error.Unexpected=Unexpected Error
-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\!
-exception.PasswordTooShort=Given password is too short\!
-exception.PathNotDirectory=Path %s does not denote a directory\!
-exception.PathNotExist=Path %s does not exist\!
-keystore.KeystoreKeyPassEntry=Please enter key password\:
-keystore.KeystoreStorePassEntry=Please enter keystore password\:
-keystore_config.KeystoreAlias=Key alias
-keystore_config.KeystoreFile=Keystore file
-keystore_config.KeystoreFile.Dialog=Choose the keystore
-keystore_config.KeystoreFile.Dialog_Title=Keystore selection
-keystore_config.KeystoreFile_ToolTip=Path to the keystore file
-keystore_config.KeystoreKeyPass=Key password
-keystore_config.KeystoreKeyPass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing.
-keystore_config.KeystoreStorePass=Keystore password
-keystore_config.KeystoreStorePass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing.
-keystore_config.KeystoreType=Keystore type
-keystore_config.KeystoreType_JKS=Java keystore
-keystore_config.KeystoreType_PKCS12=PKCS12
-keystore_config.Keystore_Title=Keystore
-keystore_config.Load=Load keystore
-keystore_config.Load_ToolTip=Load keystore to show available key aliases
-main.about=About %s
-main.configuration=Configuration
-main.done=Finish
-main.hide=Hide %s
-main.position=Positioning
-main.quit=Quit %s
-main.signature=Signing
-mobileBKU.aTrustDisclaimer=This service is provided by A-Trust
-mobileBKU.certExpiresSoon=Since the validity of your certificate expires in the next few days, a new activation is necessary (free of charge). Press "Yes" to visit https\://www.handy-signatur.at/ now, and then sign in to your account.
-mobileBKU.notice=Notice from server\:
-mobileBKU.number=Number\:
-mobileBKU.password=Password\:
-mobileBKU.show=<a>Show signature data</a>
-mobileBKU.show_tooltip=Shows the data to be signed
-mobileBKU.tan_tries_exceeded=TAN tries exceeded, request a new TAN?
-mobileBKU.wrong_tan=TAN not accepted
-output.file_ask_overwrite=File %s already exists, do you want to overwrite it?
-output.link_open_message=You can open the signed file <a>here</a>.
-output.link_save_message=You can save the signed file
-output.save_failed=Saving file %s failed\: %s
-output.success_message=Signature was successful
-positioning.newPage=Create &new Page
-positioning.page=Page %d of %d
-positioning.placeholder=Please select the signature placeholder\nfrom the drop down list
-positioning.removeNewPage=Undo &new Page
-positioning.sign=&Sign
-positioning.signature=Signature
-simple_config.ClearEmblem=Clea&r
-simple_config.EmblemEmpty=Drag and Drop an image here\nor use the browse button \nto select a signature logo.
-simple_config.Emblem_Title=Signature &logo
-simple_config.ExampleNumber=+43676123456789
-simple_config.ExampleNumber_ToolTip=To use a default mobile phone number enter it here
-simple_config.MobileBKU_Title=&Mobile signature
-simple_config.Note=Text\:
-simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art.\u00A025 para.\u00A02 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature.
-simple_config.Note_Default_Old=This document is signed with a qualified electronic signature. According to \u00A7\u00A04 art.\u00A01 of the Signature Act it in principle is legally equivalent to a handwritten signature.
-simple_config.Note_SetDefault=Restore default
-simple_config.Note_Title=Signature &Note
-simple_config.Note_Tooltip=Add an optional note to display on your Signature
-simple_config.PhoneNumber=Mobile number\:
-simple_config.SigBlockLang_Title=Signature block lan&guage\:
-simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document
-tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature.
-tanEnter.QR=QR code\:
-tanEnter.ReferenceValue=Reference value\:
-tanEnter.SMS=Request &SMS
-tanEnter.TAN=TAN\:
-tanEnter.tries=%d tries left\!
-tanEnter.try=Only 1 try left\!
-version_check.UpdateText=Version %s is available.\nOpen download page now?
-version_check.UpdateTitle=New version available\!
-waiting.message=Signature creation in progress...
-waiting_for_app.message=Please open Signature-App\!
+#Eclipse messages class
+#Thu Nov 19 14:06:37 CET 2020
+AdvancedConfigurationComposite.lblSaveFilePostFix.text=Save File Postfix\:
+BKU.KS=Keystore
+BKU.LOCAL=Local CCE
+BKU.MOBILE=Mobile CCE
+BKU.NONE=no default
+BKUSelectionComposite.btnMobile.text=MOBILE
+PlaceholderSelectionGui.lblNewLabel.text=New Label
+PlaceholderSelectionGui.shlInfo.text=Info
+TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection
+WaitingForAppComposite.btnCancel.text=Cancel
+WaitingForAppComposite.btnCancel_1.text=Cancel
+WaitingForAppComposite.btnNewButton.text=New Button
+WaitingForAppComposite.btnRequestSms.text=Request SMS
+WaitingForAppComposite.lblNewLabel.text=New Label
+advanced_config.AutoPosition=Automatic positioning
+advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature
+advanced_config.BKUSelection_Title=CC&E Selection
+advanced_config.BKUSelection_ToolTip=Select the default CCE to use during signature
+advanced_config.KeystoreEnabled=Enable keystore signing
+advanced_config.KeystoreEnabled_ToolTip=Enables the possibility to sign with a local keystore
+advanced_config.LocaleSelection_Title=Interface &language selection
+advanced_config.LocaleSelection_ToolTip=Select the interface language for PDF-Over
+advanced_config.OutputFolder=Default output folder\:
+advanced_config.OutputFolder.Dialog=Select a folder
+advanced_config.OutputFolder.Dialog_Title=Select Output folder
+advanced_config.OutputFolder_Title=&Output location
+advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory)
+advanced_config.PdfACompat=PDF/A compatibility
+advanced_config.PdfACompat_ToolTip=Whether to make signature PDF/A compatible (increases pdf size)
+advanced_config.Placeholder_Enabled=Enable placeholder search
+advanced_config.Placeholder_Title=Placeholder
+advanced_config.ProxyHost=Host\:
+advanced_config.ProxyHost_Template=Hostname or IP of the proxy server
+advanced_config.ProxyHost_ToolTip=To use a proxy server enter the hostname or the IP here
+advanced_config.ProxyPass=Password\:
+advanced_config.ProxyPass_Template=Password for proxy authentication
+advanced_config.ProxyPass_ToolTip=To use proxy authentication enter password here
+advanced_config.ProxyPort=Port\:
+advanced_config.ProxyPort_Template=Port of the proxy server [1-65535]
+advanced_config.ProxyPort_ToolTip=To use a proxy server enter the port number here
+advanced_config.ProxyUser=Username\:
+advanced_config.ProxyUser_Template=Username for proxy authentication
+advanced_config.ProxyUser_ToolTip=To use proxy authentication enter username here
+advanced_config.Proxy_Title=&Proxy
+advanced_config.SigPHTransparency=Signature placeholder transparency
+advanced_config.SigPHTransparencyMax=Opaque
+advanced_config.SigPHTransparencyMin=Invisible
+advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step
+advanced_config.Signature_Title=Si&gnature
+advanced_config.UpdateCheck=Automatically check for updates
+advanced_config.UpdateCheck_Title=Updates
+advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available
+advanced_config.UseMarker=Search for QR-Code signature markers
+advanced_config.UseMarker_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker.
+advanced_config.UseSignatureFields=Search for signature fields
+advanced_config.UseSignatureFields_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker.
+argument.error.output=is not a directory
+argument.help.autopos=Enables automatic signature positioning
+argument.help.bku=Select the CCE to use. Possible values are\: LOCAL, MOBILE, KS. Example\: -b MOBILE
+argument.help.config=Defines which configuration file to use. Example\: -c <config file>
+argument.help.emblem=Sets the signature logo file to use for the signature. Example\: -e <emblem file>
+argument.help.help=Shows this help message
+argument.help.input=Sets the document to sign. Example\: -i <input document>
+argument.help.keystorealias=Sets the keystore key alias. Example \: -ksalias <alias>
+argument.help.keystorefile=Sets the keystore file. Example \: -ks <keystore file>
+argument.help.keystorekeypass=Sets the keystore password. Example \: -kspass <password>
+argument.help.keystorestorepass=Sets the keystore key password. Example \: -kskeypass <password>
+argument.help.keystoretype=Sets the keystore type. Example \: -kstype [PKCS12|JKS|JCEKS]
+argument.help.number=Sets the telephone number to use for mobile CCE. Example\: -n <number>
+argument.help.output=Sets the output folder or file to use. Example\: -o <folder>
+argument.help.password=Sets the password to use for mobile CCE. Example\: -p <password>
+argument.help.proxyhost=Sets the proxy host to use. Example\: -proxy <hostname/IP>
+argument.help.proxypass=Sets the proxy password to use. Example\: -proxypass <password>
+argument.help.proxyport=Sets the proxy port to use. Example\: -proxyport <port>
+argument.help.proxyuser=Sets the proxy username to use. Example\: -proxyuser <username>
+argument.help.skipfinish=Enables skipping of the "Finish" dialog (if successfully saved)
+argument.help.vis=Sets the visibility of a signature. Example\: -v "true"
+argument.info.help=The following options are available\:
+argument.invalid.bku=CCE argument invalid\! Usage\:
+argument.invalid.config=Configuration file argument invalid\! Usage\:
+argument.invalid.emblem=Signature logo argument invalid\! Usage\:
+argument.invalid.input=Document to sign argument invalid\! Usage\:
+argument.invalid.keystorealias=Keystore alias invalid\! Usage\:
+argument.invalid.keystorefile=Keystore file invalid\! Usage\:
+argument.invalid.keystorekeypass=Keystore key password invalid\! Usage\:
+argument.invalid.keystorestorepass=Keystore password invalid\! Usage\:
+argument.invalid.keystoretype=Keystore type invalid\! Usage\:
+argument.invalid.number=Phone number argument invalid\! Usage\:
+argument.invalid.output=Output folder argument invalid\! Usage\:
+argument.invalid.password=Mobile CCE password invalid\! Usage\:
+argument.invalid.proxyhost=Proxy host argument invalid\! Usage\:
+argument.invalid.proxypass=Proxy password argument invalid\! Usage\:
+argument.invalid.proxyport=Proxy port argument invalid\! Usage\:
+argument.invalid.proxyuser=Proxy username argument invalid\! Usage\:
+argument.invalid.vis=Profile Visbility argument invalid\! Usage\:
+bku_selection.card=&Card
+bku_selection.ks=&Keystore
+bku_selection.mobile=&Mobile
+common.AllExtension_Description=All files
+common.Cancel=C&ancel
+common.GIFExtension_Description=GIF files
+common.ImageExtension_Description=All supported image files
+common.JPGExtension_Description=JPG files
+common.KSExtension_Description=Java keystore files
+common.KeystoreExtension_Description=Keystore files
+common.Ok=O&K
+common.PDFExtension_Description=PDF documents
+common.PKCS12Extension_Description=PKCS12 keystore files
+common.PNGExtension_Description=PNG files
+common.Save=&Save
+common.browse=&Browse
+common.info=Information
+common.open=Open
+common.warning=Warning
+config.About=A&bout %s
+config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at <a>https\://technology.a-sit.at/en/terms-of-a-license/</a>.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software.
+config.LicenseURL=https://technology.a-sit.at/en/terms-of-a-license/
+config.Advanced=Ad&vanced
+config.Keystore=&Keystore
+config.Simple=Basi&c
+dataSourceSelection.DropLabel=Drag document here
+dataSourceSelection.DropLabel2=or...
+dataSourceSelection.browse=&Browse for PDF on your computer
+dataSourceSelection.usePlaceholderText=A marker has been found where the creator of the document wants you to put your signature. Do you want to use it?
+dataSourceSelection.usePlaceholderTitle=Info
+error.ATrustConnection=Connection to A-Trust could not be established
+error.CmdLineArgs=Error parsing the command-line arguments\:
+error.Details=Details
+error.EnteredReferenceValue=You entered the reference value\!
+error.FailedToGetSignedDocument=Failed to get signed document.
+error.FailedToLoadEmblem=Failed to load the signature logo
+error.FailedToLoadQRCode=Failed to load the QR code
+error.FailedToOpenDocument=Failed to open signed document\: %s.
+error.FailedToSaveSettings=Failed to save configuration file\!
+error.FileNotExist=File %s does not exist\!
+error.IOError=Input/Output Error
+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.KeyStore=Error loading they keystore. Wrong password?
+error.KeyStoreAliasExist=Key alias %s not found in keystore
+error.KeyStoreAliasNoKey=Alias %s is not a key
+error.KeyStoreFileNotExist=Keystore file %s does not exist\!
+error.KeyStoreKeyPass=Key password invalid
+error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at
+error.MayNotBeAPDF=This may not be a PDF file
+error.NoTan=No TAN entered
+error.PDFProtected=This PDF file is encrypted and can therefore not be signed
+error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed
+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.SWTLib=Error loading SWT library
+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.TanTooLong=Entered TAN too long
+error.Title=Error
+error.TitleFatal=Fatal Error
+error.Unexpected=Unexpected Error
+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\!
+exception.PasswordTooShort=Given password is too short\!
+exception.PathNotDirectory=Path %s does not denote a directory\!
+exception.PathNotExist=Path %s does not exist\!
+keystore.KeystoreKeyPassEntry=Please enter key password\:
+keystore.KeystoreStorePassEntry=Please enter keystore password\:
+keystore_config.KeystoreAlias=Key alias
+keystore_config.KeystoreFile=Keystore file
+keystore_config.KeystoreFile.Dialog=Choose the keystore
+keystore_config.KeystoreFile.Dialog_Title=Keystore selection
+keystore_config.KeystoreFile_ToolTip=Path to the keystore file
+keystore_config.KeystoreKeyPass=Key password
+keystore_config.KeystoreKeyPass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing.
+keystore_config.KeystoreStorePass=Keystore password
+keystore_config.KeystoreStorePass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing.
+keystore_config.KeystoreType=Keystore type
+keystore_config.KeystoreType_JKS=Java keystore
+keystore_config.KeystoreType_PKCS12=PKCS12
+keystore_config.Keystore_Title=Keystore
+keystore_config.Load=Load keystore
+keystore_config.Load_ToolTip=Load keystore to show available key aliases
+main.about=About %s
+main.configuration=Configuration
+main.done=Finish
+main.hide=Hide %s
+main.position=Positioning
+main.quit=Quit %s
+main.signature=Signing
+mobileBKU.aTrustDisclaimer=This service is provided by A-Trust
+mobileBKU.certExpiresSoon=Since the validity of your certificate expires in the next few days, a new activation is necessary (free of charge). Press "Yes" to visit https\://www.handy-signatur.at/ now, and then sign in to your account.
+mobileBKU.notice=Notice from server\:
+mobileBKU.number=Number\:
+mobileBKU.password=Password\:
+mobileBKU.show=<a>Show signature data</a>
+mobileBKU.show_tooltip=Shows the data to be signed
+mobileBKU.tan_tries_exceeded=TAN tries exceeded, request a new TAN?
+mobileBKU.wrong_tan=TAN not accepted
+output.file_ask_overwrite=File %s already exists, do you want to overwrite it?
+output.link_open_message=You can open the signed file <a>here</a>.
+output.link_save_message=You can save the signed file
+output.save_failed=Saving file %s failed\: %s
+output.success_message=Signature was successful
+positioning.newPage=Create &new Page
+positioning.page=Page %d of %d
+positioning.placeholder=Please select the signature placeholder\nfrom the drop down list
+positioning.removeNewPage=Undo &new Page
+positioning.sign=&Sign
+positioning.signature=Signature
+simple_config.AMTSSIGNATURBLOCK=Official Signature
+simple_config.BASE_LOGO=Logo Only
+simple_config.ClearEmblem=Clea&r
+simple_config.EmblemEmpty=Drag and Drop an image here\nor use the browse button \nto select a signature logo.
+simple_config.Emblem_Title=Signature &logo
+simple_config.ExampleNumber=+43676123456789
+simple_config.ExampleNumber_ToolTip=To use a default mobile phone number enter it here
+simple_config.INVISIBLE=Invisible Signature
+simple_config.MobileBKU_Title=&Mobile signature
+simple_config.Note=Text\:
+simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art.\u00A025 para.\u00A02 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature.
+simple_config.Note_Default_Old=This document is signed with a qualified electronic signature. According to \u00A7\u00A04 art.\u00A01 of the Signature Act it in principle is legally equivalent to a handwritten signature.
+simple_config.Note_SetDefault=Restore default
+simple_config.Note_Title=Signature &Note
+simple_config.Note_Tooltip=Add an optional note to display on your Signature
+simple_config.PhoneNumber=Mobile number\:
+simple_config.SIGNATURBLOCK_SMALL=Standard Signature Block
+simple_config.SigBlockLang_Title=Signature block lan&guage\:
+simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document
+tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature.
+tanEnter.QR=QR code\:
+tanEnter.ReferenceValue=Reference value\:
+tanEnter.SMS=Request &SMS
+tanEnter.TAN=TAN\:
+tanEnter.tries=%d tries left\!
+tanEnter.try=Only 1 try left\!
+version_check.UpdateText=Version %s is available.\nOpen download page now?
+version_check.UpdateTitle=New version available\!
+waiting.message=Signature creation in progress...
+waiting_for_app.message=Please open Signature-App\!
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 d8dc0c42..5cc55387 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
@@ -1,231 +1,237 @@
-#Eclipse messages class
-#Fri Jun 26 18:01:09 CEST 2015
-BKU.KS=Keystore
-BKU.LOCAL=Lokale BKU
-BKU.MOBILE=Handy-BKU
-BKU.NONE=Keine Voreinstellung
-BKUSelectionComposite.btnMobile.text=Handy
-TrustedSocketFactory.FailedToCreateSecureConnection=Konnte keine sichere Verbindung erstellen
-advanced_config.AutoPosition=Automatische Positionierung
-advanced_config.AutoPosition_ToolTip=Aktivieren Sie diese Option, um die Signatur automatisch zu positionieren
-advanced_config.BKUSelection_Title=&BKU-Auswahl
-advanced_config.BKUSelection_ToolTip=W\u00E4hlen Sie die BKU, mit der die Signatur durchgef\u00FChrt werden soll
-advanced_config.KeystoreEnabled=Keystore-Signatur aktivieren
-advanced_config.KeystoreEnabled_ToolTip=Aktiviert die M\u00F6glichkeit, mit einem lokalen Keystore zu signieren
-advanced_config.LocaleSelection_Title=S&prachauswahl
-advanced_config.LocaleSelection_ToolTip=W\u00E4hlen Sie die Sprache f\u00FCr das Benutzerinterface
-advanced_config.OutputFolder=Standard-Ausgabeordner\:
-advanced_config.OutputFolder.Dialog=W\u00E4hlen Sie einen Ordner
-advanced_config.OutputFolder.Dialog_Title=Ausgabeordner w\u00E4hlen
-advanced_config.OutputFolder_Title=Ausgabe&ort
-advanced_config.OutputFolder_ToolTip=W\u00E4hlen Sie einen Ordner, in dem signierte Dokumente automatisch abgelegt werden (deaktivert, wenn das Feld leer ist; ein einzelner Punkt (".") w\u00E4hlt das Verzeichnis des Ursprungsdokuments)
-advanced_config.PdfACompat=PDF/A-Kompatibilit\u00E4t
-advanced_config.PdfACompat_ToolTip=Ob die Signatur PDF/A-kompatibel sein soll (erh\u00F6ht PDF-Gr\u00F6\u00DFe)
-advanced_config.ProxyHost=Host\:
-advanced_config.ProxyHost_Template=Hostname oder IP des Proxy-Servers
-advanced_config.ProxyHost_ToolTip=Um einen Proxy zu verwenden Hostname/IP hier eingeben
-advanced_config.ProxyPass=Passwort\:
-advanced_config.ProxyPass_Template=Passwort f\u00FCr den Proxy-Server
-advanced_config.ProxyPass_ToolTip=F\u00FCr Proxy-Authentifizierung Passwort hier eingeben
-advanced_config.ProxyPort=Port\:
-advanced_config.ProxyPort_Template=Port des Proxy-Servers [1-65535]
-advanced_config.ProxyPort_ToolTip=Um einen Proxy zu verwenden Portnummer hier eingeben
-advanced_config.ProxyUser=Benutzer\:
-advanced_config.ProxyUser_Template=Benutzername f\u00FCr den Proxy-Server
-advanced_config.ProxyUser_ToolTip=F\u00FCr Proxy-Authentifizierung Benutzername hier eingeben
-advanced_config.Proxy_Title=&Proxy
-advanced_config.SigPHTransparency=Signaturplatzhalter-Transparenz
-advanced_config.SigPHTransparencyMax=Undurchsichtig
-advanced_config.SigPHTransparencyMin=Unsichtbar
-advanced_config.SigPHTransparencyTooltip=W\u00E4hlt die Transparenz des Signaturplatzhalters im Schritt "Positionierung"
-advanced_config.Signature_Title=Si&gnatur
-advanced_config.Placeholder_Title=Platzhalter
-advanced_config.Placeholder_Enabled=Platzhalter Suche aktivieren
-advanced_config.UpdateCheck=Automatisch auf Updates \u00FCberpr\u00FCfen
-advanced_config.UpdateCheck_Title=Updates
-advanced_config.UpdateCheck_ToolTip=Zeigt eine Benachrichtigung, wenn eine neue Version verf\u00FCgbar ist
-advanced_config.UseMarker=Nach QR-Code Signaturplatzhaltern suchen
-advanced_config.UseMarker_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen.
-advanced_config.UseSignatureFields=Nach Signaturfelder-Platzhaltern suchen
-advanced_config.UseSignatureFields_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen.
-argument.error.output=ist kein Ordner
-argument.help.autopos=Aktiviert automatische Positionierung der Signatur
-argument.help.bku=W\u00E4hlen Sie die BKU. G\u00FCltige Werte\: LOCAL, MOBILE, KS. Bsp.\: -b MOBILE
-argument.help.config=Auswahl der Konfigurationsdatei. Bsp.\: -c <Dateiname>
-argument.help.emblem=W\u00E4hlt die Bildmarke f\u00FCr die Signatur. Bsp.\: -e <Dateiname>
-argument.help.help=Zeigt diese Hilfe an
-argument.help.input=W\u00E4hlt das zu signierende Dokument. Bsp.\: -i <Dateiname>
-argument.help.keystorealias=W\u00E4hlt das Keystore Key-Alias. Bsp.\: -ksalias <Alias>
-argument.help.keystorefile=W\u00E4hlt die Keystore-Datei. Bsp.\: -ks <Dateiname>
-argument.help.keystorekeypass=W\u00E4hlt das Keystore Key-Password. Bsp.\: -kskeypass <Passwort>
-argument.help.keystorestorepass=W\u00E4hlt das Keystore-Password. Bsp.\: -kspass <Passwort>
-argument.help.keystoretype=W\u00E4hlt den Keystore-Typ. Bsp.\: -kstype [PKCS12|JKS|JCEKS]
-argument.help.number=W\u00E4hlt die Telefonnummer f\u00FCr die Handy-BKU. Bsp.\: -n <Nummer>
-argument.help.output=W\u00E4hlt den Ausgabeordner oder die Ausgabedatei. Bsp.\: -o <Ordner>
-argument.help.password=W\u00E4hlt das Passwort f\u00FCr die Handy-BKU. Bsp.\: -p <Passwort>
-argument.help.proxyhost=W\u00E4hlt den Proxy-Server. Bsp.\: -proxy <Hostname/IP>
-argument.help.proxypass=W\u00E4hlt das Proxy-Passwort. Bsp.\: -proxypass <Passwort>
-argument.help.proxyport=W\u00E4hlt den Proxy-Server-Port. Bsp.\: -proxyport <Portnummer>
-argument.help.proxyuser=W\u00E4hlt den Proxy-Benutznamen. Bsp.\: -proxyuser <Benutzername>
-argument.help.skipfinish=Aktiviert das \u00DCberspringen des "Fertig"-Dialogs (falls Speichern erfolgreich)
-argument.info.help=Die folgenden Optionen sind verf\u00FCgbar\:
-argument.invalid.bku=BKU-Auswahl ung\u00FCltig\! Verwendung\:
-argument.invalid.config=Konfigurationsdatei ung\u00FCltig\! Verwendung\:
-argument.invalid.emblem=Bildmarke ung\u00FCltig\! Verwendung\:
-argument.invalid.input=Dokument ung\u00FCltig\! Verwendung\:
-argument.invalid.keystorealias=Keystore-Alias ung\u00FCltig\! Verwendung\:
-argument.invalid.keystorefile=Keystore-Datei ung\u00FCltig\! Verwendung\:
-argument.invalid.keystorekeypass=Keystore Key-Passwort ung\u00FCltig\! Verwendung\:
-argument.invalid.keystorestorepass=Keystore-Passwort ung\u00FCltig\! Verwendung\:
-argument.invalid.keystoretype=Keystore-Typ ung\u00FCltig\! Verwendung\:
-argument.invalid.number=Telefonnummer ung\u00FCltig\! Verwendung\:
-argument.invalid.output=Ausgabeordner ung\u00FCltig\! Verwendung\:
-argument.invalid.password=Handy-BKU Passwort ung\u00FCltig\! Verwendung\:
-argument.invalid.proxyhost=Proxy-Host ung\u00FCltig\! Verwendung\:
-argument.invalid.proxypass=Proxy-Passwort ung\u00FCltig\! Verwendung\:
-argument.invalid.proxyport=Proxy-Port ung\u00FCltig\! Verwendung\:
-argument.invalid.proxyuser=Proxy-Benutzername ung\u00FCltig\! Verwendung\:
-bku_selection.card=&Karte
-bku_selection.ks=Key&Store
-bku_selection.mobile=&Handy
-common.AllExtension_Description=Alle Dateien
-common.Cancel=&Abbrechen
-common.GIFExtension_Description=GIF-Bilder
-common.ImageExtension_Description=Alle unterst\u00FCtzen Bilder
-common.JPGExtension_Description=JPG-Bilder
-common.KeystoreExtension_Description=Keystores
-common.KSExtension_Description=Java Keystores
-common.Ok=O&K
-common.PDFExtension_Description=PDF-Dokumente
-common.PKCS12Extension_Description=PKCS12 Keystores
-common.PNGExtension_Description=PNG-Bilder
-common.Save=&Speichern
-common.browse=&Durchsuchen
-common.info=Information
-common.open=\u00D6ffnen
-common.warning=Warnung
-config.About=\u00DC&ber %s
-config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter <a>http://demo.a-sit.at/lizenzbedingungen/</a>.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind.
-config.Advanced=Er&weitert
-config.Keystore=&Keystore
-config.Simple=&Einfach
-dataSourceSelection.DropLabel=Dokument hierher ziehen
-dataSourceSelection.DropLabel2=oder...
-dataSourceSelection.browse=&Durchsuchen um ein Dokument zu w\u00E4hlen
-dataSourceSelection.usePlaceholderTitle=Info
-dataSourceSelection.usePlaceholderText=Im vorliegenden Dokument wurde ein Signaturplatzhalter gefunden. Soll dieser verwendet werden?
-error.CmdLineArgs=Fehler bei den Befehlszeilen-Parametern\:
-error.Details=Details
-error.EnteredReferenceValue=Sie haben den Vergleichswert eingegeben\!
-error.FailedToGetSignedDocument=Konnte signiertes Dokument nicht erhalten.
-error.FailedToLoadEmblem=Konnte Bildmarke nicht speichern
-error.FailedToLoadQRCode=Konnte den QR code nicht laden
-error.FailedToOpenDocument=Konnte signiertes Dokument nicht \u00F6ffnen\: %s.
-error.FailedToSaveSettings=Konnte Konfigurationsdatei nicht speichern\!
-error.FileNotExist=Datei %s existiert nicht\!
-error.IOError=Ein-/Ausgabe-Fehler
-error.Initialization=Initialisierung fehlgeschlagen. Bitte \u00FCberpr\u00FCfen Sie Ihre Konfiguration.
-error.InvalidBKU=Ung\u00FCltige BKU-Auswahl. Bitte \u00FCberpr\u00FCfen.
-error.InvalidLocale=Ung\u00FCltige Sprache
-error.InvalidPhoneNumber=Telefonnummer ung\u00FCltig\! Beispiel\: +43664123456789
-error.InvalidSettings=Ung\u00FCltige Einstellungen vorhanden. Bitte \u00FCberpr\u00FCfen.
-error.KeyStore=Fehler beim Laden des KeyStores. Falsches Passwort?
-error.KeyStoreAliasExist=Key-Alias %s nicht im Keystore gefunden
-error.KeyStoreAliasNoKey=Alias %s ist kein Schlüssel
-error.KeyStoreFileNotExist=Keystore-Datei %s existiert nicht\!
-error.KeyStoreKeyPass=Schl\u00FCssel-Passwort nicht akzeptiert
-error.LocalBKU=Bitte pr\u00FCfen sie, ob Ihre lokale BKU (B\u00FCrgerkartenumgebung) l\u00E4uft\n\nSie ben\u00F6tigen eine BKU, um auf Ihre B\u00FCrgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at
-error.MayNotBeAPDF=Dies ist m\u00F6glicherweise keine PDF-Datei
-error.NoTan=Keine TAN eingeben
-error.PDFProtected=Diese PDF-Datei ist verschl\u00FCsselt und kann daher nicht signiert werden
-error.PDFPwdProtected=Diese PDF-Datei ist Passwortgesch\u00FCtzt und kann daher nicht signiert werden
-error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verf\u00FCgbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
-error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten.
-error.Retry=Wiederholen
-error.SWTLib=Fehler beim Laden der SWT-Bibliothek
-error.SaveOutputFolder=Konnte Dokument nicht in den konfigurierten Ausgabeordner speichern.
-error.Signatur=Signatur-Fehler
-error.SignaturePanel.NoPage=Keine Seite gew\u00E4hlt
-error.SignaturePanel.NoRender=Konnte Seite nicht darstellen
-error.TanTooLong=Eingegebene TAN zu lange
-error.Title=Fehler
-error.TitleFatal=Fataler Fehler
-error.Unexpected=Unerwarteter Fehler
-error.ATrustConnection=Verbindung zu A-Trust konnte nicht aufgebaut werden
-exception.InvalidEmblemFile=%s ist eine ung\u00FCltige Bildmarken-Datei\!
-exception.InvalidPort=%s ist ung\u00FCltig\: muss eine Nummer zwischen %d und %d sein.
-exception.PasswordTooLong=Eingegebenes Passwort ist zu lange\!
-exception.PasswordTooShort=Eingegebenes Passwort ist zu kurz\!
-exception.PathNotDirectory=Pfad %s ist kein g\u00FCltiger Ordner\!
-exception.PathNotExist=Pfad %s existiert nicht\!
-keystore.KeystoreStorePassEntry=Keystore-Passwort eingeben:
-keystore.KeystoreKeyPassEntry=Schl\u00FCssel-Passwort eingeben:
-keystore_config.Keystore_Title=Keystore
-keystore_config.KeystoreAlias=Schl\u00FCssel-Alias
-keystore_config.KeystoreFile=Keystore-Datei
-keystore_config.KeystoreFile_ToolTip=Pfad zur Keystore-Datei
-keystore_config.KeystoreFile.Dialog=W\u00E4hlen Sie den Keystore
-keystore_config.KeystoreFile.Dialog_Title=Keystore w\u00E4hlen
-keystore_config.KeystoreKeyPass=Schl\u00FCssel-Passwort
-keystore_config.KeystoreKeyPass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden.
-keystore_config.KeystoreStorePass=Keystore-Passwort
-keystore_config.KeystoreStorePass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden.
-keystore_config.KeystoreType=Keystore-Typ
-keystore_config.KeystoreType_JKS=Java-Keystore
-keystore_config.KeystoreType_PKCS12=PKCS12
-keystore_config.Load=Keystore laden
-keystore_config.Load_ToolTip=Keystore laden, um die verf\u00FCgbaren Schl\u00FCssel-Aliases anzuzeigen
-main.about=\u00DCber %s
-main.configuration=Konfiguration
-main.done=Fertig
-main.hide=%s ausblenden
-main.position=Positionierung
-main.quit=%s beenden
-main.signature=Signatur
-mobileBKU.aTrustDisclaimer=Dieses Service wird von der Fa. A-Trust zu Verf\u00FCgung gestellt
-mobileBKU.certExpiresSoon=Da die G\u00FCltigkeit Ihres Zertifikats in den n\u00E4chsten Tagen endet, ist eine erneute Aktivierung erforderlich (geb\u00FChrenfrei). W\u00E4hlen Sie "Ja" um https\://www.handy-signatur.at/ zu \u00F6ffnen, und loggen Sie sich dann in Ihr Konto ein.
-mobileBKU.notice=Nachricht vom Server\:
-mobileBKU.number=Nummer\:
-mobileBKU.password=Passwort\:
-mobileBKU.show=<a>Signaturdaten anzeigen</a>
-mobileBKU.show_tooltip=Zeigt die zu signierenden Daten an
-mobileBKU.tan_tries_exceeded=Zu viele TAN-Versuche, neue TAN anfordern?
-mobileBKU.wrong_tan=TAN nicht akzeptiert
-output.file_ask_overwrite=Datei %s existiert bereits, wollen Sie sie \u00FCberschreiben?
-output.link_open_message=Sie k\u00F6nnen das signierte Dokument <a>hier</a> \u00F6ffnen.
-output.link_save_message=Sie k\u00F6nnen das signierte Dokument speichern
-output.save_failed=Datei %s konnte nicht gespeichert werden\: %s
-output.success_message=Signatur war erfolgreich
-positioning.newPage=&Neue Seite anlegen
-positioning.page=Seite %d von %d
-positioning.removeNewPage=&Neue Seite r\u00FCckg\u00E4ngig
-positioning.sign=&Signieren
-positioning.signature=Signatur
-simple_config.ClearEmblem=Ent&fernen
-simple_config.EmblemEmpty=Ziehen Sie ein Bild hierher\noder verwenden sie Durchsuchen \num eine Bildmarke zu w\u00E4hlen.
-simple_config.Emblem_Title=&Bildmarke
-simple_config.ExampleNumber=+43676123456789
-simple_config.ExampleNumber_ToolTip=Um die Handynummer voreinzustellen hier eingeben
-simple_config.MobileBKU_Title=&Handy-Signatur
-simple_config.Note=Text\:
-simple_config.Note_Default=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument hat gem\u00E4\u00DF Art. 25 Abs. 2 der Verordnung (EU) Nr. 910/2014 vom 23.\u00A0Juli\u00A02014 ("eIDAS-VO") die gleiche Rechtswirkung wie ein handschriftlich unterschriebenes Dokument.
-simple_config.Note_Default_Old=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument ist gem\u00E4\u00DF \u00A7\u00A04 Abs.\u00A01 Signaturgesetz einem handschriftlich unterschriebenen Dokument grunds\u00E4tzlich rechtlich gleichgestellt.
-simple_config.Note_SetDefault=Standard wiederherstellen
-simple_config.Note_Title=Signaturhi&nweis
-simple_config.Note_Tooltip=Ein optionaler Hinweis, der in Ihrer Signatur angezeigt wird
-simple_config.PhoneNumber=Handynummer\:
-simple_config.SigBlockLang_Title=Sp&rache des Signaturblocks\:
-simple_config.SigBlockLang_ToolTip=W\u00E4hlen Sie eine Sprache f\u00FCr den Signaturblock, der am signierten Dokument erscheint
-tanEnter.QR=QR Code\:
-tanEnter.FP=Bitte \u00f6ffnen Sie die Handy-Signatur App\nund best\u00e4tigen Sie die Signatur.
-tanEnter.ReferenceValue=Vergleichswert\:
-tanEnter.SMS=&SMS anfordern
-tanEnter.TAN=TAN\:
-tanEnter.APPTAN=Bitte \u00f6ffnen Sie die Handy-Signatur App\nTAN\:
-tanEnter.tries=%d Versuche \u00FCbrig\!
-tanEnter.try=Nur noch 1 Versuch \u00FCbrig\!
-version_check.UpdateText=Version %s ist verf\u00FCgbar\nJetzt Download-Seite \u00F6ffnen?
-version_check.UpdateTitle=Neue Version verf\u00FCgbar\!
-waiting.message=Signaturerstellung l\u00E4uft...
-waiting_for_app.message=Bitte \u00f6ffnen Sie die Handy-Signatur App!
-positioning.placeholder=Bitte wählen Sie den gewünschte\nPlatzhalter aus der Liste aus
+#Eclipse messages class
+#Fri Jun 26 18:01:09 CEST 2015
+BKU.KS=Keystore
+BKU.LOCAL=Lokale BKU
+BKU.MOBILE=Handy-BKU
+BKU.NONE=Keine Voreinstellung
+BKUSelectionComposite.btnMobile.text=Handy
+TrustedSocketFactory.FailedToCreateSecureConnection=Konnte keine sichere Verbindung erstellen
+AdvancedConfigurationComposite.lblSaveFilePostFix.text=Ausgabedatei Postfix\:
+advanced_config.AutoPosition=Automatische Positionierung
+advanced_config.AutoPosition_ToolTip=Aktivieren Sie diese Option, um die Signatur automatisch zu positionieren
+advanced_config.BKUSelection_Title=&BKU-Auswahl
+advanced_config.BKUSelection_ToolTip=W\u00E4hlen Sie die BKU, mit der die Signatur durchgef\u00FChrt werden soll
+advanced_config.KeystoreEnabled=Keystore-Signatur aktivieren
+advanced_config.KeystoreEnabled_ToolTip=Aktiviert die M\u00F6glichkeit, mit einem lokalen Keystore zu signieren
+advanced_config.LocaleSelection_Title=S&prachauswahl
+advanced_config.LocaleSelection_ToolTip=W\u00E4hlen Sie die Sprache f\u00FCr das Benutzerinterface
+advanced_config.OutputFolder=Standard-Ausgabeordner\:
+advanced_config.OutputFolder.Dialog=W\u00E4hlen Sie einen Ordner
+advanced_config.OutputFolder.Dialog_Title=Ausgabeordner w\u00E4hlen
+advanced_config.OutputFolder_Title=Ausgabe&ort
+advanced_config.OutputFolder_ToolTip=W\u00E4hlen Sie einen Ordner, in dem signierte Dokumente automatisch abgelegt werden (deaktivert, wenn das Feld leer ist; ein einzelner Punkt (".") w\u00E4hlt das Verzeichnis des Ursprungsdokuments)
+advanced_config.PdfACompat=PDF/A-Kompatibilit\u00E4t
+advanced_config.PdfACompat_ToolTip=Ob die Signatur PDF/A-kompatibel sein soll (erh\u00F6ht PDF-Gr\u00F6\u00DFe)
+advanced_config.ProxyHost=Host\:
+advanced_config.ProxyHost_Template=Hostname oder IP des Proxy-Servers
+advanced_config.ProxyHost_ToolTip=Um einen Proxy zu verwenden Hostname/IP hier eingeben
+advanced_config.ProxyPass=Passwort\:
+advanced_config.ProxyPass_Template=Passwort f\u00FCr den Proxy-Server
+advanced_config.ProxyPass_ToolTip=F\u00FCr Proxy-Authentifizierung Passwort hier eingeben
+advanced_config.ProxyPort=Port\:
+advanced_config.ProxyPort_Template=Port des Proxy-Servers [1-65535]
+advanced_config.ProxyPort_ToolTip=Um einen Proxy zu verwenden Portnummer hier eingeben
+advanced_config.ProxyUser=Benutzer\:
+advanced_config.ProxyUser_Template=Benutzername f\u00FCr den Proxy-Server
+advanced_config.ProxyUser_ToolTip=F\u00FCr Proxy-Authentifizierung Benutzername hier eingeben
+advanced_config.Proxy_Title=&Proxy
+advanced_config.SigPHTransparency=Signaturplatzhalter-Transparenz
+advanced_config.SigPHTransparencyMax=Undurchsichtig
+advanced_config.SigPHTransparencyMin=Unsichtbar
+advanced_config.SigPHTransparencyTooltip=W\u00E4hlt die Transparenz des Signaturplatzhalters im Schritt "Positionierung"
+advanced_config.Signature_Title=Si&gnatur
+advanced_config.Placeholder_Title=Platzhalter
+advanced_config.Placeholder_Enabled=Platzhalter Suche aktivieren
+advanced_config.UpdateCheck=Automatisch auf Updates \u00FCberpr\u00FCfen
+advanced_config.UpdateCheck_Title=Updates
+advanced_config.UpdateCheck_ToolTip=Zeigt eine Benachrichtigung, wenn eine neue Version verf\u00FCgbar ist
+advanced_config.UseMarker=Nach QR-Code Signaturplatzhaltern suchen
+advanced_config.UseMarker_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen.
+advanced_config.UseSignatureFields=Nach Signaturfelder-Platzhaltern suchen
+advanced_config.UseSignatureFields_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen.
+argument.error.output=ist kein Ordner
+argument.help.autopos=Aktiviert automatische Positionierung der Signatur
+argument.help.bku=W\u00E4hlen Sie die BKU. G\u00FCltige Werte\: LOCAL, MOBILE, KS. Bsp.\: -b MOBILE
+argument.help.config=Auswahl der Konfigurationsdatei. Bsp.\: -c <Dateiname>
+argument.help.emblem=W\u00E4hlt die Bildmarke f\u00FCr die Signatur. Bsp.\: -e <Dateiname>
+argument.help.help=Zeigt diese Hilfe an
+argument.help.input=W\u00E4hlt das zu signierende Dokument. Bsp.\: -i <Dateiname>
+argument.help.keystorealias=W\u00E4hlt das Keystore Key-Alias. Bsp.\: -ksalias <Alias>
+argument.help.keystorefile=W\u00E4hlt die Keystore-Datei. Bsp.\: -ks <Dateiname>
+argument.help.keystorekeypass=W\u00E4hlt das Keystore Key-Password. Bsp.\: -kskeypass <Passwort>
+argument.help.keystorestorepass=W\u00E4hlt das Keystore-Password. Bsp.\: -kspass <Passwort>
+argument.help.keystoretype=W\u00E4hlt den Keystore-Typ. Bsp.\: -kstype [PKCS12|JKS|JCEKS]
+argument.help.number=W\u00E4hlt die Telefonnummer f\u00FCr die Handy-BKU. Bsp.\: -n <Nummer>
+argument.help.output=W\u00E4hlt den Ausgabeordner oder die Ausgabedatei. Bsp.\: -o <Ordner>
+argument.help.password=W\u00E4hlt das Passwort f\u00FCr die Handy-BKU. Bsp.\: -p <Passwort>
+argument.help.proxyhost=W\u00E4hlt den Proxy-Server. Bsp.\: -proxy <Hostname/IP>
+argument.help.proxypass=W\u00E4hlt das Proxy-Passwort. Bsp.\: -proxypass <Passwort>
+argument.help.proxyport=W\u00E4hlt den Proxy-Server-Port. Bsp.\: -proxyport <Portnummer>
+argument.help.proxyuser=W\u00E4hlt den Proxy-Benutznamen. Bsp.\: -proxyuser <Benutzername>
+argument.help.skipfinish=Aktiviert das \u00DCberspringen des "Fertig"-Dialogs (falls Speichern erfolgreich)
+argument.info.help=Die folgenden Optionen sind verf\u00FCgbar\:
+argument.invalid.bku=BKU-Auswahl ung\u00FCltig\! Verwendung\:
+argument.invalid.config=Konfigurationsdatei ung\u00FCltig\! Verwendung\:
+argument.invalid.emblem=Bildmarke ung\u00FCltig\! Verwendung\:
+argument.invalid.input=Dokument ung\u00FCltig\! Verwendung\:
+argument.invalid.keystorealias=Keystore-Alias ung\u00FCltig\! Verwendung\:
+argument.invalid.keystorefile=Keystore-Datei ung\u00FCltig\! Verwendung\:
+argument.invalid.keystorekeypass=Keystore Key-Passwort ung\u00FCltig\! Verwendung\:
+argument.invalid.keystorestorepass=Keystore-Passwort ung\u00FCltig\! Verwendung\:
+argument.invalid.keystoretype=Keystore-Typ ung\u00FCltig\! Verwendung\:
+argument.invalid.number=Telefonnummer ung\u00FCltig\! Verwendung\:
+argument.invalid.output=Ausgabeordner ung\u00FCltig\! Verwendung\:
+argument.invalid.password=Handy-BKU Passwort ung\u00FCltig\! Verwendung\:
+argument.invalid.proxyhost=Proxy-Host ung\u00FCltig\! Verwendung\:
+argument.invalid.proxypass=Proxy-Passwort ung\u00FCltig\! Verwendung\:
+argument.invalid.proxyport=Proxy-Port ung\u00FCltig\! Verwendung\:
+argument.invalid.proxyuser=Proxy-Benutzername ung\u00FCltig\! Verwendung\:
+bku_selection.card=&Karte
+bku_selection.ks=Key&Store
+bku_selection.mobile=&Handy
+common.AllExtension_Description=Alle Dateien
+common.Cancel=&Abbrechen
+common.GIFExtension_Description=GIF-Bilder
+common.ImageExtension_Description=Alle unterst\u00FCtzen Bilder
+common.JPGExtension_Description=JPG-Bilder
+common.KeystoreExtension_Description=Keystores
+common.KSExtension_Description=Java Keystores
+common.Ok=O&K
+common.PDFExtension_Description=PDF-Dokumente
+common.PKCS12Extension_Description=PKCS12 Keystores
+common.PNGExtension_Description=PNG-Bilder
+common.Save=&Speichern
+common.browse=&Durchsuchen
+common.info=Information
+common.open=\u00D6ffnen
+common.warning=Warnung
+config.About=\u00DC&ber %s
+config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter <a>https://technology.a-sit.at/lizenzbedingungen/</a>.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind.
+config.LicenseURL=https://technology.a-sit.at/lizenzbedingungen/
+config.Advanced=Er&weitert
+config.Keystore=&Keystore
+config.Simple=&Einfach
+dataSourceSelection.DropLabel=Dokument hierher ziehen
+dataSourceSelection.DropLabel2=oder...
+dataSourceSelection.browse=&Durchsuchen um ein Dokument zu w\u00E4hlen
+dataSourceSelection.usePlaceholderTitle=Info
+dataSourceSelection.usePlaceholderText=Im vorliegenden Dokument wurde ein Signaturplatzhalter gefunden. Soll dieser verwendet werden?
+error.CmdLineArgs=Fehler bei den Befehlszeilen-Parametern\:
+error.Details=Details
+error.EnteredReferenceValue=Sie haben den Vergleichswert eingegeben\!
+error.FailedToGetSignedDocument=Konnte signiertes Dokument nicht erhalten.
+error.FailedToLoadEmblem=Konnte Bildmarke nicht speichern
+error.FailedToLoadQRCode=Konnte den QR code nicht laden
+error.FailedToOpenDocument=Konnte signiertes Dokument nicht \u00F6ffnen\: %s.
+error.FailedToSaveSettings=Konnte Konfigurationsdatei nicht speichern\!
+error.FileNotExist=Datei %s existiert nicht\!
+error.IOError=Ein-/Ausgabe-Fehler
+error.Initialization=Initialisierung fehlgeschlagen. Bitte \u00FCberpr\u00FCfen Sie Ihre Konfiguration.
+error.InvalidBKU=Ung\u00FCltige BKU-Auswahl. Bitte \u00FCberpr\u00FCfen.
+error.InvalidLocale=Ung\u00FCltige Sprache
+error.InvalidPhoneNumber=Telefonnummer ung\u00FCltig\! Beispiel\: +43664123456789
+error.InvalidSettings=Ung\u00FCltige Einstellungen vorhanden. Bitte \u00FCberpr\u00FCfen.
+error.KeyStore=Fehler beim Laden des KeyStores. Falsches Passwort?
+error.KeyStoreAliasExist=Key-Alias %s nicht im Keystore gefunden
+error.KeyStoreAliasNoKey=Alias %s ist kein Schlüssel
+error.KeyStoreFileNotExist=Keystore-Datei %s existiert nicht\!
+error.KeyStoreKeyPass=Schl\u00FCssel-Passwort nicht akzeptiert
+error.LocalBKU=Bitte pr\u00FCfen sie, ob Ihre lokale BKU (B\u00FCrgerkartenumgebung) l\u00E4uft\n\nSie ben\u00F6tigen eine BKU, um auf Ihre B\u00FCrgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at
+error.MayNotBeAPDF=Dies ist m\u00F6glicherweise keine PDF-Datei
+error.NoTan=Keine TAN eingeben
+error.PDFProtected=Diese PDF-Datei ist verschl\u00FCsselt und kann daher nicht signiert werden
+error.PDFPwdProtected=Diese PDF-Datei ist Passwortgesch\u00FCtzt und kann daher nicht signiert werden
+error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verf\u00FCgbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt.
+error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten.
+error.Retry=Wiederholen
+error.SWTLib=Fehler beim Laden der SWT-Bibliothek
+error.SaveOutputFolder=Konnte Dokument nicht in den konfigurierten Ausgabeordner speichern.
+error.Signatur=Signatur-Fehler
+error.SignaturePanel.NoPage=Keine Seite gew\u00E4hlt
+error.SignaturePanel.NoRender=Konnte Seite nicht darstellen
+error.TanTooLong=Eingegebene TAN zu lange
+error.Title=Fehler
+error.TitleFatal=Fataler Fehler
+error.Unexpected=Unerwarteter Fehler
+error.ATrustConnection=Verbindung zu A-Trust konnte nicht aufgebaut werden
+exception.InvalidEmblemFile=%s ist eine ung\u00FCltige Bildmarken-Datei\!
+exception.InvalidPort=%s ist ung\u00FCltig\: muss eine Nummer zwischen %d und %d sein.
+exception.PasswordTooLong=Eingegebenes Passwort ist zu lange\!
+exception.PasswordTooShort=Eingegebenes Passwort ist zu kurz\!
+exception.PathNotDirectory=Pfad %s ist kein g\u00FCltiger Ordner\!
+exception.PathNotExist=Pfad %s existiert nicht\!
+keystore.KeystoreStorePassEntry=Keystore-Passwort eingeben:
+keystore.KeystoreKeyPassEntry=Schl\u00FCssel-Passwort eingeben:
+keystore_config.Keystore_Title=Keystore
+keystore_config.KeystoreAlias=Schl\u00FCssel-Alias
+keystore_config.KeystoreFile=Keystore-Datei
+keystore_config.KeystoreFile_ToolTip=Pfad zur Keystore-Datei
+keystore_config.KeystoreFile.Dialog=W\u00E4hlen Sie den Keystore
+keystore_config.KeystoreFile.Dialog_Title=Keystore w\u00E4hlen
+keystore_config.KeystoreKeyPass=Schl\u00FCssel-Passwort
+keystore_config.KeystoreKeyPass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden.
+keystore_config.KeystoreStorePass=Keystore-Passwort
+keystore_config.KeystoreStorePass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden.
+keystore_config.KeystoreType=Keystore-Typ
+keystore_config.KeystoreType_JKS=Java-Keystore
+keystore_config.KeystoreType_PKCS12=PKCS12
+keystore_config.Load=Keystore laden
+keystore_config.Load_ToolTip=Keystore laden, um die verf\u00FCgbaren Schl\u00FCssel-Aliases anzuzeigen
+main.about=\u00DCber %s
+main.configuration=Konfiguration
+main.done=Fertig
+main.hide=%s ausblenden
+main.position=Positionierung
+main.quit=%s beenden
+main.signature=Signatur
+mobileBKU.aTrustDisclaimer=Dieses Service wird von der Fa. A-Trust zu Verf\u00FCgung gestellt
+mobileBKU.certExpiresSoon=Da die G\u00FCltigkeit Ihres Zertifikats in den n\u00E4chsten Tagen endet, ist eine erneute Aktivierung erforderlich (geb\u00FChrenfrei). W\u00E4hlen Sie "Ja" um https\://www.handy-signatur.at/ zu \u00F6ffnen, und loggen Sie sich dann in Ihr Konto ein.
+mobileBKU.notice=Nachricht vom Server\:
+mobileBKU.number=Nummer\:
+mobileBKU.password=Passwort\:
+mobileBKU.show=<a>Signaturdaten anzeigen</a>
+mobileBKU.show_tooltip=Zeigt die zu signierenden Daten an
+mobileBKU.tan_tries_exceeded=Zu viele TAN-Versuche, neue TAN anfordern?
+mobileBKU.wrong_tan=TAN nicht akzeptiert
+output.file_ask_overwrite=Datei %s existiert bereits, wollen Sie sie \u00FCberschreiben?
+output.link_open_message=Sie k\u00F6nnen das signierte Dokument <a>hier</a> \u00F6ffnen.
+output.link_save_message=Sie k\u00F6nnen das signierte Dokument speichern
+output.save_failed=Datei %s konnte nicht gespeichert werden\: %s
+output.success_message=Signatur war erfolgreich
+positioning.newPage=&Neue Seite anlegen
+positioning.page=Seite %d von %d
+positioning.removeNewPage=&Neue Seite r\u00FCckg\u00E4ngig
+positioning.sign=&Signieren
+positioning.signature=Signatur
+simple_config.ClearEmblem=Ent&fernen
+simple_config.EmblemEmpty=Ziehen Sie ein Bild hierher\noder verwenden sie Durchsuchen \num eine Bildmarke zu w\u00E4hlen.
+simple_config.Emblem_Title=&Bildmarke
+simple_config.ExampleNumber=+43676123456789
+simple_config.ExampleNumber_ToolTip=Um die Handynummer voreinzustellen hier eingeben
+simple_config.MobileBKU_Title=&Handy-Signatur
+simple_config.Note=Text\:
+simple_config.Note_Default=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument hat gem\u00E4\u00DF Art. 25 Abs. 2 der Verordnung (EU) Nr. 910/2014 vom 23.\u00A0Juli\u00A02014 ("eIDAS-VO") die gleiche Rechtswirkung wie ein handschriftlich unterschriebenes Dokument.
+simple_config.Note_Default_Old=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument ist gem\u00E4\u00DF \u00A7\u00A04 Abs.\u00A01 Signaturgesetz einem handschriftlich unterschriebenen Dokument grunds\u00E4tzlich rechtlich gleichgestellt.
+simple_config.Note_SetDefault=Standard wiederherstellen
+simple_config.Note_Title=Signaturhi&nweis
+simple_config.Note_Tooltip=Ein optionaler Hinweis, der in Ihrer Signatur angezeigt wird
+simple_config.PhoneNumber=Handynummer\:
+simple_config.SigBlockLang_Title=Sp&rache des Signaturblocks\:
+simple_config.SigBlockLang_ToolTip=W\u00E4hlen Sie eine Sprache f\u00FCr den Signaturblock, der am signierten Dokument erscheint
+simple_config.SIGNATURBLOCK_SMALL=Standard Signaturblock
+simple_config.AMTSSIGNATURBLOCK=Amtssignatur
+simple_config.BASE_LOGO=Nur Bildmarke
+simple_config.INVISIBLE=Unsichtbar
+tanEnter.QR=QR Code\:
+tanEnter.FP=Bitte \u00f6ffnen Sie die Handy-Signatur App\nund best\u00e4tigen Sie die Signatur.
+tanEnter.ReferenceValue=Vergleichswert\:
+tanEnter.SMS=&SMS anfordern
+tanEnter.TAN=TAN\:
+tanEnter.APPTAN=Bitte \u00f6ffnen Sie die Handy-Signatur App\nTAN\:
+tanEnter.tries=%d Versuche \u00FCbrig\!
+tanEnter.try=Nur noch 1 Versuch \u00FCbrig\!
+version_check.UpdateText=Version %s ist verf\u00FCgbar\nJetzt Download-Seite \u00F6ffnen?
+version_check.UpdateTitle=Neue Version verf\u00FCgbar\!
+waiting.message=Signaturerstellung l\u00E4uft...
+waiting_for_app.message=Bitte \u00f6ffnen Sie die Handy-Signatur App!
+positioning.placeholder=Bitte wählen Sie den gewünschte\nPlatzhalter aus der Liste aus
diff --git a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip
index 4c25ca9d..37fb63da 100644
--- a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip
+++ b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip
Binary files differ