All Packages Class Hierarchy This Package Previous Next Index
Class life.LifeDisplay
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----java.applet.Applet
|
+----life.LifeDisplay
- public class LifeDisplay
- extends Applet
A LifeDisplay object displays a Life object.
-
backgroundColorChoice
-
-
cellColorChoice
-
-
delaySlider
-
-
drawButton
-
-
drawModeGroup
-
-
eraseButton
-
-
fComponentsAdjusted
-
-
generationLabel
-
-
gridDisplay
- The
GridDisplay used to display this
LifeDisplay.
-
gridSizeChoice
-
-
label1
-
-
label2
-
-
label3
-
-
label4
-
-
label5
-
-
label6
-
-
label7
-
-
label8
-
-
randomizeButton
-
-
resetButton
-
-
shadesChoice
-
-
skipFrames
- Should frames be skipped to maintain a constant frame display rate?
-
skipFramesCheckbox
-
-
startButton
-
-
stepButton
-
-
stopButton
-
-
theLife
- The
Life displayed by this LifeDisplay.
-
wraparoundCheckbox
-
-
LifeDisplay()
-
-
addNotify()
-
-
backgroundColorChoice_ItemStateChanged(ItemEvent)
- Respond to Background Color selection.
-
cellColorChoice_ItemStateChanged(ItemEvent)
- Respond to Cell Color selection.
-
delaySlider_actionPerformed(ActionEvent)
- Respond to movement of Delay slider.
-
drawModeGroup_itemStateChanged(ItemEvent)
- Respond to Draw Mode selection.
-
gridSizeChoice_ItemStateChanged(ItemEvent)
- Respond to Grid Size selection.
-
init()
- Initialize the applet.
-
paint(Graphics)
- Paint method.
-
paintGridDisplay(boolean)
- Display the
Life.
-
randomizeButton_Action(ActionEvent)
- Respond to Randomize button press.
-
resetButton_Action(ActionEvent)
- Respond to Reset button press.
-
shadesChoice_ItemStateChanged(ItemEvent)
- Respond to Shades selection.
-
skipFramesCheckbox_ItemStateChanged(ItemEvent)
- Respond to Skip Frames button press.
-
startButton_Action(ActionEvent)
- Respond to Start button press.
-
stepButton_Action(ActionEvent)
- Respond to Step button press.
-
stop()
- Stop the applet.
-
stopButton_Action(ActionEvent)
- Respond to Stop button press.
-
stringToColor(String)
- Convert a color's name to a
Color.
-
update(Graphics)
- Update method.
-
wraparoundCheckBox_ItemStateChanged(ItemEvent)
- Respond to Wraparound button press.
theLife
Life theLife
- The
Life displayed by this LifeDisplay.
gridDisplay
GridDisplay gridDisplay
- The
GridDisplay used to display this
LifeDisplay.
skipFrames
boolean skipFrames
- Should frames be skipped to maintain a constant frame display rate?
fComponentsAdjusted
boolean fComponentsAdjusted
startButton
Button startButton
stepButton
Button stepButton
stopButton
Button stopButton
delaySlider
HorizontalSlider delaySlider
label1
Label label1
cellColorChoice
Choice cellColorChoice
label2
Label label2
backgroundColorChoice
Choice backgroundColorChoice
shadesChoice
Choice shadesChoice
label3
Label label3
wraparoundCheckbox
Checkbox wraparoundCheckbox
label4
Label label4
label5
Label label5
gridSizeChoice
Choice gridSizeChoice
drawModeGroup
RadioButtonGroupPanel drawModeGroup
drawButton
Checkbox drawButton
eraseButton
Checkbox eraseButton
label6
Label label6
label7
Label label7
randomizeButton
Button randomizeButton
resetButton
Button resetButton
generationLabel
Label generationLabel
label8
Label label8
skipFramesCheckbox
Checkbox skipFramesCheckbox
LifeDisplay
public LifeDisplay()
init
public void init()
- Initialize the applet.
- Overrides:
- init in class Applet
stop
public void stop()
- Stop the applet.
- Overrides:
- stop in class Applet
paintGridDisplay
void paintGridDisplay(boolean paintAll)
- Display the
Life.
- Parameters:
- paintAll - True if all
Cells should be painted,
false if only those which have changed since the
last generation should be painted.
paint
public void paint(Graphics g)
- Paint method.
- Parameters:
- g - Graphics context.
- Overrides:
- paint in class Container
update
public void update(Graphics g)
- Update method.
- Parameters:
- g - Graphics context.
- Overrides:
- update in class Container
addNotify
public void addNotify()
- Overrides:
- addNotify in class Panel
startButton_Action
void startButton_Action(ActionEvent event)
- Respond to Start button press.
stopButton_Action
void stopButton_Action(ActionEvent event)
- Respond to Stop button press.
delaySlider_actionPerformed
void delaySlider_actionPerformed(ActionEvent event)
- Respond to movement of Delay slider.
resetButton_Action
void resetButton_Action(ActionEvent event)
- Respond to Reset button press.
randomizeButton_Action
void randomizeButton_Action(ActionEvent event)
- Respond to Randomize button press.
stringToColor
Color stringToColor(String c)
- Convert a color's name to a
Color.
- Parameters:
- c - The name of the color.
cellColorChoice_ItemStateChanged
void cellColorChoice_ItemStateChanged(ItemEvent event)
- Respond to Cell Color selection.
backgroundColorChoice_ItemStateChanged
void backgroundColorChoice_ItemStateChanged(ItemEvent event)
- Respond to Background Color selection.
gridSizeChoice_ItemStateChanged
void gridSizeChoice_ItemStateChanged(ItemEvent event)
- Respond to Grid Size selection.
stepButton_Action
void stepButton_Action(ActionEvent event)
- Respond to Step button press.
skipFramesCheckbox_ItemStateChanged
void skipFramesCheckbox_ItemStateChanged(ItemEvent event)
- Respond to Skip Frames button press.
wraparoundCheckBox_ItemStateChanged
void wraparoundCheckBox_ItemStateChanged(ItemEvent event)
- Respond to Wraparound button press.
shadesChoice_ItemStateChanged
void shadesChoice_ItemStateChanged(ItemEvent event)
- Respond to Shades selection.
drawModeGroup_itemStateChanged
void drawModeGroup_itemStateChanged(ItemEvent event)
- Respond to Draw Mode selection.
All Packages Class Hierarchy This Package Previous Next Index