visad
Class FlowControl
- java.lang.Object
-
- visad.Control
-
- visad.FlowControl
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- Flow1Control, Flow2Control
public abstract class FlowControl extends Control
FlowControl is the VisAD abstract super-class for controlling Flow display scalars.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static intNH_ORIENTATIONNorthern Hemisphere orientation for wind barbsstatic intSH_ORIENTATIONSouthern Hemisphere orientation for wind barbs
-
Constructor Summary
Constructors Constructor and Description FlowControl(DisplayImpl d)Create a FlowControl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()Clone this control.voidenableStreamlines(boolean flag)Enable/disable showing vectors as streamlinesvoidenableTrajectory(boolean flag)Enable/disable showing vectors as trajectoriesvoidenableTrajectory(boolean flag, TrajectoryParams tparms)Enable/disable showing vectors as trajectoriesbooleanequals(java.lang.Object o)See if this control equals anotherbooleangetAdjustFlowToEarth()Get barb orientation for wind barbsfloatgetArrowScale()Get the streamline arrow scalebooleangetAutoScale()Get whether the vector/barb size should scale with display zoom.intgetBarbOrientation()Get barb orientation for wind barbsfloatgetFlowScale()Get scale length for flow vectorsjava.lang.StringgetSaveString()Get a string that can be used to reconstruct this control laterfloatgetStepFactor()Get the streamline step factorfloatgetStreamlineDensity()Get the streamline density factor.floatgetStreamlinePacking()Get the streamline packing valuefloatgetStreamlineReduction()Get the streamline reduction valuefloat[]getStreamlineSmoothing()Get the streamline smoothing valueTrajectoryParamsgetTrajectoryParams()voidnullControl()Null the control.voidsetAdjustFlowToEarth(boolean adjust)Get whether values should be adjusted to the earthvoidsetArrowScale(float arrowScale)Set the streamline arrow sizevoidsetAutoScale(boolean auto)Set whether the vector/barb size should scale with display zoom.voidsetBarbOrientation(int orientation)Set barb orientation for wind barbs (default is southern hemisphere)voidsetFlowScale(float scale)Set scale length for flow vectors (default is 0.02f)voidsetSaveString(java.lang.String save)Reconstruct this control using the specified save stringvoidsetStepFactor(float stepFactor)Set the streamline step factorvoidsetStreamlineDensity(float density)Set the streamline densityvoidsetStreamlinePacking(float packing)Set the streamline packingvoidsetStreamlineReduction(float reduction)Set the streamline reductionvoidsetStreamlineSmoothing(float cntrWeight, int n_pass)Set the streamline smoothingvoidsetTrajectoryParams(TrajectoryParams trajParams)booleanstreamlinesEnabled()Get the status of streamlinesvoidsyncControl(Control rmt)Copy the state of a remote control to this controlbooleantrajectoryEnabled()Get the status of streamlines-
Methods inherited from class visad.Control
addControlListener, animation_string, changeControl, checkTicks, getDisplay, getDisplayRenderer, getInstanceNumber, incTick, peekTicks, removeControlListener, resetTicks, setTicks, subCheckTicks, subPeekTicks, subResetTicks, subSetTicks, toString
-
-
-
-
Field Detail
-
NH_ORIENTATION
public static final int NH_ORIENTATION
Northern Hemisphere orientation for wind barbs- See Also:
- Constant Field Values
-
SH_ORIENTATION
public static final int SH_ORIENTATION
Southern Hemisphere orientation for wind barbs- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FlowControl
public FlowControl(DisplayImpl d)
Create a FlowControl- Parameters:
d- DisplayImpl that this is associated with.
-
-
Method Detail
-
setFlowScale
public void setFlowScale(float scale) throws VisADException, java.rmi.RemoteExceptionSet scale length for flow vectors (default is 0.02f)- Parameters:
scale- new scale- Throws:
VisADExceptionjava.rmi.RemoteException
-
getFlowScale
public float getFlowScale()
Get scale length for flow vectors- Returns:
- scale length for flow vectors
-
setBarbOrientation
public void setBarbOrientation(int orientation) throws VisADException, java.rmi.RemoteExceptionSet barb orientation for wind barbs (default is southern hemisphere)- Parameters:
orientation- wind barb orientation (NH_ORIENTATION or SH_ORIENTATION);- Throws:
VisADExceptionjava.rmi.RemoteException
-
getBarbOrientation
public int getBarbOrientation()
Get barb orientation for wind barbs- Returns:
- orientation (false = northern hemisphere)
-
setAdjustFlowToEarth
public void setAdjustFlowToEarth(boolean adjust) throws VisADException, java.rmi.RemoteExceptionGet whether values should be adjusted to the earth- Parameters:
adjust- true to adjust- Throws:
VisADException- problem setting the valuejava.rmi.RemoteException- problem setting the value on remote system
-
getAdjustFlowToEarth
public boolean getAdjustFlowToEarth()
Get barb orientation for wind barbs- Returns:
- orientation (false = northern hemisphere)
-
enableStreamlines
public void enableStreamlines(boolean flag) throws VisADException, java.rmi.RemoteExceptionEnable/disable showing vectors as streamlines- Parameters:
flag- true to display as streamlines- Throws:
VisADException- problem enabling the streamlinesjava.rmi.RemoteException- problem enabling the streamlines on remote system
-
enableTrajectory
public void enableTrajectory(boolean flag) throws VisADException, java.rmi.RemoteExceptionEnable/disable showing vectors as trajectories- Parameters:
flag- true to display as trajectories- Throws:
VisADException- problem enabling the trajectoriesjava.rmi.RemoteException- problem enabling the trajectories on remote system
-
enableTrajectory
public void enableTrajectory(boolean flag, TrajectoryParams tparms) throws VisADException, java.rmi.RemoteExceptionEnable/disable showing vectors as trajectories- Parameters:
flag- true to display as trajectoriestparms- TrajectoryParams to apply. Cannot be null- Throws:
VisADException- problem enabling the trajectoriesjava.rmi.RemoteException- problem enabling the trajectories on remote system
-
setStreamlineDensity
public void setStreamlineDensity(float density) throws VisADException, java.rmi.RemoteExceptionSet the streamline density- Parameters:
density- the density value- Throws:
VisADException- problem setting the densityjava.rmi.RemoteException- problem setting the density on remote system
-
setArrowScale
public void setArrowScale(float arrowScale) throws VisADException, java.rmi.RemoteExceptionSet the streamline arrow size- Parameters:
arrowScale- the streamline arrow size- Throws:
VisADException- problem setting the arrow scalejava.rmi.RemoteException- problem setting the arrow scale on remote system
-
setStepFactor
public void setStepFactor(float stepFactor) throws VisADException, java.rmi.RemoteExceptionSet the streamline step factor- Parameters:
stepFactor- the streamline step factor- Throws:
VisADException- problem setting the step factorjava.rmi.RemoteException- problem setting the step factor on remote system
-
setStreamlinePacking
public void setStreamlinePacking(float packing) throws VisADException, java.rmi.RemoteExceptionSet the streamline packing- Parameters:
packing- the streamline packing- Throws:
VisADException- problem setting the packingjava.rmi.RemoteException- problem setting the packing on remote system
-
setStreamlineSmoothing
public void setStreamlineSmoothing(float cntrWeight, int n_pass) throws VisADException, java.rmi.RemoteExceptionSet the streamline smoothing- Parameters:
cntrWeight- the center weightn_pass- number of smoothing passes- Throws:
VisADException- problem setting the smoothingjava.rmi.RemoteException- problem setting the smoothing on remote system
-
setStreamlineReduction
public void setStreamlineReduction(float reduction) throws VisADException, java.rmi.RemoteExceptionSet the streamline reduction- Parameters:
reduction- the streamline reduction- Throws:
VisADException- problem setting the reductionjava.rmi.RemoteException- problem setting the reduction on remote system
-
streamlinesEnabled
public boolean streamlinesEnabled()
Get the status of streamlines- Returns:
- true if streamlines are enabled.
-
trajectoryEnabled
public boolean trajectoryEnabled()
Get the status of streamlines- Returns:
- true if streamlines are enabled.
-
getTrajectoryParams
public TrajectoryParams getTrajectoryParams()
-
setTrajectoryParams
public void setTrajectoryParams(TrajectoryParams trajParams) throws VisADException, java.rmi.RemoteException
- Throws:
VisADExceptionjava.rmi.RemoteException
-
getStreamlineDensity
public float getStreamlineDensity()
Get the streamline density factor.- Returns:
- the streamline density factor.
-
getArrowScale
public float getArrowScale()
Get the streamline arrow scale- Returns:
- the streamline arrow scale
-
getStepFactor
public float getStepFactor()
Get the streamline step factor- Returns:
- the streamline step factor
-
getStreamlinePacking
public float getStreamlinePacking()
Get the streamline packing value- Returns:
- the streamline packing value
-
getStreamlineSmoothing
public float[] getStreamlineSmoothing()
Get the streamline smoothing value- Returns:
- the streamline smoothing value
-
getStreamlineReduction
public float getStreamlineReduction()
Get the streamline reduction value- Returns:
- the streamline reduction value
-
getSaveString
public java.lang.String getSaveString()
Get a string that can be used to reconstruct this control later- Specified by:
getSaveStringin classControl- Returns:
- a 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 VisADExceptionSet whether the vector/barb size should scale with display zoom.- Parameters:
auto- true to enable autoscaling.- Throws:
VisADException- problem setting the autoscaling
-
getAutoScale
public boolean getAutoScale()
Get whether the vector/barb size should scale with display zoom.- Returns:
- true if autoscaling is enabled.
-
nullControl
public void nullControl()
Null the control. Override superclass to remove the autoscaling listener.- Overrides:
nullControlin classControl
-
equals
public boolean equals(java.lang.Object o)
See if this control equals another
-
-
DMelt 3.0 © DataMelt by jWork.ORG