|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode
jaxx.runtime.swing.nav.treetable.NavTreeTableNode<N>
public class NavTreeTableNode<N extends NavTreeTableNode<N>>
Implementation of NavNode used to create in tree table
This node extends DefaultMutableTreeTableNode used by
JXTreeTable
| Field Summary | |
|---|---|
protected NavTreeTableNodeChildLoador<?,?,N> |
childLoador
Optional child loador to lazy create childs of the node. |
protected String |
context
Optinal context to distinguish different nodes with same internalClass. |
protected boolean |
dirty
Flag to know when renderer should (re-)compute render of the node. |
protected String |
id
Id of the data associated with the node. |
protected Class<?> |
internalClass
Type of data associated with the node |
protected boolean |
loaded
Flag to know when the none static node was loaded. |
| Fields inherited from class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode |
|---|
allowsChildren, children, parent, userObject |
| Constructor Summary | |
|---|---|
|
NavTreeTableNode(Class<?> internalClass,
String id,
String context,
NavTreeTableNodeChildLoador<?,?,N> childLoador)
|
protected |
NavTreeTableNode(String id)
|
| Method Summary | |
|---|---|
void |
add(N node)
|
Enumeration<N> |
children()
|
N |
findNodeById(String id,
NavBridge<NavTreeTableModel,N> model,
NavDataProvider provider)
Given an id, obtain the child with matching id. |
N |
getChild(String id,
NavBridge<NavTreeTableModel,N> bridge,
NavDataProvider provider)
Given an id, obtain the child with matching id. |
N |
getChildAt(int index)
|
N |
getContainerNode()
Gets the first node form this one to the root which has a none String type. |
String |
getContext()
|
String |
getId()
|
Class<?> |
getInternalClass()
|
N |
getParent()
|
N[] |
getPathToRoot(NavTreeTableNode aNode,
int depth)
|
Object |
getUserObject()
|
void |
insert(N node,
int position)
|
boolean |
isDirty()
|
boolean |
isLeaf()
|
boolean |
isLoaded()
|
boolean |
isRoot()
|
boolean |
isStaticNode()
To know if the node is static. |
boolean |
isStringNode()
Convinient method to known if the node is a String typed. |
void |
populateChilds(NavBridge<NavTreeTableModel,N> bridge,
NavDataProvider provider)
To populate childs of the node (only when a none static node). |
void |
populateNode(NavBridge<NavTreeTableModel,N> model,
NavDataProvider provider,
boolean populateChilds)
To populate the node. |
void |
remove(N node)
|
void |
removeAllChildren()
|
void |
setDirty(boolean dirty)
Changes the NavNode.isDirty() state. |
String |
toString()
|
| Methods inherited from class org.jdesktop.swingx.treetable.DefaultMutableTreeTableNode |
|---|
getColumnCount, getValueAt, isEditable, setValueAt |
| Methods inherited from class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode |
|---|
add, createChildrenList, getAllowsChildren, getChildCount, getIndex, insert, remove, remove, removeFromParent, setAllowsChildren, setParent, setUserObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.tree.TreeNode |
|---|
getAllowsChildren, getChildCount, getIndex |
| Field Detail |
|---|
protected final Class<?> internalClass
protected final String context
internalClass.
protected final String id
protected boolean dirty
protected boolean loaded
protected final NavTreeTableNodeChildLoador<?,?,N extends NavTreeTableNode<N>> childLoador
| Constructor Detail |
|---|
protected NavTreeTableNode(String id)
public NavTreeTableNode(Class<?> internalClass,
String id,
String context,
NavTreeTableNodeChildLoador<?,?,N> childLoador)
| Method Detail |
|---|
public String getId()
getId in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>public String getContext()
getContext in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>public Class<?> getInternalClass()
getInternalClass in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>public boolean isLoaded()
isLoaded in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>public boolean isDirty()
isDirty in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>public boolean isStringNode()
NavNodeString typed.
isStringNode in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>true if the type of node ifpublic boolean isStaticNode()
NavNodestatic node has no childLoador.
isStaticNode in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>true when the node is static : says, the node has
no childLoador.public N getContainerNode()
NavNodeString type.
getContainerNode in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>public boolean isRoot()
isRoot in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
public N findNodeById(String id,
NavBridge<NavTreeTableModel,N> model,
NavDataProvider provider)
NavNodeid, obtain the child with matching id.
If node is NOT loaded, then first loads it (method
NavNode.populateChilds(NavBridge, NavDataProvider)) then do search
on direct childs of the node recursivly.
findNodeById in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>id - the id of the researched nodemodel - model owner of nodesprovider - data provider
null if not found
public N getChild(String id,
NavBridge<NavTreeTableModel,N> bridge,
NavDataProvider provider)
NavNodeid, obtain the child with matching id.
If node is NOT loaded, then first loads it (method
NavNode.populateChilds(NavBridge, NavDataProvider)) then return
on direct childs of the node.
getChild in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>id - the id of the researched nodebridge - model owner of nodesprovider - data provider
null if not foundpublic void setDirty(boolean dirty)
NavNodeNavNode.isDirty() state.
As a side effect, when a renderer will use this node, it will force to
reload the render from the NavDataProvider.
setDirty in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>dirty - the new dirty valuepublic boolean isLeaf()
isLeaf in interface TreeNodeisLeaf in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>isLeaf in class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNodepublic Object getUserObject()
getUserObject in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>getUserObject in interface org.jdesktop.swingx.treetable.TreeTableNodegetUserObject in class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNodepublic String toString()
toString in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>toString in class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNode
public void populateNode(NavBridge<NavTreeTableModel,N> model,
NavDataProvider provider,
boolean populateChilds)
NavNodedirty
the node (renderer will recompute the render of the node).
If populateChilds is set to true, then also populate
childs of the node using the given dataProvider.
populateNode in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>model - le delegate modèles content le noeudprovider - le provider de donnéespopulateChilds - un drapeau pour charger aussi les fils du noeud courant
public void populateChilds(NavBridge<NavTreeTableModel,N> bridge,
NavDataProvider provider)
NavNodeloaded of the node.
For a static node, do nothing.
populateChilds in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>bridge - model owner of the nodeprovider - data providerpublic N getParent()
getParent in interface TreeNodegetParent in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>getParent in interface org.jdesktop.swingx.treetable.TreeTableNodegetParent in class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNodepublic N getChildAt(int index)
getChildAt in interface TreeNodegetChildAt in interface org.jdesktop.swingx.treetable.TreeTableNodegetChildAt in class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNodepublic Enumeration<N> children()
children in interface TreeNodechildren in interface org.jdesktop.swingx.treetable.MutableTreeTableNodechildren in interface org.jdesktop.swingx.treetable.TreeTableNodechildren in class org.jdesktop.swingx.treetable.AbstractMutableTreeTableNodepublic void removeAllChildren()
public void add(N node)
add in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
public N[] getPathToRoot(NavTreeTableNode aNode,
int depth)
public void remove(N node)
remove in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
public void insert(N node,
int position)
insert in interface NavNode<NavTreeTableModel,N extends NavTreeTableNode<N>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||