/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
* Copyright (C) 2014 The Jalview Authors
*
* This file is part of Jalview.
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
+import jalview.datamodel.ColumnSelection;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.PDBEntry;
import jalview.datamodel.Sequence;
JMenu groupLinksMenu;
+ JMenuItem hideInsertions = new JMenuItem();
+
/**
* Creates a new PopupMenu object.
*
editSequence_actionPerformed(actionEvent);
}
});
- makeReferenceSeq.setText("Mark as representative");
+ makeReferenceSeq.setText(MessageManager
+ .getString("label.mark_as_representative"));
makeReferenceSeq.addActionListener(new ActionListener()
{
}
});
+ hideInsertions.setText(MessageManager.getString("label.hide_insertions"));
+ hideInsertions.addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ hideInsertions_actionPerformed(e);
+ }
+ });
/*
* annotationMenuItem.setText("By Annotation");
* annotationMenuItem.addActionListener(new ActionListener() { public void
groupMenu.add(sequenceSelDetails);
add(groupMenu);
add(sequenceMenu);
- this.add(structureMenu);
+ add(structureMenu);
+ if (sequence!=null)
+ {
+ add(hideInsertions);
+ }
// annotations configuration panel suppressed for now
// groupMenu.add(chooseAnnotations);
}
refresh();
}
-protected void makeReferenceSeq_actionPerformed(ActionEvent actionEvent)
-{
- if (!ap.av.getAlignment().hasSeqrep())
- {
- // initialise the display flags so the user sees something happen
- ap.av.setDisplayReferenceSeq(true);
- ap.av.setColourByReferenceSeq(true);
- ap.av.getAlignment().setSeqrep(sequence);
- }
- else
+
+ protected void makeReferenceSeq_actionPerformed(ActionEvent actionEvent)
{
- if (ap.av.getAlignment().getSeqrep() == sequence)
+ if (!ap.av.getAlignment().hasSeqrep())
{
- ap.av.getAlignment().setSeqrep(null);
+ // initialise the display flags so the user sees something happen
+ ap.av.setDisplayReferenceSeq(true);
+ ap.av.setColourByReferenceSeq(true);
+ ap.av.getAlignment().setSeqrep(sequence);
}
else
{
- ap.av.getAlignment().setSeqrep(sequence);
+ if (ap.av.getAlignment().getSeqrep() == sequence)
+ {
+ ap.av.getAlignment().setSeqrep(null);
+ }
+ else
+ {
+ ap.av.getAlignment().setSeqrep(sequence);
+ }
}
+ refresh();
}
- refresh();
-}
+ protected void hideInsertions_actionPerformed(ActionEvent actionEvent)
+ {
+ if (sequence != null)
+ {
+ ColumnSelection cs = ap.av.getColumnSelection();
+ if (cs == null)
+ {
+ cs = new ColumnSelection();
+ }
+ cs.hideInsertionsFor(sequence);
+ ap.av.setColumnSelection(cs);
+ }
+ refresh();
+ }
protected void sequenceSelectionDetails_actionPerformed()
{
createSequenceDetailsReport(ap.av.getSequenceSelection());