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
public class: SimplePageLayouter [javadoc | source]
java.lang.Object
   org.jfree.report.function.AbstractExpression
      org.jfree.report.function.AbstractFunction
         org.jfree.report.modules.output.pageable.base.pagelayout.PageLayouter
            org.jfree.report.modules.output.pageable.base.pagelayout.SimplePageLayouter

All Implemented Interfaces:
    PrepareEventListener, SimplePageLayoutWorker, PageEventListener, Function, Expression, Serializable

A simple page layouter. This class replicates the 'old' behaviour of JFreeReport, simple and straightforward.

Layout Constraints used:

Nested Class Summary:
protected static class  SimplePageLayouter.SimpleLayoutManagerState  Represents the current state of the page layouter. 
Field Summary
public static final  String WATERMARK_PRINTED_KEY     
Constructor:
 public SimplePageLayouter() 
Method from org.jfree.report.modules.output.pageable.base.pagelayout.SimplePageLayouter Summary:
clearSaveState,   clone,   createSaveState,   doLayout,   doPrint,   endPage,   getCursor,   getCursorPosition,   getInstance,   getReservedSpace,   getTopContentPosition,   groupFinished,   groupStarted,   isNewPageStarted,   isPageEmpty,   isSpaceFor,   isWatermarkSupported,   itemsAdvanced,   itemsFinished,   itemsStarted,   pageFinished,   pageStarted,   prepareEvent,   print,   printBottom,   printWatermark,   reportDone,   reportFinished,   reportStarted,   resetCursor,   restartPage,   restoreSaveState,   saveCurrentState,   setCursor,   setLogicalPage,   setReservedSpace,   setStartNewPage,   setTopPageContentPosition
Methods from org.jfree.report.modules.output.pageable.base.pagelayout.PageLayouter:
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.SimplePageLayouter Detail:
 protected  void clearSaveState() 
    Clears the layout state.
 public Object clone() throws CloneNotSupportedException 
    Clones the layouter.
 protected  void createSaveState(Band b) 
    Records state information.
 protected Rectangle2D doLayout(Band band,
    boolean fireEvent) 
    Perform the layout of a band. The height of the band is calculated according to the contents of the band. The width of the band will always span the complete printable width.
 protected boolean doPrint(Rectangle2D bounds,
    Band band,
    boolean spool,
    boolean watermark,
    float position) throws ReportProcessingException 
    Prints a band.
 protected boolean endPage(boolean force) throws ReportProcessingException 
    Ends the page.
 protected SimplePageLayoutCursor getCursor() 
    Returns the cursor.
 public float getCursorPosition() 
    Returns the current position of the cursor.
 public Expression getInstance() 
    Return a completly separated copy of this function. The copy does no longer share any changeable objects with the original function.
 public float getReservedSpace() 
    Returns the reserved space on the current page.
 public float getTopContentPosition() 
    Returns the position of the first content.
 public  void groupFinished(ReportEvent event) 
    Receives notification that a group has finished.

    Prints the GroupFooter.

 public  void groupStarted(ReportEvent event) 
    Receives notification that a group has started.

    Prints the GroupHeader

 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 isPageEmpty() 
    Checks, whether the current page is empty.
 public boolean isSpaceFor(float height) 
    Determines whether or not there is space remaining on the page for a band of the specified height. Perform layouting for the pageFooter to guess the height.
 public boolean isWatermarkSupported() 
 public  void itemsAdvanced(ReportEvent event) 
    Receives notification that a row of data is being processed.

    prints the ItemBand.

 public  void itemsFinished(ReportEvent event) 
    Receives notification that a group of item bands has been completed.

    The itemBand is finished, the report starts to close open groups.

 public  void itemsStarted(ReportEvent event) 
    Receives notification that a group of item bands is about to be processed.

    The next events will be itemsAdvanced events until the itemsFinished event is raised.

 public  void pageFinished(ReportEvent event) 
    Receives notification that a page has ended.

    This prints the PageFooter. If this is the first page, the footer is not printed if the pagefooter style-flag DISPLAY_ON_FIRSTPAGE is set to false. If this event is known to be the last pageFinished event, the DISPLAY_ON_LASTPAGE is evaluated and the footer is printed only if this flag is set to TRUE.

 public  void pageStarted(ReportEvent event) 
    Receives notification that a page has started.

    This prints the PageHeader. If this is the first page, the header is not printed if the pageheader style-flag DISPLAY_ON_FIRSTPAGE is set to false. If this event is known to be the last pageStarted event, the DISPLAY_ON_LASTPAGE is evaluated and the header is printed only if this flag is set to TRUE.

    If there is an active repeating GroupHeader, print the last one. The GroupHeader is searched for the current group and all parent groups, starting at the current group and ascending to the parents. The first goupheader that has the StyleFlag REPEAT_HEADER set to TRUE is printed.

    The PageHeader and the repeating GroupHeader are spooled until the first real content is printed. This way, the LogicalPage remains empty until an other band is printed.

 public  void prepareEvent(ReportEvent event) 
    Receives notification of a prepare event.
 public boolean print(Band b,
    boolean spool,
    boolean handlePagebreak) throws ReportProcessingException 
    Prints a band.
 public boolean printBottom(Band b) throws ReportProcessingException 
    Prints a band at the bottom of the page.
 public boolean printWatermark(Band watermark) throws ReportProcessingException 
 public  void reportDone(ReportEvent event) 
    Receives notification that report generation has completed, the report footer was printed, no more output is done. This is a helper event to shut down the output service.
 public  void reportFinished(ReportEvent event) 
    Receives notification that the report has finished.

    Prints the ReportFooter and forces the last pagebreak.

 public  void reportStarted(ReportEvent event) 
    Receives notification that the report has started. Also invokes the start of the first page ...

    Layout and draw the report header after the PageStartEvent was fired.

 public  void resetCursor() 
    Reinitialize the cursor of the layout worker. Called when a new page is started.
 public  void restartPage() throws ReportProcessingException 
    Handles the restarting of the page. Fires the pageStarted event and prints the pageheader. Restarting the page is done once after the PageLayouterState was restored.
 public  void restoreSaveState(ReportState anchestor) throws ReportProcessingException 
    Restores the state.
 protected PageLayouter.LayoutManagerState saveCurrentState() 
    Returns the current state. The state was previously recorded using the createSaveState(Band b) method.
 protected  void setCursor(SimplePageLayoutCursor cursor) 
    Sets the cursor.
 public  void setLogicalPage(LogicalPage logicalPage) 
    Sets the logical page and adjust the cursor.
 public  void setReservedSpace(float reserved) 
    Defines the reserved space on the current page.
 public  void setStartNewPage(boolean startNewPage) 
    Defines whether the PageLayouter has successfully started a new page. The start of the new page is delayed, until the first content is printed, this flag is used to keep track of the page initialization state.
 public  void setTopPageContentPosition(float topContentPosition) 
    Marks the position of the first content after the page header. This can be used to limit the maximum size of bands so that they do not exceed the available page space.

    This feature will be obsolete when bands can span multiple pages.