Class Decoder
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----Decoder
- public class Decoder
- extends Applet
- implements DecoderConstants
The starting class of the Decoder applet, a variant of the
popular game Mastermind. This class performs initialization
and captures button clicks, but does not
do much else.
- See Also:
- DimpleCanvas, MarbleCanvas
-
Decoder()
-
-
action(Event, Object)
- Detects whether either button was pressed.
-
init()
-
-
paint(Graphics)
- Due to the nature of the game, this paint function is rarely called
except in the very beginning; most of the updating occurs in the canvases
that make up individual components.
-
update(Graphics)
- Repaints without clearing.
Decoder
public Decoder()
init
public void init()
- Overrides:
- init in class Applet
paint
public void paint(Graphics g)
- Due to the nature of the game, this paint function is rarely called
except in the very beginning; most of the updating occurs in the canvases
that make up individual components. Therefore this has no double buffering,
and some of the code -- resizing the buttons, for example -- is inefficient
for the sake of an elegant effect.
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- Repaints without clearing.
- Overrides:
- update in class Component
action
public boolean action(Event e,
Object o)
- Detects whether either button was pressed.
- Overrides:
- action in class Component