import java.awt.event.MouseListener;
import java.awt.event.TextEvent;
import java.awt.event.TextListener;
-import java.util.Iterator;
+import java.util.ArrayList;
import java.util.Vector;
//import javax.swing.JPanel;
HiddenColumns oldHidden = av
.getAnnotationColumnSelectionState()
.getOldHiddenColumns();
- if (oldHidden != null
- && !oldHidden.getHiddenRegions().isEmpty())
+ if (oldHidden != null)
{
- for (Iterator<int[]> itr = oldHidden.getHiddenRegions()
- .iterator(); itr.hasNext();)
+ ArrayList<int[]> regions = oldHidden.getHiddenColumnsCopy();
+ for (int[] positions : regions)
{
- int positions[] = itr.next();
av.hideColumns(positions[0], positions[1]);
}
}
+ // TODO not clear why we need to hide all the columns (above) if we are
+ // going to copy the hidden columns over wholesale anyway
av.getAlignment().setHiddenColumns(oldHidden);
}
+ av.sendSelection();
ap.paintAlignment(true);
}
}
adjusting = true;
- float range = getCurrentAnnotation().graphMax * 1000
- - getCurrentAnnotation().graphMin * 1000;
+ // float range = getCurrentAnnotation().graphMax * 1000
+ // - getCurrentAnnotation().graphMin * 1000;
slider.setMinimum((int) (getCurrentAnnotation().graphMin * 1000));
slider.setMaximum((int) (getCurrentAnnotation().graphMax * 1000));
}
}
+ // show hidden columns here, before changing the column selection in
+ // filterAnnotations, because showing hidden columns has the side effect of
+ // adding them to the selection
+ av.showAllHiddenColumns();
av.getColumnSelection().filterAnnotations(
getCurrentAnnotation().annotations, filterParams);
- av.showAllHiddenColumns();
if (getActionOption() == ACTION_OPTION_HIDE)
{
av.hideSelectedColumns();
filterParams = null;
av.setAnnotationColumnSelectionState(this);
+ av.sendSelection();
ap.paintAlignment(true);
}