Package ucar.unidata.view.sounding
Class RealReadout.UnitProperty
java.lang.Object
ucar.unidata.beans.AbstractProperty
ucar.unidata.beans.NonVetoableProperty
ucar.unidata.view.sounding.RealReadout.UnitProperty
- All Implemented Interfaces:
Property
- Enclosing class:
RealReadout
Provides support for unit properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUnit()Returns the unit.Returns the unit-specification.voidsetSpecifiedUnit(String specifiedUnitString) Sets the client-supplied unit-specification.voidsetUnitUse(int which) Sets the type of unit-use.voidSets the value from a Real.Methods inherited from class ucar.unidata.beans.NonVetoableProperty
addVetoableChangeListener, isVetoable, removeVetoableChangeListener, setValue, setValueAndNotifyListenersMethods inherited from class ucar.unidata.beans.AbstractProperty
addPropertyChangeListener, clearValue, getName, getSourceBean, getValue, isReporting, notifyListeners, removePropertyChangeListener, setCurrentValue, setReporting
-
Constructor Details
-
UnitProperty
public UnitProperty()Constructs from nothing.
-
-
Method Details
-
setSpecifiedUnit
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
Sets the value from a Real.- Parameters:
real- The Real.
-
getUnitString
Returns the unit-specification.- Returns:
- The unit-specification.
-
getUnit
Returns the unit.- Returns:
- The unit.
-