use of javax.swing.event.TableModelListener in project zaproxy by zaproxy.
the class UsersTableModelUnitTest method shouldAddTableModelListeners.
@Test
void shouldAddTableModelListeners() {
// Given
TableModelListener listener = createTestTableModelListener();
UsersTableModel usersTableModel = new UsersTableModel();
// When
usersTableModel.addTableModelListener(listener);
// Then
assertThat(usersTableModel.getTableModelListeners(), is(arrayContaining(listener)));
}
use of javax.swing.event.TableModelListener in project zaproxy by zaproxy.
the class UsersTableModelUnitTest method shouldRemoveTableModelListeners.
@Test
void shouldRemoveTableModelListeners() {
// Given
TableModelListener listener = createTestTableModelListener();
UsersTableModel usersTableModel = new UsersTableModel();
usersTableModel.addTableModelListener(listener);
// When
usersTableModel.removeTableModelListener(listener);
// Then
assertThat(usersTableModel.getTableModelListeners(), is(emptyArray()));
}
use of javax.swing.event.TableModelListener in project zaproxy by zaproxy.
the class OptionsCheckForUpdatesPanel method getScriptDirModel.
private OptionsAutoupdateDirsTableModel getScriptDirModel() {
if (scriptDirModel == null) {
scriptDirModel = new OptionsAutoupdateDirsTableModel();
scriptDirModel.addTableModelListener(new TableModelListener() {
@Override
public void tableChanged(TableModelEvent e) {
repopulateDownloadDirs();
}
});
}
return scriptDirModel;
}
Aggregations