public class IlvVerticalGanttGrid extends IlvAbstractGanttGrid
IlvVerticalGanttGrid
draws the vertical grid for a Gantt
sheet. The grid can be dynamically adjusted to the grid step according
to the zoom scale.line
Constructor and Description |
---|
IlvVerticalGanttGrid()
Creates an
IlvVerticalGanttGrid . |
Modifier and Type | Method and Description |
---|---|
Calendar |
createCalendar(com.ibm.icu.util.ULocale locale)
Creates the
Calendar to be used by this grid in the given
locale. |
void |
draw(Graphics dst,
IlvGanttGridContext context)
Draws the vertical grid in the specified Gantt grid context to the
specified
Graphics . |
Calendar |
getCalendar()
Deprecated.
Starting with JViews 8.8, please use
getCalendar(ULocale) instead, passing the locale from
the IlvGanttGridContext . |
Calendar |
getCalendar(Date time)
Deprecated.
Starting with JViews 8.8, please use
getCalendar(ULocale, Date) instead, passing the
locale from the IlvGanttGridContext . |
Calendar |
getCalendar(com.ibm.icu.util.ULocale locale)
Returns a copy of the grid's calendar for a given locale.
|
Calendar |
getCalendar(com.ibm.icu.util.ULocale locale,
Date time)
Returns a copy of the grid's calendar for a given locale that points to
the specified time.
|
protected IlvTimeInterval |
getDrawingInterval(Graphics dst,
IlvGanttGridContext context)
Returns the time interval of the drawing rectangle.
|
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 . |
void |
setCalendar(Calendar calendar)
Deprecated.
Starting with JViews 8.8, please override the method
createCalendar(ULocale) instead of invoking
setCalendar . |
getForeground, setForeground
public IlvVerticalGanttGrid()
IlvVerticalGanttGrid
.public void draw(Graphics dst, IlvGanttGridContext context)
Graphics
. It draws a grid and fills in the clip
boundaries of the graphics.
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 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.
dst
- The Graphics
to draw into.context
- The Gantt grid context.public Shape[] getGridShapes(Graphics dst, boolean selection, IlvGanttGridContext context)
Shape
. The shapes are in the coordinates
of the graphics context that is being drawn. This implementation
returns the same lines for drawing or selection.dst
- The Graphics
to draw into.selection
- If the shapes returned should be considered for
drawing a selection.context
- The Gantt grid context.protected IlvTimeInterval getDrawingInterval(Graphics dst, IlvGanttGridContext context)
dst
- The graphics context that is being drawn into.context
- The Gantt grid context.@Deprecated public void setCalendar(Calendar calendar)
createCalendar(ULocale)
instead of invoking
setCalendar
.Calendar
of this grid. This calendar is used to
calculate the steps of the grid.calendar
- The new calendar.getCalendar()
,
getCalendar(Date)
@Deprecated public Calendar getCalendar()
getCalendar(ULocale)
instead, passing the locale from
the IlvGanttGridContext
.getCalendar(Date)
,
setCalendar(java.util.Calendar)
@Deprecated public Calendar getCalendar(Date time)
getCalendar(ULocale, Date)
instead, passing the
locale from the IlvGanttGridContext
.time
- The current day on the calendar.setCalendar(Calendar)
,
getCalendar()
public Calendar createCalendar(com.ibm.icu.util.ULocale locale)
Calendar
to be used by this grid in the given
locale. This calendar is used to calculate the steps of the grid.locale
- The locale of the Gantt sheet.getCalendar(ULocale)
,
getCalendar(ULocale, Date)
public Calendar getCalendar(com.ibm.icu.util.ULocale locale)
locale
- The locale of the Gantt sheet.getCalendar(ULocale, Date)
,
createCalendar(ULocale)
public Calendar getCalendar(com.ibm.icu.util.ULocale locale, Date time)
locale
- The locale of the Gantt sheet.time
- The current day on the calendar.createCalendar(ULocale)
,
getCalendar(ULocale)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.