+ // JAL-1264 hide all sequence-specific annotations of this type
+ final String label = aa[selectedRow].label;
+ if (selectedRow < aa.length)
+ {
+ if (aa[selectedRow].sequenceRef != null)
+ {
+ JMenuItem hideType = new JMenuItem();
+ String text = MessageManager.getString("label.hide_all") + " " + label;
+ hideType.setText(text);
+ hideType.addActionListener(new ActionListener()
+ {
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ for (AlignmentAnnotation ann : ap.av.getAlignment()
+ .getAlignmentAnnotation())
+ {
+ if (ann.sequenceRef != null && ann.label != null
+ && ann.label.equals(label))
+ {
+ ann.visible = false;
+ }
+ }
+ refresh();
+ }
+ });
+ pop.add(hideType);
+ }
+ }