summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:36 +0000
committertkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459>2012-10-31 16:36:36 +0000
commit212f029191f323f4f53982c763b14653ede8477a (patch)
tree0cbec37642bc4002cd1dd18dd9cae003fd6c32af
parent74af39df685584f6e9d298648f5e52e51cc99e31 (diff)
downloadpdf-over-212f029191f323f4f53982c763b14653ede8477a.tar.gz
pdf-over-212f029191f323f4f53982c763b14653ede8477a.tar.bz2
pdf-over-212f029191f323f4f53982c763b14653ede8477a.zip
Set signature page
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12695 3a0b52a2-8410-0410-bc02-ff6273a87459
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java2
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java13
-rw-r--r--trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java1
3 files changed, 13 insertions, 3 deletions
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
index d1309cf9..71e4149a 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java
@@ -182,7 +182,7 @@ public class PositioningComposite extends StateComposite {
*/
void setFinalPosition() {
// TODO: check if this is the real position
- this.position = new SignaturePosition(this.viewer.getSignaturePositionX(), this.viewer.getSignaturePositionY());
+ this.position = new SignaturePosition(this.viewer.getSignaturePositionX(), this.viewer.getSignaturePositionY(), this.viewer.getCurrentPage());
PositioningComposite.this.state.updateStateMachine();
}
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
index f90b2591..4d3ba584 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java
@@ -54,8 +54,10 @@ public class SignaturePanel extends JPanel {
Image currentImage;
/** The current PDFPage that was rendered into currentImage */
private PDFPage currentPage;
- /** The current page number */
+ /** The current transform from screen to page space */
AffineTransform currentXform;
+ /** The current page number */
+ private int currentPageNr;
/** The horizontal offset of the image from the left edge of the panel */
int offx;
/** The vertical offset of the image from the top of the panel */
@@ -98,6 +100,7 @@ public class SignaturePanel extends JPanel {
*/
public void showPage(int page) {
//sigPagePos = null;
+ this.currentPageNr = page;
showPage(this.pdf.getPage(page));
}
@@ -118,6 +121,14 @@ public class SignaturePanel extends JPanel {
}
/**
+ * return the currently displayed page
+ * @return current page number
+ */
+ public int getCurrentPage() {
+ return this.currentPageNr;
+ }
+
+ /**
* Stop the generation of any previous page, and draw the new one.
*
* @param page the PDFPage to draw.
diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
index 1837cdc7..e08a0f69 100644
--- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
+++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java
@@ -29,7 +29,6 @@ import at.asit.pdfover.gui.workflow.StateMachine;
import at.asit.pdfover.gui.workflow.Status;
import at.asit.pdfover.signator.Emblem;
import at.asit.pdfover.signator.FileNameEmblem;
-import at.asit.pdfover.signator.SignatureException;
import at.asit.pdfover.signator.SignatureParameter;
/**