public class InlineBox extends java.lang.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 elment. 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.InlineLayoutBox
Constructor and Description |
---|
InlineBox(java.lang.String text,
org.w3c.dom.Text textNode) |
Modifier and Type | Method and Description |
---|---|
void |
applyTextTransform() |
void |
calcMinMaxWidth(LayoutContext c,
int cbWidth,
boolean trimLeadingSpace) |
ContentFunction |
getContentFunction() |
org.w3c.dom.Element |
getElement() |
int |
getFirstLineWidth() |
FSFunction |
getFunction() |
int |
getMaxWidth() |
int |
getMinWidth() |
java.lang.String |
getPseudoElementOrClass() |
int |
getSpaceWidth(LayoutContext c) |
CalculatedStyle |
getStyle() |
java.lang.String |
getText() |
org.w3c.dom.Text |
getTextNode() |
int |
getTrailingSpaceWidth(LayoutContext c) |
boolean |
isDynamicFunction() |
boolean |
isEndsHere() |
boolean |
isRemovableWhitespace() |
boolean |
isStartsHere() |
void |
setContentFunction(ContentFunction contentFunction) |
void |
setElement(org.w3c.dom.Element element) |
void |
setEndsHere(boolean endsHere) |
void |
setFunction(FSFunction function) |
void |
setPseudoElementOrClass(java.lang.String pseudoElementOrClass) |
void |
setRemovableWhitespace(boolean removeableWhitespace) |
void |
setStartsHere(boolean startsHere) |
void |
setStyle(CalculatedStyle style) |
void |
setText(java.lang.String text) |
java.lang.String |
toString() |
void |
truncateText() |
public java.lang.String getText()
public void setText(java.lang.String text)
public void applyTextTransform()
public boolean isRemovableWhitespace()
public void setRemovableWhitespace(boolean removeableWhitespace)
public boolean isEndsHere()
public void setEndsHere(boolean endsHere)
public boolean isStartsHere()
public void setStartsHere(boolean startsHere)
public CalculatedStyle getStyle()
public void setStyle(CalculatedStyle style)
public org.w3c.dom.Element getElement()
getElement
in interface Styleable
public void setElement(org.w3c.dom.Element element)
setElement
in interface Styleable
public 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 java.lang.String getPseudoElementOrClass()
getPseudoElementOrClass
in interface Styleable
public void setPseudoElementOrClass(java.lang.String pseudoElementOrClass)
public java.lang.String toString()
toString
in class java.lang.Object
public FSFunction getFunction()
public void setFunction(FSFunction function)
public void truncateText()
public org.w3c.dom.Text getTextNode()