Inherits javax::swing::RowFilter< LogTableDataModel, Integer >.
Public Member Functions | |
LogTableRowFilter (FiltersVector filtersVector, LogTypeHelper logLevel) | |
boolean | include (Entry<?extends LogTableDataModel,?extends Integer > entry) |
The filters used to hide/show logs in the table.
The filters defined in the FiltersVector
are entirely reused by this object. To enhance performances only the active filters are stored into an array built by the constructor. All the magic happens in the include
method where the filters are compared against the values of a row of the table.
alma.acs.logging.table.LogTableRowFilter.LogTableRowFilter | ( | FiltersVector | filtersVector, | |
LogTypeHelper | logLevel | |||
) |
Constructor
filtersVector | The vector of engine filters (can be null or empty) | |
logLevel | The log level of the logs to filter out |
boolean alma.acs.logging.table.LogTableRowFilter.include | ( | Entry<?extends LogTableDataModel,?extends Integer > | entry | ) |
Compare the entry with the filters.
The entry represents a row of the table and it is possible to get the values of all the cells of the row using an index. The order of the columns is independent of the way the appear in the table and therefore is like this:
The filtering is done by getting the value to check against the filter from the column (index) containing it in entry
. It is possible to know which field a filter wants to filter by reading the Filter.field
property.
Once we have the filter and the value to filter, we can use filter.applyTo(Object obj)
method to check if the row matches the filter.
entry | The entry to check against filters |
true
if the entry passed the filters and must be displayed in the table References com.cosylab.logging.engine.Filter.applyTo(), and com.cosylab.logging.engine.Filter.field.