edu.wisc.ssec.mcidasv.data.hydra
Class SubsetRubberBandBox

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.DisplayableData
          extended by ucar.visad.display.LineDrawing
              extended by edu.wisc.ssec.mcidasv.data.hydra.SubsetRubberBandBox
Direct Known Subclasses:
GeoSubsetRubberBandBox

public class SubsetRubberBandBox
extends LineDrawing


Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
 
Field Summary
private  Gridded2DSet bounds
          bounds defined by the rubber band box
private static int count
           
private  FlatField data
           
private  CoordinateSystem dataCS
           
private  CoordinateSystem displayCS
           
private  boolean isLL
           
private  boolean lastBoxOn
           
private  int mask
          mouse event mask
private  MyRubberBandBoxRendererJ3D rubberBandBox
          renderer
private  RealType xType
          x type for the box
private  RealType yType
          y type for the box
 
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
  SubsetRubberBandBox(boolean isLL, FlatField data, CoordinateSystem displayCS, int mask)
           
  SubsetRubberBandBox(boolean isLL, FlatField data, CoordinateSystem displayCS, int mask, boolean lastBoxOn)
          Construct a RubberBandBox using xType as the X coordinate and yType as the Y coordinate of the box.
  SubsetRubberBandBox(FlatField data, CoordinateSystem displayCS)
          Construct a RubberBandBox using xType as the X coordinate and yType as the Y coordinate of the box.
  SubsetRubberBandBox(FlatField data, CoordinateSystem displayCS, int mask)
           
  SubsetRubberBandBox(FlatField data, CoordinateSystem displayCS, int mask, boolean lastBoxOn)
           
protected SubsetRubberBandBox(SubsetRubberBandBox that)
          Constructor for creating a RubberBandBox from another instance
 
Method Summary
 Displayable cloneForDisplay()
          Returns a clone of this instance suitable for another VisAD display.
protected  void dataChange()
          Invoked when box mouse is released.
 Gridded2DSet getBounds()
          Return the bounds of the RubberBandBox.
protected  DataRenderer getDataRenderer()
          Get the DataRenderer used for this displayable.
 Gridded3DSet getLastBox()
           
 void setBox(SubsetRubberBandBox rbb)
           
 
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, destroy, getActive, getAnimationSet, getData, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

xType

private RealType xType
x type for the box


yType

private RealType yType
y type for the box


rubberBandBox

private MyRubberBandBoxRendererJ3D rubberBandBox
renderer


bounds

private Gridded2DSet bounds
bounds defined by the rubber band box


mask

private int mask
mouse event mask


data

private FlatField data

isLL

private boolean isLL

lastBoxOn

private boolean lastBoxOn

dataCS

private CoordinateSystem dataCS

displayCS

private CoordinateSystem displayCS

count

private static int count
Constructor Detail

SubsetRubberBandBox

public SubsetRubberBandBox(FlatField data,
                           CoordinateSystem displayCS)
                    throws VisADException,
                           RemoteException
Construct a RubberBandBox using xType as the X coordinate and yType as the Y coordinate of the box.

Parameters:
xType - RealType of the X coordinate of the box
yType - RealType of the Y coordinate of the box
Throws:
VisADException - VisAD error
RemoteException - Remote error

SubsetRubberBandBox

public SubsetRubberBandBox(FlatField data,
                           CoordinateSystem displayCS,
                           int mask)
                    throws VisADException,
                           RemoteException
Throws:
VisADException
RemoteException

SubsetRubberBandBox

public SubsetRubberBandBox(boolean isLL,
                           FlatField data,
                           CoordinateSystem displayCS,
                           int mask)
                    throws VisADException,
                           RemoteException
Throws:
VisADException
RemoteException

SubsetRubberBandBox

public SubsetRubberBandBox(FlatField data,
                           CoordinateSystem displayCS,
                           int mask,
                           boolean lastBoxOn)
                    throws VisADException,
                           RemoteException
Throws:
VisADException
RemoteException

SubsetRubberBandBox

public SubsetRubberBandBox(boolean isLL,
                           FlatField data,
                           CoordinateSystem displayCS,
                           int mask,
                           boolean lastBoxOn)
                    throws VisADException,
                           RemoteException
Construct a RubberBandBox using xType as the X coordinate and yType as the Y coordinate of the box.

Parameters:
xType - RealType of the X coordinate of the box
yType - RealType of the Y coordinate of the box
mask - key mask to use for rubberbanding
Throws:
VisADException - VisAD error
RemoteException - Remote error

SubsetRubberBandBox

protected SubsetRubberBandBox(SubsetRubberBandBox that)
                       throws VisADException,
                              RemoteException
Constructor for creating a RubberBandBox from another instance

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

dataChange

protected void dataChange()
                   throws VisADException,
                          RemoteException
Invoked when box mouse is released. Subclasses should invoke super.dataChange() to ensure the the bounds are set.

Overrides:
dataChange in class DisplayableData
Throws:
RemoteException
VisADException

getBounds

public Gridded2DSet getBounds()
Return the bounds of the RubberBandBox. The Gridded2DSet that is returned contains the opposite (starting and ending) corners of the box.

Returns:
set containing the opposite corners of the box.

getDataRenderer

protected DataRenderer getDataRenderer()
Get the DataRenderer used for this displayable.

Overrides:
getDataRenderer in class DisplayableData
Returns:
RubberBandBoxRendererJ3D associated with this displayable

cloneForDisplay

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

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

setBox

public void setBox(SubsetRubberBandBox rbb)

getLastBox

public Gridded3DSet getLastBox()