public class IlvDefaultActivityCalendarRenderer extends Object implements IlvActivityCalendarRenderer
IlvDefaultActivityCalendarRenderer
renders an activity bar as a rectangle
that is labeled with the activity name.END_STYLE_CLOSED, END_STYLE_INTRA_DAY, END_STYLE_OPEN
Constructor and Description |
---|
IlvDefaultActivityCalendarRenderer()
Creates a new
IlvDefaultActivityCalendarRenderer . |
IlvDefaultActivityCalendarRenderer(Paint fill,
Paint stroke)
Creates a new
IlvDefaultActivityCalendarRenderer . |
Modifier and Type | Method and Description |
---|---|
void |
draw(Graphics g,
IlvActivity activity,
boolean isSelected,
Rectangle rect,
ComponentOrientation orientation,
int startStyle,
int endStyle)
This method is called by an
IlvMonthPanel to render an activity bar
on a single row within the month grid. |
Image |
getClockImage()
Returns the image used to indicate that the start or end of an activity
terminates within the bounds of a day.
|
Paint |
getFillPaint()
Returns the paint object used to fill the rectangular bar.
|
Font |
getLabelFont()
Returns the font used to label the rectangular bar.
|
int |
getLabelMargin()
Returns the label margin.
|
Paint |
getLabelPaint()
Returns the paint object used to label the rectangular bar.
|
Paint |
getSelectionFillPaint()
Returns the paint object used to fill the rectangular bar when the activity
is selected.
|
Paint |
getSelectionStrokePaint()
Returns the paint object used to stroke the rectangular bar when the activity
is selected.
|
Stroke |
getStroke()
Returns the style used to stroke the rectangular bar.
|
Paint |
getStrokePaint()
Returns the paint object used to stroke the rectangular bar.
|
String |
getToolTipText(IlvActivity activity,
IlvGanttModel model,
Calendar calendar,
MouseEvent event)
This method is called by an
IlvMonthPanel to return tooltip text for
a displayed activity. |
void |
setClockImage(Image clock)
Sets the image that will be used to indicate that the start or end of an activity
terminates within the bounds of a day.
|
void |
setFillPaint(Paint paint)
Sets the paint object used to fill the rectangular bar.
|
void |
setLabelFont(Font font)
Sets the font used to label the rectangular bar.
|
void |
setLabelMargin(int margin)
Sets the label margin.
|
void |
setLabelPaint(Paint paint)
Sets the paint object used to label the rectangular bar.
|
void |
setSelectionFillPaint(Paint paint)
Sets the paint object used to fill the rectangular bar when the activity is
selected.
|
void |
setSelectionStrokePaint(Paint paint)
Sets the paint object used to stroke the rectangular bar when the activity is
selected.
|
void |
setStroke(Stroke stroke)
Sets the style used to stroke the rectangular bar.
|
void |
setStrokePaint(Paint paint)
Sets the paint object used to stroke the rectangular bar.
|
public IlvDefaultActivityCalendarRenderer(Paint fill, Paint stroke)
IlvDefaultActivityCalendarRenderer
.fill
- The fill paint, or null
to indicate that the bar will not
be filled.stroke
- The stroke paint, or null
to indicate that the bar will
not be stroked.public IlvDefaultActivityCalendarRenderer()
IlvDefaultActivityCalendarRenderer
.public Paint getFillPaint()
IlvLinearGradientPaint
.null
if the bar will not
be filled.setFillPaint(java.awt.Paint)
public void setFillPaint(Paint paint)
GradientPaint
. An alternative is to use an
IlvLinearGradientPaint
and specify that it should adapt to its display
area.paint
- The fill paint, or null
to indicate that the bar will not
be filled.getFillPaint()
public Paint getSelectionFillPaint()
null
if the bar will not
be filled when the activity is selected.setSelectionFillPaint(java.awt.Paint)
public void setSelectionFillPaint(Paint paint)
GradientPaint
. An alternative is
to use an IlvLinearGradientPaint
and specify that it should adapt to its
display area.paint
- The fill paint, or null
to indicate that the bar will not
be filled when the activity is selected.getSelectionFillPaint()
public Paint getStrokePaint()
null
if the bar will not
be stroked.setStrokePaint(java.awt.Paint)
public void setStrokePaint(Paint paint)
GradientPaint
. An alternative is to use an
IlvLinearGradientPaint
and specify that it should adapt to its display
area.paint
- The stroke paint, or null
to indicate that the bar will
not be stroked.getStrokePaint()
public Paint getSelectionStrokePaint()
null
if the bar will not
be stroked when the activity is selected.setSelectionStrokePaint(java.awt.Paint)
public void setSelectionStrokePaint(Paint paint)
GradientPaint
. An alternative is
to use an IlvLinearGradientPaint
and specify that it should adapt to its
display area.paint
- The stroke paint, or null
to indicate that the bar will not
be stroked when the activity is selected.getSelectionStrokePaint()
public Stroke getStroke()
BasicStroke
.null
if the bar will not
be stroked.setStroke(java.awt.Stroke)
public void setStroke(Stroke stroke)
stroke
- The stroke style, or null
to indicate that the bar will
not be stroked.getStroke()
public Font getLabelFont()
setLabelFont(java.awt.Font)
public void setLabelFont(Font font)
font
- The font.getLabelFont()
public Paint getLabelPaint()
setLabelPaint(java.awt.Paint)
public void setLabelPaint(Paint paint)
GradientPaint
. An alternative is to use an
IlvLinearGradientPaint
and specify that it should adapt to its display
area.paint
- The label paint.getLabelPaint()
public int getLabelMargin()
setLabelMargin(int)
public void setLabelMargin(int margin)
margin
- The margin.getLabelMargin()
public Image getClockImage()
public void setClockImage(Image clock)
IlvActivityCalendarRenderer.END_STYLE_INTRA_DAY
rendering style.clock
- The clock image.getClockImage()
,
draw(java.awt.Graphics, ilog.views.gantt.IlvActivity, boolean, java.awt.Rectangle, java.awt.ComponentOrientation, int, int)
,
IlvActivityCalendarRenderer.END_STYLE_INTRA_DAY
public void draw(Graphics g, IlvActivity activity, boolean isSelected, Rectangle rect, ComponentOrientation orientation, int startStyle, int endStyle)
IlvMonthPanel
to render an activity bar
on a single row within the month grid.draw
in interface IlvActivityCalendarRenderer
g
- The graphics context in which to paint.activity
- The activity to be rendered.isSelected
- Indicates whether the activity is selected.rect
- The bounding box of the activity bar.orientation
- The component orientation of the month panel that is asking
the activity to be rendered.startStyle
- Indicates the style in which the start of the bar should be
drawn. The value will be one of IlvActivityCalendarRenderer.END_STYLE_OPEN
, IlvActivityCalendarRenderer.END_STYLE_CLOSED
,
or IlvActivityCalendarRenderer.END_STYLE_INTRA_DAY
.endStyle
- Indicates the style in which the end of the bar should be
drawn. The value will be one of IlvActivityCalendarRenderer.END_STYLE_OPEN
, IlvActivityCalendarRenderer.END_STYLE_CLOSED
,
or IlvActivityCalendarRenderer.END_STYLE_INTRA_DAY
.public String getToolTipText(IlvActivity activity, IlvGanttModel model, Calendar calendar, MouseEvent event)
IlvMonthPanel
to return tooltip text for
a displayed activity. This implementation returns the name of the activity.getToolTipText
in interface IlvActivityCalendarRenderer
activity
- The activity.model
- The data model that contains the activity.calendar
- The date that corresponds to the mouse position.event
- The mouse event that caused the ToolTipManager
to
show the tooltip.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.