com.slurm.gf
Class GF2GIFCallback

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

public class GF2GIFCallback
extends GFParserCallback

Set of callback functions to create GIF images of characters as they are encountered while parsing a generic font file.


Constructor Summary
GF2GIFCallback()
           
GF2GIFCallback(java.awt.Color foreground, java.awt.Color background)
           
GF2GIFCallback(java.awt.Color foreground, java.awt.Color background, boolean hasTransparent)
           
GF2GIFCallback(java.awt.Color foreground, java.awt.Color background, boolean hasTransparent, boolean transparentBackground)
           
GF2GIFCallback(java.awt.Color foreground, java.awt.Color background, boolean hasTransparent, boolean transparentBackground, int minHeight, int maxHeight, java.lang.String filePrefix, java.lang.String targetDirectory)
          Creates a new GF2GIFCallback.
GF2GIFCallback(java.awt.Color foreground, java.awt.Color background, boolean hasTransparent, boolean transparentBackground, java.lang.String filePrefix, java.lang.String targetDirectory)
           
 
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 c)
          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 c)
          respond to a noop command
 void handlePaintCommand(PaintCommand paint)
          respond to a paint command
 void handlePostCommand(PostCommand c)
          respond to a post command
 void handlePostPostCommand(PostPostCommand c)
          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 c)
          respond to a yyy command
 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

GF2GIFCallback

public GF2GIFCallback(java.awt.Color foreground,
                      java.awt.Color background,
                      boolean hasTransparent,
                      boolean transparentBackground,
                      int minHeight,
                      int maxHeight,
                      java.lang.String filePrefix,
                      java.lang.String targetDirectory)
Creates a new GF2GIFCallback.
Parameters:
foreground - the foreground color of the characters in the GIF images.
background - the background color of the characters in the GIF images.
hasTransparent - whether background or foreground should be transparent.
transparentBackground - whether the transparent color should be the background color or the foreground color.
minHeight - the lower bound to use for row numbers in the pixel arrays of characters.
maxHeight - the upper bound to use for row numbers in the pixel arrays of characters.
filePrefix - the prefix of the resulting GIF output files.
targetDirectory - the directory in which to put the GIF files.

GF2GIFCallback

public GF2GIFCallback(java.awt.Color foreground,
                      java.awt.Color background,
                      boolean hasTransparent,
                      boolean transparentBackground,
                      java.lang.String filePrefix,
                      java.lang.String targetDirectory)

GF2GIFCallback

public GF2GIFCallback(java.awt.Color foreground,
                      java.awt.Color background,
                      boolean hasTransparent,
                      boolean transparentBackground)

GF2GIFCallback

public GF2GIFCallback(java.awt.Color foreground,
                      java.awt.Color background,
                      boolean hasTransparent)

GF2GIFCallback

public GF2GIFCallback(java.awt.Color foreground,
                      java.awt.Color background)

GF2GIFCallback

public GF2GIFCallback()
Method Detail

getTotalChars

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

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

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

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 c)
Description copied from class: GFParserCallback
respond to a yyy command
Overrides:
handleYYYCommand in class GFParserCallback

handleNoOpCommand

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

handleCharLocCommand

public void handleCharLocCommand(CharLocCommand c)
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 c)
Description copied from class: GFParserCallback
respond to a post command
Overrides:
handlePostCommand in class GFParserCallback

handlePostPostCommand

public void handlePostPostCommand(PostPostCommand c)
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