Class PageMarginBoxContextNode

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

public class PageMarginBoxContextNode extends CssContextNode implements ICustomElementNode
CssContextNode implementation for page margin box contexts.
  • Field Details

    • PAGE_MARGIN_BOX_TAG

      public static final String PAGE_MARGIN_BOX_TAG
      The Constant PAGE_MARGIN_BOX_TAG.
      See Also:
  • Constructor Details

    • PageMarginBoxContextNode

      public PageMarginBoxContextNode (INode parentNode, String marginBoxName)
      Creates a new PageMarginBoxContextNode instance.
      Parameters:
      parentNode - the parent node
      marginBoxName - the margin box name
  • Method Details

    • getMarginBoxName

      public String getMarginBoxName()
      Gets the margin box name.
      Returns:
      the margin box name
    • setPageMarginBoxRectangle

      public void setPageMarginBoxRectangle (Rectangle pageMarginBoxRectangle)
      Sets the rectangle in which page margin box contents are shown.
      Parameters:
      pageMarginBoxRectangle - the Rectangle defining position and dimensions of the margin box content area
    • getPageMarginBoxRectangle

      public Rectangle 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

      public 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.
      Parameters:
      containingBlockForMarginBox - the Rectangle which is used as a reference for some margin box relative properties calculations.
    • getContainingBlockForMarginBox

      public Rectangle getContainingBlockForMarginBox()
      Returns:
      the Rectangle which is used as a reference for some margin box relative properties calculations.
    • name

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

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

      public String getAttribute (String key)
      Description copied from interface: IElementNode
      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()
      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 interface IElementNode
      Returns:
      the additional html styles
    • addAdditionalHtmlStyles

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

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