public interface IlvGanttGridRenderer
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics destination,
IlvGanttGridContext context)
Draws the grid to the specified
Graphics in the specified
IlvGanttGridContext . |
Color |
getForeground()
Gets the grid foreground color.
|
Shape[] |
getGridShapes(Graphics destination,
boolean selection,
IlvGanttGridContext context)
Returns the grid shapes used to draw the grid in the specified context
as an array of
Shape . |
void |
setForeground(Color fg)
Sets the grid foreground color.
|
void draw(Graphics destination, IlvGanttGridContext context)
Graphics
in the specified
IlvGanttGridContext
. To implement the method, you should take
into account the clip of the specified Graphics
and ensure
not to draw the grid outside the clip in order to get a better
performance.
Note that this method has been changed since Rogue Wave JViews 5.0. The old
method was draw(Graphics, IlvGanttSheet)
. In case you have
overridden the old draw
method, you have to rewrite your
draw
method in order to migrate to Rogue Wave JViews 5.0. The
benefit of using an IlvGanttGridContext
instead of an
IlvGanttSheet
is that a different grid context can be
provided while drawing the grid on screen and printing the grid on paper.
The grid renderer becomes more flexible and can be
used for both displaying on screen and printing on paper.
destination
- The Graphics
to which the grid draws.context
- The Gantt grid context used to draw the grid.void setForeground(Color fg)
fg
- The new color.Color getForeground()
Color
.Shape[] getGridShapes(Graphics destination, boolean selection, IlvGanttGridContext context)
Shape
. Different shapes can be returned
in case they are used for drawing the grid selection. For example,
the shapes for drawing a grid could be rectangles, while the shapes
for selecting it could be lines. The shapes are in the coordinates of
the graphics context that is being drawn.destination
- The Graphics
to draw into.selection
- If the shapes returned should be considered for
drawing a selection.context
- The Gantt grid context.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.