Save This Page
Home » pentaho-reporting-engine-classic-0.8.10 » org.jfree.report.modules.output.pageable » base » pagelayout » [javadoc | source]
org.jfree.report.modules.output.pageable.base.pagelayout
abstract public class: PageLayouter [javadoc | source]
java.lang.Object
   org.jfree.report.function.AbstractExpression
      org.jfree.report.function.AbstractFunction
         org.jfree.report.modules.output.pageable.base.pagelayout.PageLayouter

All Implemented Interfaces:
    PageEventListener, Function, Expression, Serializable

Direct Known Subclasses:
    FlowPageLayouter, SimplePageLayouter

The baseclass for all PageLayouter. A page layouter is the layoutmanager of an logical page. This layoutmanager is responsible for handling and detecting page breaks, for placing the various Root-Bands (bands that are contained directly in an report) on the page and for the global appeareance of an page (columns, band placement policy etc.)

A PageLayouter for an Report is defined by the ReportProperty pageable.layoutManager by setting the classname of the page layouter. The specified class must contain an DefaultConstructor and must be an instance of PageLayouter.

All PageLayouter may define a set of LayoutConstraints for use in the Root-Bands. These constraints can be used to configure the layouting process. It is up to the layoutmanager implementation, which constraints are recognized and how these constraints are used.

All layoutmanagers should document their known constraints.

Nested Class Summary:
abstract protected static class  PageLayouter.LayoutManagerState  Represents the state of the page layouter. Subclasses must override this class to create an internal state which can be saved and restored when a page-break occurs.

The state is required to be cloneable and must support deep-cloning so that the state can be restored multiple times whenever the page printing continues. 

Constructor:
 public PageLayouter() 
Method from org.jfree.report.modules.output.pageable.base.pagelayout.PageLayouter Summary:
clearCurrentEvent,   clearLogicalPage,   clearSaveState,   clone,   endPage,   getCurrentEvent,   getDependencyLevel,   getLayoutManagerState,   getLogicalPage,   getReport,   getValue,   isFinishingPage,   isGeneratedPageEmpty,   isNewPageStarted,   isPageEnded,   isPageRestartDone,   isRestartingPage,   pageCanceled,   restoreSaveState,   saveCurrentState,   setCurrentEvent,   setDependencyLevel,   setFinishingPage,   setGeneratedPageEmpty,   setLogicalPage,   setPageRestartDone,   setRestartingPage,   startPage
Methods from org.jfree.report.function.AbstractFunction:
groupFinished,   groupStarted,   itemsAdvanced,   itemsFinished,   itemsStarted,   reportDone,   reportFinished,   reportInitialized,   reportStarted
Methods from org.jfree.report.function.AbstractExpression:
clone,   getDataRow,   getDependencyLevel,   getInstance,   getName,   getReportConfiguration,   getResourceBundleFactory,   getRuntime,   isActive,   isDeepTraversing,   isPreserve,   setActive,   setDependencyLevel,   setName,   setPreserve,   setRuntime
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jfree.report.modules.output.pageable.base.pagelayout.PageLayouter Detail:
 protected  void clearCurrentEvent() 
    Clears the current event.
 public  void clearLogicalPage() 
    Clears the logical page reference. This method must be called after the page has been processed.
 protected  void clearSaveState() 
    Clear the beginTransaction. This should be called after the beginTransaction has been restored.
 public Object clone() throws CloneNotSupportedException 
    Returns a clone of the PageLayouter.

    Be aware, this does not create a deep copy. If you have complex structures contained in objects, you have to overwrite this function.

 protected  void endPage() throws ReportProcessingException 
    Ends a page. During the process, an PageFinished event is generated and the state advances to the next page. The Layoutmanager-State is saved and the logical page is closed.

    While this method is executed, the FinishingPage flag is set to true.

    You are not able to print on the logical page after the page is finished.

 protected ReportEvent getCurrentEvent() 
    Returns the current report event.
 public int getDependencyLevel() 
    The dependency level defines the level of execution for this function. Higher dependency functions are executed before lower dependency functions. For ordinary functions and expressions, the range for dependencies is defined to start from 0 (lowest dependency possible) to 2^31 (upper limit of int).

    PageLayouter functions override the default behaviour an place them self at depency level -1, an so before any userdefined function.

 public PageLayouter.LayoutManagerState getLayoutManagerState() 
    Return the last stored LayoutManager state or null if there is no state stored.
 public LogicalPage getLogicalPage() 
    Returns the logical page.
 public ReportDefinition getReport() 
    Returns the report that should be printed. This is the report contained in the last ReportEvent received, or null, if no event occurred here.
 public Object getValue() 
    Return a self-reference. This backdoor is used to extract the current PageLayoutManager instance from the DataRow. Please don't use it in your functions, it is required for the PageableReportProcessor.
 public boolean isFinishingPage() 
    Returns the 'finishing page' flag.

    When set to true, indicates that the current page is shut down. The page footer should be printed and the state stored. Trying to end the page again while the finishing process is not complete will result in an IllegalState.

    If the page should be finished while the page is restarted, will throw an ReportProcessing exception, as this would result in an infinite loop.

 public boolean isGeneratedPageEmpty() 
    Maintains a flag, whether the generated page was completly empty.
 abstract public boolean isNewPageStarted()
    Returns true, if the PageLayouter has successfully started a new page. The start of the new page is delayed, until the first content is printed.
 public boolean isPageEnded() 
    Checks whether this page has ended. If this method returns true, no printing to the logical page is allowed.
 public boolean isPageRestartDone() 
    Returns whether the restarting of the page is completed. Restarting the page is separated into two processes. The first step restores the save state, and the second step starts to print the page header and opens the logical page. The second step is not executed, if no more content is printed.
 public boolean isRestartingPage() 
    Returns the 'restarting page' flag.

    Is set to true, while the page is started. The last saved state is restored and the page header gets prepared. Trying the start the page again while the restarting process is not complete or while the page is currently being finished, will result in an IllegalState.

 public  void pageCanceled(ReportEvent event) 
    Receives notification that a page was canceled by the ReportProcessor. This method is called, when a page was removed from the report after it was generated.
 public  void restoreSaveState(ReportState ancestor) throws ReportProcessingException 
    Restores the state.
 abstract protected PageLayouter.LayoutManagerState saveCurrentState()
    Save the current state into the LayoutManagerState object. The concrete implementation is responsible to save all required information so that the printing can be continued after the pagebreak is done.
 protected  void setCurrentEvent(ReportEvent currentEvent) 
    Sets the current event (also updates the report reference).
 public  void setDependencyLevel(int deplevel) 
    Overrides the depency level. Should be lower than any other function depency.
 public  void setFinishingPage(boolean finishingPage) 
    Sets the 'finishing page' flag.
 protected  void setGeneratedPageEmpty(boolean generatedPageEmpty) 
    Defines a flag, whether the generated page was completly empty.
 public  void setLogicalPage(LogicalPage logicalPage) 
    Sets the logical page for the layouter.
 public  void setPageRestartDone(boolean pageRestartDone) 
    Defines whether the restarting of the page is completed. Restarting the page is separated into two processes. The first step restores the save state, and the second step starts to print the page header and opens the logical page. The second step is not executed, if no more content is printed.
 public  void setRestartingPage(boolean restartingPage) 
    Sets the 'restarting page' flag.
 protected  void startPage() 
    Restarts the current page. The logical page is opened again and the PageStartedEvent is fired. While this method is executed, the RestartingPage flag is set to true.