Package org.openpdf.css.sheet
Class Stylesheet
java.lang.Object
org.openpdf.css.sheet.Stylesheet
- All Implemented Interfaces:
RulesetContainer
A representation of a CSS style sheet. A Stylesheet has the sheet's rules in
Ruleset, and has an origin--either user agent, user, or author. A
Stylesheet can only be instantiated from a SAC CSSStyleSheet instance-- this
would be the output of a SAC-compliant parser after parsing a CSS stream or
source. A Stylesheet is immutable; after instantiation, you can query the
origin and the Ruleset, but not modify either of them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<FontFaceRule>private final List<StylesheetInfo>private final StylesheetInfo.Originprivate final StringThe info for this stylesheet -
Constructor Summary
ConstructorsConstructorDescriptionStylesheet(String uri, StylesheetInfo.Origin origin) Creates a new instance of Stylesheet -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContent(MediaRule rule) voidaddContent(PageRule rule) voidaddContent(Ruleset ruleset) voidaddFontFaceRule(FontFaceRule rule) voidaddImportRule(StylesheetInfo info) Gets the origin attribute of the Stylesheet objectgetURI()Gets the URI of the Stylesheet object
-
Field Details
-
_uri
The info for this stylesheet -
_origin
-
_fontFaceRules
-
_importRules
-
_contents
-
-
Constructor Details
-
Stylesheet
Creates a new instance of Stylesheet
-
-
Method Details
-
getOrigin
Gets the origin attribute of the Stylesheet object- Specified by:
getOriginin interfaceRulesetContainer- Returns:
- The origin value
-
getURI
Gets the URI of the Stylesheet object- Returns:
- The URI
-
addContent
- Specified by:
addContentin interfaceRulesetContainer
-
addContent
-
addContent
-
getContents
-
addImportRule
-
getImportRules
-
addFontFaceRule
-
getFontFaceRules
-