| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Index cookie providing operations useful for reordering
 child nodes. IndexedNode is the common implementation.
| Inner Class Summary | |
static class | 
Index.ArrayChildren
Reorderable children list stored in an array.  | 
static class | 
Index.KeysChildren
Implementation of index interface that operates on an list of objects that are presented by given nodes.  | 
static class | 
Index.Support
A support class implementing some methods of the Index
 cookie. | 
| Method Summary | |
 void | 
addChangeListener(ChangeListener chl)
Add a new listener to the listener list.  | 
 void | 
exchange(int x,
         int y)
Exchange two elements.  | 
 Node[] | 
getNodes()
Get the child nodes.  | 
 int | 
getNodesCount()
Get the number of nodes.  | 
 int | 
indexOf(Node node)
Get the index of a given node.  | 
 void | 
move(int x,
     int y)
Move the element at the x-th position to the y-th position. | 
 void | 
moveDown(int x)
Move an element down.  | 
 void | 
moveUp(int x)
Move an element up.  | 
 void | 
removeChangeListener(ChangeListener chl)
Remove a listener from the listener list.  | 
 void | 
reorder()
Invoke a dialog for reordering the children.  | 
 void | 
reorder(int[] perm)
Reorder all children with a given permutation.  | 
| Method Detail | 
public int getNodesCount()
public Node[] getNodes()
public int indexOf(Node node)
node - node to find index of-1 if no such node was foundpublic void reorder()
public void reorder(int[] perm)
perm - permutation with the length of current nodesIllegalArgumentException - if the permutation is not valid
public void move(int x,
                 int y)
x-th position to the y-th position. All
 elements after the y-th position are moved down.x - the position to remove the element fromy - the position to insert the element toIndexOutOfBoundsException - if an index is out of bounds
public void exchange(int x,
                     int y)
x - position of the first elementy - position of the second elementIndexOutOfBoundsException - if an index is out of boundspublic void moveUp(int x)
x - index of element to move upIndexOutOfBoundsException - if an index is out of boundspublic void moveDown(int x)
x - index of element to move downIndexOutOfBoundsException - if an index is out of boundspublic void addChangeListener(ChangeListener chl)
chl - new listenerpublic void removeChangeListener(ChangeListener chl)
chl - listener to remove
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||