Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git] / src / jalview / gui / AnnotationLabels.java
index 461a3f1..439f535 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;
@@ -353,10 +355,8 @@ public class AnnotationLabels extends JPanel
       pop.show(this, evt.getX(), evt.getY());
       return;
     }
-
     final AlignmentAnnotation ann = aa[selectedRow];
     final boolean isSequenceAnnotation = ann.sequenceRef != null;
-
     item = new JMenuItem(EDITNAME);
     item.addActionListener(this);
     pop.add(item);
@@ -918,12 +918,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());
       }
@@ -1090,6 +1090,7 @@ public class AnnotationLabels extends JPanel
             PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
             ap.av.sendSelection();
           }
+
         }
       }
       return;
@@ -1134,7 +1135,7 @@ public class AnnotationLabels extends JPanel
             seqs, omitHidden, alignmentStartEnd);
 
     Toolkit.getDefaultToolkit().getSystemClipboard()
-            .setContents(new StringSelection(output), Desktop.instance);
+            .setContents(new StringSelection(output), Desktop.getInstance());
 
     HiddenColumns hiddenColumns = null;
 
@@ -1144,23 +1145,16 @@ public class AnnotationLabels extends JPanel
               av.getAlignment().getHiddenColumns());
     }
 
-    Desktop.jalviewClipboard = new Object[] { seqs, ds, // what is the dataset
-                                                        // of a consensus
-                                                        // sequence ? need to
-                                                        // flag
-        // sequence as special.
+    // what is the dataset of a consensus sequence? 
+    // need to flag sequence as special.
+    Desktop.getInstance().jalviewClipboard = new Object[] { seqs, ds, 
         hiddenColumns };
   }
 
-  /**
-   * DOCUMENT ME!
-   * 
-   * @param g1
-   *          DOCUMENT ME!
-   */
   @Override
   public void paintComponent(Graphics g)
   {
+
     int width = getWidth();
     if (width == 0)
     {
@@ -1175,6 +1169,7 @@ public class AnnotationLabels extends JPanel
     }
 
     drawComponent(g2, true, width);
+
   }
 
   /**