use of com.cosylab.logging.engine.Filterable in project ACS by ACS-Community.
the class LoggingClient method showTableFiltersDialog.
/**
Triggers the Filters dialog visual appearance
* as soon as the item "Filters" is clicked.
* @param arg1 java.awt.event.ActionEvent
*/
private void showTableFiltersDialog(java.awt.event.ActionEvent arg1) {
class TableFilterable implements Filterable {
/* (non-Javadoc)
* @see com.cosylab.logging.engine.Filterable#getFilters()
*/
@Override
public FiltersVector getFilters() {
return logEntryTable.getFilters();
}
/* (non-Javadoc)
* @see com.cosylab.logging.engine.Filterable#setFilters(com.cosylab.logging.engine.FiltersVector, boolean)
*/
@Override
public void setFilters(FiltersVector newFilters, boolean append) {
logEntryTable.setFilters(newFilters, append);
setTableFilterLbl();
}
}
if (filterChooserDialog == null) {
filterChooserDialog = new FilterChooserDialog("Filter chooser", this, new TableFilterable());
}
filterChooserDialog.setFilters(logEntryTable.getFilters());
SwingUtilities.invokeLater(new Runnable() {
public void run() {
enableFiltersWidgets(false);
filterChooserDialog.setVisible(true);
}
});
}
use of com.cosylab.logging.engine.Filterable 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);
}
Aggregations