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
  • 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.IOException
      Adds 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:
      getChannelNames in interface NamedDataSource
      Overrides:
      getChannelNames in class PlotXYDataSource<T extends MguiNumber>
    • reset

      public void reset() throws java.io.IOException
      Resets this data source.
      Overrides:
      reset in class PlotXYDataSource<T extends MguiNumber>
      Throws:
      java.io.IOException
    • variableValuesUpdated

      public void variableValuesUpdated​(VariableEvent e)
      Description copied from interface: VariableListener
      Called when a variable's values are updated
      Specified by:
      variableValuesUpdated in interface VariableListener