com.dlsc.flexgantt.policy.treetable
Interface IRowPolicy

All Superinterfaces:
IPolicy
All Known Implementing Classes:
DefaultRowPolicy

public interface IRowPolicy
extends IPolicy

A policy for controlling the behaviour of the rows in a tree table.

Since:
1.0
Author:
Dirk Lemmermann

Method Summary
 int getRowHeight(java.lang.Object node, ITreeTableModel model)
          Returns the current height of the row in which the given tree node gets displayed.
 int getRowHeightMaximum(java.lang.Object node, ITreeTableModel model)
          Returns the maximum height of the row in which the given tree node gets displayed.
 int getRowHeightMinimum(java.lang.Object node, ITreeTableModel model)
          Returns the minimum height of the row in which the given tree node gets displayed.
 ICommand getRowResizeCommand(java.lang.Object node, ITreeTableModel model, int rowHeight)
          Returns a command object that will peform the actual resizing of the row / node.
 java.lang.String getRowToolTip(java.lang.Object node, ITreeTableModel model, TreeTableColumn column)
          Returns a tooltip text for the given node and column.
 boolean isRowLineVisible(java.lang.Object node, boolean expanded, ITreeTableModel model)
          Determines whether or not the horizontal grid line for the row will be visible or not.
 boolean isRowResizable(java.lang.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.
 boolean isRowSelectable(java.lang.Object node, ITreeTableModel model)
          Determines whether or not the row in which the given tree node gets displayed is selectable by the user.
 

Method Detail

getRowHeight

int getRowHeight(java.lang.Object node,
                 ITreeTableModel model)
Returns the current height of the row in which the given tree node gets displayed.

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
Since:
1.0

getRowHeightMinimum

int getRowHeightMinimum(java.lang.Object node,
                        ITreeTableModel model)
Returns the minimum height of the row in which the given tree node gets displayed.

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
Since:
1.0

getRowHeightMaximum

int getRowHeightMaximum(java.lang.Object node,
                        ITreeTableModel model)
Returns the maximum height of the row in which the given tree node gets displayed.

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
Since:
1.0

isRowSelectable

boolean isRowSelectable(java.lang.Object node,
                        ITreeTableModel model)
Determines whether or not the row in which the given tree node gets displayed is selectable by the user.

Parameters:
node - the tree table node for wich to check selectability
model - the data source that returned the tree table node
Returns:
TRUE if the given row / node can be selected
Since:
1.0

isRowResizable

boolean isRowResizable(java.lang.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.

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
Since:
1.0

isRowLineVisible

boolean isRowLineVisible(java.lang.Object node,
                         boolean expanded,
                         ITreeTableModel model)
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.

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
Since:
1.0

getRowToolTip

java.lang.String getRowToolTip(java.lang.Object node,
                               ITreeTableModel model,
                               TreeTableColumn column)
Returns a tooltip text for the given node and column.

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
Since:
1.0

getRowResizeCommand

ICommand getRowResizeCommand(java.lang.Object node,
                             ITreeTableModel model,
                             int rowHeight)
Returns a command object that will peform the actual resizing of the row / node.

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
Since:
1.0