Package ucar.visad.display
Class ShapeDisplayable
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.LineDrawing
ucar.visad.display.ShapeDisplayable
Displayable to encompass a manipulable point that can be moved
around the display. If you want to limit the movement to one
axis, then construct the RealTuple with one element whose RealType
corresponds to that axis.
- Version:
- $Revision: 1.7 $
- 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
ConstructorsConstructorDescriptionShapeDisplayable
(String name, String markerText) Construct a ShapeDisplayable.ShapeDisplayable
(String name, String markerText, RealTuple initialValue) Construct a ShapeDisplayable.ShapeDisplayable
(String name, RealTuple initialValue) Construct a ShapeDisplayable for the pointType specified with the specified intial value.ShapeDisplayable
(String name, RealTupleType pointType) Construct a ShapeDisplayable for the pointType specified.ShapeDisplayable
(String name, VisADGeometryArray marker) Construct a ShapeDisplayable for the pointType specified.ShapeDisplayable
(String name, VisADGeometryArray marker, RealTuple initialValue) Construct a ShapeDisplayable for the pointType specified with theConstruct a ShapeDisplayable from another instance -
Method Summary
Modifier and TypeMethodDescriptionReturns a clone of this instance suitable for another VisAD display.protected void
Called when the data changes.boolean
Get whether the marker is automatically resized as the display is zoomed.Get the marker for this selector pointgetPoint()
Get the current point.float
getScale()
Get the scale of the ShapeControl.Get the shape typestatic VisADGeometryArray
reduce
(VisADGeometryArray marker) Reduce the size of the markervoid
setAutoSize
(boolean yesorno) Set whether the marker should automatically resize as the display is zoomed.void
Set the marker text for this selector pointvoid
setMarker
(VisADGeometryArray marker) Set the marker for this selector pointvoid
setMarker
(VisADGeometryArray[] marker) Set the markervoid
setMarker
(VisADGeometryArray marker, double x, double y, double z) Set the marker for this selector pointvoid
setPoint
(double x, double y, double z) Set the locationvoid
Set the point.void
setPointSize
(float newSize) Set the size (scale) of the ShapeControl.Methods inherited from class ucar.visad.display.LineDrawing
getColor, getLineStyle, getLineWidth, getPointSize, setColor, setHSV, setHSV, setLineStyle, setLineWidth, setRGB, setRGB, setRGBA, setRGBA
Methods inherited from class ucar.visad.display.DisplayableData
addAction, destroy, getActive, getAnimationSet, getData, getDataRenderer, 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
-
ShapeDisplayable
public ShapeDisplayable(String name, VisADGeometryArray marker) throws VisADException, RemoteException Construct a ShapeDisplayable for the pointType specified. Initial value is set to 0.- Parameters:
name
- name of this ShapeDisplayablemarker
- The marker to use- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
ShapeDisplayable
public ShapeDisplayable(String name, RealTupleType pointType) throws VisADException, RemoteException Construct a ShapeDisplayable for the pointType specified. Initial value is set to 0.- Parameters:
name
- name of this ShapeDisplayablepointType
- RealType that the point should map to- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
ShapeDisplayable
Construct a ShapeDisplayable for the pointType specified with the specified intial value.- Parameters:
name
- name of this ShapeDisplayableinitialValue
- RealTuple position for point- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
ShapeDisplayable
Construct a ShapeDisplayable.- Parameters:
name
- name of this ShapeDisplayablemarkerText
- text for the marker- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
ShapeDisplayable
public ShapeDisplayable(String name, String markerText, RealTuple initialValue) throws VisADException, RemoteException Construct a ShapeDisplayable.- Parameters:
name
- name of this ShapeDisplayablemarkerText
- text for the markerinitialValue
- RealTuple position for point- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
ShapeDisplayable
public ShapeDisplayable(String name, VisADGeometryArray marker, RealTuple initialValue) throws VisADException, RemoteException Construct a ShapeDisplayable for the pointType specified with the- Parameters:
name
- name of this ShapeDisplayablemarker
- Shape to use for makerinitialValue
- RealTuple position for point- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
ShapeDisplayable
Construct a ShapeDisplayable from another instance- Parameters:
that
- other instance- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
-
Method Details
-
setPoint
Set the point.- Parameters:
value
- new value for this point- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
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.
-
getPoint
Get the current point.- Returns:
- the current value for this point
-
setMarker
Set the marker text for this selector point- Parameters:
markerText
- VisADGeometryArray for marker- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setMarker
public void setMarker(VisADGeometryArray marker, double x, double y, double z) throws VisADException, RemoteException Set the marker for this selector point- Parameters:
marker
- VisADGeometryArray for markerx
- X locationy
- Y locationz
- Z location- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setPoint
Set the location- Parameters:
x
- xy
- yz
- z- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setMarker
Set the marker for this selector point- Parameters:
marker
- VisADGeometryArray for marker- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setMarker
Set the marker- Parameters:
marker
- the marker as a geometry array- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD Exception
-
setPointSize
Set the size (scale) of the ShapeControl. Usually done to set the initial size.- Overrides:
setPointSize
in classLineDrawing
- Parameters:
newSize
- size to use.- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
getScale
public float getScale()Get the scale of the ShapeControl.- Returns:
- current scale;
-
getMarker
Get the marker for this selector point- Returns:
- VisADGeometryArray for marker
-
setAutoSize
Set whether the marker should automatically resize as the display is zoomed.- Parameters:
yesorno
- true to automatically resize the marker.- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
getAutoSize
public boolean getAutoSize()Get whether the marker is automatically resized as the display is zoomed.- Returns:
- true if marker is automatically resized.
-
dataChange
Called when the data changes.- Overrides:
dataChange
in classDisplayableData
- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
reduce
Reduce the size of the marker- Parameters:
marker
- marker to reduce- Returns:
- reduced marker
-
getShapeType
Get the shape type- Returns:
- The shape type
-