Interface ITimepicker

All Superinterfaces:
IAnyGroup<ITimepicker>, IChildrenOfInputgroup<ITimepicker>, IComponent<ITimepicker>, IDateTimeFormatInputElement<ITimepicker>, IFormatInputElement<ITimepicker,Date>, IHtmlBasedComponent<ITimepicker>, IInputElement<ITimepicker,Date>, IReadonly<ITimepicker>, IXulElement<ITimepicker>

public interface ITimepicker extends IDateTimeFormatInputElement<ITimepicker>, IAnyGroup<ITimepicker>
Immutable 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
  • Field Details

    • DEFAULT

      static final ITimepicker DEFAULT
      Constant for default attributes of this immutable component.
  • Method Details

    • getWidgetClass

      default String getWidgetClass()
      Returns the client widget class.

      Default: "zkmax.inp.Timepicker"

      Specified by:
      getWidgetClass in interface IComponent<ITimepicker>
    • getMin

      @Nullable 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 Date min)
      Returns a copy of this immutable component with the specified min.

      Sets the minimum time used to generate the options in Timepicker

      Parameters:
      min - The minimum time used to generate the options in Timepicker

      Default: null.

      Returns:
      A modified copy of the this object
    • withMin

      default ITimepicker withMin(@Nullable LocalTime min)
      Returns a copy of this immutable component with the specified min.

      Sets the minimum time used to generate the options in Timepicker

      Parameters:
      min - The minimum time used to generate the options in Timepicker

      Default: null.

      Returns:
      A modified copy of the this object
    • getMax

      @Nullable 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 Date max)
      Returns a copy of this immutable component with the specified max.

      Sets the maximum time used to generate the options in Timepicker

      Parameters:
      max - The maximum time used to generate the options in Timepicker

      Default: null.

      Returns:
      A modified copy of the this object
    • withMax

      default ITimepicker withMax(@Nullable LocalTime max)
      Returns a copy of this immutable component with the specified max.

      Sets the maximum time used to generate the options in Timepicker

      Parameters:
      max - The maximum time used to generate the options in Timepicker

      Default: null.

      Returns:
      A modified copy of the this object
    • 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:
      getCols in interface IInputElement<ITimepicker,Date>
    • getInterval

      default int getInterval()
      Returns the interval time used to generate the options in Timepicker

      Unit: second

      Default: 3600, i.e. 1hr

    • withInterval

      ITimepicker withInterval(int interval)
      Returns a copy of this immutable component with the specified interval. Sets the interval time used to generate the options in Timepicker

      Unit: 1 second

      Parameters:
      interval - The time used to generate the options
      Returns:
      A modified copy of the this object
    • withReadonly

      default ITimepicker withReadonly(boolean readonly)
      Description copied from interface: IReadonly
      Returns a copy of this immutable component with the specified readonly.

      Sets whether it's readonly.

      Specified by:
      withReadonly in interface IReadonly<ITimepicker>
      Parameters:
      readonly - true means readonly.

      Default: false.

      Returns:
      A modified copy of the this object
    • withLocale

      default ITimepicker withLocale(String locale)
      Description copied from interface: IDateTimeFormatInputElement
      Returns a copy of this immutable component with the specified locale.

      Sets the locale used to identify the symbols of this number input component.

      Specified by:
      withLocale in interface IDateTimeFormatInputElement<ITimepicker>
      Parameters:
      locale - The preferred locale

      Default: null, if Locales.getCurrent() is preferred.

      Returns:
      A modified copy of the this object
    • of

      static ITimepicker of(Date date)
      Return the instance of the given date.
      Parameters:
      date - The date to indicate the time for the timepicker.
    • of

      static ITimepicker of(Temporal date)
      Return the instance of the given date.
      Parameters:
      date - The date to indicate the time for the timepicker.
    • of

      static ITimepicker of(String format, Date date)
      Return the instance of the given format and date.
      Parameters:
      format - The format of the timepicker
      date - The date to indicate the value for timepicker.
    • of

      static ITimepicker of(String format, Temporal date)
      Return the instance of the given format and date.
      Parameters:
      format - The format of the timepicker
      date - 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(String constraint)
      Returns the instance with the given constraint.
      Parameters:
      constraint - The timepicker constraint
    • ofFormat

      static ITimepicker ofFormat(String format)
      Returns the instance with the given format.
      Parameters:
      format - The timepicker format
    • ofLocale

      static ITimepicker ofLocale(String locale)
      Returns the instance with the given locale.
      Parameters:
      locale - The timepicker locale
    • ofLocale

      static ITimepicker ofLocale(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(String id)
      Returns the instance with the given id.
      Parameters:
      id - The id to identify this component