org.apache.myfaces.tobago.model
Class TreeNodeDataModel

java.lang.Object
  extended by javax.faces.model.DataModel
      extended by org.apache.myfaces.tobago.model.TreeDataModel
          extended by org.apache.myfaces.tobago.model.TreeNodeDataModel
All Implemented Interfaces:
Iterable

public class TreeNodeDataModel
extends TreeDataModel

Implementation for a TreeNode that represents the data model for a tree.


Constructor Summary
TreeNodeDataModel(TreeNode data, boolean showRoot, ExpandedState expandedState)
           
 
Method Summary
 int getDepth()
           
 List<Boolean> getJunctions()
           
 int getLevel()
           
 TreePath getPath()
           
 String getRowClientId()
           
 int getRowCount()
           
 TreeNode getRowData()
           
 int getRowIndex()
           
 List<Integer> getRowIndicesOfChildren()
           
 String getRowParentClientId()
           
 Object getWrappedData()
           
 boolean isFolder()
           
 boolean isRowAvailable()
           
 boolean isRowVisible()
           
 void reset()
           
 void setRowClientId(String clientId)
           
 void setRowIndex(int rowIndex)
           
 void setWrappedData(Object data)
           
 void update(ExpandedState expandedState)
           
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, iterator, removeDataModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeNodeDataModel

public TreeNodeDataModel(TreeNode data,
                         boolean showRoot,
                         ExpandedState expandedState)
Parameters:
data - The tree data, which shall be wrapped.
showRoot - Is the root node visible.
expandedState - Defines which nodes are expanded, (XXX should it be so?) a value of null means all.
Method Detail

reset

public void reset()
Specified by:
reset in class TreeDataModel

update

public void update(ExpandedState expandedState)
Specified by:
update in class TreeDataModel

getRowCount

public int getRowCount()
Specified by:
getRowCount in class TreeDataModel

getRowData

public TreeNode getRowData()
Specified by:
getRowData in class javax.faces.model.DataModel

getRowIndex

public int getRowIndex()
Specified by:
getRowIndex in class TreeDataModel

getLevel

public int getLevel()
Specified by:
getLevel in class TreeDataModel

getPath

public TreePath getPath()
Specified by:
getPath in class TreeDataModel

getDepth

public int getDepth()
Specified by:
getDepth in class TreeDataModel

isFolder

public boolean isFolder()
Specified by:
isFolder in class TreeDataModel

getWrappedData

public Object getWrappedData()
Specified by:
getWrappedData in class TreeDataModel

isRowAvailable

public boolean isRowAvailable()
Specified by:
isRowAvailable in class TreeDataModel

setRowIndex

public void setRowIndex(int rowIndex)
Specified by:
setRowIndex in class TreeDataModel

setWrappedData

public void setWrappedData(Object data)
Specified by:
setWrappedData in class TreeDataModel

isRowVisible

public boolean isRowVisible()
Specified by:
isRowVisible in class TreeDataModel

getRowClientId

public String getRowClientId()
Specified by:
getRowClientId in class TreeDataModel

setRowClientId

public void setRowClientId(String clientId)
Specified by:
setRowClientId in class TreeDataModel

getRowParentClientId

public String getRowParentClientId()
Specified by:
getRowParentClientId in class TreeDataModel

getRowIndicesOfChildren

public List<Integer> getRowIndicesOfChildren()
Specified by:
getRowIndicesOfChildren in class TreeDataModel

getJunctions

public List<Boolean> getJunctions()
Specified by:
getJunctions in class TreeDataModel


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.