jaxx.runtime.swing.navigation
Class NavigationTreeModel.NavigationTreeNode

java.lang.Object
  extended by javax.swing.tree.DefaultMutableTreeNode
      extended by jaxx.runtime.swing.navigation.NavigationTreeModel.NavigationTreeNode
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode
Enclosing class:
NavigationTreeModel

public class NavigationTreeModel.NavigationTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

la représentation d'un noeud dans le modele NavigationTreeModel

Author:
chemit
See Also:
Serialized Form

Field Summary
protected  java.lang.Object cachedBean
          cache of bean associated with bean to improve performance
protected  java.lang.String cachedNavigationPath
          the cached complete navigation path from root node used for performance issues.
protected  java.lang.Class<?> internalClass
          The type of the related bean associated with the node.
protected  java.lang.Class<? extends JAXXAction> jaxxActionClass
          the JAXXAction class associated with this node and will be put in ui context
protected  java.lang.Class<? extends JAXXObject> jaxxClass
          the JAXXObject class associated with this node (can be null)
protected  JAXXContextEntryDef<?> jaxxContextEntryDef
          the definition of the JAXXContext entry associated to this node, if null will seek in parent
protected  java.lang.String jaxxContextEntryPath
          jxPath to process to obtain real value associated from context with the node (can be null)
protected  java.lang.String navigationPath
          pour representer le context du noeud.
protected  NavigationUtil.NodeRenderer renderer
          renderer of the node
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
NavigationTreeModel.NavigationTreeNode(java.lang.Object renderer, JAXXContextEntryDef<?> jaxxContextEntryDef, java.lang.String jaxxContextEntryPath, java.lang.String navigationPath, java.lang.Class<? extends JAXXObject> jaxxClass, java.lang.Class<? extends JAXXAction> jaxxActionClass)
           
NavigationTreeModel.NavigationTreeNode(java.lang.Object renderer, java.lang.Object jaxxContextEntryDef, java.lang.String navigationPath, java.lang.Class<? extends JAXXObject> jaxxClass, java.lang.Class<? extends JAXXAction> jaxxActionClass)
           
 
Method Summary
 void clearCache()
           
 void clearCache(boolean deep)
           
protected  java.lang.String computeJXPath(java.lang.String expr, NavigationTreeModel.NavigationTreeNode parentNode)
           
 java.lang.Object getCachedBean()
           
 NavigationTreeModel.NavigationTreeNode getChild(java.lang.String navigationPath)
           
 NavigationTreeModel.NavigationTreeNode getChildAt(int index)
           
 java.lang.String getContextPath()
           
protected  NavigationTreeModel.NavigationTreeNode getFirstAncestorWithDef()
           
 java.lang.Class<?> getInternalClass()
           
 java.lang.Class<? extends JAXXAction> getJaxxActionClass()
           
 java.lang.Class<? extends JAXXObject> getJaxxClass()
           
 JAXXContextEntryDef<?> getJaxxContextEntryDef()
           
 java.lang.String getJaxxContextEntryPath()
           
 java.lang.Object getJAXXContextValue(JAXXContext context)
          Obtain the associated bean value from context corresponding to node
 java.lang.String getNavigationPath()
           
 NavigationTreeModel.NavigationTreeNode getParent()
           
 void setCachedBean(java.lang.Object cachedBean)
           
 void setInternalClass(java.lang.Class<?> internalClass)
           
 void setJaxxActionClass(java.lang.Class<? extends JAXXAction> jaxxActionClass)
           
 void setJaxxClass(java.lang.Class<? extends JAXXObject> jaxxClass)
           
 void setJaxxContextEntryDef(JAXXContextEntryDef<?> jaxxContextEntryDef)
           
 void setJaxxContextEntryPath(java.lang.String jaxxContextEntryPath)
           
 void setNavigationPath(java.lang.String navigationPath)
           
 
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

navigationPath

protected java.lang.String navigationPath
pour representer le context du noeud.


cachedNavigationPath

protected java.lang.String cachedNavigationPath
the cached complete navigation path from root node used for performance issues.


jaxxClass

protected java.lang.Class<? extends JAXXObject> jaxxClass
the JAXXObject class associated with this node (can be null)


jaxxActionClass

protected java.lang.Class<? extends JAXXAction> jaxxActionClass
the JAXXAction class associated with this node and will be put in ui context


jaxxContextEntryDef

protected JAXXContextEntryDef<?> jaxxContextEntryDef
the definition of the JAXXContext entry associated to this node, if null will seek in parent


jaxxContextEntryPath

protected java.lang.String jaxxContextEntryPath
jxPath to process to obtain real value associated from context with the node (can be null)


cachedBean

protected transient java.lang.Object cachedBean
cache of bean associated with bean to improve performance


renderer

protected NavigationUtil.NodeRenderer renderer
renderer of the node


internalClass

protected java.lang.Class<?> internalClass
The type of the related bean associated with the node.

Note: This type is here to override the NodeRenderer internalClass, since we could need to override this data.

If this property is let to null, then we will use the NodeRenderer one

Constructor Detail

NavigationTreeModel.NavigationTreeNode

public NavigationTreeModel.NavigationTreeNode(java.lang.Object renderer,
                                              java.lang.Object jaxxContextEntryDef,
                                              java.lang.String navigationPath,
                                              java.lang.Class<? extends JAXXObject> jaxxClass,
                                              java.lang.Class<? extends JAXXAction> jaxxActionClass)

NavigationTreeModel.NavigationTreeNode

public NavigationTreeModel.NavigationTreeNode(java.lang.Object renderer,
                                              JAXXContextEntryDef<?> jaxxContextEntryDef,
                                              java.lang.String jaxxContextEntryPath,
                                              java.lang.String navigationPath,
                                              java.lang.Class<? extends JAXXObject> jaxxClass,
                                              java.lang.Class<? extends JAXXAction> jaxxActionClass)
Method Detail

getNavigationPath

public java.lang.String getNavigationPath()

setNavigationPath

public void setNavigationPath(java.lang.String navigationPath)

getJaxxClass

public java.lang.Class<? extends JAXXObject> getJaxxClass()

setJaxxClass

public void setJaxxClass(java.lang.Class<? extends JAXXObject> jaxxClass)

setInternalClass

public void setInternalClass(java.lang.Class<?> internalClass)

getJaxxActionClass

public java.lang.Class<? extends JAXXAction> getJaxxActionClass()

setJaxxActionClass

public void setJaxxActionClass(java.lang.Class<? extends JAXXAction> jaxxActionClass)

getJaxxContextEntryDef

public JAXXContextEntryDef<?> getJaxxContextEntryDef()

setJaxxContextEntryDef

public void setJaxxContextEntryDef(JAXXContextEntryDef<?> jaxxContextEntryDef)

getJaxxContextEntryPath

public java.lang.String getJaxxContextEntryPath()

setJaxxContextEntryPath

public void setJaxxContextEntryPath(java.lang.String jaxxContextEntryPath)

getInternalClass

public java.lang.Class<?> getInternalClass()

getContextPath

public java.lang.String getContextPath()
Returns:
the fully context pathof the node from the root node to this.

getChildAt

public NavigationTreeModel.NavigationTreeNode getChildAt(int index)
Specified by:
getChildAt in interface javax.swing.tree.TreeNode
Overrides:
getChildAt in class javax.swing.tree.DefaultMutableTreeNode

getParent

public NavigationTreeModel.NavigationTreeNode getParent()
Specified by:
getParent in interface javax.swing.tree.TreeNode
Overrides:
getParent in class javax.swing.tree.DefaultMutableTreeNode

getChild

public NavigationTreeModel.NavigationTreeNode getChild(java.lang.String navigationPath)
Parameters:
navigationPath - the name of the navigationPath to be matched in the cild of this node.
Returns:
the child of this node with given navigationPath value.

getJAXXContextValue

public java.lang.Object getJAXXContextValue(JAXXContext context)
Obtain the associated bean value from context corresponding to node

Parameters:
context - the context to seek
Returns:
the value associated in context with the given context path

getFirstAncestorWithDef

protected NavigationTreeModel.NavigationTreeNode getFirstAncestorWithDef()
Returns:
the first ancestor with a none null jaxxContextEntryDef or null if none find..

computeJXPath

protected java.lang.String computeJXPath(java.lang.String expr,
                                         NavigationTreeModel.NavigationTreeNode parentNode)

clearCache

public void clearCache()

clearCache

public void clearCache(boolean deep)

getCachedBean

public java.lang.Object getCachedBean()

setCachedBean

public void setCachedBean(java.lang.Object cachedBean)


Copyright © 2008-2009 CodeLutin. All Rights Reserved.