Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui
Class LogicalNodeRenderingContext

java.lang.Object
  |
  +--oracle.cabo.ui.LogicalNodeRenderingContext
All Implemented Interfaces:
java.lang.Cloneable, RenderingContext
Direct Known Subclasses:
RenderedNodeRenderingContext

public abstract class LogicalNodeRenderingContext
extends java.lang.Object
implements RenderingContext

Abstract RenderingContext implementation providing support for managing logical ancestors and DataProviders. Although this class supports both root and child RenderingContexts, it is configured by default to support child-style RenderingContexts.


Fields inherited from interface oracle.cabo.ui.RenderingContext
CONTEXT_PATH_PROPERTY, CONTEXT_URI_PROPERTY, SHARED_CONTEXT_PATH_PROPERTY, SHARED_CONTEXT_URI_PROPERTY
 
Constructor Summary
LogicalNodeRenderingContext()
          Creates a AbstractRenderingContext.
 
Method Summary
 void addDataProvider(DataProvider provider)
          Adds a DataProvider.
 java.lang.Object clone()
          Returns a clone of the RenderingContext.
 UINode getAncestorNode(int index)
          Returns an ancestor of the node currently being processed.
 int getAncestorNodeCount()
          Returns the number of nodes in the path form the current node to the root of the tree of nodes being rendered.
 DataObject getCurrentDataObject()
          Returns a DataObject for the current node (such as a row of a table).
 DataObject getDataObject(RenderingContext context, java.lang.String namespaceURI, java.lang.String name)
          Internal version of getDataObject().
 DataObject getDataObject(java.lang.String namespaceURI, java.lang.String name)
          Returns the DataObject for the given namespace and name pair.
protected  int getDefaultDataProviderSize()
          Returns the default initial number of DataProvider slots to allocate.
protected  int getDefaultNodeStackSize()
          Returns the default initial number of nodes in the stack of nodes.
 Path getPath()
          Returns the path to the current node.
 void popChild()
          Removes a UINode from the stack.
 void popRenderedChild()
          Removes the UINode to actually use to render from the rendered UINode stack.
 void pushChild(UINode child, java.lang.String childName, int childIndex)
          Adds the UINode about to be rendered to the rendering stack.
 void pushRenderedChild(UINode child)
          Adds the UINode to actually use to render to the rendered UINode stack.
protected  void reset()
          Reset the state of the RenderingContext for reuse, even in case where RenderingContext did not complete cleanly.
 DataObject setCurrentDataObject(DataObject newDataObject)
          Sets the new currentDataObject, returning the current currentDataObject.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.cabo.ui.RenderingContext
getAgent, getConfiguration, getErrorLog, getImageContext, getLocaleContext, getLocalProperty, getLookAndFeel, getOutputMethod, getParentContext, getProperty, getRenderedAncestorNode, getRenderedAncestorNodeCount, getRendererManager, getStyleContext, getURLEncoder, setLocalProperty, setProperty, transformName
 

Constructor Detail

LogicalNodeRenderingContext

public LogicalNodeRenderingContext()
Creates a AbstractRenderingContext.
Method Detail

getCurrentDataObject

public DataObject getCurrentDataObject()
Returns a DataObject for the current node (such as a row of a table).
Specified by:
getCurrentDataObject in interface RenderingContext

setCurrentDataObject

public DataObject setCurrentDataObject(DataObject newDataObject)
Description copied from interface: RenderingContext
Sets the new currentDataObject, returning the current currentDataObject.

Specified by:
setCurrentDataObject in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.getCurrentDataObject()

getAncestorNodeCount

public int getAncestorNodeCount()
Returns the number of nodes in the path form the current node to the root of the tree of nodes being rendered.
Specified by:
getAncestorNodeCount in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.getAncestorNode(int), RenderingContext.getRenderedAncestorNodeCount(), RenderingContext.getPath()

getAncestorNode

public UINode getAncestorNode(int index)
Returns an ancestor of the node currently being processed. The zero-based index from least to most distant - getAncestorNode(0) will always return the current node. Returns null if the index is greater than or equal to the number of ancestors.
Specified by:
getAncestorNode in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.getAncestorNodeCount(), RenderingContext.getRenderedAncestorNode(int), RenderingContext.getPath()

getPath

public Path getPath()
Returns the path to the current node.
Specified by:
getPath in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.getAncestorNodeCount(), RenderingContext.getAncestorNode(int)

pushChild

public void pushChild(UINode child,
                      java.lang.String childName,
                      int childIndex)
Adds the UINode about to be rendered to the rendering stack. Clients should never call this method. They should instead subclass BaseRenderer, which calls this method when needed.
Specified by:
pushChild in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.popChild(), RenderingContext.getAncestorNode(int), RenderingContext.getAncestorNodeCount(), RenderingContext.getPath()

popChild

public void popChild()
Removes a UINode from the stack. Clients should never call this method; they should instead subclass BaseRenderer, which calls this method when needed.
Specified by:
popChild in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.pushChild(oracle.cabo.ui.UINode, java.lang.String, int), RenderingContext.getAncestorNode(int), RenderingContext.getAncestorNodeCount(), RenderingContext.getPath()

pushRenderedChild

public void pushRenderedChild(UINode child)
Description copied from interface: RenderingContext
Adds the UINode to actually use to render to the rendered UINode stack.

Clients shuld never need to call this method as calls to this method are typically made on their behalf by the composite UINode framework.

Specified by:
pushRenderedChild in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.popRenderedChild(), RenderingContext.getRenderedAncestorNode(int), RenderingContext.getRenderedAncestorNodeCount()

popRenderedChild

public void popRenderedChild()
Description copied from interface: RenderingContext
Removes the UINode to actually use to render from the rendered UINode stack.

Clients shuld never need to call this method as calls to this method are typically made on their behalf by the composite UINode framework.

Specified by:
popRenderedChild in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.pushRenderedChild(oracle.cabo.ui.UINode), RenderingContext.getRenderedAncestorNode(int), RenderingContext.getRenderedAncestorNodeCount()

addDataProvider

public void addDataProvider(DataProvider provider)
Adds a DataProvider. If the RenderingContext is currently inactive (that is., not rendering any nodes), the data provider will be added permanently. Otherwise, the data provider will automatically be removed when the current node (and all its children) finish rendering.
Specified by:
addDataProvider in interface RenderingContext
Parameters:
provider - the DataProvider to add; if null, the method is a no-op

getDataObject

public DataObject getDataObject(RenderingContext context,
                                java.lang.String namespaceURI,
                                java.lang.String name)
Internal version of getDataObject(). Do not call this function unless you are yourself a RenderingContext.
Specified by:
getDataObject in interface RenderingContext

getDataObject

public DataObject getDataObject(java.lang.String namespaceURI,
                                java.lang.String name)
Returns the DataObject for the given namespace and name pair. It will call each data provider added with addDataProvider, starting with the most recently added, until one returns non-null. Then, it will look for DataObjects added with setDataObject().
Specified by:
getDataObject in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.addDataProvider(oracle.cabo.ui.data.DataProvider)

getDefaultNodeStackSize

protected int getDefaultNodeStackSize()
Returns the default initial number of nodes in the stack of nodes. Subclassers implementing RenderingContexts that may support deep node depths, should override this method to return a larger number.

getDefaultDataProviderSize

protected int getDefaultDataProviderSize()
Returns the default initial number of DataProvider slots to allocate. Subclassers implementing RenderingContexts that may supportlarge numbers of DataProviders, should override this method to return a larger number.

reset

protected void reset()
Reset the state of the RenderingContext for reuse, even in case where RenderingContext did not complete cleanly. =-= bts Most of this cleanup only really needs to be done if we don't handle catching exceptions and popping the stack correctly when rendering

clone

public java.lang.Object clone()
Description copied from interface: RenderingContext
Returns a clone of the RenderingContext.
Specified by:
clone in interface RenderingContext
Overrides:
clone in class java.lang.Object

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.