Options
All
  • Public
  • Public/Protected
  • All
Menu

The timeline control is a container for the Dateline and the Eventline. It is displayed above the GraphicsBase and provides several methods for scrolling and zooming, both of which can be done in an animated way (default) or not.

since

1.0

Hierarchy

  • Timeline

Index

Constructors

constructor

  • Constructs a new timeline control that is using the ChronoUnitTimelineModel.

    since

    1.0

    Returns Timeline

Methods

getActionContext

  • getActionContext(): ActionContext
  • Returns ActionContext

getDateline

  • Returns the dateline contained within the timeline. The timeline is a container that consists of a dateline and an eventline.

    since

    1.0

    Returns Dateline

    the dateline

getEventline

  • Returns the eventline contained within the timeline. The timeline is a container that consists of a dateline and an eventline.

    since

    1.0

    Returns Eventline

    the dateline

getModel

  • Returns the timeline model to be used by the timeline.

    since

    1.0

    Returns TimelineModel

    the timeline model

getRedrawCallBacks

  • getRedrawCallBacks(): Function[]
  • Returns Function[]

getRequestRedrawAllCallBacks

  • getRequestRedrawAllCallBacks(): Function[]
  • Returns Function[]

getRequestRedrawBelowAboveCallBacks

  • getRequestRedrawBelowAboveCallBacks(): Function[]
  • Returns Function[]

getTotalAnimationScrollSteps

  • getTotalAnimationScrollSteps(): number
  • Returns number

getTotalAnimationZoomSteps

  • getTotalAnimationZoomSteps(): number
  • Returns number

getVisibleDuration

  • getVisibleDuration(): number
  • Calculates and returns the duration of the visible time interval inside the timeline. The duration is the time difference between the visibleStartTime and the visibleEndTime.

    since

    1.0

    Returns number

    the visible duration

getVisibleEndTime

  • getVisibleEndTime(): number
  • Returns the last visible time point (on the right edge) inside the timeline.

    since

    1.0

    Returns number

    the last visible time point (on the right edge) inside the timeline

getVisibleStartTime

  • getVisibleStartTime(): number
  • Returns the first visible time point (on the left edge) inside the timeline.

    since

    1.0

    Returns number

    the first visible time point (on the left edge) inside the timeline

getWidth

  • getWidth(): number
  • Returns number

getZoomFactor

  • getZoomFactor(): number
  • Returns the zoom factor that will be applied every time the user performs a zoom in or zoom out. The default value of this property is .5, which means that the user will see 50% more or less time inside the visible area.

    since

    1.0

    Returns number

    the zoom factor

getZoomMode

  • Returns the way a zoom in or out will be executed. Zooming can keep the current start time, the current end time, or the time shown in the center of the timeline inside the visible area. Based on this setting the currently shown activities on the left or the right might be pushed out of the visible area when zooming in or more of them might show up either on the left, the right, or both sides.

    since

    1.0

    Returns ZoomMode

    the currently used zoom mode (center zoom, keep start time, keep end time)

isMoveAnimated

  • isMoveAnimated(): boolean
  • Returns whether moving from one time to another will happen animated or not.

    Returns boolean

    true if moving in time will be animated

isScrollDragEnabled

  • isScrollDragEnabled(): boolean
  • Returns if the user is allowed to perform a horizontal scroll by dragging the timeline. Normally a drag gesture triggers the selection of a time interval used for zooming into time.

    since

    1.0

    Returns boolean

    true if the user can trigger horizontal scrolling by dragging the timeline

isZoomAnimated

  • isZoomAnimated(): boolean
  • Returns if any zoom operation should be done in an animated fashion or not. Animation happens by not directly switching to the new time interval but by gradually changing the interval until the new interval has been reached.

    since

    1.0

    Returns boolean

    true if the zoom in / out operations will be visualized in an animated way

redrawAll

  • redrawAll(): void
  • Returns void

registerRedrawCallBack

  • registerRedrawCallBack(callBack: Function): void
  • Parameters

    • callBack: Function

    Returns void

registerRequestRedrawAllCallBack

  • registerRequestRedrawAllCallBack(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

registerRequestRedrawBelowAboveCallback

  • registerRequestRedrawBelowAboveCallback(callback: Function): void
  • Parameters

    • callback: Function

    Returns void

requestRedrawAll

  • requestRedrawAll(): void
  • Returns void

requestRedrawBelowAbove

  • requestRedrawBelowAbove(): void
  • Returns void

scrollByDurationJump

  • scrollByDurationJump(durationJump: number, moveAnimated?: boolean): void
  • Performs a scroll by a duration jump.

    since

    1.0

    Parameters

    • durationJump: number

      the duration jump to scroll

    • Default value moveAnimated: boolean = this._moveAnimated

      possibility to override isMoveAnimated() for this call only

    Returns void

scrollByPercentage

  • scrollByPercentage(percentage: number, moveAnimated?: boolean): void
  • Performs a scroll by a percentage of the visible duration.

    since

    1.0

    Parameters

    • percentage: number

      the percentage of the visible duration to scroll

    • Default value moveAnimated: boolean = this._moveAnimated

      possibility to override isMoveAnimated() for this call only

    Returns void

scrollByPixelDelta

  • scrollByPixelDelta(pixelDelta: number, moveAnimated?: boolean): void
  • Performs a scroll by a pixel delta.

    since

    1.0

    Parameters

    • pixelDelta: number

      the pixel delta to scroll

    • Default value moveAnimated: boolean = this._moveAnimated

      possibility to override isMoveAnimated() for this call only

    Returns void

scrollLeft

  • scrollLeft(): void
  • Performs a left scroll inside the timeline, meaning that earlier times will become visible.

    since

    1.0

    see

    scrollLeftFast(), scrollRightFast(), scrollRight()

    Returns void

scrollLeftFast

  • scrollLeftFast(): void
  • Performs a fast left scroll inside the timeline, meaning that earlier times will become visible.

    since

    1.0

    see

    scrollLeft(), scrollRightFast(), scrollRight()

    Returns void

scrollRight

  • scrollRight(): void
  • Performs a right scroll inside the timeline, meaning that later times will become visible.

    since

    1.0

    see

    scrollRightFast(), scrollLeft(), scrollLeftFast()

    Returns void

scrollRightFast

  • scrollRightFast(): void
  • Performs a fast right scroll inside the timeline, meaning that later times will become visible.

    since

    1.0

    see

    scrollRight(), scrollLeft(), scrollLeftFast()

    Returns void

scrollTimeToLocation

  • scrollTimeToLocation(time: number, location: number, moveAnimated?: boolean): void
  • Performs a scroll adjusting a time to a location.

    since

    1.0

    Parameters

    • time: number

      the time to display at the given location

    • location: number

      the location where to display the given time

    • Default value moveAnimated: boolean = this._moveAnimated

      possibility to override isMoveAnimated() for this call only

    Returns void

setActionContext

  • setActionContext(value: ActionContext): void
  • Parameters

    • value: ActionContext

    Returns void

setModel

  • Sets the timeline model to be used by the timeline.

    since

    1.0

    Parameters

    Returns void

setMoveAnimated

  • setMoveAnimated(animated: boolean): void
  • Sets whether moving from one time to another will happen animated or not.

    Parameters

    • animated: boolean

      if true the change from one time to another will be animated

    Returns void

setRedrawCallBacks

  • setRedrawCallBacks(value: Function[]): void
  • Parameters

    • value: Function[]

    Returns void

setRequestRedrawAllCallBacks

  • setRequestRedrawAllCallBacks(value: Function[]): void
  • Parameters

    • value: Function[]

    Returns void

setRequestRedrawBelowAboveCallBacks

  • setRequestRedrawBelowAboveCallBacks(value: Function[]): void
  • Parameters

    • value: Function[]

    Returns void

setScrollDragEnabled

  • setScrollDragEnabled(enabled: boolean): void
  • Sets if the user can trigger horizontal scrolling by dragging the timeline.

    since

    1.0

    Parameters

    • enabled: boolean

      if true the user can trigger horizontal scrolling by dragging the timeline

    Returns void

setTotalAnimationScrollSteps

  • setTotalAnimationScrollSteps(value: number): void
  • Parameters

    • value: number

    Returns void

setTotalAnimationZoomSteps

  • setTotalAnimationZoomSteps(value: number): void
  • Parameters

    • value: number

    Returns void

setWidth

  • setWidth(value: number): void
  • Parameters

    • value: number

    Returns void

setZoomAnimated

  • setZoomAnimated(animated: boolean): void
  • Sets if any zoom operation should be done in an animated fashion or not. Animation happens by not directly switching to the new time interval but by gradually changing the interval until the new interval has been reached.

    since

    1.0

    Parameters

    • animated: boolean

      if true the zoom in / out operations will be visualized in an animated way

    Returns void

setZoomFactor

  • setZoomFactor(zoomFactor: number): void
  • Sets the value of the zoomFactorProperty().

    since

    1.0

    Parameters

    • zoomFactor: number

      the new zoom factor

    Returns void

setZoomMode

  • Sets the currently used zoom mode (center zoom, keep start time, keep end time).

    since

    1.0

    Parameters

    • mode: ZoomMode

      the new zoom mode (center zoom, keep start time, keep end time)

    Returns void

showNow

  • showNow(center?: boolean): void
  • Makes the timeline scroll to the time point that is currently considered "now". This time point will be shown in the center of the timeline.

    since

    1.0

    see

    showNow(boolean), showTime(Instant), showTime(Instant, boolean)

    Parameters

    • Optional center: boolean

      determines if the time will be shown in the center or on the left-edge of the timeline

    Returns void

showRange

  • showRange(startTime: number, endTime: number, zoomAnimated?: boolean): void
  • Requests that the given time interval will be completely visible within the timeline.

    since

    1.0

    Parameters

    • startTime: number

      the start time of the requested interval

    • endTime: number

      the end time of the requested interval

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

showRangeFromDuration

  • showRangeFromDuration(startTime: number, duration: number): void
  • Requests that the given time interval will be completely visible within the timeline.

    since

    1.0

    Parameters

    • startTime: number

      the start time of the requested interval

    • duration: number

      the duration of the requested interval

    Returns void

showRangeFromTimeInterval

  • Requests that the given time interval will be completely visible within the timeline.

    since

    1.0

    Parameters

    Returns void

showTemporalUnit

  • showTemporalUnit(temporalUnit: ChronoUnit, width: number): void
  • Submits a request to the timeline to show the given temporal unit (e.g. ChronoUnit.DAYS at the given width (e.g. 50px). This is a convenient way to make the Gantt chart show up with a good initial zoom.

    since

    1.0

    Parameters

    • temporalUnit: ChronoUnit

      the temporal unit to show

    • width: number

      the number of pixels to use for each unit (e.g. for one day)

    Returns void

showTime

  • showTime(time: number, center?: boolean): void
  • Makes the timeline scroll to the time point passed to the method.

    since

    1.0

    see

    showNow(), showNow(boolean), showTime(Instant)

    Parameters

    • time: number

      the time to show

    • Default value center: boolean = false

      if true the time will be centered within the timeline

    Returns void

zoom

  • zoom(factor: number, zoomMode?: ZoomMode, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • Default value zoomMode: ZoomMode = this._zoomMode

      possibility to override getZoomMode() for this call only

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

zoomIn

  • zoomIn(): void
  • Requests that the timeline performs a zoom in operation.

    since

    1.0

    see

    zoomOut(), zoom(double, boolean, Instant)

    Returns void

zoomOut

  • zoomOut(): void
  • Requests that the timeline performs a zoom out operation.

    since

    1.0

    see

    zoomOut(), zoom(double, boolean, Instant)

    Returns void

zoomWithFrozenLocation

  • zoomWithFrozenLocation(factor: number, frozenLocation: number, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation with a frozen location.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • frozenLocation: number

      the location where time will stay where it was before (use case: pinch zoom)

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

zoomWithFrozenPercentage

  • zoomWithFrozenPercentage(factor: number, frozenPercentage: number, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation with a frozen percentage of the visible duration.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • frozenPercentage: number

      the percentage of the visible duration where time will stay where it was before (use case: pinch zoom)

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

zoomWithFrozenTime

  • zoomWithFrozenTime(factor: number, frozenTime: number, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation with a frozen time.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • frozenTime: number

      the point in time that will stay where it was before (use case: pinch zoom)

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

zoomWithTargetLocation

  • zoomWithTargetLocation(factor: number, targetLocation: number, preventAdjustment?: boolean, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation with a target location.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • targetLocation: number

      the location that will be the target of the zoom (use case: programmatic zoom)

    • Optional preventAdjustment: boolean

      if true skips the adjustment of the zoom range

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

zoomWithTargetPercentage

  • zoomWithTargetPercentage(factor: number, targetPercentage: number, preventAdjustment?: boolean, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation with a target percentage of the visible duration.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • targetPercentage: number

      the percentage of the visible duration that will be the target of the zoom (use case: programmatic zoom)

    • Optional preventAdjustment: boolean

      if true skips the adjustment of the zoom range

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void

zoomWithTargetTime

  • zoomWithTargetTime(factor: number, targetTime: number, preventAdjustment?: boolean, zoomAnimated?: boolean): void
  • Requests that the timeline performs a zoom operation with a target time.

    since

    1.0

    see

    zoomIn(), zoomOut()

    Parameters

    • factor: number

      the zoom factor (factor < 1 for a zoom in and factor > 1 for a zoom out)

    • targetTime: number

      the point in time that will be the target of the zoom (use case: programmatic zoom)

    • Optional preventAdjustment: boolean

      if true skips the adjustment of the zoom range

    • Default value zoomAnimated: boolean = this._zoomAnimated

      possibility to override isZoomAnimated() for this call only

    Returns void