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.
-
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 com.itextpdf.styledxmlparser.css.CssContextNode
addChild, childNodes, getStyles, parentNode, setStylesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.itextpdf.styledxmlparser.node.INode
addChild, childNodes, parentNodeMethods inherited from interface com.itextpdf.styledxmlparser.node.IStylesContainer
getStyles, setStyles
-
Field Details
-
PAGE_MARGIN_BOX_TAG
The Constant PAGE_MARGIN_BOX_TAG.- See Also:
-
-
Constructor Details
-
PageMarginBoxContextNode
Creates a newPageMarginBoxContextNodeinstance.- Parameters:
-
parentNode- the parent node -
marginBoxName- the margin box name
-
-
Method Details
-
getMarginBoxName
Gets the margin box name.- Returns:
- the margin box name
-
setPageMarginBoxRectangle
Sets the rectangle in which page margin box contents are shown.- Parameters:
-
pageMarginBoxRectangle- theRectangledefining position and dimensions of the margin box content area
-
getPageMarginBoxRectangle
Gets the rectangle in which page margin box contents should be shown.- Returns:
-
the
Rectangledefining position and dimensions of the margin box content area
-
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
- Returns:
-
the
Rectanglewhich is used as a reference for some margin box relative properties calculations.
-
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
-