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, update
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setApplet
public Experiment()
public static IExperiment getInstance(java.lang.String classname) throws java.lang.Exception
java.lang.Exception
public void initialize()
initialize
in interface IExperiment
public int getTime()
getTime
in interface IExperiment
public void stop()
stop
in interface IExperiment
public void run()
run
in interface java.lang.Runnable
public java.lang.String getName()
getName
in interface Pluginable
getName
in class MultiplePartsPanel
public java.lang.String getAppletInfo()
getAppletInfo
in interface IExperiment
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged
in interface java.awt.event.ItemListener
public void doExperiment()
doExperiment
in interface IExperiment
public void step()
step
in interface IExperiment
public void reset()
reset
in interface IExperiment
public void update()
update
in interface IExperiment
public void resetUpdateCount()
public void graphUpdate()
graphUpdate
in interface IExperiment
public void setStopNow(boolean b)
setStopNow
in interface IExperiment
public int getStopFreq()
getStopFreq
in interface IExperiment
public void setStopFreq(int i)
setStopFreq
in interface IExperiment
public javax.swing.JComboBox getUpdateChoice()
public javax.swing.JComboBox getStopChoice()
public java.lang.String getOnlineDescription()
getOnlineDescription
in interface IExperiment
public java.awt.Container getDisplayPane()
getDisplayPane
in interface Pluginable
public void setShowModelDistribution(boolean flag)
setShowModelDistribution
in interface IExperiment
public javax.swing.JTable getResultTable()
getResultTable
in interface IExperiment