Class FullCalendarI18n

java.lang.Object
io.jmix.fullcalendarflowui.component.FullCalendarI18n
All Implemented Interfaces:
Serializable

public class FullCalendarI18n extends Object implements Serializable
The internationalization properties for FullCalendar component.
See Also:
  • Field Details

    • direction

      protected FullCalendarI18n.Direction direction
    • firstDayOfWeek

      protected DayOfWeek firstDayOfWeek
    • dayOfYear

      protected Integer dayOfYear
    • weekTextLong

      protected String weekTextLong
    • allDayText

      protected String allDayText
    • moreLinkText

      protected String moreLinkText
    • noEventsText

      protected String noEventsText
    • closeHint

      protected String closeHint
    • eventHint

      protected String eventHint
    • timeHint

      protected String timeHint
    • moreLinkHint

      protected String moreLinkHint
  • Constructor Details

    • FullCalendarI18n

      public FullCalendarI18n()
  • Method Details

    • getDirection

      @Nullable public FullCalendarI18n.Direction getDirection()
      Returns:
      the direction in which text should be written and read or null if not set
    • setDirection

      public void setDirection(@Nullable FullCalendarI18n.Direction direction)
      Sets the direction in which text should be written and read.

      FullCalendar also respects the direction of UI.setDirection(com.vaadin.flow.component.Direction).

      Parameters:
      direction - the direction to set
    • withDirection

      public FullCalendarI18n withDirection(@Nullable FullCalendarI18n.Direction direction)
      Sets a direction. See setDirection(Direction).
      Parameters:
      direction - the direction to set
      Returns:
      current instance of i18n
    • getFirstDayOfWeek

      @Nullable public DayOfWeek getFirstDayOfWeek()
      Returns:
      the first day of week or null if not set
    • setFirstDayOfWeek

      public void setFirstDayOfWeek(@Nullable DayOfWeek dayOfWeek)
      Sets the first day of week. The default value is taken from locale.

      The order of days is the following: 0 - Sunday, 1 - Monday, etc.

      Parameters:
      dayOfWeek - the first day of week
    • withFirstDayOfWeek

      public FullCalendarI18n withFirstDayOfWeek(@Nullable DayOfWeek dayOfWeek)
      Sets the first day of week. See setFirstDayOfWeek(DayOfWeek).
      Parameters:
      dayOfWeek - the first day of week
      Returns:
      current instance of i18n
    • getDayOfYear

      @Nullable public Integer getDayOfYear()
      Returns:
      count of the days or null if not set
    • setDayOfYear

      public void setDayOfYear(@Nullable Integer dayOfYear)
      The rule how to define the first week of the year. For instance, if the first day of the week is 1 and the day of year equals to 4, it means that the week that contains Jan 4th is the first week of the year.

      The default value is taken from locale.

      Parameters:
      dayOfYear - count of the days
    • withDayOfYear

      public FullCalendarI18n withDayOfYear(@Nullable Integer dayOfYear)
      Sets the count of days that should be at least presented in the week to consider it as a first week of the year. See setDayOfYear(Integer).
      Parameters:
      dayOfYear - count of the days
      Returns:
      current instance of i18n
    • getWeekTextLong

      @Nullable public String getWeekTextLong()
      Returns:
      the long name of the week or null if not set
    • setWeekTextLong

      public void setWeekTextLong(@Nullable String weekTextLong)
      Sets the long name of the week.
      Parameters:
      weekTextLong - the long name of the week
    • withWeekTextLong

      public FullCalendarI18n withWeekTextLong(String weekTextLong)
      Sets the long name of the week. See setWeekTextLong(String).
      Parameters:
      weekTextLong - the long name of the week
      Returns:
      current instance of i18n
    • getAllDayText

      @Nullable public String getAllDayText()
      Returns:
      the all-day text or null if not set
    • setAllDayText

      public void setAllDayText(@Nullable String allDayText)
      Sets the all-day text. The text is visible in time-grid display modes.
      Parameters:
      allDayText - the all-day text
    • withAllDayText

      public FullCalendarI18n withAllDayText(@Nullable String allDayText)
      Sets the all-day text. See setAllDayText(String).
      Parameters:
      allDayText - the all-day text
      Returns:
      current instance of i18n
    • getMoreLinkText

      @Nullable public String getMoreLinkText()
      Returns:
      the "more" link text or null if not set
    • setMoreLinkText

      public void setMoreLinkText(@Nullable String moreLinkText)
      Sets the "more" link text. The provided text can be a JavaScript Template string. This template takes the count parameter, for instance:
       setMoreLinkText("+${count} event(s)");
       
      It also takes a string definition of JavaScript function that takes count as a parameter. For instance:
       setMoreLinkText(
           """
           function (count) {
               return `See +${count} event` + (count === 1 ? '' : 's');
           }
           """)
       
      Parameters:
      moreLinkText - the "more" link text
    • withMoreLinkText

      public FullCalendarI18n withMoreLinkText(@Nullable String moreLinkText)
      Sets the "more" link text. See setMoreLinkText(String).
      Parameters:
      moreLinkText - the "more" link text
      Returns:
      current instance of i18n
    • getNoEventsText

      @Nullable public String getNoEventsText()
      Returns:
      text that is shown when no events are displayed or null if not set
    • setNoEventsText

      public void setNoEventsText(@Nullable String noEventsText)
      Sets text that will be shown when no events are displayed in list display modes, e.g CalendarDisplayModes.LIST_DAY.
      Parameters:
      noEventsText - the text to set
    • withNoEventsText

      public FullCalendarI18n withNoEventsText(@Nullable String noEventsText)
      Sets text that will be shown when no events are displayed. See setNoEventsText(String).
      Parameters:
      noEventsText - the text to set
      Returns:
      current instance of i18n
    • getCloseHint

      @Nullable public String getCloseHint()
      Returns:
      the hint for close button or null if not set
    • setCloseHint

      public void setCloseHint(@Nullable String closeHint)
      Sets the hint for the close button in the popover when you click the "more" link.
      Parameters:
      closeHint - the close hint text
    • withCloseHint

      public FullCalendarI18n withCloseHint(@Nullable String closeHint)
      Sets the hint for close button. See setCloseHint(String).
      Parameters:
      closeHint - the close hint text
      Returns:
      current instance of i18n
    • getEventHint

      @Nullable public String getEventHint()
      Returns:
      the event hint
    • setEventHint

      public void setEventHint(@Nullable String eventHint)
      Sets for list display modes' non-visible table header the name of the column with event names.
      Parameters:
      eventHint - the event hint text
    • withEventHint

      public FullCalendarI18n withEventHint(@Nullable String eventHint)
      Sets for list display modes' non-visible table header the name of the column with event names. See setEventHint(String).
      Parameters:
      eventHint - the even hint text
      Returns:
      current instance of i18n
    • getTimeHint

      @Nullable public String getTimeHint()
      Returns:
      the time hint text or null if not set
    • setTimeHint

      public void setTimeHint(@Nullable String timeHint)
      Sets for list display modes' non-visible table header the name of the column with days and times.
      Parameters:
      timeHint - the time hint text
    • withTimeHint

      public FullCalendarI18n withTimeHint(@Nullable String timeHint)
      Sets the time hint text. See setTimeHint(String).
      Parameters:
      timeHint - the time hint text
      Returns:
      current instance of i18n
    • getNavLinkHint

      @Nullable public String getNavLinkHint()
      Returns:
      the navigation link hint or null if not set
    • setNavLinkHint

      public void setNavLinkHint(@Nullable String navLinkHint)
      Sets the hint text of navigation links. The provided text can be a JavaScript Template string. This template takes the date parameter that has String type, for instance:
        setNavLinkHint("Navigate to ${date}");
        
      It also takes a string definition of JavaScript function that takes the date as a parameter with the String type. For instance:
        setNavLinkHint(
            """
            function (date) {
                return `Navigate to ${date}`;
            }
            """)
        
      Parameters:
      navLinkHint - the navigation link hint
    • withNavLinkHint

      public FullCalendarI18n withNavLinkHint(@Nullable String navLinkHint)
      Sets the hint text of navigation links. See setNavLinkHint(String).
      Parameters:
      navLinkHint - the navigation link hint
      Returns:
      current instance of i18n
    • getMoreLinkHint

      public String getMoreLinkHint()
      Returns:
      the "more" link hint text or null if not set
    • setMoreLinkHint

      public void setMoreLinkHint(@Nullable String moreLinkHint)
      Sets the "more" link hint. The provided text can be a JavaScript Template string. This template takes the count parameter that has Number type, for instance:
        setMoreLinkHint("Show ${count} more event${count === 1 ? '' : 's'}");
        
      It also takes a string definition of JavaScript function that takes count as a parameter. For instance:
        setMoreLinkHint(
            """
            function (count) {
                return `Show ${count} more event${count === 1 ? '' : 's'}`;
            }
            """)
        
      Parameters:
      moreLinkHint - the "more" link hint text
    • withMoreLinkHint

      public FullCalendarI18n withMoreLinkHint(@Nullable String moreLinkHint)
      Sets the "more" link hint text. See setMoreLinkHint(String).
      Parameters:
      moreLinkHint - the "more" link hint text
      Returns:
      current instance of i18n
    • combine

      public FullCalendarI18n combine(@Nullable FullCalendarI18n i18n)
      Creates new i18n object from current instance and copies non-null properties from the provided object to the new one.
      Parameters:
      i18n - object to copy non-null properties
      Returns:
      new i18n object