Options
All
  • Public
  • Public/Protected
  • All
Menu

The dateline is a control that displays the actual dates (Mo, Tu, We, ...) in cells in one or more rows. The dateline is timezone aware (see setZoneId(ZoneId)), keeps track of currently selected time intervals (getSelectedIntervals()) and fires events of type DatelineScrollingEvent whenever the visible time range changes (see setOnVisibleRangeChanged(EventHandler)). Furthermore the dateline control constantly updates the hoverTimeIntervalProperty() whenever the pointer moves over it.

since

1.0

Hierarchy

  • Dateline

Index

Constructors

constructor

  • Constructs a new dateline.

    since

    1.0

    Parameters

    • timeline: Timeline

      the parent timeline

    Returns Dateline

Methods

getFirstDayOfWeek

  • getFirstDayOfWeek(): DayOfWeek
  • Returns the weekday that is considered the "first day of the week". In Germany the first day of the week is "Monday", in the US it is "Sunday". This is, for example, relevant for displaying grid lines correctly (between weeks).

    since

    1.0

    Returns DayOfWeek

    the first day of week

getHoverTimeInterval

  • Returns the time at the current pointer location.

    since

    1.0

    Returns TimeInterval

    the time at the current pointer location

getModel

  • The model of the dateline control. The model provides information about the list of supported resolutions, available time zones, number of scales inside the dateline.

    since

    1.0

    Returns DatelineModel

    the dateline model

getNativeElement

  • getNativeElement(): HTMLElement | undefined
  • Returns HTMLElement | undefined

getPrimaryTemporalUnit

  • Returns the "primary" temporal unit, which is the unit shown at the bottom of the dateline. Example: the dateline shows "Year / Month" at the top and "Days" at the bottom. In this case "Days" will be the primary temporal unit. The primary temporal unit is always passed to the activity repositories when querying for the activities inside the visible time range. This allows the repository to return more or less activities. Example: calendars can decide to not return weekend days if the user is currently looking at "Years".

    since

    1.0

    Returns TemporalUnit

    the currently shown primary temporal unit

getScaleResolutions

  • Returns the list of the currently displayed resolutions within the various scales of the dateline. Example: when the dateline displays "Month" at the top, "Days" in the middle, and "Hours" at the bottom, then the list will have three entries, each entry representing the resolution of its scale.

    since

    1.0

    see

    DatelineModel.getResolutions()

    Returns Resolution[]

    the list of currently showing resolutions

getSelectedIntervals

  • A list of the currently selected time intervals. This list is the "selection model" of the dateline. The difference to the selectedTimeIntervalProperty() is that these selections are permanent while the single selected time interval is only used to highlight a section within the dateline for zoom in / out operations. This list of selected time intervals however represents days or weeks that the user clicked on while pressing the command key (on Mac) or the CTRL key (on Windows / Linux).

    since

    1.0

    Returns TimeInterval[]

    the list of selected time intervals

getSelectedTimeInterval

  • The currently selected time interval. The value of this property gets updated whenever the user performs a time interval selection by dragging the pointer inside the timeline.

    since

    1.0

    Returns TimeInterval

    the currently selected time interval

getSelectionMode

  • Returns the selection mode applied by the dateline when the user adds time interval selections. The value of this property enables the application to switch between a single selection model and a multi selection model.

    since

    1.0

    Returns SelectionMode

    the selection mode (single, multi)

getTimeline

  • Returns the parent timeline container / node.

    since

    1.0

    Returns Timeline

    the parent timeline

getWidth

  • getWidth(): number
  • Returns the width of the dateline

    Returns number

    the width of the dateline

getZoneId

  • getZoneId(): ZoneId
  • Returns the time zone that is currently shown by the dateline. In this framework the dateline and each row can have their own time zones.

    since

    1.0

    Returns ZoneId

    the time zone ID

isZoneIdVisible

  • isZoneIdVisible(): boolean
  • Returns the visibility of the time zone name. The dateline is capable of displaying the time zone that it represents in its upper right corner.

    since

    1.0

    Returns boolean

    true if the time zone ID shall be shown to the user

isZoomLassoEnabled

  • isZoomLassoEnabled(): boolean
  • The zoom lasso allows the user to select a time range inside the dateline so that the dateline will zoom in as much as needed in order to make the range completely fill the visible area.

    since

    1.0

    Returns boolean

    true if the zoom lasso is enabled

onDateLinePointerDown

  • onDateLinePointerDown(pointerEvent: PointerEvent, scaleIndex: number): void
  • Parameters

    • pointerEvent: PointerEvent
    • scaleIndex: number

    Returns void

onDateLinePointerLeave

  • onDateLinePointerLeave(pointerEvent: PointerEvent, scaleIndex: number): void
  • Parameters

    • pointerEvent: PointerEvent
    • scaleIndex: number

    Returns void

onDateLinePointerMove

  • onDateLinePointerMove(pointerEvent: PointerEvent, scaleIndex: number): void
  • Parameters

    • pointerEvent: PointerEvent
    • scaleIndex: number

    Returns void

onDocumentPointerMovedForDateLine

  • onDocumentPointerMovedForDateLine(pointerEvent: PointerEvent): void
  • Parameters

    • pointerEvent: PointerEvent

    Returns void

onDocumentPointerUpForDateLine

  • onDocumentPointerUpForDateLine(pointerEvent: PointerEvent): void
  • Parameters

    • pointerEvent: PointerEvent

    Returns void

setFirstDayOfWeek

  • setFirstDayOfWeek(day: DayOfWeek): void
  • Sets the first day of week.

    since

    1.0

    Parameters

    • day: DayOfWeek

      the first day of week

    Returns void

setModel

  • Sets the model of the dateline control.

    since

    1.0

    Parameters

    Returns void

setNativeElement

  • setNativeElement(value: HTMLElement | undefined): void
  • Parameters

    • value: HTMLElement | undefined

    Returns void

setSelectionMode

  • Sets the selection mode (single, multi).

    since

    1.0

    Parameters

    Returns void

setTimeline

  • Parameters

    Returns void

setWidth

  • setWidth(value: number): void
  • Sets the width of the dateline.

    Parameters

    • value: number

    Returns void

setZoneId

  • setZoneId(zoneId: ZoneId): void
  • Sets the time zone ID.

    since

    1.0

    Parameters

    • zoneId: ZoneId

      the time zone ID

    Returns void

setZoneIdVisible

  • setZoneIdVisible(visible: boolean): void
  • Sets visibility of the time zone ID.

    since

    1.0

    Parameters

    • visible: boolean

      true if the time zone ID shall be shown to the user

    Returns void

setZoomLassoEnabled

  • setZoomLassoEnabled(value: boolean): void
  • Sets the value of zoomLassoEnabledProperty().

    since

    1.0

    Parameters

    • value: boolean

      if true then the zoom lasso is enabled

    Returns void