Klasse WeekendCalendar

Alle implementierten Schnittstellen:
ActivityRepository<WeekendCalendarActivity>, Calendar<WeekendCalendarActivity>, EventTarget

public class WeekendCalendar extends CalendarBase<WeekendCalendarActivity>
A calendar specialized on returning activities that represent weekend days (default: saturday, sunday). The days that are considered weekend days can be configured by calling setWeekendDays(DayOfWeek...).
Seit:
1.0
  • Konstruktordetails

    • WeekendCalendar

      public WeekendCalendar()
      Constructs a new weekend calendar.
      Seit:
      1.0
  • Methodendetails

    • setWeekendDays

      public void setWeekendDays(DayOfWeek... days)
      Sets the days of the week that are considered to be a weekend day. By default DayOfWeek.SATURDAY and DayOfWeek.SUNDAY are considered weekend days.
      Parameter:
      days - the days of the week that are to be considered weekend days
      Seit:
      1.0
    • getWeekendDays

      public DayOfWeek[] getWeekendDays()
      Returns the days of the week that are to be considered weekend days. By default DayOfWeek.SATURDAY and DayOfWeek.SUNDAY are considered weekend days.
      Gibt zurück:
      the days of the week used as weekend days
      Seit:
      1.0
    • getActivities

      public Iterator<WeekendCalendarActivity> getActivities(Layer layer, Instant startTime, Instant endTime, TemporalUnit temporalUnit, ZoneId zoneId)
      Beschreibung aus Schnittstelle kopiert: ActivityRepository
      Returns an iterator for iterating over all activities found for the given layer and time interval. This method has to return very fast as it gets called many times during rendering of the chart. A slow implementation will have a direct impact on scrolling / rendering performance.
      Parameter:
      layer - the layer for which to return the activities
      startTime - the start time of the time interval for which to return the activities
      endTime - the end time of the time interval for which to return the activities
      temporalUnit - the temporal unit currently displayed in the dateline
      zoneId - the timezone currently displayed in the dateline
      Gibt zurück:
      the activities on the given layer and in the given time interval
    • isSupportedUnit

      protected boolean isSupportedUnit(TemporalUnit unit)
      Determines if weekends will be shown for the given temporal unit. By default we only show weekends for ChronoUnit.DAYS and ChronoUnit.WEEKS. To support more units simply override this method in a subclass.
      Parameter:
      unit - the unit to check
      Gibt zurück:
      true if weekend information will be shown in the Gantt chart
      Seit:
      1.0