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

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

public class CalendarLayer
extends AbstractSystemLayer

The calendar layer is responsible for drawing the information provided by the calendar model.

Since:
1.0
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
CalendarLayer(LayerContainer lc)
          Constructs a new background layer.
 
Method Summary
 ICalendarEntryRenderer getCalendarEntryRenderer(java.lang.Class cl)
          Returns a popup renderer for a given popup value type.
 java.util.Map<java.lang.Class,ICalendarEntryRenderer> getCalendarEntryRendererMap()
          Returns the map storring the mappings between calendar entry types and calendar entry renderers.
protected  void paintLayer(java.awt.Graphics g)
           
 void setCalendarEntryRenderer(java.lang.Class objectType, ICalendarEntryRenderer renderer)
          Maps the implementation of a popup renderer to a popup object definition.
 void setCalendarEntryRendererMap(java.util.Map<java.lang.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, 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

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(java.awt.Graphics g)
Overrides:
paintLayer in class AbstractLayer

setCalendarEntryRenderer

public void setCalendarEntryRenderer(java.lang.Class objectType,
                                     ICalendarEntryRenderer renderer)
Maps the implementation of a popup renderer to a popup object definition.

Parameters:
objectType - the type of the popup objects where the popup will be rendered with the given renderer
renderer - an implementation that will be used to renderer instances of the given popup object type
Since:
1.0
See Also:
DefaultPopupRenderer, IPopupPolicy.getPopupValue(Object, Object, com.dlsc.flexgantt.model.gantt.IGanttChartModel, boolean)

getCalendarEntryRenderer

public ICalendarEntryRenderer getCalendarEntryRenderer(java.lang.Class cl)
Returns a popup renderer for a given popup value type.

Parameters:
cl - the popup object type in need of rendering
Returns:
a matching popup renderer implementation
Since:
1.0
See Also:
setCalendarEntryRenderer(Class, ICalendarEntryRenderer), DefaultPopupRenderer, IPopupPolicy

getCalendarEntryRendererMap

public java.util.Map<java.lang.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(java.util.Map<java.lang.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