com.dlsc.flexgantt.swing.layer.system

## Class EventlineLayer

- java.lang.Object
- - com.dlsc.flexgantt.swing.layer.AbstractLayer
  - - com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
    - - 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
  Version:
    $Revision: 1.11 $
  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
    `EventlineLayer(LayerContainer lc)` Constructs a new eventline layer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Paint` | `getPaint(Class cl)` Returns the paint object that will be used for drawing eventline objects of the given type.
    `Stroke` | `getStroke(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(Graphics g)`
    `void` | `setPaint(Class eventlineObjectType, 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(Class eventlineObjectType, 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, 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

    - #### 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(Graphics g)

      Overrides:
        `paintLayer` in class `AbstractLayer`

    - #### setPaint

          public void setPaint(Class eventlineObjectType,
                               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 Paint getPaint(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(Class eventlineObjectType,
                                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 Stroke getStroke(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

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