oracle.adf.view.faces.model
Class TreeModel

java.lang.Object
  |
  +--javax.faces.model.DataModel
        |
        +--oracle.adf.view.faces.model.CollectionModel
              |
              +--oracle.adf.view.faces.model.TreeModel
Direct Known Subclasses:
ChildPropertyTreeModel

public abstract class TreeModel
extends CollectionModel

The data model used by ADF Tree components.


Constructor Summary
TreeModel()
           
 
Method Summary
abstract  java.lang.Object getParentData()
          Gets the rowData of the parent that contains this Collection of children.
abstract  java.util.List getPath()
          Gets the path that points to the row that is the parentData of this collection
abstract  boolean isRowContainer()
          Tests to see if the row identified by getRowData() has children.
abstract  void popPath()
          Removes the last rowKey from the path.
abstract  void pushPath()
          The row identified by getRowKey() is added to the path and made the new parent.
abstract  void setPath(java.util.List path)
          Sets the path
 
Methods inherited from class oracle.adf.view.faces.model.CollectionModel
getRowKey, getSortBy, getSortOrder, isSortable, setRowKey, sort
 
Methods inherited from class javax.faces.model.DataModel
addDataModelListener, getDataModelListeners, getRowCount, getRowData, getRowIndex, getWrappedData, isRowAvailable, removeDataModelListener, setRowIndex, setWrappedData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeModel

public TreeModel()
Method Detail

getParentData

public abstract java.lang.Object getParentData()
Gets the rowData of the parent that contains this Collection of children. this is the row identified by the path. This may be null if the path is null

Returns:
the parent rowData

isRowContainer

public abstract boolean isRowContainer()
Tests to see if the row identified by getRowData() has children.

Returns:
true if there are children

getPath

public abstract java.util.List getPath()
Gets the path that points to the row that is the parentData of this collection

Returns:
an immutable List - each element is a rowKey String The first element in the List is the first path element, and so on. This may be null, if this is the root Collection

setPath

public abstract void setPath(java.util.List path)
Sets the path

Parameters:
path - each element must be a rowKey String. use null for the root Collection

pushPath

public abstract void pushPath()
The row identified by getRowKey() is added to the path and made the new parent. This Collection changes to reflect the children of the new parent.


popPath

public abstract void popPath()
Removes the last rowKey from the path. The parentData will change to be the parent of the previous parent (or null, if this Collection is now the root Collection). This Collection will change to include the children of the new parent.



Copyright © 2003-2004 Oracle Corporation. All Rights Reserved.