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

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.EventlineLayer

public class EventlineLayer
extends AbstractSystemLayer

The eventline layer picks up eventline activities and events from the eventline (model) and visualizes them in the layer container. Activities are shown as filled rectangles and events as vertical lines, both of them reaching from the top to the bottom of the layer container. Different strokes and paints can be specified for different eventline objects.

Since:
1.0
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
EventlineLayer(LayerContainer lc)
          Constructs a new eventline layer.
 
Method Summary
 java.awt.Paint getPaint(java.lang.Class cl)
          Returns the paint object that will be used for drawing eventline objects of the given type.
 java.awt.Stroke getStroke(java.lang.Class cl)
          Returns the paint object that will be used for drawing eventline objects of the given type.
 boolean isPaintingActivities()
          Determines whether the eventline layer will draw the activities defined in the IEventlineModel of the Eventline.
 boolean isPaintingEvents()
          Determines whether the eventline layer will draw the events defined in the IEventlineModel of the Eventline.
protected  void paintLayer(java.awt.Graphics g)
           
 void setPaint(java.lang.Class eventlineObjectType, java.awt.Paint paint)
          Sets the paint object that will be used for drawing eventline objects of the given type.
 void setPaintingActivities(boolean paint)
          Specifies whether the eventline layer will draw the activities defined in the IEventlineModel of the Eventline.
 void setPaintingEvents(boolean paint)
          Specifies whether the eventline layer will draw the events defined in the IEventlineModel of the Eventline.
 void setStroke(java.lang.Class eventlineObjectType, java.awt.Stroke paint)
          Sets the stroke object that will be used for drawing eventline objects of the given type.
 
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

EventlineLayer

public EventlineLayer(LayerContainer lc)
Constructs a new eventline layer.

Parameters:
lc - the layer container to which the layer belongs.
Since:
1.0
Method Detail

paintLayer

protected void paintLayer(java.awt.Graphics g)
Overrides:
paintLayer in class AbstractLayer

setPaint

public void setPaint(java.lang.Class eventlineObjectType,
                     java.awt.Paint paint)
Sets the paint object that will be used for drawing eventline objects of the given type.

Parameters:
eventlineObjectType - the object type of the calendar entries
paint - the paint used for drawing the calendar entries (can be as simple as Color.GREEN)
Since:
1.0

getPaint

public java.awt.Paint getPaint(java.lang.Class cl)
Returns the paint object that will be used for drawing eventline objects of the given type.

Parameters:
cl - the eventline object type
Returns:
a paint object that will be used for drawing eventline objects of the given type
Since:
1.0

setStroke

public void setStroke(java.lang.Class eventlineObjectType,
                      java.awt.Stroke paint)
Sets the stroke object that will be used for drawing eventline objects of the given type.

Parameters:
eventlineObjectType - the object type of the eventline objects
paint - the paint used for drawing the eventline objects (can be as simple as Color.GREEN)
Since:
1.0

getStroke

public java.awt.Stroke getStroke(java.lang.Class cl)
Returns the paint object that will be used for drawing eventline objects of the given type.

Parameters:
cl - the eventline object type
Returns:
a paint object that will be used for drawing eventline objects of the given type
Since:
1.0

isPaintingActivities

public boolean isPaintingActivities()
Determines whether the eventline layer will draw the activities defined in the IEventlineModel of the Eventline.

Returns:
TRUE if the layer paints eventline activities
Since:
1.0

setPaintingActivities

public void setPaintingActivities(boolean paint)
Specifies whether the eventline layer will draw the activities defined in the IEventlineModel of the Eventline.

Parameters:
paint - if TRUE the layer paints eventline activities
Since:
1.0

isPaintingEvents

public boolean isPaintingEvents()
Determines whether the eventline layer will draw the events defined in the IEventlineModel of the Eventline.

Returns:
TRUE if the layer paints eventline events
Since:
1.0

setPaintingEvents

public void setPaintingEvents(boolean paint)
Specifies whether the eventline layer will draw the events defined in the IEventlineModel of the Eventline.

Parameters:
paint - if TRUE the layer paints eventline events
Since:
1.0