use of com.cosylab.logging.engine.FiltersVector in project ACS by ACS-Community.
the class LoggingClient method showEngineFiltersDialog.
/**
* Shows the dialog to set filters in the engine
*/
private void showEngineFiltersDialog() {
class EngineFilterable implements Filterable {
/* (non-Javadoc)
* @see com.cosylab.logging.engine.Filterable#getFilters()
*/
@Override
public FiltersVector getFilters() {
return engine.getFilters();
}
/* (non-Javadoc)
* @see com.cosylab.logging.engine.Filterable#setFilters(com.cosylab.logging.engine.FiltersVector, boolean)
*/
@Override
public void setFilters(FiltersVector newFilters, boolean append) {
engine.setFilters(newFilters, append);
setEngineFilterLbl();
}
}
if (engineFiltersDlg == null) {
engineFiltersDlg = new FilterChooserDialog("Engine filters", this, new EngineFilterable());
}
FiltersVector engineFilters = engine.getFilters();
if (engineFilters == null) {
engineFilters = new FiltersVector();
}
engineFiltersDlg.setFilters(engineFilters);
engineFiltersDlg.setVisible(true);
}
use of com.cosylab.logging.engine.FiltersVector in project ACS by ACS-Community.
the class ViewCoordinator method setFilter.
/**
* The table will show only logs that pass this filter.
* Previously installed jlog filters will get removed.
* <p>
* If the given filter is null, all filters will be removed.
*
* @param filter
*/
public void setFilter(Filter filter) {
// Normally we'd leave existing filters intact, using
// FiltersVector filters = getLogEntryTable().getFilters();
// but here we simply overwrite any previously applied filters
// including another AntennaNameFilter
FiltersVector filters = new FiltersVector();
if (filter != null) {
filters.add(filter);
filters.activateFilter(filter, true);
}
boolean shouldAppend = false;
// The following call would need to be sync'd if we had not disabled the user filter menu / button.
logEntryTable.setFilters(filters, shouldAppend);
client.setTableFilterLbl();
}
Aggregations