|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.analysis.plot.OpenGraph
uchicago.src.sim.analysis.OpenSequenceGraph
public class OpenSequenceGraph
A graph that displays a connected series of points (a sequence). Encapsulates a sequence statistic class that manages the data. This statistic class can also be set. Typically, a time series updated every tick of the main schedule.
| Field Summary | |
|---|---|
static uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant |
SHOW_ALL
|
static uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant |
SHOW_FIRST
|
static uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant |
SHOW_LAST
|
| Fields inherited from class uchicago.src.sim.analysis.plot.OpenGraph |
|---|
CIRCLE, CROSS, DIAMOND, fileName, FILLED_CIRCLE, FILLED_DIAMOND, FILLED_SQUARE, FILLED_TRIANGLE, frame, HISTOGRAM, inNormalState, location, model, movieMaker, plot, PLUS_SIGN, SEQUENCE, SQUARE, title, TRIANGLE, xIncr, xMax, xMin, yIncr, yMax, yMin |
| Fields inherited from interface uchicago.src.sim.gui.MediaProducer |
|---|
MPEG, QUICK_TIME |
| Constructor Summary | |
|---|---|
OpenSequenceGraph(java.lang.String title,
SimModel model)
Creates an OpenSequenceGraph with the specified title for the specified model. |
|
OpenSequenceGraph(java.lang.String title,
SimModel model,
java.lang.String fileName,
int fileFormat)
Creates an OpenSequenceGraph with the specified title, model, file name and file format. |
|
| Method Summary | |
|---|---|
Sequence |
addSequence(java.lang.String name,
Sequence sequence)
Adds the specified sequence with the specified name. |
Sequence |
addSequence(java.lang.String name,
Sequence sequence,
java.awt.Color color)
Adds the specified sequence with the specified name to be drawn in the specific color. |
Sequence |
addSequence(java.lang.String name,
Sequence sequence,
java.awt.Color color,
int markStyle)
Adds the specified sequence with the specified name to be drawn in the specific color, whose points will be drawn in the specified style. |
Sequence |
addSequence(java.lang.String name,
Sequence sequence,
int markStyle)
Adds the specified sequence with specified name whose points will be drawn in the specified style. |
Sequence |
createSequence(java.lang.String name,
java.awt.Color color,
int markStyle,
java.lang.Object feedFrom,
java.lang.String methodName)
Creates and adds a Sequence to this SequenceGraph. |
Sequence |
createSequence(java.lang.String name,
java.awt.Color color,
java.lang.Object feedFrom,
java.lang.String methodName)
Creates and adds a Sequence to this SequenceGraph. |
Sequence |
createSequence(java.lang.String name,
int markStyle,
java.lang.Object feedFrom,
java.lang.String methodName)
Creates and adds a Sequence to this SequenceGraph. |
Sequence |
createSequence(java.lang.String name,
java.lang.Object feedFrom,
java.lang.String methodName)
Creates and adds a Sequence to this SequenceGraph. |
boolean |
getXAutoExpand()
Returns whether the plot's x-axis scale will expand to include new points that will not fit in the current scale. |
uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant |
getXViewPolicy()
Returns the current view policy for the x-axis. |
boolean |
getYAutoExpand()
Returns whether the plot's y-axis scale will expand to include new points that will not fit in the current scale. |
uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant |
getYViewPolicy()
Returns the current view policy for the y-axis. |
void |
record()
Records the data for this graph without updating the display. |
void |
setXAutoExpand(boolean autoExpand)
Sets whether the plot's x-axis scale will expand to include new points or not. |
void |
setXRange(double min,
double max)
Sets the initial range of the x-axis. |
void |
setXViewPolicy(uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant policy)
Sets the view policy for the x-axis. |
void |
setYAutoExpand(boolean autoExpand)
Sets whether the plot's y-axis scale will expand to include new points or not. |
void |
setYRange(double min,
double max)
Sets the initial range of the y-axis. |
void |
setYViewPolicy(uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant policy)
Sets the view policy for the y-axis. |
void |
updateGraph()
Updates the display to reflect any new data as captured by record. |
void |
writeToFile()
Writes this graph to a file. |
| Methods inherited from class uchicago.src.sim.analysis.plot.OpenGraph |
|---|
addMovieFrame, closeMovie, createBinDataSource, createListBinDataSource, createSequence, display, dispose, getAxisTitles, getSize, getTitle, getXIncrement, getXRange, getYIncrement, getYRange, setAxisTitles, setBars, setLocation, setMovieName, setSize, setSnapshotFileName, setXIncrement, setXTick, setYIncrement, step, takeSnapshot, updateXTick, zoom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant SHOW_ALL
public static final uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant SHOW_FIRST
public static final uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant SHOW_LAST
| Constructor Detail |
|---|
public OpenSequenceGraph(java.lang.String title,
SimModel model)
title - the title for this graph.model - the model associated with this graph
public OpenSequenceGraph(java.lang.String title,
SimModel model,
java.lang.String fileName,
int fileFormat)
title - the title of the graph.model - the model associated with this graphfileName - the file name to be used when this graph is dumped to a
filefileFormat - the format to be used for dumping data to the file. At
the moment only OpenSeqStatistic.CSV is supported.| Method Detail |
|---|
public Sequence addSequence(java.lang.String name,
Sequence sequence)
name - the name of the sequencesequence - the sequence to add
public Sequence createSequence(java.lang.String name,
java.lang.Object feedFrom,
java.lang.String methodName)
name - the name of the sequencefeedFrom - the object on which to call the methodmethodName - the name of the method to call
public Sequence addSequence(java.lang.String name,
Sequence sequence,
java.awt.Color color)
name - the name of the sequencesequence - the sequence to addcolor - the color of the sequence
public Sequence createSequence(java.lang.String name,
java.awt.Color color,
java.lang.Object feedFrom,
java.lang.String methodName)
name - the name of the sequencecolor - the color of the sequencefeedFrom - the object on which to call the methodmethodName - the name of the method to call
public Sequence addSequence(java.lang.String name,
Sequence sequence,
int markStyle)
name - the name of the sequencesequence - the sequence to addmarkStyle - the shape of the plotted points
public Sequence createSequence(java.lang.String name,
int markStyle,
java.lang.Object feedFrom,
java.lang.String methodName)
name - the name of the sequencemarkStyle - the shape of the plotted pointsfeedFrom - the object on which to call the methodmethodName - the name of the method to call
public Sequence addSequence(java.lang.String name,
Sequence sequence,
java.awt.Color color,
int markStyle)
name - the name of the sequencesequence - the sequence to addcolor - the color of the sequencemarkStyle - the shape of the plotted points
public Sequence createSequence(java.lang.String name,
java.awt.Color color,
int markStyle,
java.lang.Object feedFrom,
java.lang.String methodName)
name - the name of the sequencecolor - the color of the sequencemarkStyle - the shape of the plotted pointsfeedFrom - the object on which to call the methodmethodName - the name of the method to call
public void setXRange(double min,
double max)
Under the SHOW_FIRST and SHOW_LAST view policies, this range is the viewable range. For example, given a range of 5, 100, SHOW_FIRST will only show the points that fall into the range from 5 to 100; SHOW_LAST will show all the points that fall into the range of lastPoint - 95 (i.e the "range" of 5 to 100) to the lastPoint.
setXRange in class OpenGraphmin - the minimum value of the rangemax - the maximum value of the rangesetXViewPolicy
public void setYRange(double min,
double max)
Under the SHOW_FIRST and SHOW_LAST view policies, this range is the viewable range. For example, given a range of 5, 100, SHOW_FIRST will only show the points that fall into the range from 5 to 100; SHOW_LAST will show all the points that fall into the range of lastPoint - 95 (i.e the "range" of 5 to 100) to the lastPoint.
setYRange in class OpenGraphmin - the minimum value of the rangemax - the maximum value of the rangesetYViewPolicypublic void setXViewPolicy(uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant policy)
setXAutoExpand(true)
setXAutoExpand(true)
policy - determines what points are visible w/r to the
x-axispublic uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant getXViewPolicy()
public void setYViewPolicy(uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant policy)
setYAutoExpand(true)
setYAutoExpand(true)
policy - determines what points are visible w/r to the
y-axispublic uchicago.src.sim.analysis.OpenSequenceGraph.PolicyConstant getYViewPolicy()
public void setXAutoExpand(boolean autoExpand)
autoExpand - if true, plot scale will expand, if false then
it will notpublic boolean getXAutoExpand()
public void setYAutoExpand(boolean autoExpand)
autoExpand - if true, plot scale will expand, if false then
it will notpublic boolean getYAutoExpand()
public void record()
record in class OpenGraphpublic void updateGraph()
updateGraph in class OpenGraphpublic void writeToFile()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||