X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationPanel.java;h=4a5fc8b081dbc03d00e6cfe6970cf7f3be61c2d4;hb=a8f483d04205bb8273ee311c12968b7e86d205fa;hp=f4b22125b6b7cd94ad24648232d383759f9d3242;hpb=f52d7fc6ab9bf2c926f0208c225d3dc6e65c8ecf;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index f4b2212..4a5fc8b 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8) - * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * @@ -14,6 +14,7 @@ * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.appletgui; @@ -25,6 +26,7 @@ import java.awt.event.*; import jalview.datamodel.*; import jalview.renderer.AnnotationRenderer; import jalview.renderer.AwtRenderPanelI; +import jalview.util.MessageManager; public class AnnotationPanel extends Panel implements AwtRenderPanelI, AdjustmentListener, ActionListener, MouseListener, @@ -234,6 +236,10 @@ public class AnnotationPanel extends Panel 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++) @@ -253,10 +259,10 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, } } - aa[activeRow].validateRangeAndDisplay(); + av.getAlignment().validateAnnotation(aa[activeRow]); - adjustPanelHeight(); ap.alignmentChanged(); + adjustPanelHeight(); repaint(); return; @@ -317,7 +323,7 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, return; } - PopupMenu pop = new PopupMenu("Structure type"); + PopupMenu pop = new PopupMenu(MessageManager.getString("label.structure_type")); MenuItem item; /* * Just display the needed structure options @@ -618,7 +624,7 @@ public class AnnotationPanel extends Panel 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; @@ -630,10 +636,13 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, int scrollOffset = 0; - public void setScrollOffset(int value) + public void setScrollOffset(int value, boolean repaint) { scrollOffset = value; - repaint(); + if (repaint) + { + repaint(); + } } @Override @@ -657,10 +666,12 @@ public class AnnotationPanel extends Panel implements AwtRenderPanelI, @Override public int[] getVisibleVRange() { + if (ap!=null && ap.alabels!=null) + { int sOffset=-ap.alabels.scrollOffset; int visHeight = sOffset+ap.annotationPanelHolder.getHeight(); bounds[0] = sOffset; bounds[1]=visHeight; return bounds; + } else return null; } - }