|
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.Map
public static class Children.Map
Implements the storage of node children by a map.
This class also permits
association of a key with any node and to remove nodes by key.
Subclasses should reasonably
implement add(org.openide.nodes.Node[])
and remove(java.lang.Object)
.
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 | |
---|---|
protected Map |
nodes
A map to use to store children in. |
Fields inherited from class org.openide.nodes.Children |
---|
LEAF, MUTEX |
Constructor Summary | |
---|---|
|
Children.Map()
Constructs a new list using HashMap . |
protected |
Children.Map(Map m)
Constructs a new list with a supplied map object. |
Method Summary | |
---|---|
boolean |
add(Node[] arr)
Does nothing. |
protected Map |
initMap()
Initialize some nodes. |
protected void |
put(Object key,
Node node)
Add one key and one node to the list. |
protected void |
putAll(Map map)
Add a collection of new key/value pairs into the map. |
protected void |
refresh()
Allows subclasses that directly modifies the map with nodes to synchronize the state of the children. |
protected void |
refreshKey(Object key)
Allows subclasses that directly modifies the map with nodes to synchronize the state of the children. |
boolean |
remove(Node[] arr)
Does nothing. |
protected void |
remove(Object key)
Remove a given child node from the list by its key. |
protected void |
removeAll(Collection keys)
Remove some children from the list by key. |
Methods inherited from class org.openide.nodes.Children |
---|
addNotify, clone, 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 |
Field Detail |
---|
protected Map nodes
Object
s, values are Node
s.
Do not modify elements in the map! Use it only for read access.
Constructor Detail |
---|
protected Children.Map(Map m)
m
- the map to use for this listpublic Children.Map()
HashMap
.
Method Detail |
---|
protected final void refresh()
protected final void refreshKey(Object key)
key
- the key that should be refreshedprotected final void putAll(Map map)
Node
s.
map
- the map with pairs to addprotected final void put(Object key, Node node)
key
- the keynode
- the nodeprotected final void removeAll(Collection keys)
keys
- collection of keys to removeprotected void remove(Object key)
key
- key to removeprotected Map initMap()
The default implementation returns new HashMap (7)
.
Object
s to Node
spublic boolean add(Node[] arr)
arr
- nodes to add
false
in the default implementationpublic boolean remove(Node[] arr)
arr
- nodes to remove
false
in the default implementation
|
org.openide.nodes 6.7.22 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |