Class ColorRhiControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, DisplayControl, Prototypable, DisplayableData.DragAdapter, ControlListener, DisplayListener

public class ColorRhiControl extends ColorCrossSectionControl
Class to make displays and controls for a pseudo-RHI plot of WSR-88D Level II data. Also makes a control, a JFrame with gui controls of the RHI, and with a 2D display of the same RHI.
Version:
$Revision: 1.64 $
Author:
IDV Development Team
  • Field Details

    • beamAz

      protected float beamAz
      the beam azimuth
    • autorotateOn

      protected boolean autorotateOn
      flag for auto rotations
    • stationLabel

      protected JLabel stationLabel
      the station label
  • Constructor Details

    • ColorRhiControl

      public ColorRhiControl()
      Default constructor. Sets the appropriate attribute flags to determine what gui objects appear in the control window.
  • Method Details

    • initDone

      public void initDone()
      Called after all initialization is finished. Labels plot in control window. Loads data in displays.
      Overrides:
      initDone in class CrossSectionControl
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Handle property change
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class CrossSectionControl
      Parameters:
      evt - The event
    • setData

      protected boolean setData(DataChoice choice) throws VisADException, RemoteException
      Set the data in the control
      Overrides:
      setData in class CrossSectionControl
      Parameters:
      choice - choice representing the data
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • getCrossSectionViewLabel

      protected String getCrossSectionViewLabel()
      Get the label for the CrossSectionView
      Overrides:
      getCrossSectionViewLabel in class CrossSectionControl
      Returns:
      return the name of the cross section view
    • updateCenterPoint

      protected void updateCenterPoint() throws VisADException, RemoteException
      Update the center point location
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • crossSectionChanged

      public void crossSectionChanged()
      Load or reload data for a RHI selector line which has moved.
      Overrides:
      crossSectionChanged in class CrossSectionControl
    • centerLinePosition

      protected void centerLinePosition() throws VisADException, RemoteException
      Put one end of the rhi control line on the radar position (centered); leave other end where it is.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • autorotateLine

      protected void autorotateLine()
      argument to runAuto ensures each thread has an id
    • resetBeamAz

      public void resetBeamAz(float c)
      Shift the azimuth of the RHI from radar location, 360 degrees, clockwise from N
      Parameters:
      c - the azimuth of the RHI from radar location, 360 degrees, cw from N
    • createXSDisplay

      protected DisplayableData createXSDisplay() throws VisADException, RemoteException
      Create the DisplayableData that will be used to depict the data in the main display.
      Overrides:
      createXSDisplay in class ColorCrossSectionControl
      Returns:
      depictor for data in main display
      Throws:
      VisADException - unable to create depictor
      RemoteException - unable to create depictor (shouldn't happen)
    • createVCSDisplay

      protected DisplayableData createVCSDisplay() throws VisADException, RemoteException
      Create the DisplayableData that will be used to depict the data in the control's display.
      Overrides:
      createVCSDisplay in class ColorCrossSectionControl
      Returns:
      depictor for data in main display
      Throws:
      VisADException - unable to create depictor
      RemoteException - unable to create depictor (shouldn't happen)
    • getColorWidgetLabel

      public String getColorWidgetLabel()
      set label for button controling color of the selector line to "line color:"
      Overrides:
      getColorWidgetLabel in class DisplayControlImpl
      Returns:
      the label
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      Add any specialized control widgets for this control to the list.
      Overrides:
      getControlWidgets in class ColorCrossSectionControl
      Parameters:
      controlWidgets - List to add to.
      Throws:
      VisADException - unable to create controls
      RemoteException - unable to create controls (shouldn't happen)
    • getDisplayTabComponent_old

      protected JComponent getDisplayTabComponent_old()
      Create the component that goes into the 'Display' tab
      Returns:
      Display tab component
    • getDisplayTabComponent

      protected JComponent getDisplayTabComponent()
      _more_
      Overrides:
      getDisplayTabComponent in class CrossSectionControl
      Returns:
      _more_
    • setAutorotateOn

      public void setAutorotateOn(boolean v)
      Set whether the rhi is in autorotate mode Used by XML persistence.
      Parameters:
      v - boolean true is rotating
    • getAutorotateOn

      public boolean getAutorotateOn()
      get whether the rhi is in autorotate mode
      Returns:
      true if rotating
    • setBeamAz

      public void setBeamAz(float az)
      Set the azimuth of the RHI from radar location, 360 degrees, cw from N
      Parameters:
      az - the azimuth of the RHI from radar location, 360 degrees, cw from N deprecated use setBeamAzimuth
    • setEndPoint

      public void setEndPoint(RealTuple p)
      _more_
      Overrides:
      setEndPoint in class CrossSectionControl
      Parameters:
      p - _more_
    • setBeamAzimuth

      public void setBeamAzimuth(float az)
      Set the value of the azimuth of the RHI from radar location, 360 degrees, cw from N. Does NOT move the beam; this is only for persistence. Use resetBeamAz.
      Parameters:
      az - the azimuth of the RHI from radar location, 360 degrees, cw from N
    • getBeamAzimuth

      public float getBeamAzimuth()
      Get the azimuth of the rhi from radar location, 360 degrees, cw from N
      Returns:
      beamAz the azimuth of the rhi from radar
    • createCrossSectionSelector

      protected void createCrossSectionSelector() throws VisADException, RemoteException
      make a Selector line which shows and controls where RHI position is; uses current value of beam azimuth.
      Overrides:
      createCrossSectionSelector in class CrossSectionControl
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • receiveShareData

      public void receiveShareData(Sharable from, Object dataId, Object[] data)
      using incoming shared RHI data, reset this display to match
      Specified by:
      receiveShareData in interface Sharable
      Overrides:
      receiveShareData in class CrossSectionControl
      Parameters:
      from - source of data to be shared
      dataId - id of sharable data
      data - sharable data
    • getLegendLabels

      public void getLegendLabels(List labels, int legendType)
      Override the base class method to include the station name, "moment" (data type as reflectivity) and and the RHI azimuth in the legend label;
      Overrides:
      getLegendLabels in class DisplayControlImpl
      Parameters:
      labels - List of labels
      legendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
    • updateLegendLabel

      protected void updateLegendLabel()
      Method to update the legend label when the RHI position changes.
      Overrides:
      updateLegendLabel in class DisplayControlImpl
    • loadDataFromLine

      protected void loadDataFromLine() throws VisADException, RemoteException
      Create and loads a 2D FieldImpl from the existing getGridDataInstance() at the position indicated by the controlling Selector line end points;
      Overrides:
      loadDataFromLine in class CrossSectionControl
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getRequestProperties

      protected Hashtable getRequestProperties()
      Get (and make if necessary) the requester Hastable of properties that is carried along with the data instance
      Overrides:
      getRequestProperties in class DisplayControlImpl
      Returns:
      Hashtable of request properties
    • setRequestProperties

      protected void setRequestProperties()
      Make the requester Hastable of properties that is carried along with the data instance
    • make2DData

      protected FieldImpl make2DData(FieldImpl inputfieldImpl) throws VisADException, RemoteException
      Make a FieldImpl suitable for the 2D RHI display; of form (time -> (integer_index->(x,altitude) -> parm)); x axis positions are in distance along cross section from one end. from FieldImpl (time -> (integer_index->(range,az,elev) -> parm))
      Overrides:
      make2DData in class CrossSectionControl
      Parameters:
      inputfieldImpl - The data as a Field
      Returns:
      a 2D version of the data
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • getAllowSmoothing

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

      public boolean getAllowAutoScale()
      Get whether we can autoscale the vertical scale
      Overrides:
      getAllowAutoScale in class CrossSectionControl
      Returns:
      false
    • getAutoScaleYAxis

      public boolean getAutoScaleYAxis()
      Get whether we should autoscale the Y Axis.
      Overrides:
      getAutoScaleYAxis in class CrossSectionControl
      Returns:
      false
    • getDataProjectionLabel

      protected String getDataProjectionLabel()
      Get the data projection label
      Overrides:
      getDataProjectionLabel in class DisplayControlImpl
      Returns:
      the data projection label
    • 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_