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
-
FROM
-
-
haveData
-
-
promoteTo
-
-
TO
-
-
PromotionListen(BoardTile, BoardTile)
- Creates new Observable PromotionListen.
-
clearChanged()
-
-
getPiece()
- Returns the Piece in this object.
-
hasChanged()
-
-
setChanged()
-
-
setPiece(Piece)
- Sets selected Piece to this object and notifies observers.
FROM
public final BoardTile FROM
TO
public final BoardTile TO
promoteTo
private Piece promoteTo
haveData
private boolean haveData
PromotionListen
PromotionListen(BoardTile from,
BoardTile to)
- Creates new Observable PromotionListen.
- Parameters:
- from - Starting tile a the move.
- to - Target tile a the move.
getPiece
public synchronized Piece getPiece()
- Returns the Piece in this object.
setPiece
public synchronized void setPiece(Piece newPiece)
- Sets selected Piece to this object and notifies observers.
hasChanged
public boolean hasChanged()
- Overrides:
- hasChanged in class Observable
clearChanged
protected synchronized void clearChanged()
- Overrides:
- clearChanged in class Observable
setChanged
protected synchronized void setChanged()
- Overrides:
- setChanged in class Observable
All Packages Class Hierarchy This Package Previous Next Index