Package ucar.visad.display
Class DisplayableDataRef
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableDataRef
Provides support for displaying the VisAD Data of a VisAD DataReference.
- Version:
- $Revision: 1.19 $
- Author:
- Steven R. Emmerson
-
Field Summary
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
-
Constructor Summary
ConstructorsConstructorDescriptionDisplayableDataRef
(String name) Constructs from aDataReference
and a missing data value.Constructs from aDataReference
and a missing data value. -
Method Summary
Modifier and TypeMethodDescriptionReturns a clone of this instance suitable for another VisAD display.final DataReference
Returns the underlyingDataReference
attribute.protected DataRenderer
getDataRenderer
(DisplayImpl display) Returns the DataRenderer for this displayable.final boolean
Indicates whether or not thisDisplayable
adapts a single, VisAD data object.final boolean
Indicates whether or not this instance may be directly manipulated by the VisAD display subsystem.protected final void
Adds this instance'sDataReference
to the associated VisAD display.protected final void
Removes this instance's data references from the associated VisAD display.void
Sets the color of this Displayable.void
Set the data on this referencevoid
setLineStyle
(int lineStyle) Sets the style of lines in this Displayable.void
setLineWidth
(float width) Sets the width of lines in this Displayable.final void
setManipulable
(boolean manipulable) Sets the direct-manipulability of the underlying data.final void
setVisible
(boolean visible) Sets whether or not this instance is visible.Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroy, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getAnimationSet, getColorUnit, getConstantMaps, getData, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setPointMode, setPointSize, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseFastRendering, setUseTimesInAnimation, toFront
-
Constructor Details
-
DisplayableDataRef
Constructs from aDataReference
and a missing data value. By default, theDataRenderer
will be appropriate for the dimensionality of the display and will not directly manipulate the data (but seesetManipulable(boolean)
).- Parameters:
name
- the name of the reference- Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
DisplayableDataRef
Constructs from aDataReference
and a missing data value. By default, theDataRenderer
will be appropriate for the dimensionality of the display and will not directly manipulate the data (but seesetManipulable(boolean)
).- Parameters:
ref
- The data reference for this instance.- Throws:
NullPointerException
- if the argument isnull
.VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
-
Method Details
-
getDataReference
Returns the underlyingDataReference
attribute.- Returns:
- The underlying
DataReference
.
-
setData
Set the data on this reference- Parameters:
d
- data to set- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setManipulable
Sets the direct-manipulability of the underlying data. Invoking this method determines whether or not theData
attribute of this instance'sDataReference
attribute may be directly manipulated by the VisAD display subsystem.- Overrides:
setManipulable
in classDisplayable
- Parameters:
manipulable
- Whether or not this instance may be directly manipulated by the VisAD display subsystem.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
isManipulable
public final boolean isManipulable()Indicates whether or not this instance may be directly manipulated by the VisAD display subsystem.- Returns:
true
if and only if this instance may be directly manipulated by the VisAD display subsystem.
-
setVisible
Sets whether or not this instance is visible.- Overrides:
setVisible
in classDisplayable
- Parameters:
visible
- Whether or not this instance is visible.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
myAddDataReferences
Adds this instance'sDataReference
to the associated VisAD display. This method does not verify that the VisAD display has been set. This method is idempotent.- Specified by:
myAddDataReferences
in classDisplayable
- Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
myRemoveDataReferences
Removes this instance's data references from the associated VisAD display. This method does not verify that the VisAD display has been set. This method is idempotent.- Specified by:
myRemoveDataReferences
in classDisplayable
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
hasDataObject
public final boolean hasDataObject()Indicates whether or not this
Displayable
adapts a single, VisAD data object.This implementation always returns
true
.- Overrides:
hasDataObject
in classDisplayable
- Returns:
- True if and only if this instance adapts a single, VisAD data object.
-
getDataRenderer
Returns the DataRenderer for this displayable.- Parameters:
display
- The VisAD display for which a DataRenderer is needed.- Returns:
- This
Displayable
'sDataRenderer
. - Throws:
VisADException
- VisAD failure.
-
setColor
Sets the color of this Displayable.- Overrides:
setColor
in classDisplayable
- Parameters:
color
- The color.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setLineWidth
Sets the width of lines in this Displayable.- Overrides:
setLineWidth
in classDisplayable
- Parameters:
width
- Width of lines (2 = normal)- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setLineStyle
Sets the style of lines in this Displayable.- Parameters:
lineStyle
- style of line- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.- See Also:
-
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Specified by:
cloneForDisplay
in classDisplayable
- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-