public class InlineBox extends Object implements Styleable
InlineBox
object will contain the content for the entire element. Otherwise multiple
InlineBox objects will be created corresponding to each
discrete chunk of text appearing in the element. It is not rendered directly
(and hence does not extend from Box), but does play an important
role in layout (for example, when calculating min/max widths). Note that it
does not contain children. Inline content is stored as a flat list in the
layout tree. However, InlineBox does contain enough
information to reconstruct the original element nesting and this is, in fact,
done during inline layout.InlineLayoutBoxpublic InlineBox(String text)
public void setTextDirection(byte direction)
direction - either LTR or RTL from BidiSplitter interface.public byte getTextDirection()
BidiSplitter interface.public String getText()
public void setText(String text)
public void applyTextTransform()
public boolean isRemovableWhitespace()
public void setRemovableWhitespace(boolean removeableWhitespace)
public boolean isEndsHere()
isStartsHere()public void setEndsHere(boolean endsHere)
isEndsHere()public boolean isStartsHere()
[b]one[i]two[/i]three[/b]
will create three InlineBox objects and one and two will return
true for isStartsHere.
This is used for example to decide whether left margin needs to be applied.public void setStartsHere(boolean startsHere)
isStartsHere()public CalculatedStyle getStyle()
public void setStyle(CalculatedStyle style)
public Element getElement()
getElement in interface Styleablepublic void setElement(Element element)
setElement in interface Styleablepublic ContentFunction getContentFunction()
public void setContentFunction(ContentFunction contentFunction)
public boolean isDynamicFunction()
public int getSpaceWidth(LayoutContext c)
public int getTrailingSpaceWidth(LayoutContext c)
public void calcMinMaxWidth(LayoutContext c, int cbWidth, boolean trimLeadingSpace)
public int getMaxWidth()
public int getMinWidth()
public int getFirstLineWidth()
public String getPseudoElementOrClass()
getPseudoElementOrClass in interface Styleablepublic void setPseudoElementOrClass(String pseudoElementOrClass)
protected void appendPositioningInfo(StringBuilder result)
public FSFunction getFunction()
public void setFunction(FSFunction function)
public void truncateText()
public void setFootnote(BlockBox footnoteBody)
public boolean hasFootnote()
public BlockBox getFootnoteBody()
Copyright © 2004–2025. All rights reserved.