com.dlsc.flexgantt.swing.selector

## Class TimeGranularitySelectorFactory

- java.lang.Object
- - com.dlsc.flexgantt.swing.selector.TimeGranularitySelectorFactory

- All Implemented Interfaces:
    ISelectorFactory
  Direct Known Subclasses:
    MacTimeGranularitySelectorFactory

      public class TimeGranularitySelectorFactory
      extends Object
      implements ISelectorFactory

  A selector factory for Gantt charts, which use the `TimeGranularity` as a timeline granularity. As it is common for factories this class implements the Singleton pattern.
  Since:
    1.1
  Version:
    $Revision: 1.8 $
  Author:
    Dirk Lemmermann
  See Also:
    `TimeGranularityGotoSelector`, `TimeGranularityHorizonSelector`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.dlsc.flexgantt.swing.selector.ISelectorFactory

      `ISelectorFactory.SelectorID`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TimeGranularitySelectorFactory()` This class implements the Singleton pattern, hence the constructor is protected.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Selector` | `createSelector(AbstractGanttChart gc, JComponent parentComponent, ISelectorFactory.SelectorID id)` Creates a new selector for the given Gantt chart and the given selector type.
    `Selector` | `createSelector(IGridComponent gridComponent, JComponent parentComponent, ISelectorFactory.SelectorID id)` Creates a new selector for the given `IGridComponent` instance and the given selector type.
    `Selector` | `createSelector(LayerContainer layerContainer, JComponent parentComponent, ISelectorFactory.SelectorID id)` Creates a new selector for the given `LayerContainer` and the given selector type.
    `static TimeGranularitySelectorFactory` | `getInstance()` Returns the singleton instance of this factory.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TimeGranularitySelectorFactory

          protected TimeGranularitySelectorFactory()

      This class implements the Singleton pattern, hence the constructor is protected. Use `getInstance()` to lookup the singleton instance.
      Since:
        1.1

  - ### Method Detail

    - #### getInstance

          public static TimeGranularitySelectorFactory getInstance()

      Returns the singleton instance of this factory.
      Returns:
        the singleton instance
      Since:
        1.1

    - #### createSelector

          public Selector createSelector(AbstractGanttChart gc,
                                         JComponent parentComponent,
                                         ISelectorFactory.SelectorID id)

      Description copied from interface: `ISelectorFactory`
      Creates a new selector for the given Gantt chart and the given selector type. Selectors are always bound to a parent component, which gets also passed to this factory method.
      Specified by:
        `createSelector` in interface `ISelectorFactory`
      Parameters:
        `gc` - the Gantt chart where the selector will be used
        `parentComponent` - the parent component to which the selector will be bound
        `id` - the id of the selector
      Returns:
        a selector of the given type for the given Gantt cart

    - #### createSelector

          public Selector createSelector(LayerContainer layerContainer,
                                         JComponent parentComponent,
                                         ISelectorFactory.SelectorID id)

      Description copied from interface: `ISelectorFactory`
      Creates a new selector for the given `LayerContainer` and the given selector type. Selectors are always bound to a parent component, which gets also passed to this factory method.
      Specified by:
        `createSelector` in interface `ISelectorFactory`
      Parameters:
        `layerContainer` - the layer container where the selector will be used
        `parentComponent` - the parent component to which the selector will be bound
        `id` - the id of the selector
      Returns:
        a selector of the given type for the given Gantt cart

    - #### createSelector

          public Selector createSelector(IGridComponent gridComponent,
                                         JComponent parentComponent,
                                         ISelectorFactory.SelectorID id)

      Description copied from interface: `ISelectorFactory`
      Creates a new selector for the given `IGridComponent` instance and the given selector type. Selectors are always bound to a parent component, which gets also passed to this factory method.
      Specified by:
        `createSelector` in interface `ISelectorFactory`
      Parameters:
        `gridComponent` - the grid component where the selector will be used
        `parentComponent` - the parent component to which the selector will be bound
        `id` - the id of the selector
      Returns:
        a selector of the given type for the given Gantt cart

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