Internet Chess ToolKit
v0.2.0

ictk.boardgame.ui.cli
Interface CLIBoardDisplay

All Superinterfaces:
BoardDisplay, BoardListener, java.util.EventListener
All Known Subinterfaces:
CLIChessBoardDisplay
All Known Implementing Classes:
TxChessBoardDisplay

public interface CLIBoardDisplay
extends BoardDisplay

This is a command line visual representation of a board.


Method Summary
 java.io.Writer getWriter()
          returns the Writer currently being used.
 boolean isInverse()
          checks to see if the display is assuming the foreground is darker than the background.
 void print()
          prints the current board onto the Writer.
 void print(Board board)
          prints the current specified board onto the Writer.
 void setInverse(boolean t)
          sets the display to assume the foreground is darker than the background.
 void setWriter(java.io.PrintWriter out)
          sets the stream where the display will be sent.
 
Methods inherited from interface ictk.boardgame.ui.BoardDisplay
getBoard, setBoard, update
 
Methods inherited from interface ictk.boardgame.BoardListener
boardUpdate
 

Method Detail

setInverse

public void setInverse(boolean t)
sets the display to assume the foreground is darker than the background. This might be beneficial when using the display on a Black on White screen. By default all CLI Displays assume White on Black.


isInverse

public boolean isInverse()
checks to see if the display is assuming the foreground is darker than the background. For example, on a Black on White display.

Returns:
true if the display assumes the foreground is darker.

setWriter

public void setWriter(java.io.PrintWriter out)
sets the stream where the display will be sent. Currently a PrintWriter must be specified.
Example: display.setWriter(new PrintWriter(System.out, true));
Note: if you're expecting output and not seeing it, make sure you set auto-flush on for the PrintWriter.


getWriter

public java.io.Writer getWriter()
returns the Writer currently being used. This is always a PrintWriter with other Streams or Writers nestled inside.


print

public void print()
prints the current board onto the Writer.


print

public void print(Board board)
prints the current specified board onto the Writer.


Submit a bug or feature
Visit the Website
Internet Chess ToolKit is licensed under the GPL v2 .