Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.ui.collection
Class ReorderingUINodeList

java.lang.Object
  |
  +--oracle.cabo.ui.collection.ReorderingUINodeList
All Implemented Interfaces:
java.lang.Cloneable, UINodeList

public class ReorderingUINodeList
extends java.lang.Object
implements UINodeList

The ReorderingUINodeList takes one UINodeList and reorders it based on an array of ints. The array can repeat the numbers, omit numbers, etc. - so it can hide nodes and repeate nodes in addition to just reordering.

It's important to remember that using ReorderingUINodeList will reorder only the indexed nodes - the component will act as if the nodes had been added in a different order. Other parts of a component will not also be reordered. For example, a TableBeans column headers and column formatting will not be reordered (unless you're using ColumnBeans to define that information).

ReorderingUINodeList is entirely immutable - developers should not attach it to a UINode until after they've added all the needed children to that node.

Examples:

Assume a base node list that contains 5 children: a, b, c, d, e.
If the array of ints is [4, 3, 2, 1, 0], the children will be rendered as (e, d, c, b, a).
If the array of ints is [0, 1, 2, 1, 0], the children will be rendered as (a, b, c, b, a).
If the array of ints is [0, 5], the children will be rendered as (a, e).


Constructor Summary
ReorderingUINodeList(UINodeList baseList, BoundValue orderValue)
          Creates a ReorderingUINodeList with a dynamically retrieved reordering list.
ReorderingUINodeList(UINodeList baseList, int[] orderArray)
          Creates a ReorderingUINodeList with a fixed reordering list.
 
Method Summary
 void addUINode(int index, UINode node)
          Inserts the spacified UINode into the UINodeList at the specified index
 void addUINode(UINode node)
          Appends the specified UINode to the end of the UINodeList.
 void clearUINodes()
          Removes all of the UINodes from the UINodeList.
 java.lang.Object clone()
          Clones the UINodeList
 UINode getUINode(RenderingContext context, int index)
          Returns the UINode at the specifed index in the UINodeList, given the specified RenderingContext.
 UINode removeUINode(int index)
          Removes and returns UINode at the specifed index.
 UINode setUINode(int index, UINode node)
          Replaces the UINode at the specified index with the new UINode value, returning the old value.
 int size(RenderingContext context)
          Returns the number of elements in the UINodeList given the specified RenderingContext.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReorderingUINodeList

public ReorderingUINodeList(UINodeList baseList,
                            int[] orderArray)
Creates a ReorderingUINodeList with a fixed reordering list.

ReorderingUINodeList

public ReorderingUINodeList(UINodeList baseList,
                            BoundValue orderValue)
Creates a ReorderingUINodeList with a dynamically retrieved reordering list.
Method Detail

size

public int size(RenderingContext context)
Description copied from interface: UINodeList
Returns the number of elements in the UINodeList given the specified RenderingContext.
Specified by:
size in interface UINodeList

getUINode

public UINode getUINode(RenderingContext context,
                        int index)
Description copied from interface: UINodeList
Returns the UINode at the specifed index in the UINodeList, given the specified RenderingContext.
Specified by:
getUINode in interface UINodeList

setUINode

public UINode setUINode(int index,
                        UINode node)
Description copied from interface: UINodeList
Replaces the UINode at the specified index with the new UINode value, returning the old value.
Specified by:
setUINode in interface UINodeList

addUINode

public void addUINode(int index,
                      UINode node)
Description copied from interface: UINodeList
Inserts the spacified UINode into the UINodeList at the specified index
Specified by:
addUINode in interface UINodeList

addUINode

public void addUINode(UINode node)
Description copied from interface: UINodeList
Appends the specified UINode to the end of the UINodeList.
Specified by:
addUINode in interface UINodeList

removeUINode

public UINode removeUINode(int index)
Description copied from interface: UINodeList
Removes and returns UINode at the specifed index.
Specified by:
removeUINode in interface UINodeList

clearUINodes

public void clearUINodes()
Description copied from interface: UINodeList
Removes all of the UINodes from the UINodeList.
Specified by:
clearUINodes in interface UINodeList

clone

public java.lang.Object clone()
Description copied from interface: UINodeList
Clones the UINodeList
Specified by:
clone in interface UINodeList
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.