T
- the temporal unit supported by the model (e.g. ChronoUnit).public abstract class TimelineModel<T extends TemporalUnit> extends Object
Modifier | Constructor and Description |
---|---|
protected |
TimelineModel()
Constructs a new timeline model.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateLocationForTime(Instant time)
Returns the pixel location of the given time.
|
Instant |
calculateTimeForLocation(double location)
Returns the time for the given location.
|
Instant |
getHorizonEndTime()
Returns the value of
horizonEndTimeProperty() . |
Instant |
getHorizonStartTime()
Returns the value of
horizonStartTimeProperty() . |
double |
getMaximumMillisPerPixel()
Returns the value of
maximumMillisPerPixelProperty() . |
double |
getMillisPerPixel()
Returns the value of
millisPerPixelProperty() . |
double |
getMinimumMillisPerPixel()
Returns the value of
minimumMillisPerPixelProperty() . |
Instant |
getNow()
Returns the value of
nowProperty() . |
double |
getNowLocation()
Returns the value of
nowLocationProperty() . |
T |
getSmallestTemporalUnit()
Returns the value of
smallestTemporalUnitProperty() . |
Instant |
getStartTime()
Returns the value of
startTimeProperty() . |
javafx.beans.property.ObjectProperty<Instant> |
horizonEndTimeProperty()
Returns the object property used for storing the end time of the
horizon.
|
javafx.beans.property.ObjectProperty<Instant> |
horizonStartTimeProperty()
Returns the object property used for storing the start time of the
horizon.
|
javafx.beans.property.DoubleProperty |
maximumMillisPerPixelProperty()
A property used to store the maximum number of milliseconds that will be
represented by a single pixel on the screen.
|
javafx.beans.property.DoubleProperty |
millisPerPixelProperty()
Returns the property used to store the millis per pixel value.
|
javafx.beans.property.DoubleProperty |
minimumMillisPerPixelProperty()
A property used to store the minimum number of milliseconds that will be
represented by a single pixel on the screen.
|
javafx.beans.property.ReadOnlyDoubleProperty |
nowLocationProperty()
Stores the location of the "now" time.
|
javafx.beans.property.ObjectProperty<Instant> |
nowProperty()
Returns the property used to store "now", the current time, e.g.
|
void |
setHorizonEndTime(Instant time)
Sets the value of
horizonEndTimeProperty() . |
void |
setHorizonStartTime(Instant time)
Sets the value of
horizonStartTimeProperty() . |
void |
setMaximumMillisPerPixel(double max)
Sets the value of
maximumMillisPerPixelProperty() . |
void |
setMillisPerPixel(double millis)
Sets the value of the
millisPerPixelProperty() . |
void |
setMinimumMillisPerPixel(double min)
Sets the value of
minimumMillisPerPixelProperty() . |
void |
setNow(Instant now)
Sets the value of
nowProperty() . |
void |
setStartTime(Instant time)
Sets the value of
startTimeProperty() . |
void |
setZoomRange(T smallestUnit,
int smallestUnitCount,
double smallestUnitWidth,
T largestUnit,
int largestUnitCount,
double largestUnitWidth)
Sets the range in which the user can zoom in and out of the timeline.
|
javafx.beans.property.ReadOnlyObjectProperty<T> |
smallestTemporalUnitProperty()
Stores the smallest temporal unit supported by the control.
|
javafx.beans.property.ObjectProperty<Instant> |
startTimeProperty()
Returns the property used to store the first visible time point.
|
public final javafx.beans.property.ObjectProperty<Instant> horizonStartTimeProperty()
public final Instant getHorizonStartTime()
horizonStartTimeProperty()
.public final void setHorizonStartTime(Instant time)
horizonStartTimeProperty()
.time
- the horizon start timepublic final javafx.beans.property.ObjectProperty<Instant> horizonEndTimeProperty()
public final Instant getHorizonEndTime()
horizonEndTimeProperty()
.public final void setHorizonEndTime(Instant time)
horizonEndTimeProperty()
.time
- the horizon end timepublic final javafx.beans.property.DoubleProperty millisPerPixelProperty()
public final void setMillisPerPixel(double millis)
millisPerPixelProperty()
.millis
- the millis represented by a pixelpublic final double getMillisPerPixel()
millisPerPixelProperty()
.public final javafx.beans.property.DoubleProperty minimumMillisPerPixelProperty()
setZoomRange(TemporalUnit, int, double, TemporalUnit, int, double)
public final void setMinimumMillisPerPixel(double min)
minimumMillisPerPixelProperty()
.min
- the minimum MPP valuesetZoomRange(TemporalUnit, int, double, TemporalUnit, int, double)
public final double getMinimumMillisPerPixel()
minimumMillisPerPixelProperty()
.setZoomRange(TemporalUnit, int, double, TemporalUnit, int, double)
public final javafx.beans.property.DoubleProperty maximumMillisPerPixelProperty()
setZoomRange(TemporalUnit, int, double, TemporalUnit, int, double)
public final void setMaximumMillisPerPixel(double max)
maximumMillisPerPixelProperty()
.max
- the maximum MPP valuesetZoomRange(TemporalUnit, int, double, TemporalUnit, int, double)
public final double getMaximumMillisPerPixel()
maximumMillisPerPixelProperty()
.setZoomRange(TemporalUnit, int, double, TemporalUnit, int, double)
public final void setZoomRange(T smallestUnit, int smallestUnitCount, double smallestUnitWidth, T largestUnit, int largestUnitCount, double largestUnitWidth)
smallestUnit
- the smallest unit to which the user can zoom (e.g. "MINUTES")smallestUnitCount
- the number of smallest units (e.g. "5" MINUTES)smallestUnitWidth
- the width of the unit in pixels, must be larger than 10 (e.g.
"30")largestUnit
- the largest unit to which the user can zoom (e.g. "YEARS")largestUnitCount
- the number of largest units (e.g. "1" YEAR)largestUnitWidth
- the width of the unit in pixels, must be larger than 10 (e.g.
"30")setMinimumMillisPerPixel(double)
,
setMaximumMillisPerPixel(double)
public final javafx.beans.property.ObjectProperty<Instant> startTimeProperty()
public final void setStartTime(Instant time)
startTimeProperty()
.time
- the start timepublic final Instant getStartTime()
startTimeProperty()
.public final javafx.beans.property.ObjectProperty<Instant> nowProperty()
public final void setNow(Instant now)
nowProperty()
.now
- the "now" timepublic final Instant getNow()
nowProperty()
.public final javafx.beans.property.ReadOnlyDoubleProperty nowLocationProperty()
public final double getNowLocation()
nowLocationProperty()
.public final javafx.beans.property.ReadOnlyObjectProperty<T> smallestTemporalUnitProperty()
public final T getSmallestTemporalUnit()
smallestTemporalUnitProperty()
.public final double calculateLocationForTime(Instant time)
time
- the time for which to return the pixel locationpublic final Instant calculateTimeForLocation(double location)
location
- the location in pixelsCopyright © 2020 Dirk Lemmermann Software & Consulting. All rights reserved.