|
org.openide.nodes 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openide.nodes.Children
org.openide.nodes.Children.Map<T>
public static class Children.Map<T>
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(T)
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.openide.nodes.Children |
---|
Children.Array, Children.Keys<T>, Children.Map<T>, Children.SortedArray, Children.SortedMap<T> |
Field Summary | |
---|---|
protected Map<T,Node> |
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<T,Node> m)
Constructs a new list with a supplied map object. |
Method Summary | |
---|---|
boolean |
add(Node[] arr)
Does nothing. |
protected Map<T,Node> |
initMap()
Initialize some nodes. |
protected void |
put(T key,
Node node)
Add one key and one node to the list. |
protected void |
putAll(Map<? extends T,? extends Node> 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(T 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(T key)
Remove a given child node from the list by its key. |
protected void |
removeAll(Collection<? extends T> 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<T,Node> 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<T,Node> m)
m
- the map to use for this listpublic Children.Map()
HashMap
.
Method Detail |
---|
protected final void refresh()
protected final void refreshKey(T key)
key
- the key that should be refreshedprotected final void putAll(Map<? extends T,? extends Node> map)
Node
s.
map
- the map with pairs to addprotected final void put(T key, Node node)
key
- the keynode
- the nodeprotected final void removeAll(Collection<? extends T> keys)
keys
- collection of keys to removeprotected void remove(T key)
key
- key to removeprotected Map<T,Node> initMap()
The default implementation returns new HashMap (7)
.
public 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 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |