ucar.unidata.idv.control
Class ProbeRowInfo

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

public class ProbeRowInfo
extends Object

Class ProbeRowInfo holds the state for each row in the probe control.

Version:
$Revision: 1.19 $
Author:
IDV Development Team

Constructor Summary
ProbeRowInfo()
          ctor
ProbeRowInfo(ProbeControl control)
          ctor
ProbeRowInfo(ProbeControl control, DataInstance dataInstance)
          ctor
ProbeRowInfo(Real level, Real alt, int mode, Unit unit, MidiProperties midiProperties)
          ctor used for creating a ProbeRowInfo from legacy bundles values
 
Method Summary
protected  void clearCachedSamples()
          Clear any cached samples
 Real getAltitude()
          Get the Altitude property.
 DataInstance getDataInstance()
          Get the data instance
protected  Object getDisplayValue()
          Get the DisplayValue property.
protected  String getExtra()
          extra stuff for table
 GridDataInstance getGridDataInstance()
          Get the data instance
 Real getLevel()
          Get the Level property.
 LineState getLineState()
          Get the LineState property.
 MidiProperties getMidiProperties()
          Get the MidiProperties property.
 int getPointIndex()
          _more_
 String getPointParameter()
          Get the PointParameter property.
 String getPointParameterName()
          _more_
 FieldImpl getPointSample()
          Get the last point sample
 FieldImpl getPointSample(EarthLocation elt)
          Get the sample we last used.
protected  Real getRealValue()
          Get the value as a Real.
protected  Real getRealValue(Data timeSample)
           
 int getSamplingMode()
          Get the SamplingMode property.
 String getStationName()
          _more_
protected  Data getTimeSample()
          _more_
protected  Set getTimeSet()
          time set
 TupleType getTupleType()
          _more_
 Unit getUnit()
          Get the Unit property.
 FieldImpl getWorkingGrid()
          Get the sample we last used
protected  void initWith(ProbeRowInfo that)
          Sort of a copy ctor
 boolean isGrid()
          Are we probing on grids
 boolean isPoint()
          _more_
protected  void playSound(double value)
          Play a sound for the particular row and value
 void setAltitude(Real value)
          Set the Altitude property.
protected  void setDataInstance(DataInstance di)
          Set the data instance
protected  void setDisplayValue(Object value)
          Set the DisplayValue property.
protected  void setExtra(String s)
          extra stuff for table
 void setLevel(Real value)
          Set the Level property.
 void setLineState(LineState value)
          Set the LineState property.
 void setMidiProperties(MidiProperties value)
          Set the MidiProperties property.
 void setPointParameter(String value)
          Set the PointParameter property.
protected  void setPointSample(FieldImpl sample, EarthLocation elt)
          Set the sample we last used
 void setSamplingMode(int value)
          Set the SamplingMode property.
 void setStationName(PointOb ob)
          _more_
protected  void setTimeSample(Data rt)
          Set the raw value from the Data.
 void setUnit(Unit value)
          Set the Unit property.
protected  void setWorkingGrid(FieldImpl grid)
          Set the working grid for this row
protected  void showSoundDialog(ProbeControl control)
          Show the sound dialog
 String toString()
          to string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

isGrid

public boolean isGrid()
Are we probing on grids

Returns:
Is this data a grid

isPoint

public boolean isPoint()
_more_

Returns:
_more_

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()
_more_

Returns:
_more_

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
_more_

Returns:
_more_
Throws:
RemoteException - _more_
VisADException - _more_

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
Throws:
VisADException
RemoteException

getPointParameterName

public String getPointParameterName()
                             throws VisADException,
                                    RemoteException
_more_

Returns:
_more_
Throws:
RemoteException - _more_
VisADException - _more_

getPointIndex

public int getPointIndex()
                  throws VisADException,
                         RemoteException
_more_

Returns:
_more_
Throws:
RemoteException - _more_
VisADException - _more_

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 - _more_
VisADException - _more_

setStationName

public void setStationName(PointOb ob)
                    throws VisADException,
                           RemoteException
_more_

Parameters:
ob - _more_
Throws:
RemoteException - _more_
VisADException - _more_

getTimeSet

protected Set getTimeSet()
                  throws VisADException,
                         RemoteException
time set

Returns:
time set
Throws:
RemoteException - _more_
VisADException - _more_

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()
_more_

Returns:
_more_

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