ucar.unidata.view.sounding
Class DensityProfile

java.lang.Object
  extended by ucar.unidata.view.sounding.DensityProfile

public class DensityProfile
extends Object

Provides support for the computation of the vertical profile of air-density.

Version:
$Id: DensityProfile.java,v 1.13 2005/05/13 18:33:28 jeffmc Exp $
Author:
Steven R. Emmerson

Field Summary
static String DENSITY_PROFILE
          The name of the density-profile property.
 
Constructor Summary
DensityProfile()
          Constructs from nothing.
DensityProfile(Field temperatureProfile, Field dewPointProfile)
          Constructs from temperature and dew-point profiles.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addPropertyChangeListener(String name, PropertyChangeListener listener)
          Adds a PropertyChangeListener for a named property.
protected  void computeIfAppropriate()
          Computes the air-density profile if appropriate.
 boolean equals(Object obj)
          Indicates if this instance is identical to another object.
 FlatField getDensityProfile()
          Returns the air-density profile.
 int hashCode()
          Returns the hash code of this instance.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 void removePropertyChangeListener(String name, PropertyChangeListener listener)
          Removes a PropertyChangeListener for a named property.
 void setActive(boolean yes)
          Enables or disables this instance.
 void setDewPointProfile(Field dewPointProfile)
          Sets the dew-point profile.
 void setProfiles(Field temperatureProfile, Field dewPointProfile)
          Sets the temperature and dew-point profiles.
 void setTemperatureProfile(Field temperatureProfile)
          Sets the temperature profile.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DENSITY_PROFILE

public static final String DENSITY_PROFILE
The name of the density-profile property.

See Also:
Constant Field Values
Constructor Detail

DensityProfile

public DensityProfile()
               throws VisADException
Constructs from nothing.

Throws:
VisADException - VisAD failure;

DensityProfile

public DensityProfile(Field temperatureProfile,
                      Field dewPointProfile)
               throws VisADException,
                      RemoteException
Constructs from temperature and dew-point profiles.

Parameters:
temperatureProfile - The temperature profile.
dewPointProfile - The dew-point profile.
Throws:
VisADException - VisAD failure;
RemoteException - Java RMI failure.
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener.

Parameters:
listener - The PropertyChangeListener to be added.

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener for a named property.

Parameters:
name - The name of the property.
listener - The PropertyChangeListener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener.

Parameters:
listener - The PropertyChangeListener to be removed.

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener for a named property.

Parameters:
name - The name of the property.
listener - The PropertyChangeListener to be removed.

setActive

public void setActive(boolean yes)
               throws VisADException,
                      RemoteException
Enables or disables this instance. If an instance is enabled, then it will recompute the air-density profile when appropriate.

Parameters:
yes - Whether or not this instance is to be enabled.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setProfiles

public void setProfiles(Field temperatureProfile,
                        Field dewPointProfile)
                 throws VisADException,
                        RemoteException
Sets the temperature and dew-point profiles. This instance will register itself with the profiles in order to receive change notifications.

Parameters:
temperatureProfile - The air-temperature profile.
dewPointProfile - The dew-point profile.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setTemperatureProfile

public void setTemperatureProfile(Field temperatureProfile)
                           throws VisADException,
                                  RemoteException
Sets the temperature profile. This instance will register itself with the profile in order to receive change notifications.

Parameters:
temperatureProfile - The air-temperature profile.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setDewPointProfile

public void setDewPointProfile(Field dewPointProfile)
                        throws VisADException,
                               RemoteException
Sets the dew-point profile. This instance will register itself with the profile in order to receive change notifications.

Parameters:
dewPointProfile - The dew-point profile.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

computeIfAppropriate

protected void computeIfAppropriate()
                             throws VisADException,
                                    RemoteException
Computes the air-density profile if appropriate.

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

getDensityProfile

public FlatField getDensityProfile()
                            throws VisADException,
                                   RemoteException
Returns the air-density profile.

Returns:
The air-density profile.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

equals

public boolean equals(Object obj)
Indicates if this instance is identical to another object.

Overrides:
equals in class Object
Parameters:
obj - The other object.
Returns:
true if and only if this instance is identical to the other object.

hashCode

public int hashCode()
Returns the hash code of this instance.

Overrides:
hashCode in class Object
Returns:
The hash code of this instance.