Interface ScheduleItemRenderer
- All Known Implementing Classes:
DefaultScheduleItemRenderer
public interface ScheduleItemRenderer
Paints one item of a Scheduler.
The views draw items themselves and keep no component per item, so this
is the place to change how an item looks. DefaultScheduleItemRenderer
is the one a scheduler starts with, and is made to be extended.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe rectangle is a single line: a month cell or the all day lane.static final intThe item is being dragged, and this is the copy under the pointer.static final intThe item goes on after the part of it that is painted here.static final intTime runs across, as in the resource timeline, not down.static final intThe pointer of a desktop rests on the item.static final intThe item is the selected one.static final intThe item began before the part of it that is painted here. -
Method Summary
Modifier and TypeMethodDescriptionvoidpaintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state) Paintsiteminto a rectangle.
-
Field Details
-
SELECTED
static final int SELECTEDThe item is the selected one.- See Also:
-
DRAGGED
static final int DRAGGEDThe item is being dragged, and this is the copy under the pointer.- See Also:
-
STARTS_BEFORE
static final int STARTS_BEFOREThe item began before the part of it that is painted here.- See Also:
-
ENDS_AFTER
static final int ENDS_AFTERThe item goes on after the part of it that is painted here.- See Also:
-
COMPACT
static final int COMPACTThe rectangle is a single line: a month cell or the all day lane.- See Also:
-
HORIZONTAL
static final int HORIZONTALTime runs across, as in the resource timeline, not down.- See Also:
-
HOVERED
static final int HOVEREDThe pointer of a desktop rests on the item. The view lights the item itself; a renderer that wants more can tell by this.- See Also:
-
-
Method Details
-
paintItem
void paintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state) Paints
iteminto a rectangle. The clip is already inside the view; an implementation that sets one of its own restores it.Parameters
state: a combination of the constants of this interface
-