org.zkoss.calendar.api
Interface Calendars

All Superinterfaces:
java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.api.HtmlBasedComponent, org.zkoss.zk.ui.ext.Scope, java.io.Serializable, org.zkoss.zul.impl.api.XulElement
All Known Implementing Classes:
Calendars

public interface Calendars
extends org.zkoss.zul.impl.api.XulElement

This interface defines the methods used for Calendars.

Author:
jumperchen

Field Summary
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Method Summary
 void addTimeZone(java.lang.String label, java.lang.String timezone)
          Adds the time zone to the calendar.
 void addTimeZone(java.lang.String label, java.util.TimeZone timezone)
          Adds the time zone to the calendar.
 java.util.Date getBeginDate()
          Returns the beginning date, which is based on getCurrentDate() in the current view depended on which Component.getMold() is using.
 java.util.Date getCurrentDate()
          Returns the current date.
 DateFormatter getDateFormatter()
          Returns the date formatter.
 int getDays()
          Returns the days.
 java.util.TimeZone getDefaultTimeZone()
          Returns the current time zone of the calendar.
 java.util.Date getEndDate()
          Returns the end date, which is based on getCurrentDate() in the current view depended on which Component.getMold() is using.
 java.util.List<CalendarEvent> getEvent(java.util.Date beginDate)
          Returns the unmodifiable list including all the calendar events matching from the specified date in the same date. e.g. "20090324" exclusive the time of the date "23:30".
 EventRender getEventRender()
          Deprecated. As of release 2.0-RC Returns the event renderer used for CalendarEvent to draw its outline (i.e. HTML), like the DSP renderer of ZK component.

Note: never null.

 int getFirstDayOfWeek()
          Gets what the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.
 CalendarModel getModel()
          Returns the calendar model.
 java.util.Map<java.util.TimeZone,java.lang.String> getTimeZones()
          Returns the unmodifiable map including all the timezone inside the calendar.
 int getWeekOfMonth()
          Returns the number of the week of the month in the current date.
 boolean isReadonly()
          Returns whether it is readonly.
 boolean isWeekOfYear()
          Returns whether enable to show the week number within the current year or not.
 void nextPage()
          Navigates the current date to the next page, that is, when the getDays() is seven with default mold, the next page means the next week.
 void previousPage()
          Navigates the current date to the previous page, that is, when the getDays() is seven with default mold, the previous page means the previous week.
 boolean removeTimeZone(java.util.TimeZone timezone)
          Removes the time zone from the calendar
 void setCurrentDate(java.util.Date curDate)
          Sets the current date.
 void setDateFormatter(DateFormatter dfmater)
          Sets the date formatter.
 void setDateFormatter(java.lang.String clsnm)
          Sets the date formatter by a class name.
 void setDays(int days)
          Sets the days, that is, how many column should be displayed on the default mold.
 void setEventRender(EventRender render)
          Deprecated. As of release 2.0-RC Sets the event renderer.
 void setFirstDayOfWeek(int value)
          Sets what the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.
 void setFirstDayOfWeek(java.lang.String day)
          Sets what the first day of the week is.
 void setModel(CalendarModel model)
          Sets the calendar model.
 void setReadonly(boolean readonly)
          Sets whether it is readonly.
 void setTimeZone(java.lang.String timezone)
          Sets the time zone to the calendar, it is easily used for ZUL file. e.g.
 void setWeekOfYear(boolean weekOfYear)
          Sets whether enable to show the week number within the current year or not.
 
Methods inherited from interface org.zkoss.zul.impl.api.XulElement
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent
focus, getHeight, getLeft, getRenderdefer, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
 
Methods inherited from interface org.zkoss.zk.ui.Component
addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, containsVariable, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getChildren, getDefinition, getDesktop, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getUuid, getVariable, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setVariable, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, unsetVariable
 
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
 

Method Detail

getDefaultTimeZone

java.util.TimeZone getDefaultTimeZone()
Returns the current time zone of the calendar.


getModel

CalendarModel getModel()
Returns the calendar model.


setModel

void setModel(CalendarModel model)
Sets the calendar model.


addTimeZone

void addTimeZone(java.lang.String label,
                 java.util.TimeZone timezone)
Adds the time zone to the calendar.

Note: the first added will be the default time zone of the calendar.

Parameters:
label - the description of the time zone.
timezone - a time zone. (Cannot duplicate)

addTimeZone

void addTimeZone(java.lang.String label,
                 java.lang.String timezone)
Adds the time zone to the calendar.

Note: the first added will be the default time zone of the calendar.

Parameters:
label - the description of the time zone.
timezone - a id of time zone. (Cannot duplicate)
See Also:
TimeZone.getTimeZone(String), addTimeZone(String, TimeZone)

setTimeZone

void setTimeZone(java.lang.String timezone)
Sets the time zone to the calendar, it is easily used for ZUL file. e.g.
 <calendars timeZone="Taiwan=GMT+8, Sweden=GMT+1,">
 

Parameters:
timezone -

removeTimeZone

boolean removeTimeZone(java.util.TimeZone timezone)
Removes the time zone from the calendar


getTimeZones

java.util.Map<java.util.TimeZone,java.lang.String> getTimeZones()
Returns the unmodifiable map including all the timezone inside the calendar.


getEvent

java.util.List<CalendarEvent> getEvent(java.util.Date beginDate)
Returns the unmodifiable list including all the calendar events matching from the specified date in the same date. e.g. "20090324" exclusive the time of the date "23:30".

Note: never null.


getEventRender

EventRender getEventRender()
Deprecated. As of release 2.0-RC Returns the event renderer used for CalendarEvent to draw its outline (i.e. HTML), like the DSP renderer of ZK component.

Note: never null.


setEventRender

void setEventRender(EventRender render)
Deprecated. As of release 2.0-RC Sets the event renderer.


setDateFormatter

void setDateFormatter(DateFormatter dfmater)
Sets the date formatter. In fact, there are five places in the calendar must have different date display.

See Also:
DateFormatter

setDateFormatter

void setDateFormatter(java.lang.String clsnm)
                      throws java.lang.Exception
Sets the date formatter by a class name.

Throws:
java.lang.Exception
See Also:
DateFormatter, setDateFormatter(DateFormatter)

getDateFormatter

DateFormatter getDateFormatter()
Returns the date formatter.

Note: never null.


getBeginDate

java.util.Date getBeginDate()
Returns the beginning date, which is based on getCurrentDate() in the current view depended on which Component.getMold() is using.


getEndDate

java.util.Date getEndDate()
Returns the end date, which is based on getCurrentDate() in the current view depended on which Component.getMold() is using.


getWeekOfMonth

int getWeekOfMonth()
Returns the number of the week of the month in the current date.


previousPage

void previousPage()
Navigates the current date to the previous page, that is, when the getDays() is seven with default mold, the previous page means the previous week. In the month mold, it means the previous month.


nextPage

void nextPage()
Navigates the current date to the next page, that is, when the getDays() is seven with default mold, the next page means the next week. In the month mold, it means the next month.


setCurrentDate

void setCurrentDate(java.util.Date curDate)
Sets the current date.

Default: today (depend on which timezone the calendar is using).


getCurrentDate

java.util.Date getCurrentDate()
Returns the current date.

Default: today (depend on which timezone the calendar is using).


setDays

void setDays(int days)
Sets the days, that is, how many column should be displayed on the default mold.

Default: 7. (i.e. one week), in month view, the attribute will be ignored.


getDays

int getDays()
Returns the days.

Default: 7. (i.e. one week) If the days is less than 1, 1 is assumed.


setFirstDayOfWeek

void setFirstDayOfWeek(int value)
Sets what the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.

Default: Calendar.SUNDAY

Note: it is only allowed when days with 7 in the default mold or using the month mold.

Parameters:
value - the given first day of the week.
See Also:
getFirstDayOfWeek(), Calendar.setFirstDayOfWeek(int)

setFirstDayOfWeek

void setFirstDayOfWeek(java.lang.String day)
Sets what the first day of the week is.

Note: it is only allowed when days with 7 in the default mold or using the month mold.

Parameters:
day - SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, and SATURDAY. Case insensitive

getFirstDayOfWeek

int getFirstDayOfWeek()
Gets what the first day of the week is; e.g., SUNDAY in the U.S., MONDAY in France.

Default: Calendar.SUNDAY

Returns:
the first day of the week.
See Also:
setFirstDayOfWeek(int), Calendar.getFirstDayOfWeek()

setWeekOfYear

void setWeekOfYear(boolean weekOfYear)
Sets whether enable to show the week number within the current year or not.


isWeekOfYear

boolean isWeekOfYear()
Returns whether enable to show the week number within the current year or not.

Default: false


isReadonly

boolean isReadonly()
Returns whether it is readonly.

Default: false.


setReadonly

void setReadonly(boolean readonly)
Sets whether it is readonly.



Copyright © 2005-2008 Potix Corporation. All Rights Reserved.