Top Inners Fields Constructors Methods
com.sun.javafx.scene

public final Class ScenePreferences

extends Object
implements Preferences, MediaQueryContext
Class Inheritance
All Implemented Interfaces
com.sun.javafx.css.media.MediaQueryContext, javafx.scene.Scene.Preferences
Imports
com.sun.javafx.application.PlatformImpl, com.sun.javafx.beans.property.NullCoalescingPropertyBase, com.sun.javafx.css.media.MediaQueryContext, java.util.List, javafx.application.ColorScheme, javafx.beans.property.ObjectProperty, javafx.beans.value.ObservableValue, javafx.scene.Node, .Scene, javafx.stage.Window

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
ScenePreferences.MediaProperty<T>

Property implementation for media features that causes CSS to be re-applied when the property value is changed.

Field Summary

Modifier and TypeField and Description
private final ScenePreferences.MediaProperty<ColorScheme>
private final ScenePreferences.MediaProperty<Boolean>
private final ScenePreferences.MediaProperty<Boolean>
private final ScenePreferences.MediaProperty<Boolean>
private final ScenePreferences.MediaProperty<Boolean>
private final Scene

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ObjectProperty<ColorScheme>
colorSchemeProperty()

Implements javafx.scene.Scene.Preferences.colorSchemeProperty.

Specifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.

public ColorScheme
getColorScheme()

Implements javafx.scene.Scene.Preferences.getColorScheme, com.sun.javafx.css.media.MediaQueryContext.getColorScheme.

Provides the value for the prefers-color-scheme media feature.

public boolean
public boolean
public boolean
public boolean
private void
public ObjectProperty<Boolean>
persistentScrollBarsProperty()

Implements javafx.scene.Scene.Preferences.persistentScrollBarsProperty.

Specifies whether applications should always show scroll bars.

public ObjectProperty<Boolean>
reducedDataProperty()

Implements javafx.scene.Scene.Preferences.reducedDataProperty.

Specifies whether the scene should minimize the amount of internet traffic, which users might request because they are on a metered network or a limited data plan.

public ObjectProperty<Boolean>
reducedMotionProperty()

Implements javafx.scene.Scene.Preferences.reducedMotionProperty.

Specifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.

public ObjectProperty<Boolean>
reducedTransparencyProperty()

Implements javafx.scene.Scene.Preferences.reducedTransparencyProperty.

Specifies whether the scene should minimize the amount of transparent or translucent layer effects, which can help to increase contrast and readability for some users.

public void
public void
setPersistentScrollBars(Boolean value)

Implements javafx.scene.Scene.Preferences.setPersistentScrollBars.

Sets the value of the persistentScrollBars property.

public void
setReducedData(Boolean value)

Implements javafx.scene.Scene.Preferences.setReducedData.

Sets the value of the reducedData property.

public void
setReducedMotion(Boolean value)

Implements javafx.scene.Scene.Preferences.setReducedMotion.

Sets the value of the reducedMotion property.

public void
setReducedTransparency(Boolean value)

Implements javafx.scene.Scene.Preferences.setReducedTransparency.

Sets the value of the reducedTransparency property.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colorSchemeback to summary
private final ScenePreferences.MediaProperty<ColorScheme> colorScheme
persistentScrollBarsback to summary
private final ScenePreferences.MediaProperty<Boolean> persistentScrollBars
reducedDataback to summary
private final ScenePreferences.MediaProperty<Boolean> reducedData
reducedMotionback to summary
private final ScenePreferences.MediaProperty<Boolean> reducedMotion
reducedTransparencyback to summary
private final ScenePreferences.MediaProperty<Boolean> reducedTransparency
sceneback to summary
private final Scene scene

Constructor Detail

ScenePreferencesback to summary
public ScenePreferences(Scene scene)

Method Detail

colorSchemePropertyback to summary
public ObjectProperty<ColorScheme> colorSchemeProperty()

Implements javafx.scene.Scene.Preferences.colorSchemeProperty.

Doc from javafx.scene.Scene.Preferences.colorSchemeProperty.

Specifies whether the scene should prefer light text on dark backgrounds, or dark text on light backgrounds.

This property corresponds to the prefers-color-scheme media feature.

Annotations
@Override
getColorSchemeback to summary
public ColorScheme getColorScheme()

Implements javafx.scene.Scene.Preferences.getColorScheme, com.sun.javafx.css.media.MediaQueryContext.getColorScheme.

Doc from com.sun.javafx.css.media.MediaQueryContext.getColorScheme.

Provides the value for the prefers-color-scheme media feature.

Annotations
@Override
isPersistentScrollBarsback to summary
public boolean isPersistentScrollBars()

Implements javafx.scene.Scene.Preferences.isPersistentScrollBars, com.sun.javafx.css.media.MediaQueryContext.isPersistentScrollBars.

Doc from javafx.scene.Scene.Preferences.isPersistentScrollBars.

Gets the value of the persistentScrollBars property.

Annotations
@Override
isReducedDataback to summary
public boolean isReducedData()

Implements javafx.scene.Scene.Preferences.isReducedData, com.sun.javafx.css.media.MediaQueryContext.isReducedData.

Doc from javafx.scene.Scene.Preferences.isReducedData.

Gets the value of the reducedData property.

Annotations
@Override
isReducedMotionback to summary
public boolean isReducedMotion()

Implements javafx.scene.Scene.Preferences.isReducedMotion, com.sun.javafx.css.media.MediaQueryContext.isReducedMotion.

Doc from javafx.scene.Scene.Preferences.isReducedMotion.

Gets the value of the reducedMotion property.

Annotations
@Override
isReducedTransparencyback to summary
public boolean isReducedTransparency()

Implements javafx.scene.Scene.Preferences.isReducedTransparency, com.sun.javafx.css.media.MediaQueryContext.isReducedTransparency.

Doc from javafx.scene.Scene.Preferences.isReducedTransparency.

Gets the value of the reducedTransparency property.

Annotations
@Override
onShowingChangedback to summary
private void onShowingChanged(Boolean showing)
persistentScrollBarsPropertyback to summary
public ObjectProperty<Boolean> persistentScrollBarsProperty()

Implements javafx.scene.Scene.Preferences.persistentScrollBarsProperty.

Doc from javafx.scene.Scene.Preferences.persistentScrollBarsProperty.

Specifies whether applications should always show scroll bars. If set to false, applications may choose to hide scroll bars that are not actively used, or make them smaller or less noticeable.

This property corresponds to the -fx-prefers-persistent-scrollbars media feature.

Annotations
@Override
reducedDataPropertyback to summary
public ObjectProperty<Boolean> reducedDataProperty()

Implements javafx.scene.Scene.Preferences.reducedDataProperty.

Doc from javafx.scene.Scene.Preferences.reducedDataProperty.

Specifies whether the scene should minimize the amount of internet traffic, which users might request because they are on a metered network or a limited data plan.

This property corresponds to the prefers-reduced-data media feature.

Annotations
@Override
reducedMotionPropertyback to summary
public ObjectProperty<Boolean> reducedMotionProperty()

Implements javafx.scene.Scene.Preferences.reducedMotionProperty.

Doc from javafx.scene.Scene.Preferences.reducedMotionProperty.

Specifies whether the scene should minimize the amount of non-essential animations, reducing discomfort for users who experience motion sickness or vertigo.

This property corresponds to the prefers-reduced-motion media feature.

Annotations
@Override
reducedTransparencyPropertyback to summary
public ObjectProperty<Boolean> reducedTransparencyProperty()

Implements javafx.scene.Scene.Preferences.reducedTransparencyProperty.

Doc from javafx.scene.Scene.Preferences.reducedTransparencyProperty.

Specifies whether the scene should minimize the amount of transparent or translucent layer effects, which can help to increase contrast and readability for some users.

This property corresponds to the prefers-reduced-transparency media feature.

Annotations
@Override
setColorSchemeback to summary
public void setColorScheme(ColorScheme colorScheme)

Implements javafx.scene.Scene.Preferences.setColorScheme.

Annotations
@Override
setPersistentScrollBarsback to summary
public void setPersistentScrollBars(Boolean value)

Implements javafx.scene.Scene.Preferences.setPersistentScrollBars.

Doc from javafx.scene.Scene.Preferences.setPersistentScrollBars.

Sets the value of the persistentScrollBars property.

Annotations
@Override
setReducedDataback to summary
public void setReducedData(Boolean value)

Implements javafx.scene.Scene.Preferences.setReducedData.

Doc from javafx.scene.Scene.Preferences.setReducedData.

Sets the value of the reducedData property.

Annotations
@Override
setReducedMotionback to summary
public void setReducedMotion(Boolean value)

Implements javafx.scene.Scene.Preferences.setReducedMotion.

Doc from javafx.scene.Scene.Preferences.setReducedMotion.

Sets the value of the reducedMotion property.

Annotations
@Override
setReducedTransparencyback to summary
public void setReducedTransparency(Boolean value)

Implements javafx.scene.Scene.Preferences.setReducedTransparency.

Doc from javafx.scene.Scene.Preferences.setReducedTransparency.

Sets the value of the reducedTransparency property.

Annotations
@Override
com.sun.javafx.scene back to summary

private Class ScenePreferences.MediaProperty<T>

extends NullCoalescingPropertyBase<T>
Class Inheritance

Property implementation for media features that causes CSS to be re-applied when the property value is changed. This is required to re-evaluate media queries in stylesheets.

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
pack-priv
MediaProperty(String name, ObservableValue<T> defaultValue)

Method Summary

Modifier and TypeMethod and Description
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.

protected void
onInvalidated()

Overrides com.sun.javafx.beans.property.NullCoalescingPropertyBase.onInvalidated.

Called when the current value has changed.

Inherited from com.sun.javafx.beans.property.NullCoalescingPropertyBase:
connectdisconnectfireValueChangedEventgetinvalidated

Field Detail

nameback to summary
private final String name

Constructor Detail

MediaPropertyback to summary
pack-priv MediaProperty(String name, ObservableValue<T> defaultValue)

Method Detail

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
onInvalidatedback to summary
protected void onInvalidated()

Overrides com.sun.javafx.beans.property.NullCoalescingPropertyBase.onInvalidated.

Doc from com.sun.javafx.beans.property.NullCoalescingPropertyBase.onInvalidated.

Called when the current value has changed.

Annotations
@Override