public final class CalendarDrawEvent
extends java.util.EventObject
draw
event.Modifier and Type | Method and Description |
---|---|
java.awt.Rectangle |
getBounds()
Gets the bounding rectangle of the element being drawn.
|
DateTime |
getDate()
Gets the date and time associated with the element being drawn.
|
CustomDrawElements |
getElement()
Gets the type of the calendar element being drawn.
|
Duration |
getEndTime()
Gets the end time associated with the element being drawn.
|
java.awt.Graphics2D |
getGraphics()
Gets the Graphics2D instance whose methods can be used to perform custom drawing.
|
boolean |
getHandled()
Gets a value indicating whether the event was handled by the client.
|
int |
getIndex()
Gets the index associated with the element being drawn.
|
boolean |
getIsShadow()
Gets a value indicating whether the shadow of an item is being drawn.
|
Item |
getItem()
Gets the item being custom drawn.
|
boolean |
getPointed()
Gets a value indicating whether the associated item (if any) is being pointed by the mouse.
|
Resource |
getResource()
Gets the resource related to the element being drawn.
|
Resource[] |
getResources()
Gets the resources related to the element being drawn.
|
Duration |
getStartTime()
Gets the start time associated with the element being drawn.
|
Style |
getStyle()
Gets the style associated with the element being drawn.
|
java.lang.String |
getText()
Gets the text associated with the element being drawn.
|
void |
setHandled(boolean value)
Sets a value indicating whether the event was handled by the client.
|
public CustomDrawElements getElement()
CustomDrawElements
constants specifying what element to draw.public Style getStyle()
Style
object associated with the element being drawn.public java.awt.Rectangle getBounds()
public java.lang.String getText()
public java.awt.Graphics2D getGraphics()
public int getIndex()
This property specifies the index of a view column, cell or a scheduled item being custom drawn. If there is not an index associated with the element, the return value is 0.
public DateTime getDate()
If there is not any time associated with the element,
the return value is MinValue
.
DateTime
object specifying the date related to the element being drawn.public Duration getStartTime()
This property is used only with certain events in Timetable
view.
For events that do not use it, it is set to Zero
.
Duration
object specifying the start time related to the custom drawn element.public Duration getEndTime()
This property is used only with certain events in the Timetable
view.
For events that do not use it, it is set to Zero
.
Duration
object specifying the end time related to the element being drawn.public Item getItem()
This property refers to an item when setCustomDraw
is set
to CustomDrawElements.CalendarItem
, CustomDrawElements.TimetableItem
or
CustomDrawElements.ResourceViewItem
.
Item
. If no item is associated with the drawn element, returns null.public boolean getPointed()
public Resource getResource()
This could be null when no resource is related to the element.
public Resource[] getResources()
public boolean getHandled()
public void setHandled(boolean value)
value
- true to prevent further rendering of this element;
false to proceed with the default rendering.public boolean getIsShadow()
This property is only valid for CalendarListener.itemDrawing(com.mindfusion.scheduling.CalendarDrawEvent)
events.
true
if currently drawing the shadow of an item;
otherwise, false
.