|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sciapp.filter.tree.TreeFilterHeaderModel
public abstract class TreeFilterHeaderModel
TreeFilterHeaderModel is used to provide real-time row filtering via a component that is installed on the table header.
| Field Summary | |
|---|---|
static int |
ALL_VALUES_MODE
Defines the filter mode for showing all objects under a certain column |
protected boolean |
autoCreateAllFilters
A flag that if true will automatically install a filter for each column added to the table. |
protected int |
columnShowing
the column of the header that is currently showing available filter expressions. |
protected HashMap |
defaultFiltersByColumnClass
A table that contains filters indexed by class. |
protected DefaultFilterTreeTableModel |
dynamicFilterTreeTableModel
An internal filter tree table model providing a filtered model according to the mode installed. |
protected FilterTableHeader |
filterHeader
The header that is installed on the table. |
protected int |
filterMode
The mode that is being employed to populate the available filter expressions. |
protected FilterTreeTableModel |
filterTreeTableModel
The FilterTreeTableModel that will be used to process the filter events. |
protected ColumnFilterMapper |
mapper
The mapper responsible for creating, installing and assigning filters. |
static int |
PROGRESSIVE_MODE
Defines the filter mode for showing objects depending on all the filters currently installed. |
protected boolean |
removeOnInvisible
flag to indicate that the filter should be removed once the column is no longer shown in the table. |
| Constructor Summary | |
|---|---|
TreeFilterHeaderModel()
Constructs a TreeFilterHeaderModel. |
|
| Method Summary | |
|---|---|
void |
attachToTable(JTable table,
FilterTreeTableModel ftm)
Installs this TreeFilterHeaderModel instance to a table, by explicitly specifying the FilterTreeTableModel object that will process filter events. |
void |
attachToTable(TreeTable treetable)
Installs this TreeFilterHeaderModel instance to a treetable. |
protected void |
createDefaultFilters()
Creates default filters for objects, strings, numbers and boolean values. |
protected abstract ColumnFilterMapper |
createFilterMapper()
Creates a new instance of the column filter mapper that will be used to install and uninstall the filters. |
protected FilterTableHeader |
createTableHeader()
Returns a new instance of the header that will be installed on the table. |
boolean |
getAutoCreateAllFilters()
Returns the autoCreateAllFilters property value. |
int |
getColumnShowing()
Returns the column that is currently showing available filter expressions. |
Filter |
getDefaultFilter(Class columnClass)
Returns the filter to use for the class defined by columnClass. |
Filter |
getFilter(int viewIndex)
Returns a filter object for the column with view index viewIndex. |
ColumnFilterMapper |
getFilterMapper()
Creates the assigned column filter mapper that will be used to install and uninstall the column filters. |
int |
getFilterMode()
Returns the mode that is being employed to populate the available filter expressions. |
boolean |
getRemoveOnInvisible()
Determines whether the filter should be removed once the column is no longer visible in the table. |
FilterTableHeader |
getTableHeader()
Returns the header that will be used for displaying a visual representation of a filter on columns. |
boolean |
hasFilter(int viewIndex)
Determines whether a column has a filter installed. |
boolean |
hasFilterControl(int viewIndex)
Determines whether a column has a filter control installed. |
Class |
inferColumnClass(int viewIndex)
A utility method to retrieve the class for the objects under the column at viewIndex
In most cases, this is similar to calling getColumnClass on the table. |
void |
removeFilter(int viewIndex)
Removes all installed filters from a column. |
void |
removeFilterControlFromColumn(TableColumn aColumn)
Removes a filter control previously installed on a column. |
void |
removeFilterControlFromColumns()
Removes the filter controls from all columns. |
void |
removeFromTable()
Removes this TreeFilterHeaderModel instance from the table to which it was previously installed. |
protected abstract void |
removeRenderer(TableColumn aColumn)
Remove the renderer for aColumn. |
void |
setAutoCreateAllFilters(boolean newAutoCreateAllFilters)
Assigns a new value for the autoCreateAllFilters property. |
protected void |
setColumnShowing(int viewIndex)
Sets the column for which the user requested a filter to appear. |
void |
setDefaultFilter(Class columnClass,
Filter filter)
Sets the default filter for columnClass. |
void |
setFilterControlInColumn(TableColumn aColumn)
Installs a filter on the supplied column. |
void |
setFilterControlInColumns()
Installs filters on all columns. |
void |
setFilterMapper(ColumnFilterMapper mapper)
Assigns the column filter mapper that will be used to install and uninstall the column filters. |
void |
setFilterMode(int mode)
Assigns a mode that is being employed to populate the available filter expressions. |
void |
setModel(FilterTreeTableModel ftm)
Assigns the filter tree table model that will be used to provide the filtering. |
void |
setModel(TreeTableModel model)
Assigns the filter tree table model that will be used to provide the filtering. |
void |
setRemoveOnInvisible(boolean removeOnInvisible)
Determines whether the filter should be removed once the column is no longer visible in the table. |
protected abstract void |
setRenderer(TableColumn aColumn)
Assigns a renderer for aColumn. |
void |
setTableHeader(FilterTableHeader header)
Associates a header that will be used for displaying a visual representation of a filter on columns. |
abstract void |
updateUI()
Calls to this method should update all components that are used to display the filter on the header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.sciapp.filter.FilterHeaderCallback |
|---|
shouldProcessEvent |
| Field Detail |
|---|
protected boolean removeOnInvisible
protected ColumnFilterMapper mapper
protected DefaultFilterTreeTableModel dynamicFilterTreeTableModel
protected FilterTreeTableModel filterTreeTableModel
protected FilterTableHeader filterHeader
protected boolean autoCreateAllFilters
protected HashMap defaultFiltersByColumnClass
protected int columnShowing
public static final int ALL_VALUES_MODE
public static final int PROGRESSIVE_MODE
protected int filterMode
| Constructor Detail |
|---|
public TreeFilterHeaderModel()
| Method Detail |
|---|
public void attachToTable(TreeTable treetable)
TreeTableModelMap, contain one in the
chain of TreeTableModelMaps. This FilterTreeTableModel will be used to provide the filtering.
treetable - the table on which the TreeFilterHeaderModel is installed.
public void attachToTable(JTable table,
FilterTreeTableModel ftm)
table - the table on which the TreeFilterHeaderModel is installed.ftm - the FilterTreeTableModel that provides the filtering.protected void createDefaultFilters()
protected abstract ColumnFilterMapper createFilterMapper()
protected FilterTableHeader createTableHeader()
public boolean getAutoCreateAllFilters()
public int getColumnShowing()
public Filter getDefaultFilter(Class columnClass)
columnClass - the class to which a filter is associated.
public Filter getFilter(int viewIndex)
viewIndex.
The filter can be used to filter the model.
By default, this method will retrieve the class of the supplied column and call
getDefaultFilter(java.lang.Class) to return the filter.
viewIndex - the view index of the column
public ColumnFilterMapper getFilterMapper()
public int getFilterMode()
public boolean getRemoveOnInvisible()
public FilterTableHeader getTableHeader()
public boolean hasFilter(int viewIndex)
viewIndex - the view index of the column.
viewIndex has a filter installed, false otherwise.public boolean hasFilterControl(int viewIndex)
viewIndex - the view index of the column.
viewIndex has a filter control installed, false otherwise.public Class inferColumnClass(int viewIndex)
viewIndex
In most cases, this is similar to calling getColumnClass on the table.
viewIndex - the view index of the column.
public void removeFilter(int viewIndex)
viewIndex - the view index of the columnpublic void removeFilterControlFromColumn(TableColumn aColumn)
aColumn - the column from which the filter control we want removed.public void removeFilterControlFromColumns()
public void removeFromTable()
protected abstract void removeRenderer(TableColumn aColumn)
aColumn.
aColumn - the column which renderer we want to remove.public void setAutoCreateAllFilters(boolean newAutoCreateAllFilters)
newAutoCreateAllFilters - boolean the new value to assignprotected void setColumnShowing(int viewIndex)
viewIndex - the view index of the column showing filter expressions.
public void setDefaultFilter(Class columnClass,
Filter filter)
columnClass - the Class with which a filter we want to associatefilter - the filter to setpublic void setFilterControlInColumn(TableColumn aColumn)
aColumn - the column for which a filter we want to add.public void setFilterControlInColumns()
public void setFilterMapper(ColumnFilterMapper mapper)
mapper - the column filter mapper to assign.public void setFilterMode(int mode)
mode - the new current filter mode to assign.public void setModel(FilterTreeTableModel ftm)
ftm - the new filter tree table model to assign.public void setModel(TreeTableModel model)
model must be an instance of FilterTreeTableModel, or, if it is a TreeTableModelMap,
it should contain one FilterTreeTableModel in its chain of TreeTableModelMap.
The first FilterTreeTableModel found will be used in the latter case.
model - the treetablemodel to search for a FilterTreeTableModel and assign itpublic void setRemoveOnInvisible(boolean removeOnInvisible)
removeOnInvisible - true, if the filter should be removed, false otherwiseprotected abstract void setRenderer(TableColumn aColumn)
aColumn.
aColumn - the column to which a renderer we want to assign.public void setTableHeader(FilterTableHeader header)
header - the new header to assignpublic abstract void updateUI()
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||