Class MediaQuery
java.lang.Object
com.itextpdf.styledxmlparser.css.media.MediaQuery
Class that bundles all the media query properties.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<MediaExpression> The expressions.private booleanThe logical "not" value.private booleanThe logical "only" value.private StringThe type. -
Constructor Summary
ConstructorsConstructorDescriptionMediaQuery(String type, List<MediaExpression> expressions, boolean only, boolean not) Creates a newMediaQueryinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(MediaDeviceDescription deviceDescription) Tries to match a device description with the media query.
-
Field Details
-
only
private boolean onlyThe logical "only" value. -
not
private boolean notThe logical "not" value. -
type
The type. -
expressions
The expressions.
-
-
Constructor Details
-
MediaQuery
MediaQuery(String type, List<MediaExpression> expressions, boolean only, boolean not) Creates a newMediaQueryinstance.- Parameters:
type- the typeexpressions- the expressionsonly- logical "only" valuenot- logical "not" value
-
-
Method Details
-
matches
Tries to match a device description with the media query.- Parameters:
deviceDescription- the device description- Returns:
- true, if successful
-