Package org.xhtmlrenderer.render
Class InlineBox
java.lang.Object
org.xhtmlrenderer.render.InlineBox
- All Implemented Interfaces:
Styleable
A class which reprsents a portion of an inline element. If an inline element
does not contain any nested elements, then a single
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.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
calcMinMaxWidth
(LayoutContext c, int cbWidth, boolean trimLeadingSpace) int
int
int
int
getStyle()
getText()
int
boolean
boolean
boolean
boolean
void
setContentFunction
(ContentFunction contentFunction) void
setElement
(Element element) void
setEndsHere
(boolean endsHere) void
setFunction
(FSFunction function) void
setPseudoElementOrClass
(String pseudoElementOrClass) void
setRemovableWhitespace
(boolean removeableWhitespace) void
setStartsHere
(boolean startsHere) void
setStyle
(CalculatedStyle style) void
toString()
void
-
Constructor Details
-
InlineBox
-
-
Method Details
-
getText
-
setText
-
applyTextTransform
public void applyTextTransform() -
isRemovableWhitespace
public boolean isRemovableWhitespace() -
setRemovableWhitespace
public void setRemovableWhitespace(boolean removeableWhitespace) -
isEndsHere
public boolean isEndsHere() -
setEndsHere
public void setEndsHere(boolean endsHere) -
isStartsHere
public boolean isStartsHere() -
setStartsHere
public void setStartsHere(boolean startsHere) -
getStyle
-
setStyle
-
getElement
- Specified by:
getElement
in interfaceStyleable
-
setElement
- Specified by:
setElement
in interfaceStyleable
-
getContentFunction
-
setContentFunction
-
isDynamicFunction
public boolean isDynamicFunction() -
getSpaceWidth
-
getTrailingSpaceWidth
-
calcMinMaxWidth
-
getMaxWidth
public int getMaxWidth() -
getMinWidth
public int getMinWidth() -
getFirstLineWidth
public int getFirstLineWidth() -
getPseudoElementOrClass
- Specified by:
getPseudoElementOrClass
in interfaceStyleable
-
setPseudoElementOrClass
-
toString
-
getFunction
-
setFunction
-
truncateText
public void truncateText() -
getTextNode
-