Background Layer
As its name already indicates the background layer is responsible for drawing the background of the layer container. In many situations this will simply be a rectangle filled with the background color of the layer container itself. If an application also specifies an alternating background color on the layer container then the layer will fill a rectangle with this color in every other row. This will greatly increase the readability of the Gantt chart. The transparency of the alternating background color can be controled by the layer‘s alpha value. For even higher customization the background layer will also accept a texture image that will be drawn as tiles until it fills the entire background. This is a nice feature for creating a certain them (e.g. a soccer scheduling application might show grass in the background). The tree table matches several of these methods so that the left-hand side and the right-hand side can be drawn consistently.
The following image shows a snapshot of the "Textures" demo application. In this demo the user can select a texture from a palette of available textures. The selected texture image gets assigned to the background layer via a call to
void BackgroundLayer.setTexture(Image img);
Relevant API
void LayerContainer.setBackground(Color col)
void LayerContainer.setAlternatingBackground(Color col)
void BackgroundLayer.setTexture(Image img)
void TreeTable.setAlternatingBackground(Color col)
void TreeTable.setTexture(Image img)
void AbstractLayer.setAlpha(float alpha)
