|
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.DefaultColumnFilterMapper
public class DefaultColumnFilterMapper
DefaultColumnFilterMapper is the default ColumnFilterMapper implementation that is a combination of node and level mappers. By default, a level mode is used.
Field Summary | |
---|---|
protected int |
defaultMode
the default mode to use when a column has not been assigned to a mapper |
static int |
LEVEL_MODE
the mode that is associated to the level mapper |
protected LevelFilterMapper |
levelMapper
the mapper used for presenting distinct values at each node level |
static int |
NODE_MODE
the mode that is associated to the node mapper |
protected NodeFilterMapper |
nodeMapper
the mapper used for presenting every node of a tree |
Constructor Summary | |
---|---|
DefaultColumnFilterMapper()
Constructs a DefaultColumnFilterMapper. |
|
DefaultColumnFilterMapper(LevelFilterMapper levelMapper)
Constructs a DefaultColumnFilterMapper. |
|
DefaultColumnFilterMapper(NodeFilterMapper nodeMapper)
Constructs a DefaultColumnFilterMapper. |
|
DefaultColumnFilterMapper(NodeFilterMapper nodeMapper,
LevelFilterMapper levelMapper)
Constructs a DefaultColumnFilterMapper. |
Method Summary | |
---|---|
void |
applyFilters(FilterTreeTableModel ftm,
int[] excludedColumns)
Applies the stored filters to the supplied filterTreeTableModel ,
excluding a list of column indexes defined by excludedModelIndexes . |
void |
clear(int modelIndex)
Removes the association made between a column and a node or level mapper. |
void |
commitFilters(FilterTreeTableModel filterTreeTableModel,
Filter f,
int modelIndex)
Stores and commits the filters for the column modelIndex for which
filter expressions were previously made available to the user. |
void |
filterCancelled()
Cancels the action of previously showing available filter expressions to the user. |
void |
filterVisible(int modelIndex,
CheckBoxTree tree,
TreeTableModel treeTableModel,
TreeTable table)
Method called when available filter expressions are made available to the user. |
int |
getDefaultMode()
Determines the default mode for a column if an association has not been explicitly made. |
int[] |
getFilteredColumns()
Returns an array of the columns that have filters. |
LevelFilterMapper |
getLevelMapper()
Returns the mapper used for presenting distinct values on each tree level. |
ColumnFilterMapper |
getMapper(int modelIndex)
Determines the mapper that will be used for a column. |
NodeFilterMapper |
getNodeMapper()
Returns the mapper used for presenting every node of a tree. |
boolean |
hasFilter(int modelIndex)
Determines whether filters for the column modelIndex exist. |
boolean |
isLevel(int modelIndex)
Determines whether a column is assigned to use the level mapper. |
boolean |
isNode(int modelIndex)
Determines whether a column is assigned to use the node mapper. |
boolean |
removeFilters(FilterTreeTableModel ftm,
int[] modelIndexes,
boolean commit)
Removes the stored filters for the supplied modelIndexes columns. |
void |
setDefaultMode(int defaultMode)
Assigns the default mode for a column if an association has not been explicitly made. |
void |
setLevel(int modelIndex)
Assigns a column to use the level mapper. |
void |
setNode(int modelIndex)
Assigns a column to use the node mapper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected NodeFilterMapper nodeMapper
protected LevelFilterMapper levelMapper
protected int defaultMode
public static final int NODE_MODE
public static final int LEVEL_MODE
Constructor Detail |
---|
public DefaultColumnFilterMapper()
public DefaultColumnFilterMapper(LevelFilterMapper levelMapper)
public DefaultColumnFilterMapper(NodeFilterMapper nodeMapper)
public DefaultColumnFilterMapper(NodeFilterMapper nodeMapper, LevelFilterMapper levelMapper)
Method Detail |
---|
public void applyFilters(FilterTreeTableModel ftm, int[] excludedColumns)
filterTreeTableModel
,
excluding a list of column indexes defined by excludedModelIndexes
.
If excludedModelIndexes
is null, or is empty, all stored filters are applied.
applyFilters
in interface ColumnFilterMapper
ftm
- the model to which the stored filters are appliedexcludedColumns
- an array of column indexes to exclude while filteringpublic void clear(int modelIndex)
modelIndex
- the columnpublic void commitFilters(FilterTreeTableModel filterTreeTableModel, Filter f, int modelIndex)
modelIndex
for which
filter expressions were previously made available to the user.
commitFilters
in interface ColumnFilterMapper
filterTreeTableModel
- the model to which the filters are commitedf
- the filter to usemodelIndex
- the columnpublic void filterCancelled()
filterCancelled
in interface ColumnFilterMapper
public void filterVisible(int modelIndex, CheckBoxTree tree, TreeTableModel treeTableModel, TreeTable table)
filterVisible
in interface ColumnFilterMapper
modelIndex
- the column for which filter expressions are showntree
- the tree that should be filled with a hierarchical filter expression structuretreeTableModel
- the data model that holds a hierarchical filter expression structuretable
- the treetable containing the structurepublic int getDefaultMode()
public int[] getFilteredColumns()
getFilteredColumns
in interface ColumnFilterMapper
public LevelFilterMapper getLevelMapper()
public ColumnFilterMapper getMapper(int modelIndex)
modelIndex
- the column
public NodeFilterMapper getNodeMapper()
public boolean hasFilter(int modelIndex)
modelIndex
exist.
hasFilter
in interface ColumnFilterMapper
modelIndex
- the column
public boolean isLevel(int modelIndex)
modelIndex
- the column
public boolean isNode(int modelIndex)
modelIndex
- the column
public boolean removeFilters(FilterTreeTableModel ftm, int[] modelIndexes, boolean commit)
modelIndexes
columns.
removeFilters
in interface ColumnFilterMapper
ftm
- the model from which the stored filters are removedmodelIndexes
- a list of columnscommit
- a flag indicating that the filter removal should be commited
public void setDefaultMode(int defaultMode)
defaultMode
- the default mode to assignpublic void setLevel(int modelIndex)
modelIndex
- the column to assign to the level mapperpublic void setNode(int modelIndex)
modelIndex
- the column to assign to the node mapper
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |