prioritizer
Class PlanningGame.Card

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

class PlanningGame.Card
extends java.lang.Object

Defines a Card representing a Requirement in the Planning Game method


Field Summary
private  boolean highlighted
           
private  java.awt.Point pos
           
private  Requirement requirement
           
private  java.lang.String shortName
           
 
Constructor Summary
private PlanningGame.Card(Requirement requirement)
          Constructs a Card
 
Method Summary
 void draw(java.awt.Graphics g)
          Draws the Card with the specified graphics component
private  java.awt.Point getPos()
          Gets the cards position.
private  Requirement getRequirement()
          Gets the requirement associated with this Card.
private  boolean selectedBy(java.awt.Point pos)
          Check if the Card is selectable by a click in this position.
private  void setPos(java.awt.Point pos)
          Moves the Card to the specified position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

highlighted

private boolean highlighted

pos

private java.awt.Point pos

requirement

private Requirement requirement

shortName

private java.lang.String shortName
Constructor Detail

PlanningGame.Card

private PlanningGame.Card(Requirement requirement)
Constructs a Card

Parameters:
requirement - the requirement to create the Card for
Method Detail

getPos

private java.awt.Point getPos()
Gets the cards position.

Returns:
the upper left corner position of the card

getRequirement

private Requirement getRequirement()
Gets the requirement associated with this Card.

Returns:
the requirement associated with this Card

setPos

private void setPos(java.awt.Point pos)
Moves the Card to the specified position.

Parameters:
pos - the specified position to move the Card to

selectedBy

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

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

draw

public void draw(java.awt.Graphics g)
Draws the Card with the specified graphics component

Parameters:
g - the specified graphics component