Options
All
  • Public
  • Public/Protected
  • All
Menu

An activity reference is used to precisely identify the location of an activity where the location is a combination of row, layer, and the activity itself. As the same activity can be located on multiple rows and or multiple layers at the same time it is often necessary to work with an activity reference instead of only the activity.

since

1.0

Type parameters

  • A: Activity

    the type of the referenced activity

Hierarchy

  • ActivityRef

Index

Constructors

constructor

  • Constructs a new activity reference.

    since

    1.0

    Parameters

    • row: Row<Row, Row, A>

      the row where the activity is shown

    • layer: Layer

      the model layer where the activity is located (optional)

    • activity: A

      the referenced activity

    Returns ActivityRef

Methods

attachToRow

  • attachToRow(): void
  • Attaches the activity to its row.

    since

    1.0

    see

    Row.addActivity(Layer, Activity)

    Returns void

detachFromRow

  • detachFromRow(): void
  • Removes the activity from the row where it is currently shown.

    since

    1.0

    see

    Row.removeActivity(Layer, Activity)

    Returns void

equals

  • Returns true if current activityRef equals to given activityRef; false instead.

    since

    1.0

    Parameters

    • ref: ActivityRef<A>

      the ActivityRef we want to compare

    Returns boolean

    true if current activityRef equals to given activityRef

getActivity

  • getActivity(): A
  • Returns the activity itself.

    Returns A

    the activity

getLayer

  • The layer on which the activity is shown.

    since

    1.0

    Returns Layer

    the layer that is displaying the activity

getLineIndex

  • getLineIndex(): number
  • The line index of the activity. This is a convenience method delegating to Row.getLineIndex(Activity) which then delegates to ```LinesManager.getLineIndex(Activity)``.

    since

    1.0

    Returns number

    the line index of the activity

getRow

  • Returns the row where the activity is located.

    since

    1.0

    Returns Row<Row, Row, A>

    the row where the activity is located