Uses of Interface
javax.swing.tree.TreeNode
-
Packages that use TreeNode Package Description javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.javax.swing.text Provides classes and interfaces that deal with editable and noneditable text components.javax.swing.text.html Provides the classHTMLEditorKitand supporting classes for creating HTML text editors.javax.swing.tree Provides classes and interfaces for dealing withjavax.swing.JTree. -
-
Uses of TreeNode in javax.swing
Classes in javax.swing that implement TreeNode Modifier and Type Class Description static classJTree.DynamicUtilTreeNodeDynamicUtilTreeNodecan wrap vectors/hashtables/arrays/strings and create the appropriate children tree nodes as necessary.Methods in javax.swing that return TreeNode Modifier and Type Method Description TreeNodeJTree.DynamicUtilTreeNode. getChildAt(int index)Subclassed to load the children, if necessary.Methods in javax.swing that return types with arguments of type TreeNode Modifier and Type Method Description Enumeration<TreeNode>JTree.DynamicUtilTreeNode. children()Subclassed to load the children, if necessary.Constructors in javax.swing with parameters of type TreeNode Constructor Description JTree(TreeNode root)Returns aJTreewith the specifiedTreeNodeas its root, which displays the root node.JTree(TreeNode root, boolean asksAllowsChildren)Returns aJTreewith the specifiedTreeNodeas 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
Classes in javax.swing.text that implement TreeNode Modifier and Type Class Description classAbstractDocument.AbstractElementImplements the abstract part of an element.classAbstractDocument.BranchElementImplements a composite element that contains other elements.classAbstractDocument.LeafElementImplements an element that directly represents content of some kind.protected classDefaultStyledDocument.SectionElementDefault root element for a document... maps out the paragraphs/lines contained.Methods in javax.swing.text that return TreeNode Modifier and Type Method Description TreeNodeAbstractDocument.AbstractElement. getChildAt(int childIndex)Returns the childTreeNodeat indexchildIndex.TreeNodeAbstractDocument.AbstractElement. getParent()Returns the parentTreeNodeof the receiver.Methods in javax.swing.text that return types with arguments of type TreeNode Modifier and Type Method Description abstract Enumeration<TreeNode>AbstractDocument.AbstractElement. children()Returns the children of the receiver as anEnumeration.Enumeration<TreeNode>AbstractDocument.BranchElement. children()Returns the children of the receiver as anEnumeration.Enumeration<TreeNode>AbstractDocument.LeafElement. children()Returns the children of the receiver as anEnumeration.Methods in javax.swing.text with parameters of type TreeNode Modifier and Type Method Description intAbstractDocument.AbstractElement. getIndex(TreeNode node)Returns the index ofnodein the receivers children. -
Uses of TreeNode in javax.swing.text.html
Classes in javax.swing.text.html that implement TreeNode Modifier and Type Class Description classHTMLDocument.BlockElementAn element that represents a structural block of HTML.classHTMLDocument.RunElementAn 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
Subinterfaces of TreeNode in javax.swing.tree Modifier and Type Interface Description interfaceMutableTreeNodeDefines 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.Classes in javax.swing.tree that implement TreeNode Modifier and Type Class Description classDefaultMutableTreeNodeADefaultMutableTreeNodeis a general-purpose node in a tree data structure.Fields in javax.swing.tree declared as TreeNode Modifier and Type Field Description protected TreeNodeDefaultTreeModel. rootRoot of the tree.Fields in javax.swing.tree with type parameters of type TreeNode Modifier and Type Field Description protected Vector<TreeNode>DefaultMutableTreeNode. childrenarray of children, may be null if this node has no childrenstatic Enumeration<TreeNode>DefaultMutableTreeNode. EMPTY_ENUMERATIONAn enumeration that is always empty.Methods in javax.swing.tree that return TreeNode Modifier and Type Method Description TreeNodeDefaultMutableTreeNode. getChildAfter(TreeNode aChild)Returns the child in this node's child array that immediately followsaChild, which must be a child of this node.TreeNodeDefaultMutableTreeNode. getChildAt(int index)Returns the child at the specified index in this node's child array.TreeNodeTreeNode. getChildAt(int childIndex)Returns the childTreeNodeat indexchildIndex.TreeNodeDefaultMutableTreeNode. getChildBefore(TreeNode aChild)Returns the child in this node's child array that immediately precedesaChild, which must be a child of this node.TreeNodeDefaultMutableTreeNode. getFirstChild()Returns this node's first child.TreeNodeDefaultMutableTreeNode. getLastChild()Returns this node's last child.TreeNodeDefaultMutableTreeNode. getParent()Returns this node's parent or null if this node has no parent.TreeNodeTreeNode. getParent()Returns the parentTreeNodeof 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.TreeNodeDefaultMutableTreeNode. getRoot()Returns the root of the tree that contains this node.TreeNodeDefaultMutableTreeNode. getSharedAncestor(DefaultMutableTreeNode aNode)Returns the nearest common ancestor to this node andaNode.Methods in javax.swing.tree that return types with arguments of type TreeNode Modifier and Type Method Description Enumeration<TreeNode>DefaultMutableTreeNode. breadthFirstEnumeration()Creates and returns an enumeration that traverses the subtree rooted at this node in breadth-first order.Enumeration<TreeNode>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.Enumeration<TreeNode>DefaultMutableTreeNode. depthFirstEnumeration()Creates and returns an enumeration that traverses the subtree rooted at this node in depth-first order.Enumeration<TreeNode>DefaultMutableTreeNode. pathFromAncestorEnumeration(TreeNode ancestor)Creates and returns an enumeration that follows the path fromancestorto this node.Enumeration<TreeNode>DefaultMutableTreeNode. postorderEnumeration()Creates and returns an enumeration that traverses the subtree rooted at this node in postorder.Enumeration<TreeNode>DefaultMutableTreeNode. preorderEnumeration()Creates and returns an enumeration that traverses the subtree rooted at this node in preorder.Methods in javax.swing.tree with parameters of type TreeNode Modifier and Type Method Description TreeNodeDefaultMutableTreeNode. getChildAfter(TreeNode aChild)Returns the child in this node's child array that immediately followsaChild, which must be a child of this node.TreeNodeDefaultMutableTreeNode. getChildBefore(TreeNode aChild)Returns the child in this node's child array that immediately precedesaChild, which must be a child of this node.intDefaultMutableTreeNode. getIndex(TreeNode aChild)Returns the index of the specified child in this node's child array.intTreeNode. getIndex(TreeNode node)Returns the index ofnodein 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.booleanDefaultMutableTreeNode. isNodeAncestor(TreeNode anotherNode)Returns true ifanotherNodeis an ancestor of this node -- if it is this node, this node's parent, or an ancestor of this node's parent.booleanDefaultMutableTreeNode. isNodeChild(TreeNode aNode)Returns true ifaNodeis a child of this node.booleanDefaultMutableTreeNode. isNodeSibling(TreeNode anotherNode)Returns true ifanotherNodeis a sibling of (has the same parent as) this node.voidDefaultTreeModel. nodeChanged(TreeNode node)Invoke this method after you've changed how node is to be represented in the tree.voidDefaultTreeModel. 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.voidDefaultTreeModel. nodeStructureChanged(TreeNode node)Invoke this method if you've totally changed the children of node and its children's children...voidDefaultTreeModel. nodesWereInserted(TreeNode node, int[] childIndices)Invoke this method after you've inserted some TreeNodes into node.voidDefaultTreeModel. nodesWereRemoved(TreeNode node, int[] childIndices, Object[] removedChildren)Invoke this method after you've removed some TreeNodes from node.Enumeration<TreeNode>DefaultMutableTreeNode. pathFromAncestorEnumeration(TreeNode ancestor)Creates and returns an enumeration that follows the path fromancestorto this node.voidDefaultTreeModel. reload(TreeNode node)Invoke this method if you've modified theTreeNodes upon which this model depends.voidDefaultTreeModel. setRoot(TreeNode root)Sets the root toroot.Constructors in javax.swing.tree with parameters of type TreeNode Constructor Description DefaultTreeModel(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.
-