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
ConstantMaps.- 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 TypeMethodDescriptionvoidLinks anActionto the data component.voidAdds a PropertyChangeListener to this instance.voidaddPropertyChangeListener(String name, PropertyChangeListener listener) Adds a PropertyChangeListener for a named property to this instance.protected voidFires a PropertyChangeEvent.protected voidfirePropertyChange(String propertyName, Object oldValue, Object newValue) Fires a PropertyChangeEvent.voidremoveAction(Action action) Unlinks anActionfrom the data component.voidRemoves a PropertyChangeListener from this instance.voidremovePropertyChangeListener(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 anActionto the data component.- Parameters:
action- TheActionto be linked.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
removeAction
Unlinks anActionfrom the data component.- Parameters:
action- TheActionto be unlinked.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
addPropertyChangeListener
Adds a PropertyChangeListener to this instance.- Specified by:
addPropertyChangeListenerin interfacePropertied- Parameters:
listener- The PropertyChangeListener to be added.
-
addPropertyChangeListener
Adds a PropertyChangeListener for a named property to this instance.- Specified by:
addPropertyChangeListenerin interfacePropertied- Parameters:
name- The name of the property.listener- The PropertyChangeListener to be added.
-
removePropertyChangeListener
Removes a PropertyChangeListener from this instance.- Specified by:
removePropertyChangeListenerin interfacePropertied- Parameters:
listener- The PropertyChangeListener to be removed.
-
removePropertyChangeListener
Removes a PropertyChangeListener for a named property from this instance.- Specified by:
removePropertyChangeListenerin 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.
-