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.
-
ButtonPanel(Game)
- Initializes UI components and sets the game control alias.
-
action(Event, Object)
- This method traps the events for the two buttons
and reports them back to the game control.
-
gameUpdate(Board, Minimax, int)
- The standard update method from GameUpdate
This one handles OPTIONS_OPEN, OPTIONS_CLOSE.
-
setBackground(Color)
- Over-rides setBackground to set the internal components
backgrounds to match
-
setForeground(Color)
- Over-rides setForeground to set the internal components
foregrounds to match
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.
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
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
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
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