edu.ucla.stat.SOCR.experiments
Class FireExperiment

java.lang.Object
  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.MultiplePartsPanel
          extended by edu.ucla.stat.SOCR.core.Experiment
              extended by edu.ucla.stat.SOCR.experiments.FireExperiment
All Implemented Interfaces:
IExperiment, IValueSettable, Pluginable, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.lang.Runnable, java.util.EventListener, java.util.Observer

public class FireExperiment
extends Experiment

This class models the fire experiment. Each tree in a rectangular forest can be on fire, burnt, or green. When a tree is on fire at time t, it may catch any of its neighboring trees on fire at time t + 1. A tree on fire at time t is burnt at time t + 1, and remains burnt thereafter.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
MultiplePartsPanel.SOCRToolBar
 
Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.Experiment
showModelDistribution
 
Fields inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
applet, fName, graphs, mainPane, recordTable, tables, toolbar2, toolbars
 
Constructor Summary
FireExperiment()
          This method initializes the experiment, including the toolbars, scrollbars, labels, forest.
 
Method Summary
 void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
          This method handles the scrollbar events associated with changes in the fire-spread probabilities.
 void doExperiment()
          This method defines the experiment.
 void itemStateChanged(java.awt.event.ItemEvent event)
          This method handles the choice events associated with changing the size of the forest and changing the edit color.
 void mouseClicked(java.awt.event.MouseEvent event)
          This method handles the mouse click events that are associated with changing the states of trees.
 void mouseMoved(java.awt.event.MouseEvent event)
          This method handles the mouse move events, so the the mouse position can be tracked.
 void reset()
          This method resets the experiment, including the forest, and the record table.
 void update()
          This method updates the experiment, including the forest and the update record.
 
Methods inherited from class edu.ucla.stat.SOCR.core.Experiment
actionPerformed, getAppletInfo, getDisplayPane, getInstance, getName, getOnlineDescription, getResultTable, getStopChoice, getStopFreq, getTime, getUpdateChoice, graphUpdate, initialize, pasteData, resetUpdateCount, run, setShowModelDistribution, setStopFreq, setStopNow, step, stop
 
Methods inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getRecordTable, getTextPanel, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, play, removeToolbar, setApplet, setName, update
 
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.ucla.stat.SOCR.core.Pluginable
setApplet
 

Constructor Detail

FireExperiment

public FireExperiment()
This method initializes the experiment, including the toolbars, scrollbars, labels, forest.

Method Detail

doExperiment

public void doExperiment()
This method defines the experiment.

Specified by:
doExperiment in interface IExperiment
Overrides:
doExperiment in class Experiment

reset

public void reset()
This method resets the experiment, including the forest, and the record table.

Specified by:
reset in interface IExperiment
Overrides:
reset in class Experiment

update

public void update()
This method updates the experiment, including the forest and the update record.

Specified by:
update in interface IExperiment
Overrides:
update in class Experiment

adjustmentValueChanged

public void adjustmentValueChanged(java.awt.event.AdjustmentEvent event)
This method handles the scrollbar events associated with changes in the fire-spread probabilities.


itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent event)
This method handles the choice events associated with changing the size of the forest and changing the edit color.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Overrides:
itemStateChanged in class Experiment

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
This method handles the mouse move events, so the the mouse position can be tracked.

Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class MultiplePartsPanel

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
This method handles the mouse click events that are associated with changing the states of trees.

Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class MultiplePartsPanel