Class FlowPlanViewControl

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

public class FlowPlanViewControl extends PlanViewControl implements FlowDisplayControl
A plan view control for flow data (vector or wind barbs)
Author:
IDV Development Team
  • Field Details

  • Constructor Details

    • FlowPlanViewControl

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

    • projectionChanged

      public void projectionChanged()
      Method to call if projection changes. Handle flowscale.
      Specified by:
      projectionChanged in interface DisplayControl
      Overrides:
      projectionChanged in class PlanViewControl
    • getColorWidgetLabel

      public String getColorWidgetLabel()
      Get the color table widget label text.
      Overrides:
      getColorWidgetLabel in class DisplayControlImpl
      Returns:
      the label text.
    • createPlanDisplay

      protected DisplayableData createPlanDisplay() throws VisADException, RemoteException
      Create the Displayable for the data depiction.
      Specified by:
      createPlanDisplay in class PlanViewControl
      Returns:
      the Displayable.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • 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 PlanViewControl
      Parameters:
      dataChoice - choice that describes the data to be loaded.
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • setColoredByAnother

      public void setColoredByAnother(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getColoredByAnother

      public boolean getColoredByAnother()
      _more_
      Returns:
      _more_
    • setUseSpeedForColor

      public void setUseSpeedForColor(boolean yesno)
      _more_
      Parameters:
      yesno - _more_
    • getUseSpeedForColor

      public boolean getUseSpeedForColor()
      _more_
      Returns:
      _more_
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      Get control widgets special to this control.
      Overrides:
      getControlWidgets in class PlanViewControl
      Parameters:
      controlWidgets - list of control widget from the superclass
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • doMakeDensityComponent

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

      protected JComponent doMakeFlowRangeComponent()
      Create the streamline density slider
      Returns:
      The panel that shows the streamline density slider
    • 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 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
    • densitySliderChanged

      public void densitySliderChanged(int value)
      The streamline density slider changed
      Parameters:
      value - slider value
    • addTopographyMap

      protected void addTopographyMap() throws VisADException, RemoteException
      Wrapper around GridDisplayControl.addTopographyMap(int) to allow subclasses to set their own index.
      Overrides:
      addTopographyMap in class PlanViewControl
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • setStreamlines

      public void setStreamlines()
      Set the streamline property. Used by XML persistence
    • setStreamlines

      public void setStreamlines(boolean v)
      _more_
      Parameters:
      v - _more_
    • setTrajectories

      public void setTrajectories(boolean v)
      _more_
      Parameters:
      v - _more_
    • setVectors

      public void setVectors(boolean v)
      _more_
      Parameters:
      v - _more_
    • setCVectors

      public void setCVectors(boolean v)
      _more_
      Parameters:
      v - _more_
    • getStreamlines

      public boolean getStreamlines()
      Get the streamline property. Used by XML persistence
      Returns:
      the current streamline property (true if streamlines)
    • getTrajectories

      public boolean getTrajectories()
      _more_
      Returns:
      _more_
    • getCVectors

      public boolean getCVectors()
      _more_
      Returns:
      _more_
    • getVectors

      public boolean getVectors()
      _more_
      Returns:
      _more_
    • setSkipValue

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

      public void setWindbarbs(boolean v)
      Set the wind barb property. Used by XML persistence
      Parameters:
      v - true if you want to use wind barbs
    • getWindbarbs

      public boolean getWindbarbs()
      Get the wind barb property. Used by XML persistence
      Returns:
      true if wind barbs are being depicted
    • 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
    • setScaleFactor

      public void setScaleFactor(float s)
      Set the scale factor. Used by XML persistence
      Parameters:
      s - the new factor
    • addDisplaySettings

      protected void addDisplaySettings(DisplaySettingsDialog dsd)
      Add DisplaySettings appropriate for this display
      Overrides:
      addDisplaySettings in class PlanViewControl
      Parameters:
      dsd - the dialog to add to
    • getAutoSize

      public boolean getAutoSize()
      Get the autosize property Used by XML persistence
      Returns:
      the autosize for this control
    • setAutoSize

      public void setAutoSize(boolean auto)
      Set the autosize property Used by XML persistence
      Parameters:
      auto - new autosize value
    • getArrowHead

      public boolean getArrowHead()
      Get the arrowHead property Used by XML persistence
      Returns:
      the autosize for this control
    • setArrowHead

      public void setArrowHead(boolean arrow)
      Set the autosize property Used by XML persistence
      Parameters:
      arrow - value
    • getFlowScale

      public float getFlowScale()
      Get the flow scale. Used by XML persistence
      Returns:
      the flow scale for this control
    • setFlowScale

      public void setFlowScale(float f)
      Set the flow scale. Used by XML persistence
      Parameters:
      f - new flow scale
    • setTrajOffset

      public void setTrajOffset(float f)
      _more_
      Parameters:
      f - _more_
    • setVectorLength

      public void setVectorLength(float f)
      _more_
      Parameters:
      f - _more_
    • setArrowHeadSize

      public void setArrowHeadSize(float f)
      _more_
      Parameters:
      f - _more_
    • getVectorLength

      public float getVectorLength()
      _more_
      Returns:
      _more_
    • getArrowHeadSize

      public float getArrowHeadSize()
      _more_
      Returns:
      _more_
    • getTrajOffset

      public float getTrajOffset()
      _more_
      Returns:
      _more_
    • 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
    • getStreamlineDensity

      public float getStreamlineDensity()
      Get the streamline density. Used by XML persistence
      Returns:
      the streamline density for this control
    • setStreamlineDensity

      public void setStreamlineDensity(float f)
      Set the streamline density. Used by XML persistence
      Parameters:
      f - new flow scale
    • setStreamlineDensity

      public void setStreamlineDensity(float f, boolean fromSlider)
      Set the streamline density
      Parameters:
      f - value
      fromSlider - true if from slider
    • 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 PlanViewControl
      Returns:
      true if there are multiple fields
    • getColorRangeIndex

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

      protected String getColorParamName()
      _more_
      Overrides:
      getColorParamName in class GridDisplayControl
      Returns:
      _more_
    • getInitialRange

      protected Range getInitialRange() throws RemoteException, VisADException
      _more_
      Overrides:
      getInitialRange in class GridDisplayControl
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getRangeForColorTable

      public Range getRangeForColorTable() throws RemoteException, VisADException
      _more_
      Overrides:
      getRangeForColorTable in class DisplayControlImpl
      Returns:
      _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • 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
    • setFlowColorRange

      public void setFlowColorRange(Range colorRange)
      _more_
      Parameters:
      colorRange - _more_
    • getFlowColorRange

      public Range getFlowColorRange()
      _more_
      Returns:
      _more_
    • getRange

      public Range getRange() throws RemoteException, VisADException
      _more_
      Overrides:
      getRange in class DisplayControlImpl
      Returns:
      range being used
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • setRange

      public void setRange(Range nRange) throws RemoteException, VisADException
      _more_
      Overrides:
      setRange in class DisplayControlImpl
      Parameters:
      nRange - _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getCursorReadoutInner

      protected List getCursorReadoutInner(EarthLocation el, Real animationValue, int animationStep, List<ReadoutInfo> samples) throws Exception
      Get the cursor data
      Overrides:
      getCursorReadoutInner in class PlanViewControl
      Parameters:
      el - earth location
      animationValue - the animation value
      animationStep - the animation step
      samples - the list of sample readouts
      Returns:
      the list of readout data
      Throws:
      Exception - problem getting the data
    • formatForCursorReadout

      protected String formatForCursorReadout(RealTuple rt) throws VisADException, RemoteException
      Format a real for the cursor readout
      Parameters:
      rt - the realtuple
      Returns:
      the formatted string
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • getTrajFormType

      public Integer getTrajFormType()
      _more_
      Returns:
      _more_
    • setTrajFormType

      public void setTrajFormType(Integer trajForm)
      _more_
      Parameters:
      trajForm - _more_
    • setLineWidth

      public void setLineWidth(int width) throws RemoteException, VisADException
      _more_
      Overrides:
      setLineWidth in class DisplayControlImpl
      Parameters:
      width - _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getMacroNames

      protected void getMacroNames(List names, List labels)
      Add any macro name/label pairs
      Overrides:
      getMacroNames in class PlanViewControl
      Parameters:
      names - List of macro names
      labels - List of macro labels
    • addLabelMacros

      protected void addLabelMacros(String template, List patterns, List values)
      Add any macro name/value pairs.
      Overrides:
      addLabelMacros in class PlanViewControl
      Parameters:
      template - template
      patterns - The macro names
      values - The macro values
    • getSpeedRange

      public Range[] getSpeedRange(FieldImpl ff)
      _more_
      Parameters:
      ff - _more_
      Returns:
      range _more_
    • timeChanged

      protected void timeChanged(Real time)
      _more_
      Overrides:
      timeChanged in class DisplayControlImpl
      Parameters:
      time - _more_