org.jfree.layouting.renderer.process
Class ValidateModelStep

java.lang.Object
  extended by org.jfree.layouting.renderer.process.IterateStructuralProcessStep
      extended by org.jfree.layouting.renderer.process.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)
           
 java.lang.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
finishInlineBox, finishNormalFlow, finishOtherBox, finishOtherNode, processBoxChilds, processParagraphChilds, startOtherBox, startOtherNode, startProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAYOUT_OK

public static final int LAYOUT_OK
See Also:
Constant Field Values

NEED_MORE_DATA

public static final int NEED_MORE_DATA
See Also:
Constant Field Values

BOX_MUST_BE_CLOSED

public static final int BOX_MUST_BE_CLOSED
See Also:
Constant Field Values
Constructor Detail

ValidateModelStep

public ValidateModelStep()
Method Detail

isLayoutable

public boolean isLayoutable(LogicalPageBox root)

getLayoutFailureNodeId

public java.lang.Object getLayoutFailureNodeId()

getLayoutFailureResolution

public int getLayoutFailureResolution()

finishBlockBox

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

startBlockBox

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

startInlineBox

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

startNormalFlow

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