prioritizer
Class PlanningGame.Pile

java.lang.Object
  extended byprioritizer.PlanningGame.Pile
Enclosing class:
PlanningGame

class PlanningGame.Pile
extends java.lang.Object

Defines a Pile where the cards can be put


Field Summary
private  java.util.LinkedList cardsList
           
private static int HEIGHT
           
private  boolean highlighted
           
private  java.awt.Image image
           
private  java.awt.Image imageHighlight
           
private  java.lang.String pileType
           
private  java.awt.Point pos
           
private static int WIDTH
           
 
Constructor Summary
private PlanningGame.Pile(java.lang.String pileType)
          Constructs a Pile
 
Method Summary
private  void addCard(PlanningGame.Card c)
          Adds a Card to the last position in the Pile
 void draw(java.awt.Graphics g)
          Draws the the Pile (box on desk) with the specified graphics component
 boolean selectedBy(java.awt.Point pos)
          Check if the Pile is selectable by a click in this position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH

private static final int WIDTH
See Also:
Constant Field Values

HEIGHT

private static final int HEIGHT
See Also:
Constant Field Values

cardsList

private java.util.LinkedList cardsList

highlighted

private boolean highlighted

pileType

private java.lang.String pileType

pos

private java.awt.Point pos

image

private java.awt.Image image

imageHighlight

private java.awt.Image imageHighlight
Constructor Detail

PlanningGame.Pile

private PlanningGame.Pile(java.lang.String pileType)
Constructs a Pile

Parameters:
pileType - defines the type of the pile: High, Medium or Low
Method Detail

addCard

private void addCard(PlanningGame.Card c)
Adds a Card to the last position in the Pile

Parameters:
c - the Card to be added

draw

public void draw(java.awt.Graphics g)
Draws the the Pile (box on desk) with the specified graphics component

Parameters:
g - the specified graphics component

selectedBy

public boolean selectedBy(java.awt.Point pos)
Check if the Pile is selectable by a click in this position.

Parameters:
pos - mouse pointer position
Returns:
true if the Pile is selectable from the specified position