ucar.visad.display
Class RadarGrid

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.CompositeDisplayable
          extended by ucar.visad.display.RadarGrid

public class RadarGrid
extends CompositeDisplayable

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
RadarGrid(double lat, double lon, Color color)
          Construct a RadarGrid centered at specified lat/lon
RadarGrid(LatLonPoint llp, Color color)
          Construct a RadarGrid centered at llp.
 
Method Summary
 double getCenterLatitude()
          Get the latitude of the center of radar range rings.
 double getCenterLongitude()
          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 setCenterPoint(LatLonPoint llp)
          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 setColor(Color color)
          Set the color of all part of the grid to one color.
 void setFont(Font f)
          Set the font on the labels
 void setLabelColor(Color color)
          Set the color of the labels
 void setLabelLineWidth(float width)
          Set the width of the labels
 void 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 visible
 void setMaxRadius(double radius)
          Set the maximum radius of radar range rings
 void setRadialInterval(double inc)
          Set the interval of radials.
 void setRadialLineWidth(float width)
          Set the width of the labels
 void setRangeRingColor(Color color)
          Set the color of the range rings.
 void setRangeRingLineWidth(float width)
          Set the width of the range rings
 void 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, setDisplayUnit, setLineWidth, 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, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RadarGrid

public RadarGrid(LatLonPoint llp,
                 Color color)
          throws VisADException,
                 RemoteException
Construct a RadarGrid centered at llp.

Parameters:
llp - center point
color - color for the grid
Throws:
VisADException - VisAD error
RemoteException - remote error

RadarGrid

public RadarGrid(double lat,
                 double lon,
                 Color color)
          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 grid
Throws:
VisADException - VisAD error
RemoteException - remote error
Method Detail

setColor

public void setColor(Color color)
              throws VisADException,
                     RemoteException
Set the color of all part of the grid to one color.

Overrides:
setColor in class CompositeDisplayable
Parameters:
color - color to use
Throws:
VisADException - VisAD error
RemoteException - remote error

setAzimuthLineColor

public void setAzimuthLineColor(Color color)
                         throws VisADException,
                                RemoteException
Set the color of the azimuth lines (radials).

Parameters:
color - color to use
Throws:
VisADException - VisAD error
RemoteException - remote error

setRangeRingColor

public void setRangeRingColor(Color color)
                       throws VisADException,
                              RemoteException
Set the color of the range rings.

Parameters:
color - color to use
Throws:
VisADException - VisAD error
RemoteException - remote error

setLabelColor

public void setLabelColor(Color color)
                   throws VisADException,
                          RemoteException
Set the color of the labels

Parameters:
color - Color for labels
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setLabelLineWidth

public void setLabelLineWidth(float width)
                       throws VisADException,
                              RemoteException
Set the width of the labels

Parameters:
width - width in pixels
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setRangeRingLineWidth

public void setRangeRingLineWidth(float width)
                           throws VisADException,
                                  RemoteException
Set the width of the range rings

Parameters:
width - width in pixels
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setRadialLineWidth

public void setRadialLineWidth(float width)
                        throws VisADException,
                               RemoteException
Set the width of the labels

Parameters:
width - width in pixels
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setAzimuthLinesVisible

public void setAzimuthLinesVisible(boolean visible)
                            throws VisADException,
                                   RemoteException
Set the visibility of the azimuth lines (radials)

Parameters:
visible - true to show
Throws:
VisADException - VisAD error
RemoteException - remote error

setRangeRingsVisible

public void setRangeRingsVisible(boolean visible)
                          throws VisADException,
                                 RemoteException
Set the visibility of the range rings.

Parameters:
visible - true to show
Throws:
VisADException - VisAD error
RemoteException - remote error

setLabelsVisible

public void setLabelsVisible(boolean visible)
                      throws VisADException,
                             RemoteException
Set the labels visible

Parameters:
visible - true to show the labels
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setCenterPoint

public void setCenterPoint(LatLonPoint llp)
                    throws VisADException,
                           RemoteException
Set the point to center the radar grid on.

Parameters:
llp - new point to center on.
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setCenterPoint

public void setCenterPoint(double lat,
                           double lon)
                    throws VisADException,
                           RemoteException
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 degrees
lon - 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 color
radcolor - radial color
lcolor - label color
Throws:
RemoteException - Java RMI error
VisADException - 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

public void setRangeRingSpacing(double spacing,
                                double max)
                         throws VisADException,
                                RemoteException
Set the spacing and max value of radar range rings distance from center.

Parameters:
spacing - in kilometers
max - max radius in kilometers
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setMaxRadius

public void setMaxRadius(double radius)
                  throws VisADException,
                         RemoteException
Set the maximum radius of radar range rings

Parameters:
radius - in kilometers
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setLabelSpacing

public void setLabelSpacing(double li)
                     throws VisADException,
                            RemoteException
Set the spacing of radar range ring labels.

Parameters:
li - label increment in kilometers
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setRadialInterval

public void setRadialInterval(double inc)
                       throws VisADException,
                              RemoteException
Set the interval of radials.

Parameters:
inc - angular degrees separation of radials
Throws:
RemoteException - Java RMI error
VisADException - problem creating VisAD object

setLabelSize

public void setLabelSize(float size)
Set the scaling size on the labels.

Parameters:
size - scaling size (0 - 1)

setFont

public void setFont(Font f)
             throws VisADException,
                    RemoteException
Set the font on the labels

Parameters:
f - The font
Throws:
VisADException - VisAD error
RemoteException - remote error