Flying Saucer Project Release ${app.version}

org.xhtmlrenderer.render
Class InlineBox

java.lang.Object
  extended by 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 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:
InlineLayoutBox

Constructor Summary
InlineBox(java.lang.String text, org.w3c.dom.Text textNode)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InlineBox

public InlineBox(java.lang.String text,
                 org.w3c.dom.Text textNode)
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()
Specified by:
getStyle in interface Styleable

setStyle

public void setStyle(CalculatedStyle style)
Specified by:
setStyle in interface Styleable

getElement

public org.w3c.dom.Element getElement()
Specified by:
getElement in interface Styleable

setElement

public void setElement(org.w3c.dom.Element element)
Specified by:
setElement in interface Styleable

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:
getPseudoElementOrClass in interface Styleable

setPseudoElementOrClass

public void setPseudoElementOrClass(java.lang.String pseudoElementOrClass)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFunction

public FSFunction getFunction()

setFunction

public void setFunction(FSFunction function)

truncateText

public void truncateText()

getTextNode

public org.w3c.dom.Text getTextNode()

Flying Saucer Project Release ${app.version}

Flying Saucer Project Home