diff options
author | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:09:39 +0000 |
---|---|---|
committer | tkellner <tkellner@174cde9d-5d70-4d2a-aa98-46368bc2aaf7> | 2013-04-10 19:09:39 +0000 |
commit | e9e66fc8796bd19d914c9823f061aefb5bdfe9eb (patch) | |
tree | 9aace9f97b6df9959a367110ed20900170c0b544 /pdf-over-gui/src/main/java | |
parent | 178be2b2d7e783a163904c218ae666cacdeac81c (diff) | |
download | pdf-over-e9e66fc8796bd19d914c9823f061aefb5bdfe9eb.tar.gz pdf-over-e9e66fc8796bd19d914c9823f061aefb5bdfe9eb.tar.bz2 pdf-over-e9e66fc8796bd19d914c9823f061aefb5bdfe9eb.zip |
Change sig ph border to main bar color
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@165 174cde9d-5d70-4d2a-aa98-46368bc2aaf7
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 5 | ||||
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index 233687c4..401b1f3c 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -16,6 +16,7 @@ package at.asit.pdfover.gui.composites; // Imports +import java.awt.Color; import java.awt.Frame; import java.awt.Image; import java.awt.event.MouseWheelEvent; @@ -104,6 +105,10 @@ public class PositioningComposite extends StateComposite { { this.viewer = new SignaturePanel(this.pdf); this.frame.add(this.viewer); + this.viewer.setSignaturePlaceholderBorderColor(new Color( + Constants.MAINBAR_ACTIVE_BACK_DARK.getRed(), + Constants.MAINBAR_ACTIVE_BACK_DARK.getGreen(), + Constants.MAINBAR_ACTIVE_BACK_DARK.getBlue())); } else this.viewer.setDocument(this.pdf); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index 0f8f92c6..b7edb669 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java @@ -91,6 +91,8 @@ public class SignaturePanel extends JPanel { int prevSigScreenWidth = 0; /** Previous Height of the signature placeholder in screen space */ int prevSigScreenHeight = 0; + /** Color of the signature placeholder border */ + private Color sigPlaceholderBorderColor = Color.BLUE; /** * Create a new PagePanel. @@ -130,6 +132,13 @@ public class SignaturePanel extends JPanel { } /** + * Set the color of the signature placeholder border + * @param color new signature placeholder border color + */ + public void setSignaturePlaceholderBorderColor(Color color) { + this.sigPlaceholderBorderColor = color; + } + /** * Change the currently displayed page * @param page the number of the page to display */ @@ -292,8 +301,8 @@ public class SignaturePanel extends JPanel { this.sigPlaceholderScaled.setRGB(0, 0, this.sigScreenWidth, this.sigScreenHeight, phpixels, 0, this.sigScreenWidth); } g.drawImage(this.sigPlaceholderScaled, sigX, sigY, null); - g.setColor(Color.BLUE); - g.drawRect(sigX, sigY, this.sigScreenWidth, this.sigScreenHeight); + g.setColor(this.sigPlaceholderBorderColor); + g.drawRect(sigX, sigY, this.sigScreenWidth-1, this.sigScreenHeight-1); } } else { |