public class Experiment extends MultiplePartsPanel implements java.lang.Runnable, java.awt.event.ActionListener, java.awt.event.ItemListener, IExperiment
MultiplePartsPanel.SOCRToolBar| Modifier and Type | Field and Description |
|---|---|
protected boolean |
showModelDistribution |
applet, fName, graphs, mainPane, recordTable, tables, toolbar, toolbar2, toolbars| Constructor and Description |
|---|
Experiment()
This method initializes the experiment, by setting up the basic
simulation buttons (step, run, stop, reset), and the update and stop
choices on the main toolbar.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event) |
void |
doExperiment()
This method defines what the experiment actually does, and should be
overridden
|
java.lang.String |
getAppletInfo() |
java.awt.Container |
getDisplayPane() |
static IExperiment |
getInstance(java.lang.String classname) |
java.lang.String |
getName() |
java.lang.String |
getOnlineDescription() |
javax.swing.JTable |
getResultTable() |
javax.swing.JComboBox |
getStopChoice()
This method returns the stop choice.
|
int |
getStopFreq()
This method returns the stop frequency
|
int |
getTime()
This method gets the time parameter of the stochastic process.
|
javax.swing.JComboBox |
getUpdateChoice()
This method returns the update choice.
|
void |
graphUpdate() |
void |
initialize()
used for some sublcass to initialize before be used
|
void |
itemStateChanged(java.awt.event.ItemEvent event)
This method handles the choice events, associated with the update and
stop choices.
|
void |
reset()
This method is the default reset method, that resets the process to its
initial state.
|
void |
resetUpdateCount() |
void |
run()
This method runs the simulation thread
|
void |
setShowModelDistribution(boolean flag) |
void |
setStopFreq(int i)
This method sets the stop frequency
|
void |
setStopNow(boolean b)
This method defines the boolean variable that stops the process, when the
simulation is in run mode
|
void |
step()
This method is the default step method, that runs the process one time
unit.
|
void |
stop()
This method stops the simulation thread
|
void |
update()
This method is the default update method and defines how the display is
updated.
|
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getRecordTable, getTextPanel, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, play, setApplet, setName, updatecreateComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSettersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetAppletpublic Experiment()
public static IExperiment getInstance(java.lang.String classname) throws java.lang.Exception
java.lang.Exceptionpublic void initialize()
initialize in interface IExperimentpublic int getTime()
getTime in interface IExperimentpublic void stop()
stop in interface IExperimentpublic void run()
run in interface java.lang.Runnablepublic java.lang.String getName()
getName in interface PluginablegetName in class MultiplePartsPanelpublic java.lang.String getAppletInfo()
getAppletInfo in interface IExperimentpublic void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged in interface java.awt.event.ItemListenerpublic void doExperiment()
doExperiment in interface IExperimentpublic void step()
step in interface IExperimentpublic void reset()
reset in interface IExperimentpublic void update()
update in interface IExperimentpublic void resetUpdateCount()
public void graphUpdate()
graphUpdate in interface IExperimentpublic void setStopNow(boolean b)
setStopNow in interface IExperimentpublic int getStopFreq()
getStopFreq in interface IExperimentpublic void setStopFreq(int i)
setStopFreq in interface IExperimentpublic javax.swing.JComboBox getUpdateChoice()
public javax.swing.JComboBox getStopChoice()
public java.lang.String getOnlineDescription()
getOnlineDescription in interface IExperimentpublic java.awt.Container getDisplayPane()
getDisplayPane in interface Pluginablepublic void setShowModelDistribution(boolean flag)
setShowModelDistribution in interface IExperimentpublic javax.swing.JTable getResultTable()
getResultTable in interface IExperiment