|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An FTreeNode is a node of an FTree.
It has a type and it can contain multiple objects.
Its appearence and behavior are defined by FTreeNodeAdapters
that are selected based on the FTreeNode's type.
Each FTreeNode contains an Hashtable that can be used to store objects in the node.
This Hashtable should be primarily used by FTreeNodeObjectProviders
to store objects that can be then accesed via the objectForClass()
method. Objects are stored in key-value pairs.
Changes to the FTreeNode are propagated to the node's liteners
via FTreeNodeEvents
.
Method Summary | |
void |
addFTreeNodeListener(FTreeNodeListener listener)
Add an FTreeNodeListener to this node. |
void |
addKey(java.lang.Object key,
java.lang.Object value)
Add a key-value pair to this node. |
java.util.List |
childNodes()
Get the list of children in this node. |
java.lang.Object |
objectForClass(java.lang.Class clazz)
Get the object for a given class contained in this node. |
FTreeNode |
parent()
Get the parent for this node. |
FTreePath |
path()
Get the FTreePath that leads to this node. |
void |
removeFTreeNodeListener(FTreeNodeListener listener)
Remove an FTreeNodeListener from this node. |
void |
removeKey(java.lang.Object key)
Remove a key, and the corresponding value, from this node. |
FTree |
tree()
Get the FTree to which this node belongs. |
java.lang.Class |
type()
Get the node's type. |
java.lang.Object |
value(java.lang.Object key)
Get the value contained in the node for a given key. |
Method Detail |
public java.lang.Object objectForClass(java.lang.Class clazz)
clazz
- The type of object to be returned.
public java.lang.Class type()
public FTreePath path()
public FTree tree()
public java.util.List childNodes()
public FTreeNode parent()
public void addKey(java.lang.Object key, java.lang.Object value)
key
- The key for the given value.value
- The corresponding value.public void removeKey(java.lang.Object key)
key
- The key to be removed.public java.lang.Object value(java.lang.Object key)
key
- The key.
public void addFTreeNodeListener(FTreeNodeListener listener)
listener
- The FTreeNodeListener to be added.public void removeFTreeNodeListener(FTreeNodeListener listener)
listener
- The FTreeNodeListener to be removed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |