Uses of Interface
javax.swing.tree.TreeNode
Package
Description
Provides a set of "lightweight" (all-Java language) components
that, to the maximum degree possible, work the same on all platforms.
Provides classes and interfaces that deal with editable and noneditable text
components.
Provides the class
HTMLEditorKit
and supporting classes for creating
HTML text editors.Provides classes and interfaces for dealing with
javax.swing.JTree
.-
Uses of TreeNode in javax.swing
Modifier and TypeClassDescriptionstatic class
DynamicUtilTreeNode
can wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.Modifier and TypeMethodDescriptionJTree.DynamicUtilTreeNode.getChildAt
(int index) Subclassed to load the children, if necessary.Modifier and TypeMethodDescriptionJTree.DynamicUtilTreeNode.children()
Subclassed to load the children, if necessary.ModifierConstructorDescriptionReturns aJTree
with the specifiedTreeNode
as its root, which displays the root node.Returns aJTree
with the specifiedTreeNode
as its root, which displays the root node and which decides whether a node is a leaf node in the specified manner. -
Uses of TreeNode in javax.swing.text
Modifier and TypeClassDescriptionclass
Implements the abstract part of an element.class
Implements a composite element that contains other elements.class
Implements an element that directly represents content of some kind.protected class
Default root element for a document... maps out the paragraphs/lines contained.Modifier and TypeMethodDescriptionAbstractDocument.AbstractElement.getChildAt
(int childIndex) Returns the childTreeNode
at indexchildIndex
.AbstractDocument.AbstractElement.getParent()
Returns the parentTreeNode
of the receiver.Modifier and TypeMethodDescriptionabstract Enumeration
<TreeNode> AbstractDocument.AbstractElement.children()
Returns the children of the receiver as anEnumeration
.AbstractDocument.BranchElement.children()
Returns the children of the receiver as anEnumeration
.AbstractDocument.LeafElement.children()
Returns the children of the receiver as anEnumeration
. -
Uses of TreeNode in javax.swing.text.html
Modifier and TypeClassDescriptionclass
An element that represents a structural block of HTML.class
An element that represents a chunk of text that has a set of HTML character level attributes assigned to it. -
Uses of TreeNode in javax.swing.tree
Modifier and TypeInterfaceDescriptioninterface
Defines the requirements for a tree node object that can change -- by adding or removing child nodes, or by changing the contents of a user object stored in the node.Modifier and TypeClassDescriptionclass
ADefaultMutableTreeNode
is a general-purpose node in a tree data structure.Modifier and TypeFieldDescriptionDefaultMutableTreeNode.children
array of children, may be null if this node has no childrenstatic final Enumeration
<TreeNode> DefaultMutableTreeNode.EMPTY_ENUMERATION
An enumeration that is always empty.Modifier and TypeMethodDescriptionDefaultMutableTreeNode.getChildAfter
(TreeNode aChild) Returns the child in this node's child array that immediately followsaChild
, which must be a child of this node.DefaultMutableTreeNode.getChildAt
(int index) Returns the child at the specified index in this node's child array.TreeNode.getChildAt
(int childIndex) Returns the childTreeNode
at indexchildIndex
.DefaultMutableTreeNode.getChildBefore
(TreeNode aChild) Returns the child in this node's child array that immediately precedesaChild
, which must be a child of this node.DefaultMutableTreeNode.getFirstChild()
Returns this node's first child.DefaultMutableTreeNode.getLastChild()
Returns this node's last child.DefaultMutableTreeNode.getParent()
Returns this node's parent or null if this node has no parent.TreeNode.getParent()
Returns the parentTreeNode
of the receiver.TreeNode[]
DefaultMutableTreeNode.getPath()
Returns the path from the root, to get to this node.protected TreeNode[]
DefaultMutableTreeNode.getPathToRoot
(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.TreeNode[]
DefaultTreeModel.getPathToRoot
(TreeNode aNode) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.protected TreeNode[]
DefaultTreeModel.getPathToRoot
(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.DefaultMutableTreeNode.getRoot()
Returns the root of the tree that contains this node.DefaultMutableTreeNode.getSharedAncestor
(DefaultMutableTreeNode aNode) Returns the nearest common ancestor to this node andaNode
.Modifier and TypeMethodDescriptionDefaultMutableTreeNode.breadthFirstEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order.DefaultMutableTreeNode.children()
Creates and returns a forward-order enumeration of this node's children.Enumeration
<? extends TreeNode> TreeNode.children()
Returns the children of the receiver as anEnumeration
.DefaultMutableTreeNode.depthFirstEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order.DefaultMutableTreeNode.pathFromAncestorEnumeration
(TreeNode ancestor) Creates and returns an enumeration that follows the path fromancestor
to this node.DefaultMutableTreeNode.postorderEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in postorder.DefaultMutableTreeNode.preorderEnumeration()
Creates and returns an enumeration that traverses the subtree rooted at this node in preorder.Modifier and TypeMethodDescriptionDefaultMutableTreeNode.getChildAfter
(TreeNode aChild) Returns the child in this node's child array that immediately followsaChild
, which must be a child of this node.DefaultMutableTreeNode.getChildBefore
(TreeNode aChild) Returns the child in this node's child array that immediately precedesaChild
, which must be a child of this node.int
Returns the index of the specified child in this node's child array.int
Returns the index ofnode
in the receivers children.protected TreeNode[]
DefaultMutableTreeNode.getPathToRoot
(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.TreeNode[]
DefaultTreeModel.getPathToRoot
(TreeNode aNode) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.protected TreeNode[]
DefaultTreeModel.getPathToRoot
(TreeNode aNode, int depth) Builds the parents of node up to and including the root node, where the original node is the last element in the returned array.boolean
DefaultMutableTreeNode.isNodeAncestor
(TreeNode anotherNode) Returns true ifanotherNode
is an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.boolean
DefaultMutableTreeNode.isNodeChild
(TreeNode aNode) Returns true ifaNode
is a child of this node.boolean
DefaultMutableTreeNode.isNodeSibling
(TreeNode anotherNode) Returns true ifanotherNode
is a sibling of (has the same parent as) this node.void
DefaultTreeModel.nodeChanged
(TreeNode node) Invoke this method after you've changed how node is to be represented in the tree.void
DefaultTreeModel.nodesChanged
(TreeNode node, int[] childIndices) Invoke this method after you've changed how the children identified by childIndicies are to be represented in the tree.void
DefaultTreeModel.nodeStructureChanged
(TreeNode node) Invoke this method if you've totally changed the children of node and its children's children...void
DefaultTreeModel.nodesWereInserted
(TreeNode node, int[] childIndices) Invoke this method after you've inserted some TreeNodes into node.void
DefaultTreeModel.nodesWereRemoved
(TreeNode node, int[] childIndices, Object[] removedChildren) Invoke this method after you've removed some TreeNodes from node.DefaultMutableTreeNode.pathFromAncestorEnumeration
(TreeNode ancestor) Creates and returns an enumeration that follows the path fromancestor
to this node.void
Invoke this method if you've modified theTreeNode
s upon which this model depends.void
Sets the root toroot
.ModifierConstructorDescriptionDefaultTreeModel
(TreeNode root) Creates a tree in which any node can have children.DefaultTreeModel
(TreeNode root, boolean asksAllowsChildren) Creates a tree specifying whether any node can have children, or whether only certain nodes can have children.