Package edu.wisc.ssec.mcidasv.data.hydra
Class CurveDrawer
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.LineDrawing
edu.wisc.ssec.mcidasv.data.hydra.CurveDrawer
Provides support for a Displayable that comprises a set of
drawn curves. The curves can be drawn in in spherical and
other non-Cartesian coordinate systems by selecting the
appropriate RealTypes or RealTupleType.
Sample usage:
CurveDrawer curveDraw = new CurveDrawer(RealType.Latitude, RealType.Longitude); curveDraw.addAction(new ActionImpl() { public void doAction() throws VisADException, RemoteException { UnionSet curves = curveDraw.getData(); (do something useful with the curves) } });
- Version:
- $Revision$
- Author:
- Don Murray
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate UnionSet
the set of drawn curvesprivate int
mask for mouse eventsprivate RealTupleType
The type for the drawing spaceFields 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
CurveDrawer
(CurveDrawer that) Constructor for creating a CurveDrawer from another instanceCurveDrawer
(RealTupleType type) Construct a CurveDrawer using the RealTupleTypeCurveDrawer
(RealTupleType type, int mask) Construct a CurveDrawer using the RealTupleType of the drawing space and a mask for the mouseCurveDrawer
(RealType xType, RealType yType) Construct a CurveDrawer using xType as the X coordinate and yType as the Y coordinate of the box.CurveDrawer
(RealType xType, RealType yType, int mask) Construct a CurveDrawer using xType as the X coordinate and yType as the Y coordinate of the box.CurveDrawer
(UnionSet curves) Construct a CurveDrawer with a predefined set of curves.CurveDrawer
(UnionSet curves, int mask) Construct a CurveDrawer with a predefined set of curves. -
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 curves of the CurveDrawer.protected DataRenderer
Returns the DataRenderer for this displayable.boolean
Set whether the curves are manipulable or not.void
Set the curves of the CurveDrawer.void
setDrawingEnabled
(boolean b) Set whether the curves are manipulable or not.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
-
Field Details
-
type
The type for the drawing space -
curves
the set of drawn curves -
mask
mask for mouse events
-
-
Constructor Details
-
CurveDrawer
Construct a CurveDrawer 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
-
CurveDrawer
Construct a CurveDrawer 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 mouse button- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
CurveDrawer
Construct a CurveDrawer using the RealTupleType- Parameters:
type
- RealTupleType of the drawing space- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
CurveDrawer
Construct a CurveDrawer using the RealTupleType of the drawing space and a mask for the mouse- Parameters:
type
- RealTupleType of the drawing spacemask
- key mask to use for mouse button- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
CurveDrawer
Construct a CurveDrawer with a predefined set of curves.- Parameters:
curves
- UnionSet of curves- Throws:
VisADException
- VisAD errorRemoteException
- Remote error
-
CurveDrawer
Construct a CurveDrawer with a predefined set of curves.- Parameters:
curves
- UnionSet of curvesmask
- key mask to use for mouse button- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
CurveDrawer
Constructor for creating a CurveDrawer 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 curves are set.- Overrides:
dataChange
in classDisplayableData
- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
getCurves
Return the curves of the CurveDrawer. The UnionSet that is returned contains the lines.- Returns:
- set containing sets of curves
-
setCurves
Set the curves of the CurveDrawer. The input must have the same MathType as this instance.- Parameters:
curves
- set of curves to display- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setDrawingEnabled
Set whether the curves are manipulable or not.- Parameters:
b
- true to enable- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
getDrawingEnabled
Set whether the curves are manipulable or not.- Returns:
- true if drawing is enabled
-
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.
-
getDataRenderer
Returns the DataRenderer for this displayable. This method does not verify that the VisAD display has been set.- Overrides:
getDataRenderer
in classDisplayableData
- Returns:
- The DataRenderer associated with this displayable.
-