## org.jfree.report.flow.layoutprocessor
Interface LayoutController

All Superinterfaces:
  java.lang.Cloneable

All Known Implementing Classes:
  AbstractLayoutController, AutoTableItemLayoutController, AutoTableLayoutController, BufferingLayoutController, ContentElementLayoutController, ElementLayoutController, ReportLayoutController, SectionLayoutController, StaticTextLayoutController, SubReportLayoutController

    public interface LayoutController

extends java.lang.Cloneable

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

Author:
  Thomas Morgner

Method Summary
`LayoutController` `advance(ReportTarget target)` Advances the processing position.
`java.lang.Object` `clone()` Creates a copy of this layout controller.
`LayoutController` `createPrecomputeInstance(FlowController fc)` Derives a copy of this controller that is suitable to perform a precomputation.
`FlowController` `getFlowController()`
`java.lang.Object` `getNode()`
`LayoutController` `getParent()` Retrieves the parent of this layout controller.
`void` `initialize(java.lang.Object node, FlowController flowController, LayoutController parent)` Initializes the layout controller.
`boolean` `isAdvanceable()` Checks, whether the layout controller would be advanceable.
`LayoutController` `join(FlowController flowController)` Joins with a delegated process flow.

Method Detail

### getParent

    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

    void initialize(java.lang.Object node,
                    FlowController flowController,
                    LayoutController parent)
                    throws DataSourceException,
                           ReportDataFactoryException,
                           ReportProcessingException

  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.

### advance

    LayoutController advance(ReportTarget target)
                             throws DataSourceException,
                                    ReportDataFactoryException,
                                    ReportProcessingException

  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.

### isAdvanceable

    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

    LayoutController join(FlowController flowController)
                          throws DataSourceException,
                                 ReportDataFactoryException,
                                 ReportProcessingException

  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.
  Throws:
    `DataSourceException`
    `ReportDataFactoryException`
    `ReportProcessingException`

### clone

    java.lang.Object clone()

  Creates a copy of this layout controller.

  Returns:
    a copy.

### createPrecomputeInstance

    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

    FlowController getFlowController()

### getNode

    java.lang.Object getNode()