Class TransectViewManager

All Implemented Interfaces:
ActionListener, ItemListener, EventListener, Sharable, ControlListener, DisplayListener

public class TransectViewManager extends NavigatedViewManager
A wrapper around a TransectDisplay display master. Provides an interface for managing user interactions, gui creation, etc.
Author:
IDV development team
  • Field Details

  • Constructor Details

    • TransectViewManager

      public TransectViewManager()
      Default constructor
    • TransectViewManager

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

      public TransectViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) throws VisADException, RemoteException
      Construct a TransectViewManager 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

    • getTransectDisplay

      public TransectDisplay getTransectDisplay()
      Helper method
      Returns:
      The transect display_
    • doMakeDisplayMaster

      protected DisplayMaster doMakeDisplayMaster() throws VisADException, RemoteException
      Factory method to create the display master
      Overrides:
      doMakeDisplayMaster in class ViewManager
      Returns:
      The TransectDisplay
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • getUseFastRendering

      public boolean getUseFastRendering(boolean b)
      This is called by display controls and allows us to force fast rendering
      Overrides:
      getUseFastRendering in class ViewManager
      Parameters:
      b - The displays fast rendering flag
      Returns:
      true
    • addDisplayInfo

      public boolean addDisplayInfo(DisplayInfo displayInfo) throws RemoteException, VisADException
      Override base class method to force setting fast rendering to true.
      Overrides:
      addDisplayInfo in class ViewManager
      Parameters:
      displayInfo - The display info to add.
      Returns:
      Was the addition successful
      Throws:
      RemoteException - the remote exception
      VisADException - the VisAD 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 NavigatedViewManager
      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
    • updateNameLabel

      protected void updateNameLabel()
      Update the name jlabel. Override base class method to add the transect name
      Overrides:
      updateNameLabel in class ViewManager
    • handleBooleanPropertyChange

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

      public boolean applyProperties()
      Apply properties specific to this ViewManager
      Overrides:
      applyProperties in class NavigatedViewManager
      Returns:
      true if successful
    • addPropertiesComponents

      protected void addPropertiesComponents(JTabbedPane tabbedPane)
      Add a properties component
      Overrides:
      addPropertiesComponents in class NavigatedViewManager
      Parameters:
      tabbedPane - the tabbed pane
    • makeShowMenu

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

      protected void getInitialBooleanProperties(List props)
      Add to the initial Boolean properties
      Overrides:
      getInitialBooleanProperties in class NavigatedViewManager
      Parameters:
      props - list to add to
    • doMakeContents

      protected Container doMakeContents()
      Make the GUI contents.
      Overrides:
      doMakeContents in class ViewManager
      Returns:
      The GUI contents
    • doneFirstFrame

      protected void doneFirstFrame()
      When we have rendered the first frame tell any TransectDrawingControls to show the display transect
      Overrides:
      doneFirstFrame in class ViewManager
    • matrixChanged

      protected void matrixChanged()
      We've panned or zoomed. Show the display transect
      Overrides:
      matrixChanged in class NavigatedViewManager
    • verticalRangeChanged

      protected void verticalRangeChanged()
      Show the display transect
      Overrides:
      verticalRangeChanged in class NavigatedViewManager
    • initBooleanProperties

      protected void initBooleanProperties()
      Set some properties
      Overrides:
      initBooleanProperties in class ViewManager
    • initializeViewMenu

      public void initializeViewMenu(JMenu viewMenu)
      Initialize the view menu
      Overrides:
      initializeViewMenu in class ViewManager
      Parameters:
      viewMenu - The view menu
    • doMakeMenuList

      public ArrayList doMakeMenuList()
      Create and return the list of menus for the menu bar. Just the map and view menu.
      Overrides:
      doMakeMenuList in class ViewManager
      Returns:
      List of menus.
    • initializeTransectMenu

      public void initializeTransectMenu(JMenu transectMenu)
      Add items to trasnect menu
      Parameters:
      transectMenu - menu
    • setLastActive

      public void setLastActive(boolean b)
      Set last active
      Overrides:
      setLastActive in class ViewManager
      Parameters:
      b - true to show last active
    • editTransects

      public void editTransects()
      Create, if needed, and show a TransectDrawingControl
    • setTransect

      public void setTransect(Transect value)
      Set the Transect property.
      Parameters:
      value - The new value for Transect
    • setTransect

      public void setTransect(Transect value, boolean force)
      Sets the transect.
      Parameters:
      value - the value
      force - the force
    • getTransect

      public Transect getTransect()
      Get the Transect property.
      Returns:
      The Transect
    • getAxisTransect

      public Transect getAxisTransect()
      Get the Transect that is implicitly defined by the x axis
      Returns:
      The Transect
    • getTransect

      public Transect getTransect(boolean force)
      Return the transect
      Parameters:
      force - If true then create one
      Returns:
      The transect
    • getShowGridLines

      public boolean getShowGridLines()
      Get the show cursor readout flag
      Returns:
      The flag value
    • keyWasTyped

      public void keyWasTyped(KeyEvent keyEvent)
      Process the key event
      Overrides:
      keyWasTyped in class ViewManager
      Parameters:
      keyEvent - The key event
    • setMaxDataDistance

      public void setMaxDataDistance(Real value)
      Set the MaxDataDistance property.
      Parameters:
      value - The new value for MaxDataDistance
    • getMaxDataDistance

      public Real getMaxDataDistance()
      Get the MaxDataDistance property.
      Returns:
      The MaxDataDistance
    • getTypeName

      public String getTypeName()
      What type of view is this
      Overrides:
      getTypeName in class ViewManager
      Returns:
      The type of view