Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.table.group
Class ColumnNodeFilterMapper

java.lang.Object
  extended by com.citra.filter.tree.AbstractColumnFilterMapper
      extended by com.citra.filter.tree.NodeFilterMapper
          extended by com.citra.table.group.ColumnNodeFilterMapper
All Implemented Interfaces:
ColumnFilterMapper

public class ColumnNodeFilterMapper
extends NodeFilterMapper

ColumnNodeFilterMapper is a FilterMapper for filtering a treetable column model at each node. This mapper is created and used by ColumnFilterHeaderModel.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.citra.filter.tree.AbstractColumnFilterMapper
AbstractColumnFilterMapper.ColumnFilterTreeTableModel
 
Field Summary
protected  TreeTableColumnModel columnModel
          the assigned treetable column model
 
Fields inherited from class com.citra.filter.tree.AbstractColumnFilterMapper
ALL_STRING, columnFilterTreeTableModel
 
Constructor Summary
ColumnNodeFilterMapper(TreeTableColumnModel columnModel)
          Constructs a ColumnNodeFilterMapper.
 
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. If excludedModelIndexes is null, or is empty, all stored filters are applied.
 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.
protected  TableFilter createNodeFilter(Object[] list)
          Creates the table filter to assign.
 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.
protected  Object[] getNodesFilter(TableFilter filter)
          Retrieves the nodes that have been assigned to the table filter.
 TreeTableColumnModel getTreeTableColumnModel()
          Returns the treetable column model.
 void setTreeTableColumnModel(TreeTableColumnModel columnModel)
          Assigns a new treetable column model.
 
Methods inherited from class com.citra.filter.tree.NodeFilterMapper
commitFilters, getFilteredColumns, hasFilter, removeFilters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columnModel

protected TreeTableColumnModel columnModel
the assigned treetable column model

Constructor Detail

ColumnNodeFilterMapper

public ColumnNodeFilterMapper(TreeTableColumnModel columnModel)
Constructs a ColumnNodeFilterMapper.

Method Detail

applyFilters

public void applyFilters(FilterTreeTableModel ftm,
                         int[] excludedColumns)
Applies the stored filters to the supplied filterTreeTableModel, excluding a list of column indexes defined by excludedModelIndexes. If excludedModelIndexes is null, or is empty, all stored filters are applied.

Specified by:
applyFilters in interface ColumnFilterMapper
Overrides:
applyFilters in class NodeFilterMapper
Parameters:
ftm - the model to which the stored filters are applied
excludedColumns - an array of column indexes to exclude while filtering

commitFilters

public 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.

Specified by:
commitFilters in interface ColumnFilterMapper
Overrides:
commitFilters in class NodeFilterMapper
Parameters:
filterTreeTableModel - the model to which the filters are commited
f - the filter to use
modelIndex - the column

filterCancelled

public void filterCancelled()
Cancels the action of previously showing available filter expressions to the user.

Specified by:
filterCancelled in interface ColumnFilterMapper
Overrides:
filterCancelled in class NodeFilterMapper

filterVisible

public void filterVisible(int modelIndex,
                          CheckBoxTree tree,
                          TreeTableModel treeTableModel,
                          TreeTable table)
Method called when available filter expressions are made available to the user.

Specified by:
filterVisible in interface ColumnFilterMapper
Overrides:
filterVisible in class NodeFilterMapper
Parameters:
modelIndex - the column for which filter expressions are shown
tree - the tree that should be filled with a hierarchical filter expression structure
treeTableModel - the data model that holds a hierarchical filter expression structure
table - the treetable containing the structure

getTreeTableColumnModel

public TreeTableColumnModel getTreeTableColumnModel()
Returns the treetable column model.

Returns:
the assigned columnModel

setTreeTableColumnModel

public void setTreeTableColumnModel(TreeTableColumnModel columnModel)
Assigns a new treetable column model.

Parameters:
columnModel - the new column model to assign

createNodeFilter

protected TableFilter createNodeFilter(Object[] list)
Creates the table filter to assign.

Overrides:
createNodeFilter in class NodeFilterMapper
Parameters:
list - the list of objects to use as filter
Returns:
the table filter created

getNodesFilter

protected Object[] getNodesFilter(TableFilter filter)
Retrieves the nodes that have been assigned to the table filter.

Overrides:
getNodesFilter in class NodeFilterMapper
Parameters:
filter - the table filter that was assigned at the node
Returns:
the list of objects that were used as filter

Copyright © 2011 Citra Technologies. All Rights Reserved.