Class NavigatedViewManager

All Implemented Interfaces:
ActionListener, ItemListener, EventListener, Sharable, ControlListener, DisplayListener
Direct Known Subclasses:
MapViewManager, TransectViewManager

public abstract class NavigatedViewManager extends ViewManager
Author:
IDV development team
  • Field Details

  • Constructor Details

    • NavigatedViewManager

      public NavigatedViewManager()
      Default constructor
    • NavigatedViewManager

      public NavigatedViewManager(ViewContext viewContext)
      Construct a NavigatedViewManager from an IDV
      Parameters:
      viewContext - Really the IDV
    • NavigatedViewManager

      public NavigatedViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) throws VisADException, RemoteException
      Construct a NavigatedViewManager with the specified params.
      Parameters:
      viewContext - context in which this MVM exists
      desc - ViewDescriptor
      properties - semicolon separated list of properties (can be null)
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
  • Method Details

    • getNavigatedDisplay

      public NavigatedDisplay getNavigatedDisplay()
      Get the NavigatedDisplay associated with this ViewManager
      Returns:
      the NavigatedDisplay associated with this ViewManager
    • setDisplayMaster

      protected void setDisplayMaster(DisplayMaster master)
      Overrides:
      setDisplayMaster in class ViewManager
      Parameters:
      master - The display master
    • init

      protected void init() throws VisADException, RemoteException
      Initialize this object.
      Overrides:
      init in class ViewManager
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • initWithInner

      protected void initWithInner(ViewManager that, boolean ignoreWindow) throws VisADException, RemoteException
      Initialize this object's state with the state from that.
      Overrides:
      initWithInner in class ViewManager
      Parameters:
      that - The other obejct to get state from
      ignoreWindow - If true then don't set the window size and location
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • applyProperties

      public boolean applyProperties()
      Apply properties. Override super class to set class specific props.
      Overrides:
      applyProperties in class ViewManager
      Returns:
      true if successful
    • addPropertiesComponents

      protected void addPropertiesComponents(JTabbedPane tabbedPane)
      Add components to the properties dialog
      Overrides:
      addPropertiesComponents in class ViewManager
      Parameters:
      tabbedPane - the tabbed pane to add to
    • initToolBars

      protected void initToolBars()
      Initialize the toolbars for the GUI
      Overrides:
      initToolBars in class ViewManager
    • hasViewpointControl

      protected boolean hasViewpointControl()
      Has a viewpoint control
      Returns:
      true if it does.
    • getViewpointControl

      protected ViewpointControl getViewpointControl()
      Get the viewpoint control for this view manager.
      Returns:
      the ViewpointControl
    • perspectiveViewChanged

      protected void perspectiveViewChanged(boolean v)
      Handle a perspective view change
      Parameters:
      v - true to set to perspective view
    • verticalScaleChanged

      protected void verticalScaleChanged()
      handle a vertical scale change deprecated see verticalRangeChanged()
    • destroy

      public void destroy()
      Cleanup when destroying this object.
      Overrides:
      destroy in class ViewManager
    • receiveShareData

      public void receiveShareData(Sharable from, Object dataId, Object[] data)
      Handle the receipt of shared data
      Specified by:
      receiveShareData in interface Sharable
      Overrides:
      receiveShareData in class SharableImpl
      Parameters:
      from - Who is it from
      dataId - What is it
      data - Here it is
    • rubberBandBoxChanged

      protected void rubberBandBoxChanged() throws VisADException
      Handle the rubber band box changes.
      Throws:
      VisADException - the VisAD exception
    • handleControlChanged

      protected void handleControlChanged(ControlEvent e)
      Respond to ControlEvents.
      Overrides:
      handleControlChanged in class ViewManager
      Parameters:
      e - ControlEvent to respond to
    • displayChanged

      public void displayChanged(DisplayEvent de) throws VisADException, RemoteException
      An implementation of the the DisplayListener interface. This method turns on/off the wait cursor when it gets a WAIT_ON or WAIT_OFF event. It also, when it receives a FRAME_DONE event for the fist time, calls firstFrameDone on the DisplayControls
      Specified by:
      displayChanged in interface DisplayListener
      Overrides:
      displayChanged in class ViewManager
      Parameters:
      de - The DisplayEvent
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • mouseFlicked

      protected void mouseFlicked(Point startPoint, Point endPoint, double[] startMatrix, double[] endMatrix, double speed)
      Handle a mouse flicked
      Parameters:
      startPoint - the start point
      endPoint - the end point
      startMatrix - the start matrix
      endMatrix - the end matrix
      speed - how fast to move
    • animationTimeChanged

      protected void animationTimeChanged()
      Handle an animation time change
      Overrides:
      animationTimeChanged in class ViewManager
    • matrixChanged

      protected void matrixChanged()
      Handle the change to the matrix
    • verticalRangeChanged

      protected void verticalRangeChanged()
      Handle a change to the vertical range
    • setReadoutFormat

      protected void setReadoutFormat()
      Set the format for the cursor readout.
    • applyPreferences

      public void applyPreferences()
      Apply preferences
      Overrides:
      applyPreferences in class ViewManager
    • handleBooleanPropertyChange

      protected void handleBooleanPropertyChange(String id, boolean value) throws Exception
      The BooleanProperty identified byt he given id has changed. Apply the change to the display.
      Overrides:
      handleBooleanPropertyChange in class ViewManager
      Parameters:
      id - Id of the changed BooleanProperty
      value - Its new value
      Throws:
      Exception - problem handeling the change
    • getInitialBooleanProperties

      protected void getInitialBooleanProperties(List props)
      Get the intial BooleanProperty-s
      Overrides:
      getInitialBooleanProperties in class ViewManager
      Parameters:
      props - list to add them to.
    • checkHistoryMatrix

      protected void checkHistoryMatrix()
      Check the matrix history.
    • setWindow

      public void setWindow(IdvWindow w)
      Set the window that this ViewManager is shown in. This adds this object as a WindowListener and sets the bounds of the window if the windowBounds is non-null.
      Overrides:
      setWindow in class ViewManager
      Parameters:
      w - The window
    • doMakeViewPointToolBar

      public Component doMakeViewPointToolBar(int orientation)
      Creates the Viewpoint Toolbar in the specified orientation.
      Parameters:
      orientation - orientation of the toolbar (JToolBar.VERTICAL or JToolBar.HORIZONTAL)
      Returns:
      the toolbar component
    • doMakeZoomPanToolBar

      protected Component doMakeZoomPanToolBar(int orientation)
      Creates the Zoom/Pan Toolbar in the specified orientation.
      Parameters:
      orientation - orientation of the toolbar (JToolBar.VERTICAL or JToolBar.HORIZONTAL)
      Returns:
      the toolbar component
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Required interface for ActionEvents, to implement ActionListener for the UI objects such as JButton-s and MenuItem-s
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class ViewManager
      Parameters:
      event - an ActionEvent
    • makeShowMenu

      protected JMenu makeShowMenu()
      Create and return the show menu.
      Overrides:
      makeShowMenu in class ViewManager
      Returns:
      The Show menu
    • setShowCursor

      public void setShowCursor(boolean value)
      Set the show cursor flag
      Parameters:
      value - The value
    • getShowCursor

      public boolean getShowCursor()
      Get the show cursor readout flag
      Returns:
      The flag value
    • setLabelsVisible

      public void setLabelsVisible(boolean value)
      Set the show vertical scale flag
      Parameters:
      value - The value
    • getLabelsVisible

      public boolean getLabelsVisible()
      Get the show vertical scale flag
      Returns:
      The flag value
    • setTransectLabelsVisible

      public void setTransectLabelsVisible(boolean value)
      Set the show vertical scale flag
      Parameters:
      value - The value
    • getTransectLabelsVisible

      public boolean getTransectLabelsVisible()
      Get the show vertical scale flag
      Returns:
      The flag value
    • setClipping

      public void setClipping(boolean value)
      Set the clipping flag
      Parameters:
      value - The value
    • getClipping

      public boolean getClipping()
      Get the 3d clipping flag
      Returns:
      The flag value
    • setVerticalRangeUnit

      public void setVerticalRangeUnit(Unit u)
      Set the Unit used for the vertical range.
      Parameters:
      u - new unit
    • getVerticalRangeUnit

      public Unit getVerticalRangeUnit()
      Get the Unit used for the vertical range.
      Returns:
      unit of vertical range values
    • getVerticalRange

      public double[] getVerticalRange()
      Get the min/max used for the vertical range.
      Returns:
      array of vertical range values (double[] {min, max})
    • setVerticalRange

      public void setVerticalRange(double[] r)
      Set the min/max used for the vertical range.
      Parameters:
      r - array of vertical range values (double[] {min, max})
    • setVerticalRangeUnitPreference

      protected void setVerticalRangeUnitPreference(NavigatedDisplay nd) throws VisADException, RemoteException
      Set the vertical range unit from the preference
      Parameters:
      nd - navigated display to set the unit on
      Throws:
      RemoteException - problem with remote display
      VisADException - problem with local display
    • getDisplayCoordinateSystem

      public CoordinateSystem getDisplayCoordinateSystem()
      Get the display side coordinate system, subclasses should implement if there is one.
      Overrides:
      getDisplayCoordinateSystem in class ViewManager
      Returns:
      CoordinateSystem or null