T - the type of the temporal unit for which the model is defined
(normally ChronoUnit or SimpleUnit.public abstract class DatelineModel<T extends TemporalUnit> extends Object
| Type | Property and Description |
|---|---|
IntegerProperty |
maxScaleCount
Returns the property used to store the maximum scale count.
|
IntegerProperty |
minScaleCount
Returns the property used to store the minimum scale count.
|
IntegerProperty |
scaleCount
The property used to store the number of currently visible scales.
|
| Modifier | Constructor and Description |
|---|---|
protected |
DatelineModel()
Constructs a new model and populates the list of available zone IDs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResolution(Resolution<T> resolution)
Adds a resolution to the model.
|
void |
addZoneId(String zoneId)
Adds a
ZoneId to the model. |
void |
clearResolutions()
Removes all resolutions from the model.
|
void |
clearResolutions(T temporalUnit)
Removes all resolutions for the given temporal unit.
|
ObservableSet<String> |
getAvailableZoneIds()
Returns all
ZoneId instances that are available for the user to
switch to. |
int |
getMaxScaleCount()
Returns the value of the maximum scale count property.
|
int |
getMinScaleCount()
Returns the value of
minScaleCountProperty(). |
ObservableList<Resolution<? extends T>> |
getResolutions()
Returns all resolutions that are defined for / supported by this model.
|
Iterator<? extends Resolution<? extends T>> |
getResolutions(T temporalUnit)
Returns all resolutions that are available for the given temporal unit.
|
int |
getScaleCount()
Returns the value of
scaleCountProperty(). |
ObservableList<T> |
getTemporalUnits()
Returns all temporal units that are being used by the model.
|
IntegerProperty |
maxScaleCountProperty()
Returns the property used to store the maximum scale count.
|
IntegerProperty |
minScaleCountProperty()
Returns the property used to store the minimum scale count.
|
abstract T |
nextTemporalUnit(T unit)
Returns the next larger temporal unit for the given temporal unit, e.g.
|
void |
removeResolution(Resolution<? extends T> resolution)
Removes a resolution from the model.
|
IntegerProperty |
scaleCountProperty()
The property used to store the number of currently visible scales.
|
void |
setMaxScaleCount(int count)
Sets the value of
maxScaleCountProperty(). |
void |
setMinScaleCount(int count)
Sets the value of
minScaleCountProperty(). |
void |
setScaleCount(int count)
Sets the value of
scaleCountProperty(). |
public final IntegerProperty scaleCountProperty
getScaleCount(),
setScaleCount(int)public final IntegerProperty maxScaleCountProperty
getMaxScaleCount(),
setMaxScaleCount(int)public final IntegerProperty minScaleCountProperty
getMinScaleCount(),
setMinScaleCount(int)protected DatelineModel()
public final void addZoneId(String zoneId)
ZoneId to the model.zoneId - the zone ID to addpublic final void addResolution(Resolution<T> resolution)
resolution - the resolution to addpublic final void removeResolution(Resolution<? extends T> resolution)
resolution - the resolution that will be removedpublic final void clearResolutions()
public final void clearResolutions(T temporalUnit)
temporalUnit - the temporal unit for which to remove all resolutionspublic final ObservableList<T> getTemporalUnits()
public final IntegerProperty scaleCountProperty()
getScaleCount(),
setScaleCount(int)public final int getScaleCount()
scaleCountProperty().public final void setScaleCount(int count)
scaleCountProperty().count - the new scale countpublic final IntegerProperty maxScaleCountProperty()
getMaxScaleCount(),
setMaxScaleCount(int)public final int getMaxScaleCount()
public final void setMaxScaleCount(int count)
maxScaleCountProperty().count - the new maximum scale countpublic final IntegerProperty minScaleCountProperty()
getMinScaleCount(),
setMinScaleCount(int)public final int getMinScaleCount()
minScaleCountProperty().public final void setMinScaleCount(int count)
minScaleCountProperty().count - the new minimum scale countpublic final ObservableSet<String> getAvailableZoneIds()
ZoneId instances that are available for the user to
switch to.public final ObservableList<Resolution<? extends T>> getResolutions()
public final Iterator<? extends Resolution<? extends T>> getResolutions(T temporalUnit)
temporalUnit - the temporal unit for which resolutions are looked uppublic abstract T nextTemporalUnit(T unit)
ChronoUnit.HOURS this method might return
ChronoUnit.DAYS.unit - the unit for which to return the next higher unitCopyright © 2014 Dirk Lemmermann Software & Consulting. All rights reserved.