X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationPanel.java;h=b18501e4695a5e85e768bf45a3902bca69ee64f3;hb=a8f483d04205bb8273ee311c12968b7e86d205fa;hp=8a222884824b30fa14c8d586e0fa664fb9f7e8da;hpb=865a855a4ca87eadb3e5ff284ed32ed307d9c34b;p=jalview.git diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 8a22288..b18501e 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. @@ -21,11 +21,13 @@ package jalview.gui; import java.awt.*; import java.awt.event.*; import java.awt.image.*; + import javax.swing.*; import jalview.datamodel.*; import jalview.renderer.AnnotationRenderer; import jalview.renderer.AwtRenderPanelI; +import jalview.util.MessageManager; /** * AnnotationPanel displays visible portion of annotation rows below unwrapped @@ -267,7 +269,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, else if (evt.getActionCommand().equals(LABEL)) { String exMesg = collectAnnotVals(anot, av.getColumnSelection(), LABEL); - String label = JOptionPane.showInputDialog(this, "Enter label", + String label = JOptionPane.showInputDialog(this, MessageManager.getString("label.enter_label"), exMesg); if (label == null) @@ -349,7 +351,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, } String label = JOptionPane.showInputDialog( - "Enter a label for the structure?", symbol); + MessageManager.getString("label.enter_label_for_the_structure"), symbol); if (label == null) { @@ -359,8 +361,11 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, if ((label.length() > 0) && !aa[activeRow].hasText) { aa[activeRow].hasText = true; + if (evt.getActionCommand().equals(STEM)) + { + aa[activeRow].showAllColLabels=true; + } } - for (int i = 0; i < av.getColumnSelection().size(); i++) { int index = av.getColumnSelection().columnAt(i); @@ -375,6 +380,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, anot[index].secondaryStructure = type; anot[index].displayCharacter = label; + } } av.getAlignment().validateAnnotation(aa[activeRow]); @@ -482,7 +488,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, return; } - JPopupMenu pop = new JPopupMenu("Structure type"); + JPopupMenu pop = new JPopupMenu(MessageManager.getString("label.structure_type")); JMenuItem item; /* * Just display the needed structure options @@ -664,7 +670,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, && aa[row].annotations[res].description != null && aa[row].annotations[res].description.length() > 0) { - this.setToolTipText(aa[row].annotations[res].description); + this.setToolTipText(""+JvSwingUtils.wrapTooltip(aa[row].annotations[res].description)+""); } else { @@ -923,7 +929,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, g.setColor(Color.black); if (av.validCharWidth) { - g.drawString("Alignment has no annotations", 20, 15); + g.drawString(MessageManager.getString("label.alignment_has_no_annotations"), 20, 15); } return;