org.jfree.layouting.renderer.process

Class ValidateModelStep

public class ValidateModelStep extends IterateStructuralProcessStep

This step checks, whether the model will be layoutable. Closed nodes are always layoutable. Nodes are non-layoutable, if they contain boxes with a width or margin of 'auto', tables with auto-width columns or if there is an open out-of-normal-flow element (floating or positioned element). if the preferred width is AUTO, then we have to check the whole thing. If (according to CSS3-Box) the width computes to the intrinsic width, then the layout is not computable yet. For now, we always assume that all elements have a horizontal flow. That simplifies all tests to whether the element is a flow root. For tables, the choice is a bit more complex. If the table uses the auto table-layout algorithm, the model is layoutable, if the table has no auto-width columns. If the table uses the fixed layout algorithm, the width of the table is auto but all columns have a non-auto-width, then the model will be layoutable at once. Columns with an auto-width in a fixed table model become layoutable as soon as the first row of data has been given.

Author: Thomas Morgner

Field Summary
static intBOX_MUST_BE_CLOSED
static intLAYOUT_OK
static intNEED_MORE_DATA
Constructor Summary
ValidateModelStep()
Method Summary
protected voidfinishBlockBox(BlockRenderBox box)
ObjectgetLayoutFailureNodeId()
intgetLayoutFailureResolution()
booleanisLayoutable(LogicalPageBox root)
protected booleanstartBlockBox(BlockRenderBox box)
protected booleanstartInlineBox(InlineRenderBox box)
protected voidstartNormalFlow(NormalFlowRenderBox box)

Field Detail

BOX_MUST_BE_CLOSED

public static final int BOX_MUST_BE_CLOSED

LAYOUT_OK

public static final int LAYOUT_OK

NEED_MORE_DATA

public static final int NEED_MORE_DATA

Constructor Detail

ValidateModelStep

public ValidateModelStep()

Method Detail

finishBlockBox

protected void finishBlockBox(BlockRenderBox box)

getLayoutFailureNodeId

public Object getLayoutFailureNodeId()

getLayoutFailureResolution

public int getLayoutFailureResolution()

isLayoutable

public boolean isLayoutable(LogicalPageBox root)

startBlockBox

protected boolean startBlockBox(BlockRenderBox box)

startInlineBox

protected boolean startInlineBox(InlineRenderBox box)

startNormalFlow

protected void startNormalFlow(NormalFlowRenderBox box)