Class CrossSectionViewManager

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

public class CrossSectionViewManager extends ViewManager
A wrapper around a Cross Section (XSDisplay) display master. Provides an interface for managing user interactions, gui creation, etc.
Author:
IDV development team
  • Field Details

  • Constructor Details

    • CrossSectionViewManager

      public CrossSectionViewManager()
      A paramterless ctor for XmlEncoder based decoding.
    • CrossSectionViewManager

      public CrossSectionViewManager(ViewContext viewContext, ViewDescriptor desc, String properties) throws VisADException, RemoteException
      Create a CrossSectionViewManager with the given context, descriptor, object store and properties string.
      Parameters:
      viewContext - Provides a context for the VM to be in.
      desc - The ViewDescriptor that identifies this VM
      properties - A set of ";" delimited name-value pairs.
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • CrossSectionViewManager

      public CrossSectionViewManager(ViewContext viewContext, ViewDescriptor desc, String properties, AnimationInfo animationInfo) throws VisADException, RemoteException
      Create a CrossSectionViewManager with the given context, descriptor, object store, properties string and animation state.
      Parameters:
      viewContext - Provides a context for the VM to be in.
      desc - The ViewDescriptor that identifies this VM
      properties - A set of ";" delimited name-value pairs.
      animationInfo - Initial animation properties
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
  • Method Details

    • initializeViewMenu

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

      protected DisplayMaster doMakeDisplayMaster() throws VisADException, RemoteException
      Factory method for creating the display master
      Overrides:
      doMakeDisplayMaster in class ViewManager
      Returns:
      The Display Master
      Throws:
      RemoteException - On badness
      VisADException - On badness
    • init

      protected void init() throws VisADException, RemoteException
      Initialize this object. This creates and initializes the XSDisplay.
      Overrides:
      init in class ViewManager
      Throws:
      VisADException - the VisAD exception
      RemoteException - the remote exception
    • isPropsComponentInstantiated

      public boolean isPropsComponentInstantiated()
      This was added to avoid calling doApplyProperties on this view if the Properties Dialog has not been instantiated. This can happen for example if the user does Edit -> Change Display Unit
      Returns:
      the propsComponentInstantiated
    • getPropertiesComponent

      public JComponent getPropertiesComponent()
      Get the component for setting properties on the display.
      Overrides:
      getPropertiesComponent in class ViewManager
      Returns:
      the component
    • getDefaultForeground

      protected Color getDefaultForeground()
      Get the default foreground color
      Overrides:
      getDefaultForeground in class ViewManager
      Returns:
      the color
    • getDefaultBackground

      protected Color getDefaultBackground()
      Get the default background color
      Overrides:
      getDefaultBackground in class ViewManager
      Returns:
      the color
    • applyPreferences

      public void applyPreferences()
      Some user preferences have changed.
      Overrides:
      applyPreferences in class ViewManager
    • getXSDisplay

      public XSDisplay getXSDisplay()
      Get the cross section display that this view manager uses.
      Returns:
      XSDisplay
    • 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
    • doMakeContents

      protected Container doMakeContents()
      Create the GUI. This is a titled border around the XSDisplay.
      Overrides:
      doMakeContents in class ViewManager
      Returns:
      The GUI
    • setDisplayTitle

      public void setDisplayTitle(String titlePart)
      Set the title shown in the gui by appending the given titlePart to the name of the XSDisplay.
      Parameters:
      titlePart - The suffix
    • setNewDisplayTitle

      public void setNewDisplayTitle(String newTitle)
      Make this String the new title on the display
      Parameters:
      newTitle - The new title
    • getShowSideLegend

      public boolean getShowSideLegend()
      Don't show the side legend
      Overrides:
      getShowSideLegend in class ViewManager
      Returns:
      false
    • getTypeName

      public String getTypeName()
      What type of view is this
      Overrides:
      getTypeName in class ViewManager
      Returns:
      The type of view
    • 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.
    • makeShowMenu

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