Class MediaQuery
- java.lang.Object
-
- com.itextpdf.styledxmlparser.css.media.MediaQuery
-
public class MediaQuery extends java.lang.ObjectClass that bundles all the media query properties.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<MediaExpression>expressionsThe expressions.private booleannotThe logical "not" value.private booleanonlyThe logical "only" value.private java.lang.StringtypeThe type.
-
Constructor Summary
Constructors Constructor Description MediaQuery(java.lang.String type, java.util.List<MediaExpression> expressions, boolean only, boolean not)Creates a newMediaQueryinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(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 newMediaQueryinstance.- 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
-
-