FlexGanttFX Developer Manual : 3.1.7 Other Features

Introduction

This page describes several of the smaller and normally less important features of the Gantt chart control.

Fixed cell size

The tree table view and the list view of JavaFX both support a property called fixedCellSize. It can be used to improve the performance of both controls. This is done by setting it to a value other than -1. A value like that informs the controls that each cell will have the same height, which allows for faster algorithms to be used when updating the controls. The GanttChart class also defines this property in order to ensure that the tree table view and the list view used by it use the same cell size. If set the Gantt chart will not use the height property of the rows and will also not allow the user to resize the rows.

Master Timeline

The GanttChart control defines a property called masterTimeLine. This property is used when the Gantt chart is being used in a multi Gantt chart context (e.g. DualGanttChartContainer or MultiGanttChartContainer). In these situations it is the timeline of the top Gantt chart that is the basis for rendering weekends, grid lines, etc. Every Gantt chart still has its own timeline subcontrol but they will all know which one is the master.

This is framework functionality that applications should normally not interfere with.

ScrollBar Type

The GanttChart control supports different types of scrollbars. The type can be set by calling GanttChartBase.setScrollBarType(ScrollBarType). The following types are currently available:

Type Behaviour
NONE The Gantt chart will never offer any scrollbars. Neither for the tree table view nor the graphics area. A Gantt chart like that could only be scrolled via the keyboard, the mouse wheel or a touch input device.
INFINITE The Gantt chart will show a regular scrollbar for the tree table view and a scrollbar called TimelineScrollBar which internally uses a PlusMinusSlider (provided by the ControlsFX project). The slider allows for scrolling at different speeds into the past or into the future. This scrollbar does not require a specified scrolling "horizon" (earliest / latest time to scroll to).
FIXED_HORIZON The Gantt chart will show a regulars scrollbar for the tree table view AND the graphics area. The bounds of the scrollbar are based on the horizon start and end times as defined by the TimelineModel.

ScrollBar Visibility

Another configuration option related to ScrollBars is the boolean property autoHideScrollBars. If set to true the scrollbars for the tree table view (the left-hand side) and the graphics area (the right-hand side) will be placed inside a HiddenSidesPane instance. This container control from ControlsFX can show or hide controls that have been placed on one of its sides. In this case the scrollbars will be placed on the "bottom" side and they will only appear when the user moves the mouse cursor close to the edge.

Position

The position property of the GanttChart class is used to inform the Gantt chart where it is located within a multi Gantt chart context (e.g. DualGanttChartContainer or MultiGanttChartContainer). Possible values are:

Value Description
ONLY
The Gantt chart is the only one. This is the default value and will not change if not used in a multi Gantt chart context.
FIRST
The Gantt chart is shown at the top of the container.
MIDDLE
The Gantt chart is not the first and not the last one. It is also not the only one.
LAST
The Gantt chart is shown at the bottom of the container.

The screenshot below shows three charts in a MultiGanttChartContainer and their position values.

This is framework functionality that applications should normally not interfere with.

Factory Methods

There are several protected factory methods used for creating the subcontrols. These methods can be overriden to create subclasses of these controls.

Method Description
TreeTableView createTreeTable();
Creates the tree table view shown on the left-hand side of the Gantt chart. A typical use case for replacing this table is when you already have a tree table view specialization with advanced filtering or interaction options. You might want to use the same tree table view that your application is already using in other places.
Timeline createTimeline();
Creates the timeline.
GraphicsBase createGraphics();
Creates the graphics view. A use case for replacing the standard one might be that your application adds a couple of nodes to the graphics view. Maybe some kind of overlap on top of the graphics (e.g. a radar).
RowHeader createRowHeader();
Creates the row header column for the tree table view.



Attachments:

position.png (image/png)
timelineScrollBar.png (image/png)