Class MediaQuery
- java.lang.Object
-
- com.itextpdf.styledxmlparser.css.media.MediaQuery
-
public class MediaQuery extends java.lang.Object
Class that bundles all the media query properties.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MediaExpression>
expressions
The expressions.private boolean
not
The logical "not" value.private boolean
only
The logical "only" value.private java.lang.String
type
The type.
-
Constructor Summary
Constructors Constructor Description MediaQuery(java.lang.String type, java.util.List<MediaExpression> expressions, boolean only, boolean not)
Creates a newMediaQuery
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(MediaDeviceDescription deviceDescription)
Tries to match a device description with the media query.
-
-
-
Field Detail
-
only
private boolean only
The logical "only" value.
-
not
private boolean not
The logical "not" value.
-
type
private java.lang.String type
The type.
-
expressions
private java.util.List<MediaExpression> expressions
The expressions.
-
-
Constructor Detail
-
MediaQuery
MediaQuery(java.lang.String type, java.util.List<MediaExpression> expressions, boolean only, boolean not)
Creates a newMediaQuery
instance.- Parameters:
type
- the typeexpressions
- the expressionsonly
- logical "only" valuenot
- logical "not" value
-
-
Method Detail
-
matches
public boolean matches(MediaDeviceDescription deviceDescription)
Tries to match a device description with the media query.- Parameters:
deviceDescription
- the device description- Returns:
- true, if successful
-
-