org.acm.seguin.print.xml
Class AttributeState

java.lang.Object
  extended by org.acm.seguin.print.xml.State
      extended by org.acm.seguin.print.xml.AttributeState

public class AttributeState
extends State

State pattern that is used to print the XML file

Author:
Chris Seguin

Field Summary
 
Fields inherited from class org.acm.seguin.print.xml.State
color, font
 
Constructor Summary
AttributeState()
           
 
Method Summary
 java.awt.Font getFont()
          Gets the Font attribute of the State object
static State getState()
          Gets the State attribute of the TextState class
protected  State processLine(java.lang.String line, int index, java.lang.StringBuffer buf)
          The actual worker method that processes the line.
 
Methods inherited from class org.acm.seguin.print.xml.State
getFontSize, getGraphics, getX, getY, initState, print, processLine, setFontSize, setGraphics, setX, setY
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeState

public AttributeState()
Method Detail

getFont

public java.awt.Font getFont()
Gets the Font attribute of the State object

Specified by:
getFont in class State
Returns:
The Font value

processLine

protected State processLine(java.lang.String line,
                            int index,
                            java.lang.StringBuffer buf)
The actual worker method that processes the line. This is what is defined by the various states

Specified by:
processLine in class State
Parameters:
line - the line
index - the index of the character
buf - the buffer
Returns:
the state at the end of the line

getState

public static State getState()
Gets the State attribute of the TextState class

Returns:
The State value