From e9e66fc8796bd19d914c9823f061aefb5bdfe9eb Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:09:39 +0000 Subject: 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 --- .../asit/pdfover/gui/composites/PositioningComposite.java | 5 +++++ .../java/at/asit/pdfover/gui/composites/SignaturePanel.java | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src/main/java') 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. @@ -129,6 +131,13 @@ public class SignaturePanel extends JPanel { this.sigPlaceholderTransparency = transparency; } + /** + * 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 { -- cgit v1.2.3