com.slurm.gf
Class GFTypeCallback

java.lang.Object
  |
  +--com.slurm.gf.GFParserCallback
        |
        +--com.slurm.gf.GFTypeCallback

public class GFTypeCallback
extends GFParserCallback

This implemenation of GFParserCallback responds to generic font commands in such a way as to reproduce the behavior of the original gftype program.


Constructor Summary
GFTypeCallback(boolean mnemonics, boolean pixels)
          Creates a GFTypeCallback object with the specified choice of output.
 
Method Summary
 void badGF(java.lang.String msg)
          respond to an error from which the parser cannot recover
 void error(int label, java.lang.String s)
          respond to an error encountered during parsing
 int getTotalChars()
           
 void handleBOCCommand(BOCCommand boc)
          respond to a boc command
 void handleCharLocCommand(CharLocCommand charLoc)
          respond to a charloc command
 void handleEOCCommand(EOCCommand eoc)
          respond to an eoc command
 void handleNewRowCommand(NewRowCommand newRow)
          respond to a newrow command
 void handleNoOpCommand(NoOpCommand noop)
          respond to a noop command
 void handlePaintCommand(PaintCommand paint)
          respond to a paint command
 void handlePostCommand(PostCommand post)
          respond to a post command
 void handlePostPostCommand(PostPostCommand postpost)
          respond to a postpost command
 void handlePreCommand(PreCommand c)
          respond to a pre command
 void handleSkipCommand(SkipCommand skip)
          respond to a skip command
 void handleUndefinedCommand(UndefinedCommand c)
          respond to an undefined command
 void handleXXXCommand(XXXCommand xxx)
          respond to an xxx command
 void handleYYYCommand(YYYCommand yyy)
          respond to a yyy command
 void nlError(Command c, java.lang.String s)
           
 void startSpecialCommands(int loc)
          respond to any "special" commands that occur before a character or before the post command
 
Methods inherited from class com.slurm.gf.GFParserCallback
handleCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GFTypeCallback

public GFTypeCallback(boolean mnemonics,
                      boolean pixels)
Creates a GFTypeCallback object with the specified choice of output.
Parameters:
mnemonics - whether or not mnemonic output is desired
pixels - whether or not pixel output is desired
Method Detail

badGF

public void badGF(java.lang.String msg)
           throws GFFileFormatException
Description copied from class: GFParserCallback
respond to an error from which the parser cannot recover
Overrides:
badGF in class GFParserCallback

startSpecialCommands

public void startSpecialCommands(int loc)
Description copied from class: GFParserCallback
respond to any "special" commands that occur before a character or before the post command
Overrides:
startSpecialCommands in class GFParserCallback

handlePaintCommand

public void handlePaintCommand(PaintCommand paint)
Description copied from class: GFParserCallback
respond to a paint command
Overrides:
handlePaintCommand in class GFParserCallback

handleBOCCommand

public void handleBOCCommand(BOCCommand boc)
Description copied from class: GFParserCallback
respond to a boc command
Overrides:
handleBOCCommand in class GFParserCallback

handleEOCCommand

public void handleEOCCommand(EOCCommand eoc)
Description copied from class: GFParserCallback
respond to an eoc command
Overrides:
handleEOCCommand in class GFParserCallback

handleSkipCommand

public void handleSkipCommand(SkipCommand skip)
Description copied from class: GFParserCallback
respond to a skip command
Overrides:
handleSkipCommand in class GFParserCallback

handleNewRowCommand

public void handleNewRowCommand(NewRowCommand newRow)
Description copied from class: GFParserCallback
respond to a newrow command
Overrides:
handleNewRowCommand in class GFParserCallback

handleXXXCommand

public void handleXXXCommand(XXXCommand xxx)
Description copied from class: GFParserCallback
respond to an xxx command
Overrides:
handleXXXCommand in class GFParserCallback

handleYYYCommand

public void handleYYYCommand(YYYCommand yyy)
Description copied from class: GFParserCallback
respond to a yyy command
Overrides:
handleYYYCommand in class GFParserCallback

handleNoOpCommand

public void handleNoOpCommand(NoOpCommand noop)
Description copied from class: GFParserCallback
respond to a noop command
Overrides:
handleNoOpCommand in class GFParserCallback

handleCharLocCommand

public void handleCharLocCommand(CharLocCommand charLoc)
Description copied from class: GFParserCallback
respond to a charloc command
Overrides:
handleCharLocCommand in class GFParserCallback

handlePreCommand

public void handlePreCommand(PreCommand c)
Description copied from class: GFParserCallback
respond to a pre command
Overrides:
handlePreCommand in class GFParserCallback

handlePostCommand

public void handlePostCommand(PostCommand post)
Description copied from class: GFParserCallback
respond to a post command
Overrides:
handlePostCommand in class GFParserCallback

handlePostPostCommand

public void handlePostPostCommand(PostPostCommand postpost)
Description copied from class: GFParserCallback
respond to a postpost command
Overrides:
handlePostPostCommand in class GFParserCallback

handleUndefinedCommand

public void handleUndefinedCommand(UndefinedCommand c)
Description copied from class: GFParserCallback
respond to an undefined command
Overrides:
handleUndefinedCommand in class GFParserCallback

getTotalChars

public int getTotalChars()
Returns:
the total number of characters encountered in the file

error

public void error(int label,
                  java.lang.String s)
Description copied from class: GFParserCallback
respond to an error encountered during parsing
Overrides:
error in class GFParserCallback

nlError

public void nlError(Command c,
                    java.lang.String s)