visad
Class DataDisplayLink

java.lang.Object
  extended by visad.ReferenceActionLink
      extended by visad.DataDisplayLink

public class DataDisplayLink
extends ReferenceActionLink

DataDisplayLink objects define connections between DataReference objects and Display objects. It extends ReferenceActionLink which is the more general link between ThingReference (extended by DataReference) and Action (extended by Display).


Field Summary
 long start_time
          value of System.currentTimeMillis() when doTransform() started
 boolean time_flag
          flag indicating current doTransform() has taken more than 500 ms
 
Constructor Summary
DataDisplayLink(DataReference ref, DisplayImpl local_d, Display d, ConstantMap[] constant_maps, DataRenderer rend, long jd)
          construct a DataDisplayLink linking a DataReference to a Display
 
Method Summary
 void addSelectedMapVector(ScalarMap map)
          add a ScalarMap applying to this Data
 void clearData()
          clear cached copy of linked Data
 void clearMaps()
          clear Vectors of ScalarMaps applying to this Data and of ConstantMaps; also clear other instance variables
 boolean equals(Object o)
          Indicates whether or not this instance is equal to an object
 Vector getConstantMaps()
           
 Data getData()
           
 DataReference getDataReference()
           
 float[] getDefaultValues()
           
 DisplayImpl getDisplay()
           
 DataRenderer getRenderer()
           
 Vector getScalarMaps()
           
 Vector getSelectedMapVector()
           
 ShadowType getShadow()
           
 MathType getType()
           
 boolean prepareData()
          Prepare to render data (include feasibility check);
 void setConstantMaps(ConstantMap[] constant_maps)
          Change ConstantMaps[] array specific to this DataDisplayLink Note this call should occur between display.disableAction() and display.enableAction() there are two ways for an application to get a DataDisplayLink: given a DisplayImpl and a DataReference: DataDisplayLink link = (DataDisplayLink) display.findReference(ref); given a DataRenderer (assuming it has only one DataReference): DataDisplayLink link = renderer.getLinks()[0];
 
Methods inherited from class visad.ReferenceActionLink
checkTicks, getAction, getLocalAction, getName, getThingReference, peekTicks, setTicks
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start_time

public long start_time
value of System.currentTimeMillis() when doTransform() started


time_flag

public boolean time_flag
flag indicating current doTransform() has taken more than 500 ms

Constructor Detail

DataDisplayLink

public DataDisplayLink(DataReference ref,
                       DisplayImpl local_d,
                       Display d,
                       ConstantMap[] constant_maps,
                       DataRenderer rend,
                       long jd)
                throws VisADException,
                       RemoteException
construct a DataDisplayLink linking a DataReference to a Display

Parameters:
ref - the DataReference to link
local_d - if d is DisplayImpl, then d; if d is RemoteDisplay, then its adapted DisplayImpl
d - the Display
constant_maps - array of ConstantMaps specific to this Data
rend - DataRenderer that creates Data depictions
jd - - unique ID among ReferenceActionLinks attached to Action
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred
Method Detail

setConstantMaps

public void setConstantMaps(ConstantMap[] constant_maps)
                     throws VisADException,
                            RemoteException
Change ConstantMaps[] array specific to this DataDisplayLink Note this call should occur between display.disableAction() and display.enableAction() there are two ways for an application to get a DataDisplayLink: given a DisplayImpl and a DataReference: DataDisplayLink link = (DataDisplayLink) display.findReference(ref); given a DataRenderer (assuming it has only one DataReference): DataDisplayLink link = renderer.getLinks()[0];

Parameters:
constant_maps - array of ConstantMaps specific to this Data
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

getDisplay

public DisplayImpl getDisplay()
Returns:
the local DisplayImpl for the linked Display

getRenderer

public DataRenderer getRenderer()
Returns:
the DataRenderer that creates Data depictions

getSelectedMapVector

public Vector getSelectedMapVector()
Returns:
a clone of Vector of ScalarMaps applying to this Data

addSelectedMapVector

public void addSelectedMapVector(ScalarMap map)
add a ScalarMap applying to this Data

Parameters:
map - ScalarMap to add

clearMaps

public void clearMaps()
               throws RemoteException,
                      VisADException
clear Vectors of ScalarMaps applying to this Data and of ConstantMaps; also clear other instance variables

Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

prepareData

public boolean prepareData()
                    throws VisADException,
                           RemoteException
Prepare to render data (include feasibility check);

Returns:
false if infeasible
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

getShadow

public ShadowType getShadow()
Returns:
ShadowType generated from MathType of linked Data

getData

public Data getData()
             throws VisADException,
                    RemoteException
Returns:
linked Data (note Data is cached until clearData() is called)
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

clearData

public void clearData()
clear cached copy of linked Data


getType

public MathType getType()
                 throws VisADException,
                        RemoteException
Returns:
MathType of linked Data
Throws:
VisADException - a VisAD error occurred
RemoteException - an RMI error occurred

getDefaultValues

public float[] getDefaultValues()
Returns:
default values for DisplayRealTypes

getDataReference

public DataReference getDataReference()
Returns:
linked DataReference

getConstantMaps

public Vector getConstantMaps()
Returns:
Vector of ConstantMaps specific to this Data

getScalarMaps

public Vector getScalarMaps()
Returns:
Vector of ScalarMaps that apply to this Data

equals

public boolean equals(Object o)
Indicates whether or not this instance is equal to an object

Overrides:
equals in class Object
Parameters:
o - the object in question.
Returns:
true if and only if this instance equals o.