Package org.xhtmlrenderer.render
Class InlineBox
- java.lang.Object
-
- org.xhtmlrenderer.render.InlineBox
-
- All Implemented Interfaces:
Styleable
public class InlineBox extends java.lang.Object implements Styleable
A class which reprsents a portion of an inline element. If an inline element does not contain any nested elements, then a singleInlineBoxobject will contain the content for the entire element. Otherwise multipleInlineBoxobjects will be created corresponding to each discrete chunk of text appearing in the elment. It is not rendered directly (and hence does not extend fromBox), 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,InlineBoxdoes contain enough information to reconstruct the original element nesting and this is, in fact, done during inline layout.- See Also:
InlineLayoutBox
-
-
Constructor Summary
Constructors Constructor Description InlineBox(java.lang.String text, org.w3c.dom.Text textNode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyTextTransform()voidcalcMinMaxWidth(LayoutContext c, int cbWidth, boolean trimLeadingSpace)ContentFunctiongetContentFunction()org.w3c.dom.ElementgetElement()intgetFirstLineWidth()FSFunctiongetFunction()intgetMaxWidth()intgetMinWidth()java.lang.StringgetPseudoElementOrClass()intgetSpaceWidth(LayoutContext c)CalculatedStylegetStyle()java.lang.StringgetText()org.w3c.dom.TextgetTextNode()intgetTrailingSpaceWidth(LayoutContext c)booleanisDynamicFunction()booleanisEndsHere()booleanisRemovableWhitespace()booleanisStartsHere()voidsetContentFunction(ContentFunction contentFunction)voidsetElement(org.w3c.dom.Element element)voidsetEndsHere(boolean endsHere)voidsetFunction(FSFunction function)voidsetPseudoElementOrClass(java.lang.String pseudoElementOrClass)voidsetRemovableWhitespace(boolean removeableWhitespace)voidsetStartsHere(boolean startsHere)voidsetStyle(CalculatedStyle style)voidsetText(java.lang.String text)java.lang.StringtoString()voidtruncateText()
-
-
-
Method Detail
-
getText
public java.lang.String getText()
-
setText
public void setText(java.lang.String text)
-
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
public CalculatedStyle getStyle()
-
setStyle
public void setStyle(CalculatedStyle style)
-
getElement
public org.w3c.dom.Element getElement()
- Specified by:
getElementin interfaceStyleable
-
setElement
public void setElement(org.w3c.dom.Element element)
- Specified by:
setElementin interfaceStyleable
-
getContentFunction
public ContentFunction getContentFunction()
-
setContentFunction
public void setContentFunction(ContentFunction contentFunction)
-
isDynamicFunction
public boolean isDynamicFunction()
-
getSpaceWidth
public int getSpaceWidth(LayoutContext c)
-
getTrailingSpaceWidth
public int getTrailingSpaceWidth(LayoutContext c)
-
calcMinMaxWidth
public void calcMinMaxWidth(LayoutContext c, int cbWidth, boolean trimLeadingSpace)
-
getMaxWidth
public int getMaxWidth()
-
getMinWidth
public int getMinWidth()
-
getFirstLineWidth
public int getFirstLineWidth()
-
getPseudoElementOrClass
public java.lang.String getPseudoElementOrClass()
- Specified by:
getPseudoElementOrClassin interfaceStyleable
-
setPseudoElementOrClass
public void setPseudoElementOrClass(java.lang.String pseudoElementOrClass)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFunction
public FSFunction getFunction()
-
setFunction
public void setFunction(FSFunction function)
-
truncateText
public void truncateText()
-
getTextNode
public org.w3c.dom.Text getTextNode()
-
-