|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUI.Run.JSci.GEVAGraphModel
public class GEVAGraphModel
Override the JSci Graph2DModel to do some custom graph data extraction
Constructor Summary | |
---|---|
GEVAGraphModel()
|
Method Summary | |
---|---|
void |
addData(double[] data)
Add a single instance of statistics data to each of the series |
void |
addGraphDataListener(JSci.awt.GraphDataListener listener)
|
int |
addSeries()
Add a new series to the graph |
float |
calcYExtremaMax()
Calculate the maximum Y value on the graph. |
float |
calcYExtremaMin()
Calculate the minimum Y value on the graph. |
void |
firstSeries()
Set the active series to the first series. |
java.awt.Color |
getColour()
Get the colour to render the active series in the GUI |
java.awt.Color |
getErrorColour()
Get the colour to render the error series of the active series |
java.awt.Color |
getSeriesColour(int seriesIndex)
Get the colour used when rendering the specified seriesIndex in the GUI |
int |
getSeriesErrorSeries(int seriesIndex)
Get the seriesIndex that the specified seriesIndex is using as its error bars. |
int |
getSeriesLength(int seriesIndex)
Get the total number of data indexes for the specified series. |
float |
getSeriesOffset(int seriesIndex)
Get the vertical offset amount for the specified series. i.e. if the series has values in the range 50..100, and an offset of 10 is set for it, it will show its values in the range 60..110 |
float |
getSeriesScale(int seriesIndex)
Get the vertical scaling factor for the specified series. i.e. if the series has values in the range 50..100, and a scale of 0.5 is set for it, it will show its values in the range 25..50 |
GEVAGraphStatistics |
getSeriesStatistics(int seriesIndex)
Get statistical information about the specified series |
float |
getSeriesValue(int seriesIndex)
Get the last data value recorded for this series |
float |
getSeriesValueAt(int seriesIndex,
int dataIndex)
Get the data value of a particular series at a particular point |
float |
getXCoord(int dataIndex)
All data is recorded on integer steps, so this will always return the same value as what's passed in |
float |
getXExtremaMax()
Get the maximum X value on the graph. |
float |
getXExtremaMin()
The min will always be 0. |
float |
getYCoord(int dataIndex)
Get the value that was recorded for the active series (see firstSeries/nextSeries) at the generation specified by dataIndex |
float |
getZCoord(int dataIndex)
Get the error bar value that was recorded for the active series (see firstSeries/nextSeries) at the generation specified by dataIndex |
boolean |
hasErrorSeries()
Get whether the active series has another series as its error series |
boolean |
isErrorSeries()
Get whether the active series is an error series for another series |
boolean |
isErrorVisible()
Get whether the error series of the active series is visible |
boolean |
isSelected()
Get whether the active series is selected |
boolean |
isSeriesErrorSeries(int seriesIndex)
Return whether the specified seriesIndex is the error bars of another seriesIndex |
boolean |
isSeriesSelected(int seriesIndex)
Get whether the specified seriesIndex is highlighted in the GUI |
boolean |
isSeriesVisible(int seriesIndex)
Get whether the specified seriesIndex is visible in the GUI |
boolean |
isVisible()
Get whether the active series is visible |
boolean |
lastSeries()
Get whether there are any more active series. |
boolean |
nextSeries()
Set the active series to the next series. |
void |
removeGraphDataListener(JSci.awt.GraphDataListener listener)
|
int |
seriesLength()
Get the length of the active series (see firstSeries/nextSeries) |
void |
setSeriesColour(int seriesIndex,
java.awt.Color colour)
Set the colour used when rendering the specified seriesIndex in the GUI |
void |
setSeriesErrorSeries(int seriesIndex,
int errorIndex)
Set a seriesIndex to use another seriesIndex as its error bars. |
void |
setSeriesOffset(int seriesIndex,
float offset)
Set the vertical offset amount for the specified series. i.e. if the series has values in the range 50..100, and an offset of 10 is set for it, it will show its values ini the range 60..110 |
void |
setSeriesOnTop(int seriesIndex)
Set the specified series as being the most important. |
void |
setSeriesScale(int seriesIndex,
float scale)
Set the vertical scaling factor for the specified series. i.e. if the series has values in the range 50..100, and a scale of 0.5 is set for it, it will show its values in the range 25..50 |
void |
setSeriesSelected(int seriesIndex,
boolean selected)
Set whether the specified seriesIndex should be highlighted in the GUI |
void |
setSeriesVisible(int seriesIndex,
boolean visible)
Set whether the specified seriesIndex should be visible in the GUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GEVAGraphModel()
Method Detail |
---|
public int addSeries()
public void addData(double[] data)
data
- Array of data, one for each seriespublic float getXExtremaMin()
public float getXExtremaMax()
public float calcYExtremaMin()
public float calcYExtremaMax()
public int getSeriesLength(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to modify
public GEVAGraphStatistics getSeriesStatistics(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to modify
public void setSeriesScale(int seriesIndex, float scale)
seriesIndex
- The series index (returned from addSeries) to modifyscale
- The scaling factor. Must be > 0 or the graph will throw. It
is best to be kept above 0.0001 or so as very low values can confuse the
extrema calculations causing the graph to throw toopublic float getSeriesScale(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to modify
public void setSeriesOffset(int seriesIndex, float offset)
seriesIndex
- The series index (returned from addSeries) to modifyoffset
- The offset amount. Can be positive or negative to offset
up or down the graph respectivelypublic float getSeriesOffset(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to modify
public void setSeriesColour(int seriesIndex, java.awt.Color colour)
seriesIndex
- The series index (returned from addSeries) to modifycolour
- The colour to render aspublic java.awt.Color getSeriesColour(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to modify
public void setSeriesVisible(int seriesIndex, boolean visible)
seriesIndex
- The series index (returned from addSeries) to modifyvisible
- whether it should be visiblepublic boolean isSeriesVisible(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to test
public void setSeriesSelected(int seriesIndex, boolean selected)
seriesIndex
- The series index (returned from addSeries) to modifyselected
- whether it should be highlightedpublic boolean isSeriesSelected(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to test
public void setSeriesErrorSeries(int seriesIndex, int errorIndex)
seriesIndex
- The series index (returned from addSeries) to add
error bars toerrorIndex
- The series index (returned from addSeries) that will
become the error barspublic int getSeriesErrorSeries(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) get the
error bars of
public boolean isSeriesErrorSeries(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to test
public float getSeriesValueAt(int seriesIndex, int dataIndex)
seriesIndex
- The series index (returned from addSeries) to get fromdataIndex
- The X co-ordinate of the data index (generation)
public float getSeriesValue(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to get from
public void setSeriesOnTop(int seriesIndex)
seriesIndex
- The series index (returned from addSeries) to testpublic float getXCoord(int dataIndex)
getXCoord
in interface JSci.awt.Graph2DModel
dataIndex
- The X co-ordinate of the data index (generation)
public float getYCoord(int dataIndex)
getYCoord
in interface JSci.awt.Graph2DModel
dataIndex
- The generation to use
public float getZCoord(int dataIndex)
dataIndex
- The generation to use
public java.awt.Color getColour()
public java.awt.Color getErrorColour()
public boolean isVisible()
public boolean isErrorVisible()
public boolean isSelected()
public boolean hasErrorSeries()
public boolean isErrorSeries()
public int seriesLength()
seriesLength
in interface JSci.awt.Graph2DModel
public void firstSeries()
firstSeries
in interface JSci.awt.Graph2DModel
public boolean nextSeries()
nextSeries
in interface JSci.awt.Graph2DModel
public boolean lastSeries()
public void addGraphDataListener(JSci.awt.GraphDataListener listener)
addGraphDataListener
in interface JSci.awt.Graph2DModel
public void removeGraphDataListener(JSci.awt.GraphDataListener listener)
removeGraphDataListener
in interface JSci.awt.Graph2DModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |