APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javafx.css

public abstract Class StyleableObjectProperty<T>

extends ObjectPropertyBase<T>
implements StyleableProperty<T>
Class Inheritance
All Implemented Interfaces
javafx.css.StyleableProperty, javafx.beans.value.WritableValue
Known Direct Subclasses
javafx.scene.layout.Region.ShapeProperty, javafx.css.SimpleStyleableObjectProperty
Type Parameters
<T>
the property value type
Imports
com.sun.javafx.css.StyleablePropertyHelper, .TransitionMediator, .TransitionDefinition, .SubPropertyConverter, com.sun.javafx.scene.NodeHelper, com.sun.javafx.tk.Toolkit, com.sun.javafx.util.InterpolationUtils, javafx.animation.Interpolatable, javafx.beans.property.ObjectPropertyBase, javafx.beans.value.ObservableValue, javafx.scene.Node, java.util.ArrayList, .HashMap, .List, .Map, .Objects

This class extends ObjectPropertyBase and provides a partial implementation of a StyleableProperty. The method StyleableProperty#getCssMetaData() is not implemented. This class is used to make a javafx.beans.property.ObjectProperty, that would otherwise be implemented as a ObjectPropertyBase, styleable by CSS.
Since
JavaFX 8.0
See Also
javafx.beans.property.ObjectPropertyBase, CssMetaData, StyleableProperty

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
StyleableObjectProperty.AggregatingTransitionController

Controller for component-wise transitions that aggregates the effects of its component transitions.

private class
StyleableObjectProperty.ComponentTransitionMediator<
the type of the sub-property
U
>

Transition mediator for CSS sub-properties.

private class
StyleableObjectProperty.DiscreteTransitionController

Controller for transitions of non-interpolatable values using discrete interpolation.

private class
private static interface
private abstract class
StyleableObjectProperty.TransitionControllerBase

Base class for transition controllers that don't support component-wise transitions.

Field Summary

Modifier and TypeField and Description
private StyleableObjectProperty.TransitionController<T>
private StyleOrigin

Constructor Summary

AccessConstructor and Description
public
StyleableObjectProperty()

The constructor of the StyleableObjectProperty.

public
StyleableObjectProperty(T
the initial value of the wrapped Object
initialValue
)

The constructor of the StyleableObjectProperty.

Method Summary

Modifier and TypeMethod and Description
private void
applyComponents(T oldValue, T
the new value
newValue
,
CssMetaData<? extends Styleable, T>
the CSS metadata of the value
metadata
,
SubPropertyConverter<T>
the style converter of the value
converter
)

Sets the value of the property, and potentially starts a transition.

public void
applyStyle(StyleOrigin origin, T newValue)

Implements javafx.css.StyleableProperty.applyStyle.

This method is called from CSS code to set the value of the property.

private void
applyValue(T
the old value
oldValue
,
T
the new value
newValue
,
CssMetaData<? extends Styleable, T>
the CSS metadata of the value
metadata
)

Sets the value of the property, and potentially starts a transition.

public void
bind(ObservableValue<? extends T> observable)

Overrides javafx.beans.property.ObjectPropertyBase.bind.

Implements javafx.beans.property.Property.bind.

Create a unidirection binding for this Property.

private boolean
public StyleOrigin
getStyleOrigin()

Implements javafx.css.StyleableProperty.getStyleOrigin.

Tells the origin of the value of the property.

private void
private void
processComponent(StyleableObjectProperty<T>.AggregatingTransitionController controller, CssMetaData<? extends Styleable, ?> metadata, Map<CssMetaData<? extends Styleable, ?>, TransitionDefinition> transitions, Map<CssMetaData<? extends Styleable, ?>, Object> oldCssValues, Map<CssMetaData<? extends Styleable, ?>, Object> newCssValues)

public void
Inherited from javafx.beans.property.ObjectPropertyBase:
addListeneraddListenerfireValueChangedEventgetinvalidatedisBoundremoveListenerremoveListenertoStringunbind

Field Detail

controllerback to summary
private StyleableObjectProperty.TransitionController<T> controller
originback to summary
private StyleOrigin origin

Constructor Detail

StyleableObjectPropertyback to summary
public StyleableObjectProperty()

The constructor of the StyleableObjectProperty.

StyleableObjectPropertyback to summary
public StyleableObjectProperty(T initialValue)

The constructor of the StyleableObjectProperty.

Parameters
initialValue:T

the initial value of the wrapped Object

Method Detail

applyComponentsback to summary
private void applyComponents(T oldValue, T newValue, CssMetaData<? extends Styleable, T> metadata, SubPropertyConverter<T> converter)

Sets the value of the property, and potentially starts a transition. This method is used for values that support component-wise transitions.

Parameters
newValue:T

the new value

metadata:CssMetaData<? extends Styleable, T>

the CSS metadata of the value

converter:SubPropertyConverter<T>

the style converter of the value

applyStyleback to summary
public void applyStyle(StyleOrigin origin, T newValue)

Implements javafx.css.StyleableProperty.applyStyle.

Doc from javafx.css.StyleableProperty.applyStyle.

This method is called from CSS code to set the value of the property.

Annotations
@Override
@SuppressWarnings:unchecked, rawtypes
applyValueback to summary
private void applyValue(T oldValue, T newValue, CssMetaData<? extends Styleable, T> metadata)

Sets the value of the property, and potentially starts a transition. This method is used for values that don't support component-wise transitions, and for cases where one of the values is null and we fall back to a discrete transition.

Parameters
oldValue:T

the old value

newValue:T

the new value

metadata:CssMetaData<? extends Styleable, T>

the CSS metadata of the value

bindback to summary
public void bind(ObservableValue<? extends T> observable)

Overrides javafx.beans.property.ObjectPropertyBase.bind.

Implements javafx.beans.property.Property.bind.

Doc from javafx.beans.property.ObjectPropertyBase.bind.

Create a unidirection binding for this Property.

Note that JavaFX has all the bind calls implemented through weak listeners. This means the bound property can be garbage collected and stopped from being updated.

Annotations
@Override
equalsEndValueback to summary
private boolean equalsEndValue(Object value)
getStyleOriginback to summary
public StyleOrigin getStyleOrigin()

Implements javafx.css.StyleableProperty.getStyleOrigin.

Doc from javafx.css.StyleableProperty.getStyleOrigin.

Tells the origin of the value of the property. This is needed to determine whether or not CSS can override the value.

Annotations
@Override
onUserChangeback to summary
private void onUserChange()
processComponentback to summary
private void processComponent(StyleableObjectProperty<T>.AggregatingTransitionController controller, CssMetaData<? extends Styleable, ?> metadata, Map<CssMetaData<? extends Styleable, ?>, TransitionDefinition> transitions, Map<CssMetaData<? extends Styleable, ?>, Object> oldCssValues, Map<CssMetaData<? extends Styleable, ?>, Object> newCssValues)
Annotations
@SuppressWarnings:unchecked, rawtypes
setback to summary
public void set(T v)

Overrides javafx.beans.property.ObjectPropertyBase.set.

Implements javafx.beans.value.WritableObjectValue.set.

Doc from javafx.beans.property.ObjectPropertyBase.set.

Set the wrapped value. Should be equivalent to setValue(java.lang.Object)

Annotations
@Override
javafx.css back to summary

private final Class StyleableObjectProperty.AggregatingTransitionController

extends Object
implements StyleableObjectProperty.TransitionController<T>
Class Inheritance
  • java.lang.Object
  • javafx.css.StyleableObjectProperty.AggregatingTransitionController
All Implemented Interfaces
javafx.css.StyleableObjectProperty.TransitionController

Controller for component-wise transitions that aggregates the effects of its component transitions.

For each animation frame, this controller waits until all its component mediators have updated their current value, and then converts the collected component values into a new object of type T using the StyleConverter of this StyleableObjectProperty.

Field Summary

Modifier and TypeField and Description
private final Map<CssMetaData<? extends Styleable, ?>, Object>
private final List<StyleableObjectProperty<T>.ComponentTransitionMediator<?>>
private final T
private int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public <
the component value type
U
>
void
addExistingMediator(StyleableObjectProperty<T>.ComponentTransitionMediator<U>
the existing component transition mediator
mediator
)

Adds an existing component transition mediator to this controller.

public <
the component value type
U
>
void
addMediator(U
the old component value
oldValue
,
U
the new component value
newValue
,
CssMetaData<? extends Styleable, ?>
the component metadata
metadata
,
TransitionDefinition
the transition definition
transition
)

Adds a new component transition mediator to this controller.

public void
addValue(CssMetaData<? extends Styleable, ?>
the CssMetaData of the component
metadata
,
Object
the new value
value
)

Adds a component value to the value cache.

public void
public T
public void
onStop(StyleableObjectProperty<T>.ComponentTransitionMediator<?>
the component transition mediator
mediator
)

This method is called when a component transition mediator is stopped.

public void
onUpdate(CssMetaData<? extends Styleable, ?>
the CssMetaData of the component
metadata
,
Object
the new value
value
)

This method is called when a component transition mediator updates its current value.

public void
run()

Starts all transition timers managed by this controller.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cssValuesback to summary
private final Map<CssMetaData<? extends Styleable, ?>, Object> cssValues
mediatorsback to summary
private final List<StyleableObjectProperty<T>.ComponentTransitionMediator<?>> mediators
newValueback to summary
private final T newValue
remainingValuesback to summary
private int remainingValues

Constructor Detail

AggregatingTransitionControllerback to summary
pack-priv AggregatingTransitionController(T newValue)

Method Detail

addExistingMediatorback to summary
public <U> void addExistingMediator(StyleableObjectProperty<T>.ComponentTransitionMediator<U> mediator)

Adds an existing component transition mediator to this controller. After calling this method, the existing mediator will be associated with this controller.

Parameters
<U>
the component value type
mediator:StyleableObjectProperty<T>.ComponentTransitionMediator<U>

the existing component transition mediator

addMediatorback to summary
public <U> void addMediator(U oldValue, U newValue, CssMetaData<? extends Styleable, ?> metadata, TransitionDefinition transition)

Adds a new component transition mediator to this controller.

Parameters
<U>
the component value type
oldValue:U

the old component value

newValue:U

the new component value

metadata:CssMetaData<? extends Styleable, ?>

the component metadata

transition:TransitionDefinition

the transition definition

addValueback to summary
public void addValue(CssMetaData<? extends Styleable, ?> metadata, Object value)

Adds a component value to the value cache.

Parameters
metadata:CssMetaData<? extends Styleable, ?>

the CssMetaData of the component

value:Object

the new value

cancelback to summary
public void cancel()

Implements javafx.css.StyleableObjectProperty.TransitionController.cancel.

Annotations
@Override
getTargetValueback to summary
public T getTargetValue()

Implements javafx.css.StyleableObjectProperty.TransitionController.getTargetValue.

Annotations
@Override
onStopback to summary
public void onStop(StyleableObjectProperty<T>.ComponentTransitionMediator<?> mediator)

This method is called when a component transition mediator is stopped.

Parameters
mediator:StyleableObjectProperty<T>.ComponentTransitionMediator<?>

the component transition mediator

onUpdateback to summary
public void onUpdate(CssMetaData<? extends Styleable, ?> metadata, Object value)

This method is called when a component transition mediator updates its current value. When all component values have been collected, they are converted to an object of type T using the StyleConverter of this StyleableObjectProperty.

Parameters
metadata:CssMetaData<? extends Styleable, ?>

the CssMetaData of the component

value:Object

the new value

runback to summary
public void run()

Starts all transition timers managed by this controller.

javafx.css back to summary

private final Class StyleableObjectProperty.ComponentTransitionMediator<U>

extends TransitionMediator
Class Inheritance
Type Parameters
<U>
the type of the sub-property

Transition mediator for CSS sub-properties.

This transition mediator does not interact with the StyleableObjectProperty directly, but instead feeds its effects into the associated AggregatingTransitionController.

Field Summary

Modifier and TypeField and Description
private StyleableObjectProperty<T>.AggregatingTransitionController
private final TransitionDefinition
private final U
private final CssMetaData<? extends Styleable, ?>
private U
private boolean
private final U

Constructor Summary

AccessConstructor and Description
pack-priv
ComponentTransitionMediator(U startValue, U endValue, StyleableObjectProperty<T>.AggregatingTransitionController associatedController, CssMetaData<? extends Styleable, ?> metadata, TransitionDefinition definition)

Method Summary

Modifier and TypeMethod and Description
public StyleableProperty<?>
getStyleableProperty()

Implements abstract com.sun.javafx.css.TransitionMediator.getStyleableProperty.

Returns the styleable property targeted by the transition.

public void
onStop()

Implements abstract com.sun.javafx.css.TransitionMediator.onStop.

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

public void
onUpdate(double progress)

Implements abstract com.sun.javafx.css.TransitionMediator.onUpdate.

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

public void
run(long now)

public boolean
updateReversingAdjustedStartValue(TransitionMediator existingMediator)

Implements abstract com.sun.javafx.css.TransitionMediator.updateReversingAdjustedStartValue.

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 com.sun.javafx.css.TransitionMediator:
cancelrun

Field Detail

associatedControllerback to summary
private StyleableObjectProperty<T>.AggregatingTransitionController associatedController
definitionback to summary
private final TransitionDefinition definition
endValueback to summary
private final U endValue
metadataback to summary
private final CssMetaData<? extends Styleable, ?> metadata
reversingAdjustedStartValueback to summary
private U reversingAdjustedStartValue
runningback to summary
private boolean running
startValueback to summary
private final U startValue

Constructor Detail

ComponentTransitionMediatorback to summary
pack-priv ComponentTransitionMediator(U startValue, U endValue, StyleableObjectProperty<T>.AggregatingTransitionController associatedController, CssMetaData<? extends Styleable, ?> metadata, TransitionDefinition definition)

Method Detail

getStyleablePropertyback to summary
public StyleableProperty<?> getStyleableProperty()

Implements abstract com.sun.javafx.css.TransitionMediator.getStyleableProperty.

Doc from com.sun.javafx.css.TransitionMediator.getStyleableProperty.

Returns the styleable property targeted by the transition.

Annotations
@Override
onStopback to summary
public void onStop()

Implements abstract com.sun.javafx.css.TransitionMediator.onStop.

Doc from com.sun.javafx.css.TransitionMediator.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.

Annotations
@Override
onUpdateback to summary
public void onUpdate(double progress)

Implements abstract com.sun.javafx.css.TransitionMediator.onUpdate.

Doc from com.sun.javafx.css.TransitionMediator.onUpdate.

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

Annotations
@Override
@SuppressWarnings:unchecked, rawtypes
runback to summary
public void run(long now)
updateReversingAdjustedStartValueback to summary
public boolean updateReversingAdjustedStartValue(TransitionMediator existingMediator)

Implements abstract com.sun.javafx.css.TransitionMediator.updateReversingAdjustedStartValue.

Doc from com.sun.javafx.css.TransitionMediator.updateReversingAdjustedStartValue.

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.
Annotations
@Override
@SuppressWarnings:unchecked
javafx.css back to summary

private final Class StyleableObjectProperty.DiscreteTransitionController

extends StyleableObjectProperty<T>.TransitionControllerBase
Class Inheritance

Controller for transitions of non-interpolatable values using discrete interpolation.

Field Summary

Inherited from javafx.css.StyleableObjectProperty.TransitionControllerBase:
endValuestartValue

Constructor Summary

AccessConstructor and Description
pack-priv
DiscreteTransitionController(T startValue, T endValue)

Method Summary

Modifier and TypeMethod and Description
public void
onUpdate(double progress)

Implements abstract com.sun.javafx.css.TransitionMediator.onUpdate.

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

Inherited from javafx.css.StyleableObjectProperty.TransitionControllerBase:
getStyleablePropertygetTargetValueonStopupdateReversingAdjustedStartValue

Constructor Detail

DiscreteTransitionControllerback to summary
pack-priv DiscreteTransitionController(T startValue, T endValue)

Method Detail

onUpdateback to summary
public void onUpdate(double progress)

Implements abstract com.sun.javafx.css.TransitionMediator.onUpdate.

Doc from com.sun.javafx.css.TransitionMediator.onUpdate.

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

Annotations
@Override
javafx.css back to summary

private final Class StyleableObjectProperty.InterpolatableTransitionController

extends StyleableObjectProperty<T>.TransitionControllerBase
Class Inheritance

Controller for transitions of Interpolatable values.

Field Summary

Inherited from javafx.css.StyleableObjectProperty.TransitionControllerBase:
endValuestartValue

Constructor Summary

AccessConstructor and Description
pack-priv
InterpolatableTransitionController(T startValue, T endValue)

Method Summary

Modifier and TypeMethod and Description
public void
onUpdate(double progress)

Implements abstract com.sun.javafx.css.TransitionMediator.onUpdate.

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

Inherited from javafx.css.StyleableObjectProperty.TransitionControllerBase:
getStyleablePropertygetTargetValueonStopupdateReversingAdjustedStartValue

Constructor Detail

InterpolatableTransitionControllerback to summary
pack-priv InterpolatableTransitionController(T startValue, T endValue)

Method Detail

onUpdateback to summary
public void onUpdate(double progress)

Implements abstract com.sun.javafx.css.TransitionMediator.onUpdate.

Doc from com.sun.javafx.css.TransitionMediator.onUpdate.

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

Annotations
@Override
@SuppressWarnings:unchecked
javafx.css back to summary

private Interface StyleableObjectProperty.TransitionController<T>

Known Direct Implementers
javafx.css.StyleableObjectProperty.TransitionControllerBase, javafx.css.StyleableObjectProperty.AggregatingTransitionController
Type Parameters
<T>
the property value type

Common interface for transition controllers:
  1. DiscreteTransitionController
  2. InterpolatableTransitionController
  3. AggregatingTransitionController

Method Summary

Modifier and TypeMethod and Description
public void
public T

Method Detail

cancelback to summary
public void cancel()
getTargetValueback to summary
public T getTargetValue()
javafx.css back to summary

private abstract Class StyleableObjectProperty.TransitionControllerBase

extends TransitionMediator
implements StyleableObjectProperty.TransitionController<T>
Class Inheritance
All Implemented Interfaces
javafx.css.StyleableObjectProperty.TransitionController
Known Direct Subclasses
javafx.css.StyleableObjectProperty.DiscreteTransitionController, javafx.css.StyleableObjectProperty.InterpolatableTransitionController

Base class for transition controllers that don't support component-wise transitions.

Field Summary

Modifier and TypeField and Description
pack-priv final T
private T
pack-priv final T

Constructor Summary

AccessConstructor and Description
pack-priv
TransitionControllerBase(T startValue, T endValue)

Method Summary

Modifier and TypeMethod and Description
public StyleableProperty<?>
getStyleableProperty()

Implements abstract com.sun.javafx.css.TransitionMediator.getStyleableProperty.

Returns the styleable property targeted by the transition.

public T
public void
onStop()

Implements abstract com.sun.javafx.css.TransitionMediator.onStop.

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

public boolean
updateReversingAdjustedStartValue(TransitionMediator existingMediator)

Implements abstract com.sun.javafx.css.TransitionMediator.updateReversingAdjustedStartValue.

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 com.sun.javafx.css.TransitionMediator:
cancelonUpdaterun

Field Detail

endValueback to summary
pack-priv final T endValue
reversingAdjustedStartValueback to summary
private T reversingAdjustedStartValue
startValueback to summary
pack-priv final T startValue

Constructor Detail

TransitionControllerBaseback to summary
pack-priv TransitionControllerBase(T startValue, T endValue)

Method Detail

getStyleablePropertyback to summary
public StyleableProperty<?> getStyleableProperty()

Implements abstract com.sun.javafx.css.TransitionMediator.getStyleableProperty.

Doc from com.sun.javafx.css.TransitionMediator.getStyleableProperty.

Returns the styleable property targeted by the transition.

Annotations
@Override
getTargetValueback to summary
public T getTargetValue()

Implements javafx.css.StyleableObjectProperty.TransitionController.getTargetValue.

Annotations
@Override
onStopback to summary
public void onStop()

Implements abstract com.sun.javafx.css.TransitionMediator.onStop.

Doc from com.sun.javafx.css.TransitionMediator.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.

Annotations
@Override
updateReversingAdjustedStartValueback to summary
public boolean updateReversingAdjustedStartValue(TransitionMediator existingMediator)

Implements abstract com.sun.javafx.css.TransitionMediator.updateReversingAdjustedStartValue.

Doc from com.sun.javafx.css.TransitionMediator.updateReversingAdjustedStartValue.

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.
Annotations
@Override
@SuppressWarnings:unchecked