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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CssPseudoElementNode.AttributesStub
A simpleIAttributes
implementation.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
pseudoElementName
The pseudo element name.private java.lang.String
pseudoElementTagName
The pseudo element tag name.
-
Constructor Summary
Constructors Constructor Description CssPseudoElementNode(INode parentNode, java.lang.String pseudoElementName)
Creates a newCssPseudoElementNode
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdditionalHtmlStyles(java.util.Map<java.lang.String,java.lang.String> styles)
Adds additional HTML styles.java.util.List<java.util.Map<java.lang.String,java.lang.String>>
getAdditionalHtmlStyles()
Gets additional styles, more specifically styles that affect an element based on its position in the HTML DOM, e.g.java.lang.String
getAttribute(java.lang.String key)
Gets an attribute.IAttributes
getAttributes()
Gets the attributes.java.lang.String
getLang()
Gets the language.java.lang.String
getPseudoElementName()
Gets the pseudo element name.java.lang.String
name()
Gets the name of the element node.-
Methods inherited from class com.itextpdf.styledxmlparser.css.CssContextNode
addChild, childNodes, getStyles, parentNode, setStyles
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.itextpdf.styledxmlparser.node.INode
addChild, childNodes, parentNode
-
Methods inherited from interface com.itextpdf.styledxmlparser.node.IStylesContainer
getStyles, setStyles
-
-
-
-
Constructor Detail
-
CssPseudoElementNode
public CssPseudoElementNode(INode parentNode, java.lang.String pseudoElementName)
Creates a newCssPseudoElementNode
instance.- Parameters:
parentNode
- the parent nodepseudoElementName
- the pseudo element name
-
-
Method Detail
-
getPseudoElementName
public java.lang.String getPseudoElementName()
Gets the pseudo element name.- Returns:
- the pseudo element name
-
name
public java.lang.String name()
Gets the name of the element node.- Specified by:
name
in interfaceIElementNode
- Returns:
- the string
-
getAttributes
public IAttributes getAttributes()
Gets the attributes.- Specified by:
getAttributes
in interfaceIElementNode
- Returns:
- the attributes
-
getAttribute
public java.lang.String getAttribute(java.lang.String key)
Gets an attribute.- Specified by:
getAttribute
in interfaceIElementNode
- Parameters:
key
- the key of the attribute we want to get- Returns:
- the value of the attribute
-
getAdditionalHtmlStyles
public java.util.List<java.util.Map<java.lang.String,java.lang.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 interfaceIElementNode
- Returns:
- the additional html styles
-
addAdditionalHtmlStyles
public void addAdditionalHtmlStyles(java.util.Map<java.lang.String,java.lang.String> styles)
Adds additional HTML styles.- Specified by:
addAdditionalHtmlStyles
in interfaceIElementNode
- Parameters:
styles
- the styles
-
getLang
public java.lang.String getLang()
Gets the language.- Specified by:
getLang
in interfaceIElementNode
- Returns:
- the language value
-
-