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);
item.addActionListener(this);
pop.add(item);
// annotation object should be typed
- if (aa[selectedRow] == ap.av.consensus)
+ if (selectedRow<aa.length && aa[selectedRow] == ap.av.consensus)
{
pop.addSeparator();
final JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(