Layer Container
The right-hand side of every Gantt chart is a layer container. This container manages the different types of layers that are supported by the framework: system layers, timeline object layers, and custom layers.
System layers are non-optional
layers that are required by the Gantt chart in order to
work properly. The numer of system layers is fixed. Each
one of these layers implements a small set of features that
the framework guarantees to be available. The TimeNowLayer
for example draws a vertical line at the location of the
current system time. The layer container manages an upper
and a lower stack of system layers. Timeline object layers
and custom layers are placed between these two stacks. The
stacks and the ordering of the system layers within the
stacks are controlled by two methods of the layer
container:
protected List<Class<? extends AbstractSystemLayer>> getTypesOfUpperSystemLayers();
protected List<Class<? extends AbstractSystemLayer>> getTypesOfLowerSystemLayers();
An application needs to subclass LayerContainer and override these methods in order to change the stacks and their ordering.
Timeline Object Layers
Timeline object layers are variable in number. How many of them are created depends on the Gantt chart model. An application is free to add any number of timeline object layers to the layer container. Timeline object layers are a grouping mechanism for timeline objects. An application that supports before and after analysis might split its timeline objects into two groups. The first group represents the before situation, while the other group represents the after situation. Putting these objects onto different layers makes it possible to show or hide them as desired. Timeline object layers even support transparency. This way all objects can be shown at the same time even though some of them might overlap each other.
Custom Layers
Custom layers have no predefined purpose at all. They are an extension point that application developers can use to add arbitrary visual information to the Gantt chart. A custom layer might for example draw a rectangle around timeline objects that are somehow related to each other.
Layer Container Policies
The layer container owns a policy provider that will be used for storing and retrieving policies based on policy interfaces. Many layers use these policies to control their behaviour and / or appearance. The popup layer for example looks up a policy of type IPopupPolicy and then looks up a popup value object for a given timeline object. The type of this value object is used to lookup a popup renderer that will ultimately perform the rendering of the popup window.
