All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class kpalin.alabra.PawnPromote

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----kpalin.alabra.PawnPromote

public class PawnPromote
extends Frame
implements MouseListener
The pawn promotion dialog.

Author:
Kimmo Palin
See Also:
ChessPlay

Variable Index

 o piece
Here we store the selected piece.
 o promObserv
This is kind of bufferclass.
 o TITLE
The title of the dialog.

Constructor Index

 o PawnPromote(int, BoardTile, BoardTile)
Creates new PawnPromotion dialog.

Method Index

 o getObservable()
 o mouseClicked(MouseEvent)
This one handles the promotion selection.
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
 o mouseReleased(MouseEvent)

Variables

 o TITLE
 static final String TITLE
The title of the dialog.

 o piece
 Piece piece
Here we store the selected piece.

 o promObserv
 PromotionListen promObserv
This is kind of bufferclass. Used for comunication between PawnPromote and ChessPlay. The Object passed from update() must be cast to Piece.

Constructors

 o PawnPromote
 PawnPromote(int side,
             BoardTile from,
             BoardTile to)
Creates new PawnPromotion dialog.

Parameters:
side - The side who is promoting (black or white).
from - Starting tile of the move. Just for datatransfer.
to - Target tile of the move. Just for datatransfer.

Methods

 o getObservable
 public PromotionListen getObservable()
 o mouseEntered
 public void mouseEntered(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)
 o mousePressed
 public void mousePressed(MouseEvent e)
 o mouseReleased
 public void mouseReleased(MouseEvent e)
 o mouseClicked
 public void mouseClicked(MouseEvent e)
This one handles the promotion selection.


All Packages  Class Hierarchy  This Package  Previous  Next  Index