ucar.visad.display
Class LineProbe

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.LineProbe

public class LineProbe
extends SelectorDisplayable

Class for a probe.

Version:
$Revision: 1.20 $
Author:
Don Murray

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
LineProbe()
          Default Constructor
LineProbe(double x, double y, double z)
          Construct a new LineProbe using the x, y, and z positions
LineProbe(RealTuple position)
          Construct a new LineProbe at the position
LineProbe(RealTuple position, Real constant)
          Construct a new LineProbe at the position using a constant Z value
 
Method Summary
 float getPointScale()
          Get the point's scale
 RealTuple getPosition()
          Get the position of the SelectorPoint.
 void setAutoSize(boolean yesorno)
          Set whether the marker should automatically resize as the display is zoomed.
 void setManipulable(boolean manip)
          set if linprobe can be moved by the user with mouse cursor or not
 void setMarker(String markerText)
          Set the marker text for this selector point
 void setMarker(VisADGeometryArray marker)
          Set the marker for this selector point
 void setPointSize(float newSize)
          Set the size (scale) of the ShapeControl.
 void setPosition(double x, double y)
          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
 
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

LineProbe

public LineProbe()
          throws VisADException,
                 RemoteException
Default Constructor

Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

LineProbe

public LineProbe(double x,
                 double y,
                 double z)
          throws VisADException,
                 RemoteException
Construct a new LineProbe using the x, y, and z positions

Parameters:
x - x position
y - y position
z - z position
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

LineProbe

public LineProbe(RealTuple position)
          throws VisADException,
                 RemoteException
Construct a new LineProbe at the position

Parameters:
position - x/y position for the probe
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

LineProbe

public LineProbe(RealTuple position,
                 Real constant)
          throws VisADException,
                 RemoteException
Construct a new LineProbe at the position using a constant Z value

Parameters:
position - x/y position for the probe
constant - z position of the selector point
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object
Method Detail

setManipulable

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

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

getPosition

public RealTuple getPosition()
                      throws VisADException,
                             RemoteException
Get the position of the SelectorPoint.

Returns:
position in XY space
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

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 - problem creating VisAD object

setPosition

public void setPosition(double x,
                        double y)
                 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:
x - The X-axis position for the probe.
y - The Y-axis position for the probe.
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

setMarker

public void setMarker(String markerText)
               throws VisADException,
                      RemoteException
Set the marker text for this selector point

Parameters:
markerText - VisADGeometryArray for marker
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setMarker

public void setMarker(VisADGeometryArray marker)
               throws VisADException,
                      RemoteException
Set the marker for this selector point

Parameters:
marker - VisADGeometryArray for marker
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setPointSize

public void setPointSize(float newSize)
                  throws VisADException,
                         RemoteException
Set the size (scale) of the ShapeControl. Usually done to set the initial size.

Overrides:
setPointSize in class SelectorDisplayable
Parameters:
newSize - size to use.
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

getPointScale

public float getPointScale()
Get the point's scale

Returns:
the scale of the point