|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.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 IExperiment
getTime
in class Application
public void stop()
stop
in interface IExperiment
stop
in class Application
public void step()
step
in interface IExperiment
step
in class Application
public void reset()
reset
in interface IExperiment
reset
in class Application
public void update(java.util.Observable arg0, java.lang.Object arg1)
update
in interface java.util.Observer
update
in class MultiplePartsPanel
public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class MultiplePartsPanel
public void setStopNow(boolean b)
setStopNow
in interface IExperiment
setStopNow
in class Application
public int getStopFreq()
getStopFreq
in interface IExperiment
getStopFreq
in class Application
public void setStopFreq(int i)
setStopFreq
in interface IExperiment
setStopFreq
in class Application
public java.lang.String getOnlineDescription()
getOnlineDescription
in interface IExperiment
getOnlineDescription
in class Application
public java.lang.String getAppletInfo()
getAppletInfo
in interface IExperiment
getAppletInfo
in class Application
public void doExperiment()
IExperiment
doExperiment
in interface IExperiment
doExperiment
in class Application
public java.awt.Container getDisplayPane()
getDisplayPane
in interface Pluginable
getDisplayPane
in class Application
public void update()
IExperiment
update
in interface IExperiment
update
in class Application
public void setupStockOptionsRec(int id, double share)
public void setupStockOptions()
public void initialize()
initialize
in interface IExperiment
initialize
in class Application
public void chartMouseClicked(ChartMouseEvent arg0)
public void chartMouseMoved(ChartMouseEvent arg0)
public javax.swing.JTable getResultTable()
getResultTable
in interface IExperiment
getResultTable
in class Application
public void graphUpdate()
graphUpdate
in interface IExperiment
graphUpdate
in class Application
public void setShowModelDistribution(boolean flag)
setShowModelDistribution
in interface IExperiment
setShowModelDistribution
in class Application
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |