Uses of Class
javafx.util.Duration
Package
Description
Provides the set of classes for ease of use transition based animations.
Provides the set of classes for javafx.concurrent.
Provides API for making properties styleable via CSS and for supporting
pseudo-class state.
Provides various
StyleConverter
classes
that convert CSS parsed values.The JavaFX User Interface Controls (UI Controls or just Controls) are
specialized Nodes in the JavaFX Scenegraph especially suited for reuse in
many different application contexts.
Provides the set of classes for integrating audio and video into Java FX
Applications.
Contains various utilities and helper classes.
-
Uses of Duration in javafx.animation
Modifier and TypeMethodDescriptionfinal Duration
Animation.getCurrentTime()
Gets the value of thecurrentTime
property.final Duration
Animation.getCycleDuration()
Gets the value of thecycleDuration
property.final Duration
Animation.getDelay()
Gets the value of thedelay
property.final Duration
FadeTransition.getDuration()
Gets the value of theduration
property.final Duration
FillTransition.getDuration()
Gets the value of theduration
property.final Duration
PathTransition.getDuration()
Gets the value of theduration
property.final Duration
PauseTransition.getDuration()
Gets the value of theduration
property.final Duration
RotateTransition.getDuration()
Gets the value of theduration
property.final Duration
ScaleTransition.getDuration()
Gets the value of theduration
property.final Duration
StrokeTransition.getDuration()
Gets the value of theduration
property.final Duration
TranslateTransition.getDuration()
Gets the value of theduration
property.KeyFrame.getTime()
Returns the time offset of thisKeyFrame
.final Duration
Animation.getTotalDuration()
Gets the value of thetotalDuration
property.Modifier and TypeMethodDescriptionfinal ReadOnlyObjectProperty
<Duration> Animation.currentTimeProperty()
Defines theAnimation
's play head position.final ReadOnlyObjectProperty
<Duration> Animation.cycleDurationProperty()
Read-only variable to indicate the duration of one cycle of thisAnimation
: the time it takes to play from time 0 to the end of the Animation (at the defaultrate
of 1.0).final ObjectProperty
<Duration> Animation.delayProperty()
Delays the start of an animation.final ObjectProperty
<Duration> FadeTransition.durationProperty()
The duration of thisFadeTransition
.final ObjectProperty
<Duration> FillTransition.durationProperty()
The duration of thisFillTransition
.final ObjectProperty
<Duration> PathTransition.durationProperty()
The duration of thisTransition
.final ObjectProperty
<Duration> PauseTransition.durationProperty()
The duration of thisTransition
.final ObjectProperty
<Duration> RotateTransition.durationProperty()
The duration of thisRotateTransition
.final ObjectProperty
<Duration> ScaleTransition.durationProperty()
The duration of thisScaleTransition
.final ObjectProperty
<Duration> StrokeTransition.durationProperty()
The duration of thisStrokeTransition
.final ObjectProperty
<Duration> TranslateTransition.durationProperty()
The duration of thisTranslateTransition
.final ObservableMap
<String, Duration> Animation.getCuePoints()
The cue points can be used to mark important positions of theAnimation
.final ReadOnlyObjectProperty
<Duration> Animation.totalDurationProperty()
Read-only variable to indicate the total duration of thisAnimation
, including repeats.Modifier and TypeMethodDescriptionvoid
Jumps to a given position in thisAnimation
.void
A convenience method to play thisAnimation
from a specific position.protected final void
Animation.setCycleDuration
(Duration value) Sets the value of thecycleDuration
property.final void
Sets the value of thedelay
property.final void
FadeTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
FillTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
PathTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
PauseTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
RotateTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
ScaleTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
StrokeTransition.setDuration
(Duration value) Sets the value of theduration
property.final void
TranslateTransition.setDuration
(Duration value) Sets the value of theduration
property.static Interpolator
Creates a tangent interpolator, for which in-tangent and out-tangent are identical.static Interpolator
Create a tangent interpolator.ModifierConstructorDescriptionFadeTransition
(Duration duration) The constructor ofFadeTransition
FadeTransition
(Duration duration, Node node) The constructor ofFadeTransition
FillTransition
(Duration duration) The constructor ofFillTransition
FillTransition
(Duration duration, Color fromValue, Color toValue) The constructor ofFillTransition
FillTransition
(Duration duration, Shape shape) The constructor ofFillTransition
FillTransition
(Duration duration, Shape shape, Color fromValue, Color toValue) The constructor ofFillTransition
Constructor ofKeyFrame
KeyFrame
(Duration time, String name, EventHandler<ActionEvent> onFinished, Collection<KeyValue> values) Constructor ofKeyFrame
KeyFrame
(Duration time, String name, EventHandler<ActionEvent> onFinished, KeyValue... values) Constructor ofKeyFrame
Constructor ofKeyFrame
KeyFrame
(Duration time, EventHandler<ActionEvent> onFinished, KeyValue... values) Constructor ofKeyFrame
PathTransition
(Duration duration, Shape path) The constructor ofPathTransition
.PathTransition
(Duration duration, Shape path, Node node) The constructor ofPathTransition
.PauseTransition
(Duration duration) The constructor ofPauseTransition
.RotateTransition
(Duration duration) The constructor ofRotateTransition
RotateTransition
(Duration duration, Node node) The constructor ofRotateTransition
ScaleTransition
(Duration duration) The constructor ofScaleTransition
ScaleTransition
(Duration duration, Node node) The constructor ofScaleTransition
StrokeTransition
(Duration duration) The constructor ofStrokeTransition
StrokeTransition
(Duration duration, Color fromValue, Color toValue) The constructor ofStrokeTransition
StrokeTransition
(Duration duration, Shape shape) The constructor ofStrokeTransition
StrokeTransition
(Duration duration, Shape shape, Color fromValue, Color toValue) The constructor ofStrokeTransition
TranslateTransition
(Duration duration) The constructor ofTranslateTransition
TranslateTransition
(Duration duration, Node node) The constructor ofTranslateTransition
-
Uses of Duration in javafx.concurrent
Modifier and TypeFieldDescriptionstatic final Callback
<ScheduledService<?>, Duration> ScheduledService.EXPONENTIAL_BACKOFF_STRATEGY
A Callback implementation for thebackoffStrategy
property which will exponentially backoff the period between re-executions in the case of a failure.static final Callback
<ScheduledService<?>, Duration> ScheduledService.LINEAR_BACKOFF_STRATEGY
A Callback implementation for thebackoffStrategy
property which will linearly backoff the period between re-executions in the case of a failure.static final Callback
<ScheduledService<?>, Duration> ScheduledService.LOGARITHMIC_BACKOFF_STRATEGY
A Callback implementation for thebackoffStrategy
property which will logarithmically backoff the period between re-executions in the case of a failure.Modifier and TypeMethodDescriptionfinal Duration
ScheduledService.getCumulativePeriod()
Gets the value of thecumulativePeriod
property.final Duration
ScheduledService.getDelay()
Gets the value of thedelay
property.final Duration
ScheduledService.getMaximumCumulativePeriod()
Gets the value of themaximumCumulativePeriod
property.final Duration
ScheduledService.getPeriod()
Gets the value of theperiod
property.Modifier and TypeMethodDescriptionfinal ObjectProperty
<Callback<ScheduledService<?>, Duration>> ScheduledService.backoffStrategyProperty()
Computes the amount of time to add to the period on each failure.final ReadOnlyObjectProperty
<Duration> ScheduledService.cumulativePeriodProperty()
The current cumulative period in use between iterations.final ObjectProperty
<Duration> ScheduledService.delayProperty()
The initial delay between when the ScheduledService is first started, and when it will begin operation.final Callback
<ScheduledService<?>, Duration> ScheduledService.getBackoffStrategy()
Gets the value of thebackoffStrategy
property.final ObjectProperty
<Duration> ScheduledService.maximumCumulativePeriodProperty()
The maximum allowed value for the cumulativePeriod.final ObjectProperty
<Duration> ScheduledService.periodProperty()
The minimum amount of time to allow between the start of the last run and the start of the next run.Modifier and TypeMethodDescriptionfinal void
Sets the value of thedelay
property.final void
ScheduledService.setMaximumCumulativePeriod
(Duration value) Sets the value of themaximumCumulativePeriod
property.final void
Sets the value of theperiod
property.Modifier and TypeMethodDescriptionfinal void
ScheduledService.setBackoffStrategy
(Callback<ScheduledService<?>, Duration> value) Sets the value of thebackoffStrategy
property. -
Uses of Duration in javafx.css
Modifier and TypeMethodDescriptionTransitionEvent.getElapsedTime()
Gets the time that has elapsed since the transition has entered its active period, not including the time spent in the delay phase.Modifier and TypeMethodDescriptionfinal CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function) Create a CssMetaData<S, Duration> with initial value of Duration.BLACK, and inherit flag defaulting to false.final CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function, Duration initialValue) Create a CssMetaData<S, Duration> with initial value, and inherit flag defaulting to false.final CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function, Duration initialValue, boolean inherits) Create a CssMetaData<S, Duration> with initial value, and inherit flag.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty) Create a StyleableProperty<Duration> using previously created CssMetaData for the givencssProperty
.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function) Create a StyleableProperty<Duration>.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function, Duration initialValue) Create a StyleableProperty<Duration> with initial value.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function, Duration initialValue, boolean inherits) Create a StyleableProperty<Duration> with initial value and inherit flag.static StyleConverter
<?, Duration> StyleConverter.getDurationConverter()
Return aStyleConverter
that converts a String representation of a duration to aDuration
.Modifier and TypeMethodDescriptionfinal CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function, Duration initialValue) Create a CssMetaData<S, Duration> with initial value, and inherit flag defaulting to false.final CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function, Duration initialValue, boolean inherits) Create a CssMetaData<S, Duration> with initial value, and inherit flag.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function, Duration initialValue) Create a StyleableProperty<Duration> with initial value.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function, Duration initialValue, boolean inherits) Create a StyleableProperty<Duration> with initial value and inherit flag.Modifier and TypeMethodDescriptionfinal CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function) Create a CssMetaData<S, Duration> with initial value of Duration.BLACK, and inherit flag defaulting to false.final CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function, Duration initialValue) Create a CssMetaData<S, Duration> with initial value, and inherit flag defaulting to false.final CssMetaData
<S, Duration> StyleablePropertyFactory.createDurationCssMetaData
(String property, Function<S, StyleableProperty<Duration>> function, Duration initialValue, boolean inherits) Create a CssMetaData<S, Duration> with initial value, and inherit flag.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function) Create a StyleableProperty<Duration>.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function, Duration initialValue) Create a StyleableProperty<Duration> with initial value.final StyleableProperty
<Duration> StyleablePropertyFactory.createStyleableDurationProperty
(S styleable, String propertyName, String cssProperty, Function<S, StyleableProperty<Duration>> function, Duration initialValue, boolean inherits) Create a StyleableProperty<Duration> with initial value and inherit flag.ModifierConstructorDescriptionTransitionEvent
(EventType<? extends Event> eventType, StyleableProperty<?> property, String propertyName, Duration elapsedTime) Creates a new instance of theTransitionEvent
class.TransitionEvent
(EventType<? extends Event> eventType, StyleableProperty<?> property, Duration elapsedTime) Deprecated, for removal: This API element is subject to removal in a future version. -
Uses of Duration in javafx.css.converter
Modifier and TypeClassDescriptionfinal class
Converter to Convert aSize
toDuration
.Modifier and TypeMethodDescriptionstatic StyleConverter
<ParsedValue<?, Size>, Duration> DurationConverter.getInstance()
Gets theDurationConverter
instance. -
Uses of Duration in javafx.scene.control
Modifier and TypeMethodDescriptionfinal Duration
Tooltip.getHideDelay()
Gets the value of thehideDelay
property.final Duration
Spinner.getInitialDelay()
Gets the value of theinitialDelay
property.final Duration
Spinner.getRepeatDelay()
Gets the value of therepeatDelay
property.final Duration
Tooltip.getShowDelay()
Gets the value of theshowDelay
property.final Duration
Tooltip.getShowDuration()
Gets the value of theshowDuration
property.Modifier and TypeMethodDescriptionfinal ObjectProperty
<Duration> Tooltip.hideDelayProperty()
The duration in which to continue showing the tooltip after the mouse has left the node.final ObjectProperty
<Duration> Spinner.initialDelayProperty()
The duration that the mouse has to be pressed on an arrow button before the next value steps.final ObjectProperty
<Duration> Spinner.repeatDelayProperty()
The duration that the mouse has to be pressed for each successive step after the first value steps.final ObjectProperty
<Duration> Tooltip.showDelayProperty()
The delay between the mouse entering the hovered node and when the associated tooltip will be shown to the user.final ObjectProperty
<Duration> Tooltip.showDurationProperty()
The duration that the tooltip should remain showing for until it is no longer visible to the user.Modifier and TypeMethodDescriptionfinal void
Tooltip.setHideDelay
(Duration hideDelay) Sets the value of thehideDelay
property.final void
Spinner.setInitialDelay
(Duration value) Sets the value of theinitialDelay
property.final void
Spinner.setRepeatDelay
(Duration value) Sets the value of therepeatDelay
property.final void
Tooltip.setShowDelay
(Duration showDelay) Sets the value of theshowDelay
property.final void
Tooltip.setShowDuration
(Duration showDuration) Sets the value of theshowDuration
property. -
Uses of Duration in javafx.scene.media
Modifier and TypeMethodDescriptionfinal Duration
MediaPlayer.getBufferProgressTime()
Retrieves thebufferProgressTime
value.final Duration
MediaPlayer.getCurrentTime()
Retrieves the current media time.final Duration
MediaPlayer.getCycleDuration()
Retrieves the cycle duration in seconds.final Duration
Media.getDuration()
Retrieve the duration in seconds of the media.final Duration
MediaPlayer.getStartTime()
Retrieves the start time.final Duration
MediaPlayer.getStopTime()
Retrieves the stop time.final Duration
MediaPlayer.getTotalDuration()
Retrieves the total playback duration including all cycles (repetitions).Modifier and TypeMethodDescriptionMediaPlayer.bufferProgressTimeProperty()
The current buffer position indicating how much media can be played without stalling theMediaPlayer
.MediaPlayer.currentTimeProperty()
The current media playback time.MediaPlayer.cycleDurationProperty()
Media.durationProperty()
The duration in seconds of the source media.MediaMarkerEvent.getMarker()
Retrieves the marker the event represents.final ObservableMap
<String, Duration> Media.getMarkers()
Retrieve the markers defined on thisMedia
instance.MediaPlayer.startTimeProperty()
The time offset where media should start playing, or restart from when repeating.MediaPlayer.stopTimeProperty()
The time offset where media should stop playing or restart when repeating.MediaPlayer.totalDurationProperty()
The total amount of play time if allowed to play until finished.Modifier and TypeMethodDescriptionvoid
Seeks the player to a new playback time.final void
MediaPlayer.setStartTime
(Duration value) Sets the start time.final void
MediaPlayer.setStopTime
(Duration value) Sets the stop time. -
Uses of Duration in javafx.util
Modifier and TypeFieldDescriptionstatic final Duration
Duration.INDEFINITE
An Infinite Duration.static final Duration
Duration.ONE
A Duration of 1 millisecond.static final Duration
Duration.UNKNOWN
A Duration of some unknown amount of time.static final Duration
Duration.ZERO
A Duration of 0 (no time).Modifier and TypeMethodDescriptionAdd this instance and another Duration instance to return a new Duration instance.Duration.divide
(double n) Divide this instance by a number to return a new Duration instance.Deprecated.This method produces surprising results by not taking units into account.static Duration
Duration.hours
(double h) Factory method that returns a Duration instance representing the specified number of hours.static Duration
Duration.millis
(double ms) Factory method that returns a Duration instance for a specified number of milliseconds.static Duration
Duration.minutes
(double m) Factory method that returns a Duration instance representing the specified number of minutes.Duration.multiply
(double n) Multiply this instance with a number representing millis and return a new Duration.Deprecated.This method produces surprising results by not taking units into account.Duration.negate()
Return a new Duration instance which has a negative number of milliseconds from this instance.static Duration
Duration.seconds
(double s) Factory method that returns a Duration instance representing the specified number of seconds.Subtract other Duration instance from this instance to return a new Duration instance.static Duration
Factory method that returns a Duration instance for a specified amount of time.Modifier and TypeMethodDescriptionAdd this instance and another Duration instance to return a new Duration instance.int
Compares durations represented by this object and the specified object.Deprecated.This method produces surprising results by not taking units into account.boolean
Duration.greaterThan
(Duration other) Returns true if the specified duration is greater than (>) this instance.boolean
Duration.greaterThanOrEqualTo
(Duration other) Returns true if the specified duration is greater than or equal to (>=) this instance.boolean
Returns true if the specified duration is less than (<) this instance.boolean
Duration.lessThanOrEqualTo
(Duration other) Returns true if the specified duration is less than or equal to (<=) this instance.Deprecated.This method produces surprising results by not taking units into account.Subtract other Duration instance from this instance to return a new Duration instance.
TransitionEvent(EventType, StyleableProperty, String, Duration)
instead