summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java9
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java18
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java14
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java20
4 files changed, 13 insertions, 48 deletions
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 59c77b3c..04b6c226 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
@@ -50,6 +50,7 @@ import at.asit.pdfover.gui.utils.Messages;
import at.asit.pdfover.gui.workflow.config.ConfigurationContainer;
import at.asit.pdfover.gui.workflow.states.State;
import at.asit.pdfover.signator.BKUs;
+import at.asit.pdfover.signator.SignaturePosition;
/**
* Composite for advanced configuration
@@ -465,7 +466,8 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
void performPositionSelection(boolean automatic) {
log.debug("Selected Position: " + automatic); //$NON-NLS-1$
- this.configurationContainer.setAutomaticPositioning(automatic);
+ SignaturePosition pos = automatic ? new SignaturePosition() : null;
+ this.configurationContainer.setDefaultSignaturePosition(pos);
this.btnAutomatischePositionierung.setSelection(automatic);
}
@@ -499,8 +501,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite {
if (outputFolder != null) {
this.performOutputFolderChanged(outputFolder);
}
- this.performPositionSelection(this.configurationContainer
- .getAutomaticPositioning());
+ SignaturePosition pos = this.configurationContainer
+ .getDefaultSignaturePosition();
+ this.performPositionSelection(pos != null && pos.useAutoPositioning());
this.sclTransparenz.setSelection(this.configurationContainer
.getPlaceholderTransparency());
this.performLocaleSelectionChanged(this.configurationContainer.getLocale());
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 c2c53ac4..960d1d5e 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
@@ -40,7 +40,6 @@ 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;
-import at.asit.pdfover.signator.SignaturePosition;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Button;
@@ -276,12 +275,9 @@ public class ConfigurationComposite extends StateComposite {
if (this.configProvider != null) {
// Initialize Configuration Container
- if (this.configProvider.getDefaultSignaturePositionPersistent() != null) {
- this.configurationContainer
- .setAutomaticPositioning(this.configProvider
- .getDefaultSignaturePositionPersistent()
- .useAutoPositioning());
- }
+ this.configurationContainer
+ .setDefaultSignaturePosition(this.configProvider
+ .getDefaultSignaturePositionPersistent());
this.configurationContainer
.setPlaceholderTransparency(this.configProvider
@@ -400,12 +396,8 @@ public class ConfigurationComposite extends StateComposite {
.getDefaultBKU());
this.configManipulator
.setDefaultMobileNumber(this.configurationContainer.getMobileNumber());
- if (this.configurationContainer.getAutomaticPositioning()) {
- this.configManipulator
- .setDefaultSignaturePosition(new SignaturePosition());
- } else {
- this.configManipulator.setDefaultSignaturePosition(null);
- }
+ this.configManipulator
+ .setDefaultSignaturePosition(this.configurationContainer.getDefaultSignaturePosition());
this.configManipulator.setLocale(this.configurationContainer.getLocale());
this.configManipulator.setSignLocale(this.configurationContainer.getSignLocale());
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 c06737df..faf6b9fb 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
+ * Configuration container
*/
public interface ConfigurationContainer {
/**
@@ -112,18 +112,6 @@ public interface ConfigurationContainer {
public void setProxyPort(int port) throws InvalidPortException;
/**
- * Gets the automatic positioning
- * @return whether automatic positioning is enabled
- */
- public boolean getAutomaticPositioning();
-
- /**
- * Sets the automatic positioning
- * @param automatic whether to enable automatic positioning
- */
- public void setAutomaticPositioning(boolean automatic);
-
- /**
* Gets the transparency of the placeholder
* @return transparency of the placeholder (0-255)
*/
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 ae9687da..8088eaa9 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
+ * Implementation of the configuration container
*/
public class ConfigurationContainerImpl implements ConfigurationContainer {
/**
@@ -222,24 +222,6 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getAutomaticPosition()
- */
- @Override
- public boolean getAutomaticPositioning() {
- return this.automaticPositioning;
- }
-
-
- /* (non-Javadoc)
- * @see at.asit.pdfover.gui.composites.ConfigurationContainer#setAutomaticPosition(boolean)
- */
- @Override
- public void setAutomaticPositioning(boolean automatic) {
- this.automaticPositioning = automatic;
- }
-
-
- /* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.ConfigurationContainer#getPlaceholderTransparency()
*/
@Override