edu.ucla.stat.SOCR.applications
Class Application

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
All Implemented Interfaces:
IExperiment, IValueSettable, Pluginable, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, java.util.Observer
Direct Known Subclasses:
BinomialTradingApplication, BlackScholesApplication, NoApp, PortfolioApplication, PortfolioApplication2, StockApplication, StockSimulationApplication

public class Application
extends MultiplePartsPanel
implements java.util.Observer, IExperiment


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
MultiplePartsPanel.SOCRToolBar
 
Field Summary
 java.awt.datatransfer.Clipboard clipboard
           
protected  int numStocks
           
 
Fields inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
applet, fName, graphs, mainPane, recordTable, tables, toolbar, toolbar2, toolbars
 
Constructor Summary
Application()
           
 
Method Summary
 void addTool2(javax.swing.JComponent c)
           
 void doExperiment()
          This method defines what the experiment actually does, and should be overridden
 void emptyTool()
           
 void emptyTool2()
           
 java.lang.String getAppletInfo()
           
 java.awt.Container getDisplayPane()
           
static Application getInstance(java.lang.String classname)
           
 java.lang.String getLocalAbout()
           
 java.lang.String getLocalHelp()
           
 java.lang.String getOnlineDescription()
           
 javax.swing.JTable getResultTable()
           
 int getStopFreq()
          This method returns the stop frequency
 int getTime()
          This method gets the time parameter of the stochastic process.
 java.lang.String getWikiAbout()
           
 java.lang.String getWikiHelp()
           
 void graphUpdate()
           
 void init()
           
 void initialize()
           
 void loadSlider(double[] r1, double[] c1, double[] m1)
           
 void pasteData(java.awt.datatransfer.Clipboard c)
           
 void reset()
          This method is the default reset method, that resets the process to its initial state.
 void setApplet(javax.swing.JApplet a)
           
 void setNumberStocks(java.lang.String number)
           
 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 setTangent(boolean t)
           
 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.
 void updateGraph(javax.swing.JComponent c)
           
 
Methods inherited from class edu.ucla.stat.SOCR.core.MultiplePartsPanel
addGraph, addTable, addTool, addTool2, addToolbar, format, getMainPanel, getName, getRecordTable, getTextPanel, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, play, removeToolbar, 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 java.util.Observer
update
 
Methods inherited from interface edu.ucla.stat.SOCR.core.Pluginable
getName
 

Field Detail

clipboard

public java.awt.datatransfer.Clipboard clipboard

numStocks

protected int numStocks
Constructor Detail

Application

public Application()
Method Detail

getInstance

public static Application getInstance(java.lang.String classname)
                               throws java.lang.Exception
Throws:
java.lang.Exception

init

public void init()

pasteData

public void pasteData(java.awt.datatransfer.Clipboard c)
Specified by:
pasteData in interface IExperiment

setNumberStocks

public void setNumberStocks(java.lang.String number)

addTool2

public void addTool2(javax.swing.JComponent c)

emptyTool

public void emptyTool()

emptyTool2

public void emptyTool2()

updateGraph

public void updateGraph(javax.swing.JComponent c)

setApplet

public void setApplet(javax.swing.JApplet a)
Specified by:
setApplet in interface Pluginable
Overrides:
setApplet in class MultiplePartsPanel

getLocalAbout

public java.lang.String getLocalAbout()

setTangent

public void setTangent(boolean t)

getLocalHelp

public java.lang.String getLocalHelp()

getWikiAbout

public java.lang.String getWikiAbout()

getWikiHelp

public java.lang.String getWikiHelp()

getDisplayPane

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

doExperiment

public void doExperiment()
Description copied from interface: IExperiment
This method defines what the experiment actually does, and should be overridden

Specified by:
doExperiment in interface IExperiment

getAppletInfo

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

getOnlineDescription

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

getResultTable

public javax.swing.JTable getResultTable()
Specified by:
getResultTable in interface IExperiment

getStopFreq

public int getStopFreq()
Description copied from interface: IExperiment
This method returns the stop frequency

Specified by:
getStopFreq in interface IExperiment

getTime

public int getTime()
Description copied from interface: IExperiment
This method gets the time parameter of the stochastic process. If the process is to replicate a basic random experiment, then the time parameter is the number of runs.

Specified by:
getTime in interface IExperiment

graphUpdate

public void graphUpdate()
Specified by:
graphUpdate in interface IExperiment

initialize

public void initialize()
Specified by:
initialize in interface IExperiment

reset

public void reset()
Description copied from interface: IExperiment
This method is the default reset method, that resets the process to its initial state. This method should be overridden.

Specified by:
reset in interface IExperiment

setShowModelDistribution

public void setShowModelDistribution(boolean flag)
Specified by:
setShowModelDistribution in interface IExperiment

setStopFreq

public void setStopFreq(int i)
Description copied from interface: IExperiment
This method sets the stop frequency

Specified by:
setStopFreq in interface IExperiment

setStopNow

public void setStopNow(boolean b)
Description copied from interface: IExperiment
This method defines the boolean variable that stops the process, when the simulation is in run mode

Specified by:
setStopNow in interface IExperiment

step

public void step()
Description copied from interface: IExperiment
This method is the default step method, that runs the process one time unit. This method can be overridden to add sound or other elements

Specified by:
step in interface IExperiment

stop

public void stop()
Description copied from interface: IExperiment
This method stops the simulation thread

Specified by:
stop in interface IExperiment

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

loadSlider

public void loadSlider(double[] r1,
                       double[] c1,
                       double[] m1)