| org.zkoss.zul.impl.InputElement org.zkoss.zul.Timebox
Timebox | public class Timebox extends InputElement (Code) | | An edit box for holding a time (a java.util.Date Object , but only Hour & Minute are used.
Default
Timebox.getSclass : datebox.
timebox doens't support customized format. It support HH:mm formate, where HH is hour of day and mm is minute of hour.
timebox supports below key events.
0-9 : set the time digit depend on the position on the inner text box.
up : increase time digit depend on the position on the inner text box.
down : decrease time digit depend on the position on the inner text box.
delete : clear the time to empty (null)
author: Dennis Chen since: 3.0.0 |
Method Summary | |
protected Object | coerceFromString(String value) | protected String | coerceToString(Object value) | protected DateFormat | getDateFormat() Returns the date format of the time only,
Default: it uses SimpleDateFormat to format the date. | public String | getImage() Returns the URI of the button image. | public String | getInnerAttrs() | public TimeZone | getTimeZone() Returns the time zone that this time box belongs to, or null if
the default time zone is used. | public Date | getValue() Returns the value (in Date), might be null unless
a constraint stops it. | public boolean | isButtonVisible() Returns whether the button (on the right of the textbox) is visible. | public void | setButtonVisible(boolean visible) Sets whether the button (on the right of the textbox) is visible. | public void | setImage(String img) Sets the URI of the button image.
Parameters: img - the URI of the button image. | public void | setTimeZone(TimeZone tzone) Sets the time zone that this time box belongs to, or null if
the default time zone is used. | public void | setValue(Date value) Sets the value (in Date).
If value is null, then an empty will be sent(render) to client.
If else, only the Hour and Mintue field will be sent(render) to client. |
getDateFormat | protected DateFormat getDateFormat()(Code) | | Returns the date format of the time only,
Default: it uses SimpleDateFormat to format the date.
|
getImage | public String getImage()(Code) | | Returns the URI of the button image.
|
getTimeZone | public TimeZone getTimeZone()(Code) | | Returns the time zone that this time box belongs to, or null if
the default time zone is used.
The default time zone is determined by
TimeZones.getCurrent .
|
getValue | public Date getValue() throws WrongValueException(Code) | | Returns the value (in Date), might be null unless
a constraint stops it. And, only Hour and Mintue field is effective.
exception: WrongValueException - if user entered a wrong value |
isButtonVisible | public boolean isButtonVisible()(Code) | | Returns whether the button (on the right of the textbox) is visible.
Default: true.
|
setButtonVisible | public void setButtonVisible(boolean visible)(Code) | | Sets whether the button (on the right of the textbox) is visible.
|
setImage | public void setImage(String img)(Code) | | Sets the URI of the button image.
Parameters: img - the URI of the button image. If null or empty, the defaultURI is used. |
setTimeZone | public void setTimeZone(TimeZone tzone)(Code) | | Sets the time zone that this time box belongs to, or null if
the default time zone is used.
The default time zone is determined by
TimeZones.getCurrent .
|
setValue | public void setValue(Date value) throws WrongValueException(Code) | | Sets the value (in Date).
If value is null, then an empty will be sent(render) to client.
If else, only the Hour and Mintue field will be sent(render) to client.
exception: WrongValueException - if value is wrong |
|
|