com.slurm.gf
Class GFParserCallback

java.lang.Object
  |
  +--com.slurm.gf.GFParserCallback
Direct Known Subclasses:
GF2GIFCallback, GFTypeCallback, SimpleGFParserCallback

public abstract class GFParserCallback
extends java.lang.Object

Abstract class for handling commands encountered while parsing generic font files.

The various commands of the generic font language and their meanings are defined in the original gftype program.

See Also:
GFParser, GFFile

Constructor Summary
GFParserCallback()
           
 
Method Summary
abstract  void badGF(java.lang.String msg)
          respond to an error from which the parser cannot recover
abstract  void error(int label, java.lang.String msg)
          respond to an error encountered during parsing
abstract  void handleBOCCommand(BOCCommand c)
          respond to a boc command
abstract  void handleCharLocCommand(CharLocCommand c)
          respond to a charloc command
protected  void handleCommand(Command c)
          respond to an arbitrary command, based on its opcode
abstract  void handleEOCCommand(EOCCommand c)
          respond to an eoc command
abstract  void handleNewRowCommand(NewRowCommand c)
          respond to a newrow command
abstract  void handleNoOpCommand(NoOpCommand c)
          respond to a noop command
abstract  void handlePaintCommand(PaintCommand c)
          respond to a paint command
abstract  void handlePostCommand(PostCommand c)
          respond to a post command
abstract  void handlePostPostCommand(PostPostCommand c)
          respond to a postpost command
abstract  void handlePreCommand(PreCommand c)
          respond to a pre command
abstract  void handleSkipCommand(SkipCommand c)
          respond to a skip command
abstract  void handleUndefinedCommand(UndefinedCommand c)
          respond to an undefined command
abstract  void handleXXXCommand(XXXCommand c)
          respond to an xxx command
abstract  void handleYYYCommand(YYYCommand c)
          respond to a yyy command
abstract  void startSpecialCommands(int location)
          respond to any "special" commands that occur before a character or before the post command
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GFParserCallback

public GFParserCallback()
Method Detail

badGF

public abstract void badGF(java.lang.String msg)
                    throws GFFileFormatException
respond to an error from which the parser cannot recover

error

public abstract void error(int label,
                           java.lang.String msg)
respond to an error encountered during parsing

startSpecialCommands

public abstract void startSpecialCommands(int location)
respond to any "special" commands that occur before a character or before the post command

handlePaintCommand

public abstract void handlePaintCommand(PaintCommand c)
respond to a paint command

handleBOCCommand

public abstract void handleBOCCommand(BOCCommand c)
respond to a boc command

handleEOCCommand

public abstract void handleEOCCommand(EOCCommand c)
respond to an eoc command

handleSkipCommand

public abstract void handleSkipCommand(SkipCommand c)
respond to a skip command

handleNewRowCommand

public abstract void handleNewRowCommand(NewRowCommand c)
respond to a newrow command

handleXXXCommand

public abstract void handleXXXCommand(XXXCommand c)
respond to an xxx command

handleYYYCommand

public abstract void handleYYYCommand(YYYCommand c)
respond to a yyy command

handleNoOpCommand

public abstract void handleNoOpCommand(NoOpCommand c)
respond to a noop command

handleCharLocCommand

public abstract void handleCharLocCommand(CharLocCommand c)
respond to a charloc command

handlePreCommand

public abstract void handlePreCommand(PreCommand c)
respond to a pre command

handlePostCommand

public abstract void handlePostCommand(PostCommand c)
respond to a post command

handlePostPostCommand

public abstract void handlePostPostCommand(PostPostCommand c)
respond to a postpost command

handleUndefinedCommand

public abstract void handleUndefinedCommand(UndefinedCommand c)
respond to an undefined command

handleCommand

protected final void handleCommand(Command c)
respond to an arbitrary command, based on its opcode