package jalview.gui;
+import jalview.datamodel.ColumnSelection;
import jalview.schemes.AnnotationColourGradient;
import jalview.util.MessageManager;
public class AnnotationColumnChooser extends AnnotationRowFilter
{
+ private ColumnSelection oldColumnSelection;
+
private JComboBox<String> annotations;
JButton ok = new JButton();
{
return;
}
-
+ setOldColumnSelection(av.getColumnSelection());
adjusting = true;
setAnnotations(new JComboBox<String>(
public void reset()
{
av.getColumnSelection().clear();
+ av.setColumnSelection(this.getOldColumnSelection());
}
public void valueChanged(boolean updateAllAnnotation)
ap.alignmentChanged();
ap.paintAlignment(true);
}
+
+ public ColumnSelection getOldColumnSelection()
+ {
+ return oldColumnSelection;
+ }
+
+ public void setOldColumnSelection(ColumnSelection currentColumnSelection)
+ {
+ if (currentColumnSelection != null)
+ {
+ this.oldColumnSelection = new ColumnSelection();
+ this.oldColumnSelection.setElementsFrom(currentColumnSelection);
+ }
+ }
}