Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.path
Class PathImpl

java.lang.Object
  |
  +--oracle.cabo.ui.path.PathImpl
All Implemented Interfaces:
java.lang.Cloneable, Path

public class PathImpl
extends java.lang.Object
implements Path

Default implementation of the path interface. This subclass is mutable.


Constructor Summary
PathImpl()
          Creates an empty path.
 
Method Summary
 void add(int indexedChild)
          Add an indexed child onto the path.
 void add(Path path)
          Appends a path to this one.
 void add(java.lang.String namedChild)
          Add a named child onto the path.
 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.
 void removeLastElement()
          Pops a single element off the end of the path.
 java.lang.String toString()
          Returns a string representation of the path.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PathImpl

public PathImpl()
Creates an empty path.
Method Detail

getElementCount

public int getElementCount()
Returns the number of elements in the path.
Specified by:
getElementCount in interface 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.
Specified by:
isElementNamed in interface Path
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.
Specified by:
getElementIndex in interface Path
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.
Specified by:
getElementName in interface Path
Parameters:
elementIndex - the zero-based index into the path; if negative, counts back from the end of the path

add

public void add(java.lang.String namedChild)
Add a named child onto the path.

add

public void add(int indexedChild)
Add an indexed child onto the path.

add

public void add(Path path)
Appends a path to this one.

removeLastElement

public void removeLastElement()
Pops a single element off the end of the path.

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.
Specified by:
followPath in interface Path
Parameters:
from - the node to start from
start - the number of steps to skip; if 0, starts from the begining. If negative, counts from the end.
depth - the number of steps in the path to follow; if 0, will just return from

followPath

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

clone

public java.lang.Object clone()
Clones the path.
Specified by:
clone in interface Path
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation of the path.
Overrides:
toString in class java.lang.Object

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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