Class MediaExpression
- java.lang.Object
-
- com.itextpdf.styledxmlparser.css.media.MediaExpression
-
public class MediaExpression extends java.lang.ObjectClass that bundles all the media expression properties.
-
-
Field Summary
Fields Modifier and Type Field Description private static floatDEFAULT_FONT_SIZEThe default font size.private java.lang.StringfeatureThe feature.private booleanmaxPrefixIndicates if there's a "max-" prefix.private booleanminPrefixIndicates if there's a "min-" prefix.private java.lang.StringvalueThe value.
-
Constructor Summary
Constructors Constructor Description MediaExpression(java.lang.String feature, java.lang.String value)Creates a newMediaExpressioninstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanmatches(MediaDeviceDescription deviceDescription)Tries to match aMediaDeviceDescription.private static floatparseAbsoluteLength(java.lang.String value)Parses an absolute length.
-
-
-
Field Detail
-
DEFAULT_FONT_SIZE
private static final float DEFAULT_FONT_SIZE
The default font size.- See Also:
- Constant Field Values
-
minPrefix
private boolean minPrefix
Indicates if there's a "min-" prefix.
-
maxPrefix
private boolean maxPrefix
Indicates if there's a "max-" prefix.
-
feature
private java.lang.String feature
The feature.
-
value
private java.lang.String value
The value.
-
-
Constructor Detail
-
MediaExpression
MediaExpression(java.lang.String feature, java.lang.String value)Creates a newMediaExpressioninstance.- Parameters:
feature- the featurevalue- the value
-
-
Method Detail
-
matches
public boolean matches(MediaDeviceDescription deviceDescription)
Tries to match aMediaDeviceDescription.- Parameters:
deviceDescription- the device description- Returns:
- true, if successful
-
parseAbsoluteLength
private static float parseAbsoluteLength(java.lang.String value)
Parses an absolute length.- Parameters:
value- the absolute length as aStringvalue- Returns:
- the absolute length as a
floatvalue
-
-