Interface ITimepicker
-
- All Superinterfaces:
IAnyGroup<ITimepicker>,IChildrenOfInputgroup<ITimepicker>,IComponent<ITimepicker>,IDateTimeFormatInputElement<ITimepicker>,IFormatInputElement<ITimepicker,java.util.Date>,IHtmlBasedComponent<ITimepicker>,IInputElement<ITimepicker,java.util.Date>,IReadonly<ITimepicker>,IXulElement<ITimepicker>
public interface ITimepicker extends IDateTimeFormatInputElement<ITimepicker>, IAnyGroup<ITimepicker>
ImmutableTimepickercomponent.An input box for holding a time (a
DateObject}, but only Hour, Minute, Second are used.Constraint
You could specify what value to accept for input controls by use of the
constraintattribute. It could beno 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,longandfull(representing the styling ofDateFormat).
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 Classes Modifier and Type Interface Description static classITimepicker.BuilderBuilds instances of typeITimepicker.static classITimepicker.UpdaterBuilds an updater of typeITimepickerforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Field Summary
Fields Modifier and Type Field Description static ITimepickerDEFAULTConstant for default attributes of this immutable component.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intgetCols()Returns the cols which determines the visible width, in characters.default intgetInterval()Returns the interval time used to generate the options in Timepickerjava.util.DategetMax()Returns the maximum time used to generate the options in Timepicker, or null if the default maximum time is used.java.util.DategetMin()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 java.lang.StringgetWidgetClass()Returns the client widget class.static ITimepickerof(java.lang.String format, java.time.temporal.Temporal date)Return the instance of the given format and date.static ITimepickerof(java.lang.String format, java.util.Date date)Return the instance of the given format and date.static ITimepickerof(java.time.temporal.Temporal date)Return the instance of the given date.static ITimepickerof(java.util.Date date)Return the instance of the given date.static ITimepickerofCols(int cols)Returns the instance with the given cols.static ITimepickerofConstraint(java.lang.String constraint)Returns the instance with the given constraint.static ITimepickerofFormat(java.lang.String format)Returns the instance with the given format.static ITimepickerofId(java.lang.String id)Returns the instance with the given id.static ITimepickerofLocale(java.lang.String locale)Returns the instance with the given locale.static ITimepickerofLocale(java.util.Locale locale)Returns the instance with the given locale.static ITimepickerofReadonly(boolean readonly)Returns the instance with the given readonly state.ITimepickerwithInterval(int interval)Returns a copy ofthisimmutable component with the specifiedinterval.default ITimepickerwithLocale(java.lang.String locale)Returns a copy ofthisimmutable component with the specifiedlocale.default ITimepickerwithMax(java.time.LocalTime max)Returns a copy ofthisimmutable component with the specifiedmax.ITimepickerwithMax(java.util.Date max)Returns a copy ofthisimmutable component with the specifiedmax.default ITimepickerwithMin(java.time.LocalTime min)Returns a copy ofthisimmutable component with the specifiedmin.ITimepickerwithMin(java.util.Date min)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, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IDateTimeFormatInputElement
getLocale, getTimeZone, getValueInLocalDate, getValueInLocalDateTime, getValueInLocalTime, getValueInZonedDateTime, withLocale, withTimeZone, withTimeZone, withValue, withValueInLocalDate, withValueInLocalDateTime, withValueInLocalTime, withValueInZonedDateTime
-
Methods inherited from interface org.zkoss.stateless.sul.IFormatInputElement
getFormat, withFormat
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods 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, withPlaceholder
-
Methods inherited from interface org.zkoss.stateless.sul.IReadonly
isReadonly
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final ITimepicker DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zkmax.inp.Timepicker"- Specified by:
getWidgetClassin interfaceIComponent<ITimepicker>
-
getMin
@Nullable java.util.Date 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
ITimepicker withMin(@Nullable java.util.Date min)
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
default ITimepicker withMin(@Nullable java.time.LocalTime min)
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
@Nullable java.util.Date getMax()
Returns the maximum time used to generate the options in Timepicker, or null if the default maximum time is used.
-
withMax
ITimepicker withMax(@Nullable java.util.Date max)
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
default ITimepicker withMax(@Nullable java.time.LocalTime max)
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,java.util.Date>
-
getInterval
default int getInterval()
Returns the interval time used to generate the options in TimepickerUnit: second
Default:
3600, i.e. 1hr
-
withInterval
ITimepicker withInterval(int interval)
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
default ITimepicker withReadonly(boolean readonly)
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
default ITimepicker withLocale(java.lang.String locale)
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
static ITimepicker of(java.util.Date date)
Return the instance of the given date.- Parameters:
date- The date to indicate the time for the timepicker.
-
of
static ITimepicker of(java.time.temporal.Temporal date)
Return the instance of the given date.- Parameters:
date- The date to indicate the time for the timepicker.
-
of
static ITimepicker of(java.lang.String format, java.util.Date date)
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
static ITimepicker of(java.lang.String format, java.time.temporal.Temporal date)
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
static ITimepicker ofCols(int cols)
Returns the instance with the given cols.- Parameters:
cols- The cols which determines the visible width
-
ofConstraint
static ITimepicker ofConstraint(java.lang.String constraint)
Returns the instance with the given constraint.- Parameters:
constraint- The timepicker constraint
-
ofFormat
static ITimepicker ofFormat(java.lang.String format)
Returns the instance with the given format.- Parameters:
format- The timepicker format
-
ofLocale
static ITimepicker ofLocale(java.lang.String locale)
Returns the instance with the given locale.- Parameters:
locale- The timepicker locale
-
ofLocale
static ITimepicker ofLocale(java.util.Locale locale)
Returns the instance with the given locale.- Parameters:
locale- The timepicker locale
-
ofReadonly
static ITimepicker ofReadonly(boolean readonly)
Returns the instance with the given readonly state.- Parameters:
readonly- Whether the timepicker is readonly
-
ofId
static ITimepicker ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-