Package ucar.unidata.view.sounding
Class RealReadout
java.lang.Object
ucar.unidata.view.sounding.RealReadout
- All Implemented Interfaces:
PropertyChangeListener
,EventListener
- Direct Known Subclasses:
AerologicalReadoutTable.MyReadout
,SkewTReadoutTable.MyReadout
Provides support for readouts of real values.
- Version:
- $Id: RealReadout.java,v 1.16 2005/05/13 18:33:36 jeffmc Exp $
- Author:
- Steven R. Emmerson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Provides support for format properties.protected class
Provides support for name properties.protected class
Provides support for numeric value properties.protected class
Provides support for unit properties. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the format property.static final String
The name of the name property.static final String
The name of the numeric-string property.static final int
The indicator for using the unit of the Real.static final int
The indicator for using the name of the RealType.static final int
The indicator for using the unit of the RealType.static final int
The indicator for using the client-supplied name.static final int
The indicator for using the unit supplied by the client.static final String
The name of the unit-string property. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Adds a PropertyChangeListener for a named property.getName()
Returns the name of the readout.Returns the numeric string of the readout.Returns the unit-specification of the readout.void
Handles a change to a property.void
setFormat
(NumberFormat format) Sets the format property.void
setNameUse
(int which) Sets the type of name-use.void
Sets the value of the readout quantity.void
setSpecifiedName
(String name) Sets the client-supplied name for the readout.void
setSpecifiedUnit
(String unitString) Sets the client-supplied unit-specification.void
setUnitUse
(int which) Sets the type of unit-use.
-
Field Details
-
REALTYPE_NAME
public static final int REALTYPE_NAMEThe indicator for using the name of the RealType.- See Also:
-
SPECIFIED_NAME
public static final int SPECIFIED_NAMEThe indicator for using the client-supplied name.- See Also:
-
REAL_UNIT
public static final int REAL_UNITThe indicator for using the unit of the Real.- See Also:
-
REALTYPE_UNIT
public static final int REALTYPE_UNITThe indicator for using the unit of the RealType.- See Also:
-
SPECIFIED_UNIT
public static final int SPECIFIED_UNITThe indicator for using the unit supplied by the client.- See Also:
-
NAME
The name of the name property.- See Also:
-
FORMAT
The name of the format property.- See Also:
-
NUMERIC_STRING
The name of the numeric-string property.- See Also:
-
UNIT_STRING
The name of the unit-string property.- See Also:
-
-
Constructor Details
-
RealReadout
public RealReadout()Constructs from nothing.
-
-
Method Details
-
setSpecifiedName
Sets the client-supplied name for the readout.- Parameters:
name
- The client-supplied name for the readout.
-
setNameUse
public void setNameUse(int which) Sets the type of name-use.- Parameters:
which
- The type of name-use. One of REALTYPE_NAME or SPECIFIED_NAME.
-
setFormat
Sets the format property.- Parameters:
format
- The new value.
-
setSpecifiedUnit
Sets the client-supplied unit-specification.- Parameters:
unitString
- The client-supplied unit-specification.- Throws:
NoSuchUnitException
- if the specification can't be decoded.ParseException
- if a parse-error occurs while decoding.
-
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.
-
getName
Returns the name of the readout.- Returns:
- The name of the readout.
-
getNumericString
Returns the numeric string of the readout.- Returns:
- The numeric string of the readout.
-
getUnitString
Returns the unit-specification of the readout.- Returns:
- The unit-specification of the readout.
-
addPropertyChangeListener
Adds a PropertyChangeListener for a named property.- Parameters:
propertyName
- The name of the property.listener
- The PropertyChangeListener to be added.
-
setReal
Sets the value of the readout quantity.- Parameters:
real
- The new value for the readout quantity.
-
propertyChange
Handles a change to a property.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Parameters:
event
- The property change event.
-