JavaTM Platform
Standard Ed. 6

javax.swing
클래스 JTree.DynamicUtilTreeNode

java.lang.Object 
  상위를 확장 javax.swing.tree.DefaultMutableTreeNode 
      상위를 확장 javax.swing.JTree.DynamicUtilTreeNode
모든 구현된 인터페이스:
Serializable , Cloneable , MutableTreeNode , TreeNode
포함되어 있는 클래스:
JTree


public static class JTree.DynamicUtilTreeNode
extends DefaultMutableTreeNode

DynamicUtilTreeNode 는, 벡터, 해시 테이블, 배열, 및 캐릭터 라인을 랩 해, 필요에 따라서 적절한 아이 트리 노드를 작성할 수 있습니다. 이것은 동적이고, 필요한 경우만 아이를 작성합니다.

경고: 이 클래스의 직렬화 된 객체는, 향후의 Swing 릴리스와 호환은 아니게 될 예정입니다. 현재의 직렬화의 지원는, 단기간의 운용이나, 같은 버젼의 Swing 를 실행하는 어플리케이션간의 RMI 에 적절하고 있습니다. JDK Version 1.4 이후, 모든 JavaBeans 의 장기간의 운용 지원는,java.beans 패키지에 추가되고 있습니다. 자세한 것은,XMLEncoder 를 참조해 주세요.


필드의 개요
protected  Object childValue
          아이를 작성하기 위한 치입니다.
protected  boolean hasChildren
          이 JTree 가 아이를 가질지 어떨지를 판정합니다.
protected  boolean loadedChildren
          아이가 벌써 로드 되고 있는지 어떤지를 판정합니다.
 
클래스 javax.swing.tree. DefaultMutableTreeNode 로부터 상속된 필드
allowsChildren , children , EMPTY_ENUMERATION , parent , userObject
 
생성자 의 개요
JTree.DynamicUtilTreeNode (Object  value, Object  children)
          지정된 객체를 값으로 해서 가져, 지정된 아이를 가지는 노드를 작성합니다.
 
메소드의 개요
 Enumeration children ()
          필요에 따라서, 아이를 로드하기 위해서(때문에) 서브 클래스화 됩니다.
static void createChildren (DefaultMutableTreeNode  parent, Object  children)
          children 의 모든 아이를 부모에게 추가합니다.
 TreeNode getChildAt (int index)
          필요에 따라서, 아이를 로드하기 위해서(때문에) 서브 클래스화 됩니다.
 int getChildCount ()
          자식(child) 노드의 수를 돌려줍니다.
 boolean isLeaf ()
          이 노드가 아이를 허가하는 경우에 true 를 돌려줍니다.
protected  void loadChildren ()
          childValue 에 근거해 아이를 로드합니다.
 
클래스 javax.swing.tree. DefaultMutableTreeNode 로부터 상속된 메소드
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 , toString
 
클래스 java.lang. Object 로부터 상속된 메소드
equals , finalize , getClass , hashCode , notify , notifyAll , wait , wait , wait
 

필드의 상세

hasChildren

protected boolean hasChildren
이 JTree 가 아이를 가질지 어떨지를 판정합니다. 현재, 이 프로퍼티은 구현되고 있지 않습니다.


childValue

protected Object  childValue
아이를 작성하기 위한 치입니다.


loadedChildren

protected boolean loadedChildren
아이가 벌써 로드 되고 있는지 어떤지를 판정합니다.

생성자 의 상세

JTree.DynamicUtilTreeNode

public JTree.DynamicUtilTreeNode(Object  value,
                                 Object  children)
지정된 객체를 값으로 해서 가져, 지정된 아이를 가지는 노드를 작성합니다. 노드가 아이를 가지기 위해서(때문에)는, 아이 객체가 객체의 배열,Vector 또는 Hashtable 가 아니면 안됩니다 (빈 상태(empty)의 경우도 마찬가지). 그렇지 않은 경우, 노드는 아이를 가질 수가 없습니다.

파라미터:
value - 새로운 노드의 값인 Object
children - 자 노드의 작성에 사용하는 Object,Vector, 또는 Hashtable 의 배열. 그 외의 객체가 지정되었을 경우, 또는 값이 null 의 경우, 노드는 아이를 가질 수가 없다
메소드의 상세

createChildren

public static void createChildren(DefaultMutableTreeNode  parent,
                                  Object  children)
children 의 모든 아이를 부모에게 추가합니다. children 가 배열 또는 벡터의 경우, 그 모든 요소가 아이로서 추가됩니다. children 가 해시 테이블의 경우, 모든 키와 값의 페어가 Enumeration 가 돌려주는 차례로 추가됩니다.


isLeaf

public boolean isLeaf()
이 노드가 아이를 허가하는 경우에 true 를 돌려줍니다. 노드가 아이를 허가할지 어떨지는, 노드가 어떻게 작성되었는지를 의존합니다.

정의:
인터페이스 TreeNode 내의 isLeaf
오버라이드(override):
클래스 DefaultMutableTreeNode 내의 isLeaf
반환값:
이 노드가 아이를 허가하는 경우는 true, 그렇지 않은 경우는 false
관련 항목:
JTree.DynamicUtilTreeNode(java.lang.Object, java.lang.Object)

getChildCount

public int getChildCount()
자식(child) 노드의 수를 돌려줍니다.

정의:
인터페이스 TreeNode 내의 getChildCount
오버라이드(override):
클래스 DefaultMutableTreeNode 내의 getChildCount
반환값:
자 노드의 수

loadChildren

protected void loadChildren()
childValue 에 근거해 아이를 로드합니다. childValueVector 또는 배열의 경우, 각 요소는 아이로서 추가됩니다. childValueHashtable 의 경우, 키와 값의 각 페어는 Enumeration 가 키를 돌려주는 차례로 추가됩니다.


getChildAt

public TreeNode  getChildAt(int index)
필요에 따라서, 아이를 로드하기 위해서(때문에) 서브 클래스화 됩니다.

정의:
인터페이스 TreeNode 내의 getChildAt
오버라이드(override):
클래스 DefaultMutableTreeNode 내의 getChildAt
파라미터:
index - 이 노드의 아이 배열의 인덱스
반환값:
이 노드의 아이 배열에 있는, 지정된 인덱스의 TreeNode

children

public Enumeration  children()
필요에 따라서, 아이를 로드하기 위해서(때문에) 서브 클래스화 됩니다.

정의:
인터페이스 TreeNode 내의 children
오버라이드(override):
클래스 DefaultMutableTreeNode 내의 children
반환값:
이 노드의 아이의 Enumeration

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.