|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swing.decorator.Filter
A Filter is used to filter the data presented in a
data-aware component such as a JXList or a
JXTable. Filtering involves interposing one or
more filters in a FilterPipeline between
a data model and a view to change the apparent order and/or number of records
in the data model.
FilterPipeline,
JXTable| Field Summary | |
protected ComponentAdapter |
adapter
|
| Constructor Summary | |
Filter()
Constructs a new filter for the first column of a data model (in model coordinates). |
|
Filter(int col)
Constructs a new filter for the specified column of a data model (in model coordinates). |
|
| Method Summary | |
int |
convertRowIndexToModel(int row)
Convert row index from view coordinates to model coordinates accounting for the presence of sorters and filters. |
int |
convertRowIndexToView(int row)
Convert row index from model coordinates to view coordinates accounting for the presence of sorters and filters. |
protected abstract void |
filter()
Performs the filter operation defined by this filter. |
protected abstract void |
generateMappingFromPrevious()
Generates the row mappings from the previous filter to this filter. |
int |
getColumnIndex()
Returns the model index of the column that this filter has been bound to. |
String |
getColumnName()
|
protected int |
getInputSize()
Returns the number of records that are processed by this filter. |
protected Object |
getInputValue(int row,
int column)
Returns the value of the cell at the specified row and column (in model coordinates). |
protected FilterPipeline |
getPipeline()
|
abstract int |
getSize()
Returns the number of records that remain in this filter's "view" after the input records have been filtered. |
Object |
getValueAt(int row,
int column)
Returns the value at the specified row and column. |
protected abstract void |
init()
Provides filter-specific initialization. |
boolean |
isCellEditable(int row,
int column)
|
void |
refresh()
Refreshes the internal state of the filter, performs the filter
operation and regenerates row mappings from the previous filter. |
protected void |
refresh(boolean reset)
Refreshes the internal state of the filter, optionally resetting the cache of existing row mappings from this filter to the previous filter. |
protected abstract void |
reset()
Resets the internal row mappings from this filter to the previous filter. |
void |
setValueAt(Object aValue,
int row,
int column)
Sets the specified value as the new value for the cell identified by the specified row and column index. |
protected abstract int |
translateFromPreviousFilter(int row)
Returns the row in this filter that maps to the specified row in the previous filter. |
protected abstract int |
translateToPreviousFilter(int row)
Returns the row in the previous filter that maps to the specified row in this filter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ComponentAdapter adapter
| Constructor Detail |
public Filter()
public Filter(int col)
col - column index in model coordinates| Method Detail |
protected abstract void init()
Filter
constructor.
protected abstract void reset()
protected abstract void generateMappingFromPrevious()
protected abstract void filter()
public void refresh()
filter
operation and regenerates row mappings from the previous filter. If this
filter is bound to a filter pipeline (as most filters are), it also triggers a
filterChanged
notification.
protected void refresh(boolean reset)
filter operation and regenerates
row mappings from the previous filter. If this filter is bound to a filter
pipeline (as most filters are), it also triggers a
filterChanged
notification.
reset - true if existing row mappings from this filter to the previous
filter should be reset; false, if the existing row mappings should be preserved.protected FilterPipeline getPipeline()
public int getColumnIndex()
public String getColumnName()
public int convertRowIndexToModel(int row)
row - row index in view coordinates
public int convertRowIndexToView(int row)
row - row index in model coordinates
public abstract int getSize()
protected abstract int translateFromPreviousFilter(int row)
convertRowIndexToView
row - a row index in the previous filter's "view" of the data model
protected abstract int translateToPreviousFilter(int row)
convertRowIndexToModel
row - a row index in this filter's "view" of the data model
public Object getValueAt(int row,
int column)
row - row index in view coordinatescolumn - column index in model coordinates
public void setValueAt(Object aValue,
int row,
int column)
aValue - new value for the specified cellrow - row index in view coordinatescolumn - column index in model coordinates
public boolean isCellEditable(int row,
int column)
protected int getInputSize()
protected Object getInputValue(int row,
int column)
row - in the coordinates of what is the filter's "view" of the modelcolumn - in model coordinates
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||