JAL-4034 Fix #2 show an icon and a button to press to initiate search
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index 5a681f1..9976604 100755 (executable)
@@ -20,6 +20,8 @@
  */
 package jalview.gui;
 
+import java.util.Locale;
+
 import jalview.analysis.AlignSeq;
 import jalview.analysis.AlignmentUtils;
 import jalview.datamodel.Alignment;
@@ -135,7 +137,7 @@ public class AnnotationLabels extends JPanel
    */
   public AnnotationLabels(AlignmentPanel ap)
   {
-         
+
     this.ap = ap;
     av = ap.av;
     ToolTipManager.sharedInstance().registerComponent(this);
@@ -291,27 +293,26 @@ public class AnnotationLabels extends JPanel
     EditNameDialog dialog = new EditNameDialog(annotation.label,
             annotation.description, name, description);
 
-    dialog.showDialog(ap.alignFrame, title,
-            new Runnable()
-            {
-              @Override
-              public void run()
-              {
-                annotation.label = dialog.getName();
-                String text = dialog.getDescription();
-                if (text != null && text.length() == 0)
-                {
-                  text = null;
-                }
-                annotation.description = text;
-                if (addNew)
-                {
-                  ap.av.getAlignment().addAnnotation(annotation);
-                  ap.av.getAlignment().setAnnotationIndex(annotation, 0);
-                }
-                ap.refresh(true);
-              }
-            });
+    dialog.showDialog(ap.alignFrame, title, new Runnable()
+    {
+      @Override
+      public void run()
+      {
+        annotation.label = dialog.getName();
+        String text = dialog.getDescription();
+        if (text != null && text.length() == 0)
+        {
+          text = null;
+        }
+        annotation.description = text;
+        if (addNew)
+        {
+          ap.av.getAlignment().addAnnotation(annotation);
+          ap.av.getAlignment().setAnnotationIndex(annotation, 0);
+        }
+        ap.refresh(true);
+      }
+    });
   }
 
   @Override
@@ -436,8 +437,7 @@ public class AnnotationLabels extends JPanel
    * @param pop
    */
   static void addConsensusMenuOptions(AlignmentPanel ap,
-          AlignmentAnnotation ann,
-          JPopupMenu pop)
+          AlignmentAnnotation ann, JPopupMenu pop)
   {
     pop.addSeparator();
 
@@ -754,12 +754,12 @@ public class AnnotationLabels extends JPanel
       // jalview.gui.SeqPanel.mouseMoved(..) that formats sequence feature
       // tooltips
       String desc = aa.getDescription(true).trim();
-      if (!desc.toLowerCase().startsWith(HTML_START_TAG))
+      if (!desc.toLowerCase(Locale.ROOT).startsWith(HTML_START_TAG))
       {
         tooltip.append(HTML_START_TAG);
         desc = desc.replace("<", "&lt;");
       }
-      else if (desc.toLowerCase().endsWith(HTML_END_TAG))
+      else if (desc.toLowerCase(Locale.ROOT).endsWith(HTML_END_TAG))
       {
         desc = desc.substring(0, desc.length() - HTML_END_TAG.length());
       }