diff options
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java | 5 | ||||
-rw-r--r-- | trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java | 13 |
2 files changed, 16 insertions, 2 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 233687c4..401b1f3c 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 @@ -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/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 0f8f92c6..b7edb669 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 @@ -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 { |