Search in sources :

Example 1 with FilterChooserDialog

use of com.cosylab.logging.settings.FilterChooserDialog 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);
        }
    });
}
Also used : Filterable(com.cosylab.logging.engine.Filterable) FiltersVector(com.cosylab.logging.engine.FiltersVector) FilterChooserDialog(com.cosylab.logging.settings.FilterChooserDialog)

Example 2 with FilterChooserDialog

use of com.cosylab.logging.settings.FilterChooserDialog 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);
}
Also used : Filterable(com.cosylab.logging.engine.Filterable) FiltersVector(com.cosylab.logging.engine.FiltersVector) FilterChooserDialog(com.cosylab.logging.settings.FilterChooserDialog)

Aggregations

Filterable (com.cosylab.logging.engine.Filterable)2 FiltersVector (com.cosylab.logging.engine.FiltersVector)2 FilterChooserDialog (com.cosylab.logging.settings.FilterChooserDialog)2