public abstract static class Index.Support extends Object implements Index
Index
cookie.Index.ArrayChildren, Index.KeysChildren<T>, Index.Support
Constructor and Description |
---|
Support()
Default constructor.
|
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.
|
protected void |
fireChangeEvent(ChangeEvent che)
Fires notification about reordering to all
registered listeners.
|
abstract Node[] |
getNodes()
Get the nodes; should be overridden if needed.
|
abstract int |
getNodesCount()
Get the node count.
|
int |
indexOf(Node node)
Get the index of a 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()
Reorder the nodes with dialog; should be overridden if needed.
|
abstract void |
reorder(int[] perm)
Reorder by permutation.
|
static void |
showIndexedCustomizer(Index idx)
Utility method to create and show an indexed customizer.
|
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 void addChangeListener(ChangeListener chl)
Index
addChangeListener
in interface Index
chl
- new listenerpublic void removeChangeListener(ChangeListener chl)
Index
removeChangeListener
in interface Index
chl
- listener to removeprotected void fireChangeEvent(ChangeEvent che)
che
- change event to fire offpublic abstract Node[] getNodes()
public int indexOf(Node node)
Index.Support.getNodes()
.public void reorder()
public static void showIndexedCustomizer(Index idx)
idx
- the index cookie to reorder based onpublic abstract int getNodesCount()
getNodesCount
in interface Index