X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationLabels.java;h=ae7596dcd7f465833c1f2de823f1c95761688199;hb=dfa04e77181fccfa6229ffef1591fc9c622d9b39;hp=7d8a596637e5ebd879c3d81b02884ee1c78cb9cf;hpb=5ce14d0655d90366eea64987ee82555a02cf7998;p=jalview.git diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 7d8a596..ae7596d 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -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 . + * 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! @@ -530,7 +532,7 @@ public class AnnotationLabels extends JPanel implements MouseListener, return; } - JPopupMenu pop = new JPopupMenu("Annotations"); + JPopupMenu pop = new JPopupMenu(MessageManager.getString("label.annotations")); JMenuItem item = new JMenuItem(ADDNEW); item.addActionListener(this); pop.add(item); @@ -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); } } }