MediaQueryContext, which provides the media feature
values that can be referenced in a media query expression.
| Modifier and Type | Method and Description |
|---|---|
| public ColorScheme | Returns: the color schemeProvides the value for the |
| public double | |
| public double | |
| public boolean | Returns: true if the application is in full-screen modeProvides the value for the |
| public boolean | Returns: true if the application should use persistent scroll barsProvides the value for the |
| public boolean | Returns: true if the application should reduce internet trafficProvides the value for the |
| public boolean | Returns: true if the application should reduce motionProvides the value for the |
| public boolean | Returns: true if the application should reduce transparencyProvides the value for the |
| public void | notifyQueryEvaluated(MediaQuery
the query query, boolean the query value currentValue)Notifies the media query context that a query has been evaluated and provides its current value. |
| getColorScheme | back to summary |
|---|---|
| public ColorScheme getColorScheme() Provides the value for the
| |
| getHeight | back to summary |
|---|---|
| public double getHeight() Provides the value for the
| |
| getWidth | back to summary |
|---|---|
| public double getWidth() Provides the value for the
| |
| isFullScreen | back to summary |
|---|---|
| public boolean isFullScreen() Provides the value for the
| |
| isPersistentScrollBars | back to summary |
|---|---|
| public boolean isPersistentScrollBars() Provides the value for the
| |
| isReducedData | back to summary |
|---|---|
| public boolean isReducedData() Provides the value for the
| |
| isReducedMotion | back to summary |
|---|---|
| public boolean isReducedMotion() Provides the value for the
| |
| isReducedTransparency | back to summary |
|---|---|
| public boolean isReducedTransparency() Provides the value for the
| |
| notifyQueryEvaluated | back to summary |
|---|---|
| public void notifyQueryEvaluated(MediaQuery query, boolean currentValue) Notifies the media query context that a query has been evaluated and provides its current value. The context can then re-evaluate the query at its own discretion and compare the evaluated value with the stored value to determine if it is necessary to re-apply CSS. This is an optimization to minimize CSS invalidation. For example, range-based queries like "width" and "height" can change very often when the scene is resized (but the evaluated value doesn't change often in a query like "width < 500"). If not for this optimization, we would have to speculatively re-apply CSS on every resize just to catch the case when a range-based query changes its value.
| |