com.dlsc.flexgantt.policy.dateline

## Interface IZoomPolicy<T extends IGranularity>

- Type Parameters:
    `T` - the type of the granularity (e.g. TimeGranularity, SimpleGranularity)
  All Superinterfaces:
    IPolicy
  All Known Implementing Classes:
    AbstractZoomPolicy, SimpleGranularityZoomPolicy, TimeGranularityZoomPolicy

      public interface IZoomPolicy<T extends IGranularity>
      extends IPolicy

  A policy interface used in the context of the `Dateline`. The model uses the policy to determine which time granularities will be available for the user for zoom in and zoom out operations.
  Since:
    1.0
  Version:
    $Revision: 1.6 $
  Author:
    Dirk Lemmermann

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getGranularity(int index)` Returns the granularity with the given index.
    `int` | `getGranularityCount()` Returns the number of supported granularities.
    `int` | `getGranularityIndex(T granularity)` Returns the index of the given granularity.

- - ### Method Detail

    - #### getGranularityCount

          int getGranularityCount()

      Returns the number of supported granularities.
      Returns:
        the list of supported granularities (granularities that will be shown in the dateline)
      Since:
        1.0

    - #### getGranularity

          T getGranularity(int index)

      Returns the granularity with the given index.
      Parameters:
        `index` - the index for which to return a granularity
      Returns:
        the granularity with the given index
      Since:
        1.0

    - #### getGranularityIndex

          int getGranularityIndex(T granularity)

      Returns the index of the given granularity.
      Parameters:
        `granularity` - the granularity for which to return an index
      Returns:
        the granularity index
      Since:
        1.0

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