Class CssRuleSet

java.lang.Object
com.itextpdf.styledxmlparser.css.CssStatement
com.itextpdf.styledxmlparser.css.CssRuleSet

public class CssRuleSet extends CssStatement
Class to store a CSS rule set.
  • Constructor Details

    • CssRuleSet

      public CssRuleSet (ICssSelector selector, List<CssDeclaration> declarations)
      Creates a new CssRuleSet from selector and raw list of declarations. The declarations are split into normal and important under the hood. To construct the CssRuleSet instance from normal and important declarations, see CssRuleSet(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 new CssRuleSet from 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

      public List<CssRuleSet> getCssRuleSets (INode element, MediaDeviceDescription deviceDescription)
      Description copied from class: CssStatement
      Gets a list of CssRuleSet objects.
      Overrides:
      getCssRuleSets in class CssStatement
      Parameters:
      element - a node
      deviceDescription - a media device description
      Returns:
      the css rule sets
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSelector

      public ICssSelector getSelector()
      Gets the CSS selector.
      Returns:
      the CSS selector
    • getNormalDeclarations

      public List<CssDeclaration> getNormalDeclarations()
      Gets the normal CSS declarations.
      Returns:
      the normal declarations
    • getImportantDeclarations

      public List<CssDeclaration> getImportantDeclarations()
      Gets the important CSS declarations.
      Returns:
      the important declarations