Interface ITimepicker
- All Superinterfaces:
IAnyGroup<ITimepicker>,IChildrenOfInputgroup<ITimepicker>,IComponent<ITimepicker>,IDateTimeFormatInputElement<ITimepicker>,IFormatInputElement<ITimepicker,,Date> IHtmlBasedComponent<ITimepicker>,IInputElement<ITimepicker,,Date> IReadonly<ITimepicker>,IXulElement<ITimepicker>
Timepicker component.
An input box for holding a time (a Date Object}, but only
Hour, Minute, Second are used.
Constraint
You could specify what value to accept for input controls by use of the
constraint attribute. It could be no empty.
Format
Use a to signify it is am or pm. The input string follows the formatting
of the SimpleDateFormat.
Below is an example of using a within the format.
ITimepicker.ofFormat("a hh:mm:ss");
In addition to specifying the format explicitly, you could specify the styling.
There are four different types of styling: short, medium,
long and full (representing the styling of DateFormat).
For example, you could specify the styling rather than the real format as follows.
ITimepicker.ofFormat("short");
ITimepicker.ofFormat("medium");
- Author:
- katherine
- See Also:
-
Timepicker
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBuilds instances of typeITimepicker.static classBuilds an updater of typeITimepickerforUiAgent.smartUpdate(Locator, SmartUpdater). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ITimepickerConstant for default attributes of this immutable component. -
Method Summary
Modifier and TypeMethodDescriptiondefault intgetCols()Returns the cols which determines the visible width, in characters.default intReturns the interval time used to generate the options in TimepickergetMax()Returns the maximum time used to generate the options in Timepicker, or null if the default maximum time is used.getMin()Returns the minimum time used to generate the options in Timepicker, or null if the default minimum time is used.(00:00:00 AM)default StringReturns the client widget class.static ITimepickerReturn the instance of the given format and date.static ITimepickerReturn the instance of the given format and date.static ITimepickerReturn the instance of the given date.static ITimepickerReturn the instance of the given date.static ITimepickerofCols(int cols) Returns the instance with the given cols.static ITimepickerofConstraint(String constraint) Returns the instance with the given constraint.static ITimepickerReturns the instance with the given format.static ITimepickerReturns the instance with the given id.static ITimepickerReturns the instance with the given locale.static ITimepickerReturns the instance with the given locale.static ITimepickerofReadonly(boolean readonly) Returns the instance with the given readonly state.withInterval(int interval) Returns a copy ofthisimmutable component with the specifiedinterval.default ITimepickerwithLocale(String locale) Returns a copy ofthisimmutable component with the specifiedlocale.default ITimepickerReturns a copy ofthisimmutable component with the specifiedmax.Returns a copy ofthisimmutable component with the specifiedmax.default ITimepickerReturns a copy ofthisimmutable component with the specifiedmin.Returns a copy ofthisimmutable component with the specifiedmin.default ITimepickerwithReadonly(boolean readonly) Returns a copy ofthisimmutable component with the specifiedreadonly.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IDateTimeFormatInputElement
getLocale, getTimeZone, getValueInLocalDate, getValueInLocalDateTime, getValueInLocalTime, getValueInZonedDateTime, withLocale, withTimeZone, withTimeZone, withValue, withValueInLocalDate, withValueInLocalDateTime, withValueInLocalTime, withValueInZonedDateTimeMethods inherited from interface org.zkoss.stateless.sul.IFormatInputElement
getFormat, withFormatMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IInputElement
getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getValue, isDisabled, isInplace, withCols, withConstraint, withDisabled, withErrorboxIconSclass, withErrorboxSclass, withErrorMessage, withInplace, withInputAttributes, withInstant, withMaxlength, withName, withPlaceholderMethods inherited from interface org.zkoss.stateless.sul.IReadonly
isReadonlyMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Field Details
-
DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Details
-
getWidgetClass
Returns the client widget class.Default:
"zkmax.inp.Timepicker"- Specified by:
getWidgetClassin interfaceIComponent<ITimepicker>
-
getMin
Returns the minimum time used to generate the options in Timepicker, or null if the default minimum time is used.(00:00:00 AM) -
withMin
Returns a copy ofthisimmutable component with the specifiedmin.Sets the minimum time used to generate the options in Timepicker
- Parameters:
min- The minimum time used to generate the options in TimepickerDefault:
null.- Returns:
- A modified copy of the
thisobject
-
withMin
Returns a copy ofthisimmutable component with the specifiedmin.Sets the minimum time used to generate the options in Timepicker
- Parameters:
min- The minimum time used to generate the options in TimepickerDefault:
null.- Returns:
- A modified copy of the
thisobject
-
getMax
Returns the maximum time used to generate the options in Timepicker, or null if the default maximum time is used. -
withMax
Returns a copy ofthisimmutable component with the specifiedmax.Sets the maximum time used to generate the options in Timepicker
- Parameters:
max- The maximum time used to generate the options in TimepickerDefault:
null.- Returns:
- A modified copy of the
thisobject
-
withMax
Returns a copy ofthisimmutable component with the specifiedmax.Sets the maximum time used to generate the options in Timepicker
- Parameters:
max- The maximum time used to generate the options in TimepickerDefault:
null.- Returns:
- A modified copy of the
thisobject
-
getCols
default int getCols()Returns the cols which determines the visible width, in characters.Default:
5(non-positive means the same as browser's default).- Specified by:
getColsin interfaceIInputElement<ITimepicker,Date>
-
getInterval
default int getInterval()Returns the interval time used to generate the options in TimepickerUnit: second
Default:
3600, i.e. 1hr -
withInterval
Returns a copy ofthisimmutable component with the specifiedinterval. Sets the interval time used to generate the options in TimepickerUnit: 1 second
- Parameters:
interval- The time used to generate the options- Returns:
- A modified copy of the
thisobject
-
withReadonly
Description copied from interface:IReadonlyReturns a copy ofthisimmutable component with the specifiedreadonly.Sets whether it's readonly.
- Specified by:
withReadonlyin interfaceIReadonly<ITimepicker>- Parameters:
readonly-truemeans readonly.Default:
false.- Returns:
- A modified copy of the
thisobject
-
withLocale
Description copied from interface:IDateTimeFormatInputElementReturns a copy ofthisimmutable component with the specifiedlocale.Sets the locale used to identify the symbols of this number input component.
- Specified by:
withLocalein interfaceIDateTimeFormatInputElement<ITimepicker>- Parameters:
locale- The preferred localeDefault:
null, ifLocales.getCurrent()is preferred.- Returns:
- A modified copy of the
thisobject
-
of
Return the instance of the given date.- Parameters:
date- The date to indicate the time for the timepicker.
-
of
Return the instance of the given date.- Parameters:
date- The date to indicate the time for the timepicker.
-
of
Return the instance of the given format and date.- Parameters:
format- The format of the timepickerdate- The date to indicate the value for timepicker.
-
of
Return the instance of the given format and date.- Parameters:
format- The format of the timepickerdate- The date to indicate the value for timepicker.
-
ofCols
Returns the instance with the given cols.- Parameters:
cols- The cols which determines the visible width
-
ofConstraint
Returns the instance with the given constraint.- Parameters:
constraint- The timepicker constraint
-
ofFormat
Returns the instance with the given format.- Parameters:
format- The timepicker format
-
ofLocale
Returns the instance with the given locale.- Parameters:
locale- The timepicker locale
-
ofLocale
Returns the instance with the given locale.- Parameters:
locale- The timepicker locale
-
ofReadonly
Returns the instance with the given readonly state.- Parameters:
readonly- Whether the timepicker is readonly
-
ofId
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-