From a51a3e31f308c959e5d60160580a55d5d48bb1a0 Mon Sep 17 00:00:00 2001
From: tcarver <tjc>
Date: Wed, 23 May 2012 16:33:37 +0100
Subject: [PATCH] change the colour of the highlighted segment to red

---
 .../sanger/artemis/components/SegmentBorder.java  | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/uk/ac/sanger/artemis/components/SegmentBorder.java b/uk/ac/sanger/artemis/components/SegmentBorder.java
index 27078a7bc..31776adfa 100644
--- a/uk/ac/sanger/artemis/components/SegmentBorder.java
+++ b/uk/ac/sanger/artemis/components/SegmentBorder.java
@@ -40,10 +40,8 @@ public class SegmentBorder
   private int feature_direction;
  
   /**
-  *
   * Information stored in this object is used to draw the feature
   * segment borders.
-  *
   * @param highlight_feature  true if the feature is highlighted
   * @param highlight_segment  true if the segment is highlighted
   * @param draw_arrow         true if an arrow is to be drawn on this segment
@@ -53,8 +51,9 @@ public class SegmentBorder
   * @param feature_direction  feature direction 
   *
   */
-  public SegmentBorder(boolean highlight_feature, boolean highlight_segment, 
-                       boolean draw_arrow, int x, int y, int width,
+  public SegmentBorder(final boolean highlight_feature, 
+                       final boolean highlight_segment, 
+                       final boolean draw_arrow, int x, int y, int width,
                        int feature_direction)
   {
     this.highlight_feature = highlight_feature;
@@ -71,18 +70,22 @@ public class SegmentBorder
 
   protected void drawSegmentBorder(Graphics g, int height, int arrowWidth)
   {
-    Graphics2D g2d = (Graphics2D)g;
+    final Graphics2D g2d = (Graphics2D)g;
     if(highlight_feature)  // highlight selected features
     {
       // selected - highlight by drawing a thicker line
-      BasicStroke stroke = (BasicStroke)g2d.getStroke();
+      final BasicStroke stroke = (BasicStroke)g2d.getStroke();
 
       if(highlight_segment)
+      {
+        g2d.setColor(new Color(140,25,25));
         g2d.setStroke(new BasicStroke(4.f));
+      }
       else
         g2d.setStroke(new BasicStroke(3.f));
 
       g2d.drawRect(x, y, width, height);
+      g2d.setColor(Color.black);
       g2d.setStroke(stroke);
     }
     else
-- 
GitLab