zul.db
Class Datebox

java.lang.Object
  extended by zk.Object
      extended by zk.Widget
          extended by zul.Widget
              extended by zul.inp.InputWidget
                  extended by zul.inp.FormatWidget
                      extended by zul.db.Datebox

public class Datebox
extends FormatWidget

An edit box for holding a date.

Default Widget.getZclass(): z-datebox.


Field Summary
 
Fields inherited from class zul.inp.InputWidget
onChangingDelay, onChangingForced
 
Fields inherited from class zk.Widget
$weave, auDelay, autag, bindLevel, className, desktop, effects_, firstChild, id, insertingBefore_, inServer, lastChild, nChildren, nextSibling, parent, previousSibling, uuid, widgetName
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
protected  void enterPressed_(Event evt)
          Called when the user presses enter when this widget has the focus (Widget.focus(int)).
protected  void escPressed_(Event evt)
          Called when the user presses escape key when this widget has the focus (Widget.focus(int)).
 String getConstraint()
          Returns the constraint, or null if no constraint at all.
 String getDateFormat()
          Returns the Date format of the specified format
 Array getDisplayedTimeZones()
          Returns a list of the time zones that will be displayed at the client and allow user to select.
 String getFormat()
          Returns the full date format of the specified format
 String getTimeFormat()
          Returns the Time format of the specified format
 String getTimeZone()
          Returns the time zone that this date box belongs to.
 String getTimeZoneLabel()
          Returns the label of the time zone
 String getUnformater()
          Returns the unformater.
 boolean isButtonVisible()
          Returns whether the button (on the right of the textbox) is visible.
 boolean isLenient()
          Returns whether or not date/time parsing is to be lenient.
 boolean isTimeZonesReadonly()
          Returns whether the list of the time zones to display is readonly.
 boolean isWeekOfYear()
          Returns whether enable to show the week number in the current calendar or not.
 void setButtonVisible(boolean visible)
          Sets whether the button (on the right of the textbox) is visible.
 void setConstraint(String cst)
          Sets the constraint.
 void setDisplayedTimeZones(String dtzones)
          Sets a catenation of a list of the time zones' ID, separated by comma, that will be displayed at the client and allow user to select.
 void setFormat(String format)
          Sets the date format.
 void setLenient(boolean lenient)
          Sets whether or not date/time parsing is to be lenient.
 void setOpen()
          Drops down or closes the calendar to select a date.
 void setTimeZone(String timezone)
          Sets the time zone that this date box belongs to.
 void setTimeZonesReadonly(boolean readonly)
          Sets whether the list of the time zones to display is readonly.
 void setUnformater(String unf)
          Sets the unformater function.
 void setWeekOfYear(boolean weekOfYear)
          Sets whether enable to show the week number in the current calendar or not.
 void syncWidth()
          Synchronizes the input element's width of this component
 
Methods inherited from class zul.inp.InputWidget
clearErrorMessage, coerceFromString_, coerceToString_, fireOnChange, getCols, getErrorMessage, getErrorMesssage, getInplaceCSS, getInputNode, getMaxlength, getName, getPlaceholder, getTabindex, getText, getType, getValue, inRoundedMold, isDisabled, isInplace, isInstant, isMultiline, isReadonly, select, setCols, setDisabled, setErrorMessage, setInplace, setInstant, setMaxlength, setName, setPlaceholder, setReadonly, setTabindex, setText, setValue, shallUpdate_, showError_, textAttrs_, updateChange_, validate_
 
Methods inherited from class zul.Widget
afterKeyDown_, beforeCtrlKeys_, getContext, getCtrlKeys, getOpenTooltip, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class zk.Widget
$, $f, $f, $f, $init, $n, $n, $o, afterAnima_, afterParentChanged_, appendChild, appendChild, beforeParentChanged_, beforeSendAU_, bind_, bind, bindChildren_, bindDoubleTap_, bindSwipe_, bindTapHold_, canActivate, cleanDrag_, clear, clearCache, cloneDrag_, deferRedrawHTML_, detach, doBlur_, doClick_, doDoubleClick_, doFocus_, doKeyDown_, doKeyPress_, doKeyUp_, domAttrs_, domClass_, domListen_, doMouseDown_, doMouseMove_, doMouseOut_, doMouseOver_, doMouseUp_, domStyle_, domTextStyleAttr_, domTooltiptext_, domUnlisten_, doRightClick_, doSelect_, doSwipe_, doTooltipOut_, doTooltipOver_, dropEffect_, extraBind_, fire, fireX, focus_, focus, forcerender, fromPageCoord, get, getAction, getCaveNode, getChildAt, getChildIndex, getClass, getDraggable, getDragMessage_, getDragNode, getDragOptions_, getDrop_, getDroppable, getElementsById, getElementsByName, getFirstNode_, getFloatZIndex_, getHeight, getHflex, getId, getLeft, getMold, getOldWidget_, getPage, getRenderdefer, getSclass, getScrollLeft, getScrollTop, getStyle, getTextNode, getTooltiptext, getTop, getTopWidget, getVflex, getWidth, getZclass, getZIndex, hide, ignoreDescendantFloatUp_, ignoreDrag_, initDrag_, insertBefore, insertChildHTML_, isAutoId, isBinding, isFloating_, isListen, isRealVisible, isRealVisible, isVisible, isVisible, isWatchable_, listen, listenOnFitSize_, mimicMouseDown_, newInstance, nextUuid, onAfterSize, onChildAdded_, onChildRemoved_, onChildRenderDefer_, onChildReplaced_, onChildVisible_, onDrop_, redraw, redrawHTML_, register, removeChild, removeChild, removeChildHTML_, removeHTML_, replaceCavedChildren_, replaceChildHTML_, replaceHTML, replaceWidget, rerender, rerender, scrollIntoView, sendAU_, set, set, setAction, setChildren, setDomVisible_, setDraggable, setDroppable, setFloating_, setFloatZIndex_, setHeight, setHflex, setId, setLeft, setListener, setListener, setListeners, setMold, setRenderdefer, setSclass, setScrollLeft, setScrollTop, setStyle, setTooltiptext, setTop, setTopmost, setVflex, setVisible, setWidth, setZclass, setZIndex, shallChildROD_, shallIgnoreClick_, show, smartUpdate, unbind_, unbind, unbindChildren_, unbindDoubleTap_, unbindSwipe_, unbindTapHold_, uncloneDrag_, unlisten, unlistenOnFitSize_, updateDomClass_, updateDomStyle_, uuid, zsync
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isButtonVisible

public boolean isButtonVisible()
Returns whether the button (on the right of the textbox) is visible.

Default: true.

Returns:
boolean

setButtonVisible

public void setButtonVisible(boolean visible)
Sets whether the button (on the right of the textbox) is visible.

Parameters:
visible -

getFormat

public String getFormat()
Returns the full date format of the specified format

Overrides:
getFormat in class FormatWidget
Returns:
String

setFormat

public void setFormat(String format)
Sets the date format.

The following pattern letters are defined:

Letter Date or Time Component Presentation Examples
G Era designator AD
y Year Year 1996; 96
M Month in year Month July; Jul; 07
w Week in year (starting at 1) Number 27
W Week in month (starting at 1) Number 2
D Day in year (starting at 1) Number 189
d Day in month (starting at 1) Number 10
F Day of week in month Number 2
E Day in week Text Tuesday; Tue

Overrides:
setFormat in class FormatWidget
Parameters:
format - the pattern.

getConstraint

public String getConstraint()
Returns the constraint, or null if no constraint at all.

Returns:
String

setConstraint

public void setConstraint(String cst)
Sets the constraint.

Default: null (means no constraint all all).

Overrides:
setConstraint in class InputWidget
Parameters:
cst -

getTimeZone

public String getTimeZone()
Returns the time zone that this date box belongs to.

Returns:
String the time zone's ID, such as "America/Los_Angeles".

setTimeZone

public void setTimeZone(String timezone)
Sets the time zone that this date box belongs to.

Parameters:
timezone - the time zone's ID, such as "America/Los_Angeles".

isTimeZonesReadonly

public boolean isTimeZonesReadonly()
Returns whether the list of the time zones to display is readonly. If readonly, the user cannot change the time zone at the client.

Returns:
boolean

setTimeZonesReadonly

public void setTimeZonesReadonly(boolean readonly)
Sets whether the list of the time zones to display is readonly. If readonly, the user cannot change the time zone at the client.

Parameters:
readonly -

getDisplayedTimeZones

public Array getDisplayedTimeZones()
Returns a list of the time zones that will be displayed at the client and allow user to select.

Default: null

Returns:
Array

setDisplayedTimeZones

public void setDisplayedTimeZones(String dtzones)
Sets a catenation of a list of the time zones' ID, separated by comma, that will be displayed at the client and allow user to select.

Parameters:
dtzones - a catenation of a list of the timezones' ID, such as "America/Los_Angeles,GMT+8"

getUnformater

public String getUnformater()
Returns the unformater.

Returns:
String the unformater function

setUnformater

public void setUnformater(String unf)
Sets the unformater function. This method is called from Server side.

Parameters:
unf - the unformater function

isLenient

public boolean isLenient()
Returns whether or not date/time parsing is to be lenient.

With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format. With strict parsing, inputs must match this object's format.

Returns:
boolean

setLenient

public void setLenient(boolean lenient)
Sets whether or not date/time parsing is to be lenient.

With lenient parsing, the parser may use heuristics to interpret inputs that do not precisely match this object's format. With strict parsing, inputs must match this object's format.

Default: true.

Parameters:
lenient -

isWeekOfYear

public boolean isWeekOfYear()
Returns whether enable to show the week number in the current calendar or not.

Default: false

Returns:
boolean
Since:
6.5.0

setWeekOfYear

public void setWeekOfYear(boolean weekOfYear)
Sets whether enable to show the week number in the current calendar or not. [ZK EE]

Parameters:
weekOfYear -
Since:
6.5.0

getTimeFormat

public String getTimeFormat()
Returns the Time format of the specified format

Returns:
String

getDateFormat

public String getDateFormat()
Returns the Date format of the specified format

Returns:
String

setOpen

public void setOpen()
Drops down or closes the calendar to select a date.


syncWidth

public void syncWidth()
Synchronizes the input element's width of this component


enterPressed_

protected void enterPressed_(Event evt)
Called when the user presses enter when this widget has the focus (Widget.focus(int)).

call the close function

Parameters:
evt - the widget event. The original DOM event and target can be retrieved by Event.domEvent and Event.domTarget

escPressed_

protected void escPressed_(Event evt)
Called when the user presses escape key when this widget has the focus (Widget.focus(int)).

call the close function

Parameters:
evt - the widget event. The original DOM event and target can be retrieved by Event.domEvent and Event.domTarget

getTimeZoneLabel

public String getTimeZoneLabel()
Returns the label of the time zone

Returns:
String


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo