Class ProbeRowInfo

java.lang.Object
ucar.unidata.idv.control.ProbeRowInfo

public class ProbeRowInfo extends Object
Class ProbeRowInfo holds the state for each row in the probe control.
Author:
IDV Development Team
  • Constructor Details

    • ProbeRowInfo

      public ProbeRowInfo()
      ctor
    • ProbeRowInfo

      public ProbeRowInfo(ProbeControl control)
      ctor
      Parameters:
      control - The control we're in. Just use it for getting the sampling mode
    • ProbeRowInfo

      public ProbeRowInfo(Real level, Real alt, int mode, Unit unit, MidiProperties midiProperties)
      ctor used for creating a ProbeRowInfo from legacy bundles values
      Parameters:
      level - level
      alt - altitude
      mode - sampling mode
      unit - display unit
      midiProperties - sound configuartion
    • ProbeRowInfo

      public ProbeRowInfo(ProbeControl control, DataInstance dataInstance)
      ctor
      Parameters:
      control - the control
      dataInstance - data instance
  • Method Details

    • isGrid

      public boolean isGrid()
      Are we probing on grids
      Returns:
      Is this data a grid
    • isPoint

      public boolean isPoint()
      Is this for point data
      Returns:
      true if point data
    • setExtra

      protected void setExtra(String s)
      extra stuff for table
      Parameters:
      s - extra
    • getExtra

      protected String getExtra()
      extra stuff for table
      Returns:
      extra
    • clearCachedSamples

      protected void clearCachedSamples()
      Clear any cached samples
    • setTimeSample

      protected void setTimeSample(Data rt) throws VisADException, RemoteException
      Set the raw value from the Data. If rt is null then set raw value to null. Else if rt is a RealTuple then use the first component else assume it is a Real
      Parameters:
      rt - The data
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getTimeSample

      protected Data getTimeSample()
      Get the time sample
      Returns:
      the time sample
    • initWith

      protected void initWith(ProbeRowInfo that)
      Sort of a copy ctor
      Parameters:
      that - that
    • showSoundDialog

      protected void showSoundDialog(ProbeControl control) throws VisADException, RemoteException
      Show the sound dialog
      Parameters:
      control - control I'm in
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • toString

      public String toString()
      to string
      Overrides:
      toString in class Object
      Returns:
      String representation
    • playSound

      protected void playSound(double value)
      Play a sound for the particular row and value
      Parameters:
      value - value of data
    • setDisplayValue

      protected void setDisplayValue(Object value)
      Set the DisplayValue property.
      Parameters:
      value - The new value for DisplayValue
    • getDisplayValue

      protected Object getDisplayValue()
      Get the DisplayValue property.
      Returns:
      The DisplayValue
    • getGridDataInstance

      public GridDataInstance getGridDataInstance()
      Get the data instance
      Returns:
      The data instance
    • getDataInstance

      public DataInstance getDataInstance()
      Get the data instance
      Returns:
      The data instance
    • setDataInstance

      protected void setDataInstance(DataInstance di)
      Set the data instance
      Parameters:
      di - The data instance
    • getTupleType

      public TupleType getTupleType() throws VisADException, RemoteException
      Get the TupleType for the data
      Returns:
      the type
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • getRealValue

      protected Real getRealValue() throws VisADException, RemoteException
      Get the value as a Real. We may be a Real, if so then return. Else we may be a RealTuple. If so return the 0th component.
      Returns:
      My value as a Real
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getRealValue

      protected Real getRealValue(Data timeSample) throws VisADException, RemoteException
      Get the value at the time sample
      Parameters:
      timeSample - the time sample
      Returns:
      the value
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getPointParameterName

      public String getPointParameterName() throws VisADException, RemoteException
      Get the point parameter name
      Returns:
      the name
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getPointIndex

      public int getPointIndex() throws VisADException, RemoteException
      Get the point index
      Returns:
      the index
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setUnit

      public void setUnit(Unit value)
      Set the Unit property.
      Parameters:
      value - The new value for Unit
    • setWorkingGrid

      protected void setWorkingGrid(FieldImpl grid)
      Set the working grid for this row
      Parameters:
      grid -
    • getWorkingGrid

      public FieldImpl getWorkingGrid()
      Get the sample we last used
      Returns:
      sample
    • setPointSample

      protected void setPointSample(FieldImpl sample, EarthLocation elt) throws VisADException, RemoteException
      Set the sample we last used
      Parameters:
      sample - sample
      elt - The point we sampled on
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • setStationName

      public void setStationName(PointOb ob, DisplayControlImpl control) throws VisADException, RemoteException
      Set the station name
      Parameters:
      ob - the point observation
      control - The display control this is part of
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getTimeSet

      protected Set getTimeSet() throws VisADException, RemoteException
      time set
      Returns:
      time set
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getPointSample

      public FieldImpl getPointSample()
      Get the last point sample
      Returns:
      Point sample
    • getPointSample

      public FieldImpl getPointSample(EarthLocation elt)
      Get the sample we last used. If The given earth location is not the same as the location of the last point we sampled on then null out the sample and return null.
      Parameters:
      elt - The point we want to sample on
      Returns:
      sample
    • getUnit

      public Unit getUnit()
      Get the Unit property.
      Returns:
      The Unit
    • setLevel

      public void setLevel(Real value)
      Set the Level property.
      Parameters:
      value - The new value for Level
    • getLevel

      public Real getLevel()
      Get the Level property.
      Returns:
      The Level
    • setAltitude

      public void setAltitude(Real value)
      Set the Altitude property.
      Parameters:
      value - The new value for Altitude
    • getAltitude

      public Real getAltitude()
      Get the Altitude property.
      Returns:
      The Altitude
    • setSamplingMode

      public void setSamplingMode(int value)
      Set the SamplingMode property.
      Parameters:
      value - The new value for SamplingMode
    • getSamplingMode

      public int getSamplingMode()
      Get the SamplingMode property.
      Returns:
      The SamplingMode
    • setMidiProperties

      public void setMidiProperties(MidiProperties value)
      Set the MidiProperties property.
      Parameters:
      value - The new value for MidiProperties
    • getMidiProperties

      public MidiProperties getMidiProperties()
      Get the MidiProperties property.
      Returns:
      The MidiProperties
    • setLineState

      public void setLineState(LineState value)
      Set the LineState property.
      Parameters:
      value - The new value for LineState
    • getLineState

      public LineState getLineState()
      Get the LineState property.
      Returns:
      The LineState
    • getStationName

      public String getStationName()
      Get the station name
      Returns:
      the name or null
    • setPointParameter

      public void setPointParameter(String value)
      Set the PointParameter property.
      Parameters:
      value - The new value for PointParameter
    • getPointParameter

      public String getPointParameter()
      Get the PointParameter property.
      Returns:
      The PointParameter