javax.swing.tree
Class FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration

java.lang.Object
  extended byjavax.swing.tree.FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration
All Implemented Interfaces:
Enumeration
Enclosing class:
FixedHeightLayoutCache

private class FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration
extends Object
implements Enumeration

An enumerator to iterate through visible nodes.


Field Summary
protected  int childCount
          Number of children in parent.
protected  int nextIndex
          Index of next child.
protected  FixedHeightLayoutCache.FHTreeStateNode parent
          Parent thats children are being enumerated.
 
Constructor Summary
protected FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration(FixedHeightLayoutCache.FHTreeStateNode node)
           
protected FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration(FixedHeightLayoutCache.FHTreeStateNode parent, int startIndex)
           
 
Method Summary
protected  boolean findNextValidParent()
          Finds the next valid parent, this should be called when nextIndex is beyond the number of children of the current parent.
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 Object nextElement()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
protected  boolean updateNextIndex()
          Updates nextIndex returning false if it is beyond the number of children of parent.
protected  void updateNextObject()
          Determines the next object by invoking updateNextIndex and if not succesful findNextValidParent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected FixedHeightLayoutCache.FHTreeStateNode parent
Parent thats children are being enumerated.


nextIndex

protected int nextIndex
Index of next child. An index of -1 signifies parent should be visibled next.


childCount

protected int childCount
Number of children in parent.

Constructor Detail

FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration

protected FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration(FixedHeightLayoutCache.FHTreeStateNode node)

FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration

protected FixedHeightLayoutCache.VisibleFHTreeStateNodeEnumeration(FixedHeightLayoutCache.FHTreeStateNode parent,
                                                                   int startIndex)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Description copied from interface: Enumeration
Tests if this enumeration contains more elements.

Specified by:
hasMoreElements in interface Enumeration
Returns:
true if more visible nodes.

nextElement

public Object nextElement()
Description copied from interface: Enumeration
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Specified by:
nextElement in interface Enumeration
Returns:
next visible TreePath.

updateNextObject

protected void updateNextObject()
Determines the next object by invoking updateNextIndex and if not succesful findNextValidParent.


findNextValidParent

protected boolean findNextValidParent()
Finds the next valid parent, this should be called when nextIndex is beyond the number of children of the current parent.


updateNextIndex

protected boolean updateNextIndex()
Updates nextIndex returning false if it is beyond the number of children of parent.