org.zkoss.zul
Class Calendar

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Calendar
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.sys.ComponentCtrl

public class Calendar
extends XulElement

A calendar.

Default HtmlBasedComponent.getSclass(): calendar.

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
protected  class Calendar.ExtraCtrl
          A utility class to implement AbstractComponent.getExtraCtrl().
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
RS_NO_DISPLAY, RS_NO_HEIGHT, RS_NO_WIDTH
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Calendar()
          Contructs a calendar whose value is default to today.
Calendar(java.util.Date value)
           
 
Method Summary
 java.lang.String getOuterAttrs()
           
 java.util.TimeZone getTimeZone()
          Returns the time zone that this date box belongs to, or null if the default time zone is used.
 java.util.Date getValue()
          Returns the value that is assigned to this component, never null.
 boolean isCompact()
          Returns whether to use a compact layout.
protected  java.lang.Object newExtraCtrl()
           
 void setCompact(boolean compact)
          Sets whether to use a compact layout.
 void setTimeZone(java.util.TimeZone tzone)
          Sets the time zone that this date box belongs to, or null if the default time zone is used.
 void setValue(java.util.Date value)
          Assigns a value to this component.
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getAction, getAllOnClickAttrs, getContext, getInnerAttrs, getPopup, getTooltip, setAction, setContext, setPopup, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addEventListener, appendAsapAttr, focus, getDraggable, getDroppable, getHeight, getLeft, getRealStyle, getRealStyleFlags, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZIndex, isAsapRequired, removeEventListener, setClass, setDraggable, setDroppable, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZIndex
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getDefinition, getDesktop, getEventHandler, getExtraCtrl, getFellow, getFellowIfAny, getId, getListenerIterator, getMold, getMoldURI, getNamespace, getPage, getParent, getPropagatee, getRoot, getSpaceOwner, getUuid, getVariable, insertBefore, invalidate, isChildable, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onWrongValue, redraw, removeAttribute, removeAttribute, removeChild, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setParent, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, toString, unsetVariable
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Calendar

public Calendar()
Contructs a calendar whose value is default to today.


Calendar

public Calendar(java.util.Date value)
Method Detail

getTimeZone

public java.util.TimeZone getTimeZone()
Returns the time zone that this date box belongs to, or null if the default time zone is used.

The default time zone is determined by TimeZones.getCurrent().


setTimeZone

public void setTimeZone(java.util.TimeZone tzone)
Sets the time zone that this date box belongs to, or null if the default time zone is used.

The default time zone is determined by TimeZones.getCurrent().


getValue

public java.util.Date getValue()
Returns the value that is assigned to this component, never null.


setValue

public void setValue(java.util.Date value)
Assigns a value to this component.

Parameters:
value - the date to assign. If null, today is assumed.

isCompact

public boolean isCompact()
Returns whether to use a compact layout.

Default: true if zh_TW or zh_CN; false otherwise.


setCompact

public void setCompact(boolean compact)
Sets whether to use a compact layout.


getOuterAttrs

public java.lang.String getOuterAttrs()
Overrides:
getOuterAttrs in class XulElement

newExtraCtrl

protected java.lang.Object newExtraCtrl()
Overrides:
newExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent


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