ucar.unidata.view.sounding
Class AerologicalReadoutTable.PTRDerivedReadout

java.lang.Object
  extended by ucar.unidata.view.sounding.RealReadout
      extended by ucar.unidata.view.sounding.AerologicalReadoutTable.MyReadout
          extended by ucar.unidata.view.sounding.AerologicalReadoutTable.PTRDerivedReadout
All Implemented Interfaces:
PropertyChangeListener, EventListener
Direct Known Subclasses:
AerologicalReadoutTable.LCLAltitudeReadout, AerologicalReadoutTable.LCLPressureReadout, AerologicalReadoutTable.LCLTemperatureReadout
Enclosing class:
AerologicalReadoutTable

protected abstract static class AerologicalReadoutTable.PTRDerivedReadout
extends AerologicalReadoutTable.MyReadout

Provides support for readouts derived from pressure, temperature, and mixing-ratio.


Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.unidata.view.sounding.RealReadout
RealReadout.FormatProperty, RealReadout.NameProperty, RealReadout.NumericValueProperty, RealReadout.UnitProperty
 
Field Summary
 
Fields inherited from class ucar.unidata.view.sounding.RealReadout
FORMAT, NAME, NUMERIC_STRING, REAL_UNIT, REALTYPE_NAME, REALTYPE_UNIT, SPECIFIED_NAME, SPECIFIED_UNIT, UNIT_STRING
 
Constructor Summary
protected AerologicalReadoutTable.PTRDerivedReadout(String name, String unitString, int fractionDigitCount)
          Constructs from a name, unit, and format.
 
Method Summary
protected  void compute()
          Computes the value of the derived quantity.
protected abstract  Real compute(Real pressure, Real temperature, Real dewPoint)
          Computes the value of the derived quantity from pressure, temperature, and dew-point.
 Real getDewPoint()
          Gets the value of the dew-point property.
 Real getPressure()
          Gets the value of the pressure property.
 Real getTemperature()
          Gets the value of the temperature property.
 void setDewPoint(Real dewPoint)
          Sets the dew-point property.
 void setPressure(Real pressure)
          Sets the pressure property.
 void setTemperature(Real temperature)
          Sets the temperature property.
 
Methods inherited from class ucar.unidata.view.sounding.RealReadout
addPropertyChangeListener, getName, getNumericString, getUnitString, propertyChange, setFormat, setNameUse, setReal, setSpecifiedName, setSpecifiedUnit, setUnitUse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AerologicalReadoutTable.PTRDerivedReadout

protected AerologicalReadoutTable.PTRDerivedReadout(String name,
                                                    String unitString,
                                                    int fractionDigitCount)
                                             throws ParseException
Constructs from a name, unit, and format.

Parameters:
name - The name of the readout.
unitString - The unit specification for the readout.
fractionDigitCount - The number of digits to have after the decimal point.
Throws:
ParseException - if the unit specification couldn't be parsed.
Method Detail

setPressure

public void setPressure(Real pressure)
                 throws VisADException,
                        RemoteException
Sets the pressure property.

Parameters:
pressure - The new value.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getPressure

public Real getPressure()
Gets the value of the pressure property.

Returns:
The value of the pressure property.

setTemperature

public void setTemperature(Real temperature)
                    throws VisADException,
                           RemoteException
Sets the temperature property.

Parameters:
temperature - The new value.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getTemperature

public Real getTemperature()
Gets the value of the temperature property.

Returns:
The value of the temperature property.

setDewPoint

public void setDewPoint(Real dewPoint)
                 throws VisADException,
                        RemoteException
Sets the dew-point property.

Parameters:
dewPoint - The new value.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getDewPoint

public Real getDewPoint()
Gets the value of the dew-point property.

Returns:
The value of the dew-point property.

compute

protected void compute()
                throws VisADException,
                       RemoteException
Computes the value of the derived quantity.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

compute

protected abstract Real compute(Real pressure,
                                Real temperature,
                                Real dewPoint)
                         throws VisADException,
                                RemoteException
Computes the value of the derived quantity from pressure, temperature, and dew-point.

Parameters:
pressure - The pressure.
temperature - The temperature.
dewPoint - The dew-point.
Returns:
The value of the derived quantity.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.