visad
Class DataDisplayLink
- java.lang.Object
-
- visad.ReferenceActionLink
-
- 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
Fields Modifier and Type Field and Description longstart_timevalue of System.currentTimeMillis() when doTransform() startedbooleantime_flagflag indicating current doTransform() has taken more than 500 ms
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddSelectedMapVector(ScalarMap map)add a ScalarMap applying to this DatavoidclearData()clear cached copy of linked DatavoidclearMaps()clear Vectors of ScalarMaps applying to this Data and of ConstantMaps; also clear other instance variablesbooleanequals(java.lang.Object o)Indicates whether or not this instance is equal to an objectjava.util.VectorgetConstantMaps()DatagetData()DataReferencegetDataReference()float[]getDefaultValues()DisplayImplgetDisplay()DataRenderergetRenderer()java.util.VectorgetScalarMaps()java.util.VectorgetSelectedMapVector()ShadowTypegetShadow()MathTypegetType()booleanprepareData()Prepare to render data (include feasibility check);voidsetConstantMaps(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
-
-
-
-
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, java.rmi.RemoteException
construct a DataDisplayLink linking a DataReference to a Display- Parameters:
ref- the DataReference to linklocal_d- if d is DisplayImpl, then d; if d is RemoteDisplay, then its adapted DisplayImpld- the Displayconstant_maps- array of ConstantMaps specific to this Datarend- DataRenderer that creates Data depictionsjd- - unique ID among ReferenceActionLinks attached to Action- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
-
Method Detail
-
setConstantMaps
public void setConstantMaps(ConstantMap[] constant_maps) throws VisADException, java.rmi.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 occurredjava.rmi.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 java.util.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 java.rmi.RemoteException, VisADExceptionclear Vectors of ScalarMaps applying to this Data and of ConstantMaps; also clear other instance variables- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
prepareData
public boolean prepareData() throws VisADException, java.rmi.RemoteExceptionPrepare to render data (include feasibility check);- Returns:
- false if infeasible
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
getShadow
public ShadowType getShadow()
- Returns:
- ShadowType generated from MathType of linked Data
-
getData
public Data getData() throws VisADException, java.rmi.RemoteException
- Returns:
- linked Data (note Data is cached until clearData() is called)
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
clearData
public void clearData()
clear cached copy of linked Data
-
getType
public MathType getType() throws VisADException, java.rmi.RemoteException
- Returns:
- MathType of linked Data
- Throws:
VisADException- a VisAD error occurredjava.rmi.RemoteException- an RMI error occurred
-
getDefaultValues
public float[] getDefaultValues()
- Returns:
- default values for DisplayRealTypes
-
getDataReference
public DataReference getDataReference()
- Returns:
- linked DataReference
-
getConstantMaps
public java.util.Vector getConstantMaps()
- Returns:
- Vector of ConstantMaps specific to this Data
-
getScalarMaps
public java.util.Vector getScalarMaps()
- Returns:
- Vector of ScalarMaps that apply to this Data
-
equals
public boolean equals(java.lang.Object o)
Indicates whether or not this instance is equal to an object- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the object in question.- Returns:
trueif and only if this instance equals o.
-
-
DMelt 3.0 © DataMelt by jWork.ORG