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

public interface ScheduleItemRenderer

Known subtypesDefaultScheduleItemRenderer

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.

Fields

public static final int SELECTED = 1The item is the selected one.
public static final int DRAGGED = 2The item is being dragged, and this is the copy under the pointer.
public static final int STARTS_BEFORE = 4The item began before the part of it that is painted here.
public static final int ENDS_AFTER = 8The item goes on after the part of it that is painted here.
public static final int COMPACT = 16The rectangle is a single line: a month cell or the all day lane.
public static final int HORIZONTAL = 32Time runs across, as in the resource timeline, not down.
public static final int HOVERED = 64The pointer of a desktop rests on the item.

Methods

public abstract void paintItem(Graphics g, Scheduler scheduler, ScheduleItem item, int x, int y, int width, int height, int state)Paints item into a rectangle.

Field details

SELECTED

public static final int SELECTED = 1
The item is the selected one.

DRAGGED

public static final int DRAGGED = 2
The item is being dragged, and this is the copy under the pointer.

STARTS_BEFORE

public static final int STARTS_BEFORE = 4
The item began before the part of it that is painted here.

ENDS_AFTER

public static final int ENDS_AFTER = 8
The item goes on after the part of it that is painted here.

COMPACT

public static final int COMPACT = 16
The rectangle is a single line: a month cell or the all day lane.

HORIZONTAL

public static final int HORIZONTAL = 32
Time runs across, as in the resource timeline, not down.

HOVERED

public static final int HOVERED = 64
The pointer of a desktop rests on the item. The view lights the item itself; a renderer that wants more can tell by this.

Method details

paintItem

public abstract 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