Package ucar.visad.display
Class DataAdapter
java.lang.Object
ucar.visad.display.DataAdapter
- All Implemented Interfaces:
Propertied
Provides support for adapting VisAD data objects into something that is
(hopefully) easier to use. This class aggregates a VisAD Display, a
DataReference, a DataRenderer, and associated ConstantMap-s into a single
entity.
Instances of this class have the following, bound, JavaBean
properties:
Name | Type | Access | Default | Description |
---|---|---|---|---|
constantMap | ConstantMap |
construction-dependent | Fired whenever any ConstantMap changes
|
PropertyChangeEvent
-s fired for the
CONSTANT_MAP
property have the originating instance of this
class as the source and the old and new values set to the appropriate
ConstantMap
s.- Version:
- $Revision: 1.9 $
- Author:
- Steven R. Emmerson
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataAdapter
(DisplayAdapter displayAdapter, DataReference dataReference) Constructs.DataAdapter
(DisplayAdapter displayAdapter, DataReference dataReference, ConstantMaps constantMaps) Constructs.DataAdapter
(DisplayAdapter displayAdapter, DataReference dataReference, ConstantMaps constantMaps, DataRenderer renderer) Constructs. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Links anAction
to the data component.void
Adds a PropertyChangeListener to this instance.void
addPropertyChangeListener
(String name, PropertyChangeListener listener) Adds a PropertyChangeListener for a named property to this instance.protected void
Fires a PropertyChangeEvent.protected void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) Fires a PropertyChangeEvent.void
removeAction
(Action action) Unlinks anAction
from the data component.void
Removes a PropertyChangeListener from this instance.void
removePropertyChangeListener
(String name, PropertyChangeListener listener) Removes a PropertyChangeListener for a named property from this instance.
-
Field Details
-
CONSTANT_MAP
The name of theConstantMap
"property".- See Also:
-
-
Constructor Details
-
DataAdapter
public DataAdapter(DisplayAdapter displayAdapter, DataReference dataReference) throws VisADException, RemoteException Constructs.- Parameters:
displayAdapter
- The adapted display.dataReference
- The reference to the datum.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
DataAdapter
public DataAdapter(DisplayAdapter displayAdapter, DataReference dataReference, ConstantMaps constantMaps) throws VisADException, RemoteException Constructs.- Parameters:
displayAdapter
- The adapted display.dataReference
- The reference to the datum.constantMaps
- The constant maps for the datum. May benull
.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
DataAdapter
public DataAdapter(DisplayAdapter displayAdapter, DataReference dataReference, ConstantMaps constantMaps, DataRenderer renderer) throws VisADException, RemoteException Constructs. This is the most general constructor.- Parameters:
displayAdapter
- The adapted display.dataReference
- The reference to the datum.constantMaps
- The constant maps for the datum. May benull
.renderer
- The renderer for the data. May benull
. If non-null
, then must not have been used before.- Throws:
VisADException
- The DataRenderer is already in-use for other data.RemoteException
- Java RMI failure.
-
-
Method Details
-
addAction
Links anAction
to the data component.- Parameters:
action
- TheAction
to be linked.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
removeAction
Unlinks anAction
from the data component.- Parameters:
action
- TheAction
to be unlinked.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addPropertyChangeListener
Adds a PropertyChangeListener to this instance.- Specified by:
addPropertyChangeListener
in interfacePropertied
- Parameters:
listener
- The PropertyChangeListener to be added.
-
addPropertyChangeListener
Adds a PropertyChangeListener for a named property to this instance.- Specified by:
addPropertyChangeListener
in interfacePropertied
- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be added.
-
removePropertyChangeListener
Removes a PropertyChangeListener from this instance.- Specified by:
removePropertyChangeListener
in interfacePropertied
- Parameters:
listener
- The PropertyChangeListener to be removed.
-
removePropertyChangeListener
Removes a PropertyChangeListener for a named property from this instance.- Specified by:
removePropertyChangeListener
in interfacePropertied
- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be removed.
-
firePropertyChange
Fires a PropertyChangeEvent.- 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.
-