|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The TNode
interface extends the TreeNode
. This class encapsulates an Element
and its main purpose is to represent that Element
as a tree node.
Element
Method Summary | |
java.util.Enumeration |
breadthFirstEnumeration() Returns an Enumeration that can be used to traverse all descendents of this TNode . |
ChildFilter |
findChildFilter() Find the ChildFilter used to build the tree node hierarchy this TNode belongs to. |
Element |
getAncestor(java.lang.Class clazz) Gets this TNode closest ancestor Element that encapsulates an Element of class clazz . |
Element |
getAncestor(java.lang.Class clazz, boolean checkBaseClass) Gets this TNode closest ancestor Element that encapsulates an Element of class clazz , or if checkBaseClass is true , an Element extending or implementing the specified class. |
TNode |
getAncestorTNode(java.lang.Class clazz, boolean checkBaseClass) Gets this TNode closest ancestor TNode that encapsulates an Element of class clazz , or if checkBaseClass is true , an Element extending or implementing the specified class. |
int |
getChildCount() Returns the number of children this TNode holds. |
ChildFilter |
getChildFilter() Returns the active ChildFilter. |
java.util.Iterator |
getChildNodes() Returns an Iterator that can be used to traverse the children of this TNode . |
java.util.Enumeration |
getChildTNodes() Returns an Enumeration that can be used to traverse the children of this TNode . |
java.util.Comparator |
getComparator() Get the Comparator that is used to sort the children of this node. |
Element |
getData() Gets the data element associated with this node. |
TreeExplorer |
getOwner() Returns the TreeExplorer where this TNode is displayed. |
javax.swing.tree.TreeNode[] |
getPath() Returns an array of TreeNode s comprising of the ancestors of this TNode . |
boolean |
isLeaf() Returns true if this TNode has no children. |
boolean |
isRoot() Returns true if this TNode is the root a tree hierarchy. |
boolean |
isSet(int bit) Check if the specified bit attribute is set. |
void |
setBit(int bit) Sets the specified bit attribute. |
void |
setChildFilter(ChildFilter filter) Set a new ChildFilter on this TNode . |
void |
setChildFilter(ChildFilter filter, boolean force) Set a new ChildFilter on this TNode . |
void |
setComparator(java.util.Comparator comparator) Set the Comparator that is used to sort the children of this node. |
void |
unsetBit(int bit) Unsets the specified bit attribute. |
Methods inherited from interface javax.swing.tree.TreeNode |
children, getAllowsChildren, getChildAt, getIndex, getParent |
Method Detail |
public TreeExplorer getOwner()
TreeExplorer
where this TNode
is displayed.public javax.swing.tree.TreeNode[] getPath()
TreeNode
s comprising of the ancestors of this TNode
.public Element getData()
public boolean isLeaf()
getAllowsChildren
isLeaf
in interface javax.swing.tree.TreeNode
public boolean isRoot()
true
if this TNode
is the root a tree hierarchy.public ChildFilter getChildFilter()
public void setChildFilter(ChildFilter filter, boolean force)
ChildFilter
on this TNode
. If the currently set filter is the same as the specified one the method does nothing unless the parameter force
is set to true
.public void setChildFilter(ChildFilter filter)
ChildFilter
on this TNode
. If the currently set filter is the same as the specified one the method does nothing.public ChildFilter findChildFilter()
ChildFilter
used to build the tree node hierarchy this TNode
belongs to. This method walks up the ancestor hierarchy until it finds a filter. If no filter is found, null
is returned.public int getChildCount()
TNode
holds.getChildCount
in interface javax.swing.tree.TreeNode
public java.util.Iterator getChildNodes()
Iterator
that can be used to traverse the children of this TNode
. The items of the Iterator
are Element
s.public java.util.Enumeration getChildTNodes()
Enumeration
that can be used to traverse the children of this TNode
. The items of the Enumeration
are TNode
s.public java.util.Enumeration breadthFirstEnumeration()
Enumeration
that can be used to traverse all descendents of this TNode
. The items of the Enumeration
are TNode
s.public java.util.Comparator getComparator()
Comparator
that is used to sort the children of this node.public void setComparator(java.util.Comparator comparator)
Comparator
that is used to sort the children of this node. Calling this method has no effect if the node is not a container node. If the comparator has changed, then the child nodes are re-ordered.comparator
- The Comparator
used for sorting the children of this node; if null
, the children are not sorted.public TNode getAncestorTNode(java.lang.Class clazz, boolean checkBaseClass)
TNode
closest ancestor TNode
that encapsulates an Element
of class clazz
, or if checkBaseClass
is true
, an Element
extending or implementing the specified class.public Element getAncestor(java.lang.Class clazz, boolean checkBaseClass)
TNode
closest ancestor Element
that encapsulates an Element
of class clazz
, or if checkBaseClass
is true
, an Element
extending or implementing the specified class.public Element getAncestor(java.lang.Class clazz)
TNode
closest ancestor Element
that encapsulates an Element
of class clazz
. This method only checks for elements whose class is the same as clazz
.public void setBit(int bit)
bit
attribute. Attributes generally indicate the state of the TNode
, such as if the node has been opened (IS_OPENED
), is using a filter (IS_UNFILTERED
), etc..public void unsetBit(int bit)
bit
attribute. Attributes generally indicate the state of the TNode
, such as if the node has been opened (IS_OPENED
), is using a filter (IS_UNFILTERED
), etc..public boolean isSet(int bit)
bit
attribute is set. Attributes generally indicate the state of the TNode
, such as if the node has been opened (IS_OPENED
), is using a filter (IS_UNFILTERED
), etc..
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.