X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationLabels.java;h=9976604510dc300563812202b05c64ae553cd668;hb=66270dda280788c15956c7a0485f0b9adf03c62a;hp=5a681f14dd6d54120318e75e9ef70880f327e6b9;hpb=006890b02106eb31841e6e84d75f1027434823e0;p=jalview.git diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 5a681f1..9976604 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -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("<", "<"); } - 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()); }