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

public final class ScheduleItem

  1. Object
  2. ScheduleItem

One thing on a schedule: an appointment, a shift, a block of busy time.

start and end are epoch milliseconds and end is exclusive. An all-day item runs from the start of its first day to the start of the day after its last, in the zone of the view that shows it.

Nested types

enum ScheduleItem.KindHow an item is drawn, apart from its colour.

Constructors

public ScheduleItem(String id, String title, long start, long end)

Methods

public String getId()
public String getTitle()
public ScheduleItem setTitle(String v)
public String getDetail()A second line: a place, a client’s name.
public ScheduleItem setDetail(String v)
public long getStart()
public long getEnd()
public ScheduleItem setTime(long start, long end)
public boolean isAllDay()
public ScheduleItem setAllDay(boolean v)
public String getResourceId()The resource the item belongs to, or null when the schedule has none.
public ScheduleItem setResourceId(String v)
public ScheduleItem.Kind getKind()
public ScheduleItem setKind(ScheduleItem.Kind v)
public String getUIID()The UIID the item is drawn with in place of SchedulerItem, or null.
public ScheduleItem setUIID(String v)
public int getColor()An RGB colour, or -1 for the resource’s or the theme’s.
public ScheduleItem setColor(int v)
public boolean isMovable()
public ScheduleItem setMovable(boolean v)
public boolean isResizable()
public ScheduleItem setResizable(boolean v)
public boolean isRecurring()Whether the item is one occurrence of a series, which a view marks.
public ScheduleItem setRecurring(boolean v)
public Object getUserObject()
public ScheduleItem setUserObject(Object v)
public boolean intersects(long from, long to)Whether any of the item is inside [from, to).
public String toString()Returns a string representation of the object.

Inherited methods

Constructor details

ScheduleItem

public ScheduleItem(String id, String title, long start, long end)

Method details

getId

public String getId()

getTitle

public String getTitle()

setTitle

public ScheduleItem setTitle(String v)

getDetail

public String getDetail()
A second line: a place, a client’s name.

setDetail

public ScheduleItem setDetail(String v)

getStart

public long getStart()

getEnd

public long getEnd()

setTime

public ScheduleItem setTime(long start, long end)

isAllDay

public boolean isAllDay()

setAllDay

public ScheduleItem setAllDay(boolean v)

getResourceId

public String getResourceId()
The resource the item belongs to, or null when the schedule has none.

setResourceId

public ScheduleItem setResourceId(String v)

getKind

public ScheduleItem.Kind getKind()

setKind

public ScheduleItem setKind(ScheduleItem.Kind v)

getUIID

public String getUIID()
The UIID the item is drawn with in place of SchedulerItem, or null. Its background, foreground and font are used, and its selected style while the item is selected.

setUIID

public ScheduleItem setUIID(String v)

getColor

public int getColor()
An RGB colour, or -1 for the resource’s or the theme’s.

setColor

public ScheduleItem setColor(int v)

isMovable

public boolean isMovable()

setMovable

public ScheduleItem setMovable(boolean v)

isResizable

public boolean isResizable()

setResizable

public ScheduleItem setResizable(boolean v)

isRecurring

public boolean isRecurring()
Whether the item is one occurrence of a series, which a view marks.

setRecurring

public ScheduleItem setRecurring(boolean v)

getUserObject

public Object getUserObject()

setUserObject

public ScheduleItem setUserObject(Object v)

intersects

public boolean intersects(long from, long to)
Whether any of the item is inside [from, to).

toString

public String toString()
Returns a string representation of the object. In general, the toString method returns a string that “textually represents” this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@’, and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + ‘@’ + Integer.toHexString(hashCode())