Package com.itextpdf.styledxmlparser.css
Class CssRuleSet
java.lang.Object
com.itextpdf.styledxmlparser.css.CssStatement
com.itextpdf.styledxmlparser.css.CssRuleSet
Class to store a CSS rule set.
-
Constructor Summary
ConstructorsConstructorDescriptionCssRuleSet(ICssSelector selector, List<CssDeclaration> declarations) Creates a newCssRuleSetfrom selector and raw list of declarations.CssRuleSet(ICssSelector selector, List<CssDeclaration> normalDeclarations, List<CssDeclaration> importantDeclarations) Creates a newCssRuleSetfrom a selector and a list of normal and important declarations. -
Method Summary
Modifier and TypeMethodDescriptiongetCssRuleSets(INode element, MediaDeviceDescription deviceDescription) Gets a list ofCssRuleSetobjects.Gets the important CSS declarations.Gets the normal CSS declarations.Gets the CSS selector.toString()
-
Constructor Details
-
CssRuleSet
Creates a newCssRuleSetfrom selector and raw list of declarations. The declarations are split into normal and important under the hood. To construct theCssRuleSetinstance from normal and important declarations, seeCssRuleSet(ICssSelector, List, List)- Parameters:
-
selector- the CSS selector -
declarations- the CSS declarations
-
CssRuleSet
public CssRuleSet(ICssSelector selector, List<CssDeclaration> normalDeclarations, List<CssDeclaration> importantDeclarations) Creates a newCssRuleSetfrom a selector and a list of normal and important declarations.- Parameters:
-
selector- the CSS selector -
normalDeclarations- the list of normal declarations -
importantDeclarations- the list of important declarations
-
-
Method Details
-
getCssRuleSets
Description copied from class:CssStatementGets a list ofCssRuleSetobjects.- Overrides:
-
getCssRuleSetsin classCssStatement - Parameters:
-
element- a node -
deviceDescription- a media device description - Returns:
- the css rule sets
-
toString
-
getSelector
Gets the CSS selector.- Returns:
- the CSS selector
-
getNormalDeclarations
Gets the normal CSS declarations.- Returns:
- the normal declarations
-
getImportantDeclarations
Gets the important CSS declarations.- Returns:
- the important declarations
-