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 (normallyChronoUnitorSimpleUnit.
- Bekannte direkte Unterklassen:
ChronoUnitDatelineModel,SimpleUnitDatelineModel
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
-
Eigenschaftsübersicht
EigenschaftenTypEigenschaftBeschreibungfinal IntegerPropertyReturns the property used to store the maximum scale count.final IntegerPropertyReturns the property used to store the minimum scale count.final IntegerPropertyThe property used to store the number of currently visible scales. -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedConstructs a new model and populates the list of available zone IDs. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfinal voidaddResolution(Resolution<T> resolution) Adds a resolution to the model.final voidAdds aZoneIdto the model.final voidRemoves all resolutions from the model.final voidclearResolutions(T temporalUnit) Removes all resolutions for the given temporal unit.final ObservableSet<String> Returns allZoneIdinstances that are available for the user to switch to.final intReturns the value of the maximum scale count property.final intReturns the value ofminScaleCountProperty().final ObservableList<Resolution<? extends T>> Returns all resolutions that are defined for / supported by this model.final Iterator<? extends Resolution<? extends T>> getResolutions(T temporalUnit) Returns all resolutions that are available for the given temporal unit.final intReturns the value ofscaleCountProperty().final ObservableList<T> Returns all temporal units that are being used by the model.final IntegerPropertyReturns the property used to store the maximum scale count.final IntegerPropertyReturns the property used to store the minimum scale count.abstract TnextTemporalUnit(T unit) Returns the next larger temporal unit for the given temporal unit, e.g.final voidremoveResolution(Resolution<? extends T> resolution) Removes a resolution from the model.final IntegerPropertyThe property used to store the number of currently visible scales.final voidsetMaxScaleCount(int count) Sets the value ofmaxScaleCountProperty().final voidsetMinScaleCount(int count) Sets the value ofminScaleCountProperty().final voidsetScaleCount(int count) Sets the value ofscaleCountProperty().
-
Eigenschaftsdetails
-
scaleCount
The property used to store the number of currently visible scales.- Seit:
- 1.0
- Siehe auch:
-
maxScaleCount
Returns the property used to store the maximum scale count.- Seit:
- 1.0
- Siehe auch:
-
minScaleCount
Returns the property used to store the minimum scale count.- Seit:
- 1.0
- Siehe auch:
-
-
Konstruktordetails
-
DatelineModel
protected DatelineModel()Constructs a new model and populates the list of available zone IDs.- Seit:
- 1.0
-
-
Methodendetails
-
addZoneId
-
addResolution
Adds a resolution to the model.- Parameter:
resolution- the resolution to add- Seit:
- 1.0
-
removeResolution
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
Removes all resolutions for the given temporal unit.- Parameter:
temporalUnit- the temporal unit for which to remove all resolutions- Seit:
- 1.0
-
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
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 ofscaleCountProperty().- Gibt zurück:
- the scale count
- Seit:
- 1.0
-
setScaleCount
public final void setScaleCount(int count) Sets the value ofscaleCountProperty().- Parameter:
count- the new scale count- Seit:
- 1.0
-
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 ofmaxScaleCountProperty().- Parameter:
count- the new maximum scale count- Seit:
- 1.0
-
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 ofminScaleCountProperty().- Gibt zurück:
- the minimum scale count
- Seit:
- 1.0
-
setMinScaleCount
public final void setMinScaleCount(int count) Sets the value ofminScaleCountProperty().- Parameter:
count- the new minimum scale count- Seit:
- 1.0
-
getAvailableZoneIds
Returns allZoneIdinstances that are available for the user to switch to.- Gibt zurück:
- the available zone IDs
- Seit:
- 1.0
-
getResolutions
Returns all resolutions that are defined for / supported by this model.- Gibt zurück:
- the dateline resolutions
- Seit:
- 1.0
-
getResolutions
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
Returns the next larger temporal unit for the given temporal unit, e.g. when passingChronoUnit.HOURSthis method might returnChronoUnit.DAYS.- Parameter:
unit- the unit for which to return the next higher unit- Gibt zurück:
- the next higher temporal unit
- Seit:
- 1.0
-