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 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()ObjectgetWrappedData()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
-
update
public void update(ExpandedState update)
- Specified by:
updatein classTreeDataModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin classTreeDataModel
-
getRowData
public TreeNode getRowData()
- Specified by:
getRowDatain classjavax.faces.model.DataModel
-
getRowIndex
public int getRowIndex()
- Specified by:
getRowIndexin classTreeDataModel
-
getLevel
public int getLevel()
- Specified by:
getLevelin classTreeDataModel
-
getPath
public TreePath getPath()
- Specified by:
getPathin classTreeDataModel
-
getDepth
public int getDepth()
- Specified by:
getDepthin classTreeDataModel
-
isFolder
public boolean isFolder()
- Specified by:
isFolderin classTreeDataModel
-
getWrappedData
public Object getWrappedData()
- Specified by:
getWrappedDatain classTreeDataModel
-
isRowAvailable
public boolean isRowAvailable()
- Specified by:
isRowAvailablein classTreeDataModel
-
setRowIndex
public void setRowIndex(int rowIndex)
- Specified by:
setRowIndexin classTreeDataModel
-
setWrappedData
public void setWrappedData(Object wrappedData)
- Specified by:
setWrappedDatain classTreeDataModel
-
isRowVisible
public boolean isRowVisible()
- Specified by:
isRowVisiblein classTreeDataModel
-
getRowClientId
public String getRowClientId()
- Specified by:
getRowClientIdin classTreeDataModel
-
setRowClientId
public void setRowClientId(String clientId)
- Specified by:
setRowClientIdin classTreeDataModel
-
getRowParentClientId
public String getRowParentClientId()
- Specified by:
getRowParentClientIdin classTreeDataModel
-
getRowIndicesOfChildren
public List<Integer> getRowIndicesOfChildren()
- Specified by:
getRowIndicesOfChildrenin classTreeDataModel
-
getJunctions
public List<Boolean> getJunctions()
- Specified by:
getJunctionsin classTreeDataModel
-
-