Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui
Class RenderingContextProxy

java.lang.Object
  |
  +--oracle.cabo.ui.RenderingContextProxy
All Implemented Interfaces:
java.lang.Cloneable, RenderingContext

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

Proxy object for 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
RenderingContextProxy()
          Creates a RenderingContextProxy.
 
Method Summary
 void addDataProvider(DataProvider provider)
          Adds a DataProvider.
abstract  java.lang.Object clone()
          Subclassers need to handle returning a new RenderingContextProxy with the cloned delegated RenderingContext.
protected  RenderingContextProxy cloneHelper()
          Helper method for implementing clone().
 Agent getAgent()
          Returns an Agent object that can be used to identify what device will display the rendering.
 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.
 Configuration getConfiguration()
          Returns a Configuration object that will be used to locate paths and return global properties.
 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)
          Returns the DataObject for the given namespace and name pair.
 DataObject getDataObject(java.lang.String namespaceURI, java.lang.String name)
          Returns the DataObject for the given namespace and name pair.
 ErrorLog getErrorLog()
          Get an interface that can be used to log errors.
 ImageContext getImageContext()
          Get an interface that can be used for image lookups and rendering.
 LocaleContext getLocaleContext()
          Returns the LocaleContext that should be used for rendering.
 java.lang.Object getLocalProperty(int ancestorIndex, java.lang.Object key, java.lang.Object defaultValue)
          Retrieves the specifed property from the stack frame of a rendering UINode.
 LookAndFeel getLookAndFeel()
          Returns the LookAndFeel that should be used when rendering.
 OutputMethod getOutputMethod()
          Returns the OutputMethod that should be used for rendering text.
 RenderingContext getParentContext()
          Returns the RenderingContext that this context should delegate calls to pushRenderedChild, popRenderedChild, and addDataProvider to.
 Path getPath()
          Returns the path to the current node.
 java.lang.Object getProperty(java.lang.String namespace, java.lang.Object key)
          Gets a property stored on the context.
 UINode getRenderedAncestorNode(int index)
          Returns an ancestor of the node currently being processed.
 int getRenderedAncestorNodeCount()
          Returns the number of rendered nodes in the path form the current node being rendered to the root of the tree of nodes being rendered.
 RendererManager getRendererManager()
          Returns the RendererManager that should be used for finding renderers.
protected abstract  RenderingContext getRenderingContext()
          Returns the RenderingContext being proxied.
 StyleContext getStyleContext()
          Get an interface that can be used for style lookups and generation.
 URLEncoder getURLEncoder()
           
 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 renderedChild)
          Adds the UINode to actually use to render to the rendered UINode stack.
 DataObject setCurrentDataObject(DataObject newDataObject)
          Sets the new currentDataObject, returning the current currentDataObject.
 void setLocalProperty(java.lang.Object key, java.lang.Object value)
          Sets a property on the stack frame of the currently rendering UINode.
 void setProperty(java.lang.String namespace, java.lang.Object key, java.lang.Object value)
          Stores a property on the context.
 java.lang.String transformName(java.lang.String baseName)
          Transforms a UINode name to a name suitable for rendering, given the current RenderingContext state.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderingContextProxy

public RenderingContextProxy()
Creates a RenderingContextProxy.
Method Detail

getLookAndFeel

public LookAndFeel getLookAndFeel()
Returns the LookAndFeel that should be used when rendering.
Specified by:
getLookAndFeel in interface RenderingContext

getRendererManager

public RendererManager getRendererManager()
Returns the RendererManager that should be used for finding renderers.
Specified by:
getRendererManager in interface RenderingContext

getOutputMethod

public OutputMethod getOutputMethod()
                             throws java.io.IOException
Returns the OutputMethod that should be used for rendering text.
Specified by:
getOutputMethod in interface RenderingContext

getAgent

public Agent getAgent()
Returns an Agent object that can be used to identify what device will display the rendering.
Specified by:
getAgent in interface RenderingContext

getLocaleContext

public LocaleContext getLocaleContext()
Returns the LocaleContext that should be used for rendering.
Specified by:
getLocaleContext in interface RenderingContext

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 - getAncestor(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()

getRenderedAncestorNodeCount

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

getRenderedAncestorNode

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

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 renderedChild)
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
Following copied from interface: oracle.cabo.ui.RenderingContext
Parameters:
provider - the DataProvider to add; if null, the method is a no-op
See Also:
RenderingContext.getDataObject(java.lang.String, java.lang.String)

getDataObject

public DataObject getDataObject(RenderingContext context,
                                java.lang.String namespaceURI,
                                java.lang.String name)
Returns the DataObject for the given namespace and name pair.
Specified by:
getDataObject in interface RenderingContext

getDataObject

public final DataObject getDataObject(java.lang.String namespaceURI,
                                      java.lang.String name)
Returns the DataObject for the given namespace and name pair.
Specified by:
getDataObject in interface RenderingContext
Following copied from interface: oracle.cabo.ui.RenderingContext
See Also:
RenderingContext.addDataProvider(oracle.cabo.ui.data.DataProvider)

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)
Sets the new currentDataObject, returning the current currentDataObject.

Specified by:
setCurrentDataObject in interface RenderingContext
See Also:
getCurrentDataObject()

getProperty

public java.lang.Object getProperty(java.lang.String namespace,
                                    java.lang.Object key)
Gets a property stored on the context.
Specified by:
getProperty in interface RenderingContext

setProperty

public void setProperty(java.lang.String namespace,
                        java.lang.Object key,
                        java.lang.Object value)
Stores a property on the context. Since RendererContexts are not persistent, state stored on a RendererContext will not be present in subsequent rendering passes.
Specified by:
setProperty in interface RenderingContext

setLocalProperty

public void setLocalProperty(java.lang.Object key,
                             java.lang.Object value)
Sets a property on the stack frame of the currently rendering UINode.

This method is for use by rendering code that needs to save some state while it is rendering.

Specified by:
setLocalProperty in interface RenderingContext
Parameters:
key - Key used to identify this property on the stack frame.
value - Value to store. null is an acceptable value.

See Also:
getLocalProperty(int, java.lang.Object, java.lang.Object)

getLocalProperty

public java.lang.Object getLocalProperty(int ancestorIndex,
                                         java.lang.Object key,
                                         java.lang.Object defaultValue)
Retrieves the specifed property from the stack frame of a rendering UINode. If the property is not present, defaultValue is returned.

This method is for use by rendering code that needs to save some state while it is rendering.

Specified by:
getLocalProperty in interface RenderingContext
Parameters:
index - index into the rendered ancestor stack. If 0, uses the currently rendering node
key - Key used to identify the property on the stack frame to retrieve.
defaultValue - Value to return if the property doesn't exist in the stack frame.

See Also:
setLocalProperty(java.lang.Object, java.lang.Object)

transformName

public java.lang.String transformName(java.lang.String baseName)
Transforms a UINode name to a name suitable for rendering, given the current RenderingContext state.
Specified by:
transformName in interface RenderingContext

getURLEncoder

public URLEncoder getURLEncoder()
Specified by:
getURLEncoder in interface RenderingContext
See Also:
RenderingContext.getURLEncoder()

getConfiguration

public Configuration getConfiguration()
Returns a Configuration object that will be used to locate paths and return global properties.
Specified by:
getConfiguration in interface RenderingContext

getErrorLog

public ErrorLog getErrorLog()
Get an interface that can be used to log errors.
Specified by:
getErrorLog in interface RenderingContext

getImageContext

public ImageContext getImageContext()
Get an interface that can be used for image lookups and rendering.
Specified by:
getImageContext in interface RenderingContext

getStyleContext

public StyleContext getStyleContext()
Get an interface that can be used for style lookups and generation.
Specified by:
getStyleContext in interface RenderingContext

getParentContext

public RenderingContext getParentContext()
Description copied from interface: RenderingContext
Returns the RenderingContext that this context should delegate calls to pushRenderedChild, popRenderedChild, and addDataProvider to. The parent context acts to segregate the logical node structure internal to a composite UINode from the deceloper's logical UINode structure. By calling getParentContext.getAncestorNode(0) the composite UINode gains access to the UINode that the composite UINode is attempting to render.

Typically, only composite UINode implementors ever need to call this method.

Specified by:
getParentContext in interface RenderingContext

clone

public abstract java.lang.Object clone()
Subclassers need to handle returning a new RenderingContextProxy with the cloned delegated RenderingContext.

Specified by:
clone in interface RenderingContext
Overrides:
clone in class java.lang.Object
See Also:
cloneHelper(), getRenderingContext()

cloneHelper

protected final RenderingContextProxy cloneHelper()
Helper method for implementing clone(). Handles the grunge of making a shallow copy of the RenderingContextProxy.

See Also:
clone()

getRenderingContext

protected abstract RenderingContext getRenderingContext()
Returns the RenderingContext being proxied. Clients must override this method as needed.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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