Options
All
  • Public
  • Public/Protected
  • All
Menu

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...).

since

1.0

Hierarchy

Implements

Index

Constructors

constructor

  • Constructs a new weekend calendar.

    since

    1.0

    Returns WeekendCalendar

Methods

getActivities

  • Returns an array 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.

    since

    1.0

    Parameters

    • layer: Layer

      the layer for which to return the activities

    • startTime: number

      the start time of the time interval for which to return the activities

    • endTime: number

      the end time of the time interval for which to return the activities

    • temporalUnit: TemporalUnit

      the temporal unit currently displayed in the dateline

    • zoneId: ZoneId

      the timezone currently displayed in the dateline

    Returns WeekendCalendarActivity[]

    the activities on the given layer and in the given time interval

getEarliestTimeUsed

  • getEarliestTimeUsed(): number
  • Returns the earliest time used by the activities stored in this repository / on this row. This method gets used for navigation (e.g. "scroll to earliest time used in the Gantt chart", "zoom out to show all activities").

    since

    1.0

    Returns number

    the earliest time used by the activities in this repository / row (null if no activities found)

getLatestTimeUsed

  • getLatestTimeUsed(): number
  • Returns the latest time used by the activities stored in this repository / on this row. This method gets used for navigation (e.g. "scroll to latest time used in the Gantt chart", "zoom out to show all activities").

    since

    1.0

    Returns number

    the latest time used by the activities in this repository / row (null if no activities found)

getName

  • getName(): string
  • Returns the name of the calendar. The name might be displayed by the UI (e.g. in a context menu).

    since

    1.0

    Returns string

getWeekendDays

  • getWeekendDays(): DayOfWeek[]
  • Returns the days of the week that are to be considered weekend days. By default DayOfWeek.SATURDAY and DayOfWeek.SUNDAY are considered weekend days.

    since

    1.0

    Returns DayOfWeek[]

    the days of the week used as weekend days

isSupportedUnit

  • 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.

    since

    1.0

    Parameters

    Returns boolean

    true if weekend information will be shown in the Gantt chart

isVisible

  • isVisible(): boolean
  • Returns the visibility flag of the calendar. Calendars can be shown / hidden by the user.

    since

    1.0

    Returns boolean

setName

  • setName(name: string): void
  • Sets the the name of the calendar.

    since

    1.0

    Parameters

    • name: string

      the calendar name

    Returns void

setVisible

  • setVisible(visible: boolean): void
  • Sets the visibility flag of the calendar. Calendars can be shown / hidden by the user.

    since

    1.0

    Parameters

    • visible: boolean

      visibility flag of the calendar

    Returns void

setWeekendDays

  • setWeekendDays(...days: DayOfWeek[]): void
  • 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.

    since

    1.0

    Parameters

    • Rest ...days: DayOfWeek[]

      the days of the week that are to be considered weekend days

    Returns void