| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucla.stat.SOCR.core.SOCRValueSettable
edu.ucla.stat.SOCR.core.MultiplePartsPanel
edu.ucla.stat.SOCR.applications.Application
edu.ucla.stat.SOCR.applications.demo.PortfolioApplication
public class PortfolioApplication
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  double[][] | CORR | 
| protected  double | error_bound_x | 
| protected  double | max_x | 
| protected  double | min_x | 
| protected  double | mouse_x | 
| protected  double | mouse_y | 
| protected  int | numOptions | 
| protected  double[] | R | 
| protected  double | step_x | 
| protected  java.util.LinkedList<double[]> | stockOptions | 
| protected  double[] | tmp_x | 
| 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 | |
|---|---|
| PortfolioApplication()This method initializes the experiment, including the toolbar, triangle, scatterplot, random variable graph and table | |
| Method Summary | |
|---|---|
|  void | chartMouseClicked(ChartMouseEvent arg0) | 
|  void | chartMouseMoved(ChartMouseEvent arg0) | 
| protected  JFreeChart | createEmptyChart(PieDataset dataset) | 
|  void | doExperiment()This method defines what the experiment actually does, and should be overridden | 
|  java.lang.String | getAppletInfo() | 
|  java.awt.Container | getDisplayPane() | 
|  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. | 
|  void | graphUpdate() | 
|  void | initialize() | 
|  void | mouseClicked(java.awt.event.MouseEvent event) | 
|  void | reset()This method is the default reset method, that resets the process to its initial state. | 
|  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 | setupStockOptions() | 
|  void | setupStockOptionsRec(int id,
                     double share) | 
|  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 | 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, emptyTool, emptyTool2, getInstance, getLocalAbout, getLocalHelp, getWikiAbout, getWikiHelp, init, loadSlider, pasteData, setApplet, setNumberStocks, setTangent, 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 | 
|---|
| pasteData | 
| Methods inherited from interface edu.ucla.stat.SOCR.core.Pluginable | 
|---|
| getName, setApplet | 
| Field Detail | 
|---|
protected final int CHART_SIZE_X
protected final int CHART_SIZE_Y
protected ChartPanel chartPanel
protected double[] R
protected double[][] CORR
protected int numOptions
protected double step_x
protected double min_x
protected double max_x
protected double error_bound_x
protected double mouse_x
protected double mouse_y
protected double[] tmp_x
protected java.util.LinkedList<double[]> stockOptions
| Constructor Detail | 
|---|
public PortfolioApplication()
| Method Detail | 
|---|
protected JFreeChart createEmptyChart(PieDataset dataset)
public int getTime()
IExperiment
getTime in interface IExperimentgetTime in class Applicationpublic void stop()
stop in interface IExperimentstop in class Applicationpublic void step()
step in interface IExperimentstep in class Applicationpublic void reset()
reset in interface IExperimentreset in class Application
public void update(java.util.Observable arg0,
                   java.lang.Object arg1)
update in interface java.util.Observerupdate in class MultiplePartsPanelpublic void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class MultiplePartsPanelpublic void setStopNow(boolean b)
setStopNow in interface IExperimentsetStopNow in class Applicationpublic int getStopFreq()
getStopFreq in interface IExperimentgetStopFreq in class Applicationpublic void setStopFreq(int i)
setStopFreq in interface IExperimentsetStopFreq in class Applicationpublic java.lang.String getOnlineDescription()
getOnlineDescription in interface IExperimentgetOnlineDescription in class Applicationpublic java.lang.String getAppletInfo()
getAppletInfo in interface IExperimentgetAppletInfo in class Applicationpublic void doExperiment()
IExperiment
doExperiment in interface IExperimentdoExperiment in class Applicationpublic java.awt.Container getDisplayPane()
getDisplayPane in interface PluginablegetDisplayPane in class Applicationpublic void update()
IExperiment
update in interface IExperimentupdate in class Application
public void setupStockOptionsRec(int id,
                                 double share)
public void setupStockOptions()
public void initialize()
initialize in interface IExperimentinitialize in class Applicationpublic void chartMouseClicked(ChartMouseEvent arg0)
public void chartMouseMoved(ChartMouseEvent arg0)
public javax.swing.JTable getResultTable()
getResultTable in interface IExperimentgetResultTable in class Applicationpublic void graphUpdate()
graphUpdate in interface IExperimentgraphUpdate in class Applicationpublic void setShowModelDistribution(boolean flag)
setShowModelDistribution in interface IExperimentsetShowModelDistribution in class Application| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||