view
Class PrintComponent.PrintableComponent

java.lang.Object
  extended by view.PrintComponent.PrintableComponent
All Implemented Interfaces:
Printable
Enclosing class:
PrintComponent

private static class PrintComponent.PrintableComponent
extends Object
implements Printable

Renders an array of compontents to a printable page.


Field Summary
private  String head
          If a header is displayed.
private  Component[] show
          The components to print.
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
private PrintComponent.PrintableComponent(Component[] display, String title)
          Prints an array of components on consecuetive pages.
private PrintComponent.PrintableComponent(Component display, String title)
          Convenience constructor to allow printing of a single component.
 
Method Summary
 int print(Graphics g2d, PageFormat a4, int pagenum)
          Called by the printer job to print on the current page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

show

private Component[] show
The components to print.


head

private String head
If a header is displayed. Wrong location, but all other failed.

Constructor Detail

PrintComponent.PrintableComponent

private PrintComponent.PrintableComponent(Component display,
                                          String title)
Convenience constructor to allow printing of a single component.


PrintComponent.PrintableComponent

private PrintComponent.PrintableComponent(Component[] display,
                                          String title)
Prints an array of components on consecuetive pages.

Method Detail

print

public int print(Graphics g2d,
                 PageFormat a4,
                 int pagenum)
Called by the printer job to print on the current page. The first pages from zero to the number of compoents are filled, then the printing is canceled with a NO_SUCH_PAGE return.

Specified by:
print in interface Printable