Package jaxx.runtime.swing.nav.treetable
Class NavTreeTableNode<N extends NavTreeTableNode<N>>
java.lang.Object
org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode
jaxx.runtime.swing.nav.treetable.NavTreeTableNode<N>
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,javax.swing.tree.TreeNode,NavNode<NavTreeTableModel,N>,org.jdesktop.swingx.treetable.MutableTreeTableNode,org.jdesktop.swingx.treetable.TreeTableNode
public class NavTreeTableNode<N extends NavTreeTableNode<N>> extends org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode implements NavNode<NavTreeTableModel,N>
Implementation of
NavNode used to create in tree table
This node extends DefaultMutableTreeTableNode used by
JXTreeTable- Since:
- 2.2
- Author:
- Sylvain Lletellier
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected NavTreeTableNodeChildLoador<?,?,N>childLoadorOptional child loador to lazy create childs of the node.protected java.lang.StringcontextOptinal context to distinguish different nodes with sameinternalClass.protected booleandirtyFlag to know when renderer should (re-)compute render of the node.protected java.lang.StringidId of the data associated with the node.protected java.lang.Class<?>internalClassType of data associated with the nodeprotected booleanloadedFlag to know when the none static node was loaded.Fields inherited from class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
allowsChildren, children, parent, userObject -
Constructor Summary
Constructors Modifier Constructor Description NavTreeTableNode(java.lang.Class<?> internalClass, java.lang.String id, java.lang.String context, NavTreeTableNodeChildLoador<?,?,N> childLoador)protectedNavTreeTableNode(java.lang.String id) -
Method Summary
Modifier and Type Method Description voidadd(N node)java.util.Enumeration<N>children()NfindNodeById(java.lang.String id, NavBridge<NavTreeTableModel,N> model, NavDataProvider provider)Given anid, obtain the child with matching id.NgetChild(java.lang.String id, NavBridge<NavTreeTableModel,N> bridge, NavDataProvider provider)Given anid, obtain the child with matching id.NgetChildAt(int index)NgetContainerNode()Gets the first node form this one to the root which has a noneStringtype.java.lang.StringgetContext()java.lang.StringgetId()java.lang.Class<?>getInternalClass()NgetParent()N[]getPathToRoot(NavTreeTableNode aNode, int depth)java.lang.ObjectgetUserObject()voidinsert(N node, int position)booleanisDirty()booleanisLeaf()booleanisLoaded()booleanisRoot()booleanisStaticNode()To know if the node is static.booleanisStringNode()Convinient method to known if the node is aStringtyped.voidpopulateChilds(NavBridge<NavTreeTableModel,N> bridge, NavDataProvider provider)To populate childs of the node (only when a none static node).voidpopulateNode(NavBridge<NavTreeTableModel,N> model, NavDataProvider provider, boolean populateChilds)To populate the node.voidremove(N node)voidremoveAllChildren()voidsetDirty(boolean dirty)Changes theNavNode.isDirty()state.java.lang.StringtoString()Methods inherited from class org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode
getColumnCount, getValueAt, isEditable, setValueAtMethods inherited from class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
add, createChildrenList, getAllowsChildren, getChildCount, getIndex, insert, remove, remove, removeFromParent, setAllowsChildren, setParent, setUserObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.swing.tree.TreeNode
getAllowsChildren, getChildCount, getIndex
-
Field Details
-
internalClass
protected final java.lang.Class<?> internalClassType of data associated with the node -
context
protected final java.lang.String contextOptinal context to distinguish different nodes with sameinternalClass. -
id
protected final java.lang.String idId of the data associated with the node. -
dirty
protected boolean dirtyFlag to know when renderer should (re-)compute render of the node. -
loaded
protected boolean loadedFlag to know when the none static node was loaded. -
childLoador
Optional child loador to lazy create childs of the node.
-
-
Constructor Details
-
NavTreeTableNode
protected NavTreeTableNode(java.lang.String id)
-
-
Method Details
-
getId
public java.lang.String getId()- Specified by:
getIdin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
getContext
public java.lang.String getContext()- Specified by:
getContextin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
getInternalClass
public java.lang.Class<?> getInternalClass()- Specified by:
getInternalClassin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
isLoaded
public boolean isLoaded()- Specified by:
isLoadedin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
isDirty
public boolean isDirty()- Specified by:
isDirtyin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
isStringNode
public boolean isStringNode()Description copied from interface:NavNodeConvinient method to known if the node is aStringtyped.- Specified by:
isStringNodein interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Returns:
trueif the type of node if
-
isStaticNode
public boolean isStaticNode()Description copied from interface:NavNodeTo know if the node is static. Astaticnode has nochildLoador.- Specified by:
isStaticNodein interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Returns:
truewhen the node is static : says, the node has nochildLoador.
-
getContainerNode
Description copied from interface:NavNodeGets the first node form this one to the root which has a noneStringtype.- Specified by:
getContainerNodein interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Returns:
- the first concrete node type
-
isRoot
public boolean isRoot()- Specified by:
isRootin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
setDirty
public void setDirty(boolean dirty)Description copied from interface:NavNodeChanges theNavNode.isDirty()state. As a side effect, when a renderer will use this node, it will force to reload the render from theNavDataProvider.- Specified by:
setDirtyin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Parameters:
dirty- the new dirty value
-
isLeaf
public boolean isLeaf()- Specified by:
isLeafin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Specified by:
isLeafin interfacejavax.swing.tree.TreeNode- Overrides:
isLeafin classorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
-
getUserObject
public java.lang.Object getUserObject()- Specified by:
getUserObjectin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Specified by:
getUserObjectin interfaceorg.jdesktop.swingx.treetable.TreeTableNode- Overrides:
getUserObjectin classorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
-
toString
public java.lang.String toString()- Specified by:
toStringin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Overrides:
toStringin classorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
-
getParent
- Specified by:
getParentin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>- Specified by:
getParentin interfacejavax.swing.tree.TreeNode- Specified by:
getParentin interfaceorg.jdesktop.swingx.treetable.TreeTableNode- Overrides:
getParentin classorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
-
getChildAt
- Specified by:
getChildAtin interfacejavax.swing.tree.TreeNode- Specified by:
getChildAtin interfaceorg.jdesktop.swingx.treetable.TreeTableNode- Overrides:
getChildAtin classorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
-
children
- Specified by:
childrenin interfaceorg.jdesktop.swingx.treetable.MutableTreeTableNode- Specified by:
childrenin interfacejavax.swing.tree.TreeNode- Specified by:
childrenin interfaceorg.jdesktop.swingx.treetable.TreeTableNode- Overrides:
childrenin classorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
-
removeAllChildren
public void removeAllChildren() -
add
- Specified by:
addin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
remove
- Specified by:
removein interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-
insert
- Specified by:
insertin interfaceNavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
-