use of alma.acs.gui.widgets.CheckList.CheckListTableEntry in project ACS by ACS-Community.
the class FilterChooserDialog method saveFilters.
/**
* Save the filters to a XML files with a given name It create the File
* object then call overloaded method
*
* @param fileName The name of the xml file
*/
private void saveFilters(String fileName) {
if (fileName == null || fileName.length() == 0) {
throw new IllegalArgumentException("Inavlid file name: " + fileName);
}
// Check if the name terminate with xml
if (!fileName.toUpperCase().endsWith(".XML")) {
fileName = fileName + ".xml";
}
List<CheckListTableEntry> entries = filterList.getEntries();
FiltersVector filters = new FiltersVector();
for (CheckListTableEntry entry : entries) {
filters.addFilter((Filter) entry.getItem(), entry.isActive());
}
File f = new File(fileName);
try {
filters.saveFilters(f);
filterFileName = f.getAbsolutePath();
System.out.println("Saved " + filterFileName);
} catch (IOException e) {
System.err.println("Error opening " + fileName);
}
}
use of alma.acs.gui.widgets.CheckList.CheckListTableEntry in project ACS by ACS-Community.
the class FilterChooserDialog method applyFilters.
/**
* Apply the filters in the table of logs
*
*/
private void applyFilters() {
FiltersVector newFilters = new FiltersVector();
for (CheckListTableEntry entry : filterList.getEntries()) {
newFilters.addFilter((Filter) entry.getItem(), entry.isActive());
}
filterable.setFilters(newFilters, false);
}
Aggregations