org.acm.seguin.print
Class PagePrinter

java.lang.Object
  extended by org.acm.seguin.print.PagePrinter
All Implemented Interfaces:
java.awt.print.Printable
Direct Known Subclasses:
TextPagePrinter, UMLPagePrinter

public abstract class PagePrinter
extends java.lang.Object
implements java.awt.print.Printable

Handles printing the page

Author:
Chris Seguin

Field Summary
protected static int headerHeight
          Description of the Field
protected static java.awt.print.PageFormat pf
          Description of the Field
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
PagePrinter()
           
 
Method Summary
static java.awt.print.PageFormat getPageFormat(boolean dialog)
          Returns the page
static int getPageHeight()
          Return the width of the page
static int getPageWidth()
          Return the width of the page
protected static double getScale()
          Returns the scaling
protected  void printHeader(java.awt.Graphics g, java.lang.String title, java.lang.String pageNumber, java.lang.String pageCount)
          Prints the header at the top of the page
 void setDatePageCountFontSize(int value)
          Description of the Method
 void setFilenameFontSize(int value)
          Description of the Method
static void setHeaderHeight(int value)
          Sets the size of the header box
protected static void setScale(double value)
          Sets the scaling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.print.Printable
print
 

Field Detail

headerHeight

protected static int headerHeight
Description of the Field


pf

protected static java.awt.print.PageFormat pf
Description of the Field

Constructor Detail

PagePrinter

public PagePrinter()
Method Detail

setFilenameFontSize

public void setFilenameFontSize(int value)
Description of the Method

Parameters:
value - Description of Parameter

setDatePageCountFontSize

public void setDatePageCountFontSize(int value)
Description of the Method

Parameters:
value - Description of Parameter

printHeader

protected void printHeader(java.awt.Graphics g,
                           java.lang.String title,
                           java.lang.String pageNumber,
                           java.lang.String pageCount)
Prints the header at the top of the page

Parameters:
g - The graphics object
title - the title
pageNumber - the number of pages
pageCount - the page count

setHeaderHeight

public static void setHeaderHeight(int value)
Sets the size of the header box

Parameters:
value - The size of the header box

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

getPageWidth

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

Returns:
Description of the Returned Value

getPageHeight

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

Returns:
Description of the Returned Value

setScale

protected static void setScale(double value)
Sets the scaling

Parameters:
value - the scaled value

getScale

protected static double getScale()
Returns the scaling

Returns:
The scale size