ucar.unidata.view.sounding
Class RealReadout.UnitProperty

java.lang.Object
  extended by ucar.unidata.beans.AbstractProperty
      extended by ucar.unidata.beans.NonVetoableProperty
          extended by ucar.unidata.view.sounding.RealReadout.UnitProperty
All Implemented Interfaces:
Property
Enclosing class:
RealReadout

protected class RealReadout.UnitProperty
extends NonVetoableProperty

Provides support for unit properties.


Constructor Summary
RealReadout.UnitProperty()
          Constructs from nothing.
 
Method Summary
 Unit getUnit()
          Returns the unit.
 String getUnitString()
          Returns the unit-specification.
 void setSpecifiedUnit(String specifiedUnitString)
          Sets the client-supplied unit-specification.
 void setUnitUse(int which)
          Sets the type of unit-use.
 void setValue(Real real)
          Sets the value from a Real.
 
Methods inherited from class ucar.unidata.beans.NonVetoableProperty
addVetoableChangeListener, isVetoable, removeVetoableChangeListener, setValue, setValueAndNotifyListeners
 
Methods inherited from class ucar.unidata.beans.AbstractProperty
addPropertyChangeListener, clearValue, getName, getSourceBean, getValue, isReporting, notifyListeners, removePropertyChangeListener, setCurrentValue, setReporting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealReadout.UnitProperty

public RealReadout.UnitProperty()
Constructs from nothing.

Method Detail

setSpecifiedUnit

public void setSpecifiedUnit(String specifiedUnitString)
                      throws NoSuchUnitException,
                             ParseException
Sets the client-supplied unit-specification.

Parameters:
specifiedUnitString - The client-supplied unit-specification.
Throws:
NoSuchUnitException - No such unit.
ParseException - Couldn't decode specification.

setUnitUse

public void setUnitUse(int which)
Sets the type of unit-use.

Parameters:
which - The type of unit-use. One of REAL_UNIT, REALTYPE_UNIT, or SPECIFIED_UNIT.

setValue

public void setValue(Real real)
Sets the value from a Real.

Parameters:
real - The Real.

getUnitString

public String getUnitString()
Returns the unit-specification.

Returns:
The unit-specification.

getUnit

public Unit getUnit()
Returns the unit.

Returns:
The unit.