Class DefaultScheduleItemRenderer
java.lang.Object
com.codename1.ui.scheduler.DefaultScheduleItemRenderer
- All Implemented Interfaces:
ScheduleItemRenderer
The renderer a Scheduler starts with: a rounded block in the item's
colour with its title, and its time and detail where they fit.
The colours and the font come from a UIID: the item's own when it has
one, otherwise SchedulerItem, SchedulerBackgroundItem or
SchedulerBlocked by its kind. An item or a resource with a colour of
its own overrides the background, and the text turns black or white to
stay readable on it.
-
Field Summary
Fields inherited from interface ScheduleItemRenderer
COMPACT, DRAGGED, ENDS_AFTER, HORIZONTAL, HOVERED, SELECTED, STARTS_BEFORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpaintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state) Paintsiteminto a rectangle.protected voidpaintText(Graphics g, Scheduler scheduler, ScheduleItem item, Font font, int color, int x, int y, int width, int height, int state) Draws the title, and under it the time and the detail when the rectangle is tall enough.protected StringuiidOf(ScheduleItem item) The UIID an item is painted with.
-
Constructor Details
-
DefaultScheduleItemRenderer
public DefaultScheduleItemRenderer()
-
-
Method Details
-
paintItem
public void paintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state) Description copied from interface:ScheduleItemRendererPaints
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
- Specified by:
paintItemin interfaceScheduleItemRenderer
-
uiidOf
The UIID an item is painted with. -
paintText
protected void paintText(Graphics g, Scheduler scheduler, ScheduleItem item, Font font, int color, int x, int y, int width, int height, int state) Draws the title, and under it the time and the detail when the rectangle is tall enough.
-