com.dlsc.flexgantt.swing.layer.system

## Class BackgroundLayer

- java.lang.Object
- - com.dlsc.flexgantt.swing.layer.AbstractLayer
  - - com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
    - - com.dlsc.flexgantt.swing.layer.system.BackgroundLayer

-     public class BackgroundLayer
      extends AbstractSystemLayer

  The background layer is responsible for drawing the background of each row on the right-hand side of the Gantt chart.
  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann

- - ### Field Summary

    - ### Fields inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `alpha, changeSupport, ganttChart, layerContainer, PROPERTY_ALPHA, PROPERTY_VISIBLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BackgroundLayer(LayerContainer lc)` Constructs a new background layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Image` | `getTexture()` Returns an image that will be used as a texture to fill the background of the layer container.
    `protected void` | `paintLayer(Graphics g)`
    `void` | `setTexture(Image texture)` Sets an image that will be used as a texture to fill the background of the layer container.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer

      `addPropertyChangeListener, getAlpha, getDateline, getEventline, getGanttChart, getHeight, getLayerContainer, getLayerPolicyProvider, getModel, getName, getStartRow, getTimeAt, getTimeline, getTimeLocation, getTimeSpanUsed, getToolTipText, getTreeTable, getTreeTablePolicyProvider, getWidth, isVisible, removePropertyChangeListener, repaint, repaint, repaint, setAlpha, setVisible, tearDown`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### BackgroundLayer

          public BackgroundLayer(LayerContainer lc)

      Constructs a new background layer.
      Parameters:
        `lc` - the parent layer container
      Since:
        1.0

  - ### Method Detail

    - #### paintLayer

          protected void paintLayer(Graphics g)

      Overrides:
        `paintLayer` in class `AbstractLayer`

    - #### getTexture

          public Image getTexture()

      Returns an image that will be used as a texture to fill the background of the layer container.
      Returns:
        the image that will be used for filling the background
      Since:
        1.0
      See Also:
        `setTexture(Image)`

    - #### setTexture

          public void setTexture(Image texture)

      Sets an image that will be used as a texture to fill the background of the layer container. The given image will be repeatedly painted horizontally and vertically until the entire background is covered. Textures should make sure that their edges connect seamlessly. A texture is purely optional. If a texture is not provided the background layer will fill itself with the current background color. Additionally if an alternating background color is specified the layer will use that color for every row with an odd row number (assuming row numbers start with 0).
      Parameters:
        `texture` - the image that will be used for filling the background
      Since:
        1.0
      See Also:
        `getTexture()`

Copyright © 2006–2020 Dirk Lemmermann Software & Consulting. All rights reserved.