public class ConstantMapAdapter extends MapAdapter implements ConstantMaps
ConstantMap, the underlying ConstantMap of
an instance of this class may change.
(Yes, I know, a modifiable ConstantMap is something of an oxymoron -- yet
it's still useful.)
Instances of this class have the following, bound, JavaBean
properties:
| Name | Type | Access | Default | Description |
|---|---|---|---|---|
| constantMap | ConstantMap |
set/get | construction-dependent |
The underlying ConstantMap of this instance |
ConstantMaps.Visitor| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONSTANT_MAP
The name of the constant-map property.
|
| Constructor and Description |
|---|
ConstantMapAdapter(visad.DisplayRealType drt)
Constructs.
|
ConstantMapAdapter(double value,
visad.DisplayRealType drt)
Constructs.
|
ConstantMapAdapter(visad.Real value,
visad.DisplayRealType drt)
Constructs.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ConstantMaps.Visitor visitor)
Accepts a visitor for this instance.
|
int |
compareTo(java.lang.Object obj)
Compares this instance to another object.
|
boolean |
equals(java.lang.Object obj)
Indicates if this instance is semantically identical to another object.
|
visad.ConstantMap |
getConstantMap()
Returns the constant-map property.
|
visad.ConstantMap[] |
getConstantMaps()
Returns the constant-map properties.
|
static visad.ConstantMap[] |
getConstantMaps(ConstantMapAdapter[] constantMapAdapters)
Returns the
ConstantMaps of this instance. |
int |
hashCode()
Returns the hash code of this instance.
|
void |
setDisplay(visad.Display display)
This method should be package private because it is expected that only a
DisplayAdapter will invoke this method.
|
void |
setValue(double value)
Set the constant value of the associated DisplayRealType.
|
void |
setValue(visad.Real value)
Set the constant value of the associated DisplayRealType.
|
java.lang.String |
toString()
Returns the string representation of this instance.
|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getDisplayRealType, removePropertyChangeListener, removePropertyChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerpublic static final java.lang.String CONSTANT_MAP
public ConstantMapAdapter(visad.DisplayRealType drt)
throws visad.VisADException
drt - The DisplayRealType to be associated with this
adapter.visad.VisADException - VisAD failure.public ConstantMapAdapter(visad.Real value,
visad.DisplayRealType drt)
throws visad.VisADException
value - The initial value for the DisplayRealType
in units of the default unit of the
DisplayRealType.drt - The DisplayRealType to be associated with this
adapter.visad.VisADException - VisAD failure.public ConstantMapAdapter(double value,
visad.DisplayRealType drt)
throws visad.VisADException
value - The initial value for the DisplayRealType
in units of the default unit of the
DisplayRealType.drt - The DisplayRealType to be associated with this
adapter.visad.VisADException - VisAD failure.public void setValue(visad.Real value)
throws visad.VisADException
PropertyChangeEvent for CONSTANT_MAP with this
instance as the source and with the both the old and new values
appropriately set. The event is fired synchronously --
so watch out for deadlock.value - The new value for the associated
DisplayRealType.visad.VisADException - VisAD failure.public void setValue(double value)
throws visad.VisADException
PropertyChangeEvent for CONSTANT_MAP with
this instance as the source and with the both the old and new values
appropriately set. The event is fired synchronously --
so watch out for deadlock.value - The new value for the associated DisplayRealType
in units of the default unit of the
DisplayRealType.visad.VisADException - VisAD failure.public visad.ConstantMap getConstantMap()
public visad.ConstantMap[] getConstantMaps()
getConstantMaps in interface ConstantMapspublic static visad.ConstantMap[] getConstantMaps(ConstantMapAdapter[] constantMapAdapters)
ConstantMaps of this instance. It is
guaranteed that the returned array contains no duplicates.constantMapAdapters - An array of adapted ConstantMap-s. May
be null.null.public void setDisplay(visad.Display display)
throws visad.VisADException,
java.rmi.RemoteException
setDisplay in interface ConstantMapsdisplay - The VisAD display.visad.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public void accept(ConstantMaps.Visitor visitor) throws visad.VisADException, java.rmi.RemoteException
accept in interface ConstantMapsvisitor - The visitor for this instance.visad.VisADException - VisAD failure.java.rmi.RemoteException - Java RMI failure.public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparableobj - The other object. Must be an instance of this
class.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - The other object.true if and only if this instance
is semantically identical to the other object.public int hashCode()
hashCode in class java.lang.Object