Package org.xhtmlrenderer.css.sheet
Class StylesheetInfo
java.lang.Object
org.xhtmlrenderer.css.sheet.StylesheetInfo
A reference to a stylesheet. If no stylesheet is set, the matcher will try to
find the stylesheet by uri, first from the StylesheetFactory cache, then by
loading the uri if it is not cached.
Therefore, either a stylesheet must be set, or an uri must be set
Origin defaults to USER_AGENT and media defaults to "all"
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable String
private final StylesheetInfo.Origin
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionStylesheetInfo
(StylesheetInfo.Origin origin, String uri, List<String> mediaTypes, @Nullable String content) -
Method Summary
Modifier and TypeMethodDescriptionboolean
appliesToMedia
(String media) Checks if this stylesheet applies to given mediumgetMedia()
Gets the media attribute of the StylesheetInfo objectGets the origin attribute of the StylesheetInfo objectgetUri()
Gets the uri attribute of the StylesheetInfo objectmediaTypes
(String media) toString()
-
Field Details
-
uri
-
origin
-
mediaTypes
-
-
-
Constructor Details
-
StylesheetInfo
public StylesheetInfo(StylesheetInfo.Origin origin, String uri, List<String> mediaTypes, @Nullable String content)
-
-
Method Details
-
appliesToMedia
Checks if this stylesheet applies to given medium- Parameters:
media
- a single media identifier- Returns:
- true if the stylesheet referenced applies to the medium
-
mediaTypes
-
getUri
Gets the uri attribute of the StylesheetInfo object- Returns:
- The uri value
-
getMedia
Gets the media attribute of the StylesheetInfo object- Returns:
- The media value
-
getOrigin
Gets the origin attribute of the StylesheetInfo object- Returns:
- The origin value
-
getContent
-
toString
-