com.dlsc.flexgantt.swing.layer.timeline
Interface ITimelineObjectRenderer

All Known Implementing Classes:
DefaultActivityObjectRenderer, DefaultCapacityObjectRenderer, DefaultEventObjectRenderer, DefaultTimelineObjectRenderer

public interface ITimelineObjectRenderer

A renderer that will be used for rendering timeline objects. Timeline objects are drawn below the timeline inside a TimelineObjectLayer. The Gantt chart configuration object allows the application to map different renderers to different object types.

Since:
1.0
Author:
Dirk Lemmermann
See Also:
LayerContainer.setTimelineObjectRenderer(Class, ITimelineObjectRenderer)

Method Summary
 java.awt.Component getTimelineObjectRendererComponent(TimelineObjectLayer layer, java.lang.Object treeNode, java.lang.Object timelineObject, boolean selected, boolean focus, boolean highlighted, int row)
          Returns a component that will be used to renderer the given timeline object.
 java.awt.Insets getTimelineObjectRendererInsets(int x, int y, int width, int height)
          Returns the insets of the object renderer.
 

Method Detail

getTimelineObjectRendererComponent

java.awt.Component getTimelineObjectRendererComponent(TimelineObjectLayer layer,
                                                      java.lang.Object treeNode,
                                                      java.lang.Object timelineObject,
                                                      boolean selected,
                                                      boolean focus,
                                                      boolean highlighted,
                                                      int row)
Returns a component that will be used to renderer the given timeline object.

Parameters:
layer - the layer in which the timeline object will be rendered
treeNode - the tree node that 'owns' the timeline object
timelineObject - the actual timeline object that requires visualization
selected - if TRUE the object is currently selected and the rendering needs to express that
focus - if TRUE the focus is currently on the timeline object and the rendering needs to express that
highlighted - if TRUE the timeline object is highlighted and its appearance needs to vary from its normal appearance (causing a blinking effect)
row - the row in which the object gets drawn
Returns:
the component used for rendering the given object
Since:
1.0

getTimelineObjectRendererInsets

java.awt.Insets getTimelineObjectRendererInsets(int x,
                                                int y,
                                                int width,
                                                int height)
Returns the insets of the object renderer. The insets are important if the renderer doesn't use the entire rectangle that it could use (for example a bar that doesn't use the entire height of the row, which is quite common, see also DefaultActivityObjectRenderer).

Parameters:
x - the x-coordinate of the bounds that will be assigned to the renderer component
y - the y-coordinate of the bounds that will be assigned to the renderer component
width - the width of the bounds that will be assigned to the renderer component
height - the height of the bounds that will be assigned to the renderer component
Returns:
the renderers insets (unused space above, below, to the left, to the right)
Since:
1.0