From: amwaterhouse Date: Thu, 10 May 2007 07:13:53 +0000 (+0000) Subject: Add show all hidden menu X-Git-Tag: Release_2_3~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3996c7f4eb74f4c5f5df3e42d9ff5f19cb3ec4e8;p=jalview.git Add show all hidden menu --- diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 0faa8b0..c0b8022 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -403,20 +403,19 @@ public class AnnotationLabels AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation(); + JPopupMenu pop = new JPopupMenu("Annotations"); + JMenuItem item = new JMenuItem(ADDNEW); + item.addActionListener(this); + if ( (aa == null) || (aa.length == 0)) { - JPopupMenu pop = new JPopupMenu("Annotations"); - JMenuItem item = new JMenuItem(ADDNEW); + item = new JMenuItem(SHOWALL); item.addActionListener(this); pop.add(item); pop.show(this, evt.getX(), evt.getY()); - return; } - JPopupMenu pop = new JPopupMenu("Annotations"); - JMenuItem item = new JMenuItem(ADDNEW); - item.addActionListener(this); pop.add(item); item = new JMenuItem(EDITNAME); item.addActionListener(this); @@ -434,7 +433,7 @@ public class AnnotationLabels item.addActionListener(this); pop.add(item); // annotation object should be typed - if (aa[selectedRow] == ap.av.consensus) + if (selectedRow