Class RadarSweepControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, ControlListener, DisplayListener
Direct Known Subclasses:
RadarEditor.MyRadarSweepControl

public class RadarSweepControl extends ColorPlanViewControl
Class for making and controlling the display of color shaded plots of WSR-88D Level II radar sweeps in 2D or in 3D.
Version:
$Revision: 1.40 $
Author:
Unidata Development Team
  • Field Details

  • Constructor Details

    • RadarSweepControl

      public RadarSweepControl()
      Default constructor.
  • Method Details

    • setData

      protected boolean setData(DataChoice choice) throws VisADException, RemoteException
      Set the data in the control.
      Overrides:
      setData in class PlanViewControl
      Parameters:
      choice - data choice description
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • init

      public boolean init(DataChoice dataChoice) throws VisADException, RemoteException
      Call to help make this kind of Display Control; also calls code to made the Displayable (empty of data thus far). This method is called from inside DisplayControlImpl.init(several args).
      Overrides:
      init in class PlanViewControl
      Parameters:
      dataChoice - the DataChoice of the moment.
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getRequestProperties

      protected Hashtable getRequestProperties()
      Override the base class method that creates request properties and add in the appropriate 2d/3d request parameter.
      Overrides:
      getRequestProperties in class DisplayControlImpl
      Returns:
      table of properties
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      If we have a volume then we'll add in an angles choosing combobox.
      Overrides:
      getControlWidgets in class ColorPlanViewControl
      Parameters:
      controlWidgets - list of control widgets
      Throws:
      VisADException - VisAD error
      RemoteException - RMI error
    • receiveShareData

      public void receiveShareData(Sharable from, Object dataId, Object[] data)
      Method called by other classes that share the selector.
      Specified by:
      receiveShareData in interface Sharable
      Overrides:
      receiveShareData in class PlanViewControl
      Parameters:
      from - other class.
      dataId - type of sharing
      data - Array of data being shared. In this case, the first (and only?) object in the array is the level
    • shouldUseZPosition

      protected boolean shouldUseZPosition()
      Overwrite base class method to determine if the display and gui should have a Z position.
      Overrides:
      shouldUseZPosition in class PlanViewControl
      Returns:
      Should use z position
    • getLegendLabels

      public void getLegendLabels(List labels, int legendType)
      Override the base class method to include the station name, param type, and the elevation angle This is used to label the display legend and the gui box title
      Overrides:
      getLegendLabels in class PlanViewControl
      Parameters:
      labels - List to add labels to
      legendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
    • doMakeDataInstance

      protected DataInstance doMakeDataInstance(DataChoice dataChoice) throws RemoteException, VisADException
      Override the super class to set the initial level
      Overrides:
      doMakeDataInstance in class GridDisplayControl
      Parameters:
      dataChoice - the data choice to use
      Returns:
      the DataInstance
      Throws:
      RemoteException - Java RMI problem
      VisADException - unable to create the VisAD object
    • shouldShowZSelector

      protected boolean shouldShowZSelector()
      Dont show the z selector
      Overrides:
      shouldShowZSelector in class PlanViewControl
      Returns:
      false
    • setUse3D

      public void setUse3D(boolean value)
      Set the Use3D property.
      Parameters:
      value - The new value for Use3D
    • getUse3D

      public boolean getUse3D()
      Get the Use3D property.
      Returns:
      The Use3D
    • setCurrentAngle

      public void setCurrentAngle(double value)
      Set the CurrentAngle property.
      Parameters:
      value - The new value for CurrentAngle
    • getAllowSmoothing

      public boolean getAllowSmoothing()
      Get whether we can smooth this display
      Overrides:
      getAllowSmoothing in class ColorPlanViewControl
      Returns:
      false
    • getLevelsLabel

      public String getLevelsLabel()
      Get the label for the levels box.
      Overrides:
      getLevelsLabel in class PlanViewControl
      Returns:
      the label
    • getDataProjectionLabel

      protected String getDataProjectionLabel()
      Get the data projection label
      Overrides:
      getDataProjectionLabel in class PlanViewControl
      Returns:
      the data projection label
    • getCursorReadoutInner11

      protected List getCursorReadoutInner11(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception
      Get the cursor data
      Parameters:
      el - earth location
      animationValue - the animation value
      animationStep - the animation step
      samples - the list of samples
      Returns:
      the list of readout data
      Throws:
      Exception - problem getting the data
    • getBearing

      public ucar.unidata.geoloc.Bearing getBearing(LatLonPoint radarLocation, double lat, double lon)
    • canDoProgressiveResolution

      protected boolean canDoProgressiveResolution()
      Description copied from class: DisplayControlImpl
      Does this control support progressive resolution? Subclasses should override.
      Overrides:
      canDoProgressiveResolution in class GridDisplayControl
      Returns:
      _more_
    • doExport

      public void doExport(String what, String filename) throws Exception
      Export displayed data to file
      Overrides:
      doExport in class GridDisplayControl
      Parameters:
      what - type of data netcdf
      filename - To what file
      Throws:
      Exception - problem exporting