Class SuperDatePickerI18n

java.lang.Object
com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
org.vaadin.miki.superfields.dates.SuperDatePickerI18n
All Implemented Interfaces:
Serializable, HasLocale

public final class SuperDatePickerI18n extends com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n implements HasLocale
A locale-powered DatePicker.DatePickerI18n.
Since:
2020-04-09
Author:
miki
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates the i18n data based on default Locale.
    Creates the i18n data based on given Locale.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns current month names for displaying as user formatted month name.
    Returns locale associated with this object.
    com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
    setDateFormat(String dateFormat)
     
    com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
    setDateFormats(String primaryFormat, String... additionalParsingFormats)
     
    com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
    setDisplayMonthNames(List<String> displayMonthNames)
    Controls the month names used for displaying and typing in by the user.
    void
    setLocale(Locale locale)
    Sets new locale for this object.

    Methods inherited from class com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n

    getCancel, getDateFormats, getFirstDayOfWeek, getMonthNames, getReferenceDate, getToday, getWeekdays, getWeekdaysShort, setCancel, setFirstDayOfWeek, setMonthNames, setReferenceDate, setToday, setWeekdays, setWeekdaysShort

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SuperDatePickerI18n

      public SuperDatePickerI18n()
      Creates the i18n data based on default Locale.
    • SuperDatePickerI18n

      public SuperDatePickerI18n(Locale locale)
      Creates the i18n data based on given Locale.
      Parameters:
      locale - Locale to use.
  • Method Details

    • setDisplayMonthNames

      public com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n setDisplayMonthNames(List<String> displayMonthNames)
      Controls the month names used for displaying and typing in by the user.
      Parameters:
      displayMonthNames - Names of months. If empty or null, DatePicker.DatePickerI18n.getMonthNames() will be used.
      Returns:
      This.
    • getDisplayMonthNames

      public List<String> getDisplayMonthNames()
      Returns current month names for displaying as user formatted month name.
      Returns:
      A list of 12 month names (from January to December).
    • setLocale

      public void setLocale(Locale locale)
      Description copied from interface: HasLocale
      Sets new locale for this object.
      Specified by:
      setLocale in interface HasLocale
      Parameters:
      locale - Locale to use. Should not be null.
    • getLocale

      public Locale getLocale()
      Description copied from interface: HasLocale
      Returns locale associated with this object.
      Specified by:
      getLocale in interface HasLocale
      Returns:
      A Locale. Never null.
    • setDateFormat

      public com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n setDateFormat(String dateFormat)
      Overrides:
      setDateFormat in class com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n
    • setDateFormats

      public com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n setDateFormats(String primaryFormat, String... additionalParsingFormats)
      Overrides:
      setDateFormats in class com.vaadin.flow.component.datepicker.DatePicker.DatePickerI18n