public class IlvHorizontalGanttGrid extends IlvAbstractGanttGrid
IlvHorizontalGanttGrid
draws a horizontal grid
for a Gantt sheet.
The grid can be set to two working modes:
line
Constructor and Description |
---|
IlvHorizontalGanttGrid()
Creates a new
IlvHorizontalGanttGrid . |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics dst,
IlvGanttGridContext context)
Draws the horizontal grid in the specified Gantt grid context.
|
Color |
getEvenRowsBackground()
Gets the background color of even rows.
|
Shape[] |
getGridShapes(Graphics dst,
boolean selection,
IlvGanttGridContext context)
Returns the grid shapes used to draw the grid in the specified context
as an array of
Shape . |
Color |
getOddRowsBackground()
Gets the background color of odd rows.
|
boolean |
isFilled()
Indicates whether the grid should be filled.
|
void |
setEvenRowsBackground(Color bg)
Sets the background color of even rows.
|
void |
setFilled(boolean filled)
Defines whether the grid should be filled.
|
void |
setOddRowsBackground(Color bg)
Sets the background color of odd rows.
|
getForeground, setForeground
public IlvHorizontalGanttGrid()
IlvHorizontalGanttGrid
.public boolean isFilled()
setFilled(boolean)
public void setFilled(boolean filled)
filled
- true
if the grid should be filled.setFilled(boolean)
public void draw(Graphics dst, IlvGanttGridContext context)
Note that this method has been changed since 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 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 the screen and printing the grid on
the paper. The grid renderer becomes more flexible and can be used for
both displaying on screen and printing on paper.
dst
- The Graphics
into which the grid will be
drawn.context
- The Gantt grid context.public Shape[] getGridShapes(Graphics dst, boolean selection, IlvGanttGridContext context)
Shape
. This implementation returns an array
of Line2D.Double
for drawing the selection, and an array
of Line2D.Double
and Rectangle2D.Double
for
drawing successively the lines and the background rectangles.
The shapes are in the coordinates of the graphics context that is
being drawn.dst
- The Graphics
to draw into.selection
- If the shapes returned should be considered for drawing
a selection.context
- The Gantt grid context.public void setOddRowsBackground(Color bg)
bg
- The new color.getOddRowsBackground()
public Color getOddRowsBackground()
Color
of odd rows.setOddRowsBackground(java.awt.Color)
public void setEvenRowsBackground(Color bg)
bg
- The new color.getEvenRowsBackground()
public Color getEvenRowsBackground()
Color
of even rows.setEvenRowsBackground(java.awt.Color)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.