Class ProgressText

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----UpdatableComponentImpl
                                   |
                                   +----ProgressText

class ProgressText
extends UpdatableComponentImpl
This class produces the updatable component that indicates user's progress in color matching as a text prompt.

See Also:
UpdatableComponentImpl

Variable Index

 o parent
reference to the parent applet
 o prev_b
previous color component
 o prev_g
previous color component
 o prev_r
previous color component
 o progress
current progress code

Constructor Index

 o ProgressText(Game)
Constructs the progress prompt.

Method Index

 o computeProgress()
Computes current user's progress based on previous move.
 o insets()
Overrides the default insets() method.
 o minimumSize()
Overrides the default minimumSize() method.
 o paint(Graphics)
Draws the prompt string.
 o preferredSize()
Overrides the default preferredSize() method.
 o reset()
Resets the prompt to initial state.
 o update()
Self-update method that implements UpdatableComponentIfc.

Variables

 o parent
 Game parent
reference to the parent applet

 o progress
 int progress
current progress code

 o prev_r
 int prev_r
previous color component

 o prev_g
 int prev_g
previous color component

 o prev_b
 int prev_b
previous color component

Constructors

 o ProgressText
 public ProgressText(Game parent)
Constructs the progress prompt.

Parameters:
parent - reference to the parent applet.

Methods

 o reset
 public void reset()
Resets the prompt to initial state.

 o update
 public void update()
Self-update method that implements UpdatableComponentIfc.

Overrides:
update in class UpdatableComponentImpl
See Also:
UpdatableComponentIfc
 o paint
 public void paint(Graphics g)
Draws the prompt string.

Overrides:
paint in class Container
 o computeProgress
 protected void computeProgress()
Computes current user's progress based on previous move.

 o minimumSize
 public Dimension minimumSize()
Overrides the default minimumSize() method.

Returns:
new Dimension
Overrides:
minimumSize in class Container
 o preferredSize
 public Dimension preferredSize()
Overrides the default preferredSize() method.

Returns:
new Dimension
Overrides:
preferredSize in class Container
 o insets
 public Insets insets()
Overrides the default insets() method.

Returns:
new Insets
Overrides:
insets in class Container