Class InlineLayoutBox

  • All Implemented Interfaces:
    InlinePaintable, Styleable, DisplayListItem

    public class InlineLayoutBox
    extends Box
    implements InlinePaintable
    A Box which contains the portion of an inline element layed out on a single line. It may contain content from several InlineBox objects if the original inline element was interrupted by nested content. Unlike other boxes, its children may be either Box objects (for example, a box with display: inline-block) or InlineText objects. For this reason, it's children are not stored in the children property, but instead stored in the inlineChildren property.
    • Field Detail

      • _baseline

        private int _baseline
      • _startsHere

        private boolean _startsHere
      • _endsHere

        private boolean _endsHere
      • _inlineChildren

        private java.util.List<java.lang.Object> _inlineChildren
      • _pending

        private boolean _pending
      • _inlineWidth

        private int _inlineWidth
      • _textDecorations

        private java.util.List<TextDecoration> _textDecorations
      • _containingBlockWidth

        private int _containingBlockWidth
    • Constructor Detail

      • InlineLayoutBox

        private InlineLayoutBox()
    • Method Detail

      • calculateHeight

        public void calculateHeight​(LayoutContext c)
      • getBaseline

        public int getBaseline()
      • setBaseline

        public void setBaseline​(int baseline)
      • getInlineChildCount

        public int getInlineChildCount()
      • addInlineChild

        public void addInlineChild​(LayoutContext c,
                                   java.lang.Object child)
      • addInlineChild

        public void addInlineChild​(LayoutContext c,
                                   java.lang.Object child,
                                   boolean callUnmarkPending)
      • getInlineChildren

        public java.util.List<java.lang.Object> getInlineChildren()
        Either Box, including InlineLayoutBox or InlineText objects.
      • getInlineChild

        public java.lang.Object getInlineChild​(int i)
      • getInlineWidth

        public int getInlineWidth​(CssContext cssCtx)
      • isEndsHere

        public boolean isEndsHere()
      • setEndsHere

        public void setEndsHere​(boolean endsHere)
      • isStartsHere

        public boolean isStartsHere()
      • setStartsHere

        public void setStartsHere​(boolean startsHere)
      • isPending

        public boolean isPending()
      • setPending

        public void setPending​(boolean b)
      • isAllTextItems

        public boolean isAllTextItems​(CssContext c)
      • getBorderSides

        public int getBorderSides()
        Overrides:
        getBorderSides in class Box
      • getBorderEdge

        public java.awt.Rectangle getBorderEdge​(int left,
                                                int top,
                                                CssContext cssCtx)
        Overrides:
        getBorderEdge in class Box
      • getMarginEdge

        public java.awt.Rectangle getMarginEdge​(int left,
                                                int top,
                                                CssContext cssCtx,
                                                int tx,
                                                int ty)
        Overrides:
        getMarginEdge in class Box
      • getContentAreaEdge

        public java.awt.Rectangle getContentAreaEdge​(int left,
                                                     int top,
                                                     CssContext cssCtx)
        Overrides:
        getContentAreaEdge in class Box
      • getLeftMarginBorderPadding

        public int getLeftMarginBorderPadding​(CssContext cssCtx)
      • getRightMarginPaddingBorder

        public int getRightMarginPaddingBorder​(CssContext cssCtx)
      • getInlineWidth

        public int getInlineWidth()
      • setInlineWidth

        public void setInlineWidth​(int inlineWidth)
      • isContainsVisibleContent

        public boolean isContainsVisibleContent()
      • intersectsInlineBlocks

        public boolean intersectsInlineBlocks​(CssContext cssCtx,
                                              java.awt.Shape clip)
      • getTextDecorations

        public java.util.List<TextDecoration> getTextDecorations()
      • setTextDecorations

        public void setTextDecorations​(java.util.List<TextDecoration> textDecoration)
      • addToContentList

        private void addToContentList​(java.util.List<Box> list)
      • getLineBox

        public LineBox getLineBox()
      • getElementWithContent

        public java.util.List<Box> getElementWithContent()
      • isEndingBox

        private boolean isEndingBox​(Box b)
      • containsEnd

        private boolean containsEnd​(java.util.List<Box> result)
      • getElementBoxes

        public java.util.List<Box> getElementBoxes​(org.w3c.dom.Element elem)
        Overrides:
        getElementBoxes in class Box
      • addAllChildren

        public void addAllChildren​(java.util.List<? super Box> list,
                                   Layer layer)
      • removeChild

        public boolean removeChild​(Box child)
        Removes a child box if it is indeed a child and adjusts the index of subsequent children. Returns whether this was a child.
        Overrides:
        removeChild in class Box
      • removeChild

        public boolean removeChild​(int i)
        Removes child by index and adjusts the index of subsequent children. Returns true if this box has children, throws if the index is out-of-bounds.

        IMPORTANT: This method must be kept in sync with Box.removeChild(Box)
        Overrides:
        removeChild in class Box
      • getNext

        protected Box getNext​(Box child)
        Overrides:
        getNext in class Box
      • lookForDynamicFunctions

        public void lookForDynamicFunctions​(RenderingContext c)
      • findTrailingText

        public InlineText findTrailingText()
      • calculateTextDecoration

        public void calculateTextDecoration​(LayoutContext c)
      • find

        public Box find​(CssContext cssCtx,
                        int absX,
                        int absY,
                        boolean findAnonymous)
        Overrides:
        find in class Box
      • setContainingBlockWidth

        public void setContainingBlockWidth​(int containingBlockWidth)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class Box
      • dump

        public java.lang.String dump​(LayoutContext c,
                                     java.lang.String indent,
                                     int which)
        Specified by:
        dump in class Box
      • countJustifiableChars

        public void countJustifiableChars​(CharCounts counts)
      • adjustHorizontalPosition

        public float adjustHorizontalPosition​(JustificationInfo info,
                                              float adjust)
      • adjustHorizontalPositionRTL

        public float adjustHorizontalPositionRTL​(JustificationInfo info,
                                                 float adjust)