ucar.visad.display
Class ZSelector

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

public class ZSelector
extends SelectorDisplayable

ZSelector is a single small color-filled box on the screen that the user can move vertically by dragging with mouse button three; it can be used to control items whose position has a z value in a VisAD display.

Version:
$Revision: 1.14 $
Author:
Metapps development group

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
ZSelector(double x, double y, double z)
          Construct a ZSelector with default color blue.
ZSelector(double x, double y, double z, Color color)
          Construct a ZSelector.
ZSelector(ZSelector that)
          Construct a ZSelector from another instance
 
Method Summary
 Displayable cloneForDisplay()
          Returns a clone of this instance suitable for another VisAD display.
 Real getPosition()
          Get the z value from this selector, the z value in the VisAd -1 to 1 scale.
 Real getZSelectorPosition()
          Get the z value from this selector, the z value in the VisAd -1 to 1 scale.
 void setZValue(double newZValue)
          Set the location along the Z Axis where you want to place the selector.
 
Methods inherited from class ucar.visad.display.SelectorDisplayable
addPropertyChangeListener, getAutoSize, getFiringEvent, getOkToFireEvents, getPointSize, notifyListenersOfMove, removePropertyChangeListener, setAutoSize, setOkToFireEvents, setPointSize
 
Methods inherited from class ucar.visad.display.CompositeDisplayable
addConstantMap, addDisplayable, addListDataListener, clearDisplayables, 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, setManipulable, 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, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDestroyed, 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

ZSelector

public ZSelector(double x,
                 double y,
                 double z)
          throws VisADException,
                 RemoteException
Construct a ZSelector with default color blue.

Parameters:
x - x position in VisAd -1 to 1 scale
y - y position in VisAd -1 to 1 scale
z - z position in VisAd -1 to 1 scale
Throws:
VisADException - VisAD error
RemoteException - remote error

ZSelector

public ZSelector(double x,
                 double y,
                 double z,
                 Color color)
          throws VisADException,
                 RemoteException
Construct a ZSelector.

Parameters:
x - x position in VisAd -1 to 1 scale
y - y position in VisAd -1 to 1 scale
z - z position in VisAd -1 to 1 scale
color - the Java Color of the box.
Throws:
VisADException - VisAD error
RemoteException - remote error

ZSelector

public ZSelector(ZSelector that)
          throws VisADException,
                 RemoteException
Construct a ZSelector from another instance

Parameters:
that - other instance
Throws:
VisADException - VisAD error
RemoteException - remote error
Method Detail

getZSelectorPosition

public Real getZSelectorPosition()
                          throws VisADException,
                                 RemoteException
Get the z value from this selector, the z value in the VisAd -1 to 1 scale.

Returns:
Real corresponding to the position
Throws:
VisADException - VisAD error
RemoteException - remote error

getPosition

public Real getPosition()
                 throws VisADException,
                        RemoteException
Get the z value from this selector, the z value in the VisAd -1 to 1 scale.

Returns:
Real corresponding to the position
Throws:
VisADException - VisAD error
RemoteException - remote error

setZValue

public void setZValue(double newZValue)
               throws VisADException,
                      RemoteException
Set the location along the Z Axis where you want to place the selector.

Parameters:
newZValue - position along Z axis where component should be located in the VisAd -1 to 1 scale.
Throws:
VisADException - VisAD error
RemoteException - remote error

cloneForDisplay

public Displayable cloneForDisplay()
                            throws VisADException,
                                   RemoteException
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.

Overrides:
cloneForDisplay in class CompositeDisplayable
Returns:
A semi-deep clone of this instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.