DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary. It is dynamic in that it will only create the children as necessary.
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
DynamicUtilTreeNode can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary. It is dynamic in that it will only create the children as necessary. Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
(*create-children parent children)
Adds to parent all the children in children. If children is an array or vector all of its elements are added is children, otherwise if children is a hashtable all the key/value pairs are added in the order Enumeration returns them.
parent - javax.swing.tree.DefaultMutableTreeNode
children - java.lang.Object
Adds to parent all the children in children. If children is an array or vector all of its elements are added is children, otherwise if children is a hashtable all the key/value pairs are added in the order Enumeration returns them. parent - `javax.swing.tree.DefaultMutableTreeNode` children - `java.lang.Object`
(->dynamic-util-tree-node value children)
Constructor.
Creates a node with the specified object as its value and with the specified children. For the node to allow children, the children-object must be an array of objects, a Vector, or a Hashtable -- even if empty. Otherwise, the node is not allowed to have children.
value - the Object that is the value for the new node - java.lang.Object
children - an array of Objects, a Vector, or a Hashtable used to create the child nodes; if any other object is specified, or if the value is null, then the node is not allowed to have children - java.lang.Object
Constructor. Creates a node with the specified object as its value and with the specified children. For the node to allow children, the children-object must be an array of objects, a Vector, or a Hashtable -- even if empty. Otherwise, the node is not allowed to have children. value - the Object that is the value for the new node - `java.lang.Object` children - an array of Objects, a Vector, or a Hashtable used to create the child nodes; if any other object is specified, or if the value is null, then the node is not allowed to have children - `java.lang.Object`
(children this)
Subclassed to load the children, if necessary.
returns: an Enumeration of this node's children - java.util.Enumeration
Subclassed to load the children, if necessary. returns: an Enumeration of this node's children - `java.util.Enumeration`
(get-child-at this index)
Subclassed to load the children, if necessary.
index - an index into this node's child array - int
returns: the TreeNode in this node's child array at the specified index - javax.swing.tree.TreeNode
Subclassed to load the children, if necessary. index - an index into this node's child array - `int` returns: the TreeNode in this node's child array at the specified index - `javax.swing.tree.TreeNode`
(get-child-count this)
Returns the number of child nodes.
returns: the number of child nodes - int
Returns the number of child nodes. returns: the number of child nodes - `int`
(leaf? this)
Returns true if this node allows children. Whether the node allows children depends on how it was created.
returns: true if this node allows children, false otherwise - boolean
Returns true if this node allows children. Whether the node allows children depends on how it was created. returns: true if this node allows children, false otherwise - `boolean`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close