|
Internet Chess ToolKit v0.2.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.PrintWriter
ictk.boardgame.io.GameWriter
ictk.boardgame.chess.io.ChessWriter
ictk.boardgame.chess.io.PGNWriter
PGNWriter writes Portable Game Notation chess files
Field Summary | |
static long |
DEBUG
|
static int |
NO_GLYPH
do not output symbolic nor numeric NAGs |
static int |
NUMERIC_GLYPH
do not output symbolic nor numeric NAGs |
static int |
SUFFIX_ONLY_GLYPH
do not output symbolic nor numeric NAGs |
static int |
SYMBOLIC_AND_NUMERIC_GLYPH
do not output symbolic nor numeric NAGs |
static int |
SYMBOLIC_ONLY_GLYPH
do not output symbolic nor numeric NAGs |
Constructor Summary | |
PGNWriter(java.io.OutputStream _out)
|
|
PGNWriter(java.io.Writer _out)
|
Method Summary | |
int |
getAnnotationGlyphStyle()
returns the currect Glyph Style setting. |
int |
getColumnWidth()
returns the current column width. |
MoveNotation |
getMoveNotation()
returns the currect move notation style. |
boolean |
isExportComments()
returns true if prenotationa and annotations are allowed in the output stream. |
boolean |
isExportVariations()
returns true if variations are allowed in the output stream. |
boolean |
isIndentComments()
|
boolean |
isIndentVariations()
|
void |
setAnnotationGlyphStyle(int style)
sets the annotation glyph style. |
void |
setColumnWidth(int col)
sets the width of the output for the move list. |
void |
setExportComments(boolean t)
turns on or off whether prenotation and annotation comments are output. |
void |
setExportVariations(boolean t)
turns on or off whether variations are in the output stream. |
void |
setIndentComments(boolean t)
indent the main-line comments. |
void |
setIndentVariations(boolean t)
indent the main-line variatins. |
void |
setMoveNotation(MoveNotation notation)
set the move notation style you wish the output to be in. |
void |
writeBoard(Board board)
writeBoard(Board) writes the current board |
void |
writeGame(Game game)
write the full game (GameInfo, History & Board) to the output buffer. |
void |
writeGameInfo(GameInfo gameinfo)
write the GameInfo to the output buffer |
void |
writeHistory(History history)
write the history list. |
Methods inherited from class java.io.PrintWriter |
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, write, write, write, write, write |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final long DEBUG
public static final int NO_GLYPH
public static final int SYMBOLIC_AND_NUMERIC_GLYPH
public static final int NUMERIC_GLYPH
public static final int SYMBOLIC_ONLY_GLYPH
public static final int SUFFIX_ONLY_GLYPH
Constructor Detail |
public PGNWriter(java.io.OutputStream _out)
public PGNWriter(java.io.Writer _out)
Method Detail |
public void setMoveNotation(MoveNotation notation)
GameWriter
setMoveNotation
in class GameWriter
public MoveNotation getMoveNotation()
GameWriter
getMoveNotation
in class GameWriter
public void setColumnWidth(int col)
public int getColumnWidth()
public void setExportComments(boolean t)
setExportComments
in class GameWriter
public boolean isExportComments()
isExportComments
in class GameWriter
public void setExportVariations(boolean t)
setExportVariations
in class GameWriter
public boolean isExportVariations()
isExportVariations
in class GameWriter
public void setIndentComments(boolean t)
public boolean isIndentComments()
public void setIndentVariations(boolean t)
public boolean isIndentVariations()
public void setAnnotationGlyphStyle(int style)
public int getAnnotationGlyphStyle()
public void writeGame(Game game) throws java.io.IOException
GameWriter
writeGame
in class GameWriter
java.io.IOException
public void writeGameInfo(GameInfo gameinfo) throws java.io.IOException
GameWriter
writeGameInfo
in class GameWriter
java.io.IOException
public void writeHistory(History history) throws java.io.IOException
Prenotations: Might not be recognized by all readers.
If there are Prenotation on moves that is not the head of a variation,
or the game, or are not following a move with an Annotation, the
Prenotation will probably be interpreted by the next reader as an
Annotation of the previous move. (there is a way around this
by making empty annotations, but it's unclear how much
adding Prenotations to PGN will make the output incompadible with
other readers).
writeHistory
in class GameWriter
java.io.IOException
public void writeBoard(Board board) throws java.io.IOException
writeBoard
in class GameWriter
java.io.IOException
|
Submit a bug or feature Visit the Website Internet Chess ToolKit is licensed under the GPL v2 . |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |