diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:11:13 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:11:13 +0000 |
commit | 855d78ed79a8dbe11b35395bff133c95801889d7 (patch) | |
tree | dbdf25e41a3cb3b998323d36728f910ca6df1f36 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow | |
parent | a7f9440dfa7d70afe2f8eaad10b214422cf3c072 (diff) | |
download | mocca-855d78ed79a8dbe11b35395bff133c95801889d7.tar.gz mocca-855d78ed79a8dbe11b35395bff133c95801889d7.tar.bz2 mocca-855d78ed79a8dbe11b35395bff133c95801889d7.zip |
Remember sig pos when going back to positioning
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@181 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 9bf875fb..cd2e1907 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -30,6 +30,7 @@ import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.Emblem; import at.asit.pdfover.signator.FileNameEmblem; import at.asit.pdfover.signator.SignatureParameter; +import at.asit.pdfover.signator.SignaturePosition; /** * Decides where to position the signature block @@ -51,6 +52,8 @@ public class PositioningState extends State { private PositioningComposite positionComposite = null; + private SignaturePosition previousPosition = null; + private PositioningComposite getPositioningComposite() throws IOException { if (this.positionComposite == null) { this.positionComposite = @@ -67,6 +70,11 @@ public class PositioningState extends State { param.getPlaceholderDimension().getWidth(), param.getPlaceholderDimension().getHeight(), this.stateMachine.getConfigProvider().getPlaceholderTransparency()); + if (this.previousPosition != null) + this.positionComposite.setPosition( + this.previousPosition.getX(), + this.previousPosition.getY(), + this.previousPosition.getPage()); return this.positionComposite; } @@ -77,6 +85,7 @@ public class PositioningState extends State { if (!(status.getPreviousState() instanceof PositioningState) && !(status.getPreviousState() instanceof OpenState)) { + this.previousPosition = status.getSignaturePosition(); status.setSignaturePosition(null); } |