All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class kpalin.alabra.PromotionListen

java.lang.Object
   |
   +----java.util.Observable
           |
           +----kpalin.alabra.PromotionListen

public class PromotionListen
extends Observable
This is just a datatransfer class co-operating with PawnPromote and ChessPlay. The Object returned from this Observable is the Piece to which the player wants to promote the pawn.

Author:
Kimmo Palin
See Also:
Observable

Variable Index

 o FROM
 o haveData
 o promoteTo
 o TO

Constructor Index

 o PromotionListen(BoardTile, BoardTile)
Creates new Observable PromotionListen.

Method Index

 o clearChanged()
 o getPiece()
Returns the Piece in this object.
 o hasChanged()
 o setChanged()
 o setPiece(Piece)
Sets selected Piece to this object and notifies observers.

Variables

 o FROM
 public final BoardTile FROM
 o TO
 public final BoardTile TO
 o promoteTo
 private Piece promoteTo
 o haveData
 private boolean haveData

Constructors

 o PromotionListen
 PromotionListen(BoardTile from,
                 BoardTile to)
Creates new Observable PromotionListen.

Parameters:
from - Starting tile a the move.
to - Target tile a the move.

Methods

 o getPiece
 public synchronized Piece getPiece()
Returns the Piece in this object.

 o setPiece
 public synchronized void setPiece(Piece newPiece)
Sets selected Piece to this object and notifies observers.

 o hasChanged
 public boolean hasChanged()
Overrides:
hasChanged in class Observable
 o clearChanged
 protected synchronized void clearChanged()
Overrides:
clearChanged in class Observable
 o setChanged
 protected synchronized void setChanged()
Overrides:
setChanged in class Observable

All Packages  Class Hierarchy  This Package  Previous  Next  Index