Package com.openhtmltopdf.css.sheet
Class StylesheetInfo
java.lang.Object
com.openhtmltopdf.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, then by
loading the uri if it is not cached.
Therefore, either a stylesheet must be set, or a uri must be set
Origin defaults to USER_AGENT and media defaults to "all"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Origin of stylesheet - authorprivate String
private int
private Stylesheet
private String
private String
private String
static final int
Origin of stylesheet - userstatic final int
Origin of stylesheet - user agent -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
getMedia()
Gets the media attribute of the StylesheetInfo objectint
Gets the origin attribute of the StylesheetInfo objectGets the stylesheet attribute of the StylesheetInfo objectgetTitle()
Gets the title attribute of the StylesheetInfo objectgetType()
Gets the type attribute of the StylesheetInfo objectgetUri()
Gets the uri attribute of the StylesheetInfo objectboolean
isInline()
void
setContent
(String content) void
Sets the media attribute of the StylesheetInfo objectvoid
setOrigin
(int origin) Sets the origin attribute of the StylesheetInfo objectvoid
setStylesheet
(Stylesheet stylesheet) Sets the stylesheet attribute of the StylesheetInfo objectvoid
Sets the title attribute of the StylesheetInfo objectvoid
Sets the type attribute of the StylesheetInfo objectvoid
Sets the uri attribute of the StylesheetInfo object
-
Field Details
-
stylesheet
-
title
-
uri
-
origin
private int origin -
type
-
mediaTypes
-
-
USER_AGENT
public static final int USER_AGENTOrigin of stylesheet - user agent- See Also:
-
USER
public static final int USEROrigin of stylesheet - user- See Also:
-
AUTHOR
public static final int AUTHOROrigin of stylesheet - author- See Also:
-
-
Constructor Details
-
StylesheetInfo
public StylesheetInfo()
-
-
Method Details
-
appliesToMedia
- Parameters:
m
- a single media identifier- Returns:
- true if the stylesheet referenced applies to the medium
-
setUri
Sets the uri attribute of the StylesheetInfo object- Parameters:
uri
- The new uri value
-
setMedia
Sets the media attribute of the StylesheetInfo object- Parameters:
media
- The new media value
-
addMedium
-
setOrigin
public void setOrigin(int origin) Sets the origin attribute of the StylesheetInfo object- Parameters:
origin
- The new origin value
-
setType
Sets the type attribute of the StylesheetInfo object- Parameters:
type
- The new type value
-
setTitle
Sets the title attribute of the StylesheetInfo object- Parameters:
title
- The new title value
-
setStylesheet
Sets the stylesheet attribute of the StylesheetInfo object- Parameters:
stylesheet
- The new stylesheet value
-
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
public int getOrigin()Gets the origin attribute of the StylesheetInfo object- Returns:
- The origin value
-
getType
Gets the type attribute of the StylesheetInfo object- Returns:
- The type value
-
getTitle
Gets the title attribute of the StylesheetInfo object- Returns:
- The title value
-
getStylesheet
Gets the stylesheet attribute of the StylesheetInfo object- Returns:
- The stylesheet value
-
getContent
-
setContent
-
isInline
public boolean isInline()
-