Top Description Methods
com.sun.javafx.css.media

public sealed Interface MediaQueryContext

permits ScenePreferences
Known Direct Implementers
com.sun.javafx.scene.ScenePreferences
Imports
com.sun.javafx.scene.ScenePreferences, javafx.application.ColorScheme

A media query is evaluated against a MediaQueryContext, which provides the media feature values that can be referenced in a media query expression.

Method Summary

Modifier and TypeMethod and Description
public ColorScheme

Returns:

the color scheme
getColorScheme
()

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

public boolean

Returns:

true if the application should use persistent scroll bars
isPersistentScrollBars
()

Provides the value for the -fx-prefers-persistent-scrollbars media feature.

public boolean

Returns:

true if the application should reduce internet traffic
isReducedData
()

Provides the value for the prefers-reduced-data media feature.

public boolean

Returns:

true if the application should reduce motion
isReducedMotion
()

Provides the value for the prefers-reduced-motion media feature.

public boolean

Returns:

true if the application should reduce transparency
isReducedTransparency
()

Provides the value for the prefers-reduced-transparency media feature.

Method Detail

getColorSchemeback to summary
public ColorScheme getColorScheme()

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

Returns:ColorScheme

the color scheme

isPersistentScrollBarsback to summary
public boolean isPersistentScrollBars()

Provides the value for the -fx-prefers-persistent-scrollbars media feature.

Returns:boolean

true if the application should use persistent scroll bars

isReducedDataback to summary
public boolean isReducedData()

Provides the value for the prefers-reduced-data media feature.

Returns:boolean

true if the application should reduce internet traffic

isReducedMotionback to summary
public boolean isReducedMotion()

Provides the value for the prefers-reduced-motion media feature.

Returns:boolean

true if the application should reduce motion

isReducedTransparencyback to summary
public boolean isReducedTransparency()

Provides the value for the prefers-reduced-transparency media feature.

Returns:boolean

true if the application should reduce transparency