com.dlsc.flexgantt.swing
Class SimpleComponentFactory

java.lang.Object
  extended by com.dlsc.flexgantt.swing.DefaultComponentFactory
      extended by com.dlsc.flexgantt.swing.SimpleComponentFactory
All Implemented Interfaces:
IComponentFactory

public class SimpleComponentFactory
extends DefaultComponentFactory

A simple component factory is an exension of the default component factory. It creates specializations of the Gantt chart components in order to support SimpleGranularity. E.g. the dateline created by this factory is SimpleDateline, which uses SimpleGranularityZoomPolicy, SimpleGranularityDatelineModel, and SimpleGranularityDatelineRenderer.

Since:
1.0
Author:
Dirk Lemmermann

Constructor Summary
protected SimpleComponentFactory()
          Constructs a simple component factory (protected due to singleton pattern).
 
Method Summary
 Dateline createDateline(Timeline timeline)
          Creates a new Dateline for the given Gantt chart and timeline.
 Eventline createEventline(Timeline timeline, Dateline dateline)
          Creates a new Eventline for the given Gantt chart and timeline.
static IComponentFactory getInstance()
          Returns the singleton instance of the component factory.
 
Methods inherited from class com.dlsc.flexgantt.swing.DefaultComponentFactory
createLayerContainer, createLayerContainerCorner, createLayerContainerRowHeader, createTimeline, createTreeTable, createTreeTableCorner, createTreeTableHeader, createTreeTableRowHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleComponentFactory

protected SimpleComponentFactory()
Constructs a simple component factory (protected due to singleton pattern).

Since:
1.0
Method Detail

getInstance

public static IComponentFactory getInstance()
Returns the singleton instance of the component factory.

Returns:
an instance of the component factory
Since:
1.0

createDateline

public Dateline createDateline(Timeline timeline)
Description copied from interface: IComponentFactory
Creates a new Dateline for the given Gantt chart and timeline. The dateline will show times / dates for the given time zone and it will allow the user to scroll across the given time span.

Specified by:
createDateline in interface IComponentFactory
Overrides:
createDateline in class DefaultComponentFactory
Parameters:
timeline - the parent timeline
Returns:
a dateline that covers the given time span and time zone
See Also:
IComponentFactory.createTimeline(AbstractGanttChart), IComponentFactory.createEventline(Timeline, Dateline)

createEventline

public Eventline createEventline(Timeline timeline,
                                 Dateline dateline)
Description copied from interface: IComponentFactory
Creates a new Eventline for the given Gantt chart and timeline. The eventline will show global events and activities.

Specified by:
createEventline in interface IComponentFactory
Overrides:
createEventline in class DefaultComponentFactory
Parameters:
timeline - the parent timeline
dateline - the dateline that is used in the same timeline
Returns:
an eventline for displaying global events and activities
See Also:
IComponentFactory.createDateline(Timeline), IComponentFactory.createTimeline(AbstractGanttChart)