public class Calendar extends XulElement implements Constrainted
Default getZclass()
: z-calendar. (since 3.5.0)
For example
<calendar weekOfYear="true" onWeekClick='alert(event.data)'/>
[ZK EE]
[Since 6.5.0]HtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Constructor and Description |
---|
Calendar() |
Calendar(java.util.Date value) |
Calendar(java.time.LocalDate value) |
Calendar(java.time.LocalDateTime value) |
Calendar(java.time.ZonedDateTime value) |
Modifier and Type | Method and Description |
---|---|
Constraint |
getConstraint()
Returns the constraint, or null if no constraint at all.
|
java.lang.String |
getName()
Returns the name of this component.
|
boolean |
getShowTodayLink()
Returns whether enable to show the link that jump to today in day view
Default: false
|
java.util.TimeZone |
getTimeZone()
Deprecated.
As of release 5.0.5, it is meaningless to set time zone for a calendar.
|
java.lang.String |
getTodayLinkLabel()
Returns the label of the link that jump to today in day view
Default: Today
|
java.util.Date |
getValue()
Returns the value that is assigned to this component, never null.
|
java.time.LocalDate |
getValueInLocalDate()
Returns the value (in LocalDate) that is assigned to this component, never null.
|
java.time.LocalDateTime |
getValueInLocalDateTime()
Returns the value (in LocalDateTime) that is assigned to this component, never null.
|
java.time.LocalTime |
getValueInLocalTime()
Returns the value (in LocalTime) that is assigned to this component, never null.
|
java.time.ZonedDateTime |
getValueInZonedDateTime()
Returns the value (in ZonedDateTime) that is assigned to this component, never null.
|
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component.
|
boolean |
isWeekOfYear()
Returns whether enable to show the week number within the current year or not.
|
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing
tags and children.
|
void |
service(AuRequest request,
boolean everError)
Processes an AU request.
|
void |
setConstraint(Constraint constr)
Sets the constraint.
|
void |
setConstraint(java.lang.String constr)
Sets a list of constraints separated by comma.
|
void |
setName(java.lang.String name)
Sets the name of this component.
|
void |
setShowTodayLink(boolean showTodayLink)
Sets whether enable to show the link that jump to today in day view
|
void |
setTimeZone(java.util.TimeZone tzone)
As of release 5.0.5, it is meaningless to set time zone for a calendar.
|
void |
setTodayLinkLabel(java.lang.String todayLinkLabel)
Sets the label of the link that jump to today in day view
|
void |
setValue(java.util.Date value)
Assigns a value to this component.
|
void |
setValueInLocalDate(java.time.LocalDate value)
Assigns a value (in LocalDate) to this component.
|
void |
setValueInLocalDateTime(java.time.LocalDateTime value)
Assigns a value (in LocalDateTime) to this component.
|
void |
setValueInLocalTime(java.time.LocalTime value)
It is meaningless to set only LocalTime in calendar.
|
void |
setValueInZonedDateTime(java.time.ZonedDateTime value)
Assigns a value (in ZonedDateTime) to this component.
|
void |
setWeekOfYear(boolean weekOfYear)
Sets whether enable to show the week number within the current year or
not.
|
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isChildable, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
invalidatePartial
public Calendar()
public Calendar(java.util.Date value)
public Calendar(java.time.ZonedDateTime value)
public Calendar(java.time.LocalDateTime value)
public Calendar(java.time.LocalDate value)
public void setWeekOfYear(boolean weekOfYear)
public boolean isWeekOfYear()
Default: false
public java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone tzone)
public java.util.Date getValue()
public void setValue(java.util.Date value)
value
- the date to assign. If null, today is assumed.public java.time.ZonedDateTime getValueInZonedDateTime()
public void setValueInZonedDateTime(java.time.ZonedDateTime value)
value
- the date to assign. If null, today is assumed.public java.time.LocalDateTime getValueInLocalDateTime()
public void setValueInLocalDateTime(java.time.LocalDateTime value)
value
- the date to assign. If null, today is assumed.public java.time.LocalDate getValueInLocalDate()
public void setValueInLocalDate(java.time.LocalDate value)
value
- the date to assign. If null, today is assumed.public java.time.LocalTime getValueInLocalTime()
public void setValueInLocalTime(java.time.LocalTime value) throws WrongValueException
WrongValueException
public java.lang.String getName()
Default: null.
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
public void setName(java.lang.String name)
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
name
- the name of this component.public boolean getShowTodayLink()
Default: false
public void setShowTodayLink(boolean showTodayLink)
showTodayLink
- show or hiddenpublic java.lang.String getTodayLinkLabel()
Default: Today
public void setTodayLinkLabel(java.lang.String todayLinkLabel)
todayLinkLabel
- today link labelpublic void setConstraint(java.lang.String constr)
constr
- a list of constraints separated by comma.public void setConstraint(Constraint constr)
Constrainted
Default: null (means no constraint all all).
setConstraint
in interface Constrainted
public Constraint getConstraint()
Constrainted
getConstraint
in interface Constrainted
public java.lang.String getZclass()
HtmlBasedComponent
AbstractComponent.getMold()
).
Default: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)
) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass()
.
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass
in class HtmlBasedComponent
HtmlBasedComponent.getSclass()
public void service(AuRequest request, boolean everError)
Default: in addition to what are handled by HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean)
,
it also handles onChange, onChanging and onError.
service
in interface ComponentCtrl
service
in class HtmlBasedComponent
everError
- whether any error ever occurred before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class XulElement
java.io.IOException
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.