FlexGanttFX Developer Manual : 4.5 Row

Introduction

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. The default repository is of type IntervalTreeActivityRepository. Activities can be placed on lines within the row. The row delegates this work to a LinesManager. The default manager is of type EqualLinesManager.

Type Arguments & Hierarchy

Three type arguments are needed to define a row. The first one defines the type of the parent row, the second one defines the type of the children rows, the third one defines the type of the activities shown on the row. The following is an example that defines a "building", that is part of a factory. The building has machines in it. In the building row we are showing shifts.

Building.java
public class Building extends Row<Factory, Machine, Shift> {
}

A model like this would allow us to display a hierarchy in the Gant chart that might look like this:

  • Factory
    • Building 1
    • Building 2
    • Building 3
      • Machine A
      • Machine B
      • Machine B
    • Building 4
      • Machine C
      • Machine D

Properties

Each row has a set of properties.

Property Description
BooleanProperty expanded
Controls whether the row will show its children rows or not.
DoubleProperty height
The current height of the row.
DoubleProperty minHeight
The minimum height of the row.
DoubleProperty maxHeight
The maximum height of the row.
ObjectProperty<Layout> layout
The layout used by the row. The default is Gantt Layout.
IntegerProperty lineCount
The number of inner lines to show within the row.
ObjectProperty<LinesManager<A>> linesManager
The lines manager used for controlling the lines, their location, their height, the placement of the activities.
StringProperty name
The name of the row, e.g. "Machine 1", "Building 1".
ReadOnlyObjectProperty<P> parent

The parent row.

This is a read-only property that is managed internally and updated when a row gets added to the list of children of another row.

ObjectProperty<ActivityRepository> repository
The repository used by the row to store the activities.
BooleanProperty showing
A flag used to signal that the row is currently shown in the UI. This information can be used for optimizing lazy loading strategies.
ObjectProperty<Object> userObject
An optional user object. Used to have a bridge to the business model.
ObjectProperty<ZoneId> zoneId
The timezone represented by the row. Each row can be in its own timezone.