heineman.klondike
Class FoundationController

java.lang.Object
  |
  +--java.awt.event.MouseAdapter
        |
        +--heineman.klondike.FoundationController
All Implemented Interfaces:
java.util.EventListener, java.awt.event.MouseListener

public class FoundationController
extends java.awt.event.MouseAdapter

Controls all actions to do with mouse events over Foundation Piles

Creation date: (11/10/01 11:51:49 PM)


Field Summary
protected  PileView src
          The specific Foundation pileView being controlled.
protected  Klondike theGame
          The Klondike Game.
 
Constructor Summary
FoundationController(Klondike theGame, PileView foundation)
          FoundationController constructor comment.
 
Method Summary
 void mouseReleased(java.awt.event.MouseEvent me)
          Coordinate reaction to the completion of a Drag Event.
 
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseEntered, mouseExited, mousePressed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theGame

protected Klondike theGame
The Klondike Game.


src

protected PileView src
The specific Foundation pileView being controlled.

Constructor Detail

FoundationController

public FoundationController(Klondike theGame,
                            PileView foundation)
FoundationController constructor comment.

Method Detail

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me)
Coordinate reaction to the completion of a Drag Event.

A bit of a challenge to construct the appropriate move, because cards can be dragged both from the WastePile (as a CardView object) and the BuildablePileView (as a ColumnView).

Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter
Parameters:
me - java.awt.event.MouseEvent