ucar.unidata.view.sounding
Class Profile

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.DisplayableData
          extended by ucar.visad.display.LineDrawing
              extended by ucar.unidata.view.sounding.Profile
Direct Known Subclasses:
AirTemperatureProfile, DewPointProfile

public abstract class Profile
extends LineDrawing

Supports a profile trace on a thermodynamic diagram.


Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
 
Field Summary
static String FIELD
          The name of the profile-field property.
static String RANGE_VALUE
          The name of the range-value property.
 
Fields inherited from class ucar.visad.display.LineDrawing
COLOR, LINE_STYLE, LINE_WIDTH, POINT_SIZE
 
Fields inherited from class ucar.visad.display.DisplayableData
MANIPULABLE, renderer, VISIBLE
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
protected Profile(Profile that)
          Constructs from another instance.
protected Profile(String name, FunctionType funcType)
          Constructs from a name for the displayable and a function type.
 
Method Summary
 void clear()
          Clears the profile-field.
protected  void dataChange()
          Handles a change to the data referenced by this instances's DataReference.
 boolean equals(Object obj)
          Indicates if this instance is semantically identical to another object.
 Real getPressure()
          Returns the pressure property.
 Field getProfile()
          Returns the profile-field property.
 Real getRangeValue()
          Returns the range-value property.
 int hashCode()
          Returns the hash code of this instance.
 void setOriginalProfile()
          Resets the vertical profile to the profile of the last setProfile().
 void setPressure(Real pressure)
          Sets the pressure property.
 void setProfile(Field field)
          Sets the profile field property.
protected  void updateRangeValue()
          Updates the range-value.
 
Methods inherited from class ucar.visad.display.LineDrawing
getColor, getLineStyle, getLineWidth, getPointSize, setColor, setHSV, setHSV, setLineStyle, setLineWidth, setPointSize, setRGB, setRGB, setRGBA, setRGBA
 
Methods inherited from class ucar.visad.display.DisplayableData
addAction, cloneForDisplay, destroy, getActive, getAnimationSet, getData, getDataRenderer, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setUseFastRendering, setVisible, showme, toString
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RANGE_VALUE

public static final String RANGE_VALUE
The name of the range-value property.

See Also:
Constant Field Values

FIELD

public static final String FIELD
The name of the profile-field property.

See Also:
Constant Field Values
Constructor Detail

Profile

protected Profile(String name,
                  FunctionType funcType)
           throws VisADException,
                  RemoteException
Constructs from a name for the displayable and a function type.

Parameters:
name - The name for the displayable.
funcType - The type of the profile function.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
ClassCastException - if the range isn't a RealType

Profile

protected Profile(Profile that)
           throws RemoteException,
                  VisADException
Constructs from another instance.

Parameters:
that - The other instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
NullPointerException - if the argument is null.
Method Detail

setProfile

public void setProfile(Field field)
                throws TypeException,
                       RemoteException,
                       VisADException
Sets the profile field property. This method will cause a PropertyChangeEvent to be fired for the FIELD property.

Parameters:
field - The profile field property.
Throws:
TypeException - Argument has incorrect type.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
NullPointerException - if the argument is null.

getProfile

public Field getProfile()
                 throws VisADException,
                        RemoteException
Returns the profile-field property. NB: Does not return a copy.

Returns:
The profile-field property.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setOriginalProfile

public void setOriginalProfile()
                        throws VisADException,
                               RemoteException
Resets the vertical profile to the profile of the last setProfile().

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

dataChange

protected void dataChange()
                   throws VisADException,
                          RemoteException
Handles a change to the data referenced by this instances's DataReference. This method is invoked by the parent class when the data is either explicitly set or directly manipulated. This method fires a PropertyChangeEvent for the FIELD property with the Field value of the last setProfile(Field) invocation as the old value. It also causes a PropertyChangeEvent to be fired for the RANGE_VALUE property.

Overrides:
dataChange in class DisplayableData
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

equals

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

Overrides:
equals in class Object
Parameters:
obj - The other object.
Returns:
true if and only if this instance is semantically 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.

setPressure

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

Parameters:
pressure - The new value.
Throws:
TypeException - if the pressure has the wrong type.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
NullPointerException - if the argument is null.

getPressure

public Real getPressure()
Returns the pressure property.

Returns:
The value of the pressure property.

getRangeValue

public Real getRangeValue()
Returns the range-value property.

Returns:
The range-value property.

clear

public void clear()
Clears the profile-field.


updateRangeValue

protected void updateRangeValue()
                         throws RemoteException,
                                VisADException
Updates the range-value.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
NullPointerException - if the profile is null.