|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.acm.seguin.print.xml.State
public abstract class State
State pattern that is used to print the XML file
| Field Summary | |
|---|---|
protected java.awt.Color |
color
|
protected java.awt.Font |
font
the font |
| Constructor Summary | |
|---|---|
State()
Constructor for the State object |
|
| Method Summary | |
|---|---|
abstract java.awt.Font |
getFont()
Gets the Font attribute of the State object |
int |
getFontSize()
Gets the FontSize attribute of the State object |
java.awt.Graphics |
getGraphics()
Gets the Graphics attribute of the State object |
int |
getX()
Gets the X attribute of the State object |
int |
getY()
Gets the Y attribute of the State object |
protected void |
initState(State next)
Set the state for the next state |
protected void |
print(java.lang.StringBuffer buf)
Prints the buffer |
State |
processLine(java.lang.String line)
Processes a single line and returns the state that is in effect at the end of the line. |
protected abstract State |
processLine(java.lang.String line,
int index,
java.lang.StringBuffer buf)
The actual worker method that processes the line. |
void |
setFontSize(int value)
Sets the FontSize attribute of the State object |
void |
setGraphics(java.awt.Graphics value)
Sets the Graphics attribute of the State object |
void |
setX(int value)
Sets the X attribute of the State object |
void |
setY(int value)
Sets the Y attribute of the State object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Font font
protected java.awt.Color color
| Constructor Detail |
|---|
public State()
| Method Detail |
|---|
public void setFontSize(int value)
value - The new FontSize valuepublic void setGraphics(java.awt.Graphics value)
value - The new Graphics valuepublic void setX(int value)
value - The new X valuepublic void setY(int value)
value - The new Y valuepublic int getFontSize()
public abstract java.awt.Font getFont()
public java.awt.Graphics getGraphics()
public int getX()
public int getY()
public State processLine(java.lang.String line)
line - the line
protected abstract State processLine(java.lang.String line,
int index,
java.lang.StringBuffer buf)
line - the lineindex - the index of the characterbuf - the buffer
protected void initState(State next)
next - the next stateprotected void print(java.lang.StringBuffer buf)
buf - the buffer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||