Package mgui.interfaces.plots
Class VariablePlotTimeSeriesDataSource<T extends MguiNumber>
java.lang.Object
mgui.interfaces.plots.PlotXYDataSource<T>
mgui.interfaces.plots.PlotTimeSeriesDataSource<T>
mgui.interfaces.plots.VariablePlotTimeSeriesDataSource<T>
- All Implemented Interfaces:
InterfaceDataSource<T>
,InterfaceDataSourceTimeSeries<T>
,InterfaceDataSourceXY<T>
,NamedDataSource
,VariableListener
public class VariablePlotTimeSeriesDataSource<T extends MguiNumber> extends PlotTimeSeriesDataSource<T> implements VariableListener
An XY data source with a
VariableInt
as its source.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.interfaces.plots.PlotTimeSeriesDataSource
x, x_value, y, y_values
Fields inherited from class mgui.interfaces.plots.PlotXYDataSource
batch, cursor, emission, reset, sourceListeners, var_count, xy, xy_data
-
Constructor Summary
Constructors Constructor Description VariablePlotTimeSeriesDataSource()
-
Method Summary
Modifier and Type Method Description void
addYVariable(java.lang.String var_string)
Adds a Y variable, as a string of the form:java.util.ArrayList<java.lang.String>
getChannelNames()
void
reset()
Resets this data source.void
setX(java.util.ArrayList<T> x)
Copies the X data series to this data source.protected void
setXPart(java.lang.String part)
void
setXVariable(java.lang.String var_string)
Set the X variable, as a string of the form:protected void
setYPart(java.lang.String name, java.lang.String part)
void
variableValuesUpdated(VariableEvent e)
Called when a variable's values are updatedMethods inherited from class mgui.interfaces.plots.PlotTimeSeriesDataSource
fireEmission, getChannelCount, getSourceSignal, getSourceSignalAsBytes, getSourceSignalX, getSourceSignalX, getSourceSignalY, getSourceSignalY, getSourceSignalY, getY, setChannelNames, setY, setY
Methods inherited from class mgui.interfaces.plots.PlotXYDataSource
addDataSourceListener, appendChannel, fireReset, getChannelSize, getSourceSignalX, getSourceSignalXY, getSourceSignalXY, removeDataSourceListener, setBatch, setX, setXY, setY
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mgui.interfaces.io.InterfaceDataSource
addDataSourceListener, removeDataSourceListener
Methods inherited from interface mgui.interfaces.io.InterfaceDataSourceXY
getSourceSignalXY
-
Constructor Details
-
VariablePlotTimeSeriesDataSource
public VariablePlotTimeSeriesDataSource()
-
-
Method Details
-
setXVariable
public void setXVariable(java.lang.String var_string) throws java.io.IOExceptionSet the X variable, as a string of the form:{variable='[var_name]' part='[part_string]'},
where [part_string] has the syntax "
x_start,y_start,..,n_start:x_start,y_start,..,n_start
". E.g., "1,2:20,2
". Use asterisk, "*" to indicate last element in a dimension. E.g,, "1,2:*,*
".- Parameters:
var_string
-- Throws:
java.io.IOException
- See Also:
VariableInt
-
setX
Description copied from class:PlotTimeSeriesDataSource
Copies the X data series to this data source.- Overrides:
setX
in classPlotTimeSeriesDataSource<T extends MguiNumber>
-
setXPart
protected void setXPart(java.lang.String part) -
addYVariable
public void addYVariable(java.lang.String var_string) throws java.io.IOExceptionAdds a Y variable, as a string of the form:{variable='[var_name]' part='[part_string]'},
where [part_string] has the syntax "
x_start,y_start,..,n_start:x_start,y_start,..,n_start
". E.g., "1,2:20,2
". Use asterisk, "*" to indicate last element in a dimension. E.g,, "1,2:*,*
".- Parameters:
var_string
-- Throws:
java.io.IOException
- See Also:
VariableInt
-
setYPart
protected void setYPart(java.lang.String name, java.lang.String part) throws java.io.IOException- Throws:
java.io.IOException
-
getChannelNames
public java.util.ArrayList<java.lang.String> getChannelNames()- Specified by:
getChannelNames
in interfaceNamedDataSource
- Overrides:
getChannelNames
in classPlotTimeSeriesDataSource<T extends MguiNumber>
-
reset
public void reset() throws java.io.IOExceptionResets this data source.- Overrides:
reset
in classPlotXYDataSource<T extends MguiNumber>
- Throws:
java.io.IOException
-
variableValuesUpdated
Description copied from interface:VariableListener
Called when a variable's values are updated- Specified by:
variableValuesUpdated
in interfaceVariableListener
-