All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tsadam.bowling.BowlingSolitairePanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----tsadam.bowling.BowlingSolitairePanel

public class BowlingSolitairePanel
extends Panel
implements MouseListener, ActionListener
Presents one game (one player, one line) of Bowling Solitaire.


Variable Index

 o darkColor
The dark color of the three-color scheme.
 o lightColor
The light color of the three-color scheme.
 o mediumColor
The medium color of the three-color scheme.

Constructor Index

 o BowlingSolitairePanel(Dimension)
Constructs a Bowling Solitaire panel.

Method Index

 o actionPerformed(ActionEvent)
Handles button presses.
 o getFont()
Gets the font to use for presenting the game.
 o mouseClicked(MouseEvent)
Handle mouse clicks.
 o mouseEntered(MouseEvent)
 o mouseExited(MouseEvent)
 o mousePressed(MouseEvent)
Handle mouse presses.
 o mouseReleased(MouseEvent)
Handle mouse releases.
 o paint(Graphics)
Paints the Bowling Solitaire panel.

Variables

 o darkColor
 public static final Color darkColor
The dark color of the three-color scheme. Used for buttons.

 o mediumColor
 public static final Color mediumColor
The medium color of the three-color scheme. Used for fallen pins, empty ball card piles and the played cards table.

 o lightColor
 public static final Color lightColor
The light color of the three-color scheme. Used for background color.

Constructors

 o BowlingSolitairePanel
 public BowlingSolitairePanel(Dimension d)
Constructs a Bowling Solitaire panel.

Parameters:
d - Dimension of panel (width & height)

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent e)
Handles button presses.

 o getFont
 public Font getFont()
Gets the font to use for presenting the game.

Returns:
the font to use.
Overrides:
getFont in class Component
 o mouseClicked
 public void mouseClicked(MouseEvent e)
Handle mouse clicks.

 o mouseEntered
 public void mouseEntered(MouseEvent e)
 o mouseExited
 public void mouseExited(MouseEvent e)
 o mousePressed
 public void mousePressed(MouseEvent e)
Handle mouse presses.

 o mouseReleased
 public void mouseReleased(MouseEvent e)
Handle mouse releases.

 o paint
 public void paint(Graphics g)
Paints the Bowling Solitaire panel.

Parameters:
g - graphics object for the Bowling Solitaire panel.
Overrides:
paint in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index