com.dlsc.flexgantt.swing

## Class SimpleComponentFactory

- java.lang.Object
- - com.dlsc.flexgantt.swing.DefaultComponentFactory
  - - 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
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SimpleComponentFactory()` Constructs a simple component factory (protected due to singleton pattern).

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 SimpleComponentFactory` | `getInstance()` Returns the singleton instance of the component factory.

    - ### Methods inherited from class com.dlsc.flexgantt.swing.DefaultComponentFactory

      `createLayerContainer, createLayerContainerCorner, createLayerContainerRowHeader, createLayerContainerScrollPane, createSplitPane, createTimeline, createTreeTable, createTreeTableCorner, createTreeTableHeader, createTreeTableRowHeader, createTreeTableScrollPane`

    - ### 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 SimpleComponentFactory 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)`

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