Class RadarRhiControl

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

public class RadarRhiControl extends ColorCrossSectionControl
Created by IntelliJ IDEA. User: yuanho Date: Apr 15, 2009 Time: 1:56:43 PM To change this template use File | Settings | File Templates.
  • Field Details

    • SHARE_ANGLE

      public static final String SHARE_ANGLE
      identified when sharing the rhi angle
      See Also:
    • currentAngle

      protected float currentAngle
      the azimuth
    • stationLabel

      protected JLabel stationLabel
      the station label
    • currentLevel

      protected Object currentLevel
      Load or reload data for a RHI selector line which has moved.
  • Constructor Details

    • RadarRhiControl

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

    • useZPosition

      protected boolean useZPosition()
      add the zposition slider
      Overrides:
      useZPosition in class DisplayControlImpl
      Returns:
      _more_
    • initDone

      public void initDone()
      Called after all initialization is finished. Labels plot in control window. Loads data in displays.
      Overrides:
      initDone in class CrossSectionControl
    • 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
    • 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
    • crossSectionChanged

      public void crossSectionChanged()
      _more_
      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
    • 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
      _more_
      Overrides:
      getControlWidgets in class ColorCrossSectionControl
      Parameters:
      controlWidgets - _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getDisplayTabComponent

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

      public void setCurrentAngle(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
    • getCurrentAngle

      public void getCurrentAngle(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_