Options
All
  • Public
  • Public/Protected
  • All
Menu

A row object is used to store the activities found on a row of the Gantt chart. These activities are not stored directly on the row but in an activity repository (see getRepository()). The default repository is of type IntervalTreeActivityRepository and can be replaced by calling setRepository(ActivityRepository). Activities can be placed on lines within the row. The row delegates this work to a LinesManager``. The default manager is of typeEqualLinesManager. To replace the manager simply callsetLinesManager(LinesManager)```.

since

1.0

Type parameters

  • P: Row

    the type of the parent row (example: row is of type "Building" and parent type is "Factory" to express that the factory consists of several buildings).

  • C: Row

    the type of the children rows (example: row is of type "Building" and children type is "Machine" to express that the building houses several machines).

  • A: Activity

    the type of the activities shown in this row (example: row is of type "Building", activities are "ProductionOrders" that are executed in this building).

  • O

    the type of the row-specific user object (this type is optional and is set to any by default).

Hierarchy

  • Row

Index

Constructors

constructor

  • new Row(name: string): Row
  • Constructs a new row with an IntervalTreeActivityRepository and an EqualLinesManager and the given name.

    since

    1.0

    Parameters

    • name: string

      the name of the row (e.g. "Building 1")

    Returns Row

Properties

Static DEFAULT_ROW_HEIGHT

DEFAULT_ROW_HEIGHT: number = 24

Methods

addActivity

  • addActivity(layer: Layer, activity: A): void
  • Adds the given activity for the given layer to this row. This method delegates to MutableActivityRepository.addActivity(ActivityRef).

    since

    1.0

    see

    MutableActivityRepository.addActivity(ActivityRef)

    Parameters

    • layer: Layer

      the layer where the activity will be displayed

    • activity: A

      the activity that will be added

    Returns void

clearActivities

  • clearActivities(layer?: Layer): void
  • Removes all activities on the given layer from the row.

    since

    1.0

    see

    MutableActivityRepository.clearActivities(Layer)

    Parameters

    • Optional layer: Layer

      the layer from which to remove all activities

    Returns void

getCalendars

  • Returns a list of calendars attached to this row. Calendars directly attached to a row can be used to visualize row-specific information, for example "resource availability".

    since

    1.0

    Returns Calendar[]

    a list of row-specific calendars

getChildren

  • getChildren(): C[]
  • Returns the list of children of this row.

    since

    1.0

    Returns C[]

    the children

getEarliestTimeUsed

  • getEarliestTimeUsed(): number
  • Returns the earliest time used by the row. This is a convenience method delegating to ActivityRepository.getEarliestTimeUsed().

    since

    1.0

    see

    getLatestTimeUsed()

    Returns number

    the earliest time used by the row / by the activities of the row / earliest start time of any activity on the row

getHeight

  • getHeight(): number
  • Returns the the height of the row.

    since

    1.0

    Returns number

    the height of the row.

getLatestTimeUsed

  • getLatestTimeUsed(): number
  • Returns the latest time used by the row. This is a convenience method delegating to ActivityRepository.getLatestTimeUsed().

    since

    1.0

    see

    getEarliestTimeUsed()

    Returns number

    the latest time used by the row / by the activities of the row / earliest start time of any activity on the row

getLayout

  • Returns the layout of the row.

    since

    1.0

    Returns Layout

    the layout of the row

getLineCount

  • getLineCount(): number
  • Gets the number of inner lines shown by the row.

    since

    1.0

    Returns number

    • the line count of the row

getLineHeight

  • getLineHeight(lineIndex: number): number
  • Returns the height of the given inner line. The value returned is usually between 0 and getHeight().

    since

    1.0

    Parameters

    • lineIndex: number

      the index of the line for which to return a height

    Returns number

    the height of the line

getLineIndex

  • getLineIndex(activity: A): number
  • Returns the line index for the given activity. This is a convenience method delegating to LinesManager.getLineIndex(Activity).

    since

    1.0

    Parameters

    • activity: A

      the activity for which to return a line index

    Returns number

    the line index for the given activity

getLineLayout

  • getLineLayout(lineIndex: number): Layout
  • Returns a line-specific layout for the given line.

    since

    1.0

    Parameters

    • lineIndex: number

      the index of the line

    Returns Layout

    the line layout

getLineLocation

  • getLineLocation(lineIndex: number): number
  • Returns the location of the given inner line. The value returned is usually between 0 and getHeight().

    since

    1.0

    Parameters

    • lineIndex: number

      the index of the line for which to return a location

    Returns number

    the line location y-coordinate

getLinesManager

  • Returns the lines manager for this row.

    since

    1.0

    Returns LinesManager<A>

    the lines manager for this row

getMaxHeight

  • getMaxHeight(): number
  • Returns the maximum height of the row.

    since

    1.0

    Returns number

    the maximum height of the row

getMinHeight

  • getMinHeight(): number
  • Returns the minimum height of the row.

    since

    1.0

    Returns number

    the minimum height of the row

getName

  • getName(): string
  • Returns the name of the row.

    since

    1.0

    Returns string

    the name of the row

getParent

  • getParent(): P
  • The parent of this row. Each row can have only one parent. If a row has no parent, it represents a root in the tree model.

    since

    1.0

    Returns P

    the parent of this row, or null if the row has no parent.

getPath

  • getPath(): Row[]
  • Returns the path to this row, for example [ROOT, Parent1, Parent2, this].

    since

    1.0

    Returns Row[]

    the path to this row

getRepository

  • Returns the activity repository of the row.

    since

    1.0

    Returns ActivityRepository<A>

    the activity repository of the row

getUserObject

  • getUserObject(): O
  • Returns the user object of the row.

    since

    1.0

    Returns O

    the user object of the row

getZoneId

  • getZoneId(): ZoneId
  • Returns the zone ID of this row.

    since

    1.0

    Returns ZoneId

    the zone ID of this row

isExpanded

  • isExpanded(): boolean
  • Returns true if the row is expanded.

    since

    1.0

    Returns boolean

    true if the row is expanded

isLeaf

  • isLeaf(): boolean
  • A row is a leaf in the tree table view on the left-hand side of the Gantt chart if it has no children. This method may of course be overridden by subclasses to support alternate means of defining how a row may be a leaf, but the general premise is the same: a leaf can not be expanded by the user, and as such will not show a disclosure node or respond to expansion requests.

    since

    1.0

    Returns boolean

    true if the row is a leaf (has no children rows)

removeActivity

  • removeActivity(layer: Layer, activity: A): void
  • Removes the given activity from the given layer from this row.

    since

    1.0

    see

    MutableActivityRepository.removeActivity(ActivityRef)

    Parameters

    • layer: Layer

      the layer from which to remove the activity

    • activity: A

      the activity to remove

    Returns void

setExpanded

  • setExpanded(expanded: boolean): void
  • Set if the row is expanded.

    since

    1.0

    Parameters

    • expanded: boolean

      expanded value.

    Returns void

setHeight

  • setHeight(value: number): void
  • Sets the height of the row.

    since

    1.0

    Parameters

    • value: number

      the new height of the row

    Returns void

setLayout

  • setLayout(value: Layout): void
  • Sets the row layout.

    since

    1.0

    Parameters

    • value: Layout

      the new row layout

    Returns void

setLineCount

  • setLineCount(count: number): void
  • Sets the number of inner lines shown by the row.

    since

    1.0

    Parameters

    • count: number

      the new line count for the row

    Returns void

setLinesManager

  • Sets the lines manager for this row.

    since

    1.0

    Parameters

    Returns void

setMaxHeight

  • setMaxHeight(maxHeight: number): void
  • Sets the maximum height of the row.

    since

    1.0

    Parameters

    • maxHeight: number

      the maximum height of the row

    Returns void

setMinHeight

  • setMinHeight(minHeight: number): void
  • Sets the minimum height.

    since

    1.0

    Parameters

    • minHeight: number

      the new minimum height

    Returns void

setName

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

    since

    1.0

    Parameters

    • name: string

      the new name of the row

    Returns void

setParent

  • setParent(parent: P): void
  • Sets the parent of this row. Each row can have only one parent. If a row has no parent, it represents a root in the tree model.

    since

    1.0

    Parameters

    • parent: P

      the parent of this row.

    Returns void

setRepository

  • Sets the repository of the row.

    since

    1.0

    Parameters

    Returns void

setUserObject

  • setUserObject(obj: O): void
  • Sets the user object of the row.

    since

    1.0

    Parameters

    • obj: O

      the user object of the row

    Returns void

setZoneId

  • setZoneId(zoneId: ZoneId): void
  • Sets the value of the zoneIdProperty().

    since

    1.0

    Parameters

    • zoneId: ZoneId

      the new zone ID for this row

    Returns void