Class MediaQuery

java.lang.Object
com.itextpdf.styledxmlparser.css.media.MediaQuery

public class MediaQuery extends Object
Class that bundles all the media query properties.
  • Field Details

    • only

      private boolean only
      The logical "only" value.
    • not

      private boolean not
      The logical "not" value.
    • type

      private String type
      The type.
    • expressions

      private List<MediaExpression> expressions
      The expressions.
  • Constructor Details

    • MediaQuery

      MediaQuery(String type, List<MediaExpression> expressions, boolean only, boolean not)
      Creates a new MediaQuery instance.
      Parameters:
      type - the type
      expressions - the expressions
      only - logical "only" value
      not - logical "not" value
  • Method Details

    • 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