Class CssRuleSet

java.lang.Object
com.itextpdf.styledxmlparser.css.CssStatement
com.itextpdf.styledxmlparser.css.CssRuleSet
Direct Known Subclasses:
CssNonStandardRuleSet

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

    • IMPORTANT_MATCHER

      private static final Pattern IMPORTANT_MATCHER
      Pattern to match "important" in a rule declaration.
    • selector

      private ICssSelector selector
      The CSS selector.
    • normalDeclarations

      private List<CssDeclaration> normalDeclarations
      The normal CSS declarations.
    • importantDeclarations

      private List<CssDeclaration> importantDeclarations
      The important CSS declarations.
  • Constructor Details

  • 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
    • splitDeclarationsIntoNormalAndImportant

      private static void splitDeclarationsIntoNormalAndImportant(List<CssDeclaration> declarations, List<CssDeclaration> normalDeclarations, List<CssDeclaration> importantDeclarations)
      Split CSS declarations into normal and important CSS declarations.
      Parameters:
      declarations - the declarations