Class CalendarTimeWindowViewContext

    • Constructor Detail

      • CalendarTimeWindowViewContext

        public CalendarTimeWindowViewContext​(String componentInstanceId,
                                             String locale,
                                             ZoneId zoneId)
        Default constructor.
        Parameters:
        componentInstanceId - the component instance identifier
        locale - the locale
        zoneId - the zoneId
    • Method Detail

      • toJSonScript

        public String toJSonScript​(String jsVariableName)
      • getAsJSonString

        public String getAsJSonString()
      • getComponentInstanceId

        public String getComponentInstanceId()
      • setAvailableViewTypes

        public void setAvailableViewTypes​(List<CalendarViewType> availableViewTypes)
      • isListViewMode

        public boolean isListViewMode()
      • setListViewMode

        public void setListViewMode​(boolean listViewMode)
      • getReferencePeriodLabel

        public String getReferencePeriodLabel()
      • getReferenceDay

        public CalendarDay getReferenceDay()
      • getFormattedReferenceDay

        public String getFormattedReferenceDay()
      • setReferenceDay

        public void setReferenceDay​(Date date)
      • previous

        public void previous()
        Change reference date to the previous period according to the current view.
      • next

        public void next()
        Change reference date to the next period according to the current view.
      • today

        public void today()
        Set the reference date to the date of today.
      • isWithWeekend

        public boolean isWithWeekend()
        Indicates if weekends have to be displayed.
        Returns:
      • setWithWeekend

        public void setWithWeekend​(boolean withWeekend)
        Set if weekends have to be displayed.
        Parameters:
        withWeekend -
      • getFirstDayOfWeek

        public int getFirstDayOfWeek()
        Gets the first day of weeks of the calendar with 1 meaning for sunday, 2 meaning for monday, and so on. The first day of weeks depends on the locale; the first day of weeks is monday for french whereas it is for sunday for US.
        Returns:
        the first day of week.
      • getPeriodLabel

        public static String getPeriodLabel​(CalendarPeriod period,
                                            String language)
        Compute a period label.
        Parameters:
        period -
        language -
        Returns:
      • getZoneIdAsString

        public String getZoneIdAsString()
        Gets the zone identifier of the view.
        Returns:
        the zone identifier as ZoneId instance.
      • getZoneId

        public ZoneId getZoneId()
        Gets the zone identifier of the view.
        Returns:
        the zone identifier as ZoneId instance.
      • setZoneId

        public void setZoneId​(ZoneId zoneId)