Klasse DatelineModel<T extends TemporalUnit>

java.lang.Object
com.flexganttfx.model.dateline.DatelineModel<T>
Typparameter:
T - the type of the temporal unit for which the model is defined (normally ChronoUnit or SimpleUnit.
Bekannte direkte Unterklassen:
ChronoUnitDatelineModel, SimpleUnitDatelineModel

public abstract class DatelineModel<T extends TemporalUnit> extends Object
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.
Seit:
1.0
  • Eigenschaftsdetails

  • Konstruktordetails

    • DatelineModel

      protected DatelineModel()
      Constructs a new model and populates the list of available zone IDs.
      Seit:
      1.0
  • Methodendetails

    • addZoneId

      public final void addZoneId(String zoneId)
      Adds a ZoneId to the model.
      Parameter:
      zoneId - the zone ID to add
      Seit:
      1.0
    • addResolution

      public final void addResolution(Resolution<T> resolution)
      Adds a resolution to the model.
      Parameter:
      resolution - the resolution to add
      Seit:
      1.0
    • removeResolution

      public final void removeResolution(Resolution<? extends T> resolution)
      Removes a resolution from the model.
      Parameter:
      resolution - the resolution that will be removed
      Seit:
      1.0
    • clearResolutions

      public final void clearResolutions()
      Removes all resolutions from the model.
      Seit:
      1.0
    • clearResolutions

      public final void clearResolutions(T temporalUnit)
      Removes all resolutions for the given temporal unit.
      Parameter:
      temporalUnit - the temporal unit for which to remove all resolutions
      Seit:
      1.0
    • getTemporalUnits

      public final ObservableList<T> getTemporalUnits()
      Returns all temporal units that are being used by the model.
      Gibt zurück:
      the list of temporal units used by the model
      Seit:
      1.0
    • scaleCountProperty

      public final IntegerProperty scaleCountProperty()
      The property used to store the number of currently visible scales.
      Gibt zurück:
      the scale count
      Seit:
      1.0
      Siehe auch:
    • getScaleCount

      public final int getScaleCount()
      Returns the value of scaleCountProperty().
      Gibt zurück:
      the scale count
      Seit:
      1.0
    • setScaleCount

      public final void setScaleCount(int count)
      Sets the value of scaleCountProperty().
      Parameter:
      count - the new scale count
      Seit:
      1.0
    • maxScaleCountProperty

      public final IntegerProperty maxScaleCountProperty()
      Returns the property used to store the maximum scale count.
      Gibt zurück:
      the maximum scale count property
      Seit:
      1.0
      Siehe auch:
    • getMaxScaleCount

      public final int getMaxScaleCount()
      Returns the value of the maximum scale count property.
      Gibt zurück:
      the maximum scale count
      Seit:
      1.0
    • setMaxScaleCount

      public final void setMaxScaleCount(int count)
      Sets the value of maxScaleCountProperty().
      Parameter:
      count - the new maximum scale count
      Seit:
      1.0
    • minScaleCountProperty

      public final IntegerProperty minScaleCountProperty()
      Returns the property used to store the minimum scale count.
      Gibt zurück:
      the minimum scale count property
      Seit:
      1.0
      Siehe auch:
    • getMinScaleCount

      public final int getMinScaleCount()
      Returns the value of minScaleCountProperty().
      Gibt zurück:
      the minimum scale count
      Seit:
      1.0
    • setMinScaleCount

      public final void setMinScaleCount(int count)
      Sets the value of minScaleCountProperty().
      Parameter:
      count - the new minimum scale count
      Seit:
      1.0
    • getAvailableZoneIds

      public final ObservableSet<String> getAvailableZoneIds()
      Returns all ZoneId instances that are available for the user to switch to.
      Gibt zurück:
      the available zone IDs
      Seit:
      1.0
    • getResolutions

      public final ObservableList<Resolution<? extends T>> getResolutions()
      Returns all resolutions that are defined for / supported by this model.
      Gibt zurück:
      the dateline resolutions
      Seit:
      1.0
    • getResolutions

      public final Iterator<? extends Resolution<? extends T>> getResolutions(T temporalUnit)
      Returns all resolutions that are available for the given temporal unit.
      Parameter:
      temporalUnit - the temporal unit for which resolutions are looked up
      Gibt zurück:
      the available resolutions for the given temporal unit
      Seit:
      1.0
    • nextTemporalUnit

      public abstract T nextTemporalUnit(T unit)
      Returns the next larger temporal unit for the given temporal unit, e.g. when passing ChronoUnit.HOURS this method might return ChronoUnit.DAYS.
      Parameter:
      unit - the unit for which to return the next higher unit
      Gibt zurück:
      the next higher temporal unit
      Seit:
      1.0