summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authortkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:38:01 +0000
committertkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7>2013-04-10 19:38:01 +0000
commit53f444f8bfc71219024b9bf1be26c7c0ccd9d68f (patch)
tree8958bbd60be16fb6fc14621df5a35109d2b46577 /pdf-over-gui/src
parent796112f8fa5476593a65d928f4dd71525d78a054 (diff)
downloadpdf-over-53f444f8bfc71219024b9bf1be26c7c0ccd9d68f.tar.gz
pdf-over-53f444f8bfc71219024b9bf1be26c7c0ccd9d68f.tar.bz2
pdf-over-53f444f8bfc71219024b9bf1be26c7c0ccd9d68f.zip
Add Overlay for the default signature position
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@426 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java4
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java7
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java24
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java2
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java6
6 files changed, 35 insertions, 10 deletions
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 4a6f2cfc..c2c53ac4 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
@@ -276,10 +276,10 @@ public class ConfigurationComposite extends StateComposite {
if (this.configProvider != null) {
// Initialize Configuration Container
- if (this.configProvider.getDefaultSignaturePosition() != null) {
+ if (this.configProvider.getDefaultSignaturePositionPersistent() != null) {
this.configurationContainer
.setAutomaticPositioning(this.configProvider
- .getDefaultSignaturePosition()
+ .getDefaultSignaturePositionPersistent()
.useAutoPositioning());
}
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 cc134229..3b50e5af 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
@@ -16,6 +16,7 @@
package at.asit.pdfover.gui.workflow.config;
import at.asit.pdfover.signator.BKUs;
+import at.asit.pdfover.signator.SignaturePosition;
/**
* An interface for setting the configuration overlay
@@ -66,6 +67,12 @@ public interface ConfigOverlayManipulator {
public void setDefaultOutputFolderOverlay(String outputFolder);
/**
+ * Sets the signature position
+ * @param position the signature position
+ */
+ public void setDefaultSignaturePositionOverlay(SignaturePosition position);
+
+ /**
* Sets the configuration file
* @param configurationFile
*/
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 52865222..083b574e 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
@@ -253,9 +253,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
} else {
log.error("Signature Position read from config failed: not matching string"); //$NON-NLS-1$
}
-
}
-
this.setDefaultSignaturePosition(position);
}
@@ -299,7 +297,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
props.setProperty(Constants.CFG_SIGN_LOCALE, LocaleSerializer.getParsableString(signLocale));
}
- SignaturePosition pos = getDefaultSignaturePosition();
+ SignaturePosition pos = getDefaultSignaturePositionPersistent();
if (pos == null) {
props.setProperty(Constants.CFG_SIGNATURE_POSITION, ""); //$NON-NLS-1$
@@ -415,6 +413,15 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
this.configuration.setDefaultSignaturePosition(signaturePosition);
}
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigOverlayManipulator#setDefaultSignaturePositionOverlay(at.asit.pdfover.signator.SignaturePosition)
+ */
+ @Override
+ public void setDefaultSignaturePositionOverlay(SignaturePosition signaturePosition) {
+ this.configurationOverlay.setDefaultSignaturePosition(signaturePosition);
+ }
+
/*
* (non-Javadoc)
*
@@ -423,6 +430,17 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
*/
@Override
public SignaturePosition getDefaultSignaturePosition() {
+ SignaturePosition position = this.configurationOverlay.getDefaultSignaturePosition();
+ if (position == null)
+ position = getDefaultSignaturePositionPersistent();
+ return position;
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.PersistentConfigProvider#getDefaultSignaturePositionPersistent()
+ */
+ @Override
+ public SignaturePosition getDefaultSignaturePositionPersistent() {
return this.configuration.getDefaultSignaturePosition();
}
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 f0108064..c06737df 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
@@ -27,7 +27,7 @@ import at.asit.pdfover.signator.BKUs;
import at.asit.pdfover.signator.SignaturePosition;
/**
- *
+ * Configuration container for the configuration dialog
*/
public interface ConfigurationContainer {
/**
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 d2fc5a2e..ae9687da 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
@@ -38,7 +38,7 @@ import at.asit.pdfover.signator.BKUs;
import at.asit.pdfover.signator.SignaturePosition;
/**
- *
+ * Implementation of the configuration container for the configuration dialog
*/
public class ConfigurationContainerImpl implements ConfigurationContainer {
/**
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 f79d7d56..ea2c97b1 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
@@ -71,13 +71,13 @@ public interface PersistentConfigProvider {
*/
public String getDefaultOutputFolderPersistent();
- // Declare the other configuration getters for convenience
-
/**
* Get the default configured SignaturePosition
* @return the default configured SignaturePosition or null if not configured
*/
- public SignaturePosition getDefaultSignaturePosition();
+ public SignaturePosition getDefaultSignaturePositionPersistent();
+
+ // Declare the other configuration getters for convenience
/**
* Get the transparency of the signature placeholder