|
||||||||||
| 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.tree.NavigationTreeNode
public class NavigationTreeNode
Node of the NavigationTreeModel.
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 NavigationNodeRenderer
which is in fact the DefaultMutableTreeNode.userObject, the object can be synch with the
bean via the NavigationNodeRenderer.reload(Object)
method.
NavigationTreeModel,
NavigationNodeRenderer,
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 |
| Methods inherited from interface jaxx.runtime.swing.navigation.NavigationNode |
|---|
getAllowsChildren, getChildCount, getUserObject, isLeaf, isRoot, remove, removeFromParent, setUserObject |
| 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 AbstractNavigationModelBuilder.defaultUIClass will be used while building
the model.
protected Class<? extends JAXXAction> uIHandlerClass
null, in that case, the AbstractNavigationModelBuilder.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 NavigationNodeRenderer getRenderer()
getRenderer in interface NavigationNode<NavigationTreeNode>DefaultMutableTreeNode.userObject property.public void setRenderer(NavigationNodeRenderer renderer)
setRenderer in interface NavigationNode<NavigationTreeNode>public String getPathSeparator()
getPathSeparator in interface NavigationNode<NavigationTreeNode>public String getNodePath()
getNodePath in interface NavigationNode<NavigationTreeNode>public void setNodePath(String navigationPath)
setNodePath in interface NavigationNode<NavigationTreeNode>public Class<? extends JAXXObject> getUIClass()
getUIClass in interface NavigationNode<NavigationTreeNode>public void setUIClass(Class<? extends JAXXObject> uIClass)
setUIClass in interface NavigationNode<NavigationTreeNode>public void setInternalClass(Class<?> internalClass)
setInternalClass in interface NavigationNode<NavigationTreeNode>public Class<? extends JAXXAction> getUIHandlerClass()
getUIHandlerClass in interface NavigationNode<NavigationTreeNode>public void setUIHandlerClass(Class<? extends JAXXAction> uIHandlerClass)
setUIHandlerClass in interface NavigationNode<NavigationTreeNode>public JAXXContextEntryDef<?> getJaxxContextEntryDef()
getJaxxContextEntryDef in interface NavigationNode<NavigationTreeNode>public void setJaxxContextEntryDef(JAXXContextEntryDef<?> jaxxContextEntryDef)
setJaxxContextEntryDef in interface NavigationNode<NavigationTreeNode>public String getJaxxContextEntryPath()
getJaxxContextEntryPath in interface NavigationNode<NavigationTreeNode>public void setJaxxContextEntryPath(String jaxxContextEntryPath)
setJaxxContextEntryPath in interface NavigationNode<NavigationTreeNode>public Class<?> getInternalClass()
getInternalClass in interface NavigationNode<NavigationTreeNode>public String getFullPath()
getFullPath in interface NavigationNode<NavigationTreeNode>public NavigationTreeNode getChildAt(int index)
getChildAt in interface TreeNodegetChildAt in interface NavigationNode<NavigationTreeNode>getChildAt in class DefaultMutableTreeNodepublic NavigationTreeNode getParent()
getParent in interface TreeNodegetParent in interface NavigationNode<NavigationTreeNode>getParent in class DefaultMutableTreeNodepublic NavigationTreeNode getChild(String path)
getChild in interface NavigationNode<NavigationTreeNode>path - the name of the path to be matched in the child of
this node.
path value.public Object getBean()
getBean in interface NavigationNode<NavigationTreeNode>public void setBean(Object bean)
setBean in interface NavigationNode<NavigationTreeNode>public void reload(JAXXContext context)
reload in interface NavigationNode<NavigationTreeNode>public Object getBean(JAXXContext context)
getBean in interface NavigationNode<NavigationTreeNode>context - the context to seek
public void insert(NavigationTreeNode child,
int index)
insert in interface NavigationNode<NavigationTreeNode>public void remove(NavigationTreeNode node)
remove in interface NavigationNode<NavigationTreeNode>public void setParent(NavigationTreeNode newParent)
setParent in interface NavigationNode<NavigationTreeNode>public int getIndex(NavigationTreeNode node)
getIndex in interface NavigationNode<NavigationTreeNode>public Enumeration<? extends NavigationTreeNode> children()
children in interface TreeNodechildren in interface NavigationNode<NavigationTreeNode>children in class DefaultMutableTreeNodepublic void add(NavigationTreeNode node)
add in interface NavigationNode<NavigationTreeNode>public NavigationTreeNode[] getPath()
getPath in interface NavigationNode<NavigationTreeNode>getPath in class DefaultMutableTreeNode
public NavigationTreeNode[] getPathToRoot(NavigationTreeNode aNode,
int depth)
getPathToRoot in interface NavigationNode<NavigationTreeNode>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 | |||||||||