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 boolean
The logical "not" value.private boolean
The logical "only" value.private String
The type. -
Constructor Summary
ConstructorsConstructorDescriptionMediaQuery
(String type, List<MediaExpression> expressions, boolean only, boolean not) Creates a newMediaQuery
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(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 newMediaQuery
instance.- 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
-