org.jfree.report.flow.layoutprocessor

Interface LayoutController

public interface LayoutController extends Cloneable

The layout controller iterates over the report layout. It uses a flow controller to query the data.

Author: Thomas Morgner

Method Summary
LayoutControlleradvance(ReportTarget target)
Advances the processing position.
Objectclone()
Creates a copy of this layout controller.
LayoutControllercreatePrecomputeInstance(FlowController fc)
Derives a copy of this controller that is suitable to perform a precomputation.
FlowControllergetFlowController()
ObjectgetNode()
LayoutControllergetParent()
Retrieves the parent of this layout controller.
voidinitialize(Object node, FlowController flowController, LayoutController parent)
Initializes the layout controller.
booleanisAdvanceable()
Checks, whether the layout controller would be advanceable.
LayoutControllerjoin(FlowController flowController)
Joins with a delegated process flow.

Method Detail

advance

public LayoutController advance(ReportTarget target)
Advances the processing position.

Parameters: target the report target that receives generated events.

Returns: the new layout controller instance representing the new state.

Throws: DataSourceException if there was a problem reading data from the datasource. ReportProcessingException if there was a general problem during the report processing. ReportDataFactoryException if a query failed.

clone

public Object clone()
Creates a copy of this layout controller.

Returns: a copy.

createPrecomputeInstance

public LayoutController createPrecomputeInstance(FlowController fc)
Derives a copy of this controller that is suitable to perform a precomputation. The returned layout controller must be independent from the it's anchestor controller.

Parameters: fc a new flow controller for the precomputation.

Returns: a copy that is suitable for precomputation.

getFlowController

public FlowController getFlowController()

getNode

public Object getNode()

getParent

public LayoutController getParent()
Retrieves the parent of this layout controller. This allows childs to query their context.

Returns: the layout controller's parent to null if there is no parent.

initialize

public void initialize(Object node, FlowController flowController, LayoutController parent)
Initializes the layout controller. This method is called exactly once. It is the creators responsibility to call this method.

Calling initialize after the first advance must result in a IllegalStateException.

Parameters: node the currently processed object or layout node. flowController the current flow controller. parent the parent layout controller that was responsible for instantiating this controller.

Throws: DataSourceException if there was a problem reading data from the datasource. ReportProcessingException if there was a general problem during the report processing. ReportDataFactoryException if a query failed.

isAdvanceable

public boolean isAdvanceable()
Checks, whether the layout controller would be advanceable. If this method returns true, it is generally safe to call the 'advance()' method.

Returns: true, if the layout controller is advanceable, false otherwise.

join

public LayoutController join(FlowController flowController)
Joins with a delegated process flow. This is generally called from a child flow and should *not* (I mean it!) be called from outside. If you do, you'll suffer.

Parameters: flowController the flow controller of the parent.

Returns: the joined layout controller that incorperates all changes from the delegate.