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 int
BOX_MUST_BE_CLOSED
static int
LAYOUT_OK
static int
NEED_MORE_DATA

Constructor Summary

ValidateModelStep()

Method Summary

protected void
finishBlockBox(BlockRenderBox box)
Object
getLayoutFailureNodeId()
int
getLayoutFailureResolution()
boolean
isLayoutable(LogicalPageBox root)
protected boolean
startBlockBox(BlockRenderBox box)
protected boolean
startInlineBox(InlineRenderBox box)
protected void
startNormalFlow(NormalFlowRenderBox box)

Methods inherited from class org.jfree.layouting.renderer.process.IterateStructuralProcessStep

finishBlockBox, finishInlineBox, finishNormalFlow, finishOtherBox, finishOtherNode, processBoxChilds, processParagraphChilds, startBlockBox, startInlineBox, startNormalFlow, startOtherBox, startOtherNode, startProcessing

Field Details

BOX_MUST_BE_CLOSED

public static final int BOX_MUST_BE_CLOSED
Field Value:
2

LAYOUT_OK

public static final int LAYOUT_OK
Field Value:
0

NEED_MORE_DATA

public static final int NEED_MORE_DATA
Field Value:
1

Constructor Details

ValidateModelStep

public ValidateModelStep()

Method Details

finishBlockBox

protected void finishBlockBox(BlockRenderBox box)
Overrides:
finishBlockBox in interface IterateStructuralProcessStep

getLayoutFailureNodeId

public Object getLayoutFailureNodeId()

getLayoutFailureResolution

public int getLayoutFailureResolution()

isLayoutable

public boolean isLayoutable(LogicalPageBox root)

startBlockBox

protected boolean startBlockBox(BlockRenderBox box)
Overrides:
startBlockBox in interface IterateStructuralProcessStep

startInlineBox

protected boolean startInlineBox(InlineRenderBox box)
Overrides:
startInlineBox in interface IterateStructuralProcessStep

startNormalFlow

protected void startNormalFlow(NormalFlowRenderBox box)
Overrides:
startNormalFlow in interface IterateStructuralProcessStep