Package mgui.interfaces.plots
Class VariablePlotXYDataSource<T extends MguiNumber>
java.lang.Object
mgui.interfaces.plots.PlotXYDataSource<T>
mgui.interfaces.plots.VariablePlotXYDataSource<T>
- All Implemented Interfaces:
InterfaceDataSource<T>,InterfaceDataSourceXY<T>,NamedDataSource,VariableListener
public class VariablePlotXYDataSource<T extends MguiNumber> extends PlotXYDataSource<T> implements VariableListener
XY data source which uses two
VariableInt object as its X and Y sources.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.interfaces.plots.PlotXYDataSource
batch, cursor, emission, reset, sourceListeners, var_count, xy, xy_data -
Constructor Summary
Constructors Constructor Description VariablePlotXYDataSource() -
Method Summary
Modifier and Type Method Description voidaddXYPair(java.lang.String var_string_x, java.lang.String var_string_y, java.lang.String key)Adds an X-Y variable pair, as strings of the form:java.util.ArrayList<java.lang.String>getChannelNames()voidreset()Resets this data source.protected voidsetXPart(java.lang.String name, java.lang.String part)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.PlotXYDataSource
addDataSourceListener, appendChannel, fireEmission, fireReset, getChannelCount, getChannelSize, getSourceSignal, getSourceSignalAsBytes, getSourceSignalX, getSourceSignalX, getSourceSignalXY, getSourceSignalXY, getSourceSignalY, getSourceSignalY, removeDataSourceListener, setBatch, setChannelNames, setX, setXY, setYMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
VariablePlotXYDataSource
public VariablePlotXYDataSource()
-
-
Method Details
-
addXYPair
public void addXYPair(java.lang.String var_string_x, java.lang.String var_string_y, java.lang.String key) throws java.io.IOExceptionAdds an X-Y variable pair, as strings 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
-
setXPart
protected void setXPart(java.lang.String name, java.lang.String part) throws java.io.IOException- Throws:
java.io.IOException
-
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 classPlotXYDataSource<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
-