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
-
parent
- reference to the parent applet
-
prev_b
- previous color component
-
prev_g
- previous color component
-
prev_r
- previous color component
-
progress
- current progress code
-
ProgressText(Game)
- Constructs the progress prompt.
-
computeProgress()
- Computes current user's progress based on previous move.
-
insets()
- Overrides the default insets() method.
-
minimumSize()
- Overrides the default minimumSize() method.
-
paint(Graphics)
- Draws the prompt string.
-
preferredSize()
- Overrides the default preferredSize() method.
-
reset()
- Resets the prompt to initial state.
-
update()
- Self-update method that implements UpdatableComponentIfc.
parent
Game parent
- reference to the parent applet
progress
int progress
- current progress code
prev_r
int prev_r
- previous color component
prev_g
int prev_g
- previous color component
prev_b
int prev_b
- previous color component
ProgressText
public ProgressText(Game parent)
- Constructs the progress prompt.
- Parameters:
- parent - reference to the parent applet.
reset
public void reset()
- Resets the prompt to initial state.
update
public void update()
- Self-update method that implements UpdatableComponentIfc.
- Overrides:
- update in class UpdatableComponentImpl
- See Also:
- UpdatableComponentIfc
paint
public void paint(Graphics g)
- Draws the prompt string.
- Overrides:
- paint in class Container
computeProgress
protected void computeProgress()
- Computes current user's progress based on previous move.
minimumSize
public Dimension minimumSize()
- Overrides the default minimumSize() method.
- Returns:
- new Dimension
- Overrides:
- minimumSize in class Container
preferredSize
public Dimension preferredSize()
- Overrides the default preferredSize() method.
- Returns:
- new Dimension
- Overrides:
- preferredSize in class Container
insets
public Insets insets()
- Overrides the default insets() method.
- Returns:
- new Insets
- Overrides:
- insets in class Container