de.vc.jfo.tools

## Class TreeWalker

- java.lang.Object
- - de.vc.util.tree.TreeWalkerWrapper
  - - de.vc.util.tree.DecoratedTreeWalker
    - - de.vc.jfo.tools.TreeWalker

- All Implemented Interfaces:
    de.vc.util.tree.TreeWalker

      public class TreeWalker
      extends de.vc.util.tree.DecoratedTreeWalker

  Use a tree walker to introspect a tree step by step. The walker can step into or out of a node and walk through the members of a node.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TreeWalker(Node node)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Node` | `getNode()` Gets the current node.
    `boolean` | `seekLastBlock()` Seeks the last fo:block element of the current node.
    `void` | `stepOutToBlock()` Steps out until the current node is a child of a Block.
    `void` | `stepOutToContainer()` Steps out until the current node is a child of a container.
    `void` | `stepOutToNodeType(java.lang.Class nodeType)` Steps out until the current node has type `nodeType`.

    - ### Methods inherited from class de.vc.util.tree.DecoratedTreeWalker

      `insertAtEnd, insertAtStart, isEmpty, removeFirst, removeLast, selectAfterLastElement, selectBeforeFirstElement, selectFirstElement, selectLastElement`

    - ### Methods inherited from class de.vc.util.tree.TreeWalkerWrapper

      `getIndex, getIndexPath, getObject, getObjectPath, getTreeWalker, hasNext, hasParent, hasPrevious, insertAfter, insertBefore, remove, selectNext, selectPrevious, setIndex, setObject, size, stepInto, stepOut`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TreeWalker

          public TreeWalker(Node node)

  - ### Method Detail

    - #### getNode

          public Node getNode()

      Gets the current node.
      Returns:
        Node

    - #### stepOutToContainer

          public void stepOutToContainer()

      Steps out until the current node is a child of a container. Containers are Flow, StaticContent, TableCell,ListItemBody and BlockContainer.

    - #### stepOutToBlock

          public void stepOutToBlock()

      Steps out until the current node is a child of a Block.

    - #### stepOutToNodeType

          public void stepOutToNodeType(java.lang.Class nodeType)

      Steps out until the current node has type `nodeType`.
      Parameters:
        `nodeType` - Class

    - #### seekLastBlock

          public boolean seekLastBlock()

      Seeks the last fo:block element of the current node.
      Returns:
        boolean

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.