visad
Class ShapeControl
- java.lang.Object
-
- visad.Control
-
- visad.ShapeControl
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class ShapeControl extends Control
ShapeControl is the VisAD class for controlling Shape display scalars.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ShapeControl(DisplayImpl d)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()booleanequals(java.lang.Object o)Indicates whether or not this instance equals an Objectjava.lang.StringgetSaveString()get a string that can be used to reconstruct this control laterfloatgetScale()VisADGeometryArray[]getShapes(float[] values)voidnullControl()end this control (called by ScalarMap.nullDisplay())voidsetAutoScale(boolean auto)voidsetSaveString(java.lang.String save)reconstruct this control using the specified save stringvoidsetScale(float s)voidsetShape(int index, VisADGeometryArray shape)set the shape associated with index; the VisADGeometryArray class hierarchy defines various kinds of shapesvoidsetShapes(VisADGeometryArray[] shs)Sets the array of shapes.voidsetShapeSet(SimpleSet set)Sets the SimpleSet that defines the mapping from RealType values to indices into an array of shapes.voidsyncControl(Control rmt)copy the state of a remote control to this control-
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, toString
-
-
-
-
Constructor Detail
-
ShapeControl
public ShapeControl(DisplayImpl d)
-
-
Method Detail
-
setShapeSet
public void setShapeSet(SimpleSet set) throws VisADException, java.rmi.RemoteException
Sets the SimpleSet that defines the mapping from RealType values to indices into an array of shapes. This method must be called before the setShapes() method to avoid a subsequent NullPointerException in the running of the display.- Parameters:
set- 1-D set of values that defines the mapping from RealType values to indices into the array of shapes. The domain dimension shall be 1.- Throws:
VisADExceptionjava.rmi.RemoteException
-
setShape
public void setShape(int index, VisADGeometryArray shape) throws VisADException, java.rmi.RemoteExceptionset the shape associated with index; the VisADGeometryArray class hierarchy defines various kinds of shapes- Throws:
VisADExceptionjava.rmi.RemoteException
-
setShapes
public void setShapes(VisADGeometryArray[] shs) throws VisADException, java.rmi.RemoteException
Sets the array of shapes. The array is accessed by index determined from the value-to-index mapping established by thesetShapeSet()method. The VisADGeometryArray class hierarchy defines various kinds of shapes. This method must be called after the setShapeSet() method to avoid a subsequent NullPointerException in the running of the display.- Parameters:
shs- The array of shapes.- Throws:
VisADExceptionjava.rmi.RemoteException
-
getShapes
public VisADGeometryArray[] getShapes(float[] values) throws VisADException
- Throws:
VisADException
-
setScale
public void setScale(float s) throws VisADException, java.rmi.RemoteException- Throws:
VisADExceptionjava.rmi.RemoteException
-
getScale
public float getScale()
-
getSaveString
public java.lang.String getSaveString()
get a string that can be used to reconstruct this control later- Specified by:
getSaveStringin classControl- Returns:
- String representation of this Control
-
setSaveString
public void setSaveString(java.lang.String save) throws VisADException, java.rmi.RemoteExceptionreconstruct this control using the specified save string- Specified by:
setSaveStringin classControl- Parameters:
save- - String representation for reconstruction- Throws:
VisADException- if a VisAD error occursjava.rmi.RemoteException- if an RMI error occurs
-
syncControl
public void syncControl(Control rmt) throws VisADException
copy the state of a remote control to this control- Specified by:
syncControlin classControl- Parameters:
rmt- remote Control whose state is copied- Throws:
VisADException- if a VisAD error occurs
-
setAutoScale
public void setAutoScale(boolean auto) throws VisADException- Throws:
VisADException
-
nullControl
public void nullControl()
Description copied from class:Controlend this control (called by ScalarMap.nullDisplay())- Overrides:
nullControlin classControl
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:ControlIndicates whether or not this instance equals an Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG