* the selection list (read-only view) is in selection order, not
* column order; make a copy so we can sort it
*/
- List<Integer> selected = new ArrayList<Integer>(viscols.getSelected());
+ List<Integer> selected = new ArrayList<>(viscols.getSelected());
Collections.sort(selected);
for (int index : selected)
{
public void propertyChange(PropertyChangeEvent evt)
{
// Respond to viewport range changes (e.g. alignment panel was scrolled)
- if (evt.getPropertyName().equals("startres")
- || evt.getPropertyName().equals("endres"))
+ if (evt.getPropertyName().equals("startres"))
{
fastPaint((int) evt.getNewValue() - (int) evt.getOldValue());
}
+ else if (evt.getPropertyName().equals("endres"))
+ {
+ // resize
+ }
}
}
{
if (!av.getWrapAlignment())
{
- if (evt.getPropertyName().equals("startres")
- || evt.getPropertyName().equals("endres"))
+ if (evt.getPropertyName().equals("startres"))
{
+ // scroll - startres and endres both change
+
// Make sure we're not trying to draw a panel
// larger than the visible window
ViewportRanges vpRanges = av.getRanges();
}
fastPaint(scrollX, 0);
}
- else if (evt.getPropertyName().equals("startseq")
- || evt.getPropertyName().equals("endseq"))
+ else if (evt.getPropertyName().equals("endres"))
+ {
+ // resize - only endres changes
+ }
+ else if (evt.getPropertyName().equals("startseq"))
{
+ // scroll
fastPaint(0, (int) evt.getNewValue() - (int) evt.getOldValue());
}
+ else if (evt.getPropertyName().equals("endseq"))
+ {
+ // resize
+ }
}
}
}