Package org.zkoss.calendar.impl
Class SimpleCalendarItem
- java.lang.Object
-
- org.zkoss.calendar.impl.AbstractCalendarItem<Date>
-
- org.zkoss.calendar.impl.SimpleCalendarItem
-
- All Implemented Interfaces:
Serializable,CalendarItem
- Direct Known Subclasses:
SimpleCalendarEvent
public class SimpleCalendarItem extends AbstractCalendarItem<Date> implements Serializable
A simple implementation ofCalendarItem. Calling setters doesn't actually update aCalendarItemin a browser, you need to callSimpleCalendarModel.update(CalendarItem)after you modify an item.- Author:
- jumperchen
- See Also:
AbstractCalendarItem, Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.calendar.impl.AbstractCalendarItem
_begin, _content, _contentStyle, _end, _headerStyle, _locked, _sclass, _style, _title
-
-
Constructor Summary
Constructors Constructor Description SimpleCalendarItem()SimpleCalendarItem(String title, String content, String headerColor, String contentColor, boolean locked, Date begin, Date end)Deprecated.SimpleCalendarItem(String title, String content, String style, String contentStyle, String headerStyle, boolean locked, Date begin, Date end)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected InstantconvertToInstant(Date date)voidsetBegin(Date begin)voidsetBeginDate(Date begin)voidsetContent(String content)voidsetContentColor(String contentColor)Deprecated.voidsetContentStyle(String contentStyle)Sets the css style applied to the content Dom node of the calendar item.voidsetEnd(Date end)voidsetEndDate(Date end)voidsetHeaderColor(String hcolor)Deprecated.voidsetHeaderStyle(String headerStyle)Sets the css style applied to the header Dom node of the calendar item.voidsetLocked(boolean locked)When setting it to true, an end-user can't move a calendar item by mouse drag and drop in a browser.voidsetSclass(String scalss)Sets the CSS class.voidsetStyle(String style)Sets the css style applied to the main Dom node of the calendar item.voidsetTitle(String title)-
Methods inherited from class org.zkoss.calendar.impl.AbstractCalendarItem
getBegin, getContent, getContentColor, getContentStyle, getEnd, getHeaderColor, getHeaderStyle, getSclass, getStyle, getTitle, getZclass, isLocked
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.zkoss.calendar.api.CalendarItem
getBeginDate, getEndDate
-
-
-
-
Method Detail
-
convertToInstant
protected Instant convertToInstant(Date date)
- Specified by:
convertToInstantin classAbstractCalendarItem<Date>
-
setBeginDate
public void setBeginDate(Date begin)
-
setEndDate
public void setEndDate(Date end)
-
setBegin
public void setBegin(Date begin)
-
setEnd
public void setEnd(Date end)
-
setTitle
public void setTitle(String title)
-
setContent
public void setContent(String content)
-
setHeaderColor
@Deprecated public void setHeaderColor(String hcolor)
Deprecated.
-
setContentColor
@Deprecated public void setContentColor(String contentColor)
Deprecated.Use setContentStyle(String contentStyle) instead.
-
setStyle
public void setStyle(String style)
Sets the css style applied to the main Dom node of the calendar item.- Since:
- 3.1.0
-
setContentStyle
public void setContentStyle(String contentStyle)
Sets the css style applied to the content Dom node of the calendar item.- Since:
- 3.1.0
-
setHeaderStyle
public void setHeaderStyle(String headerStyle)
Sets the css style applied to the header Dom node of the calendar item.- Since:
- 3.1.0
-
setSclass
public void setSclass(String scalss)
Sets the CSS class.- Since:
- 3.1.0
-
setLocked
public void setLocked(boolean locked)
When setting it to true, an end-user can't move a calendar item by mouse drag and drop in a browser.- Parameters:
locked-
-
-