Options
All
  • Public
  • Public/Protected
  • All
Menu

The simple specialization of GraphicsBase.

since

1.0

Type parameters

  • R: Row

    the type of the rows displayed inside the graphics

Hierarchy

Index

Constructors

Methods

Constructors

constructor

  • Constructs a new graphics view and initializes the following:

    • Virtual grid settings (1, 5, 10, 15, 30, 60 Minutes).
    • Activity renderers for several of the default model classes.
    • Edit mode callbacks for several of the default model classes.
    • Activity editing callbacks.
    • Background and foreground layers.
    • Calendars (e. g. weekend calendar).
    since

    1.0

    Returns SimpleGraphics

Methods

addRows

  • addRows(...rowsToAdd: R[]): void
  • Parameters

    • Rest ...rowsToAdd: R[]

    Returns void

defaultActivityEditModeAction

defaultActivityEditModeCallback

defaultChartActivityEditModeAction

defaultChartActivityEditModeCallback

defaultHighLowChartActivityEditModeAction

defaultHighLowChartActivityEditModeCallback

emitActivityEvent

emitLassoEvent

getAboveCanvasElement

  • getAboveCanvasElement(): HTMLCanvasElement

getAboveSystemLayers

getActionContext

  • getActionContext(): ActionContext

getActivityEditingCallback

getActivityEventsObs

getActivityFilter

  • getActivityFilter(): function
  • Return the filter function, which determines if an activity will be rendered or not. An activity will be drawn if the function returns "true".

    since

    1.2

    Returns function

    the predicate / the filter function for activities

getActivityRenderer

getActivityState

getAllSortedRowContainers

  • getAllSortedRowContainers(): RowContainer<R>[]

getBackgroundSystemLayers

getBelowCanvasElement

  • getBelowCanvasElement(): HTMLCanvasElement

getBelowSystemLayers

getCalendars

  • Returns the list of calendars that are registered with the graphics view. Calendars are used to render static information in the background of each row. One example are the days that are considered weekend days (e.g. saturday and sunday). They will be drawn with a gray background.

    since

    1.0

    Returns Calendar<CalendarActivity>[]

    the calendars drawn by the graphics view

getDragAndDropFeedback

getDragAndDropInfo

getDropLayerProvider

  • getDropLayerProvider(): function
  • Returns a callback that will return the layer on which a dragged activity will be placed once the drop operation has finished.

    since

    1.1

    Returns function

getEarliestTimeUsed

  • getEarliestTimeUsed(): number | undefined
  • Calculates and returns the earliest time used by all rows in the model.

    since

    1.0

    see

    Row.getEarliestTimeUsed(), ActivityRepository.getEarliestTimeUsed()

    Returns number | undefined

    the earliest time used by the graphics view

getEditMode

  • Returns the currently active editing mode, e.g. "changing start time", "changing end time", "dragging horizontally", "dragging vertically", etc... The property is read-only as it can not be set from the outside. It is being updated when the user moves the pointer cursor on top of an activity. The edit mode depends on the location of the cursor (left or right edge, center). See setActivityEditingCallback(Class, Callback) for mapping pointer events to editing operations.

    since

    1.0

    Returns EditModeEnum

    the currently active edit mode

getEditModeCallback

getEditedActivity

getEventLineModelChangeObs

getExtraPixels

  • getExtraPixels(): number
  • Instruct the graphics view to query the activity repositories also for activities that are ending right in front of the visible area or starting right after the visible area. Querying the extra pixels is important for activities that have negative bounds (e.g. milestones: they would only become visible if their time is inside the visible area, but their diamond shape might actually already reach into the area).

    since

    1.0

    Returns number

    the number of extra pixels added to the visible area

getFadeInOutVisibilityChangesDuration

  • getFadeInOutVisibilityChangesDuration(): number

getFixedCellSize

  • getFixedCellSize(): number
  • Returns fixed cell size for controls that are based on the virtual flow control. This value is not used by all subclasses of this class. Using a fixed cell size can result in a performance gain.

    since

    1.0

    Returns number

    the fixed cell size (default is -1)

getForegroundSystemLayers

getHighlightedActivities

  • Returns a set that is used to store the currently highighted activities. An activity added to this set will start blinking and draw the attention of the user to it.

    since

    1.0

    see

    setHighlightDelay(long)

    Returns Set<ActivityRef>

    the set of highlighted activities

getHighlightedRows

  • getHighlightedRows(): Set<Row>
  • Returns a set that is used to store the currently highlighted rows. A row added to this set will start blinking and draw the attention of the user to it.

    since

    1.0

    see

    setHighlightDelay(long)

    Returns Set<Row>

    the set of highlighted rows

getHoverActivity

getHoverLayout

getHoverRow

  • getHoverRow(): R

getLasso

getLassoEventsObs

getLassoManager

  • getLassoManager(): LassoManager<R>

getLassoSelectionBehaviour

  • A property used to store the currently used lasso selection behaviour. This value of this property controls when an activity is actually considered selected by the lasso: does it need to be completely inside the lasso bounds or is it enough when it gets touched by the lasso?

    since

    1.0

    Returns LassoSelectionBehaviourEnum

    the currently used lasso selection behaviour

getLatestTimeUsed

  • getLatestTimeUsed(): number | undefined
  • Calculates and returns the latest time used by all rows in the model.

    since

    1.0

    see

    Row.getLatestTimeUsed(), ActivityRepository.getLatestTimeUsed()

    Returns number | undefined

    the latest time used by the graphics view

getLayers

  • Returns the list that is used to store all layers of the model.

    since

    1.0

    Returns Layer[]

    a list of layers

getLocation

  • getLocation(time: number): number
  • Returns the x coordinate for the given time.

    since

    1.0

    see

    getTimeAt(double), TimelineModel.calculateLocationForTime(Instant)

    Parameters

    • time: number

      the time for which to lookup a coordinate

    Returns number

    the x coordinate for the given time

getMaxGridLevel

  • getMaxGridLevel(): number
  • A property used to store the number of grid levels that the user wants to see in the graphics view. The value of this property must be between 1 and 5. The grid level depends on the number of scales shown by the dateline (see Dateline.getScaleResolutions()). If the dateline is currently showing two scales (e.g. days and weeks) then the graphics view and the GridLinesLayer can also display two different grid lines, for example a light gray one for days and a dark gray one for weeks.

    since

    1.0

    Returns number

getMaxPixelRatio

  • getMaxPixelRatio(): number

getMaxPixelRatioObs

  • getMaxPixelRatioObs(): Observable<number>

getMediumPixelRatio

  • getMediumPixelRatio(): number

getPixelRatio

  • getPixelRatio(): number

getPixelRatioObs

  • getPixelRatioObs(): Observable<number>

getPressedActivity

getRowContainers

  • getRowContainers(): Map<number, RowContainer<R>>

getRowDragAndDropCallback

  • Returns a callback that will be invoked when the user drags an activity over a row of the given type. The callback implementation then determines if a drop would be accepted in the given row.

    since

    1.1

    Parameters

    Returns RowDragAndDropCallback

getRowHeaderFactory

  • getRowHeaderFactory(): function
  • A property used to store a callback for creating the header placed to the left of each row in the graphics view.

    since

    1.2

    Returns function

    the row header callback property

getRowHeadersWidth

  • getRowHeadersWidth(): number
  • Width of the so-called "row headers". These are placed in front of every row inside the graphics area. For proper layout the width of all row headers has to be the same.

    since

    1.2

    Returns number

    the width in pixels used for all row headers

getRows

  • getRows(): R[]
  • Returns the list that is used to store all rows of the model.

    since

    1.0

    Returns R[]

    a list of rows

getSelectedActivities

getSelectionMode

  • A property used to store the currently supported selection mode. The graphics view supports single, multiple, and none.

    since

    1.0

    Returns SelectionMode

    the currently used selection mode (single, all, none)

getTimeAt

  • getTimeAt(location: number): number
  • Returns the time at the given location.

    since

    1.0

    Parameters

    • location: number

      the x-coordinate for which to retrieve the time

    Returns number

    the time at the given location

getTimeline

  • Returns the timeline control above the graphics

    since

    1.0

    Returns Timeline

    the timeline control above the graphics

getTimelineModelChangeObs

getVirtualGrid

getVirtualGrids

getZoomTime

  • getZoomTime(): number

isAnimateRowEditor

  • isAnimateRowEditor(): boolean

isAutoGridEnabled

  • isAutoGridEnabled(): boolean
  • A property used to enable / disable the autogrid mode. The autogrid mode will cause activities to snap to times based on the currently shown granularity of the dateline. If the dateline is showing "days" then the activities will snap to the beginning and / or end of a day. If the dateline is showing hours then the activities will snap to full hours.

    since

    1.0

    Returns boolean

    true if the autogrid mode is enabled

isAutoMarkedTimeInterval

  • isAutoMarkedTimeInterval(): boolean
  • Controls whether the marked time interval property of the Eventline will be automatically set when the user performs certain editing operations (e.g. move an activity horizontally). The default is "true".

    Returns boolean

    true if the marked time interval gets updated automatically

isAutomaticRedraw

  • isAutomaticRedraw(): boolean
  • Returns if the graphics will be redrawn whenever the data in any of the activity repository changes. The default value is true. Applications can use this property to disable the redrawing when they know that they have to add a lot of activities but do not want the chart to perform a lot of redraws. The graphics will be redrawn right away when the value of this property changes from true to false or vice versa.

    since

    1.0

    Returns boolean

    true if automatic redrawing will be performed (default)

isFadeInOutVisibilityChanges

  • isFadeInOutVisibilityChanges(): boolean

isGridEnabled

  • isGridEnabled(): boolean
  • Returns true if any kind of grid support is enabled.

    since

    1.0

    Returns boolean

    true if any kind of grid support is enabled

isHighlighted

  • isHighlighted(): boolean
  • Returns a flag value used to toggle the highlighting effect

    since

    1.0

    Returns boolean

    a flag value used to toggle the highlighting effect

isHorizontalDragEnabled

  • isHorizontalDragEnabled(): boolean
  • Determines whether the user can perform a horizontal drag with a pointer drag.

    since

    1.0

    Returns boolean

    true if the user can perform horizontal scrolling

isLassoActive

  • isLassoActive(): boolean
  • Returns whether the lasso selection tool is currently in use or not.

    since

    1.0

    Returns boolean

    true if the user is currently performing a lasso selection operation.

isLassoEnabled

  • isLassoEnabled(): boolean
  • Returns whether the user can use the lasso for selecting multiple activities at once.

    since

    1.0

    Returns boolean

    true if the user can use the lasso

isLassoSnapsToGrid

  • isLassoSnapsToGrid(): boolean
  • Returns whether the lasso selection tool is using the currently active grid settings.

    since

    1.0

    Returns boolean

    true if the lasso is obeying the current virtual grid settings

isShowAgendaLinesLayer

  • isShowAgendaLinesLayer(): boolean

isShowCalendarLayer

  • isShowCalendarLayer(): boolean

isShowChartLinesLayer

  • isShowChartLinesLayer(): boolean

isShowGridLineLayer

  • isShowGridLineLayer(): boolean

isShowHorizontalCursor

  • isShowHorizontalCursor(): boolean
  • A property used to control whether a horizontal cursor line will be shown by the graphics view. The line will always follow the location of the pointer cursor.

    since

    1.0

    Returns boolean

    true if the cursor will be shown

isShowHoverTimeIntervalLayer

  • isShowHoverTimeIntervalLayer(): boolean

isShowInnerLinesLayer

  • isShowInnerLinesLayer(): boolean

isShowLayoutLayer

  • isShowLayoutLayer(): boolean

isShowMarkedTimeInterval

  • isShowMarkedTimeInterval(): boolean
  • A property used to control whether vertical lines will be shown for a marked time interval (e.g. while dragging the marked interval will display the new location of the dragged activity).

    since

    1.0

    Returns boolean

    true if the marker lines will be shown

isShowNowLineLayer

  • isShowNowLineLayer(): boolean

isShowRowHeaders

  • isShowRowHeaders(): boolean
  • Returns if the row headers will be shown to the user or not.

    since

    1.2

    Returns boolean

    true if the row headers will be visible

isShowRowLayer

  • isShowRowLayer(): boolean

isShowScaleLayer

  • isShowScaleLayer(): boolean

isShowSelectedTimeIntervalsLayer

  • isShowSelectedTimeIntervalsLayer(): boolean

isShowVerticalCursor

  • isShowVerticalCursor(): boolean
  • A property used to control whether a vertical cursor line will be shown by the graphics view. The line will always follow the location of the pointer cursor.

    since

    1.0

    Returns boolean

    true if the cursor will be shown

isShowZoneId

  • isShowZoneId(): boolean

isShowZoomTimeIntervalLayer

  • isShowZoomTimeIntervalLayer(): boolean

onSelectionModeChange

  • onSelectionModeChange(): void

onToggleGrid

  • onToggleGrid(gridName: string): void
  • Parameters

    • gridName: string

    Returns void

preventDragContentToScrollForPointerDownEvent

  • preventDragContentToScrollForPointerDownEvent(pointerEvent: PointerEvent | undefined): boolean

redraw

  • redraw(): void
  • Returns void

redrawIfNecessary

  • redrawIfNecessary(): void

requestToRedrawAll

  • requestToRedrawAll(): void

requestToRedrawBelowAbove

  • requestToRedrawBelowAbove(): void

requestToRedrawCanvas

  • requestToRedrawCanvas(...rowRowDrawingEngines: RowDrawingEngine[]): void
  • Parameters

    • Rest ...rowRowDrawingEngines: RowDrawingEngine[]

    Returns void

requestToRedrawRow

  • requestToRedrawRow(row: Row): void

setAboveCanvasElement

  • setAboveCanvasElement(aboveCanvasElement: HTMLCanvasElement): void
  • Parameters

    • aboveCanvasElement: HTMLCanvasElement

    Returns void

setActionContext

  • setActionContext(actionContext: ActionContext): void
  • Parameters

    • actionContext: ActionContext

    Returns void

setActivityEditingCallback

  • Registers a callback used to determine if a given editing operation can be used for a given activity.

    since

    1.0

    Parameters

    Returns void

setActivityFilter

  • setActivityFilter(activityFilter: function): void
  • Sets filter function, which determines if an activity will be rendered or not. An activity will be drawn if the function returns "true".

    since

    1.2

    Parameters

    • activityFilter: function

      the filter function

    Returns void

setActivityRenderer

setAnimateRowEditor

  • setAnimateRowEditor(value: boolean): void

setAutoGridEnabled

  • setAutoGridEnabled(auto: boolean): void
  • Sets if true the autogrid mode is enabled.

    since

    1.0

    Parameters

    • auto: boolean

      if true the autogrid mode is enabled

    Returns void

setAutoMarkedTimeInterval

  • setAutoMarkedTimeInterval(auto: boolean): void
  • Sets the value of autoMarkedTimeIntervalProperty().

    Parameters

    • auto: boolean

      if true the marked time interval will be updated automatically

    Returns void

setAutomaticRedraw

  • setAutomaticRedraw(automatic: boolean): void
  • Sets the graphics redraw after every repository change event.

    since

    1.0

    Parameters

    • automatic: boolean

      true if then the graphics redraw after every repository change event

    Returns void

setBelowCanvasElement

  • setBelowCanvasElement(belowCanvasElement: HTMLCanvasElement): void
  • Parameters

    • belowCanvasElement: HTMLCanvasElement

    Returns void

setCursor

  • setCursor(cursor: Cursor): void
  • Parameters

    • cursor: Cursor

    Returns void

setDragAndDropFeedback

setDragAndDropInfo

setDragContentToScrollDirective

  • setDragContentToScrollDirective(dragContentToScrollDirective: DragContentToScrollDirective): void

setDropLayerProviderCallback

  • setDropLayerProviderCallback(value: function): void

setEditModeCallback

setEditedActivity

setExtraPixels

  • setExtraPixels(pixel: number): void
  • Sets the number of extra pixels added to the visible area

    since

    1.0

    Parameters

    • pixel: number

      the number of extra pixels added to the visible area

    Returns void

setFadeInOutVisibilityChangesDuration

  • setFadeInOutVisibilityChangesDuration(value: number): void

setFixedCellSize

  • setFixedCellSize(size: number): void
  • Sets the fixed cell size.

    since

    1.0

    Parameters

    • size: number

      the fixed cell size, -1 to disable fixed cell size

    Returns void

setHorizontalDragEnabled

  • setHorizontalDragEnabled(enabled: boolean): void
  • Sets if the user can perform horizontal scrolling.

    Parameters

    • enabled: boolean

      if true the user can perform horizontal scrolling

    Returns void

setHoverActivity

setHoverLayout

  • setHoverLayout(value: Layout): void

setHoverRow

  • setHoverRow(value: R): void
  • Parameters

    • value: R

    Returns void

setLasso

setLassoEnabled

  • setLassoEnabled(enabled: boolean): void
  • Sets the value of lassoEnabledProperty().

    since

    1.0

    Parameters

    • enabled: boolean

      if true the lasso will be usable by the user

    Returns void

setLassoSelectionBehaviour

setLassoSnapsToGrid

  • setLassoSnapsToGrid(snaps: boolean): void
  • Sets whether the lasso selection tool is using the currently active grid settings.

    since

    1.0

    Parameters

    • snaps: boolean

      if true the lasso will obey the grid

    Returns void

setMaxGridLevel

  • setMaxGridLevel(max: number): void
  • Sets the maximum number of grid levels.

    since

    1.0

    Parameters

    • max: number

      the maximum number of grid levels, a value between 1 and 5

    Returns void

setMaxPixelRatio

  • setMaxPixelRatio(value: number): void

setPixelRatio

  • setPixelRatio(value: number): void
  • Parameters

    • value: number

    Returns void

setPressedActivity

setRowDragAndDropCallback

  • Sets a callback that will be invoked when the user drags an activity over a row of the given type. The callback implementation then determines if a drop would be accepted in the given row.

    since

    1.1

    Parameters

    Returns void

setRowHeaderFactory

  • setRowHeaderFactory(factory: function): void

setRowHeadersWidth

  • setRowHeadersWidth(value: number): void
  • Width of the so-called "row headers". These are placed in front of every row inside the graphics area. For proper layout the width of all row headers has to be the same.

    since

    1.2

    Parameters

    • value: number

    Returns void

setRows

  • setRows(rows: R[]): void
  • Sets the value of the rowsProperty().

    since

    1.0

    Parameters

    • rows: R[]

      the new rows to display

    Returns void

setSadeInOutVisibilityChanges

  • setSadeInOutVisibilityChanges(value: boolean): void

setSelectionMode

setShowAgendaLinesLayer

  • setShowAgendaLinesLayer(value: boolean): void

setShowCalendarLayer

  • setShowCalendarLayer(value: boolean): void

setShowChartLinesLayer

  • setShowChartLinesLayer(value: boolean): void

setShowGridLineLayer

  • setShowGridLineLayer(value: boolean): void

setShowHorizontalCursor

  • setShowHorizontalCursor(show: boolean): void
  • Sets if true a horizontal cursor line will be shown.

    since

    1.0

    Parameters

    • show: boolean

      if true a horizontal cursor line will be shown

    Returns void

setShowHoverTimeIntervalLayer

  • setShowHoverTimeIntervalLayer(value: boolean): void

setShowInnerLinesLayer

  • setShowInnerLinesLayer(value: boolean): void

setShowLayoutLayer

  • setShowLayoutLayer(value: boolean): void

setShowMarkedTimeInterval

  • setShowMarkedTimeInterval(show: boolean): void
  • Sets if the marker lines will be shown.

    since

    1.0

    Parameters

    • show: boolean

      if true marker lines will be drawn for the currently marked time interval

    Returns void

setShowNowLineLayer

  • setShowNowLineLayer(value: boolean): void

setShowRowHeaders

  • setShowRowHeaders(value: boolean): void
  • Sets if teh row headers will be shown to the user or not.

    since

    1.2

    Parameters

    • value: boolean

    Returns void

setShowRowLayer

  • setShowRowLayer(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

setShowScaleLayer

  • setShowScaleLayer(value: boolean): void

setShowSelectedTimeIntervalsLayer

  • setShowSelectedTimeIntervalsLayer(value: boolean): void

setShowVerticalCursor

  • setShowVerticalCursor(show: boolean): void
  • Sets if the vertical cursor will be shown

    since

    1.0

    Parameters

    • show: boolean

      if true a vertical cursor line will be shown

    Returns void

setShowZoneId

  • setShowZoneId(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

setShowZoomTimeIntervalLayer

  • setShowZoomTimeIntervalLayer(value: boolean): void

setTimeline

  • Sets the timeline control above the graphics.

    since

    1.0

    Parameters

    • timeline: Timeline

      the timeline control above the graphics

    Returns void

setVirtualGrid

setVirtualGrids

setZoomTime

  • setZoomTime(value: number): void
  • Parameters

    • value: number

    Returns void

showAllActivities

  • showAllActivities(): void
  • Makes the Timeline show a time range starting with the earliest time used and ending with the latest time used by all currently loaded rows.

    since

    1.0

    see

    Timeline.showRange(Instant, Instant)```, ```getLatestTimeUsed()```, ```getEarliestTimeUsed()```,ActivityRepository.getEarliestTimeUsed(),ActivityRepository.getLatestTimeUsed()```

    Returns void

showEarliestActivities

  • showEarliestActivities(): void
  • Makes the Timeline start with the earliest time used by the currently loaded rows.

    since

    1.0

    see

    getEarliestTimeUsed(), Timeline.showTime(Instant, boolean), ActivityRepository.getEarliestTimeUsed()

    Returns void

showLatestActivities

  • showLatestActivities(): void
  • Makes the Timeline show the latest time used by the currently loaded rows.

    since

    1.0

    see

    getLatestTimeUsed(), ``Timeline.showTime(Instant, boolean),ActivityRepository.getLatestTimeUsed()```

    Returns void