|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.erichseifert.gral.data.AbstractDataSource
de.erichseifert.gral.data.filters.Filter
public abstract class Filter
Abstract class that provides basic functions for filtering arbitrary columns of a DataSource, in other words a set of one-dimensional data.
Functionality includes:
Filter.Mode
)Only filtered columns are stored. Access to unfiltered columns is delegated to the original data source.
Nested Class Summary | |
---|---|
static class |
Filter.Mode
Behavior when engaging the borders of a column, so that the filter would need more data values than available. |
Constructor Summary | |
---|---|
Filter(DataSource original,
Filter.Mode mode,
int... cols)
Creates a new Filter object with the specified DataSource, Mode and columns to filter. |
Method Summary | |
---|---|
void |
dataChanged(DataSource data)
Method that is invoked by objects that provide support for DataListeners. |
Number |
get(int col,
int row)
Returns the row with the specified index. |
int |
getColumnCount()
Returns the number of columns of the data source. |
Filter.Mode |
getMode()
Returns the Mode of this Filter. |
int |
getRowCount()
Returns the number of rows of the data source. |
void |
setMode(Filter.Mode mode)
Sets the Mode the specified value. |
Methods inherited from class de.erichseifert.gral.data.AbstractDataSource |
---|
addDataListener, getColumn, getRow, getStatistics, iterator, removeDataListener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Filter(DataSource original, Filter.Mode mode, int... cols)
original
- DataSource to be filtered.mode
- Mode to be used.cols
- Column indexes to be filtered.Method Detail |
---|
public Number get(int col, int row)
DataSource
get
in interface DataSource
col
- index of the column to returnrow
- index of the row to return
public int getColumnCount()
DataSource
getColumnCount
in interface DataSource
public int getRowCount()
DataSource
getRowCount
in interface DataSource
public void dataChanged(DataSource data)
DataListener
dataChanged
in interface DataListener
data
- data that has changedpublic Filter.Mode getMode()
public void setMode(Filter.Mode mode)
mode
- Mode of filtering.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |