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

pack-priv final Class MediaFeatures

extends Object
Class Inheritance
Imports
com.sun.javafx.css.media.expression.FunctionExpression, javafx.application.ColorScheme, java.util.Locale, java.util.function.Function

Contains the implementations of all supported media feature queries.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static MediaQuery
booleanPreferenceExpression(String featureName, String featureValue, String trueValue, Function<MediaQueryContext, Boolean> argument)

private static String
checkNotNullValue(String featureName, String featureValue)

private static <T extends Enum<T>> T
enumValue(Function<String, T> func, String featureName, String featureValue)

public static MediaQuery

Returns:

the MediaQuery
featureQueryExpression
(String
the name of the media feature
featureName
,
String
the value of the media feature, or null to indicate no value
featureValue
)

Returns a MediaQuery that evaluates the specified feature.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MediaFeaturesback to summary
private MediaFeatures()

Method Detail

booleanPreferenceExpressionback to summary
private static MediaQuery booleanPreferenceExpression(String featureName, String featureValue, String trueValue, Function<MediaQueryContext, Boolean> argument)
checkNotNullValueback to summary
private static String checkNotNullValue(String featureName, String featureValue)
enumValueback to summary
private static <T extends Enum<T>> T enumValue(Function<String, T> func, String featureName, String featureValue)
featureQueryExpressionback to summary
public static MediaQuery featureQueryExpression(String featureName, String featureValue)

Returns a MediaQuery that evaluates the specified feature.

Parameters
featureName:String

the name of the media feature

featureValue:String

the value of the media feature, or null to indicate no value

Returns:MediaQuery

the MediaQuery

Exceptions
IllegalArgumentException:
if featureName or featureValue is invalid