java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----KnightBoard
                           |
                           +----GraphicalBoard
Dragging is implemented completely within the class. The class provides event notification in a fashion similar to other AWT classes. To use these events, the caller must specify an object implementing the BoardListener interface using setBoardListener(); however, this is optional.
By default, both mouse clicks on squares and resizing by dragging borders are disabled. After specifying a listener, they may be enabled with setClickable() and setResizable(), respectively.
Note: GraphicalBoard subclasses java.awt.Canvas via KnightBoard.
 
 boardheight
	boardheight
   boardwidth
	boardwidth
   BORDER
	BORDER
   clickable
	clickable
   dragging
	dragging
   drawall
	drawall
   E_DRAG
	E_DRAG
   GAP
	GAP
   image
	image
   listener
	listener
   MAX_DIMENSION
	MAX_DIMENSION
   new_height
	new_height
   new_width
	new_width
   NO_DRAG
	NO_DRAG
   oldcontent
	oldcontent
   pressed
	pressed
   resizable
	resizable
   S_DRAG
	S_DRAG
   SE_DRAG
	SE_DRAG
   squaresize
	squaresize
   squarex
	squarex
   squarey
	squarey
   
 GraphicalBoard(int, int, Image)
	GraphicalBoard(int, int, Image)
   
 getMinimumSize()
	getMinimumSize()
   getPreferredSize()
	getPreferredSize()
   inBorder(int, int)
	inBorder(int, int)
   mouseClicked(MouseEvent)
	mouseClicked(MouseEvent)
   mouseDragged(MouseEvent)
	mouseDragged(MouseEvent)
   mouseEntered(MouseEvent)
	mouseEntered(MouseEvent)
   mouseExited(MouseEvent)
	mouseExited(MouseEvent)
   mouseMoved(MouseEvent)
	mouseMoved(MouseEvent)
   mousePressed(MouseEvent)
	mousePressed(MouseEvent)
   mouseReleased(MouseEvent)
	mouseReleased(MouseEvent)
   paint(Graphics)
	paint(Graphics)
   removeBoardListener()
	removeBoardListener()
   setBoardListener(BoardListener)
	setBoardListener(BoardListener)
   setClickable(boolean)
	setClickable(boolean)
   setResizable(boolean)
	setResizable(boolean)
   update(Graphics)
	update(Graphics)
   
 MAX_DIMENSION
MAX_DIMENSION
public static final int MAX_DIMENSION
 GAP
GAP
private static final int GAP
 BORDER
BORDER
private static final int BORDER
 NO_DRAG
NO_DRAG
private static final int NO_DRAG
 E_DRAG
E_DRAG
private static final int E_DRAG
 S_DRAG
S_DRAG
private static final int S_DRAG
 SE_DRAG
SE_DRAG
private static final int SE_DRAG
 resizable
resizable
private boolean resizable
 clickable
clickable
private boolean clickable
 listener
listener
private BoardListener listener
 image
image
private Image image
 dragging
dragging
private int dragging
 pressed
pressed
private boolean pressed
 squaresize
squaresize
private int squaresize
 boardwidth
boardwidth
private int boardwidth
 boardheight
boardheight
private int boardheight
 new_width
new_width
private int new_width
 new_height
new_height
private int new_height
 squarex
squarex
private int squarex
 squarey
squarey
private int squarey
 oldcontent
oldcontent
private int oldcontent[][]
 drawall
drawall
private boolean drawall
 
 GraphicalBoard
GraphicalBoard
 public GraphicalBoard(int width,
                       int height,
                       Image knightimage)
 
 setBoardListener
setBoardListener
public void setBoardListener(BoardListener l)
 removeBoardListener
removeBoardListener
public void removeBoardListener()
 setResizable
setResizable
public void setResizable(boolean b)
 setClickable
setClickable
public void setClickable(boolean b)
 update
update
public void update(Graphics g)
In unvisited squares, the value of the square is displayed. Visited squares are marked with an orange circle and the number of the visiting move, except for the square the knight is currently in, in which a knight image is drawn. A filled blue circle is drawn in the start square.
 paint
paint
public void paint(Graphics g)
 mouseMoved
mouseMoved
public void mouseMoved(MouseEvent e)
 inBorder
inBorder
 private int inBorder(int x,
                      int y)
 mouseDragged
mouseDragged
public void mouseDragged(MouseEvent e)
 mousePressed
mousePressed
public void mousePressed(MouseEvent e)
 mouseReleased
mouseReleased
public void mouseReleased(MouseEvent e)
 getMinimumSize
getMinimumSize
public Dimension getMinimumSize()
 getPreferredSize
getPreferredSize
public Dimension getPreferredSize()
 mouseClicked
mouseClicked
public void mouseClicked(MouseEvent e)
 mouseEntered
mouseEntered
public void mouseEntered(MouseEvent e)
 mouseExited
mouseExited
public void mouseExited(MouseEvent e)