voji.report
Class Report

java.lang.Object
  |
  +--voji.report.Report

public class Report
extends java.lang.Object

This class holds a complete report and is able to print it out in various ways.


Constructor Summary
Report()
          Constructs a new empty Report instance
 
Method Summary
 void add(ReportComponent component)
          Adds a new component
 void addBottom(ReportComponent component)
          Adds a new bottom component.
 void addHeader(ReportComponent component)
          Adds a new header component.
protected  void draw(java.util.ListIterator components, PageGraphics graphics)
          Draws the given components onto the given graphics context.
 void print(CopyPrintJob printJob)
          Prints this report to a printer
 void print(java.awt.PrintJob printJob)
          Prints this report to a printer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Report

public Report()
Constructs a new empty Report instance

Method Detail

add

public void add(ReportComponent component)
Adds a new component

Parameters:
component - the component to add

addHeader

public void addHeader(ReportComponent component)
Adds a new header component. These components will be shown at the top of each page

Parameters:
component - the component to add

addBottom

public void addBottom(ReportComponent component)
Adds a new bottom component. These components will be shown at the bottom of each page

Parameters:
component - the component to add

print

public void print(CopyPrintJob printJob)
Prints this report to a printer

Parameters:
printJob - the CopyPrintJob where to draw to

print

public void print(java.awt.PrintJob printJob)
Prints this report to a printer

Parameters:
printJob - the PrintJob where to draw to

draw

protected void draw(java.util.ListIterator components,
                    PageGraphics graphics)
Draws the given components onto the given graphics context. It also prints the header and bottom components. After drawing the components Iterator will point to the first component of the next page.

Parameters:
components - an Iterator containing the report components to draw
graphics - the graphics context where to draw to