org.apache.myfaces.trinidad.component
Class UIXHierarchy

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by org.apache.myfaces.trinidad.component.UIXCollection
                  extended by org.apache.myfaces.trinidad.component.UIXHierarchy
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder, CollectionComponent, RowKeyIndex
Direct Known Subclasses:
UIXMenuHierarchy, UIXNavigationHierarchy, UIXTree

public abstract class UIXHierarchy
extends UIXCollection
implements CollectionComponent

Base class for components that take a TreeModel, which is a hierarchical model.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-api/src/main/java/oracle/adf/view/faces/component/UIXHierarchy.java#0 $) $Date: 10-nov-2005.19:09:52 $

Field Summary
 
Fields inherited from class org.apache.myfaces.trinidad.component.UIXCollection
TYPE, VAR_KEY
 
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
protected UIXHierarchy()
           
protected UIXHierarchy(java.lang.String rendererType)
          Create a Page component with the given render-type
 
Method Summary
 CollectionModel createCollectionModel(CollectionModel current, java.lang.Object value)
          Creates the CollectionModel to use with this component.
 void enterContainer()
          Treats the current element as a parent element and steps into the children.
 void exitContainer()
          Changes the rowData to be the parent rowData.
 java.util.List<java.lang.Object> getAllAncestorContainerRowKeys(java.lang.Object childRowKey)
          Gets the all the rowKeys of the ancestors of the given child row.
 java.lang.Object getContainerRowKey()
          Gets the rowKey of the current row's container.
 java.lang.Object getContainerRowKey(java.lang.Object childKey)
          Gets the rowKey of the given row's container.
 int getDepth()
          Gets the depth of the current row in this tree hierarchy
 int getDepth(java.lang.Object rowKey)
          Gets the depth of the current row in this tree hierarchy
 int getFirst()
          Gets the index of the first visible row in this tree
abstract  java.lang.Object getFocusRowKey()
           
 int getRows()
          Gets the maximum number of rows that this tree should show at a time.
protected  java.util.List<javax.faces.component.UIComponent> getStamps()
          Gets the UIComponents that are considered stamps.
protected  TreeModel getTreeModel()
          Gets the TreeModel that this tree is displaying.
 boolean isContainer()
          Checks to see if the current element is a container of other elements.
 boolean isContainerEmpty()
          Checks to see if the container is empty.
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXCollection
broadcast, clearCurrencyStringCache, createVarStatusMap, decodeChildrenImpl, encodeBegin, encodeEnd, getClientRowKey, getClientRowKeyManager, getCollectionModel, getCollectionModel, getContainerClientId, getCurrencyString, getRowCount, getRowData, getRowData, getRowIndex, getRowKey, getSortCriteria, getValue, getVar, getVarStatus, invokeOnComponent, isRowAvailable, isRowAvailable, isSortable, postRowDataChange, preRowDataChange, processComponent, processDecodes, processFacetsAndChildren, processSaveState, queueEvent, resetStampState, restoreStampState, restoreState, saveStampState, saveState, setClientRowKey, setCurrencyString, setRowIndex, setRowKey, setSortCriteria, setVar, updateChildrenImpl, validateChildrenImpl
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, encodeAll, encodeChildren, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBeanType, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getFamily, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, isRendered, isTransient, markInitialState, processRestoreState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, validateChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.trinidad.component.CollectionComponent
getVar
 
Methods inherited from interface org.apache.myfaces.trinidad.model.RowKeyIndex
getRowCount, getRowData, getRowData, getRowIndex, getRowKey, isRowAvailable, isRowAvailable, setRowIndex, setRowKey
 

Constructor Detail

UIXHierarchy

protected UIXHierarchy(java.lang.String rendererType)
Create a Page component with the given render-type


UIXHierarchy

protected UIXHierarchy()
Method Detail

createCollectionModel

public CollectionModel createCollectionModel(CollectionModel current,
                                             java.lang.Object value)
Description copied from class: UIXCollection
Creates the CollectionModel to use with this component.

Specified by:
createCollectionModel in class UIXCollection
Parameters:
current - the current CollectionModel, or null if there is none.
value - this is the value returned from UIXCollection.getValue()

getFirst

public int getFirst()
Gets the index of the first visible row in this tree

Specified by:
getFirst in interface CollectionComponent
Returns:
zero-based index. not implemented yet.

getRows

public int getRows()
Gets the maximum number of rows that this tree should show at a time.

Specified by:
getRows in interface CollectionComponent
Returns:
not implemented yet.

enterContainer

public final void enterContainer()
Treats the current element as a parent element and steps into the children. A new path is constructed by appending the null value to the old path. The rowData becomes null. It is legal to call this method only if isContainer() returns true.

See Also:
TreeModel.enterContainer()

exitContainer

public final void exitContainer()
Changes the rowData to be the parent rowData. A new path is constructed by removing the last rowKey from the old path. The element that is identified by the new path is made current.

See Also:
TreeModel.exitContainer()

isContainer

public final boolean isContainer()
Checks to see if the current element is a container of other elements.

Returns:
true if the current element contains other elements.
See Also:
TreeModel.isContainer()

isContainerEmpty

public boolean isContainerEmpty()
Checks to see if the container is empty.

Returns:
true if the current container element has no children.
See Also:
TreeModel.isContainerEmpty()

getDepth

public int getDepth()
Gets the depth of the current row in this tree hierarchy

Returns:
zero for any root rows.
See Also:
TreeModel.getDepth()

getDepth

public int getDepth(java.lang.Object rowKey)
Gets the depth of the current row in this tree hierarchy

Returns:
zero for any root rows.
See Also:
TreeModel.getDepth(Object)

getContainerRowKey

public java.lang.Object getContainerRowKey()
Gets the rowKey of the current row's container.

See Also:
TreeModel.getContainerRowKey()

getContainerRowKey

public java.lang.Object getContainerRowKey(java.lang.Object childKey)
Gets the rowKey of the given row's container.

See Also:
TreeModel.getContainerRowKey(Object)

getAllAncestorContainerRowKeys

public java.util.List<java.lang.Object> getAllAncestorContainerRowKeys(java.lang.Object childRowKey)
Gets the all the rowKeys of the ancestors of the given child row.

See Also:
TreeModel.getAllAncestorContainerRowKeys(Object)

getTreeModel

protected final TreeModel getTreeModel()
Gets the TreeModel that this tree is displaying.


getStamps

protected java.util.List<javax.faces.component.UIComponent> getStamps()
Description copied from class: UIXCollection
Gets the UIComponents that are considered stamps. This implementation simply returns the children of this component.

Overrides:
getStamps in class UIXCollection
Returns:
each element must be of type UIComponent.

getFocusRowKey

public abstract java.lang.Object getFocusRowKey()


Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.