com.google.gwt.user.cellview.client

## Class AbstractCellTree

- java.lang.Object
- - com.google.gwt.user.client.ui.UIObject
  - - com.google.gwt.user.client.ui.Widget
    - - com.google.gwt.user.client.ui.Composite
      - - com.google.gwt.user.cellview.client.AbstractCellTree

- All Implemented Interfaces:
    HasAttachHandlers, HasCloseHandlers<TreeNode>, HasOpenHandlers<TreeNode>, HasHandlers, HasKeyboardSelectionPolicy, EventListener, HasVisibility, IsRenderable, IsWidget
  Direct Known Subclasses:
    CellBrowser, CellTree

      public abstract class AbstractCellTree
      extends Composite
      implements HasOpenHandlers<TreeNode>, HasCloseHandlers<TreeNode>, HasKeyboardSelectionPolicy

  An abstract representation of a tree widget that renders items using `Cell`s.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

      `UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled`

    - ### Nested classes/interfaces inherited from interface com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy

      `HasKeyboardSelectionPolicy.KeyboardSelectionPolicy`

  - ### Field Summary

    - ### Fields inherited from class com.google.gwt.user.client.ui.UIObject

      `DEBUG_ID_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCellTree(TreeViewModel viewModel)` Construct a new `CellTree` with the specified `TreeViewModel` and root value.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HandlerRegistration` | `addCloseHandler(CloseHandler<TreeNode> handler)` Adds a `CloseEvent` handler.
    `HandlerRegistration` | `addOpenHandler(OpenHandler<TreeNode> handler)` Adds an `OpenEvent` handler.
    `HasKeyboardSelectionPolicy.KeyboardSelectionPolicy` | `getKeyboardSelectionPolicy()` Get the `HasKeyboardSelectionPolicy.KeyboardSelectionPolicy`.
    `protected <T> TreeViewModel.NodeInfo<?>` | `getNodeInfo(T value)` Get the `TreeViewModel.NodeInfo` that will provide the information to retrieve and display the children of the specified value.
    `abstract TreeNode` | `getRootTreeNode()` Get the root `TreeNode`.
    `TreeViewModel` | `getTreeViewModel()` Get the `TreeViewModel` that backs this tree.
    `protected boolean` | `isKeyboardSelectionDisabled()` Check if keyboard selection is disabled.
    `protected boolean` | `isLeaf(java.lang.Object value)` Check if the value is known to be a leaf node.
    `void` | `setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)` Set the `HasKeyboardSelectionPolicy.KeyboardSelectionPolicy`.

    - ### Methods inherited from class com.google.gwt.user.client.ui.Composite

      `claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget`

    - ### Methods inherited from class com.google.gwt.user.client.ui.Widget

      `addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents`

    - ### Methods inherited from class com.google.gwt.user.client.ui.UIObject

      `addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents`

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

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

    - ### Methods inherited from interface com.google.gwt.event.shared.HasHandlers

      `fireEvent`

- - ### Constructor Detail

    - #### AbstractCellTree

          public AbstractCellTree(TreeViewModel viewModel)

      Construct a new `CellTree` with the specified `TreeViewModel` and root value.
      Parameters:
        `viewModel` - the `TreeViewModel` that backs the tree

  - ### Method Detail

    - #### addCloseHandler

          public HandlerRegistration addCloseHandler(CloseHandler<TreeNode> handler)

      Description copied from interface: `HasCloseHandlers`
      Adds a `CloseEvent` handler.
      Specified by:
        `addCloseHandler` in interface `HasCloseHandlers<TreeNode>`
      Parameters:
        `handler` - the handler
      Returns:
        the registration for the event

    - #### addOpenHandler

          public HandlerRegistration addOpenHandler(OpenHandler<TreeNode> handler)

      Description copied from interface: `HasOpenHandlers`
      Adds an `OpenEvent` handler.
      Specified by:
        `addOpenHandler` in interface `HasOpenHandlers<TreeNode>`
      Parameters:
        `handler` - the handler
      Returns:
        the registration for the event

    - #### getKeyboardSelectionPolicy

          public HasKeyboardSelectionPolicy.KeyboardSelectionPolicy getKeyboardSelectionPolicy()

      Description copied from interface: `HasKeyboardSelectionPolicy`
      Get the `HasKeyboardSelectionPolicy.KeyboardSelectionPolicy`.
      Specified by:
        `getKeyboardSelectionPolicy` in interface `HasKeyboardSelectionPolicy`
      Returns:
        the selection policy
      See Also:
        `HasKeyboardSelectionPolicy.setKeyboardSelectionPolicy(KeyboardSelectionPolicy)`

    - #### getRootTreeNode

          public abstract TreeNode getRootTreeNode()

      Get the root `TreeNode`.
      Returns:
        the `TreeNode` at the root of the tree

    - #### getTreeViewModel

          public TreeViewModel getTreeViewModel()

      Get the `TreeViewModel` that backs this tree.
      Returns:
        the `TreeViewModel`

    - #### setKeyboardSelectionPolicy

          public void setKeyboardSelectionPolicy(HasKeyboardSelectionPolicy.KeyboardSelectionPolicy policy)

      Description copied from interface: `HasKeyboardSelectionPolicy`
      Set the `HasKeyboardSelectionPolicy.KeyboardSelectionPolicy`.
      Specified by:
        `setKeyboardSelectionPolicy` in interface `HasKeyboardSelectionPolicy`
      Parameters:
        `policy` - the selection policy
      See Also:
        `HasKeyboardSelectionPolicy.getKeyboardSelectionPolicy()`

    - #### getNodeInfo

          protected <T> TreeViewModel.NodeInfo<?> getNodeInfo(T value)

      Get the `TreeViewModel.NodeInfo` that will provide the information to retrieve and display the children of the specified value.
      Parameters:
        `value` - the value in the parent node
      Returns:
        the `TreeViewModel.NodeInfo`

    - #### isKeyboardSelectionDisabled

          protected boolean isKeyboardSelectionDisabled()

      Check if keyboard selection is disabled.
      Returns:
        true if disabled, false if enabled.

    - #### isLeaf

          protected boolean isLeaf(java.lang.Object value)

      Check if the value is known to be a leaf node.
      Parameters:
        `value` - the value at the node
      Returns:
        true if the node is known to be a leaf node, false otherwise