public static class Index.ArrayChildren extends Children.Array implements Index
Children.Array, Children.Keys<T>, Children.Map<T>, Children.SortedArray, Children.SortedMap<T>
Index.ArrayChildren, Index.KeysChildren<T>, Index.Support
Modifier and Type | Field and Description |
---|---|
protected Index |
support
Support instance for delegation of some
Index methods. |
nodes
Constructor and Description |
---|
ArrayChildren()
Constructor for the support.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener chl)
Add a new listener to the listener list.
|
void |
exchange(int x,
int y)
Exchange two elements.
|
int |
indexOf(Node node)
Get the index of a given node.
|
protected List<Node> |
initCollection()
If default constructor is used, then this method is called to lazily create
the collection.
|
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()
Invokes a dialog for reordering children using
IndexedCustomizer . |
void |
reorder(int[] perm)
Reorder all children with a given permutation.
|
add, clone, refresh, remove
addNotify, create, createLazy, findChild, getNode, getNodeAt, getNodes, getNodes, getNodesCount, getNodesCount, isInitialized, nodes, removeNotify, snapshot
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNodes, getNodesCount
protected Index support
Index
methods.protected List<Node> initCollection()
This implementation returns ArrayList.
initCollection
in class Children.Array
public void reorder(int[] perm)
Index
public void reorder()
IndexedCustomizer
.public void move(int x, int y)
Index
x
-th position to the y
-th position. All
elements after the y
-th position are moved down.public void exchange(int x, int y)
Index
public void moveUp(int x)
Index
public void moveDown(int x)
Index
public int indexOf(Node node)
Index
public void addChangeListener(ChangeListener chl)
Index
addChangeListener
in interface Index
chl
- new listenerpublic void removeChangeListener(ChangeListener chl)
Index
removeChangeListener
in interface Index
chl
- listener to remove