com.dlsc.flexgantt.swing.layer.system
Class LabelLayer

java.lang.Object
  extended by com.dlsc.flexgantt.swing.layer.AbstractLayer
      extended by com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
          extended by 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
Author:
Dirk Lemmermann
See Also:
ILabelPolicy.getLabel(Object, Object, 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
LabelLayer(LayerContainer lc)
          Constructs a new label layer.
 
Method Summary
 int getLabelGap()
          Returns the number of pixels that will be placed between the timeline object and its label.
protected  void paintLayer(java.awt.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, getLayerContainer, getLayerPolicyProvider, getModel, getName, getStartRow, getTimeAt, getTimeline, getTimeLocation, getTimeSpanUsed, getToolTipText, getTreeTable, getTreeTablePolicyProvider, 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(java.awt.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