APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.javafx.css

public abstract Class TransitionMediator

extends Object
Class Inheritance
Known Direct Subclasses
javafx.css.StyleableBooleanProperty.TransitionMediatorImpl, javafx.css.StyleableDoubleProperty.TransitionMediatorImpl, javafx.css.StyleableFloatProperty.TransitionMediatorImpl, javafx.css.StyleableIntegerProperty.TransitionMediatorImpl, javafx.css.StyleableLongProperty.TransitionMediatorImpl, javafx.css.StyleableObjectProperty.TransitionControllerBase, javafx.css.StyleableObjectProperty.ComponentTransitionMediator, javafx.css.StyleableStringProperty.TransitionMediatorImpl
Imports
javafx.css.StyleableProperty

TransitionMediator encapsulates the interactions between a TransitionTimer and its target.

Field Summary

Modifier and TypeField and Description
private TransitionTimer.CancellationToken

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
cancel()

Cancels the transition timer if it is currently running.

public abstract StyleableProperty<?>

Returns:

the styleable property
getStyleableProperty
()

Returns the styleable property targeted by the transition.

public abstract void
onStop()

Occurs when the timer has stopped and the mediator should be discarded.

public abstract void
onUpdate(double
the progress of the transition along the output progress axis, can be less than 0 or larger than 1
progress
)

Derived classes should implement this method to compute a new intermediate value based on the current progress, and update the StyleableProperty accordingly.

public final void
run(TransitionDefinition
the transition definition
definition
,
String
the name of the targeted CSS property
targetPropertyName
,
long
the current time in nanoseconds
nanoNow
)

Starts the transition timer with the specified transition definition.

public abstract boolean

Returns:

true if the reversing-adjusted start value was updated, false otherwise
updateReversingAdjustedStartValue
(TransitionMediator
the mediator of the existing transition
existingMediator
)

Derived classes must implement the following protocol:

  1. If the reversing-adjusted start value of the existing transition is equal to the end value of this transition: Set the reversing-adjusted start value of this transition to the end value of the existing transition and return true.
  2. Otherwise, return false.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cancellationTokenback to summary
private TransitionTimer.CancellationToken cancellationToken

Constructor Detail

TransitionMediatorback to summary
public TransitionMediator()

Method Detail

cancelback to summary
public final void cancel()

Cancels the transition timer if it is currently running.

getStyleablePropertyback to summary
public abstract StyleableProperty<?> getStyleableProperty()

Returns the styleable property targeted by the transition.

Returns:StyleableProperty<?>

the styleable property

onStopback to summary
public abstract void onStop()

Occurs when the timer has stopped and the mediator should be discarded. Derived classes should implement this method to clear any references to this mediator.

onUpdateback to summary
public abstract void onUpdate(double progress)

Derived classes should implement this method to compute a new intermediate value based on the current progress, and update the StyleableProperty accordingly.

Parameters
progress:double

the progress of the transition along the output progress axis, can be less than 0 or larger than 1

runback to summary
public final void run(TransitionDefinition definition, String targetPropertyName, long nanoNow)

Starts the transition timer with the specified transition definition.

Parameters
definition:TransitionDefinition

the transition definition

targetPropertyName:String

the name of the targeted CSS property

nanoNow:long

the current time in nanoseconds

updateReversingAdjustedStartValueback to summary
public abstract boolean updateReversingAdjustedStartValue(TransitionMediator existingMediator)

Derived classes must implement the following protocol:

  1. If the reversing-adjusted start value of the existing transition is equal to the end value of this transition: Set the reversing-adjusted start value of this transition to the end value of the existing transition and return true.
  2. Otherwise, return false.
Refer to Starting of transitions for more information about the reversing-adjusted start value.
Parameters
existingMediator:TransitionMediator

the mediator of the existing transition

Returns:boolean

true if the reversing-adjusted start value was updated, false otherwise