Models
The
information required by a component to render itself is
provided by models. FlexGantt defines several models for
different purposes.
Tree Table Model - used for
the tree table component and an extension of the Swing
tree model. It extends the tree model with methods to
ask for values that can be displayed in the columns of
the tree table.
Column Model - provides the
data needed for creating the columns of the tree table.
The model differentiates between two types of columns:
key columns and value columns. A model contains exactly
one key column and any number of value columns. Any
column added to a column model will be visible. A column
has to be removed from its model to make it disappear.
Gantt Chart Model - a
subclass of the tree table model that provides the data
needed to populate the right-hand side of the Gantt
chart. The right-hand side consists of a container with
many layers (system layers, timeline object layers,
custom layers).
Dateline Model - a model used
by the dateline component to lookup the time for a given
x-coordinate or vice versa. The model also returns the
locations of the vertical grid lines and the time zone
that the dateline shall represent. This time zone is
used to calculate the offset for timeline objects that
are stored on hierarchy nodes that are located in a
different time zone.
Eventline Model - returns
objects that are shown on the eventline underneath the
dateline and above the layer container. The objects all
have in common that they can not be associated with
individual hierarchy nodes but that they have a global
character that makes them apply to all nodes at the same
time.
Calendar Model - a model that
similar to the eventline model returns objects with
global character, except that these objects are usually
calculated on-the-fly based on some rules (not
mandatory). Objects that are returned by the model might
for example represent weekend days. Adding one object
for each weekend day on a time horizon of 100 years
would be a terrible waste of memory. The objects are
being rendered in their own layer, the calendar layer.
Bookmark Model - deals with
the application- and user defined bookmarks. A bookmark
specifies a certain view at the Gantt chart (start time,
granularity, horizon).
Paging Model - if a scheduling
application needs to deal with a large amount of
timeline objects then it often makes sense to divide the
timeline horizon into several pages / time spans. This
way the data gets broken into smaller chunks that the
Gantt chart can deal with more easily. The paging model
manages the individual pages. It can be queried for the
current page, the previous page, the next page, the
first page, and the last page. The user interface
provides a control that can be used to select individual
pages.
