|
||||||||||
| 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 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 String |
fullPath
The full path for the node from the rood node. |
protected Class<?> |
internalClass
The type of the related bean associated with the node. |
protected JAXXContextEntryDef<?> |
jaxxContextEntryDef
The context entry definition to retrieve the bean. |
protected String |
jaxxContextEntryPath
The jxPath to process to obtain real bean from the data retrieve
in the context. |
protected String |
path
The node path. |
protected String |
pathSeparator
The path separator used to build the fullPath. |
protected Class<? extends JAXXObject> |
uIClass
The UI class associated with the node. |
protected 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(String pathSeparator,
String navigationPath,
JAXXContextEntryDef<?> jaxxContextEntryDef,
String jaxxContextEntryPath)
|
|
NavigationTreeNode(String pathSeparator,
String navigationPath,
Object jaxxContextEntryDef)
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final String pathSeparator
fullPath.
path,
fullPathprotected String path
fullPath which gives a unique identifier of the
node.
pathSeparator,
fullPathprotected 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 Class<? extends JAXXObject> uIClass
null, in that case, the
NavigationTreeModelBuilder.defaultUIClass will be used while
building the model.
protected 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 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 Object bean
getBean(JAXXContext) or directly set via method
setBean(Object).
cache of bean associated with bean to improve performance
protected Class<?> internalClass
| Constructor Detail |
|---|
public NavigationTreeNode(String pathSeparator,
String navigationPath,
Object jaxxContextEntryDef)
public NavigationTreeNode(String pathSeparator,
String navigationPath,
JAXXContextEntryDef<?> jaxxContextEntryDef,
String jaxxContextEntryPath)
| Method Detail |
|---|
public NavigationTreeNodeRenderer getRenderer()
DefaultMutableTreeNode.userObject property.public void setRenderer(NavigationTreeNodeRenderer renderer)
public String getPathSeparator()
public String getNodePath()
public void setNodePath(String navigationPath)
public Class<? extends JAXXObject> getUIClass()
public void setUIClass(Class<? extends JAXXObject> uIClass)
public void setInternalClass(Class<?> internalClass)
public Class<? extends JAXXAction> getUIHandlerClass()
public void setUIHandlerClass(Class<? extends JAXXAction> uIHandlerClass)
public JAXXContextEntryDef<?> getJaxxContextEntryDef()
public void setJaxxContextEntryDef(JAXXContextEntryDef<?> jaxxContextEntryDef)
public String getJaxxContextEntryPath()
public void setJaxxContextEntryPath(String jaxxContextEntryPath)
public Class<?> getInternalClass()
public String getFullPath()
public NavigationTreeNode getChildAt(int index)
getChildAt in interface TreeNodegetChildAt in class DefaultMutableTreeNodepublic NavigationTreeNode getParent()
getParent in interface TreeNodegetParent in class DefaultMutableTreeNodepublic NavigationTreeNode getChild(String path)
path - the name of the path to be matched in the child of this node.
path value.public Object getBean()
public void setBean(Object bean)
public void reload(JAXXContext context)
public Object getBean(JAXXContext context)
context - the context to seek
protected NavigationTreeNode getFirstAncestorWithDef()
jaxxContextEntryDef
or null if none find..
protected String computeJXPath(String expr,
NavigationTreeNode parentNode)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||