public class FilterRowDataProvider<T> extends Object implements IDataProvider, IPersistable
DOT, VALUE_SEPARATOR
Constructor and Description |
---|
FilterRowDataProvider(IFilterStrategy<T> filterStrategy,
ILayer columnHeaderLayer,
IDataProvider columnHeaderDataProvider,
IConfigRegistry configRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
clearAllFilters()
Clear all filters that are currently applied.
|
int |
getColumnCount() |
Object |
getDataValue(int columnIndex,
int rowIndex)
Gets the value at the given column and row index.
|
Map<Integer,Object> |
getFilterIndexToObjectMap()
Returns the map that contains the filter objects mapped to the column index.
|
int |
getRowCount() |
void |
loadState(String prefix,
Properties properties)
Restore the state out of the given Properties identified by the specified prefix.
|
void |
saveState(String prefix,
Properties properties)
Saves the state to the given Properties using the specified prefix.
|
void |
setDataValue(int columnIndex,
int rowIndex,
Object newValue)
Sets the value at the given column and row index.
|
void |
setFilterIndexToObjectMap(Map<Integer,Object> filterIndexToObjectMap)
Set the map that contains the filter objects mapped to the column index to be the
data storage for the inserted filters into the filter row by the user.
|
public FilterRowDataProvider(IFilterStrategy<T> filterStrategy, ILayer columnHeaderLayer, IDataProvider columnHeaderDataProvider, IConfigRegistry configRegistry)
filterStrategy
- The IFilterStrategy
to which the set filter value should be applied.columnHeaderLayer
- The column header layer where this IDataProvider
is used for filtering
needed for retrieval of column indexes and firing according filter events..columnHeaderDataProvider
- The IDataProvider
of the column header needed to retrieve the real
column count of the column header and not a transformed one.configRegistry
- The IConfigRegistry
needed to retrieve the IDisplayConverter
for
converting the values on state save/load operations.public Map<Integer,Object> getFilterIndexToObjectMap()
Note: Usually it is not intended to modify this Map directly. You should rather call
setDataValue(int, int, Object)
or clearAllFilters()
to modify this Map to ensure consistency in other framework code. It is made visible
because there might be code that needs to modify the Map without index transformations
or firing events.
public void setFilterIndexToObjectMap(Map<Integer,Object> filterIndexToObjectMap)
Note: Usually it is not intended to set this Map from the outside as it is created in the constructor. But there might be use cases where you e.g. need to connect filter rows to each other. In this case it might be useful to override the local Map with the one form another FilterRowDataProvider. This is not a typical use case, therefore you should use this method carefully!
filterIndexToObjectMap
- Map that contains the filter objects mapped to the column index.public int getColumnCount()
getColumnCount
in interface IDataProvider
public Object getDataValue(int columnIndex, int rowIndex)
IDataProvider
getDataValue
in interface IDataProvider
public int getRowCount()
getRowCount
in interface IDataProvider
public void setDataValue(int columnIndex, int rowIndex, Object newValue)
IDataProvider
setDataValue
in interface IDataProvider
public void saveState(String prefix, Properties properties)
IPersistable
saveState
in interface IPersistable
prefix
- The prefix to use for the state keys. Is also used as the state
configuration name.properties
- The Properties instance to save the state to.public void loadState(String prefix, Properties properties)
IPersistable
loadState
in interface IPersistable
prefix
- The prefix to use for the state keys. Is also used as the state
configuration name.properties
- The Properties instance to load the state from.public void clearAllFilters()
Copyright © 2013. All Rights Reserved.