|
instrument/JTree API Documentation | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Objects implementing NodeFactory are useful when you want to
build instrumented trees with specialized tree nodes. While you
will be best served to use DefaultMutableTreeNode type nodes,
the NodeFactory gives you complete freedom in what kind of
user objects to put into those nodes. The Instrument/JTree classes use
node factories throughout when building new nodes.
If a NodeFactory implements XmlNodeFactory,
then it can build nodes from imported XML.
If a NodeFactory implements UserObjectFactory,
then the user will be able to rename the nodes if he so wishes.
NodeInfo,
UserObjectFactory,
XmlNodeFactory,
DefaultNodeFactory| Method Summary | |
javax.swing.tree.TreeNode |
cloneNode(javax.swing.tree.TreeNode node)
Creates a new node that is identical to another. |
javax.swing.tree.TreeNode |
createNode(java.lang.Object ob)
Creates a new node with a given user object. |
javax.swing.tree.TreeNode |
createNode(java.lang.String title,
java.lang.String contents)
Creates a new node with a given title and contents. |
javax.swing.tree.TreeNode |
createNode(javax.swing.tree.TreeNode parent)
Creates a default empty node. |
java.awt.datatransfer.Transferable |
createTransferable(java.lang.Object[] nodes,
DndId dndId)
Will create and return a suitable Transferable carrying
data for multiple nodes. |
java.awt.datatransfer.Transferable |
createTransferable(java.lang.Object node,
DndId dndId)
Will create and return a suitable Transferable carrying
data for one node. |
| Method Detail |
public javax.swing.tree.TreeNode cloneNode(javax.swing.tree.TreeNode node)
node - Node to make a copy of.node parameter.public javax.swing.tree.TreeNode createNode(javax.swing.tree.TreeNode parent)
parent - Reference to the parent that the new node will be put
under. This parameter may be null. Implementations are quite free to
ignore this parameter if they do not need it.public javax.swing.tree.TreeNode createNode(java.lang.Object ob)
public javax.swing.tree.TreeNode createNode(java.lang.String title,
java.lang.String contents)
public java.awt.datatransfer.Transferable createTransferable(java.lang.Object node,
DndId dndId)
throws org.pvv.bcd.Util.FeatureNotSupportedException
Transferable carrying
data for one node.node - Node to create a Transferable for.Unique - DND id associated with this transfer.Transferable suitable for transferring
the given node data.org.pvv.bcd.Util.FeatureNotSupportedException - if data transfer is not supported
by this node factory.createTransferable(Object[], DndId),
DefaultTransferable
public java.awt.datatransfer.Transferable createTransferable(java.lang.Object[] nodes,
DndId dndId)
throws org.pvv.bcd.Util.FeatureNotSupportedException
Transferable carrying
data for multiple nodes.nodes - Nodes to create a Transferable for.Unique - DND id associated with this transfer.Transferable suitable for transferring the
given node data.org.pvv.bcd.Util.FeatureNotSupportedException - if data transfer is not supported
by this node factory.createTransferable(Object, DndId),
DefaultTransferable
|
instrument/JTree API Documentation | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||