Package ucar.visad.display
Class FrontDrawer
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.DisplayableData
ucar.visad.display.FrontDrawer
FrontDrawer is the VisAD class for manipulation of fronts. Is was originally
taken from the class visad.bom.FrontDrawer
-
Nested Class Summary
Nested classes/interfaces inherited from class ucar.visad.display.DisplayableData
DisplayableData.DragAdapter -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubledefault base scalestatic final String[]base type to usestatic final String[]labels for typesstatic final Stringidentifier for cold frontstatic final Stringidentifier for convergencestatic final Stringidentifier for dry linestatic final Stringidentifier for frontogenesisstatic final Stringidentifier for frontolysisstatic final Stringidentifier for isothermsstatic final Stringidentifier for lifted indexstatic final Stringidentifier for low level jetstatic final Stringidentifier for lower level thermal troughstatic final Stringidentifier for moisturestatic final Stringidentifier for occluded frontstatic final Stringidentifier for ridgestatic final Stringidentifier for stationary frontstatic final Stringidentifier for thickness ridgestatic final Stringidentifier for total-totalsstatic final Stringidentifier for troughstatic final Stringidentifier for uneven low level jetstatic final Stringidentifier for upper cold frontstatic final Stringidentifier for upper level jetstatic final Stringidentifier for upper level thermal troughstatic final Stringidentifier for upper warm frontstatic final Stringidentifier for warm frontstatic final Stringidentifier for wave linestatic final String[]all typesFields inherited from class ucar.visad.display.DisplayableData
LINE_WIDTH, MANIPULABLE, renderer, VISIBLEFields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET -
Constructor Summary
ConstructorsConstructorDescriptionFrontDrawer(int fw, String frontType) Create a front drawer with the front typeFrontDrawer(int fw, String frontType, boolean doColors) Create a front drawer with the front typeFrontDrawer(FrontDrawer that) Create a front drawer from another instance -
Method Summary
Modifier and TypeMethodDescriptionClone for displaystatic floatcurveLength(float[][] curve, float[] seg_length) Get the curve length; assumes curve is float[2][len] and seg_length is float[len-1]booleanGet the FlipTheFlip property.static StringGet the label for the typevoidInitialize the lat/lon scalar mapsmakeFront(float[][] curve_samples) Make the frontstatic float[][]resample_curve(float[][] curve, float increment) Resample curve into segments approximately increment in lengthrobustCurveToFront(float[][] curve, boolean flip) Robustly make a curve to a frontvoidSets the color of the lines for this Displayable.voidSet the curveprotected voidsetDisplayMaster(DisplayMaster master) Set the display mastervoidsetFlipTheFlip(boolean value) Set the FlipTheFlip property.voidsetFrontType(String type) Set the front typevoidsetLineWidth(float lineWidth) Set the line widthvoidsetScale(double baseScale) Set the scalestatic float[][]smooth_curve(float[][] curve, int window) Smooth the curveMethods inherited from class ucar.visad.display.DisplayableData
addAction, dataChange, destroy, getActive, getAnimationSet, getData, getDataRenderer, getLineWidth, getName, getPointSize, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setDragAdapter, setManipulable, setPickable, setPointMode, setPointSize, setUseFastRendering, setVisible, showme, toStringMethods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
-
Field Details
-
TYPE_COLD_FRONT
identifier for cold front- See Also:
-
TYPE_WARM_FRONT
identifier for warm front- See Also:
-
TYPE_OCCLUDED_FRONT
identifier for occluded front- See Also:
-
TYPE_STATIONARY_FRONT
identifier for stationary front- See Also:
-
TYPE_CONVERGENCE
identifier for convergence- See Also:
-
TYPE_FRONTOGENESIS
identifier for frontogenesis- See Also:
-
TYPE_FRONTOLYSIS
identifier for frontolysis- See Also:
-
TYPE_UPPER_COLD_FRONT
identifier for upper cold front- See Also:
-
TYPE_UPPER_WARM_FRONT
identifier for upper warm front- See Also:
-
TYPE_TROUGH
identifier for trough- See Also:
-
TYPE_RIDGE
identifier for ridge- See Also:
-
TYPE_MOISTURE
identifier for moisture- See Also:
-
TYPE_LOW_LEVEL_JET
identifier for low level jet- See Also:
-
TYPE_UPPER_LEVEL_JET
identifier for upper level jet- See Also:
-
TYPE_DRY_LINE
identifier for dry line- See Also:
-
TYPE_WAVE_LINE
identifier for wave line- See Also:
-
TYPE_TOTAL_TOTALS
identifier for total-totals- See Also:
-
TYPE_LIFTED_INDEX
identifier for lifted index- See Also:
-
TYPE_ISOTHERMS
identifier for isotherms- See Also:
-
TYPE_THICKNESS_RIDGE
identifier for thickness ridge- See Also:
-
TYPE_LOWER_THERMAL_TROUGH
identifier for lower level thermal trough- See Also:
-
TYPE_UPPER_THERMAL_TROUGH
identifier for upper level thermal trough- See Also:
-
TYPE_UNEVEN_LOW_LEVEL_JET
identifier for uneven low level jet- See Also:
-
BASETYPES
base type to use -
TYPES
all types -
LABELS
labels for types -
baseScale
public double baseScaledefault base scale
-
-
Constructor Details
-
FrontDrawer
Create a front drawer with the front type- Parameters:
fw- window idfrontType- front type- Throws:
RemoteException- On badnessVisADException- On badness
-
FrontDrawer
public FrontDrawer(int fw, String frontType, boolean doColors) throws VisADException, RemoteException Create a front drawer with the front type- Parameters:
fw- window idfrontType- front typedoColors- true to use colors- Throws:
RemoteException- On badnessVisADException- On badness
-
FrontDrawer
Create a front drawer from another instance- Parameters:
that- the other instance- Throws:
RemoteException- On badnessVisADException- On badness
-
-
Method Details
-
setColor
Sets the color of the lines for this Displayable.- Overrides:
setColorin classDisplayable- Parameters:
color- color for the line.- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
setLineWidth
Set the line width- Overrides:
setLineWidthin classDisplayableData- Parameters:
lineWidth- the line width- Throws:
RemoteException- On badnessVisADException- On badness
-
cloneForDisplay
Clone for display- Overrides:
cloneForDisplayin classDisplayableData- Returns:
- return a clone
- Throws:
RemoteException- On badnessVisADException- On badness
-
setScale
Set the scale- Parameters:
baseScale- the base scale- Throws:
RemoteException- On badnessVisADException- On badness
-
getLabel
Get the label for the type- Parameters:
type- the type- Returns:
- the label
-
setFrontType
Set the front type- Parameters:
type- the type- Throws:
RemoteException- On badnessVisADException- On badness
-
setDisplayMaster
Set the display master- Overrides:
setDisplayMasterin classDisplayable- Parameters:
master- the display master- Throws:
RemoteException- On badnessVisADException- On badness
-
setCurve
Set the curve- Parameters:
curve- the curve coordinatescurveTimes- the curve times- Throws:
RemoteException- On badnessVisADException- On badness
-
initLatLonMap
Initialize the lat/lon scalar maps- Throws:
RemoteException- On badnessVisADException- On badness
-
makeFront
Make the front- Parameters:
curve_samples- the front samples (coords,rgb)- Returns:
- a FieldImpl of the front
- Throws:
RemoteException- On badnessVisADException- On badness
-
robustCurveToFront
Robustly make a curve to a front- Parameters:
curve- the curveflip- true to flip the pips- Returns:
- the resulting front as a FieldImpl
- Throws:
RemoteException- On badness
-
smooth_curve
public static float[][] smooth_curve(float[][] curve, int window) Smooth the curve- Parameters:
curve- the curvewindow- the window id- Returns:
- a smoothed curve
-
resample_curve
public static float[][] resample_curve(float[][] curve, float increment) Resample curve into segments approximately increment in length- Parameters:
curve- the curveincrement- the increment- Returns:
- the resampled curve
-
curveLength
public static float curveLength(float[][] curve, float[] seg_length) Get the curve length; assumes curve is float[2][len] and seg_length is float[len-1]- Parameters:
curve- the curveseg_length- the segment lengths- Returns:
- the length of the curve
-
setFlipTheFlip
public void setFlipTheFlip(boolean value) Set the FlipTheFlip property. If true then this flips the orientation of the front- Parameters:
value- The new value for FlipTheFlip
-
getFlipTheFlip
public boolean getFlipTheFlip()Get the FlipTheFlip property.- Returns:
- The FlipTheFlip
-