diff options
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover')
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 |