Package org.zkoss.calendar.impl
Class AbstractCalendarItem<T>
- java.lang.Object
-
- org.zkoss.calendar.impl.AbstractCalendarItem<T>
-
- All Implemented Interfaces:
CalendarItem
- Direct Known Subclasses:
DefaultCalendarItem,SimpleCalendarItem
public abstract class AbstractCalendarItem<T> extends Object implements CalendarItem
A skeletal implementation forCalendarItem- Since:
- 3.0.0
- Author:
- leon
-
-
Constructor Summary
Constructors Constructor Description AbstractCalendarItem()Unused constructor, used for serialization / deserializationAbstractCalendarItem(String title, String content, String headerColor, String contentColor, boolean locked, T begin, T end)Deprecated.AbstractCalendarItem(String title, String content, String style, String contentStyle, String headerStyle, boolean locked, T begin, T end)AbstractCalendarItem(String title, String content, String sclass, String style, String contentStyle, String headerStyle, boolean locked, T begin, T end)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract InstantconvertToInstant(T date)InstantgetBegin()Returns the beginning date of the calendar item in Instant.StringgetContent()Returns the content of the calendar item.StringgetContentColor()Deprecated.StringgetContentStyle()Returns the CSS style applied to the content Node.InstantgetEnd()Returns the beginning date of the calendar item in Instant.StringgetHeaderColor()Deprecated.StringgetHeaderStyle()Returns the CSS style applied to the header node.StringgetSclass()Returns the CSS class.StringgetStyle()Returns the CSS style.StringgetTitle()Returns the title of the calendar item.StringgetZclass()Returns the zclass of the calendar item.booleanisLocked()When it returns true, an end-user can't move the calendar item by mouse drag and drop in a browser.-
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
-
-
-
-
Field Detail
-
_title
protected String _title
-
_content
protected String _content
-
_sclass
protected String _sclass
-
_style
protected String _style
-
_contentStyle
protected String _contentStyle
-
_headerStyle
protected String _headerStyle
-
_locked
protected boolean _locked
-
_begin
protected T _begin
-
_end
protected T _end
-
-
Constructor Detail
-
AbstractCalendarItem
public AbstractCalendarItem()
Unused constructor, used for serialization / deserialization
-
AbstractCalendarItem
@Deprecated public AbstractCalendarItem(String title, String content, String headerColor, String contentColor, boolean locked, T begin, T end)
Deprecated.
-
AbstractCalendarItem
public AbstractCalendarItem(String title, String content, String style, String contentStyle, String headerStyle, boolean locked, T begin, T end)
-
-
Method Detail
-
getBegin
public Instant getBegin()
Description copied from interface:CalendarItemReturns the beginning date of the calendar item in Instant.- Specified by:
getBeginin interfaceCalendarItem
-
getEnd
public Instant getEnd()
Description copied from interface:CalendarItemReturns the beginning date of the calendar item in Instant.- Specified by:
getEndin interfaceCalendarItem
-
getTitle
public String getTitle()
Description copied from interface:CalendarItemReturns the title of the calendar item.Note: never null
- Specified by:
getTitlein interfaceCalendarItem
-
getContent
public String getContent()
Description copied from interface:CalendarItemReturns the content of the calendar item.Note: never null
- Specified by:
getContentin interfaceCalendarItem
-
getHeaderColor
@Deprecated public String getHeaderColor()
Deprecated.Description copied from interface:CalendarItemReturns the color of the header in the calendar item. Only allows the value being recognized by CSS.- Specified by:
getHeaderColorin interfaceCalendarItem
-
getContentColor
@Deprecated public String getContentColor()
Deprecated.Description copied from interface:CalendarItemReturns the color of the content in the calendar item. Only allows the value being recognized by CSS.- Specified by:
getContentColorin interfaceCalendarItem
-
getStyle
public String getStyle()
Description copied from interface:CalendarItemReturns the CSS style.- Specified by:
getStylein interfaceCalendarItem
-
getContentStyle
public String getContentStyle()
Description copied from interface:CalendarItemReturns the CSS style applied to the content Node.- Specified by:
getContentStylein interfaceCalendarItem
-
getHeaderStyle
public String getHeaderStyle()
Description copied from interface:CalendarItemReturns the CSS style applied to the header node.- Specified by:
getHeaderStylein interfaceCalendarItem
-
getZclass
public String getZclass()
Description copied from interface:CalendarItemReturns the zclass of the calendar item.- Specified by:
getZclassin interfaceCalendarItem
-
getSclass
public String getSclass()
Description copied from interface:CalendarItemReturns the CSS class.The default styles of CalendarItem doesn't depend on the value of
CalendarItem.getSclass(). Rather, sclass is provided to perform small adjustment, e.g., only changing the font size. In other words, the default style is still applied if you change the value ofCalendarItem.getSclass(), unless you override it. To replace the default style completely, use zclass instead. Note: never null- Specified by:
getSclassin interfaceCalendarItem- See Also:
CalendarItem.getZclass()
-
isLocked
public boolean isLocked()
Description copied from interface:CalendarItemWhen it returns true, an end-user can't move the calendar item by mouse drag and drop in a browser. Otherwise, an end-user can freely move the item.- Specified by:
isLockedin interfaceCalendarItem
-
-