summaryrefslogtreecommitdiff
path: root/pdf-over-gui
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java5
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java8
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java19
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java7
6 files changed, 48 insertions, 2 deletions
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 162fbd15..eec923cf 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
@@ -48,7 +48,7 @@ public class Constants {
/**
*
*/
- public static final String SIGNATURE_FIELD_NAME_CONF = "signature_field_name";
+ public static final String SIGNATURE_FIELD_NAME_CONF = "signature_field_name"; //$NON-NLS-1$
/** Current display - used for Colors */
private static Display display = Display.getCurrent();
@@ -134,6 +134,9 @@ public class Constants {
/** The use marker parameter (true/false) */
public static final String CFG_USE_MARKER = "USE_MARKER"; //$NON-NLS-1$
+
+ /** The use of signature fields instead of QR codes */
+ public static final String CFG_USE_SIGNATURE_FIELDS = "USE_FIELDS"; //$NON-NLS-1$
/** The signature placeholder transparency config parameter (0-255) */
public static final String CFG_SIGNATURE_PLACEHOLDER_TRANSPARENCY = "SIGNATURE_PLACEHOLDER_TRANSPARENCY"; //$NON-NLS-1$
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 486de462..0f00e9e3 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
@@ -174,13 +174,19 @@ public interface ConfigManipulator {
/**
* Sets whether to use an existing signaturemarker.
- *
+ * QR-Code only
+ *
* @param useMarker
* whether to use an existing signaturemarker
*/
public void setUseMarker(boolean useMarker);
+ /**
+ * Sets the use of signature fields as signature marker
+ * @param useFields
+ */
+ public void setUseSignatureFields(boolean useFields);
}
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 7d66a286..299d2fa8 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
@@ -253,4 +253,11 @@ public interface ConfigProvider {
* @return whether to use a signature maker
*/
public boolean getUseMarker();
+
+ /**
+ * Gets whether to use signature fileds instead of QR code.
+ *
+ * @return boolean
+ */
+ public boolean getUseSignatureFields();
}
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 c7e77ee3..8bf13e4c 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
@@ -133,6 +133,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
String useMarker = config.getProperty(Constants.CFG_USE_MARKER);
if(null != useMarker)
setUseMarker(useMarker.equalsIgnoreCase(Constants.TRUE));
+
+ String useSignatureFields = config.getProperty(Constants.CFG_USE_SIGNATURE_FIELDS);
+ if (useSignatureFields != null)
+ setUseSignatureFields(useSignatureFields.equalsIgnoreCase(Constants.TRUE));
String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT);
if (compat != null)
@@ -1460,6 +1464,14 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
public boolean getUseMarker() {
return this.configurationOverlay.getUseMarker();
}
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.PersistentConfigProvider#getUseSignatureFields()
+ */
+ @Override
+ public boolean getUseSignatureFields() {
+ return this.configurationOverlay.getUseSignatureFields();
+ }
/*
* (non-Javadoc)
@@ -1470,6 +1482,13 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
@Override
public void setUseMarker(boolean useMarker) {
this.configurationOverlay.setUseMarker(useMarker);
+ if (useMarker) setUseSignatureFields(false);
}
+ @Override
+ public void setUseSignatureFields(boolean useFields) {
+ this.configurationOverlay.setUseSignatureFields(useFields);
+ if (useFields) setUseMarker(false);
+ }
+
}
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 546c9df4..52256881 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
@@ -390,6 +390,7 @@ public interface ConfigurationContainer {
*/
public void setUseMarker(boolean useMarker);
+
/***
* Extension to the standard use marker implementation
* @param useFields
@@ -397,5 +398,8 @@ public interface ConfigurationContainer {
public void setUseSignatureFields(boolean useFields);
+ /**
+ * @return if the usage of signatureFields is enabled
+ */
public boolean getUseSignatureFields();
}
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 ce35d965..823de866 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
@@ -187,4 +187,11 @@ public interface PersistentConfigProvider {
* @return whether to use an existing singature marker
*/
public boolean getUseMarker();
+
+ /**
+ * Gets whether to use an existing signature fields.
+ *
+ * @return boolean
+ */
+ public boolean getUseSignatureFields();
}