*/
package jalview.gui;
+import java.util.Locale;
+
import jalview.analysis.AlignSeq;
import jalview.analysis.AlignmentUtils;
import jalview.datamodel.Alignment;
*/
public AnnotationLabels(AlignmentPanel ap)
{
-
+
this.ap = ap;
av = ap.av;
ToolTipManager.sharedInstance().registerComponent(this);
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
* @param pop
*/
static void addConsensusMenuOptions(AlignmentPanel ap,
- AlignmentAnnotation ann,
- JPopupMenu pop)
+ AlignmentAnnotation ann, JPopupMenu pop)
{
pop.addSeparator();
// 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());
}