Top Description Inners Fields Constructors Methods
com.sun.javafx.application.preferences

pack-priv final Class PreferenceProperties

extends Object
Class Inheritance
Imports
com.sun.javafx.scene.ScenePreferences, com.sun.javafx.tk.Toolkit, com.sun.javafx.util.Utils, javafx.application.ColorScheme, javafx.beans.property.Property, .ReadOnlyBooleanProperty, .ReadOnlyBooleanPropertyBase, .ReadOnlyObjectProperty, .ReadOnlyObjectPropertyBase, .ReadOnlyProperty, javafx.scene.paint.Color, java.util.HashMap, .Map, .Objects

Contains Property-based preference implementations.

All properties in this class can be read from any thread in order to allow ScenePreferences to safely initialize its values on a background thread (creating and configuring a Scene on a background thread is allowed by its specification). This is not a specified capability for users, it is an implementation detail.

Importantly, even though properties can be read from any thread, changes always happen on the FX thread.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class
PreferenceProperties.DeferredProperty<T>

DeferredProperty implements a deferred notification mechanism, where change notifications are only fired after changes of all properties have been applied.

private static class

Field Summary

Modifier and TypeField and Description
private final PreferenceProperties.DeferredProperty<Color>
private final PreferenceProperties.DeferredProperty<Color>
private final Object
private final PreferenceProperties.ColorSchemeProperty
private final Map<String, PreferenceProperties.DeferredProperty<?>>
private final PreferenceProperties.DeferredProperty<Color>
private final Object
private final PreferenceProperties.DeferredProperty<Boolean>
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl
private final PreferenceProperties.DeferredProperty<Boolean>
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl
private final PreferenceProperties.DeferredProperty<Boolean>
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl
private final PreferenceProperties.DeferredProperty<Boolean>
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ReadOnlyObjectProperty<Color>
public ReadOnlyObjectProperty<Color>
public ReadOnlyObjectProperty<ColorScheme>
public ReadOnlyObjectProperty<Color>
public Color
public Color
public ColorScheme
public Color
public boolean
public boolean
public boolean
public boolean
public ReadOnlyBooleanProperty
public ReadOnlyBooleanProperty
public ReadOnlyBooleanProperty
public ReadOnlyBooleanProperty
public void
public void
public void
public void
public void
setPersistentScrollBars(boolean value)

public void
setReducedData(boolean value)

public void
setReducedMotion(boolean value)

public void
setReducedTransparency(boolean value)

public void
update(Map<String, ChangedValue> changedPreferences, Map<String, PreferenceMapping<?, ?>> platformKeyMappings)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accentColorback to summary
private final PreferenceProperties.DeferredProperty<Color> accentColor
backgroundColorback to summary
private final PreferenceProperties.DeferredProperty<Color> backgroundColor
beanback to summary
private final Object bean
colorSchemeback to summary
private final PreferenceProperties.ColorSchemeProperty colorScheme
deferredPropertiesback to summary
private final Map<String, PreferenceProperties.DeferredProperty<?>> deferredProperties
foregroundColorback to summary
private final PreferenceProperties.DeferredProperty<Color> foregroundColor
mutexback to summary
private final Object mutex
persistentScrollBarsback to summary
private final PreferenceProperties.DeferredProperty<Boolean> persistentScrollBars
persistentScrollBarsFlagback to summary
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl persistentScrollBarsFlag
reducedDataback to summary
private final PreferenceProperties.DeferredProperty<Boolean> reducedData
reducedDataFlagback to summary
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl reducedDataFlag
reducedMotionback to summary
private final PreferenceProperties.DeferredProperty<Boolean> reducedMotion
reducedMotionFlagback to summary
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl reducedMotionFlag
reducedTransparencyback to summary
private final PreferenceProperties.DeferredProperty<Boolean> reducedTransparency
reducedTransparencyFlagback to summary
private final PreferenceProperties.ReadOnlyBooleanWrapperImpl reducedTransparencyFlag

Constructor Detail

PreferencePropertiesback to summary
pack-priv PreferenceProperties(Object bean)

Method Detail

accentColorPropertyback to summary
public ReadOnlyObjectProperty<Color> accentColorProperty()
backgroundColorPropertyback to summary
public ReadOnlyObjectProperty<Color> backgroundColorProperty()
colorSchemePropertyback to summary
public ReadOnlyObjectProperty<ColorScheme> colorSchemeProperty()
foregroundColorPropertyback to summary
public ReadOnlyObjectProperty<Color> foregroundColorProperty()
getAccentColorback to summary
public Color getAccentColor()
getBackgroundColorback to summary
public Color getBackgroundColor()
getColorSchemeback to summary
public ColorScheme getColorScheme()
getForegroundColorback to summary
public Color getForegroundColor()
isPersistentScrollBarsback to summary
public boolean isPersistentScrollBars()
isReducedDataback to summary
public boolean isReducedData()
isReducedMotionback to summary
public boolean isReducedMotion()
isReducedTransparencyback to summary
public boolean isReducedTransparency()
persistentScrollBarsPropertyback to summary
public ReadOnlyBooleanProperty persistentScrollBarsProperty()
reducedDataPropertyback to summary
public ReadOnlyBooleanProperty reducedDataProperty()
reducedMotionPropertyback to summary
public ReadOnlyBooleanProperty reducedMotionProperty()
reducedTransparencyPropertyback to summary
public ReadOnlyBooleanProperty reducedTransparencyProperty()
setAccentColorback to summary
public void setAccentColor(Color color)
setBackgroundColorback to summary
public void setBackgroundColor(Color color)
setColorSchemeback to summary
public void setColorScheme(ColorScheme value)
setForegroundColorback to summary
public void setForegroundColor(Color color)
setPersistentScrollBarsback to summary
public void setPersistentScrollBars(boolean value)
setReducedDataback to summary
public void setReducedData(boolean value)
setReducedMotionback to summary
public void setReducedMotion(boolean value)
setReducedTransparencyback to summary
public void setReducedTransparency(boolean value)
updateback to summary
public void update(Map<String, ChangedValue> changedPreferences, Map<String, PreferenceMapping<?, ?>> platformKeyMappings)
com.sun.javafx.application.preferences back to summary

private final Class PreferenceProperties.ColorSchemeProperty

extends ReadOnlyObjectPropertyBase<ColorScheme>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private ColorScheme
private ColorScheme
private ColorScheme

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public ColorScheme
get()

Implements javafx.beans.value.ObservableObjectValue.get.

Returns the current value of this ObservableObjectValue<T>.

public Object
getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property.

public String
getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property.

public void
public void
Inherited from javafx.beans.property.ReadOnlyObjectPropertyBase:
addListeneraddListenerfireValueChangedEventremoveListenerremoveListener

Field Detail

effectiveValueback to summary
private ColorScheme effectiveValue
lastEffectiveValueback to summary
private ColorScheme lastEffectiveValue
overrideValueback to summary
private ColorScheme overrideValue

Constructor Detail

ColorSchemePropertyback to summary
private ColorSchemeProperty()

Method Detail

fireValueChangeIfNecessaryback to summary
public void fireValueChangeIfNecessary()
getback to summary
public ColorScheme get()

Implements javafx.beans.value.ObservableObjectValue.get.

Doc from javafx.beans.value.ObservableObjectValue.get.

Returns the current value of this ObservableObjectValue<T>.

Annotations
@Override
getBeanback to summary
public Object getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Doc from javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property. If this property is not contained in an Object, null is returned.

Annotations
@Override
getNameback to summary
public String getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Doc from javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property. If the property does not have a name, this method returns an empty String.

Annotations
@Override
setValueOverrideback to summary
public void setValueOverride(ColorScheme colorScheme)
updateEffectiveValueback to summary
public void updateEffectiveValue()
com.sun.javafx.application.preferences back to summary

private final Class PreferenceProperties.DeferredProperty<T>

extends ReadOnlyObjectPropertyBase<T>
Class Inheritance

DeferredProperty implements a deferred notification mechanism, where change notifications are only fired after changes of all properties have been applied. This ensures that observers will never see a transient state where two properties are inconsistent (for example, both foreground and background could be the same color when going from light to dark mode).

Field Summary

Modifier and TypeField and Description
private final T
private T
private T
private final String
private T
private T

Constructor Summary

AccessConstructor and Description
pack-priv
DeferredProperty(String name, T initialValue)

Method Summary

Modifier and TypeMethod and Description
public void
public T
get()

Implements javafx.beans.value.ObservableObjectValue.get.

Returns the current value of this ObservableObjectValue<T>.

public Object
getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property.

public String
getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property.

public void
setPlatformValue(Object value)

Only called from PreferenceProperties#update, this method doesn't fire a change notification.

public void
private void
Inherited from javafx.beans.property.ReadOnlyObjectPropertyBase:
addListeneraddListenerfireValueChangedEventremoveListenerremoveListener

Field Detail

defaultValueback to summary
private final T defaultValue
effectiveValueback to summary
private T effectiveValue
lastEffectiveValueback to summary
private T lastEffectiveValue
nameback to summary
private final String name
overrideValueback to summary
private T overrideValue
platformValueback to summary
private T platformValue

Constructor Detail

DeferredPropertyback to summary
pack-priv DeferredProperty(String name, T initialValue)

Method Detail

fireValueChangedIfNecessaryback to summary
public void fireValueChangedIfNecessary()
getback to summary
public T get()

Implements javafx.beans.value.ObservableObjectValue.get.

Doc from javafx.beans.value.ObservableObjectValue.get.

Returns the current value of this ObservableObjectValue<T>.

Annotations
@Override
getBeanback to summary
public Object getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Doc from javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property. If this property is not contained in an Object, null is returned.

Annotations
@Override
getNameback to summary
public String getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Doc from javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property. If the property does not have a name, this method returns an empty String.

Annotations
@Override
setPlatformValueback to summary
public void setPlatformValue(Object value)

Only called from PreferenceProperties#update, this method doesn't fire a change notification. Change notifications are fired after the new values of all deferred properties have been set.

Annotations
@SuppressWarnings:unchecked
setValueOverrideback to summary
public void setValueOverride(T value)
updateEffectiveValueback to summary
private void updateEffectiveValue()
com.sun.javafx.application.preferences back to summary

private final Class PreferenceProperties.ReadOnlyBooleanWrapperImpl

extends ReadOnlyBooleanPropertyBase
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ReadOnlyProperty<Boolean>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
get()

Implements javafx.beans.value.ObservableBooleanValue.get.

Returns the current value of this ObservableBooleanValue.

public Object
getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property.

public String
getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property.

Inherited from javafx.beans.property.ReadOnlyBooleanPropertyBase:
addListeneraddListenerfireValueChangedEventremoveListenerremoveListener

Field Detail

observableback to summary
private final ReadOnlyProperty<Boolean> observable

Constructor Detail

ReadOnlyBooleanWrapperImplback to summary
pack-priv ReadOnlyBooleanWrapperImpl(ReadOnlyProperty<Boolean> observable)

Method Detail

getback to summary
public boolean get()

Implements javafx.beans.value.ObservableBooleanValue.get.

Doc from javafx.beans.value.ObservableBooleanValue.get.

Returns the current value of this ObservableBooleanValue.

Annotations
@Override
getBeanback to summary
public Object getBean()

Implements javafx.beans.property.ReadOnlyProperty.getBean.

Doc from javafx.beans.property.ReadOnlyProperty.getBean.

Returns the Object that contains this property. If this property is not contained in an Object, null is returned.

Annotations
@Override
getNameback to summary
public String getName()

Implements javafx.beans.property.ReadOnlyProperty.getName.

Doc from javafx.beans.property.ReadOnlyProperty.getName.

Returns the name of this property. If the property does not have a name, this method returns an empty String.

Annotations
@Override