Class InlineLayoutBox

java.lang.Object
org.xhtmlrenderer.render.Box
org.xhtmlrenderer.render.InlineLayoutBox
All Implemented Interfaces:
InlinePaintable, Styleable

public final class InlineLayoutBox extends Box implements InlinePaintable
A Box which contains the portion of an inline element laid 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 Details

    • _baseline

      private int _baseline
    • _startsHere

      private boolean _startsHere
    • _endsHere

      private boolean _endsHere
    • _inlineChildren

      private final List<Object> _inlineChildren
    • _pending

      private boolean _pending
    • _inlineWidth

      private int _inlineWidth
    • _textDecorations

      private List<TextDecoration> _textDecorations
    • _containingBlockWidth

      private int _containingBlockWidth
  • Constructor Details

  • Method Details

    • copyOf

      public InlineLayoutBox copyOf()
    • 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, Object child)
    • addInlineChild

      public void addInlineChild(LayoutContext c, Object child, boolean callUnmarkPending)
    • getInlineChildren

      public List<Object> getInlineChildren()
    • getInlineChild

      public Object getInlineChild(int i)
    • getInlineWidth

      public int getInlineWidth(CssContext cssContext)
    • prunePending

      public void prunePending()
    • 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)
    • unmarkPending

      public void unmarkPending(LayoutContext c)
    • connectChildrenToCurrentLayer

      public void connectChildrenToCurrentLayer(LayoutContext c)
      Overrides:
      connectChildrenToCurrentLayer in class Box
    • paintSelection

      public void paintSelection(RenderingContext c)
    • paintInline

      public void paintInline(RenderingContext c)
      Specified by:
      paintInline in interface InlinePaintable
    • getBorderSides

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

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

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

      public 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, Shape clip)
    • getTextDecorations

      public List<TextDecoration> getTextDecorations()
    • setTextDecorations

      public void setTextDecorations(List<TextDecoration> textDecoration)
    • addToContentList

      private void addToContentList(List<Box> list)
    • getLineBox

      public LineBox getLineBox()
    • getElementWithContent

      public List<Box> getElementWithContent()
    • addFollowingBlockBoxes

      private AnonymousBlockBox addFollowingBlockBoxes(BlockBox container, List<Box> result)
    • containsEnd

      private boolean containsEnd(List<Box> result)
    • getElementBoxes

      public List<Box> getElementBoxes(Element elem)
      Overrides:
      getElementBoxes in class Box
    • positionRelative

      public Dimension positionRelative(CssContext cssCtx)
      Overrides:
      positionRelative in class Box
    • addAllChildren

      public void addAllChildren(List<Box> list, Layer layer)
    • paintDebugOutline

      public void paintDebugOutline(RenderingContext c)
    • resetChildren

      protected void resetChildren(LayoutContext c)
      Overrides:
      resetChildren in class Box
    • removeChild

      public void removeChild(Box child)
      Overrides:
      removeChild in class Box
    • removeChild

      public void removeChild(int i)
      Overrides:
      removeChild in class Box
    • getPrevious

      protected Box getPrevious(Box child)
      Overrides:
      getPrevious in class Box
    • getNext

      protected Box getNext(Box child)
      Overrides:
      getNext in class Box
    • calcCanvasLocation

      public void calcCanvasLocation()
      Specified by:
      calcCanvasLocation in class Box
    • calcChildLocations

      public void calcChildLocations()
      Overrides:
      calcChildLocations in class Box
    • clearSelection

      public void clearSelection(List<Box> modified)
      Overrides:
      clearSelection in class Box
    • selectAll

      public void selectAll()
      Overrides:
      selectAll in class Box
    • calcChildPaintingInfo

      protected void calcChildPaintingInfo(CssContext c, PaintingInfo result, boolean useCache)
      Overrides:
      calcChildPaintingInfo 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
    • getContainingBlockWidth

      public int getContainingBlockWidth()
      Overrides:
      getContainingBlockWidth in class Box
    • setContainingBlockWidth

      public void setContainingBlockWidth(int containingBlockWidth)
    • toString

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

      public String dump(LayoutContext c, String indent, int which)
      Specified by:
      dump in class Box
    • restyle

      public void restyle(LayoutContext c)
      Overrides:
      restyle in class Box
    • restyleChildren

      protected void restyleChildren(LayoutContext c)
      Overrides:
      restyleChildren in class Box
    • getRestyleTarget

      public Box getRestyleTarget()
      Overrides:
      getRestyleTarget in class Box
    • collectText

      public void collectText(RenderingContext c, StringBuilder buffer) throws IOException
      Overrides:
      collectText in class Box
      Throws:
      IOException
    • countJustifiableChars

      public void countJustifiableChars(CharCounts counts)
    • adjustHorizontalPosition

      public float adjustHorizontalPosition(JustificationInfo info, float adjust)
    • getEffectiveWidth

      public int getEffectiveWidth()
      Overrides:
      getEffectiveWidth in class Box