All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class taxman.ButtonPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----taxman.ButtonPanel

public class ButtonPanel
extends Panel
implements GameUpdate
This is the lower left button panel for the applet. It controls the new game and options buttons and supplies a checkbox for the user to choose to go first.


Constructor Index

 o ButtonPanel(Game)
Initializes UI components and sets the game control alias.

Method Index

 o action(Event, Object)
This method traps the events for the two buttons and reports them back to the game control.
 o gameUpdate(Board, Minimax, int)
The standard update method from GameUpdate This one handles OPTIONS_OPEN, OPTIONS_CLOSE.
 o setBackground(Color)
Over-rides setBackground to set the internal components backgrounds to match
 o setForeground(Color)
Over-rides setForeground to set the internal components foregrounds to match

Constructors

 o ButtonPanel
 public ButtonPanel(Game g)
Initializes UI components and sets the game control alias.

Parameters:
g - The game control object that will be called back on user choices.

Methods

 o setBackground
 public void setBackground(Color clr)
Over-rides setBackground to set the internal components backgrounds to match

Parameters:
clr - The color to set the background to
Overrides:
setBackground in class Component
 o setForeground
 public void setForeground(Color clr)
Over-rides setForeground to set the internal components foregrounds to match

Parameters:
clr - The color to set the foreground to
Overrides:
setForeground in class Component
 o gameUpdate
 public void gameUpdate(Board b,
                        Minimax m,
                        int flags)
The standard update method from GameUpdate This one handles OPTIONS_OPEN, OPTIONS_CLOSE.

Parameters:
b - The current game board
m - The current minimax object
flags - Indicator of current state
 o action
 public boolean action(Event evt,
                       Object obj)
This method traps the events for the two buttons and reports them back to the game control.

Parameters:
evt - The event that occured
obj - The object that was effected.
Overrides:
action in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index