Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

oracle.ide.explorer
Interface TNode

All Superinterfaces:
javax.swing.tree.TreeNode

public interface TNode
extends javax.swing.tree.TreeNode

The TNode interface extends the TreeNode. This class encapsulates an Element and its main purpose is to represent that Element as a tree node.

See Also:
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 TreeNodes 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

getOwner

TreeExplorer getOwner()
Returns the TreeExplorer where this TNode is displayed.


getPath

javax.swing.tree.TreeNode[] getPath()
Returns an array of TreeNodes comprising of the ancestors of this TNode.


getData

Element getData()
Gets the data element associated with this node.

Returns:
the data element associated with this node.

isLeaf

boolean isLeaf()
Returns true if this TNode has no children. To distinguish between nodes that have no children and nodes that cannot have children (e.g. to distinguish files from empty directories), use this method in conjunction with getAllowsChildren

Specified by:
isLeaf in interface javax.swing.tree.TreeNode
Returns:
true if this node cannot have children

isRoot

boolean isRoot()
Returns true if this TNode is the root a tree hierarchy.


getChildFilter

ChildFilter getChildFilter()
Returns the active ChildFilter. If first checks if the owner has already been set. If it is it looks up the filter in the filter cache.


setChildFilter

void setChildFilter(ChildFilter filter,
                    boolean force)
Set a new 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.


setChildFilter

void setChildFilter(ChildFilter filter)
Set a new ChildFilter on this TNode. If the currently set filter is the same as the specified one the method does nothing.


findChildFilter

ChildFilter findChildFilter()
Find the 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.


getChildCount

int getChildCount()
Returns the number of children this TNode holds.

Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getChildNodes

java.util.Iterator getChildNodes()
Returns an Iterator that can be used to traverse the children of this TNode. The items of the Iterator are Elements.


getChildTNodes

java.util.Enumeration getChildTNodes()
Returns an Enumeration that can be used to traverse the children of this TNode. The items of the Enumeration are TNodes.


breadthFirstEnumeration

java.util.Enumeration breadthFirstEnumeration()
Returns an Enumeration that can be used to traverse all descendents of this TNode. The items of the Enumeration are TNodes.


getComparator

java.util.Comparator getComparator()
Get the Comparator that is used to sort the children of this node.


setComparator

void setComparator(java.util.Comparator comparator)
Set the 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.

Parameters:
comparator - The Comparator used for sorting the children of this node; if null, the children are not sorted.

getAncestorTNode

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.


getAncestor

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.


getAncestor

Element getAncestor(java.lang.Class clazz)
Gets this TNode closest ancestor Element that encapsulates an Element of class clazz. This method only checks for elements whose class is the same as clazz.


setBit

void setBit(int bit)
Sets the specified 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..


unsetBit

void unsetBit(int bit)
Unsets the specified 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..


isSet

boolean isSet(int bit)
Check if the specified 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..


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.0)

E13403-08

Copyright © 1997, 2013, Oracle. All rights reserved.