All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class taxman.AdvantagePanel

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

public class AdvantagePanel
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 AdvantagePanel()
Initializes UI components and sets the layout.

Method Index

 o gameUpdate(Board, Minimax, int)
The standard update method from GameUpdate This one handles NEW_GAME, CPU_CHOSE, HUMAN_CHOSE.
 o setBackground(Color)
Over-ride base function to make sure colors are propagated to the sub-components
 o setForeground(Color)
Over-ride base function to make sure colors are propagated to the sub-components
 o update(Graphics)
An over-ride of the update function to explicitely repaint the progress bars (which don't seem to print otherwise)

Constructors

 o AdvantagePanel
 public AdvantagePanel()
Initializes UI components and sets the layout.

Methods

 o setForeground
 public void setForeground(Color clr)
Over-ride base function to make sure colors are propagated to the sub-components

Parameters:
clr - The new foreground color
Overrides:
setForeground in class Component
 o setBackground
 public void setBackground(Color clr)
Over-ride base function to make sure colors are propagated to the sub-components

Parameters:
clr - The new background color
Overrides:
setBackground in class Component
 o gameUpdate
 public void gameUpdate(Board b,
                        Minimax m,
                        int flags)
The standard update method from GameUpdate This one handles NEW_GAME, CPU_CHOSE, HUMAN_CHOSE.

Parameters:
b - The current game board
m - The current minimax object
flags - Indicator of current state
 o update
 public void update(Graphics g)
An over-ride of the update function to explicitely repaint the progress bars (which don't seem to print otherwise)

Parameters:
g - The graphics context on which to draw
Overrides:
update in class Container

All Packages  Class Hierarchy  This Package  Previous  Next  Index