org.acm.seguin.print.text
Class TextPagePrinter

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

public class TextPagePrinter
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
TextPagePrinter(java.lang.String initFilename, java.lang.String init, LinePrinter printer)
          Constructor for the UMLPagePrinter object
 
Method Summary
 int calculatePageCount(java.awt.print.PageFormat pf)
          Guess the number of pages
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageNumber)
          Print the page
 void setBetweenLineSpacing(int value)
          Sets the BetweenLineSpacing attribute of the TextPagePrinter object
 void setTextFontSize(int value)
          Sets the TextFontSize attribute of the TextPagePrinter object
 
Methods inherited from class org.acm.seguin.print.PagePrinter
getPageFormat, getPageHeight, 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

TextPagePrinter

public TextPagePrinter(java.lang.String initFilename,
                       java.lang.String init,
                       LinePrinter printer)
Constructor for the UMLPagePrinter object

Parameters:
initFilename - Description of Parameter
init - Description of Parameter
printer - Description of Parameter
Method Detail

setTextFontSize

public void setTextFontSize(int value)
Sets the TextFontSize attribute of the TextPagePrinter object

Parameters:
value - The new TextFontSize value

setBetweenLineSpacing

public void setBetweenLineSpacing(int value)
Sets the BetweenLineSpacing attribute of the TextPagePrinter object

Parameters:
value - The new BetweenLineSpacing value

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:
Whether there is more pages or not