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_valuesFields 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 voidaddYVariable(java.lang.String var_string)Adds a Y variable, as a string of the form:java.util.ArrayList<java.lang.String>getChannelNames()voidreset()Resets this data source.voidsetX(java.util.ArrayList<T> x)Copies the X data series to this data source.protected voidsetXPart(java.lang.String part)voidsetXVariable(java.lang.String var_string)Set the X variable, as a string of the form:protected voidsetYPart(java.lang.String name, java.lang.String part)voidvariableValuesUpdated(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, setYMethods inherited from class mgui.interfaces.plots.PlotXYDataSource
addDataSourceListener, appendChannel, fireReset, getChannelSize, getSourceSignalX, getSourceSignalXY, getSourceSignalXY, removeDataSourceListener, setBatch, setX, setXY, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface mgui.interfaces.io.InterfaceDataSource
addDataSourceListener, removeDataSourceListenerMethods 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:PlotTimeSeriesDataSourceCopies the X data series to this data source.- Overrides:
setXin 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:
getChannelNamesin interfaceNamedDataSource- Overrides:
getChannelNamesin classPlotTimeSeriesDataSource<T extends MguiNumber>
-
reset
public void reset() throws java.io.IOExceptionResets this data source.- Overrides:
resetin classPlotXYDataSource<T extends MguiNumber>- Throws:
java.io.IOException
-
variableValuesUpdated
Description copied from interface:VariableListenerCalled when a variable's values are updated- Specified by:
variableValuesUpdatedin interfaceVariableListener
-