org.acm.seguin.print.text
Class LinePrinter

java.lang.Object
  extended by org.acm.seguin.print.text.LinePrinter
Direct Known Subclasses:
NumberedLinePrinter, PropertyLinePrinter, XMLLinePrinter

public class LinePrinter
extends java.lang.Object

Prints a single line

Author:
Chris Seguin

Field Summary
protected  int fontSize
          Description of the Field
 
Constructor Summary
LinePrinter()
           
 
Method Summary
 int getLineHeight(java.awt.Graphics g)
          Gets the LineHeight attribute of the LinePrinter object
 void init(java.awt.Graphics g)
          Initializes the graphics object to begin printing
 void print(java.awt.Graphics g, java.lang.String line, int x, int y, LineSet set, int index)
          Prints the line
 void setFontSize(int value)
          Sets the FontSize attribute of the LinePrinter object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontSize

protected int fontSize
Description of the Field

Constructor Detail

LinePrinter

public LinePrinter()
Method Detail

setFontSize

public void setFontSize(int value)
Sets the FontSize attribute of the LinePrinter object

Parameters:
value - The new FontSize value

getLineHeight

public int getLineHeight(java.awt.Graphics g)
Gets the LineHeight attribute of the LinePrinter object

Parameters:
g - Description of Parameter
Returns:
The LineHeight value

init

public void init(java.awt.Graphics g)
Initializes the graphics object to begin printing

Parameters:
g - the graphics object

print

public void print(java.awt.Graphics g,
                  java.lang.String line,
                  int x,
                  int y,
                  LineSet set,
                  int index)
Prints the line

Parameters:
g - The graphics device
line - The string to print
x - The x location on the graphics device
y - The y location on the graphics device
set - The set of lines
index - The line we are printing