com.dlsc.flexgantt.swing.layer.system

## Class LabelLayer

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

-     public class LabelLayer
      extends AbstractSystemLayer

  A layer that is specialized on drawing labels next to timeline objects. The layer queries the labels from the `ILabelPolicy`.
  Since:
    1.0
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    `ILabelPolicy.getLabel(TimelineObjectPath, IGanttChartModel, LabelType)`, `ITimelineObject.getLabel(LabelType)`

- - ### 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
    `LabelLayer(LayerContainer lc)` Constructs a new label layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getLabelGap()` Returns the number of pixels that will be placed between the timeline object and its label.
    `protected void` | `paintLayer(Graphics g)`
    `void` | `setLabelGap(int gap)` Specifies the number of pixels that will be placed between the timeline object and its label.

    - ### 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

    - #### LabelLayer

          public LabelLayer(LayerContainer lc)

      Constructs a new label layer.
      Parameters:
        `lc` - the layer container that is the parent of the layer
      Since:
        1.0

  - ### Method Detail

    - #### paintLayer

          protected void paintLayer(Graphics g)

      Overrides:
        `paintLayer` in class `AbstractLayer`

    - #### getLabelGap

          public int getLabelGap()

      Returns the number of pixels that will be placed between the timeline object and its label.
      Returns:
        the pixel gap between the timeline object and the label
      Since:
        1.0

    - #### setLabelGap

          public void setLabelGap(int gap)

      Specifies the number of pixels that will be placed between the timeline object and its label.
      Parameters:
        `gap` - the pixel gap between the timeline object and the label
      Since:
        1.0

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