|
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.Children org.openide.nodes.Children.Array org.openide.nodes.Children.Keys
public abstract static class Children.Keys
Implements an array of child nodes associated nonuniquely with keys and sorted by these keys.
There is a method
that should for each
key create an array of nodes that represents the key.
Typical usage:
createNodes(java.lang.Object)
to create some nodes
(usually exactly one) per key.
Children.addNotify()
to compute a set of keys
and set it using setKeys(Collection)
.
The collection may be ordered.
Children.removeNotify()
to just call
setKeys
on Collections.EMPTY_SET
.
setKeys
with the new set of keys. Children.Keys
will
be smart and calculate exactly what it needs to do effficiently.
refreshKey(java.lang.Object)
. Usually this is not necessary.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openide.nodes.Children |
---|
Children.Array, Children.Keys, Children.Map, Children.SortedArray, Children.SortedMap |
Field Summary |
---|
Fields inherited from class org.openide.nodes.Children.Array |
---|
nodes |
Fields inherited from class org.openide.nodes.Children |
---|
LEAF, MUTEX |
Constructor Summary | |
---|---|
Children.Keys()
|
Method Summary | |
---|---|
boolean |
add(Node[] arr)
Add nodes this container. |
Object |
clone()
Special handling for clonning. |
protected abstract Node[] |
createNodes(Object key)
Create nodes for a given key. |
protected void |
destroyNodes(Node[] arr)
Called when the nodes have been removed from the children. |
protected void |
refreshKey(Object key)
Refresh the child nodes for a given key. |
boolean |
remove(Node[] arr)
Remove nodes from the list. |
protected void |
setBefore(boolean b)
Set whether new nodes should be added to the beginning or end of sublists for a given key. |
protected void |
setKeys(Collection keysSet)
Set new keys for this children object. |
protected void |
setKeys(Object[] keys)
Set keys for this list. |
Methods inherited from class org.openide.nodes.Children.Array |
---|
initCollection, refresh |
Methods inherited from class org.openide.nodes.Children |
---|
addNotify, findChild, getNode, getNodes, getNodes, getNodesCount, isInitialized, nodes, removeNotify |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Children.Keys()
Method Detail |
---|
public Object clone()
clone
in class Children.Array
public boolean add(Node[] arr)
Children
false
to signal that the addition has not been successful.
This method should be implemented by subclasses to filter some nodes, etc.
add
in class Children.Array
arr
- set of nodes to add to the list
true
if successfully addedpublic boolean remove(Node[] arr)
Children
remove
in class Children.Array
arr
- nodes to be removed
true
if the nodes could be removedprotected final void refreshKey(Object key)
key
- the key to refreshprotected final void setKeys(Collection keysSet)
keysSet
- the keys for the nodes (collection of any objects)protected final void setKeys(Object[] keys)
keys
- the keys for the nodessetKeys(Collection)
protected final void setBefore(boolean b)
b
- true
if the children should be added beforeprotected abstract Node[] createNodes(Object key)
key
- the key
protected void destroyNodes(Node[] arr)
Current implementation notifies all listeners on the nodes that nodes have been deleted.
arr
- array of deleted nodes
|
org.openide.nodes 6.7.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |