edu.ucla.stat.SOCR.applications.demo
Class StockSimulationApplication

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.applications.Application
              extended by edu.ucla.stat.SOCR.applications.demo.StockSimulationApplication
All Implemented Interfaces:
IExperiment, IValueSettable, Pluginable, java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, java.util.Observer

public class StockSimulationApplication
extends Application
implements java.util.Observer, IExperiment, java.awt.event.ActionListener

The triangle experiment is to break a stick at random and see if the pieces form a triangle. If so, is the triangle acute or obtuse?


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
MultiplePartsPanel.SOCRToolBar
 
Field Summary
protected  int CHART_SIZE_X
           
protected  int CHART_SIZE_Y
           
protected  ChartPanel chartPanel
           
protected  javax.swing.JTextField[] in
           
protected  double[] input
           
protected  javax.swing.JSplitPane upContainer
           
 
Fields inherited from class edu.ucla.stat.SOCR.applications.Application
clipboard, numStocks
 
Fields inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
applet, fName, graphs, mainPane, recordTable, tables, toolbar, toolbar2, toolbars
 
Constructor Summary
StockSimulationApplication()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
 void calculate()
           
protected  XYSeriesCollection createDataset()
           
protected  JFreeChart createEmptyChart(PieDataset dataset)
           
 java.lang.String getAppletInfo()
           
 java.awt.Container getDisplayPane()
           
 java.lang.String getOnlineDescription()
           
 void init()
           
 void initialize()
           
 void mouseClicked(java.awt.event.MouseEvent event)
           
 void update()
          This method is the default update method and defines how the display is updated.
 void update(java.util.Observable arg0, java.lang.Object arg1)
          This method is the default update method and defines how the display is updated.
 
Methods inherited from class edu.ucla.stat.SOCR.applications.Application
addTool2, doExperiment, emptyTool, emptyTool2, getInstance, getLocalAbout, getLocalHelp, getResultTable, getStopFreq, getTime, getWikiAbout, getWikiHelp, graphUpdate, loadSlider, pasteData, reset, setApplet, setNumberStocks, setShowModelDistribution, setStopFreq, setStopNow, setTangent, step, stop, updateGraph
 
Methods inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getName, getRecordTable, getTextPanel, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, play, removeToolbar, setName
 
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.IExperiment
doExperiment, getResultTable, getStopFreq, getTime, graphUpdate, pasteData, reset, setShowModelDistribution, setStopFreq, setStopNow, step, stop
 
Methods inherited from interface edu.ucla.stat.SOCR.core.Pluginable
getName, setApplet
 

Field Detail

CHART_SIZE_X

protected final int CHART_SIZE_X
See Also:
Constant Field Values

CHART_SIZE_Y

protected final int CHART_SIZE_Y
See Also:
Constant Field Values

chartPanel

protected ChartPanel chartPanel

upContainer

protected javax.swing.JSplitPane upContainer

input

protected double[] input

in

protected javax.swing.JTextField[] in
Constructor Detail

StockSimulationApplication

public StockSimulationApplication()
Method Detail

init

public void init()
Overrides:
init in class Application

createDataset

protected XYSeriesCollection createDataset()

createEmptyChart

protected JFreeChart createEmptyChart(PieDataset dataset)

update

public void update(java.util.Observable arg0,
                   java.lang.Object arg1)
This method is the default update method and defines how the display is updated. This method should be overridden.

Specified by:
update in interface java.util.Observer
Overrides:
update in class MultiplePartsPanel

calculate

public void calculate()

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent event)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overrides:
mouseClicked in class MultiplePartsPanel

getOnlineDescription

public java.lang.String getOnlineDescription()
Specified by:
getOnlineDescription in interface IExperiment
Overrides:
getOnlineDescription in class Application

getAppletInfo

public java.lang.String getAppletInfo()
Specified by:
getAppletInfo in interface IExperiment
Overrides:
getAppletInfo in class Application

getDisplayPane

public java.awt.Container getDisplayPane()
Specified by:
getDisplayPane in interface Pluginable
Overrides:
getDisplayPane in class Application

update

public void update()
Description copied from interface: IExperiment
This method is the default update method and defines how the display is updated. This method should be overridden.

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

initialize

public void initialize()
Specified by:
initialize in interface IExperiment
Overrides:
initialize in class Application