Package org.apache.tapestry5.tree

## Class DefaultTreeExpansionModel<T>

- java.lang.Object
- - org.apache.tapestry5.BaseOptimizedSessionPersistedObject
  - - org.apache.tapestry5.tree.DefaultTreeExpansionModel<T>

- Type Parameters:
    `T` - the type of the tree.
  All Implemented Interfaces:
    `java.io.Serializable`, `OptimizedSessionPersistedObject`, `TreeExpansionModel<T>`

      public class DefaultTreeExpansionModel<T>
      extends BaseOptimizedSessionPersistedObject
      implements TreeExpansionModel<T>

  Manages a Set of String `TreeNode` ids.
  Since:
    5.3
  See Also:
    `TreeModel`, Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultTreeExpansionModel()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clear()` | Marks all nodes as collapsed.
    `boolean` | `isExpanded​(TreeNode<T> node)` | Returns true if the node has been previously expanded.
    `void` | `markCollapsed​(TreeNode<T> node)` | Marks the node as collapsed (not expanded).
    `void` | `markExpanded​(TreeNode<T> node)` | Marks the node as expanded.

    - ### Methods inherited from class org.apache.tapestry5.BaseOptimizedSessionPersistedObject

      `checkAndResetDirtyMarker, markDirty`

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

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

- - ### Constructor Detail

    - #### DefaultTreeExpansionModel

          public DefaultTreeExpansionModel()

  - ### Method Detail

    - #### isExpanded

          public boolean isExpanded​(TreeNode<T> node)

      Description copied from interface: `TreeExpansionModel`
      Returns true if the node has been previously expanded.
      Specified by:
        `isExpanded` in interface `TreeExpansionModel<T>`
      Parameters:
        `node` - node to check for expansion
      Returns:
        true if expanded

    - #### markExpanded

          public void markExpanded​(TreeNode<T> node)

      Description copied from interface: `TreeExpansionModel`
      Marks the node as expanded.
      Specified by:
        `markExpanded` in interface `TreeExpansionModel<T>`

    - #### markCollapsed

          public void markCollapsed​(TreeNode<T> node)

      Description copied from interface: `TreeExpansionModel`
      Marks the node as collapsed (not expanded).
      Specified by:
        `markCollapsed` in interface `TreeExpansionModel<T>`

    - #### clear

          public void clear()

      Description copied from interface: `TreeExpansionModel`
      Marks all nodes as collapsed.
      Specified by:
        `clear` in interface `TreeExpansionModel<T>`