Class ThreeDSurfaceControl

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

public class ThreeDSurfaceControl extends GridDisplayControl
A MetApps Display Control with Displayable and controls for one 3D isosurface display of one parameter.
Version:
$Revision: 1.106 $
Author:
Jeff McWhirter
  • Field Details

    • SHARE_SURFACEVALUE

      public static final String SHARE_SURFACEVALUE
      Property for sharing isosurface value
      See Also:
    • SHARE_TRANSPARENCY

      public static final String SHARE_TRANSPARENCY
      Property for sharing transparency. Deprecated since transparencey is now done through color table sharing. deprecated
      See Also:
  • Constructor Details

    • ThreeDSurfaceControl

      public ThreeDSurfaceControl()
      Default constructor; does nothing. See init() for class initialization
  • Method Details

    • 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 DisplayControlImpl
      Parameters:
      dataChoice - the DataChoice of the moment.
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • initDone

      public void initDone()
      Called after init. Adjust transparency for legacy bundles.
      Overrides:
      initDone in class DisplayControlImpl
    • getMacroNames

      protected void getMacroNames(List names, List labels)
      Add any macro name/label pairs
      Overrides:
      getMacroNames in class DisplayControlImpl
      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 DisplayControlImpl
      Parameters:
      template - The template to use
      patterns - The macro names
      values - The macro values
    • displayUnitChanged

      protected void displayUnitChanged(Unit oldUnit, Unit newUnit)
      Method called when display unit changes.
      Overrides:
      displayUnitChanged in class DisplayControlImpl
      Parameters:
      oldUnit - old unit
      newUnit - new unit
    • setData

      protected boolean setData(DataChoice choice) throws VisADException, RemoteException
      Set the data in the display control from the data choice
      Overrides:
      setData in class DisplayControlImpl
      Parameters:
      choice - choice describing data
      Returns:
      true if successful
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • resetData

      protected void resetData() throws VisADException, RemoteException
      This reset data api need to apply smoothing, otherwise, no more smoothing
      Overrides:
      resetData in class DisplayControlImpl
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • applySmoothing

      protected void applySmoothing() throws VisADException, RemoteException
      Use the value of the smoothing type and weight to subset the data.
      Overrides:
      applySmoothing in class DisplayControlImpl
      Throws:
      RemoteException - Java RMI problem
      VisADException - VisAD problem
    • doMakeContents

      protected Container doMakeContents() throws VisADException, RemoteException
      Make the gui. Align it left
      Overrides:
      doMakeContents in class DisplayControlImpl
      Returns:
      The gui
      Throws:
      RemoteException - on badness
      VisADException - on badness
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      This gets called by the DisplayControlImpl.doMakeWidgetComponent (which is called by DisplayControlImpl.doMakeContents) to make the GUI contents of this Control, and allows this class to insert its own widgets as needed. Makes color table chooser and slider for surface value
      Overrides:
      getControlWidgets in class DisplayControlImpl
      Parameters:
      controlWidgets - list of control widgets to populate
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • setLevelWithRawValue

      public void setLevelWithRawValue(double rawLevel) throws VisADException, RemoteException
      Set the level value on the isosurface display and update all of the UI widgets.
      Parameters:
      rawLevel - new isourface value
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD 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 DisplayControlImpl
      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
    • getLegendLabels

      public void getLegendLabels(List labels, int legendType)
      Override the base class method to add the value readout.
      Overrides:
      getLegendLabels in class DisplayControlImpl
      Parameters:
      labels - labels to add to
      legendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
    • getAlpha

      public float getAlpha()
      Get the transparency property value. Only here for legacy bundles
      Returns:
      alpha value.
    • setAlpha

      public void setAlpha(float alpha)
      Set the transparency property value, 0.0 to 1.0 only. Only for legacy bundles.
      Parameters:
      alpha - the transparency property value.
    • setLevelSliderPercent

      public void setLevelSliderPercent(double level)
      Set the surfaces's value as a percentage of the slider range.
      Parameters:
      level - the surfaces's value.
    • setSliderValues

      public void setSliderValues() throws VisADException, RemoteException
      Set the initial state of the JSlider of isosurface value, with data limits, units, and labels.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • addDisplaySettings

      protected void addDisplaySettings(DisplaySettingsDialog dsd)
      Add any display settings
      Overrides:
      addDisplaySettings in class DisplayControlImpl
      Parameters:
      dsd - the dialog to add to
    • setSurfaceValue

      public void setSurfaceValue(double value)
      Set the SurfaceValue property.
      Parameters:
      value - The new value for SurfaceValue
    • getSurfaceValue

      public double getSurfaceValue()
      Get the SurfaceValue property.
      Returns:
      The SurfaceValue
    • canExportData

      public boolean canExportData()
      Can this display control write out data.
      Overrides:
      canExportData in class DisplayControlImpl
      Returns:
      true if it can
    • getDisplayedData

      protected Data getDisplayedData() throws VisADException, RemoteException
      Get the DisplayedData
      Overrides:
      getDisplayedData in class DisplayControlImpl
      Returns:
      the data or null
      Throws:
      RemoteException - problem reading remote data
      VisADException - problem gettting data
    • getIsRaster

      public boolean getIsRaster()
      Is this a raster display?
      Overrides:
      getIsRaster in class DisplayControlImpl
      Returns:
      true
    • 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_