org.xhtmlrenderer.layout
Class BlockFormattingContext
java.lang.Object
org.xhtmlrenderer.layout.BlockFormattingContext
public class BlockFormattingContext
- extends java.lang.Object
This class represents a block formatting context as defined in the CSS spec.
Its main purpose is to provide BFC relative coordinates for a FloatManager
.
This coordinate space is used when positioning floats and calculating the
amount of space floated boxes take up at a given y position.
NOTE: The translate(int, int)
method must be called when a
block box in the normal flow is moved (i.e. its static position changes)
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BlockFormattingContext
public BlockFormattingContext(BlockBox block,
LayoutContext c)
getOffset
public java.awt.Point getOffset()
translate
public void translate(int x,
int y)
getFloatManager
public FloatManager getFloatManager()
getLeftFloatDistance
public int getLeftFloatDistance(CssContext cssCtx,
LineBox line,
int containingBlockWidth)
getRightFloatDistance
public int getRightFloatDistance(CssContext cssCtx,
LineBox line,
int containingBlockWidth)
getFloatDistance
public int getFloatDistance(CssContext cssCtx,
LineBox line,
int containingBlockWidth)
floatBox
public void floatBox(LayoutContext c,
BlockBox floated)
clear
public void clear(LayoutContext c,
Box current)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Flying Saucer Project Home