Package ucar.visad.display
Class RadarGrid
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.CompositeDisplayable
ucar.visad.display.RadarGrid
A class to support a standard radar grid display - range rings,
radials and labels.
- Version:
- $Revision: 1.25 $
- Author:
- IDV Development Team
-
Field Summary
Fields inherited from class ucar.visad.display.CompositeDisplayable
cnt, label
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a RadarGrid centered at specified lat/lonConstruct a RadarGrid centered at specified lat/lonRadarGrid
(LatLonPoint llp, Color color) Construct a RadarGrid centered at llp.RadarGrid
(LatLonPoint llp, Color color, Unit distUnit) Construct a RadarGrid centered at llp. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Get the latitude of the center of radar range rings.double
Get the longitude of the center of radar range rings.void
setAzimuthLineColor
(Color color) Set the color of the azimuth lines (radials).void
setAzimuthLinesVisible
(boolean visible) Set the visibility of the azimuth lines (radials)void
setCenterPoint
(double lat, double lon) Make a set of range rings and radials on this center location.void
Set the point to center the radar grid on.void
setCenterPointAndColors
(double lat, double lon, Color rrcolor, Color radcolor, Color lcolor) Set the center point and colors of the RadarGrid.void
Set the color of all part of the grid to one color.void
setDisplayUnit
(Unit newUnit) Sets the unit on all contained children.void
setDistanceUnit
(Unit newUnit) Set the distance unitvoid
Set the font on the labelsvoid
setLabelColor
(Color color) Set the color of the labelsvoid
setLabelLineWidth
(float width) Set the width of the labelsvoid
setLabelSize
(float size) Set the scaling size on the labels.void
setLabelSpacing
(double li) Set the spacing of radar range ring labels.void
setLabelsVisible
(boolean visible) Set the labels visiblevoid
setMaxRadius
(double radius) Set the maximum radius of radar range ringsvoid
setRadialInterval
(double inc) Set the interval of radials.void
setRadialLineWidth
(float width) Set the width of the labelsvoid
setRangeRingColor
(Color color) Set the color of the range rings.void
setRangeRingLineWidth
(float width) Set the width of the range ringsvoid
setRangeRingSpacing
(double spacing, double max) Set the spacing and max value of radar range rings distance from center.void
setRangeRingsVisible
(boolean visible) Set the visibility of the range rings.Methods inherited from class ucar.visad.display.CompositeDisplayable
addConstantMap, addDisplayable, addListDataListener, clearDisplayables, cloneForDisplay, debug, destroy, destroyAll, displayableCount, fireListDataContentsChanged, fireListDataIntervalAdded, fireListDataIntervalRemoved, getAnimationSet, getDisplayable, indexOf, iterator, lastDisplayable, myAddDataReferences, myRemoveDataReferences, removeDisplayable, removeDisplayable, removeListDataListener, setAdjustFlow, setColorPalette, setColorUnit, setConstantPosition, setDisplay, setDisplayable, setDisplayMaster, setLineWidth, setManipulable, setPointMode, setPointSize, setSelectedRange, setUseFastRendering, setUseTimesInAnimation, setVisible, setVisible, setVisible, toFront, toString
Methods inherited from class ucar.visad.display.Displayable
addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, hasDataObject, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setColorPalette, setContourInfo, setDisplayActive, setDisplayInactive, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange
-
Constructor Details
-
RadarGrid
Construct a RadarGrid centered at llp.- Parameters:
llp
- center pointcolor
- color for the grid- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
RadarGrid
public RadarGrid(LatLonPoint llp, Color color, Unit distUnit) throws VisADException, RemoteException Construct a RadarGrid centered at llp.- Parameters:
llp
- center pointcolor
- color for the griddistUnit
- distance unit- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
RadarGrid
Construct a RadarGrid centered at specified lat/lon- Parameters:
lat
- center point latitude (degrees)lon
- center point longitude (degrees)color
- color for the grid- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
RadarGrid
public RadarGrid(double lat, double lon, Color color, Unit distUnit) throws VisADException, RemoteException Construct a RadarGrid centered at specified lat/lon- Parameters:
lat
- center point latitude (degrees)lon
- center point longitude (degrees)color
- color for the griddistUnit
- distance unit- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
-
Method Details
-
setColor
Set the color of all part of the grid to one color.- Overrides:
setColor
in classCompositeDisplayable
- Parameters:
color
- color to use- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
setAzimuthLineColor
Set the color of the azimuth lines (radials).- Parameters:
color
- color to use- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
setRangeRingColor
Set the color of the range rings.- Parameters:
color
- color to use- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
setLabelColor
Set the color of the labels- Parameters:
color
- Color for labels- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setLabelLineWidth
Set the width of the labels- Parameters:
width
- width in pixels- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setRangeRingLineWidth
Set the width of the range rings- Parameters:
width
- width in pixels- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setRadialLineWidth
Set the width of the labels- Parameters:
width
- width in pixels- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setAzimuthLinesVisible
Set the visibility of the azimuth lines (radials)- Parameters:
visible
- true to show- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
setRangeRingsVisible
Set the visibility of the range rings.- Parameters:
visible
- true to show- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
setLabelsVisible
Set the labels visible- Parameters:
visible
- true to show the labels- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setCenterPoint
Set the point to center the radar grid on.- Parameters:
llp
- new point to center on.- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setCenterPoint
Make a set of range rings and radials on this center location. color is implicit from class member data set elsewhere as in cstr.- Parameters:
lat
- in degreeslon
- in degrees east- Throws:
RemoteException
VisADException
-
setCenterPointAndColors
public void setCenterPointAndColors(double lat, double lon, Color rrcolor, Color radcolor, Color lcolor) throws VisADException, RemoteException Set the center point and colors of the RadarGrid.- Parameters:
lat
- latitude (degrees)lon
- longitude (degrees)rrcolor
- range ring colorradcolor
- radial colorlcolor
- label color- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
getCenterLatitude
public double getCenterLatitude()Get the latitude of the center of radar range rings.- Returns:
- the center latitude (in degrees)
-
getCenterLongitude
public double getCenterLongitude()Get the longitude of the center of radar range rings.- Returns:
- the center longitude (in degrees)
-
setRangeRingSpacing
Set the spacing and max value of radar range rings distance from center.- Parameters:
spacing
- in kilometersmax
- max radius in kilometers- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setMaxRadius
Set the maximum radius of radar range rings- Parameters:
radius
- in kilometers- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setLabelSpacing
Set the spacing of radar range ring labels.- Parameters:
li
- label increment in kilometers- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setRadialInterval
Set the interval of radials.- Parameters:
inc
- angular degrees separation of radials- Throws:
RemoteException
- Java RMI errorVisADException
- problem creating VisAD object
-
setLabelSize
public void setLabelSize(float size) Set the scaling size on the labels.- Parameters:
size
- scaling size (0 - 1)
-
setFont
Set the font on the labels- Parameters:
f
- The font- Throws:
VisADException
- VisAD errorRemoteException
- remote error
-
setDisplayUnit
Description copied from class:CompositeDisplayable
Sets the unit on all contained children.- Overrides:
setDisplayUnit
in classCompositeDisplayable
- Parameters:
newUnit
- The display unit to use.- Throws:
VisADException
- if a VisADFailure occurs.RemoteException
- if a Java RMI failure occurs.
-
setDistanceUnit
Set the distance unit- Parameters:
newUnit
- the new Unit- Throws:
RemoteException
- Java RMI errorVisADException
- unit not a distance unit
-