Package org.apache.myfaces.tobago.model
Class TreeNodeDataModel
- java.lang.Object
-
- javax.faces.model.DataModel
-
- org.apache.myfaces.tobago.model.TreeDataModel
-
- org.apache.myfaces.tobago.model.TreeNodeDataModel
-
- All Implemented Interfaces:
Iterable
public class TreeNodeDataModel extends TreeDataModel
Implementation for aTreeNode
that represents the data model for a tree.
-
-
Constructor Summary
Constructors Constructor Description TreeNodeDataModel(TreeNode data, boolean showRoot, ExpandedState expandedState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 wrappedData)
void
update(ExpandedState update)
-
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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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 ofnull
means all.
-
-
Method Detail
-
reset
public void reset()
- Specified by:
reset
in classTreeDataModel
-
update
public void update(ExpandedState update)
- Specified by:
update
in classTreeDataModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in classTreeDataModel
-
getRowData
public TreeNode getRowData()
- Specified by:
getRowData
in classjavax.faces.model.DataModel
-
getRowIndex
public int getRowIndex()
- Specified by:
getRowIndex
in classTreeDataModel
-
getLevel
public int getLevel()
- Specified by:
getLevel
in classTreeDataModel
-
getPath
public TreePath getPath()
- Specified by:
getPath
in classTreeDataModel
-
getDepth
public int getDepth()
- Specified by:
getDepth
in classTreeDataModel
-
isFolder
public boolean isFolder()
- Specified by:
isFolder
in classTreeDataModel
-
getWrappedData
public Object getWrappedData()
- Specified by:
getWrappedData
in classTreeDataModel
-
isRowAvailable
public boolean isRowAvailable()
- Specified by:
isRowAvailable
in classTreeDataModel
-
setRowIndex
public void setRowIndex(int rowIndex)
- Specified by:
setRowIndex
in classTreeDataModel
-
setWrappedData
public void setWrappedData(Object wrappedData)
- Specified by:
setWrappedData
in classTreeDataModel
-
isRowVisible
public boolean isRowVisible()
- Specified by:
isRowVisible
in classTreeDataModel
-
getRowClientId
public String getRowClientId()
- Specified by:
getRowClientId
in classTreeDataModel
-
setRowClientId
public void setRowClientId(String clientId)
- Specified by:
setRowClientId
in classTreeDataModel
-
getRowParentClientId
public String getRowParentClientId()
- Specified by:
getRowParentClientId
in classTreeDataModel
-
getRowIndicesOfChildren
public List<Integer> getRowIndicesOfChildren()
- Specified by:
getRowIndicesOfChildren
in classTreeDataModel
-
getJunctions
public List<Boolean> getJunctions()
- Specified by:
getJunctions
in classTreeDataModel
-
-