Class DoorCanvas
Class DoorCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ImageCanvas
|
+----DoorCanvas
- public class DoorCanvas
- extends ImageCanvas
DoorCanvas adapts ImageCanvas for LetsMakeADealApplet. It
stores the various door Images and maintains state.
-
DoorCanvas()
- Provided for convenience only.
-
DoorCanvas(ImageCanvasEventHandler, Image, Image, Image)
- Creates a DoorCanvas.
-
isBad()
- Is this door the booby prize?
-
setBad()
- Sets the DoorCanvas to the revealed booby prize state
-
setSelected()
- Sets the DoorCanvas to the selected state
-
setUnselected()
- Sets the DoorCanvas to the unselected state
DoorCanvas
public DoorCanvas()
- Provided for convenience only. DoorCanvas should be initialized
by calling a constructor with parameters.
DoorCanvas
public DoorCanvas(ImageCanvasEventHandler handler,
Image unselected,
Image selected,
Image bad)
- Creates a DoorCanvas.
- Parameters:
- handler - a callback that handles events from this object
- unselected - unselected door Image
- selected - selected door Image
- bad - booby prize door Image
setUnselected
public void setUnselected()
- Sets the DoorCanvas to the unselected state
setSelected
public void setSelected()
- Sets the DoorCanvas to the selected state
setBad
public void setBad()
- Sets the DoorCanvas to the revealed booby prize state
isBad
public boolean isBad()
- Is this door the booby prize?