public static class JTree.DynamicUtilTreeNode extends DefaultMutableTreeNode
DynamicUtilTreeNode可以包装向量/哈希表/数组/字符串,并根据需要创建适当的子树节点。 
       它是动态的,因为它只会根据需要创建孩子。 
        警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4版本开始,所有JavaBeans的长期存储支持已被添加到java.beans软件包中。 请参阅XMLEncoder 。 
| Modifier and Type | Field and Description | 
|---|---|
| protected Object | childValue
              创造孩子的价值。 
             | 
| protected boolean | hasChildren 
             这个 JTree有孩子吗? 
             此属性目前尚未实施。 | 
| protected boolean | loadedChildren
              孩子们已经装满了吗? 
             | 
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject| Constructor and Description | 
|---|
| DynamicUtilTreeNode(Object value, Object children)
              创建具有指定对象的节点作为其值和指定的子节点。 
             | 
| Modifier and Type | Method and Description | 
|---|---|
| Enumeration | children()
              子类加载孩子,如有必要。 
             | 
| static void | createChildren(DefaultMutableTreeNode parent, Object children)
              在 
              children添加到父母所有的孩子。 | 
| TreeNode | getChildAt(int index)
              子类加载孩子,如有必要。 
             | 
| int | getChildCount()
              返回子节点的数量。 
             | 
| boolean | isLeaf()
              如果此节点允许孩子,则返回true。 
             | 
| protected void | loadChildren()
              根据 
              childValue加载孩子。 | 
add, breadthFirstEnumeration, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toStringprotected boolean hasChildren
JTree有孩子吗? 
           此属性目前尚未实施。 
          protected Object childValue
protected boolean loadedChildren
public static void createChildren(DefaultMutableTreeNode parent, Object children)
children 。 
           如果children是一个数组或向量,它的所有元素都被添加为child,否则如果children是一个散列表,所有的键/值对都按照Enumeration的顺序返回。 
          public boolean isLeaf()
isLeaf在接口 
            TreeNode 
           isLeaf在 
            DefaultMutableTreeNode 
           JTree.DynamicUtilTreeNode 
           public int getChildCount()
getChildCount在接口 
            TreeNode 
           getChildCount在 
            DefaultMutableTreeNode 
           protected void loadChildren()
childValue加载孩子。 
           如果childValue是Vector或数组,则每个元素作为子元素添加,如果childValue是Hashtable ,则按照Enumeration返回密钥的顺序添加每个键/值对。 
          public TreeNode getChildAt(int index)
getChildAt在接口 
            TreeNode 
           getChildAt在 
            DefaultMutableTreeNode类 
           index - 此节点的子数组的索引 
           public Enumeration children()
children在界面 
            TreeNode 
           children在 
            DefaultMutableTreeNode 
            Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.