com.ezware.oxbow.swingbits.table.filter
Class AbstractTableFilter<T extends JTable>
java.lang.Object
com.ezware.oxbow.swingbits.table.filter.AbstractTableFilter<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- ITableFilter<T>, Serializable
- Direct Known Subclasses:
- JTableFilter
public abstract class AbstractTableFilter<T extends JTable>
- extends Object
- implements ITableFilter<T>
Partial implementation of table filter
Created on Feb 10, 2011
- Author:
- Eugene Ryzhikov
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTableFilter
public AbstractTableFilter(T table)
getTable
public T getTable()
- Description copied from interface:
ITableFilter
- The table under filter
- Specified by:
getTable
in interface ITableFilter<T extends JTable>
- Returns:
execute
protected abstract boolean execute(int col,
Collection<DistinctColumnItem> items)
apply
public boolean apply(int col,
Collection<DistinctColumnItem> items)
- Description copied from interface:
ITableFilter
- Apply filter for specified column based on collection of distinct items
- Specified by:
apply
in interface ITableFilter<T extends JTable>
- Returns:
addChangeListener
public final void addChangeListener(IFilterChangeListener listener)
- Specified by:
addChangeListener
in interface ITableFilter<T extends JTable>
removeChnageListener
public final void removeChnageListener(IFilterChangeListener listener)
- Specified by:
removeChnageListener
in interface ITableFilter<T extends JTable>
fireFilterChange
public final void fireFilterChange()
getDistinctColumnItems
public Collection<DistinctColumnItem> getDistinctColumnItems(int column)
- Specified by:
getDistinctColumnItems
in interface ITableFilter<T extends JTable>
- Parameters:
column
- model column index
- Returns:
getFilterState
public Collection<DistinctColumnItem> getFilterState(int column)
- Specified by:
getFilterState
in interface ITableFilter<T extends JTable>
- Parameters:
column
- model column index
- Returns:
isFiltered
public boolean isFiltered(int column)
- Description copied from interface:
ITableFilter
- Checks if column is filtered
- Specified by:
isFiltered
in interface ITableFilter<T extends JTable>
- Parameters:
column
- model column index
- Returns:
- true if column is filtered
includeRow
public boolean includeRow(ITableFilter.Row row)
- Specified by:
includeRow
in interface ITableFilter<T extends JTable>
setFilterState
public void setFilterState(int column,
Collection<DistinctColumnItem> values)
clear
public void clear()
- Description copied from interface:
ITableFilter
- Clear the filter
- Specified by:
clear
in interface ITableFilter<T extends JTable>
Copyright © 2011. All Rights Reserved.