Class PageMarginBoxContextNode
java.lang.Object
com.itextpdf.styledxmlparser.css.CssContextNode
com.itextpdf.styledxmlparser.css.page.PageMarginBoxContextNode
- All Implemented Interfaces:
-
ICustomElementNode
,IElementNode
,INode
,IStylesContainer
CssContextNode
implementation for page margin box contexts.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPageMarginBoxContextNode
(INode parentNode, String marginBoxName) Creates a newPageMarginBoxContextNode
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdditionalHtmlStyles
(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.void
setContainingBlockForMarginBox
(Rectangle containingBlockForMarginBox) Sets the containing block rectangle for the margin box, which is used for calculating some of the margin box properties relative values.void
setPageMarginBoxRectangle
(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, 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
-
Field Details
-
PAGE_MARGIN_BOX_TAG
The Constant PAGE_MARGIN_BOX_TAG.- See Also:
-
-
Constructor Details
-
PageMarginBoxContextNode
Creates a newPageMarginBoxContextNode
instance.- 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
- theRectangle
defining position and dimensions of the margin box content area
-
getPageMarginBoxRectangle
Gets the rectangle in which page margin box contents should be shown.- Returns:
-
the
Rectangle
defining 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
- theRectangle
which is used as a reference for some margin box relative properties calculations.
-
getContainingBlockForMarginBox
- Returns:
-
the
Rectangle
which is used as a reference for some margin box relative properties calculations.
-
name
Description copied from interface:IElementNode
Gets the name of the element node.- Specified by:
-
name
in interfaceIElementNode
- Returns:
- the string
-
getAttributes
Description copied from interface:IElementNode
Gets the attributes.- Specified by:
-
getAttributes
in interfaceIElementNode
- Returns:
- the attributes
-
getAttribute
Description copied from interface:IElementNode
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
Description copied from interface:IElementNode
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
Description copied from interface:IElementNode
Adds additional HTML styles.- Specified by:
-
addAdditionalHtmlStyles
in interfaceIElementNode
- Parameters:
-
styles
- the styles
-
getLang
Description copied from interface:IElementNode
Gets the language.- Specified by:
-
getLang
in interfaceIElementNode
- Returns:
- the language value
-