|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The Graph interface describes any graph entity that is to be rendered
and the plotting settings to be used to plot the graph. A graph implementation
contains references to a valid GraphSource and Indicator Source.
Graphs are rendered by adding implementations to the Graph Canvas. The
paintGraph method is responsible for rendering the graph on the graphing
canvas. This method is invoked by a call to redraw in the Graph Canvas.
GraphCanvas,
GraphSource,
IndicatorSource| Field Summary | |
|---|---|
static int |
NODATA_DO_NOTHING
Do Nothing on No Data constant. Plot no values if there is no data between data points |
static int |
NODATA_DRAW_PREVIOUS
Draw Previous on No Data constant. On missing data draw the previous data value that was calculated |
static int |
NODATA_DRAW_ZERO
Plot zero on No Data constant. Plot a zero value for all missing values between data points |
static int |
PERIOD_TYPE_MILLIS
Millisecond period type constant. The data sampling period between data points is set milliseconds (each time frame in milliseconds will have a value associated with it). |
static int |
PERIOD_TYPE_PIXELS
Pixel period type constant. The data sampling period between data points is set to pixels (each x pixel will have a value associated with it). |
static int |
PERIOD_TYPE_TICKS
Tick period type constant. The type of data sampling between data points is set to the slider tick width associated with this graph. |
static int |
PERIOD_TYPE_UNAVERAGED
Pixel period type constant. The data sampling period between data points is set to unaveraged. |
static int |
PLOTTING_TYPE_AVERAGE
Average plotting type constant. Plot the average value data points from the graph source. |
static int |
PLOTTING_TYPE_COUNT
Count plotting type constant. Plot the number of data points from the graph source. |
static int |
PLOTTING_TYPE_GRADIENT
Gradient plotting type constant. Plot the estimated gradient of value data points from the graph source. |
static int |
PLOTTING_TYPE_MAX
Maximum plotting type constant. Plot the maximum value data points from the graph source. |
static int |
PLOTTING_TYPE_MIN
Minimum plotting type constant. Plot the minimum value data points from the graph source. |
static int |
PLOTTING_TYPE_MIN_MAX
Maximum and Minimum plotting type constant. Plot the maximum and minimum value data points from the graph source. |
static int |
PLOTTING_TYPE_MIN_MAX_AVERAGE
Maximum and Minimum plotting type constant. Plot the maximum, minimum and average value data points from the graph source. |
static int |
PLOTTING_TYPE_NEAREST
Nearest plotting type constant. Plot the nearest previous value to the current index from the graph source. |
static int |
PLOTTING_TYPE_STDDEV
Standard deviation plotting type constant. Plot the standard deviation of data points from the graph source. |
static int |
PLOTTING_TYPE_STDDEV_AVERAGE
Standard deviation and average plotting type constant. Plot the standard deviation and average of value data points from the graph source. |
static int |
PLOTTING_TYPE_SUM
Aggregation plotting type constant. Plot the sum of value data points from the graph source. |
| Method Summary | |
|---|---|
void |
dispose()
Dispose of all system resources that will not be garbage collected that are associated with this graph. |
java.lang.String |
getDescription()
Get the description for this graph. |
org.eclipse.swt.graphics.Color |
getForeground()
Return the current color associated with the foreground drawing color of this graph |
GraphCanvas |
getGraphCanvas()
Get the graph canvas that this graph is rendered on. |
BasicGraphSource |
getGraphSource()
Get the GraphSource associated with this Graph. |
int |
getLineStyle()
Return this graph's line style |
int |
getLineWidth()
Get the line width of this graph |
java.lang.String |
getMisc()
Get a miscellaneous string for this graph. |
java.lang.String |
getName()
Get the name for this graph. |
int |
getNoDataBehaviour()
Return the no data behaviour constant. |
int |
getPlottingPeriodType()
Get the plotting period type constant for this graph. |
double |
getPlottingPeriodValue()
Get the plotting period value. |
int |
getPlottingType()
Return the current Graph Plotting Type constant. |
double |
getStaticScaling()
Get the static scaling constant. |
double |
getXMax()
Get the minimum X value from the data source. |
double |
getXMin()
Get the minimum X value from the data source. |
double |
getXOffset()
Get the X coordinate time offset. |
TimeZoomSlider |
getXSlider()
Get this graphs X slider |
double |
getYMax()
Get the maximum Y value from the data source. |
double |
getYMin()
Get the minimum Y value from the data source. |
double |
getYOffset()
Get the Y coordinate time offset. |
ZoomSlider |
getYSlider()
Get this graphs Y slider |
void |
paintGraph(org.eclipse.swt.graphics.GC gc,
int x,
int y,
int w,
int h)
Paint this graph on the provided GC, within the given bounds. |
void |
setDescription(java.lang.String description)
Set the description for this graph. |
void |
setForeground(org.eclipse.swt.graphics.Color col)
Set the foreground color to be used for drawing this graph |
void |
setGraphCanvas(GraphCanvas graphCanvas)
Set the graph canvas that this graph is to be rendered on. |
void |
setIndicatorSource(IndicatorSource isource)
Set the indicator source to be used for plotting slider indicators for this graph. |
void |
setLineStyle(int swt_line_style)
Set the line style of this graph. |
void |
setLineWidth(int w)
Set the line width of this graph |
void |
setMisc(java.lang.String misc)
Set the miscellaneous string for this graph. |
void |
setName(java.lang.String name)
Set the name for this graph. |
void |
setNoDataBehaviour(int behaviour)
Set the no data behaviour constant. |
void |
setPlottingPeriod(int type,
double value)
Set the plotting period type and period value. |
void |
setPlottingType(int type)
Set the current Graph Plotting Type constant. |
void |
setStaticScaling(double mult)
Set the static scaling to be used when plotting data points. |
void |
setXOffset(double millis)
Set the X coordinate time offset. |
void |
setXSlider(TimeZoomSlider slider)
Set the X TimeZoomSlider that this graph will use for horizontal point indexing |
void |
setYOffset(double offset)
Set the Y coordinate offset. |
void |
setYSlider(ZoomSlider slider)
Set the Y ZoomSlider that this graph will use for vertical point indexing |
| Field Detail |
public static final int PLOTTING_TYPE_AVERAGE
GraphSource.getAverageBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_MIN
GraphSource.getMin(),
GraphSource.getMinBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_MAX
GraphSource.getMax(),
GraphSource.getMaxBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_MIN_MAX
GraphSource.getMax(),
GraphSource.getMaxBetween(double, double),
GraphSource.getMin(),
GraphSource.getMinBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_MIN_MAX_AVERAGE
GraphSource.getMax(),
GraphSource.getMaxBetween(double, double),
GraphSource.getMin(),
GraphSource.getMinBetween(double, double),
GraphSource.getAverageBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_SUM
GraphSource.getSumBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_NEAREST
public static final int PLOTTING_TYPE_COUNT
GraphSource.getCountBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_STDDEV
GraphSource.getStandardDeviationBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_STDDEV_AVERAGE
GraphSource.getAverageBetween(double, double),
GraphSource.getStandardDeviationBetween(double, double),
Constant Field Valuespublic static final int PLOTTING_TYPE_GRADIENT
public static final int PERIOD_TYPE_TICKS
public static final int PERIOD_TYPE_MILLIS
public static final int PERIOD_TYPE_PIXELS
public static final int PERIOD_TYPE_UNAVERAGED
public static final int NODATA_DO_NOTHING
public static final int NODATA_DRAW_ZERO
public static final int NODATA_DRAW_PREVIOUS
| Method Detail |
public BasicGraphSource getGraphSource()
public double getXMin()
GraphSource.getMin()public double getXMax()
GraphSource.getMin()public double getYMin()
GraphSource.getValueMin()public double getYMax()
GraphSource.getValueMax()
public void paintGraph(org.eclipse.swt.graphics.GC gc,
int x,
int y,
int w,
int h)
gc - an SWT GC on which the implemented graph should be drawnx - the x coordinate bound, in pixelsy - the y coordinate bound, in pixelsw - the width of the drawing canvas, in pixelsh - the height of the drawing canvas, in pixelsGCpublic void setXSlider(TimeZoomSlider slider)
slider - The TimeZoomSlider to be used as the X coordinate sliderpublic void setYSlider(ZoomSlider slider)
slider - The ZoomSlider to be used as the Y coordinate sliderpublic TimeZoomSlider getXSlider()
public ZoomSlider getYSlider()
public void setForeground(org.eclipse.swt.graphics.Color col)
col - the Color for this graph to be drawn withpublic org.eclipse.swt.graphics.Color getForeground()
public void setLineWidth(int w)
w - the new line width valuepublic int getLineWidth()
getLineWidth()public void setLineStyle(int swt_line_style)
swt_line_style - the SWT line style constantGC.setLineStyle(int),
SWTpublic int getLineStyle()
setLineStyle(int)public void setStaticScaling(double mult)
mult - the double multiplier valuepublic double getStaticScaling()
setStaticScaling(double)public int getPlottingType()
public void setPlottingType(int type)
type - an integer constant representing the desired plotting typepublic int getNoDataBehaviour()
public void setNoDataBehaviour(int behaviour)
behaviour - the No Data behaviour constant to be used when plotting this graph
public void setPlottingPeriod(int type,
double value)
type - the plotting period type constantsvalue - the plotting period valuepublic int getPlottingPeriodType()
setPlottingPeriod(int, double)public double getPlottingPeriodValue()
setPlottingPeriod(int, double)public void setXOffset(double millis)
millis - the offset in millisecondspublic double getXOffset()
public void setYOffset(double offset)
offset - the offset in millisecondspublic double getYOffset()
public void setIndicatorSource(IndicatorSource isource)
isource - the IndicatorSource implementation to be used for plotting the indicators of this graphIndicatorSourcepublic void setName(java.lang.String name)
name - a String name to be assigned to this graphpublic java.lang.String getName()
public void setDescription(java.lang.String description)
description - String descirption to be assigned to this graphpublic java.lang.String getDescription()
public void setMisc(java.lang.String misc)
misc - String descirption to be assigned to this graphpublic java.lang.String getMisc()
public void setGraphCanvas(GraphCanvas graphCanvas)
graphCanvas - the Graph Canvas that this graph is assigned toGraphCanvaspublic GraphCanvas getGraphCanvas()
GraphCanvas,
setGraphCanvas(GraphCanvas gc)public void dispose()
|
TPTP 4.1.0 Platform Project Public API Specification |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||