_bugPatternModel.addTableModelListener(new TableModelListener() {
public void tableChanged(final TableModelEvent e) {
if (e.getColumn() == 0 && TableModelEvent.UPDATE == e.getType()) {
final List<DetectorFactory> detectorFactoryList = _bugPatternModel.getEntries();
final DetectorFactory detectorFactory = detectorFactoryList.get(e.getFirstRow());
updatePreferences(detectorFactory);
/*if(detectorFactoryList.size() <= getModel().getCheckedEntries().size()) {
getEnableAllBox().setSelected(true);
} else {
getEnableAllBox().setSelected(false);
}*/
}
}
});
final ListSelectionModel selectionModel = _detectorsTable.getSelectionModel();
selectionModel.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(final ListSelectionEvent e) {
if (!e.getValueIsAdjusting() && _detectorsTable.getSelectedRow() > -1) {
final int modelIndex = _tableSorter.modelIndex(_detectorsTable.getSelectedRow());
final DetectorFactory detectorFactory = _bugPatternModel.getEntries().get(modelIndex);
final String description = getDetailedText(detectorFactory);
getTextArea().setText(description);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
getTextArea().scrollRectToVisible(new Rectangle(0, 0));