Class MediaExpression
- java.lang.Object
-
- com.itextpdf.styledxmlparser.css.media.MediaExpression
-
public class MediaExpression extends java.lang.Object
Class that bundles all the media expression properties.
-
-
Field Summary
Fields Modifier and Type Field Description private static float
DEFAULT_FONT_SIZE
The default font size.private java.lang.String
feature
The feature.private boolean
maxPrefix
Indicates if there's a "max-" prefix.private boolean
minPrefix
Indicates if there's a "min-" prefix.private java.lang.String
value
The value.
-
Constructor Summary
Constructors Constructor Description MediaExpression(java.lang.String feature, java.lang.String value)
Creates a newMediaExpression
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(MediaDeviceDescription deviceDescription)
Tries to match aMediaDeviceDescription
.private static float
parseAbsoluteLength(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 newMediaExpression
instance.- 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 aString
value- Returns:
- the absolute length as a
float
value
-
-