Class ValuePlanViewControl

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

public class ValuePlanViewControl extends PlanViewControl
Class for controlling the display of plan view text plots of gridded data.
Version:
$Revision: 1.25 $
Author:
Unidata Development Team
  • Field Details

    • layoutModelWidget

      protected LayoutModelWidget layoutModelWidget
      The widget to show the layout model in the gui
  • Constructor Details

    • ValuePlanViewControl

      public ValuePlanViewControl()
      Default constructor. Sets the attribute flags used by this particular PlanViewControl
  • Method Details

    • createPlanDisplay

      protected DisplayableData createPlanDisplay() throws VisADException, RemoteException
      Method to create the particular DisplayableData that this this instance uses for data depictions.
      Specified by:
      createPlanDisplay in class PlanViewControl
      Returns:
      Contour2DDisplayable for this instance.
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD Error
    • initDone

      public void initDone()
      Init is done
      Overrides:
      initDone in class PlanViewControl
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Property change method.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Overrides:
      propertyChange in class PlanViewControl
      Parameters:
      evt - event to act on
    • handleChangedStationModel

      protected void handleChangedStationModel(StationModel changedModel)
      The station model changed
      Parameters:
      changedModel - The changed station model_
    • setLayoutModelFromWidget

      public void setLayoutModelFromWidget(StationModel lm)
      Set the layout model
      Parameters:
      lm - layout model
    • handleDisplayChanged

      public void handleDisplayChanged(DisplayEvent evt)
      Listen for DisplayEvents
      Overrides:
      handleDisplayChanged in class DisplayControlImpl
      Parameters:
      evt - The event
    • projectionChanged

      public void projectionChanged()
      Method to call if projection changes. This will reset the viewScape, bounds and llBounds held by this object and then load data
      Specified by:
      projectionChanged in interface DisplayControl
      Overrides:
      projectionChanged in class PlanViewControl
    • viewpointChanged

      public void viewpointChanged()
      Respond to changes in the control.
      Overrides:
      viewpointChanged in class DisplayControlImpl
    • getControlWidgets

      public void getControlWidgets(List controlWidgets) throws VisADException, RemoteException
      Add into the given the widgets for the different attributes
      Overrides:
      getControlWidgets in class PlanViewControl
      Parameters:
      controlWidgets - List of ControlWidgets to add into
      Throws:
      RemoteException
      VisADException
    • loadDataInThread

      protected void loadDataInThread()
      A utility method that sets the wait cursor and calls loadData in a separate thread .
    • getSliceForDisplay

      protected FieldImpl getSliceForDisplay(FieldImpl slice) throws VisADException
      Get the slice for the display
      Overrides:
      getSliceForDisplay in class PlanViewControl
      Parameters:
      slice - slice to use
      Returns:
      slice with skip value applied
      Throws:
      VisADException - problem subsetting the slice
    • setLayoutModel

      public void setLayoutModel(StationModel model)
      Set the current station model view.
      Parameters:
      model - station model layout
    • getLayoutModel

      public StationModel getLayoutModel()
      Get the current layout model view.
      Returns:
      station model layout
    • getLayoutScale

      public float getLayoutScale()
      Get the scale the user can enter
      Returns:
      The scale
    • setLayoutScale

      public void setLayoutScale(float f)
      Set the scale the user can enter
      Parameters:
      f - The scale
    • setDeclutter

      public void setDeclutter(boolean v)
      Set whether this DisplayControl should be decluttered or not. Used by XML persistence.
      Parameters:
      v - true to declutter
    • getDeclutter

      public boolean getDeclutter()
      Get whether this DisplayControl should be decluttered or not.
      Returns:
      true if set to declutter
    • shouldAddDisplayListener

      protected boolean shouldAddDisplayListener()
      Signal base class to add this as a display listener
      Overrides:
      shouldAddDisplayListener in class GridDisplayControl
      Returns:
      Add as display listener
    • shouldAddControlListener

      protected boolean shouldAddControlListener()
      Signal base class to add this as a control listener
      Overrides:
      shouldAddControlListener in class GridDisplayControl
      Returns:
      Add as control listener
    • setDeclutterFilter

      public void setDeclutterFilter(float filter)
      Set whether the filtering for decluttering. Used by XML persistence.
      Parameters:
      filter - value of 1 (default) for no overlap (default). 0 < filter < 1 allows some data overlap. filter > 1 causes data to be more widely spaced.
    • getDeclutterFilter

      public float getDeclutterFilter()
      Get whether this DisplayControl should be decluttered or not.
      Returns:
      weighting for decluttering.
    • editLayoutModel

      public void editLayoutModel()
      Popup the station model editor
    • getScaleFromDisplayable

      protected float getScaleFromDisplayable()
      A utility to get the scale from the dislayable
      Returns:
      The scale
    • makeLayoutModelWidget

      protected JPanel makeLayoutModelWidget()
      Make the gui widget for setting the layout model
      Returns:
      the widget
    • getBounds

      protected Rectangle2D getBounds()
      Get the bounds for the visible portion of the screen.
      Returns:
      bounds in VisAD screen coordinates.
    • calculateLatLonBounds

      protected LinearLatLonSet calculateLatLonBounds(Rectangle2D screenBounds)
      Calculate the LatLonBounds based on the VisAD screen bound. This uses the projection for the navigated display and the screen bounds
      Parameters:
      screenBounds - VisAD screen bounds.
      Returns:
      LinearLatLonSet of screen bounds in lat/lon coordinates.