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
ConstantMap s 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, removePropertyChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener
public 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 ConstantMaps
public static visad.ConstantMap[] getConstantMaps(ConstantMapAdapter[] constantMapAdapters)
ConstantMap
s 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 ConstantMaps
display
- 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 ConstantMaps
visitor
- 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.Object
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
obj
- The other object. Must be an instance of this
class.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- 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