|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.tree.DefaultMutableTreeNode
org.formaria.swing.tree.TreeModelAdapter
public class TreeModelAdapter
An adapter to allow the DataModel to be used with tree controls
Copyright (c) Formaria Ltd., 2008
| Field Summary | |
|---|---|
protected DataModel |
model
The model node |
| Fields inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject |
| Constructor Summary | |
|---|---|
TreeModelAdapter()
Constructs a new adapter |
|
| Method Summary | |
|---|---|
java.lang.Object |
get(int i)
Gets the individual list item value |
DataModel |
getDataModel()
Get the model being used by this adapter |
int |
getNumChildren()
Get the number of children belong to the model node that this object adapts |
java.lang.Object |
getSelected()
Gets the value of the selected item from the list. |
java.lang.String |
getTagName()
Gets the name of the model node |
protected void |
populateTreeModel(DataModel src)
Add the children of this node to the tree model |
void |
set(java.lang.Object o)
Set the value of the listitem |
void |
setDataModel(DataModel src)
Set the adapter source |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
|---|
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, 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 |
|---|
protected DataModel model
| Constructor Detail |
|---|
public TreeModelAdapter()
| Method Detail |
|---|
public int getNumChildren()
getNumChildren in interface ModelAdapterpublic java.lang.Object get(int i)
get in interface ModelAdapteri - The index of the listitem
public void set(java.lang.Object o)
set in interface ModelAdaptero - The new valuepublic java.lang.Object getSelected()
getSelected in interface ModelAdapterpublic void setDataModel(DataModel src)
setDataModel in interface ModelAdaptersrc - the modelpublic DataModel getDataModel()
getDataModel in interface ModelAdapterpublic java.lang.String getTagName()
protected void populateTreeModel(DataModel src)
src - the source model node
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||