Options
All
  • Public
  • Public/Protected
  • All
Menu

The dateline model provides the dateline control with various pieces of information so that it can layout itself correctly.

  • Scale Resolutions - a scale resolution defines which temporal unit to show (e.g. HOURS) and how to format it. It also contains the information whether it can be shown in a top, bottom, or middle scale. Each model usually defines a long list of such resolutions. The more resolutions are defined the more flexible the dateline control becomes.

  • Time Zones - The dateline control allows the user to switch between different time zones. The model defines which zones are available.

  • Scale Count - The dateline control is composed of a set of dateline scales (top, bottom, several middle scales). The model can be used to define the currently visible, the minimum and the maximum number of scales that the user can choose to see.

  • Temporal Units - The dateline control calls back onto the model to lookup the "next" temporal unit after it has either failed or succeeded to create a scale for the current unit.

since

1.0

Type parameters

  • T: TemporalUnit

    the type of the temporal unit for which the model is defined (normally ChronoUnit or SimpleUnit).

Hierarchy

Index

Methods

addResolution

  • Adds a resolution to the model.

    since

    1.0

    Parameters

    Returns void

addZoneId

  • addZoneId(zoneId: string): void
  • Adds a ZoneId to the model.

    since

    1.0

    Parameters

    • zoneId: string

      the zone ID to add

    Returns void

clearResolutions

  • clearResolutions(temporalUnit?: T): void
  • Removes all resolutions for the given temporal unit.

    since

    1.0

    Parameters

    • Optional temporalUnit: T

      the temporal unit for which to remove all resolutions

    Returns void

getAvailableZoneIds

  • getAvailableZoneIds(): Set<string>
  • Returns all ZoneId instances that are available for the user to switch to.

    since

    1.0

    Returns Set<string>

    the available zone IDs

getMaxScaleCount

  • getMaxScaleCount(): number
  • Returns the maximum scale count.

    since

    1.0

    Returns number

    the maximum scale count

getMinScaleCount

  • getMinScaleCount(): number
  • Returns the minimum scale count.

    since

    1.0

    Returns number

    the minimum scale count

getResolutions

  • getResolutions(temporalUnit: T): Resolution<T>[]
  • Returns all resolutions that are available for the given temporal unit.

    since

    1.0

    Parameters

    • temporalUnit: T

      the temporal unit for which resolutions are looked up

    Returns Resolution<T>[]

    the available resolutions for the given temporal unit

getScaleCount

  • getScaleCount(): number
  • Returns the number of currently visible scales.

    since

    1.0

    Returns number

    the scale count

getTemporalUnits

  • getTemporalUnits(): T[]
  • Returns all temporal units that are being used by the model.

    since

    1.0

    Returns T[]

    the list of temporal units used by the model

Abstract nextTemporalUnit

  • nextTemporalUnit(unit: T): T
  • Returns the next larger temporal unit for the given temporal unit, e.g. when passing ChronoUnit.HOURS this method might return ChronoUnit.DAYS.

    since

    1.0

    Parameters

    • unit: T

      the unit for which to return the next higher unit

    Returns T

    the next higher temporal unit

removeResolution

  • removeResolution(resolution: Resolution<T>): void
  • Removes a resolution from the model.

    since

    1.0

    Parameters

    • resolution: Resolution<T>

      the resolution that will be removed

    Returns void

setMaxScaleCount

  • setMaxScaleCount(count: number): void
  • Sets the maximum scale count.

    since

    1.0

    Parameters

    • count: number

      the new maximum scale count

    Returns void

setMinScaleCount

  • setMinScaleCount(count: number): void
  • Sets the minimum scale count.

    since

    1.0

    Parameters

    • count: number

      the new minimum scale count

    Returns void

setScaleCount

  • setScaleCount(count: number): void
  • Sets the number of currently visible scales.

    since

    1.0

    Parameters

    • count: number

      the new scale count

    Returns void