Class MediaExpression

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

public class MediaExpression extends Object
Class that bundles all the media expression properties.
  • Field Details

    • DEFAULT_FONT_SIZE

      private static final float DEFAULT_FONT_SIZE
      The default font size.
      See Also:
    • minPrefix

      private boolean minPrefix
      Indicates if there's a "min-" prefix.
    • maxPrefix

      private boolean maxPrefix
      Indicates if there's a "max-" prefix.
    • feature

      private String feature
      The feature.
    • value

      private String value
      The value.
  • Constructor Details

    • MediaExpression

      MediaExpression(String feature, String value)
      Creates a new MediaExpression instance.
      Parameters:
      feature - the feature
      value - the value
  • Method Details

    • matches

      public boolean matches(MediaDeviceDescription deviceDescription)
      Tries to match a MediaDeviceDescription.
      Parameters:
      deviceDescription - the device description
      Returns:
      true, if successful
    • parseAbsoluteLength

      private static float parseAbsoluteLength(String value)
      Parses an absolute length.
      Parameters:
      value - the absolute length as a String value
      Returns:
      the absolute length as a float value