Package ucar.visad.display
Class RubberBandBox
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.LineDrawing
ucar.visad.display.RubberBandBox
Provides support for a Displayable that comprises a rubber band box.
The box can be drawn in spherical and other non-Cartesian coordinate
systems by selecting the appropriate X and Y RealTypes.
Sample usage:
RubberBandBox rbBox = new RubberBandBox(RealType.Latitude, RealType.Longitude); rbBox.addAction(new ActionImpl() { public void doAction() throws VisADException, RemoteException { Gridded2DSet bounds = rbBox.getBounds(); (do something useful with the box) } });
- Version:
- $Revision: 1.10 $
- Author:
- Don Murray
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
-
Field Summary
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
ConstructorsModifierConstructorDescriptionprotected
RubberBandBox
(RubberBandBox that) Constructor for creating a RubberBandBox from another instanceRubberBandBox
(RealType xType, RealType yType) Construct a RubberBandBox using xType as the X coordinate and yType as the Y coordinate of the box.RubberBandBox
(RealType xType, RealType yType, int mask) Construct a RubberBandBox using xType as the X coordinate and yType as the Y coordinate of the box. -
Method Summary
Modifier and TypeMethodDescriptionReturns a clone of this instance suitable for another VisAD display.protected void
Invoked when box mouse is released.Return the bounds of the RubberBandBox.protected DataRenderer
Get the DataRenderer used for this displayable.void
_more_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
-
Constructor Details
-
RubberBandBox
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 boxyType
- RealType of the Y coordinate of the box- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
RubberBandBox
public RubberBandBox(RealType xType, RealType yType, int mask) 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 boxyType
- RealType of the Y coordinate of the boxmask
- key mask to use for rubberbanding- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
RubberBandBox
Constructor for creating a RubberBandBox from another instance- Parameters:
that
- other instance- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
-
Method Details
-
dataChange
Invoked when box mouse is released. Subclasses should invoke super.dataChange() to ensure the the bounds are set.- Overrides:
dataChange
in classDisplayableData
- Throws:
RemoteException
VisADException
-
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
Get the DataRenderer used for this displayable.- Overrides:
getDataRenderer
in classDisplayableData
- Returns:
- RubberBandBoxRendererJ3D associated with this displayable
-
reSetBounds
public void reSetBounds()_more_ -
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Overrides:
cloneForDisplay
in classDisplayableData
- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-