Class CssPseudoElementNode

java.lang.Object
com.itextpdf.styledxmlparser.css.CssContextNode
com.itextpdf.styledxmlparser.css.pseudo.CssPseudoElementNode
All Implemented Interfaces:
ICustomElementNode, IElementNode, INode, IStylesContainer

public class CssPseudoElementNode extends CssContextNode implements IElementNode, ICustomElementNode
IElementNode implementation for pseudo elements.
  • Constructor Details

    • CssPseudoElementNode

      public CssPseudoElementNode (INode parentNode, String pseudoElementName)
      Creates a new CssPseudoElementNode instance.
      Parameters:
      parentNode - the parent node
      pseudoElementName - the pseudo element name
  • Method Details

    • getPseudoElementName

      public String getPseudoElementName()
      Gets the pseudo element name.
      Returns:
      the pseudo element name
    • name

      public String name()
      Gets the name of the element node.
      Specified by:
      name in interface IElementNode
      Returns:
      the string
    • getAttributes

      public IAttributes getAttributes()
      Gets the attributes.
      Specified by:
      getAttributes in interface IElementNode
      Returns:
      the attributes
    • getAttribute

      public String getAttribute (String key)
      Gets an attribute.
      Specified by:
      getAttribute in interface IElementNode
      Parameters:
      key - the key of the attribute we want to get
      Returns:
      the value of the attribute
    • getAdditionalHtmlStyles

      public List<Map<String,String>> getAdditionalHtmlStyles()
      Gets additional styles, more specifically styles that affect an element based on its position in the HTML DOM, e.g. cell borders that are set due to the parent table "border" attribute, or styles from "col" tags that affect table elements, or blocks horizontal alignment that is the result of parent's "align" attribute.
      Specified by:
      getAdditionalHtmlStyles in interface IElementNode
      Returns:
      the additional html styles
    • addAdditionalHtmlStyles

      public void addAdditionalHtmlStyles (Map<String,String> styles)
      Adds additional HTML styles.
      Specified by:
      addAdditionalHtmlStyles in interface IElementNode
      Parameters:
      styles - the styles
    • getLang

      public String getLang()
      Gets the language.
      Specified by:
      getLang in interface IElementNode
      Returns:
      the language value