com.dlsc.flexgantt.swing.treetable

## Interface ITreeTableRowHeaderRenderer

- All Superinterfaces:
    IRenderer, IRowHeaderRenderer<TreeTableRowHeader>
  All Known Implementing Classes:
    DefaultTreeTableRowHeaderRenderer, MacTreeTableRowHeaderRenderer

      public interface ITreeTableRowHeaderRenderer
      extends IRowHeaderRenderer<TreeTableRowHeader>

  An extension of the row header renderer used for rendering the row headers of a tree table inside a `TreeTableRowHeader` component. This interface adds another method used to determine where the user has to click in order to toggle the expansion state of a row. The renderer should display some kind of toggle icon at that location.
  Since:
    1.0
  Version:
    $Revision: 1.6 $
  Author:
    Dirk Lemmermann
  See Also:
    `TreeTableRowHeader`, `AbstractRowHeader.setRowHeaderRenderer(Class, IRowHeaderRenderer)`, `ITreeTableModel.getRowHeaderValue(Object)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Rectangle` | `getRowHeaderToggleBounds(TreeTableRowHeader header, int x, int y, int width, int height)` Returns the bounds of the toggle used for expanding and collapsing the hierarchy / tree table node.
    `boolean` | `isDisplayedAsLeaf(ITreeTableModel model, Object node)` Determines whether the given node will be displayed as a leaf or not.

    - ### Methods inherited from interface com.dlsc.flexgantt.swing.treetable.IRowHeaderRenderer

      `getRowHeaderRendererComponent`

- - ### Method Detail

    - #### getRowHeaderToggleBounds

          Rectangle getRowHeaderToggleBounds(TreeTableRowHeader header,
                                             int x,
                                             int y,
                                             int width,
                                             int height)

      Returns the bounds of the toggle used for expanding and collapsing the hierarchy / tree table node.
      Parameters:
        `header` - the row header component
        `x` - the x-coordinate where the header will be rendered
        `y` - the y-coordinate where the header will be rendered
        `width` - the width of the header
        `height` - the height of the header
      Returns:
        the bounds of the expand / collapse toggle
      Since:
        1.0

    - #### isDisplayedAsLeaf

          boolean isDisplayedAsLeaf(ITreeTableModel model,
                                    Object node)

      Determines whether the given node will be displayed as a leaf or not. A leaf can not be expanded or collapsed, hence no expansion toggle icon will be visible. The default implementation of this method in `DefaultTreeTableRowHeaderRenderer` calls `TreeModel.isLeaf(Object)`. Subclasses can choose to change this behaviour by, for example, changing the code to check the child count of the node. This way the expansion icon could be configured to only show up if the tree node actually does have at least one child.
      Parameters:
        `model` - the tree model to which the node belongs
        `node` - the tree node to check
      Returns:
        TRUE if the node shall be displayed as a leaf
      Since:
        1.1

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.