|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
jaxx.runtime.swing.navigation.NavigationTreeNode
public class NavigationTreeNode
Node of the NavigationTreeModel.
Each node is associated with :
bean coming from a JAXXContext uiClass to build the associated ui getBean(JAXXContext).
In few words, if the jaxxContextEntryDef is defined, it means
that the object is taken from the context.
Otherwise, find the first ancestor with an context entry and retrieve from
here the bean.
Then go down to the initial node by applying the jxpath expressions
jaxxContextEntryPath of each node on road back.
To identify easly a node, each node has a path and a
fullPath (full path from root node).
To display the node we use a NavigationTreeNodeRenderer which is in
fact the DefaultMutableTreeNode.userObject, the object can be synch with the bean via the
NavigationTreeNodeRenderer.reload(java.lang.Object) method.
NavigationTreeModel,
NavigationTreeNodeRenderer,
Serialized Form| Field Summary | |
|---|---|
protected java.lang.Object |
bean
The bean associated with the node ( the value can be obtain via the method getBean(JAXXContext) or directly set via method
setBean(Object). |
protected java.lang.String |
fullPath
The full path for the node from the rood node. |
protected java.lang.Class<?> |
internalClass
The type of the related bean associated with the node. |
protected JAXXContextEntryDef<?> |
jaxxContextEntryDef
The context entry definition to retrieve the bean. |
protected java.lang.String |
jaxxContextEntryPath
The jxPath to process to obtain real bean from the data retrieve
in the context. |
protected java.lang.String |
path
The node path. |
protected java.lang.String |
pathSeparator
The path separator used to build the fullPath. |
protected java.lang.Class<? extends JAXXObject> |
uIClass
The UI class associated with the node. |
protected java.lang.Class<? extends JAXXAction> |
uIHandlerClass
The UI handler class associated with the node. |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
NavigationTreeNode(java.lang.String pathSeparator,
java.lang.String navigationPath,
JAXXContextEntryDef<?> jaxxContextEntryDef,
java.lang.String jaxxContextEntryPath)
|
|
NavigationTreeNode(java.lang.String pathSeparator,
java.lang.String navigationPath,
java.lang.Object jaxxContextEntryDef)
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
computeJXPath(java.lang.String expr,
NavigationTreeNode parentNode)
|
java.lang.Object |
getBean()
|
java.lang.Object |
getBean(JAXXContext context)
Obtain the associated bean value from context corresponding to node |
NavigationTreeNode |
getChild(java.lang.String path)
|
NavigationTreeNode |
getChildAt(int index)
|
protected NavigationTreeNode |
getFirstAncestorWithDef()
|
java.lang.String |
getFullPath()
|
java.lang.Class<?> |
getInternalClass()
|
JAXXContextEntryDef<?> |
getJaxxContextEntryDef()
|
java.lang.String |
getJaxxContextEntryPath()
|
java.lang.String |
getNodePath()
|
NavigationTreeNode |
getParent()
|
java.lang.String |
getPathSeparator()
|
NavigationTreeNodeRenderer |
getRenderer()
|
java.lang.Class<? extends JAXXObject> |
getUIClass()
|
java.lang.Class<? extends JAXXAction> |
getUIHandlerClass()
|
void |
reload(JAXXContext context)
|
void |
setBean(java.lang.Object bean)
|
void |
setInternalClass(java.lang.Class<?> internalClass)
|
void |
setJaxxContextEntryDef(JAXXContextEntryDef<?> jaxxContextEntryDef)
|
void |
setJaxxContextEntryPath(java.lang.String jaxxContextEntryPath)
|
void |
setNodePath(java.lang.String navigationPath)
|
void |
setRenderer(NavigationTreeNodeRenderer renderer)
|
void |
setUIClass(java.lang.Class<? extends JAXXObject> uIClass)
|
void |
setUIHandlerClass(java.lang.Class<? extends JAXXAction> uIHandlerClass)
|
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String pathSeparator
fullPath.
path,
fullPathprotected java.lang.String path
fullPath which gives a unique identifier of the
node.
pathSeparator,
fullPathprotected java.lang.String fullPath
path from the root node
to this node, between each path we introduce the pathSeparator.
Exemple :
root
$root
`-- child1
`-- child2
will given $root/child1/child2.
pathSeparator,
pathprotected java.lang.Class<? extends JAXXObject> uIClass
null, in that case, the
NavigationTreeModelBuilder.defaultUIClass will be used while
building the model.
protected java.lang.Class<? extends JAXXAction> uIHandlerClass
null, in that case, the
NavigationTreeModelBuilder.defaultUIHandlerClass will be used
while building the model.
protected JAXXContextEntryDef<?> jaxxContextEntryDef
bean will be retrieve on a ancestor
node.
protected java.lang.String jaxxContextEntryPath
bean from the data retrieve
in the context.
Note: If not set -no jxpath will be apply on the bean from context.
protected transient java.lang.Object bean
getBean(JAXXContext) or directly set via method
setBean(Object).
cache of bean associated with bean to improve performance
protected java.lang.Class<?> internalClass
| Constructor Detail |
|---|
public NavigationTreeNode(java.lang.String pathSeparator,
java.lang.String navigationPath,
java.lang.Object jaxxContextEntryDef)
public NavigationTreeNode(java.lang.String pathSeparator,
java.lang.String navigationPath,
JAXXContextEntryDef<?> jaxxContextEntryDef,
java.lang.String jaxxContextEntryPath)
| Method Detail |
|---|
public NavigationTreeNodeRenderer getRenderer()
DefaultMutableTreeNode.userObject property.public void setRenderer(NavigationTreeNodeRenderer renderer)
public java.lang.String getPathSeparator()
public java.lang.String getNodePath()
public void setNodePath(java.lang.String navigationPath)
public java.lang.Class<? extends JAXXObject> getUIClass()
public void setUIClass(java.lang.Class<? extends JAXXObject> uIClass)
public void setInternalClass(java.lang.Class<?> internalClass)
public java.lang.Class<? extends JAXXAction> getUIHandlerClass()
public void setUIHandlerClass(java.lang.Class<? extends JAXXAction> uIHandlerClass)
public JAXXContextEntryDef<?> getJaxxContextEntryDef()
public void setJaxxContextEntryDef(JAXXContextEntryDef<?> jaxxContextEntryDef)
public java.lang.String getJaxxContextEntryPath()
public void setJaxxContextEntryPath(java.lang.String jaxxContextEntryPath)
public java.lang.Class<?> getInternalClass()
public java.lang.String getFullPath()
public NavigationTreeNode getChildAt(int index)
getChildAt in interface javax.swing.tree.TreeNodegetChildAt in class javax.swing.tree.DefaultMutableTreeNodepublic NavigationTreeNode getParent()
getParent in interface javax.swing.tree.TreeNodegetParent in class javax.swing.tree.DefaultMutableTreeNodepublic NavigationTreeNode getChild(java.lang.String path)
path - the name of the path to be matched in the child of this node.
path value.public java.lang.Object getBean()
public void setBean(java.lang.Object bean)
public void reload(JAXXContext context)
public java.lang.Object getBean(JAXXContext context)
context - the context to seek
protected NavigationTreeNode getFirstAncestorWithDef()
jaxxContextEntryDef
or null if none find..
protected java.lang.String computeJXPath(java.lang.String expr,
NavigationTreeNode parentNode)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||