Class FlowCrossSectionControl

All Implemented Interfaces:
ActionListener, ItemListener, PropertyChangeListener, EventListener, HyperlinkListener, Sharable, DataChangeListener, FlowDisplayControl, DisplayControl, Prototypable, DisplayableData.DragAdapter, ControlListener, DisplayListener
Direct Known Subclasses:
FlowCrossSectionControl.MyFlowCrossSectionControl

public class FlowCrossSectionControl extends CrossSectionControl implements FlowDisplayControl
A cross section control for depicting flow (vectors or wind barbs)
Version:
$Revision: 1.36 $
Author:
Unidata Development Team
  • Field Details

  • Constructor Details

    • FlowCrossSectionControl

      public FlowCrossSectionControl()
      Create a new FlowCrossSectionControl; set attribute flags
  • Method Details

    • initDone

      public void initDone()
      Actions to perform after init().
      Overrides:
      initDone in class CrossSectionControl
      See Also:
    • loadData

      protected void loadData(FieldImpl fieldImpl) throws VisADException, RemoteException
      Load the external display and the local display with this data of a vertical cross section.
      Overrides:
      loadData in class CrossSectionControl
      Parameters:
      fieldImpl - the data for the depiction
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • addDisplaySettings

      protected void addDisplaySettings(DisplaySettingsDialog dsd)
      Add this displaycontrol's display settings to the dialog
      Overrides:
      addDisplaySettings in class CrossSectionControl
      Parameters:
      dsd - the dialog
    • setData

      protected boolean setData(DataChoice dataChoice) throws VisADException, RemoteException
      Called to initialize this control from the given dataChoice; override super class instance to set skip factor before displaying data.
      Overrides:
      setData in class CrossSectionControl
      Parameters:
      dataChoice - choice that describes the data to be loaded.
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • getColorWidgetLabel

      public String getColorWidgetLabel()
      Get the label for the color widget
      Overrides:
      getColorWidgetLabel in class DisplayControlImpl
      Returns:
      label text
    • createXSDisplay

      protected DisplayableData createXSDisplay() throws VisADException, RemoteException
      Create the depiction for the data in the main window
      Specified by:
      createXSDisplay in class CrossSectionControl
      Returns:
      the Displayable
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • createVCSDisplay

      protected DisplayableData createVCSDisplay() throws VisADException, RemoteException
      Create the depiction for the data in the control window
      Specified by:
      createVCSDisplay in class CrossSectionControl
      Returns:
      the Displayable
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      Get any extra control widgets
      Overrides:
      getControlWidgets in class CrossSectionControl
      Parameters:
      controlWidgets - control widgets special to this control
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • doMakeFlowRangeComponent

      protected JComponent doMakeFlowRangeComponent()
      Create the streamline density slider
      Returns:
      The panel that shows the streamline density slider
    • getFlowScale

      public float getFlowScale()
      Get the flow scale factor. used by XML persistence
      Returns:
      the flow scale
    • setFlowScale

      public void setFlowScale(float f)
      Get the flow scale factor. used by XML persistence
      Parameters:
      f - new flow scale
    • setWindbarbs

      public void setWindbarbs(boolean v)
      Set whether this is depicting wind barbs or not. Use by XML persistence.
      Parameters:
      v - true for wind barbs
    • getWindbarbs

      public boolean getWindbarbs()
      Get whether this is depicting wind barbs or not. Use by XML persistence.
      Returns:
      true if wind barbs
    • setSkipValue

      public void setSkipValue(int value)
      Set the skip value
      Overrides:
      setSkipValue in class DisplayControlImpl
      Parameters:
      value - skip value
    • haveMultipleFields

      protected boolean haveMultipleFields()
      Return whether the Data held by this display control contains multiple fields (e.g., for the isosurface colored by another parameter
      Overrides:
      haveMultipleFields in class GridDisplayControl
      Returns:
      true if there are multiple fields
    • setIsThreeComponents

      public void setIsThreeComponents(boolean v)
      Set the use 3 components property. Used by XML persistence
      Parameters:
      v - true if using u, v and w
    • getIsThreeComponents

      public boolean getIsThreeComponents()
      Get the use 3 components property. Used by XML persistence
      Returns:
      true if using 3 components for wind
    • getColorRangeIndex

      protected int getColorRangeIndex()
      Returns the index to use in the GridDataInstance array of ranges for color ranges.
      Overrides:
      getColorRangeIndex in class GridDisplayControl
      Returns:
      The index to be used for the color range.
    • getFlowRange

      public Range getFlowRange()
      Get the flow range. Used by XML persistence
      Returns:
      the flow range for this control
    • setFlowRange

      public void setFlowRange(Range f)
      Set the flow range. Used by XML persistence
      Parameters:
      f - new flow range
    • getColorRangeFromData

      public Range getColorRangeFromData()
      Return the range attribute of the colorTable (if non-null) else return null;
      Overrides:
      getColorRangeFromData in class GridDisplayControl
      Returns:
      The range from the color table attribute
    • receiveShareData

      public void receiveShareData(Sharable from, Object dataId, Object[] data)
      Method called by other classes that share the the state.
      Specified by:
      receiveShareData in interface Sharable
      Overrides:
      receiveShareData in class CrossSectionControl
      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
    • showColorControlWidget

      public boolean showColorControlWidget()
      Show the color control widget in the widgets if FLAG_COLOR is set.
      Overrides:
      showColorControlWidget in class DisplayControlImpl
      Returns:
      false subclasses should override
    • removeControl

      public void removeControl(int idx) throws RemoteException, VisADException
      Throws:
      RemoteException
      VisADException