Interface IDateTimeFormatInputElement<I extends IDateTimeFormatInputElement>
-
- All Superinterfaces:
IChildrenOfInputgroup<I>,IComponent<I>,IFormatInputElement<I,java.util.Date>,IHtmlBasedComponent<I>,IInputElement<I,java.util.Date>,IReadonly<I>,IXulElement<I>
- All Known Subinterfaces:
IDatebox,ITimebox,ITimepicker
public interface IDateTimeFormatInputElement<I extends IDateTimeFormatInputElement> extends IFormatInputElement<I,java.util.Date>
ImmutableDateTimeFormatInputElementcomponent.A skeletal implementation for date/time type input box.
- Author:
- katherine
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.util.LocalegetLocale()Returns the locale associated with this number input componentdefault java.util.TimeZonegetTimeZone()Returns the time zone that this component belongs to, or null if the default time zone is used.default java.time.LocalDategetValueInLocalDate()Returns the value (in LocalDate), might be null unless a constraint stops it.default java.time.LocalDateTimegetValueInLocalDateTime()Returns the value (in LocalDateTime), might be null unless a constraint stops it.default java.time.LocalTimegetValueInLocalTime()Returns the value (in LocalTime), might be null unless a constraint stops it.default java.time.ZonedDateTimegetValueInZonedDateTime()Returns the value (in ZonedDateTime).default IwithLocale(java.lang.String locale)Returns a copy ofthisimmutable component with the specifiedlocale.IwithLocale(java.util.Locale locale)Returns a copy ofthisimmutable component with the specifiedlocale.default IwithTimeZone(java.lang.String timeZone)Returns a copy ofthisimmutable component with the specifiedtimeZone.IwithTimeZone(java.util.TimeZone timeZone)Returns a copy ofthisimmutable component with the specifiedtimeZone.IwithValue(java.util.Date value)Returns a copy ofthisimmutable component with the specifiedvalue.IwithValueInLocalDate(java.time.LocalDate date)Returns a copy ofthisimmutable component with the specifieddate.IwithValueInLocalDateTime(java.time.LocalDateTime dateTime)Returns a copy ofthisimmutable component with the specifieddateTime.IwithValueInLocalTime(java.time.LocalTime time)Returns a copy ofthisimmutable component with the specifiedtime.IwithValueInZonedDateTime(java.time.ZonedDateTime timeZone)Returns a copy ofthisimmutable component with the specifiedtimeZone.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, 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.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
getCols, 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, withReadonly
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Method Detail
-
getLocale
@Nullable java.util.Locale getLocale()
Returns the locale associated with this number input componentDefault:
null, ifLocales.getCurrent()is preferred
-
withLocale
I withLocale(@Nullable java.util.Locale locale)
Returns a copy ofthisimmutable component with the specifiedlocale.Sets the locale used to identify the symbols of this number input component.
- Parameters:
locale- The preferred localeDefault:
null, ifLocales.getCurrent()is preferred.- Returns:
- A modified copy of the
thisobject
-
withLocale
default I withLocale(java.lang.String locale)
Returns a copy ofthisimmutable component with the specifiedlocale.Sets the locale used to identify the symbols of this number input component.
- Parameters:
locale- The preferred localeDefault:
null, ifLocales.getCurrent()is preferred.- Returns:
- A modified copy of the
thisobject
-
withValue
I withValue(@Nullable java.util.Date value)
Description copied from interface:IInputElementReturns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the input component.
- Specified by:
withValuein interfaceIInputElement<I extends IDateTimeFormatInputElement,java.util.Date>- Parameters:
value- The value of the input component.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getTimeZone
default java.util.TimeZone getTimeZone()
Returns the time zone that this component belongs to, or null if the default time zone is used.The default time zone is determined by
TimeZones.getCurrent().
-
withTimeZone
I withTimeZone(java.util.TimeZone timeZone)
Returns a copy ofthisimmutable component with the specifiedtimeZone.Sets the time zone that this component belongs to, or null if the default time zone is used.
- Parameters:
timeZone- The preferred timezoneDefault:
TimeZones.getCurrent().- Returns:
- A modified copy of the
thisobject
-
withTimeZone
default I withTimeZone(java.lang.String timeZone)
Returns a copy ofthisimmutable component with the specifiedtimeZone.Sets the time zone that this component belongs to, or null if the default time zone is used.
- Parameters:
timeZone- The preferred timezoneDefault:
TimeZones.getCurrent().- Returns:
- A modified copy of the
thisobject
-
getValueInZonedDateTime
@Nullable default java.time.ZonedDateTime getValueInZonedDateTime()
Returns the value (in ZonedDateTime).
-
withValueInZonedDateTime
I withValueInZonedDateTime(@Nullable java.time.ZonedDateTime timeZone)
Returns a copy ofthisimmutable component with the specifiedtimeZone.Sets the value (in ZonedDateTime).
- Parameters:
timeZone- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
getValueInLocalDateTime
@Nullable default java.time.LocalDateTime getValueInLocalDateTime()
Returns the value (in LocalDateTime), might be null unless a constraint stops it.
-
withValueInLocalDateTime
I withValueInLocalDateTime(@Nullable java.time.LocalDateTime dateTime)
Returns a copy ofthisimmutable component with the specifieddateTime.Sets the value (in LocalDateTime).
- Parameters:
dateTime- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
getValueInLocalDate
@Nullable default java.time.LocalDate getValueInLocalDate()
Returns the value (in LocalDate), might be null unless a constraint stops it.
-
withValueInLocalDate
I withValueInLocalDate(@Nullable java.time.LocalDate date)
Returns a copy ofthisimmutable component with the specifieddate.Sets the value (in LocalDate).
- Parameters:
date- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
getValueInLocalTime
@Nullable default java.time.LocalTime getValueInLocalTime()
Returns the value (in LocalTime), might be null unless a constraint stops it.
-
withValueInLocalTime
I withValueInLocalTime(@Nullable java.time.LocalTime time)
Returns a copy ofthisimmutable component with the specifiedtime.Sets the value (in LocalTime).
- Parameters:
time- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
-