return table;
}
protected void initFilters(JTable table) {
TableRowSorter sorter = new TableRowSorter(table.getModel());
table.setRowSorter(sorter);
if (visualsFilter == null) {
visualsFilter = new RowFilter<UIDefaultsTableModel,Integer>() {
public boolean include(Entry<? extends UIDefaultsTableModel, ? extends Integer> entry) {
UIDefaultsTableModel model = entry.getModel();
Object defaultsValue = model.getValueAt(entry.getIdentifier().intValue(),
UIDefaultsTableModel.VALUE_COLUMN);
return defaultsValue instanceof Color ||
defaultsValue instanceof Font ||
defaultsValue instanceof Icon;
}
};
}
if (onlyVisualsCheckBox.isSelected()) {
sorter.setRowFilter(visualsFilter);
}
}