Class BoxImpl

  • All Implemented Interfaces:
    Box, ContentRect, GenericTreeNode<Box>, Rect

    public class BoxImpl
    extends DefaultBox
    A standard box implementation extended by additional properties necessary for building the resulting tree correctly.
    Author:
    burgetr
    • Constructor Detail

      • BoxImpl

        public BoxImpl​(BoxList parentList)
    • Method Detail

      • getParentList

        public BoxList getParentList()
      • getOffsetParent

        public BoxImpl getOffsetParent()
      • setOffsetParent

        public void setOffsetParent​(BoxImpl offsetParent)
      • getDomParent

        public BoxImpl getDomParent()
      • setDomParent

        public void setDomParent​(BoxImpl domParent)
      • isAbsolute

        public boolean isAbsolute()
      • setAbsolute

        public void setAbsolute​(boolean absolute)
      • isFixed

        public boolean isFixed()
      • setFixed

        public void setFixed​(boolean fixed)
      • isClipping

        public boolean isClipping()
      • setClipping

        public void setClipping​(boolean clipping)
      • getIntrinsicTextStyle

        public TextStyle getIntrinsicTextStyle()
      • setIntrinsicTextStyle

        public void setIntrinsicTextStyle​(TextStyle intrinsicTextStyle)
      • getIntrinsicBounds

        public Rectangular getIntrinsicBounds()
        Returns the bounds of the box as obtained from the renderer. This should correspond to the border bounds of the box in the CSS terminology. This value is used when a box tree is being constructed from individual boxes obtained from the renderer (e.g. using BaseBoxTreeBuilder).
        Returns:
        the intrinsic bounds of the box
      • setIntrinsicBounds

        public void setIntrinsicBounds​(Rectangular intrinsicBounds)
      • applyIntrinsicBounds

        public void applyIntrinsicBounds()
        Applies the intrinsic bounds as the initial content bounds.
      • getClipBox

        public BoxImpl getClipBox()
        Finds the nearest ancestor that may clip the contents of this box (it has the 'overflow' value different from 'visible');
        Returns:
        an ancestor box used for clipping or null when there is no such box