Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.path
Interface Path

All Superinterfaces:
java.lang.Cloneable
All Known Implementing Classes:
AbstractCompositePath, PathImpl

public interface Path
extends java.lang.Cloneable

A path defines a route through a UINode tree. The Path interface itself is immutable, but implementations are not required to be.


Method Summary
 java.lang.Object clone()
          Clones the path.
 UINode followPath(RenderingContext context, UINode from)
          Follows the entire path.
 UINode followPath(RenderingContext context, UINode from, int start, int depth)
          Returns the result of partially following the path from a starting node.
 int getElementCount()
          Returns the number of elements in the path.
 int getElementIndex(int elementIndex)
          Returns the child index of a path element; returns -1 if that part of the path is a named child.
 java.lang.String getElementName(int elementIndex)
          Returns the chid name of a path element; returns null if that part of the path is an indexed child.
 boolean isElementNamed(int elementIndex)
          Returns true if the element at the given index is a named child, as opposed to an indexed child.
 

Method Detail

followPath

public UINode followPath(RenderingContext context,
                         UINode from,
                         int start,
                         int depth)
Returns the result of partially following the path from a starting node. Returns null if any of the steps of the path cannot be followed.
Parameters:
from - the node to start from
start - the number of steps in the path to start from; if 0, starts from the beginning. If negative, counts from the end.
depth - the number of steps in the path to follow

followPath

public UINode followPath(RenderingContext context,
                         UINode from)
Follows the entire path. Returns null if any of the steps of the path cannot be followed.
Parameters:
from - the node to start from

getElementCount

public int getElementCount()
Returns the number of elements in the path.

isElementNamed

public boolean isElementNamed(int elementIndex)
Returns true if the element at the given index is a named child, as opposed to an indexed child.
Parameters:
elementIndex - the zero-based index into the path; if negative, counts back from the end of the path

getElementIndex

public int getElementIndex(int elementIndex)
Returns the child index of a path element; returns -1 if that part of the path is a named child.
Parameters:
elementIndex - the zero-based index into the path; if negative, counts back from the end of the path

getElementName

public java.lang.String getElementName(int elementIndex)
Returns the chid name of a path element; returns null if that part of the path is an indexed child.
Parameters:
elementIndex - the zero-based index into the path; if negative, counts back from the end of the path

clone

public java.lang.Object clone()
Clones the path.
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.