Class Displayable
- Direct Known Subclasses:
Animation
,CompositeDisplayable
,DisplayableData
,DisplayableDataRef
,SelectRangeDisplayable
Name | Type | Access | Default | Description |
---|---|---|---|---|
display | visad.LocalDisplay | set/get | null |
The VisAD display associated with this instance |
scalarMapSet | ScalarMapSet | get | empty set | The set of non-spatial or unique ScalarMap-s associated with this instance |
This implementation conserves memory by delaying storage allocation for PropertyChangeListener-s until the first one is registered.
- Version:
- $Revision: 1.76 $
- Author:
- Steven R. Emmerson
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the VisAD display property.protected CompositeDisplayable
The parent.static final String
The name of the set of ScalarMapSet property. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructs from nothing.protected
Displayable
(Displayable that) Constructs from another instance.protected
Displayable
(LocalDisplay display) Constructs from an initial VisAD display. -
Method Summary
Modifier and TypeMethodDescriptionaddConstantMap
(ConstantMap constantMap) Adds a ConstantMap to this instance.void
addConstantMaps
(ConstantMap[] maps) Adds ConstantMaps to this instance.final void
Requests that this instance'sDataReference
s be added to the associated VisAD display as soon as feasible.void
Adds a PropertyChangeListener to this instance.void
addPropertyChangeListener
(String name, PropertyChangeListener listener) Adds a PropertyChangeListener for a named property to this instance.protected final boolean
Returns whether or not the client has requested that this instance'sDataReference
s be added to the display.protected void
addScalarMap
(ScalarMap map) Adds a ScalarMap to this instance's set of ScalarMap-s.protected void
addScalarMaps
(ScalarMapSet maps) Adds a set of ScalarMap-s to this instance's set of ScalarMap-s.protected void
applyColorUnit
(ScalarMap map, RealType realType) If the colorUnit is not compatible with the unit of the given real type then clear the colorUnit and set the override unit of the given ScalarMap to the default Unit of the realType.protected void
applyDisplayUnit
(ScalarMap map, RealType realType) protected void
Check if the given unit is compatible with the unit of the givenrealtype
.abstract Displayable
Returns a clone of this instance suitable for another VisAD display.protected ConstantMap[]
Combines this instance's ConstantMap-s with another set of ConstantMap-s and returns a copy of the set.protected void
destroy()
Called when the displayable is removed from a display mastervoid
Destroy this instanceprotected void
Calls firePropertyChangeEventInThread so we break up potential deadlocksprotected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) Fires a PropertyChangeEvent.protected void
Fires a PropertyChangeEvent for the SCALAR_MAP_SET property with the value of the SCALAR_MAP_SET at the time of the last firing as the old value.getAnimationSet
(RealType aniType, boolean force) Returns the set of values for the givenaniType
if the contained Data objects adapted by thisDisplayable
have any data of that type.Return the colorUnit
.Returns copies of the ConstantMap-s of this instance.getData()
Returns the single, VisAD data object adapted by thisDisplayable
, if one exists.boolean
Are we destroyed?final LocalDisplay
Returns the associated VisAD display.Get the display master.Returns the unit that is being used by the VisAD display subsystem for rendering this instance ornull
if no such unit exists.boolean
Get whether or not to render data as pointsprotected static ScalarMap
getScalarMap
(LocalDisplay display, ScalarMap template) Finds the ScalarMap of a VisAD display that matches a given ScalarMap in the sense that it has the same ScalarType and DisplayRealType.protected static ScalarMap
getScalarMap
(LocalDisplay display, ScalarType scalarType, DisplayRealType displayRealType) Finds the ScalarMap of a VisAD display that has the given ScalarType and DisplayRealType.protected ScalarMap
getScalarMap
(ScalarMap template) final ScalarMapSet
Returns the set of ScalarMap-s associated with this instance.boolean
Get whether or not to use fast rendering.boolean
Get the UseTimesInAnimation property.boolean
Gets the visibility property.boolean
Indicates whether or not thisDisplayable
adapts a single, VisAD data object.boolean
isActive()
Is the DisplayMaster this displayable is part of activeprotected boolean
isUnitCompatible
(RealType realType, Unit unit) Is the given unit compatible (i.e., is either null or can convert to the defaultUnit) with the the given real type.boolean
Returns the visibility property.void
logException
(String msg, Exception exc) A wrapper around LogUtil.logExceptionprotected void
myAddConstantMaps
(ConstantMap[] newMaps) Adds this instance's data references to the associated VisAD display if possible.protected abstract void
Adds this instance's data references to the associated VisAD display if possible.protected abstract void
Removes this instance's data references from the associated VisAD display.removeConstantMap
(DisplayRealType displayRealType) Removes a ConstantMap from this instance.final void
Removes this instance's data references from the associated VisAD display.void
Removes a PropertyChangeListener from this instance.void
removePropertyChangeListener
(String name, PropertyChangeListener listener) Removes a PropertyChangeListener for a named property from this instance.protected void
removeScalarMap
(ScalarMap map) Removes a ScalarMap from this instance's set of ScalarMap-s.protected void
replaceScalarMap
(ScalarMap oldMap, ScalarMap newMap) Replaces a ScalarMap in this instance's set of ScalarMap-s.void
setAdjustFlow
(boolean adjust) A no-op method so we can have a consistent api with the composite pattern.void
A no-op method so we can have a consistent api with the composite pattern.void
setColorPalette
(float[][] c) A no-op method so we can have a consistent api with the composite pattern.void
setColorPalette
(ColorTable colorTable) A wrapper method calling setColorPalette (float[][] c)void
setColorUnit
(Unit unit) A hook to allow sub-classes to set their color unit.void
setConstantPosition
(double value, DisplayRealType type) Set the z position to given valuevoid
setContourInfo
(ContourInfo contourInfo) A no-op method for setting contour informationvoid
setDisplay
(LocalDisplay display) Associates this instance with a given VisAD display.void
A wrapper arount DisplayMaster.setDisplayActive.void
A wrapper arount DisplayMaster.setDisplayInactive.protected void
setDisplayMaster
(DisplayMaster master) Set the display master.void
setDisplayUnit
(Unit unit) Sets the unit for use by the VisAD display subsystem.void
setLineWidth
(float size) A no-op method so we can have a consistent api with the composite pattern.void
setManipulable
(boolean manipulable) Sets the manipulable value of this Displayable.void
setOverrideAnimationSet
(List times) Set the animation set with a list of DateTimesvoid
Set an alternate animation setprotected void
setParent
(CompositeDisplayable parent) Set the parent.void
setPointMode
(boolean usePoints) Set the flags for whether the Displayable displays data as points.void
setPointSize
(float size) A no-op method so we can have a consistent api with the composite pattern.void
setRangeForColor
(double low, double hi) A no-op method so we can have a consistent api with the composite pattern.void
Just a wrapper around the othersetRangeForColor(double, double)
void
setScalarMapSet
(ScalarMapSet maps) Sets the set of ScalarMap-s of this instance.void
setSelectedRange
(double low, double hi) A no-op method so we can have a consistent api with the composite pattern.void
Just a wrapper around the othersetSelectedRange(double, double)
void
setUseFastRendering
(boolean fastRender) Set the flags for whether the renderer should use fast (but perhaps inaccurate) rendering (ie, not account for projection seams)void
setUseTimesInAnimation
(boolean value) Set the UseTimesInAnimation property.void
setVisible
(boolean visible) Sets the visibility property.void
toFront()
Bring the displayable to the front.
-
Field Details
-
DISPLAY
The name of the VisAD display property.- See Also:
-
SCALAR_MAP_SET
The name of the set of ScalarMapSet property.- See Also:
-
parent
The parent. May be null.
-
-
Constructor Details
-
Displayable
Constructs from nothing.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
Displayable
Constructs from an initial VisAD display.- Parameters:
display
- The VisAD display. May benull
.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
Displayable
Constructs from another instance. The ConstantMap-s and ScalarMap-s are copied from the other instance. The list of PropertyChangeListener-s is empty, however, and the display is unset.- Parameters:
that
- The other instance.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
-
Method Details
-
toFront
Bring the displayable to the front. Basically this removes it from the display and re-adds it.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getDisplayMaster
Get the display master. If none set on this displayable then, if there is a parent composite, ask the parent. Else return null.- Returns:
- The
DisplayMaster
this displayable is part of.
-
setDisplayMaster
Set the display master. This may be null.- Parameters:
master
- TheDisplayMaster
this displayable is part of.- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD Exception
-
setUseFastRendering
Set the flags for whether the renderer should use fast (but perhaps inaccurate) rendering (ie, not account for projection seams)- Parameters:
fastRender
- true to render quickly- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getUseFastRendering
public boolean getUseFastRendering()Get whether or not to use fast rendering.- Returns:
- true to use fast rendering
-
setPointMode
Set the flags for whether the Displayable displays data as points.- Parameters:
usePoints
- true to display as points- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getPointMode
public boolean getPointMode()Get whether or not to render data as points- Returns:
- true to display as points
-
setParent
Set the parent.- Parameters:
parent
- The parent composite.
-
setConstantPosition
public void setConstantPosition(double value, DisplayRealType type) throws VisADException, RemoteException Set the z position to given value- Parameters:
value
- The valuetype
- The type- Throws:
RemoteException
- On badnessVisADException
- On badness
-
setDisplayInactive
A wrapper arount DisplayMaster.setDisplayInactive. This must be followed by a corresponding call to setDisplayActive- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplayActive
A wrapper arount DisplayMaster.setDisplayActive. This must be preceded by a call to setDisplayInactive- Throws:
RemoteException
- On badnessVisADException
- On badness
-
isActive
Is the DisplayMaster this displayable is part of active- Returns:
- Is active
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDisplay
Associates this instance with a given VisAD display. If this instance was previously associated with a VisAD display, then it is first removed from that display. This method fires a PropertyChangeEvent for DISPLAY with the old and new values. This method will not cause this instance to be rendered in the display. This method may be overridden in subclasses; the overriding method should invokesuper.setDisplay(display)
.- Parameters:
display
- The VisAD display.- Throws:
VisADException
- if a core VisAD failure occurs.RemoteException
- if Java RMI failure occurs.- See Also:
-
getDisplay
Returns the associated VisAD display.- Returns:
- The associated VisAD display. Will be
null
if this instance hasn't been associated with a VisAD display yet.
-
getScalarMapSet
Returns the set of ScalarMap-s associated with this instance.- Returns:
- The set of ScalarMap-s associated with this instance.
-
addRefsInvoked
protected final boolean addRefsInvoked()Returns whether or not the client has requested that this instance'sDataReference
s be added to the display.- Returns:
true
if and only ifaddDataReferences()
has been called without an interveningremoveDataReferences()
.
-
addPropertyChangeListener
Adds a PropertyChangeListener to this instance.- Parameters:
listener
- The PropertyChangeListener to be added.
-
addPropertyChangeListener
Adds a PropertyChangeListener for a named property to this instance.- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be added.
-
removePropertyChangeListener
Removes a PropertyChangeListener from this instance.- Parameters:
listener
- The PropertyChangeListener to be removed.
-
removePropertyChangeListener
Removes a PropertyChangeListener for a named property from this instance.- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be removed.
-
addConstantMap
Adds a ConstantMap to this instance.- Parameters:
constantMap
- The ConstantMap to be added.- Returns:
- The previous constant map or
null
. - Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addConstantMaps
Adds ConstantMaps to this instance.- Parameters:
maps
- The ConstantMaps to be added.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeConstantMap
Removes a ConstantMap from this instance.- Parameters:
displayRealType
- The DisplayRealType to have its ConstantMap removed.- Returns:
- The associated ConstantMap or
null
.
-
setRangeForColor
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable, which iterates through its children composite calling setRangeForColor. This method is overwritten in RGBDisplayable to actually setRangeForColor.
There is a fundamental problem with the Composite pattern (of which the Displayable class serves as the abstract root class) in that you want to have the Composite class (e.g., CompositeDisplayable) to be able to have methods which are recursively applied to its children. However, not all methods are shared by all potential children classes. There is a tension between having methods defined for objects that make sense and having the utility of applying methods to a group of objects through the composite.
With these no-op methods here (e.g., setColorPalette, setColor, setPointSize) we leaned towards utility vs. method signature correctness.
Of course, one way around this is to have a general setProperty (propertyName, value) method which is used.
- Parameters:
low
- The minimum value of the range for the color.hi
- The maximum value of the range for the color.- Throws:
VisADException
- if a VisADFailure occurs.RemoteException
- if a Java RMI failure occurs.
-
setRangeForColor
Just a wrapper around the othersetRangeForColor(double, double)
- Parameters:
r
- The range for the color.- Throws:
VisADException
- if a VisADFailure occurs.RemoteException
- if a Java RMI failure occurs.
-
setSelectedRange
Just a wrapper around the othersetSelectedRange(double, double)
- Parameters:
r
- The range for the color.- Throws:
VisADException
- if a VisADFailure occurs.RemoteException
- if a Java RMI failure occurs.
-
setSelectedRange
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable- Parameters:
low
- The minimum value of the selected rangehi
- The maximum value of the selected range- Throws:
VisADException
- if a VisADFailure occurs.RemoteException
- if a Java RMI failure occurs.
-
setColorPalette
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable, which iterates through its children composite calling setColorPalette.- Parameters:
c
- color palette- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setContourInfo
A no-op method for setting contour information- Parameters:
contourInfo
- Contains contour and labeling information- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setColorPalette
A wrapper method calling setColorPalette (float[][] c)- Parameters:
colorTable
- ColorTable that defines the palette- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setColor
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable, which iterates through its children composite calling setColor. This method is overwritten in LineDrawing.- Parameters:
c
- the Color- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setPointSize
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable, which iterates through its children composite calling setColor. This method is overwritten in LineDrawing.- Parameters:
size
- point size- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setLineWidth
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable, which iterates through its children composite calling setColor. This method is overwritten in LineDrawing.- Parameters:
size
- line width size (pixels)- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setVisible
Sets the visibility property.- Parameters:
visible
- Whether or not this instance should be displayed.- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setManipulable
Sets the manipulable value of this Displayable. This is a no-op and is here for the CompositeDisplayable- Parameters:
manipulable
- value- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getVisible
public boolean getVisible()Gets the visibility property.- Returns:
- Whether or not this instance is visible.
-
isVisible
public boolean isVisible()Returns the visibility property.- Returns:
- Whether or not this instance should be displayed.
-
addDataReferences
Requests that this instance'sDataReference
s be added to the associated VisAD display as soon as feasible. This might or might not happen during the invocation of this method (aDataReference
might not be added if, for example, it contains no data). Invoking this method will cause all subsequentaddRefsInvoked()
invocations to returntrue
untilremoveDataReferences()
is invoked. This method is idempotent: it may be invoked multiple times.- Throws:
DisplayException
- ifsetDisplay(LocalDisplay)
has not been invoked.VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
removeDataReferences
Removes this instance's data references from the associated VisAD display. Invoking this method will cause all subsequentaddRefsInvoked()
invocations to returnfalse
untiladdDataReferences()
is invoked. This method is idempotent: it may be invoked multiple times.- Throws:
DisplayException
- ifsetDisplay(LocalDisplay)
hasn't been invoked.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
myAddDataReferences
Adds this instance's data references to the associated VisAD display if possible. This method does not verify that the VisAD display has been set. This method is idempotent.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
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.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
myAddConstantMaps
Adds this instance's data references to the associated VisAD display if possible. This method does not verify that the VisAD display has been set. This method is idempotent.- Parameters:
newMaps
- new maps- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
destroyDisplayable
Destroy this instance- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD Exception
-
getDestroyed
public boolean getDestroyed()Are we destroyed?- Returns:
- true if we are
-
destroy
Called when the displayable is removed from a display master- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setScalarMapSet
Sets the set of ScalarMap-s of this instance. This method invokesfireScalarMapSetChange()
. Intermediate subclasses that have their own ScalarMap-s should override this method and invokesuper.setScalarMaps(ScalarMapSet)
.- Parameters:
maps
- The set of ScalarMap-s to be added.- See Also:
-
hasDataObject
public boolean hasDataObject()Indicates whether or not this
Displayable
adapts a single, VisAD data object.This implementation always returns
false
.- Returns:
- True if and only if this instance adapts a single, VisAD data object.
-
getData
Returns the single, VisAD data object adapted by this
Displayable
, if one exists.null
will be returned if this instance adapts such an object but the object is unset, or if this instance is not capable of adapting a single, VisAD data object. To distinguish these cases, usehasDataObject()
.This implementation always returns null.
- Returns:
- The single, adapted, VisAD data object if one
exists. Not a copy. May be
null
. - Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.- See Also:
-
addScalarMaps
Adds a set of ScalarMap-s to this instance's set of ScalarMap-s. This method invokesfireScalarMapSetChange()
.- Parameters:
maps
- The set of ScalarMap-s to be added.- Throws:
BadMappingException
- Duplicate ScalarMap.- See Also:
-
addScalarMap
Adds a ScalarMap to this instance's set of ScalarMap-s. After a series of invocations of this method, concrete subclass should invokefireScalarMapSetChange()
.- Parameters:
map
- The ScalarMap to be added.- Throws:
BadMappingException
- Duplicate ScalarMap.- See Also:
-
getScalarMap
Returns theScalarMap
in this instance's set ofScalarMap
s that matches a template ornull
if no suchScalarMap
is found.- Parameters:
template
- The template.- Returns:
- The matching ScalarMap or
null
.
-
removeScalarMap
Removes a ScalarMap from this instance's set of ScalarMap-s. After a series of invocations of this method, concrete subclass should invokefireScalarMapSetChange()
.- Parameters:
map
- The ScalarMap to be removed.- See Also:
-
replaceScalarMap
Replaces a ScalarMap in this instance's set of ScalarMap-s. After a series of invocations of this method, concrete subclass should invokefireScalarMapSetChange()
.- Parameters:
oldMap
- The old ScalarMap to be removed. May benull
.newMap
- The new ScalarMap to be added.- Throws:
BadMappingException
- Duplicate ScalarMap.- See Also:
-
getScalarMap
protected static ScalarMap getScalarMap(LocalDisplay display, ScalarType scalarType, DisplayRealType displayRealType) throws VisADException, RemoteException Finds the ScalarMap of a VisAD display that has the given ScalarType and DisplayRealType.- Parameters:
display
- The VisAD display.scalarType
- The ScalarType to match.displayRealType
- The DisplayRealType to match.- Returns:
- The matching ScalarMap of the display. Will be
null
if no matching ScalarMap was found. - Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getScalarMap
protected static ScalarMap getScalarMap(LocalDisplay display, ScalarMap template) throws VisADException, RemoteException Finds the ScalarMap of a VisAD display that matches a given ScalarMap in the sense that it has the same ScalarType and DisplayRealType.- Parameters:
display
- The VisAD display.template
- The ScalarMap to match.- Returns:
- The matching ScalarMap of the display. Will be
null
if no matching ScalarMap was found. - Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
firePropertyChange
Calls firePropertyChangeEventInThread so we break up potential deadlocks- Parameters:
event
- The PropertyChangeEvent.
-
firePropertyChange
Fires a PropertyChangeEvent.- Parameters:
propertyName
- The name of the property.oldValue
- The old value of the property.newValue
- The new value of the property.
-
getConstantMaps
Returns copies of the ConstantMap-s of this instance.- Returns:
- The ConstantMap-s of this instance.
-
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
combineConstantMaps
Combines this instance's ConstantMap-s with another set of ConstantMap-s and returns a copy of the set.- Parameters:
maps
- The set of ConstantMap-s to be combined with the ConstantMap-s of this instance.- Returns:
- The union of ConstantMap-s.
-
fireScalarMapSetChange
protected void fireScalarMapSetChange()Fires a PropertyChangeEvent for the SCALAR_MAP_SET property with the value of the SCALAR_MAP_SET at the time of the last firing as the old value. This method should be invoked by concrete subclasses after a sequence of changes to this instance's set of ScalarMap-s.- See Also:
-
logException
A wrapper around LogUtil.logException- Parameters:
msg
- message for the exceptionexc
- exception that is being logged
-
setDisplayUnit
Sets the unit for use by the VisAD display subsystem.- Parameters:
unit
- The display unit to use.- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
getDisplayUnit
Returns the unit that is being used by the VisAD display subsystem for rendering this instance ornull
if no such unit exists.- Returns:
- The display unit or
null
. - Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setColorUnit
A hook to allow sub-classes to set their color unit.- Parameters:
unit
- The color unit ornull
- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
getColorUnit
Return the colorUnit
.- Returns:
- color unit
- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
setAdjustFlow
A no-op method so we can have a consistent api with the composite pattern. This method is overwritten in CompositeDisplayable, which iterates through its children composite calling setColorPalette. Set whether flow should be adjusted to earth coordinates- Parameters:
adjust
- true to adjust- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
isUnitCompatible
Is the given unit compatible (i.e., is either null or can convert to the defaultUnit) with the the given real type.- Parameters:
realType
- RealType to checkunit
-Unit
in question- Returns:
- true if the unit is compatible with the RealType
-
checkUnit
Check if the given unit is compatible with the unit of the givenrealtype
. If not throw a VisADException.- Parameters:
realType
- RealType to checkunit
-Unit
in question- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
applyDisplayUnit
protected void applyDisplayUnit(ScalarMap map, RealType realType) throws VisADException, RemoteException If the displayUnit is not compatible with the unit of the givenRealType
then clear the displayUnit and set the override unit of the givenScalarMap
to the default Unit of therealType
. Else set the override unit of the ScalarMap to the displayUnit.- Parameters:
map
- ScalarMap to modifyrealType
- RealType of default unit- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
applyColorUnit
protected void applyColorUnit(ScalarMap map, RealType realType) throws VisADException, RemoteException If the colorUnit is not compatible with the unit of the given real type then clear the colorUnit and set the override unit of the given ScalarMap to the default Unit of the realType. Else set the override unit of the ScalarMap to the colorUnit.- Parameters:
map
- ScalarMap to changerealType
- RealType for default unit- Throws:
RemoteException
- Java RMI failure.VisADException
- VisAD failure.
-
getAnimationSet
Returns the set of values for the given
aniType
if the contained Data objects adapted by thisDisplayable
have any data of that type.null
will be returned if this instance adapts such an object but the object is unset, or if this instance does not support this type.- Parameters:
aniType
- The type used for animationforce
- force the calculation- Returns:
- The set of times from all data
May be
null
. - Throws:
VisADException
- if a VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.- See Also:
-
setOverrideAnimationSet
Set an alternate animation set- Parameters:
set
- the set
-
setOverrideAnimationSet
Set the animation set with a list of DateTimes- Parameters:
times
- the times- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD Exception
-
setUseTimesInAnimation
Set the UseTimesInAnimation property.- Parameters:
value
- The new value for UseTimesInAnimation- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getUseTimesInAnimation
public boolean getUseTimesInAnimation()Get the UseTimesInAnimation property.- Returns:
- The UseTimesInAnimation
-