com.dlsc.flexgantt.policy.treetable

## Class DefaultRowPolicy

- java.lang.Object
- - com.dlsc.flexgantt.policy.AbstractPolicy
  - - com.dlsc.flexgantt.policy.treetable.DefaultRowPolicy

- All Implemented Interfaces:
    IPolicy, IRowPolicy

      public class DefaultRowPolicy
      extends AbstractPolicy
      implements IRowPolicy

  The default implementation of the row policy. For a general description of the purpose of this policy please refer to `IRowPolicy`.
  Since:
    1.0
  Version:
    $Revision: 1.11 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultRowPolicy()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getRowHeight(Object node, ITreeTableModel model)` Returns the current height of the row in which the given tree node gets displayed.
    `int` | `getRowHeightMaximum(Object node, ITreeTableModel model)` Returns the maximum height of the row in which the given tree node gets displayed.
    `int` | `getRowHeightMinimum(Object node, ITreeTableModel model)` Returns the minimum height of the row in which the given tree node gets displayed.
    `ICommand` | `getRowResizeCommand(Object node, ITreeTableModel model, int rowHeight)` Returns a command object that will peform the actual resizing of the row / node.
    `String` | `getRowToolTip(Object node, ITreeTableModel model, TreeTableColumn column)` Returns a tooltip text for the given node and column.
    `boolean` | `isRowLineVisible(Object node, boolean expanded, ITreeTableModel model)` Determines whether or not the horizontal grid line for the row will be visible or not.
    `boolean` | `isRowResizable(Object node, ITreeTableModel model)` Determines whether or not the row in which the given tree node gets displayed is resizable at all by the user.

    - ### Methods inherited from class com.dlsc.flexgantt.policy.AbstractPolicy

      `assertClass`

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

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

- - ### Constructor Detail

    - #### DefaultRowPolicy

          public DefaultRowPolicy()

  - ### Method Detail

    - #### getRowHeight

          public int getRowHeight(Object node,
                                  ITreeTableModel model)

      Description copied from interface: `IRowPolicy`
      Returns the current height of the row in which the given tree node gets displayed.
      Specified by:
        `getRowHeight` in interface `IRowPolicy`
      Parameters:
        `node` - the tree table node for which the row height gets returned
        `model` - the data source that returned the tree table node
      Returns:
        the current height of the row

    - #### getRowHeightMinimum

          public int getRowHeightMinimum(Object node,
                                         ITreeTableModel model)

      Description copied from interface: `IRowPolicy`
      Returns the minimum height of the row in which the given tree node gets displayed.
      Specified by:
        `getRowHeightMinimum` in interface `IRowPolicy`
      Parameters:
        `node` - the tree table node for which the row height gets returned
        `model` - the data source that returned the tree table node
      Returns:
        the minimum height of the row

    - #### getRowHeightMaximum

          public int getRowHeightMaximum(Object node,
                                         ITreeTableModel model)

      Description copied from interface: `IRowPolicy`
      Returns the maximum height of the row in which the given tree node gets displayed.
      Specified by:
        `getRowHeightMaximum` in interface `IRowPolicy`
      Parameters:
        `node` - the tree table node for which the row height gets returned
        `model` - the data source that returned the tree table node
      Returns:
        the maximum height of the row

    - #### isRowResizable

          public boolean isRowResizable(Object node,
                                        ITreeTableModel model)

      Description copied from interface: `IRowPolicy`
      Determines whether or not the row in which the given tree node gets displayed is resizable at all by the user.
      Specified by:
        `isRowResizable` in interface `IRowPolicy`
      Parameters:
        `node` - the tree table node for which to check resizability
        `model` - the data source that returned the tree table node
      Returns:
        TRUE if the given row / node can be resized

    - #### isRowLineVisible

          public boolean isRowLineVisible(Object node,
                                          boolean expanded,
                                          ITreeTableModel model)

      Description copied from interface: `IRowPolicy`
      Determines whether or not the horizontal grid line for the row will be visible or not. By definition the horizontal grid line is located at the bottom of the row.
      Specified by:
        `isRowLineVisible` in interface `IRowPolicy`
      Parameters:
        `node` - the tree table node for wich to check the line visibility
        `expanded` - if TRUE the tree node is currently expanded (the visibility often depends on this information)
        `model` - the data source that returned the tree table node
      Returns:
        TRUE if horizontal grid line for the given row / node can be is visible

    - #### getRowToolTip

          public String getRowToolTip(Object node,
                                      ITreeTableModel model,
                                      TreeTableColumn column)

      Description copied from interface: `IRowPolicy`
      Returns a tooltip text for the given node and column.
      Specified by:
        `getRowToolTip` in interface `IRowPolicy`
      Parameters:
        `node` - the node / row for which to return a tooltip
        `model` - the data source that returned the node
        `column` - the column for which to return a tooltip
      Returns:
        a text that will be displayed as a tooltip

    - #### getRowResizeCommand

          public ICommand getRowResizeCommand(Object node,
                                              ITreeTableModel model,
                                              int rowHeight)

      Description copied from interface: `IRowPolicy`
      Returns a command object that will peform the actual resizing of the row / node.
      Specified by:
        `getRowResizeCommand` in interface `IRowPolicy`
      Parameters:
        `node` - the node / row that is getting resized
        `model` - the data source that returned the node
        `rowHeight` - the new row height that the command shall apply
      Returns:
        a command used for resizing the given node

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