|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.vex.layout.AbstractBox | +--net.sf.vex.layout.CompositeInlineBox | +--net.sf.vex.layout.InlineElementBox
An inline box that represents an inline element. This box is responsible for creating and laying out its child boxes.
Nested Class Summary |
Nested classes inherited from class net.sf.vex.layout.InlineBox |
InlineBox.Pair |
Constructor Summary | |
InlineElementBox(LayoutContext context,
Element element)
Class constructor. |
Method Summary | |
boolean |
canBreakAtEnd()
Returns true if a line break can occur after this box. |
int |
getBaseline()
Returns the distance from the top of the inline box to the baseline. |
Box[] |
getChildren()
Returns an array of this box's children. |
Element |
getElement()
Returns the element associated with this box. |
int |
getEndOffset()
Returns the offset of the end of the content that the box covers. |
int |
getStartOffset()
Returns the offset of the start of the content that the box covers. |
boolean |
hasContent()
Returns true if this box represents a portion of the XML document's content. |
void |
paint(LayoutContext context,
int x,
int y)
Override to paint background and borders. |
InlineBox.Pair |
split(LayoutContext context,
InlineBox[] lefts,
InlineBox[] rights)
Creates a Pair of InlineBoxes, each with its own set of children. |
java.lang.String |
toString()
|
Methods inherited from class net.sf.vex.layout.CompositeInlineBox |
getCaretShapes, split, viewToModel |
Methods inherited from class net.sf.vex.layout.AbstractBox |
containsOffset, getHeight, getWidth, getX, getY, setHeight, setWidth, setX, setY, skipPaint |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.vex.layout.Box |
containsOffset, getHeight, getWidth, getX, getY, setX, setY |
Constructor Detail |
public InlineElementBox(LayoutContext context, Element element)
context
- LayoutContext used for this layoutelement
- Element to which this box corresponds.Method Detail |
public boolean canBreakAtEnd()
InlineBox
InlineBox.canBreakAtEnd()
public int getBaseline()
InlineBox
InlineBox.getBaseline()
public Box[] getChildren()
Box
getChildren
in interface Box
getChildren
in class AbstractBox
Box.getChildren()
public Element getElement()
getElement
in interface Box
getElement
in class AbstractBox
Box.getElement()
public int getEndOffset()
Box
getEndOffset
in interface Box
getEndOffset
in class AbstractBox
Box.getEndOffset()
public int getStartOffset()
Box
getStartOffset
in interface Box
getStartOffset
in class AbstractBox
Box.getStartOffset()
public boolean hasContent()
Box
hasContent
in interface Box
hasContent
in class AbstractBox
Box.hasContent()
public void paint(LayoutContext context, int x, int y)
paint
in interface Box
paint
in class AbstractBox
context
- LayoutContext
containing the
Graphics
object into which the box should be
paintedx
- the x-offset at which the box should be paintedy
- the y-offset at which the box should be paintedAbstractBox.paint(net.sf.vex.layout.LayoutContext, int, int)
public InlineBox.Pair split(LayoutContext context, InlineBox[] lefts, InlineBox[] rights)
CompositeInlineBox
split
in class CompositeInlineBox
context
- LayoutContext used for this layout.lefts
- Child boxes to be given to the left box.rights
- Child boxes to be given to the right box.
CompositeInlineBox.split(net.sf.vex.layout.LayoutContext, net.sf.vex.layout.InlineBox[], net.sf.vex.layout.InlineBox[])
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |