com.editev.chess.printer
Class JavascriptPrinter

java.lang.Object
  |
  +--com.editev.chess.Chess
        |
        +--com.editev.chess.printer.Printer
              |
              +--com.editev.chess.printer.JavascriptPrinter

public class JavascriptPrinter
extends Printer

Prints any Javascript definitions needed for the chess board.

See Also:
the source here.

Inner classes inherited from class com.editev.chess.Chess
Chess.Black, Chess.White
 
Field Summary
private static java.lang.String HEADER_END
          End of the Javascript headers.
private static java.lang.String HEADER_FUNCTIONS
          Javascript function definitions.
private static java.lang.String HEADER_START
          Start of the Javascript headers.
 
Fields inherited from class com.editev.chess.Chess
BLACK, NO_MOVE, NO_PIECE, WHITE
 
Constructor Summary
JavascriptPrinter()
           
 
Method Summary
 void print(GameHTML game)
          Prints any Javascript definitions needed for the chess board.
 
Methods inherited from class com.editev.chess.printer.Printer
eval
 
Methods inherited from class com.editev.chess.Chess
notColor, toColor, toColor, toColorName
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

HEADER_START

private static final java.lang.String HEADER_START
Start of the Javascript headers.

HEADER_FUNCTIONS

private static final java.lang.String HEADER_FUNCTIONS
Javascript function definitions.

HEADER_END

private static final java.lang.String HEADER_END
End of the Javascript headers.
Constructor Detail

JavascriptPrinter

public JavascriptPrinter()
Method Detail

print

public void print(GameHTML game)
Prints any Javascript definitions needed for the chess board.
Overrides:
print in class Printer
Parameters:
game - the GameHTML with the board status and PrintStream for this board.