com.dlsc.flexgantt.swing.layer.system
Interface IRowRenderer

All Known Implementing Classes:
DefaultResourceRowRenderer, DefaultRowRenderer

public interface IRowRenderer

Row renderers are used for drawing additional information in each row on the right-hand side LayerContainer of the Gantt chart. Row renderers are mapped to classes of Gantt chart nodes. A node representing a resource (for example a machine) might use a row renderer to visualize the available capacity of the resource while timeline object renderers are used to visualize the actual usage.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
RowLayer.setRowRenderer(Class, IRowRenderer)

Method Summary
 java.awt.Component getRowRendererComponent(RowLayer layer, java.lang.Object node, boolean selected, int row, ITimeSpan span, boolean hasFocus)
          Returns a component that will be used for renderering additional information about a row (for example resource capacity lines).
 

Method Detail

getRowRendererComponent

java.awt.Component getRowRendererComponent(RowLayer layer,
                                           java.lang.Object node,
                                           boolean selected,
                                           int row,
                                           ITimeSpan span,
                                           boolean hasFocus)
Returns a component that will be used for renderering additional information about a row (for example resource capacity lines). The component's width will be equal to the width of the layer container, which can be rather large (up to Integer.MAX_VALUE). The rendering routine needs to use the clipping information for its paint operations to guarantee high performance.

Parameters:
layer - the layer component that will lookup the renderer and call its paint method
node - the tree table / Gantt chart node for the given row
selected - a flag indicating whether the row is currently selected on the left-hand side. Usually selections are only visualized in the tree table but row renderers are free to choose whether they would also like to visualize it
row - the row for which a renderer component gets requested
span - the time span that needs to be painted. This span is not equivalent to the entire span of the Gantt chart. It is the time span that covers the clip that needs to be painted.
hasFocus - a flag indicating whether the row currently has the focus (the mouse cursor hovers on top of it)
Returns:
a component that will be used for rendering additional row information
Since:
1.0