|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.visad.display.MapAdapter
ucar.visad.display.ConstantMapAdapter
public class ConstantMapAdapter
Provides support for adapting VisAD ConstantMap-s into something that is
(hopefully) easier to use. Unlike instances of VisAD
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 |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ucar.visad.display.ConstantMaps |
|---|
ConstantMaps.Visitor |
| Field Summary | |
|---|---|
static String |
CONSTANT_MAP
The name of the constant-map property. |
| Constructor Summary | |
|---|---|
ConstantMapAdapter(DisplayRealType drt)
Constructs. |
|
ConstantMapAdapter(double value,
DisplayRealType drt)
Constructs. |
|
ConstantMapAdapter(Real value,
DisplayRealType drt)
Constructs. |
|
| Method Summary | |
|---|---|
void |
accept(ConstantMaps.Visitor visitor)
Accepts a visitor for this instance. |
int |
compareTo(Object obj)
Compares this instance to another object. |
boolean |
equals(Object obj)
Indicates if this instance is semantically identical to another object. |
ConstantMap |
getConstantMap()
Returns the constant-map property. |
ConstantMap[] |
getConstantMaps()
Returns the constant-map properties. |
static ConstantMap[] |
getConstantMaps(ConstantMapAdapter[] constantMapAdapters)
Returns the ConstantMaps of this instance. |
int |
hashCode()
Returns the hash code of this instance. |
void |
setDisplay(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(Real value)
Set the constant value of the associated DisplayRealType. |
String |
toString()
Returns the string representation of this instance. |
| Methods inherited from class ucar.visad.display.MapAdapter |
|---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, getDisplayRealType, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ucar.visad.display.Propertied |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Field Detail |
|---|
public static final String CONSTANT_MAP
| Constructor Detail |
|---|
public ConstantMapAdapter(DisplayRealType drt)
throws VisADException
drt - The DisplayRealType to be associated with this
adapter.
VisADException - VisAD failure.
public ConstantMapAdapter(Real value,
DisplayRealType drt)
throws 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.
VisADException - VisAD failure.
public ConstantMapAdapter(double value,
DisplayRealType drt)
throws 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.
VisADException - VisAD failure.| Method Detail |
|---|
public void setValue(Real value)
throws 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.
VisADException - VisAD failure.
public void setValue(double value)
throws 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.
VisADException - VisAD failure.public ConstantMap getConstantMap()
public ConstantMap[] getConstantMaps()
getConstantMaps in interface ConstantMapspublic static 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(Display display)
throws VisADException,
RemoteException
setDisplay in interface ConstantMapsdisplay - The VisAD display.
VisADException - VisAD failure.
RemoteException - Java RMI failure.
public void accept(ConstantMaps.Visitor visitor)
throws VisADException,
RemoteException
accept in interface ConstantMapsvisitor - The visitor for this instance.
VisADException - VisAD failure.
RemoteException - Java RMI failure.public String toString()
toString in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparableobj - The other object. Must be an instance of this
class.
public boolean equals(Object obj)
equals in class Objectobj - The other object.
true if and only if this instance
is semantically identical to the other object.public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||