ucar.visad.display
Class AreaProbe

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.CompositeDisplayable
          extended by ucar.visad.display.SelectorDisplayable
              extended by ucar.visad.display.AreaProbe

public class AreaProbe
extends SelectorDisplayable

Class for a probe that defines an area.

Version:
$Revision: 1.4 $
Author:
IDV Development Team

Field Summary
 
Fields inherited from class ucar.visad.display.SelectorDisplayable
PROPERTY_POSITION
 
Fields inherited from class ucar.visad.display.CompositeDisplayable
cnt, label
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
AreaProbe()
          Construct an AreaProbe with the defaults
AreaProbe(RealTuple position)
          Construct an AreaProbe using the specified position
AreaProbe(RealTuple position, Real constant)
          Construct an AreaProbe using the specified position using the supplied constant
 
Method Summary
 RealTuple getArea()
          Get the Area as a RealTuple
static RealTupleType getAreaType()
          Get the MathType of the area
 void setAutoSize(boolean yesorno)
          Set whether the marker should automatically resize as the display is zoomed.
 void setManipulable(boolean manip)
          set if area probe can be moved by the user with mouse cursor or not
 void setPosition(double x1, double y1, double x2, double y2)
          Sets the position of the probe.
 void setPosition(RealTuple position)
          Sets the position of the probe.
 
Methods inherited from class ucar.visad.display.SelectorDisplayable
addPropertyChangeListener, getAutoSize, getFiringEvent, getOkToFireEvents, getPointSize, notifyListenersOfMove, removePropertyChangeListener, setOkToFireEvents, setPointSize
 
Methods inherited from class ucar.visad.display.CompositeDisplayable
addConstantMap, addDisplayable, addListDataListener, clearDisplayables, cloneForDisplay, debug, destroy, destroyAll, displayableCount, fireListDataContentsChanged, fireListDataIntervalAdded, fireListDataIntervalRemoved, getAnimationSet, getDisplayable, indexOf, iterator, lastDisplayable, myAddDataReferences, myRemoveDataReferences, removeDisplayable, removeDisplayable, removeListDataListener, setAdjustFlow, setColor, setColorPalette, setColorUnit, setConstantPosition, setDisplay, setDisplayable, setDisplayMaster, setDisplayUnit, setLineWidth, setPointMode, setSelectedRange, setUseFastRendering, setUseTimesInAnimation, setVisible, setVisible, setVisible, toFront, toString
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMaps, addDataReferences, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, hasDataObject, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setColorPalette, setContourInfo, setDisplayActive, setDisplayInactive, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AreaProbe

public AreaProbe()
          throws VisADException,
                 RemoteException
Construct an AreaProbe with the defaults

Throws:
RemoteException - Java RMI error
VisADException - VisAD error

AreaProbe

public AreaProbe(RealTuple position)
          throws VisADException,
                 RemoteException
Construct an AreaProbe using the specified position

Parameters:
position - position for probe
Throws:
RemoteException - Java RMI error
VisADException - VisAD error

AreaProbe

public AreaProbe(RealTuple position,
                 Real constant)
          throws VisADException,
                 RemoteException
Construct an AreaProbe using the specified position using the supplied constant

Parameters:
position - probe position
constant - Z position
Throws:
RemoteException - Java RMI error
VisADException - VisAD error
Method Detail

setManipulable

public void setManipulable(boolean manip)
                    throws VisADException,
                           RemoteException
set if area probe can be moved by the user with mouse cursor or not

Parameters:
manip - boolean true if can move
Throws:
RemoteException - Java RMI error
VisADException - VisAD error

getAreaType

public static RealTupleType getAreaType()
                                 throws VisADException,
                                        RemoteException
Get the MathType of the area

Returns:
area's RealTupleType
Throws:
RemoteException - Java RMI error
VisADException - VisAD error

getArea

public RealTuple getArea()
                  throws VisADException,
                         RemoteException
Get the Area as a RealTuple

Returns:
the area as a RealTuple
Throws:
RemoteException - Java RMI error
VisADException - VisAD error

setAutoSize

public void setAutoSize(boolean yesorno)
                 throws VisADException,
                        RemoteException
Set whether the marker should automatically resize as the display is zoomed.

Overrides:
setAutoSize in class SelectorDisplayable
Parameters:
yesorno - true to automatically resize the marker.
Throws:
RemoteException - Java RMI error
VisADException - VisAD error

setPosition

public void setPosition(double x1,
                        double y1,
                        double x2,
                        double y2)
                 throws VisADException,
                        RemoteException
Sets the position of the probe. This method fires a PropertyChangeEvent for SelectorDisplayable.PROPERTY_POSITION.

This implementation uses setPosition(RealTuple) to actually set the position of the probe.

Parameters:
x1 - x position of the upper left corner
y1 - y position of the upper left corner
x2 - x position of the lower right corner
y2 - y position of the lower right corner
Throws:
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

setPosition

public void setPosition(RealTuple position)
                 throws VisADException,
                        RemoteException
Sets the position of the probe. This method fires a PropertyChangeEvent for SelectorDisplayable.PROPERTY_POSITION.

Parameters:
position - The position of the probe.
Throws:
NullPointerException - if the argument is null.
VisADException - if position.getType().equals( RealTupleType.SpatialCartesian2DTuple) is false or if another VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
See Also:
RealTupleType.SpatialCartesian2DTuple