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
ConstructorDescriptionCssRuleSet
(ICssSelector selector, List<CssDeclaration> declarations) Creates a newCssRuleSet
from selector and raw list of declarations.CssRuleSet
(ICssSelector selector, List<CssDeclaration> normalDeclarations, List<CssDeclaration> importantDeclarations) -
Method Summary
Modifier and TypeMethodDescriptiongetCssRuleSets
(INode element, MediaDeviceDescription deviceDescription) Gets a list ofCssRuleSet
objects.Gets the important CSS declarations.Gets the normal CSS declarations.Gets the CSS selector.toString()
-
Constructor Details
-
CssRuleSet
Creates a newCssRuleSet
from selector and raw list of declarations. The declarations are split into normal and important under the hood. To construct theCssRuleSet
instance 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)
-
-
Method Details
-
getCssRuleSets
Description copied from class:CssStatement
Gets a list ofCssRuleSet
objects.- Overrides:
-
getCssRuleSets
in 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
-