private static final int MIN_WIDTH = 400;
private static final int MIN_HEIGHT = 400;
+
+ /**
+ * when true, constructor is still executing - so ignore UI events
+ */
+ protected volatile boolean inConstruction = true;
/**
* Constructor
};
});
frame.setLayer(JLayeredPane.PALETTE_LAYER);
+ inConstruction = false;
}
protected void popupSort(final int selectedRow, final String type,
public void itemStateChanged(ItemEvent evt)
{
fr.setGroupVisibility(check.getText(), check.isSelected());
- af.alignPanel.getSeqPanel().seqCanvas.repaint();
- if (af.alignPanel.overviewPanel != null)
- {
- af.alignPanel.overviewPanel.updateOverviewImage();
- }
-
resetTable(new String[] { grp });
+ af.alignPanel.paintAlignment(true, true);
}
});
groupPanel.add(check);
public void invertSelection()
{
- for (int i = 0; i < table.getRowCount(); i++)
+ Object[][] data = ((FeatureTableModel) table.getModel()).getData();
+ for (int i = 0; i < data.length; i++)
{
- Boolean value = (Boolean) table.getValueAt(i, 2);
-
- table.setValueAt(new Boolean(!value.booleanValue()), i, 2);
+ data[i][2] = !(Boolean) data[i][2];
}
+ updateFeatureRenderer(data, true);
+ table.repaint();
}
public void orderByAvWidth()
@Override
public void stateChanged(ChangeEvent evt)
{
- fr.setTransparency((100 - transparency.getValue()) / 100f);
- af.alignPanel.paintAlignment(true, true);
+ if (!inConstruction)
+ {
+ fr.setTransparency((100 - transparency.getValue()) / 100f);
+ af.alignPanel.paintAlignment(true,true);
+ }
}
});