Package org.apache.myfaces.tobago.model
Class TreeNodeDataModel
- java.lang.Object
-
- javax.faces.model.DataModel<E>
-
- org.apache.myfaces.tobago.model.TreeDataModel<TreeNode>
-
- org.apache.myfaces.tobago.model.TreeNodeDataModel
-
public class TreeNodeDataModel extends TreeDataModel<TreeNode>
Implementation for aTreeNodethat 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 intgetDepth()List<Boolean>getJunctions()intgetLevel()TreePathgetPath()StringgetRowClientId()intgetRowCount()TreeNodegetRowData()intgetRowIndex()List<Integer>getRowIndicesOfChildren()StringgetRowParentClientId()TreeNodegetWrappedData()booleanisFolder()booleanisRowAvailable()booleanisRowVisible()voidreset()voidsetRowClientId(String clientId)voidsetRowIndex(int rowIndex)voidsetWrappedData(Object wrappedData)voidupdate(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 ofnullmeans all.
-
-
Method Detail
-
reset
public void reset()
- Specified by:
resetin classTreeDataModel<TreeNode>
-
update
public void update(ExpandedState update)
- Specified by:
updatein classTreeDataModel<TreeNode>
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin classTreeDataModel<TreeNode>
-
getRowData
public TreeNode getRowData()
- Specified by:
getRowDatain classjavax.faces.model.DataModel<TreeNode>
-
getRowIndex
public int getRowIndex()
- Specified by:
getRowIndexin classTreeDataModel<TreeNode>
-
getLevel
public int getLevel()
- Specified by:
getLevelin classTreeDataModel<TreeNode>
-
getPath
public TreePath getPath()
- Specified by:
getPathin classTreeDataModel<TreeNode>
-
getDepth
public int getDepth()
- Specified by:
getDepthin classTreeDataModel<TreeNode>
-
isFolder
public boolean isFolder()
- Specified by:
isFolderin classTreeDataModel<TreeNode>
-
getWrappedData
public TreeNode getWrappedData()
- Specified by:
getWrappedDatain classTreeDataModel<TreeNode>
-
isRowAvailable
public boolean isRowAvailable()
- Specified by:
isRowAvailablein classTreeDataModel<TreeNode>
-
setRowIndex
public void setRowIndex(int rowIndex)
- Specified by:
setRowIndexin classTreeDataModel<TreeNode>
-
setWrappedData
public void setWrappedData(Object wrappedData)
- Specified by:
setWrappedDatain classTreeDataModel<TreeNode>
-
isRowVisible
public boolean isRowVisible()
- Specified by:
isRowVisiblein classTreeDataModel<TreeNode>
-
getRowClientId
public String getRowClientId()
- Specified by:
getRowClientIdin classTreeDataModel<TreeNode>
-
setRowClientId
public void setRowClientId(String clientId)
- Specified by:
setRowClientIdin classTreeDataModel<TreeNode>
-
getRowParentClientId
public String getRowParentClientId()
- Specified by:
getRowParentClientIdin classTreeDataModel<TreeNode>
-
getRowIndicesOfChildren
public List<Integer> getRowIndicesOfChildren()
- Specified by:
getRowIndicesOfChildrenin classTreeDataModel<TreeNode>
-
getJunctions
public List<Boolean> getJunctions()
- Specified by:
getJunctionsin classTreeDataModel<TreeNode>
-
-