org.acm.seguin.uml.print
Class UMLPagePrinter

java.lang.Object
  extended by org.acm.seguin.print.PagePrinter
      extended by org.acm.seguin.uml.print.UMLPagePrinter
All Implemented Interfaces:
java.awt.print.Printable

public class UMLPagePrinter
extends PagePrinter

Handles printing the page

Author:
Chris Seguin

Field Summary
 
Fields inherited from class org.acm.seguin.print.PagePrinter
headerHeight, pf
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
UMLPagePrinter(UMLPackage panel)
          Constructor for the UMLPagePrinter object
 
Method Summary
 int calculatePageCount(java.awt.print.PageFormat pf)
          Guess the number of pages
static java.awt.print.PageFormat getPageFormat(boolean dialog)
          Returns the page
static int getPageHeight()
          Return the width of the page
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageNumber)
          Print the page
 
Methods inherited from class org.acm.seguin.print.PagePrinter
getPageWidth, getScale, printHeader, setDatePageCountFontSize, setFilenameFontSize, setHeaderHeight, setScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UMLPagePrinter

public UMLPagePrinter(UMLPackage panel)
Constructor for the UMLPagePrinter object

Parameters:
panel - the current package
Method Detail

calculatePageCount

public int calculatePageCount(java.awt.print.PageFormat pf)
Guess the number of pages

Parameters:
pf - Description of Parameter
Returns:
Description of the Returned Value

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pf,
                 int pageNumber)
Print the page

Parameters:
g - the graphics object
pf - the page format
pageNumber - the page number
Returns:
Description of the Returned Value

getPageFormat

public static java.awt.print.PageFormat getPageFormat(boolean dialog)
Returns the page

Parameters:
dialog - present a dialog screen if none
Returns:
the current page format

getPageHeight

public static int getPageHeight()
Return the width of the page

Returns:
Description of the Returned Value