From 31ffc34cba5aa9731c8b23d71e02db17a2998170 Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 31 Oct 2012 16:36:58 +0000 Subject: Change sig ph border to main bar color git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12751 3a0b52a2-8410-0410-bc02-ff6273a87459 --- .../asit/pdfover/gui/composites/PositioningComposite.java | 5 +++++ .../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. @@ -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