com.dlsc.flexgantt.swing.layer.system

## Class CalendarLayer

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

-     public class CalendarLayer
      extends AbstractSystemLayer

  The calendar layer is responsible for drawing the information provided by the calendar model.
  Since:
    1.0
  Version:
    $Revision: 1.11 $
  Author:
    Dirk Lemmermann
  See Also:
    `AbstractGanttChart.getCalendarModel()`

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ICalendarEntryRenderer` | `getCalendarEntryRenderer(Class cl)` Returns a calendar entry renderer for a given entry type.
    `Map<Class,ICalendarEntryRenderer>` | `getCalendarEntryRendererMap()` Returns the map storring the mappings between calendar entry types and calendar entry renderers.
    `protected void` | `paintLayer(Graphics g)`
    `void` | `setCalendarEntryRenderer(Class objectType, ICalendarEntryRenderer renderer)` Maps the implementation of a calendar entry renderer to a calendar object definition.
    `void` | `setCalendarEntryRendererMap(Map<Class,ICalendarEntryRenderer> map)` Sets the map storring the mappings between calendar entry types and calendar entry renderers.

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

    - #### CalendarLayer

          public CalendarLayer(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`

    - #### setCalendarEntryRenderer

          public void setCalendarEntryRenderer(Class objectType,
                                               ICalendarEntryRenderer renderer)

      Maps the implementation of a calendar entry renderer to a calendar object definition.
      Parameters:
        `objectType` - the type of the calendar entries where the visual representation will be rendered with the given renderer
        `renderer` - an implementation that will be used to renderer instances of the given calendar entry type
      Since:
        1.0
      See Also:
        `DefaultCalendarEntryRenderer`, `HolidayCalendarEntry`, `WeekendCalendarEntry`

    - #### getCalendarEntryRenderer

          public ICalendarEntryRenderer getCalendarEntryRenderer(Class cl)

      Returns a calendar entry renderer for a given entry type.
      Parameters:
        `cl` - the type of the calendar entry that is in need of rendering
      Returns:
        a matching calendar entry renderer implementation
      Since:
        1.0
      See Also:
        `setCalendarEntryRenderer(Class, ICalendarEntryRenderer)`, `DefaultCalendarEntryRenderer`

    - #### getCalendarEntryRendererMap

          public Map<Class,ICalendarEntryRenderer> getCalendarEntryRendererMap()

      Returns the map storring the mappings between calendar entry types and calendar entry renderers.
      Returns:
        the mapping between entries and renderers
      Since:
        1.0

    - #### setCalendarEntryRendererMap

          public void setCalendarEntryRendererMap(Map<Class,ICalendarEntryRenderer> map)

      Sets the map storring the mappings between calendar entry types and calendar entry renderers.
      Parameters:
        `map` - the mapping between entries and renderers
      Since:
        1.0

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