ucar.visad.display
Class ConstantMapComposite

java.lang.Object
  extended by ucar.visad.display.ConstantMapComposite
All Implemented Interfaces:
ConstantMaps, Propertied
Direct Known Subclasses:
SetOfConstantMaps, TupleOfConstantMaps

public class ConstantMapComposite
extends Object
implements ConstantMaps

Provides support for a composite of adapted VisAD ConstantMap-s.

Version:
$Revision: 1.9 $
Author:
Steven R. Emmerson

Nested Class Summary
 
Nested classes/interfaces inherited from interface ucar.visad.display.ConstantMaps
ConstantMaps.Visitor
 
Field Summary
 
Fields inherited from interface ucar.visad.display.ConstantMaps
CONSTANT_MAP
 
Constructor Summary
ConstantMapComposite()
          Constructs.
ConstantMapComposite(ConstantMaps maps)
          Constructs.
 
Method Summary
 void accept(ConstantMaps.Visitor visitor)
          Accepts a ConstantMaps.Visitor to this instance.
protected  void add(ConstantMaps maps)
          Adds adapted ConstantMaps to this instance.
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener to this instance.
 void addPropertyChangeListener(String name, PropertyChangeListener listener)
          Adds a PropertyChangeListener for a named property to this instance.
protected  void firePropertyChange(PropertyChangeEvent event)
          Fires a PropertyChangeEvent.
protected  void firePropertyChange(String propertyName, Object oldValue, Object newValue)
          Fires a PropertyChangeEvent.
 ConstantMap[] getConstantMaps()
          Returns the ConstantMap(s) of this instance.
protected  void remove(ConstantMaps maps)
          Removes adapted ConstantMaps from this instance.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener from this instance.
 void removePropertyChangeListener(String name, PropertyChangeListener listener)
          Removes a PropertyChangeListener for a named property from this instance.
 void setDisplay(Display display)
          Adds the adapted ConstantMap(s) of this instance to a VisAD display.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantMapComposite

public ConstantMapComposite()
Constructs.


ConstantMapComposite

public ConstantMapComposite(ConstantMaps maps)
                     throws VisADException,
                            RemoteException
Constructs.

Parameters:
maps - The initial ConstantMaps for this instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

add

protected void add(ConstantMaps maps)
            throws BadMappingException,
                   VisADException,
                   RemoteException
Adds adapted ConstantMaps to this instance.

Parameters:
maps - The adapted ConstantMaps to be added.
Throws:
BadMappingException - Addition of the ConstantMaps would result in multiple values for a DisplayRealType.
VisADException - VisAD failure.
RemoteException - Java RMI failure.

remove

protected void remove(ConstantMaps maps)
               throws VisADException,
                      RemoteException
Removes adapted ConstantMaps from this instance.

Parameters:
maps - The adapted ConstantMaps to be removed.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

accept

public void accept(ConstantMaps.Visitor visitor)
            throws VisADException,
                   RemoteException
Accepts a ConstantMaps.Visitor to this instance.

Specified by:
accept in interface ConstantMaps
Parameters:
visitor - The ConstantMaps.Visitor to accept.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getConstantMaps

public ConstantMap[] getConstantMaps()
Returns the ConstantMap(s) of this instance.

Specified by:
getConstantMaps in interface ConstantMaps
Returns:
The ConstantMap(s) of this instance.

setDisplay

public void setDisplay(Display display)
                throws VisADException,
                       RemoteException
Adds the adapted ConstantMap(s) of this instance to a VisAD display. This method should only be invoked by a DisplayAdapter.

Specified by:
setDisplay in interface ConstantMaps
Parameters:
display - The VisAD display.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to this instance.

Specified by:
addPropertyChangeListener in interface Propertied
Parameters:
listener - The PropertyChangeListener to be added.

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener for a named property to this instance.

Specified by:
addPropertyChangeListener in interface Propertied
Parameters:
name - The name of the property.
listener - The PropertyChangeListener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from this instance.

Specified by:
removePropertyChangeListener in interface Propertied
Parameters:
listener - The PropertyChangeListener to be removed.

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener for a named property from this instance.

Specified by:
removePropertyChangeListener in interface Propertied
Parameters:
name - The name of the property.
listener - The PropertyChangeListener to be removed.

firePropertyChange

protected void firePropertyChange(PropertyChangeEvent event)
Fires a PropertyChangeEvent.

Parameters:
event - The PropertyChangeEvent.

firePropertyChange

protected void firePropertyChange(String propertyName,
                                  Object oldValue,
                                  Object newValue)
Fires a PropertyChangeEvent.

Parameters:
propertyName - The name of the property.
oldValue - The old value of the property.
newValue - The new value of the property.