|
org.openide.nodes 6.7.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.nodes.Index.Support
A support class implementing some methods of the Index
cookie.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.openide.nodes.Index |
---|
Index.ArrayChildren, Index.KeysChildren, Index.Support |
Constructor Summary | |
---|---|
Index.Support()
Default constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Index.Support()
Method Detail |
---|
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.
x
- the position to remove the element fromy
- the position to insert the element topublic void exchange(int x, int y)
Index
x
- position of the first elementy
- position of the second elementpublic void moveUp(int x)
Index
x
- index of element to move uppublic void moveDown(int x)
Index
x
- index of element to move downpublic 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)
getNodes()
.
node
- the node
-1
if the node was not foundpublic void reorder()
public static void showIndexedCustomizer(Index idx)
idx
- the index cookie to reorder based onpublic abstract int getNodesCount()
getNodesCount
in interface Index
public abstract void reorder(int[] perm)
perm
- the permutation
|
org.openide.nodes 6.7.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |