Merge branch 'Release_2_8_0b1_Branch' into try_r20b1_merge
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index 7d8a596..932b333 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
+ * Copyright (C) 2014 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -14,6 +14,7 @@
  * PURPOSE.  See the GNU General Public License for more details.
  * 
  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
  */
 package jalview.gui;
 
@@ -29,6 +30,7 @@ import javax.swing.*;
 
 import jalview.datamodel.*;
 import jalview.io.*;
+import jalview.util.MessageManager;
 
 /**
  * DOCUMENT ME!
@@ -882,8 +884,6 @@ public class AnnotationLabels extends JPanel implements MouseListener,
       for (int i = 0; i < aa.length; i++)
       {
         visible = true;
-        g.setColor(Color.black);
-
         if (!aa[i].visible)
         {
           hasHiddenRows = true;
@@ -916,6 +916,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
           // don't draw what isn't visible
           continue;
         }}
+        g.setColor(Color.black);
+
         offset = -aa[i].height / 2;
 
         if (aa[i].hasText)
@@ -931,6 +933,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         if (aa[i].graphGroup > -1)
         {
           int groupSize = 0;
+          // TODO: JAL-1291 revise rendering model so the graphGroup map is computed efficiently for all visible labels
           for (int gg = 0; gg < aa.length; gg++)
           {
             if (aa[gg].graphGroup == aa[i].graphGroup)
@@ -1008,8 +1011,8 @@ public class AnnotationLabels extends JPanel implements MouseListener,
 
     if (!av.wrapAlignment && ((aa == null) || (aa.length < 1)))
     {
-      g.drawString("Right click", 2, 8);
-      g.drawString("to add annotation", 2, 18);
+      g.drawString(MessageManager.getString("label.right_click"), 2, 8);
+      g.drawString(MessageManager.getString("label.to_add_annotation"), 2, 18);
     }
   }
 }