Class PageMarginBoxContextNode
java.lang.Object
com.itextpdf.styledxmlparser.css.CssContextNode
com.itextpdf.styledxmlparser.css.page.PageMarginBoxContextNode
- All Implemented Interfaces:
IAttributesContainer, ICustomElementNode, IElementNode, INameContainer, INode, IStylesContainer
CssContextNode implementation for page margin box contexts.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPageMarginBoxContextNode(INode parentNode, String marginBoxName) Creates a newPageMarginBoxContextNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdditionalHtmlStyles(Map<String, String> styles) Adds additional HTML styles.Gets additional styles, more specifically styles that affect an element based on its position in the HTML DOM, e.g.getAttribute(String key) Gets an attribute.Gets the attributes.getLang()Gets the language.Gets the margin box name.Gets the rectangle in which page margin box contents should be shown.name()Gets the name of the element node.voidsetContainingBlockForMarginBox(Rectangle containingBlockForMarginBox) Sets the containing block rectangle for the margin box, which is used for calculating some of the margin box properties relative values.voidsetPageMarginBoxRectangle(Rectangle pageMarginBoxRectangle) Sets the rectangle in which page margin box contents are shown.Methods inherited from class CssContextNode
addChild, childNodes, getStyles, parentNode, setStylesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface INode
addChild, childNodes, parentNodeMethods inherited from interface IStylesContainer
getStyles, setStyles
-
Field Details
-
PAGE_MARGIN_BOX_TAG
-
marginBoxName
The margin box name. -
pageMarginBoxRectangle
-
containingBlockForMarginBox
-
-
Constructor Details
-
PageMarginBoxContextNode
Creates a newPageMarginBoxContextNodeinstance.- Parameters:
parentNode- the parent nodemarginBoxName- the margin box name
-
-
Method Details
-
getMarginBoxName
-
setPageMarginBoxRectangle
-
getPageMarginBoxRectangle
-
setContainingBlockForMarginBox
Sets the containing block rectangle for the margin box, which is used for calculating some of the margin box properties relative values.- Parameters:
containingBlockForMarginBox- theRectanglewhich is used as a reference for some margin box relative properties calculations.
-
getContainingBlockForMarginBox
-
name
Description copied from interface:INameContainerGets the name of the element node.- Specified by:
namein interfaceINameContainer- Returns:
- the string
-
getAttributes
Description copied from interface:IAttributesContainerGets the attributes.- Specified by:
getAttributesin interfaceIAttributesContainer- Returns:
- the attributes
-
getAttribute
Description copied from interface:IAttributesContainerGets an attribute.- Specified by:
getAttributein interfaceIAttributesContainer- Parameters:
key- the key of the attribute we want to get- Returns:
- the value of the attribute
-
getAdditionalHtmlStyles
Description copied from interface:IElementNodeGets 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:
getAdditionalHtmlStylesin interfaceIElementNode- Returns:
- the additional html styles
-
addAdditionalHtmlStyles
Description copied from interface:IElementNodeAdds additional HTML styles.- Specified by:
addAdditionalHtmlStylesin interfaceIElementNode- Parameters:
styles- the styles
-
getLang
Description copied from interface:IElementNodeGets the language.- Specified by:
getLangin interfaceIElementNode- Returns:
- the language value
-