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

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

The TableWriter is the content creation function used to collect the cell data. After the layouting is done, the layouted bands are forwarded to the TableProducer. The virtual page has an unlimited size, only when a manual pagebreak is encountered, a new page is started.

This can be used to f.i. to create separate sheets in Excel-Workbooks, the detailed semantics depend on concrete implementation of the TableProducer.

This writer is not thread-safe.

Field Summary
public static final  int OUTPUT_LEVEL    A constant defining the tablewriters default function level. 
public static final  String SHEET_NAME_FUNCTION_PROPERTY    The SheetName-function property, defines the name of an StringFunction that creates the sheet names. 
Constructor:
 public TableWriter() 
Method from org.jfree.report.modules.output.table.base.TableWriter Summary:
clone,   getCurrentEvent,   getCursorPosition,   getDependencyLevel,   getInstance,   getMaxWidth,   getProducer,   getReservedSpace,   getTopContentPosition,   getValue,   groupFinished,   groupStarted,   isPageEmpty,   isPageEnded,   isWatermarkSupported,   itemsAdvanced,   itemsFinished,   itemsStarted,   pageCanceled,   pageFinished,   pageStarted,   print,   printBottom,   printWatermark,   reportFinished,   reportInitialized,   reportStarted,   resetCursor,   setCurrentEvent,   setDependencyLevel,   setMaxWidth,   setProducer,   setReservedSpace,   setTopPageContentPosition,   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.table.base.TableWriter Detail:
 public Object clone() throws CloneNotSupportedException 
    Clones the function.

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

 public ReportEvent getCurrentEvent() 
    Returns the current event, which has been updated at the start of every ReportListener method.
 public float getCursorPosition() 
    Returns the current cursor position. It is assumed, that the cursor goes from top to down, columns are not used.
 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 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 getMaxWidth() 
    Gets the maximum width available for a root band during the layouting process.
 public TableProducer getProducer() 
    Gets the TableProducer.
 public float getReservedSpace() 
    Returns the reserved size for the current page. This size is not used when performing a layout. This is usually used to preserve the pagefooters space. As this writer does not limit the height of the bands, this method returns 0.
 public float getTopContentPosition() 
    Returns the position of the first content. As this writer does not limit the height of the bands, this method returns 0.
 public Object getValue() 
    Return the current expression value.

    The value depends (obviously) on the expression implementation.

 public  void groupFinished(ReportEvent event) 
    Prints the group footer for the current group.
 public  void groupStarted(ReportEvent event) 
    Prints the group header for the current group.
 public boolean isPageEmpty() 
    Checks, whether the current page is empty. An page is empty if it does not contain printed content. An empty page may have spooled content.
 public boolean isPageEnded() 
    Checks, whether the page has ended. Once a page that is completly filled, only the page footer will be printed and a page break will be done after that.

    As this target has no notion of pages, the virtual page does never end automaticly.

 public boolean isWatermarkSupported() 
 public  void itemsAdvanced(ReportEvent event) 
    Prints the itemband.
 public  void itemsFinished(ReportEvent event) 
    Handles the end of the item processing.

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

 public  void itemsStarted(ReportEvent event) 
    Handles the start of the item processing.

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

 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 pageFinished(ReportEvent event) 
    Prints the page footer.
 public  void pageStarted(ReportEvent event) 
    Prints the PageHeader and all repeating group headers.
 public boolean print(Band band,
    boolean spoolBand,
    boolean handlePagebreakBefore) throws ReportProcessingException 
    Prints the given band at the current cursor position.
 public boolean printBottom(Band band) throws ReportProcessingException 
    Prints the given band at the bottom of the page.

    As we don't use the idea of pages here, this call is mapped to the print method.

 public boolean printWatermark(Band watermark) throws ReportProcessingException 
 public  void reportFinished(ReportEvent event) 
    Receives notification that the report has finished.
 public  void reportInitialized(ReportEvent event) 
    Receives notification that report generation initializes the current run.

    The event carries a ReportState.Started state. Use this to initialize the report.

 public  void reportStarted(ReportEvent event) 
    Receives notification that the report has started.
 public  void resetCursor() 
    Reinitialize the cursor of the layout worker. Called when a new page is started.
 public  void setCurrentEvent(ReportEvent currentEvent) 
    Defines the current event, which must be updated at the start of every ReportListener method.
 public  void setDependencyLevel(int deplevel) 
    Overrides the depency level. Should be lower than any other function depency.
 public  void setMaxWidth(float width) 
    Defines the maximum width available for a root band during the layouting process.
 public  void setProducer(TableProducer producer) 
    Sets the TableProducer, that should be used to create the TableCellData.
 public  void setReservedSpace(float reserved) 
    Defines the reserved size for the current page. This size is not used when performing a layout.

    This method does nothing.

 public  void setTopPageContentPosition(float topPosition) 
    This writer does not limit the height of an band and therefore does not implement that feature.
 public  void startPage() 
    Starts a new page. Fires the PageStarted event.