Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public class DefaultScheduleItemRenderer

  1. Object
  2. DefaultScheduleItemRenderer

ImplementsScheduleItemRenderer

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.

Constructors

public DefaultScheduleItemRenderer()

Methods

public void paintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state)Paints item into a rectangle.
protected String uiidOf(ScheduleItem item)The UIID an item is painted with.
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.

Inherited fields

Inherited methods

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)
Paints item into a rectangle. The clip is already inside the view; an implementation that sets one of its own restores it.

Parameters

g Graphics
Not documented.
scheduler Scheduler
Not documented.
item ScheduleItem
Not documented.
x int
Not documented.
y int
Not documented.
width int
Not documented.
height int
Not documented.
state int
a combination of the constants of this interface

uiidOf

protected String uiidOf(ScheduleItem item)
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.