Class IdvBase

java.lang.Object
ucar.unidata.idv.IdvBase
All Implemented Interfaces:
IdvConstants, XmlPersistable
Direct Known Subclasses:
IntegratedDataViewer

public abstract class IdvBase extends Object implements IdvConstants, XmlPersistable
This is the base class for the IntegratedDataViewer. It holds a set of managers (e.g., IdvUIManager, DataManager) and has methods to create them and get them. These factory could be overwritten by derived classes to create their own kind of manager or editor or so some different initialization.
Version:
$Revision: 1.40 $Date: 2007/06/12 22:52:02 $
Author:
IDV development team
  • Field Details

    • idv

      protected IntegratedDataViewer idv
      The idv. This is really a pointer to this
    • args

      protected String[] args
      Command line arguments
    • resourceManager

      protected IdvResourceManager resourceManager
      The resource manager
    • pluginManager

      protected PluginManager pluginManager
      The plugin manager
    • vmManager

      protected VMManager vmManager
      The manager of ViewManagers
    • publishManager

      protected PublishManager publishManager
      Handles doing publishing of content
    • persistenceManager

      protected IdvPersistenceManager persistenceManager
      Handles bundle writing
    • displayConventions

      protected DisplayConventions displayConventions
      Handles the different display conventions
    • argsManager

      protected ArgsManager argsManager
      The command line argument manager
    • colorTableEditor

      protected ColorTableEditor colorTableEditor
      The color table editor.
    • colorTableManager

      protected ColorTableManager colorTableManager
      The color table manager.
    • stationModelManager

      protected StationModelManager stationModelManager
      The station model manager
    • aliasEditor

      protected AliasEditor aliasEditor
      The data alias editor
    • resourceViewer

      protected ResourceViewer resourceViewer
      _more_
    • projectionManager

      protected IdvProjectionManager projectionManager
      The porojection manager
    • autoDisplayEditor

      protected AutoDisplayEditor autoDisplayEditor
      The data alias editor
    • jythonManager

      protected JythonManager jythonManager
      The jython manager
    • paramDefaultsEditor

      protected ParamDefaultsEditor paramDefaultsEditor
      The parameter defaults editor
    • paramGroupsEditor

      protected ParamGroupsEditor paramGroupsEditor
      The parameter defaults editor
    • chooserManager

      protected IdvChooserManager chooserManager
      The chooser manager
    • dataManager

      protected DataManager dataManager
      The data manager
    • collabManager

      protected CollabManager collabManager
      Handles collaboration and the event capture
    • preferenceManager

      protected IdvPreferenceManager preferenceManager
      Handles the end user preferences
    • testManager

      protected ucar.unidata.idv.test.TestManager testManager
      Handles running tests, creating test archives, etc.
    • uiManager

      protected IdvUIManager uiManager
      Handles creating user interfaces, etc.
    • imageGenerator

      protected ImageGenerator imageGenerator
      Handles generating images, movies, etc.
    • stateManager

      protected StateManager stateManager
      Handles properties, etc.
    • installManager

      protected InstallManager installManager
      Handles reinstalling the IDV
  • Constructor Details

    • IdvBase

      public IdvBase(String[] args)
      Create the IdvBase
      Parameters:
      args - Command line arguments
  • Method Details

    • setIdv

      protected void setIdv(IntegratedDataViewer idv)
      Set the reference to the idv. This is really a reference to this IdvBase object, but the idv is used to pass in to the different managers and editors.
      Parameters:
      idv - The IDV
    • getIdv

      public IntegratedDataViewer getIdv()
      Get the IDV
      Returns:
      The idv
    • addPluginClass

      public static void addPluginClass(Class c)
      Add a class that was loaded in via the plugin mechanism. We check these classes when we are creating a manager
      Parameters:
      c - The class
    • makeManager

      protected Object makeManager(Class managerClass, Object[] args)
      Utility to make a manager class. This first sees if there is a sub-class of the given managerClass in th list of plugin classes If there is it will use that class. If args is null this method jsut does a newInstance If args is non-null we'll look for the right constructor
      Parameters:
      managerClass - Class to instantiate
      args - Args to pass in. May be null.
      Returns:
      Instantiated object
    • doMakeStationModelManager

      protected StationModelManager doMakeStationModelManager()
      Factory method to create the StationModelManager
      Returns:
      The station model manager
    • getStationModelManager

      public StationModelManager getStationModelManager()
      Create, if needed, and return the StationModelManager
      Returns:
      The station model manager
    • showStationModelEditor

      public void showStationModelEditor()
      Show the station model editor
    • doMakeArgsManager

      protected ArgsManager doMakeArgsManager(String[] args)
      Factory method to create the ArgsManager
      Parameters:
      args - The command lint arguments
      Returns:
      The command line argument manager
    • getPersistenceManager

      public IdvPersistenceManager getPersistenceManager()
      Get the persistence manager
      Returns:
      The persistence manager
    • doMakePersistenceManager

      protected IdvPersistenceManager doMakePersistenceManager()
      Factory method to create the IdvPersistenceManager
      Returns:
      The IdvPersistenceManager
    • getArgsManager

      public ArgsManager getArgsManager()
      Create, if needed, and return the ArgsManager
      Returns:
      The command line argument manager
    • doMakeDataManager

      protected DataManager doMakeDataManager()
      Factory method to create the DataManager
      Returns:
      The data manager
    • getDataManager

      public DataManager getDataManager()
      Create, if needed, and return the DataManager. This manages the creation and manipulation of the data sources.
      Returns:
      The data manager
    • doMakeDisplayConventions

      protected DisplayConventions doMakeDisplayConventions()
      Factory method to create the DisplayConventions
      Returns:
      The display conventions
    • getDisplayConventions

      public DisplayConventions getDisplayConventions()
      Create, if needed, and return the DisplayConventions. This manages the creation and manipulation of the data sources.
      Returns:
      The data manager
    • doMakeColorTableManager

      protected ColorTableManager doMakeColorTableManager()
      Factory method to create the ColorTableManager
      Returns:
      The color table manager
    • getColorTableManager

      public ColorTableManager getColorTableManager()
      Create, if needed, and return the ColorTableManager
      Returns:
      The color table manager
    • doMakeTestManager

      protected ucar.unidata.idv.test.TestManager doMakeTestManager()
      Factory method to create the TestManager.
      Returns:
      The test manager
    • getTestManager

      public ucar.unidata.idv.test.TestManager getTestManager()
      Create, if needed, and return the TestManager. This class runs the idv in test mode and also creates the test archives.
      Returns:
      The test manager
    • doMakeVMManager

      protected VMManager doMakeVMManager()
      Factory method to create the VMManager. This manages the set of ViewManagers. It really should be called the ViewManagerManager
      Returns:
      The ViewManager manager
    • getVMManager

      public VMManager getVMManager()
      Create, if needed, and return the VMManager.
      Returns:
      The ViewManager manager
    • doMakePublishManager

      protected PublishManager doMakePublishManager()
      Factory method to create the PublishManager This manages publishing content to weblogs, etc.
      Returns:
      The Publish manager
    • getPublishManager

      public PublishManager getPublishManager()
      Create, if needed, and return PublishManager
      Returns:
      The publish manager
    • doMakeIdvUIManager

      protected IdvUIManager doMakeIdvUIManager()
      Factory method to create the IdvUIManager
      Returns:
      The UI manager
    • getIdvUIManager

      public IdvUIManager getIdvUIManager()
      Create, if needed, and return the IdvUIManager
      Returns:
      The UI manager
    • doMakeImageGenerator

      protected ImageGenerator doMakeImageGenerator()
      Factory method to create the ImageGenerator
      Returns:
      The image generator
    • getImageGenerator

      public ImageGenerator getImageGenerator()
      Create, if needed, and return the ImageGenerator
      Returns:
      The ImageGenerator
    • doMakeStateManager

      protected StateManager doMakeStateManager()
      Factory method to create the StateManager.
      Returns:
      The state manager
    • getStateManager

      public StateManager getStateManager()
      Create, if needed, and return the StateManager
      Returns:
      The state manager
    • doMakeInstallManager

      protected InstallManager doMakeInstallManager()
      Factory method to create the InstallManager.
      Returns:
      The install manager
    • getInstallManager

      public InstallManager getInstallManager()
      Create, if needed, and return the InstallManager
      Returns:
      The install manager
    • doMakeJythonManager

      protected JythonManager doMakeJythonManager()
      Factory method to create the JythonManager
      Returns:
      The jython manager
    • getJythonManager

      public JythonManager getJythonManager()
      Create, if needed, and return the JythonManager
      Returns:
      The jython manager
    • doMakeIdvChooserManager

      protected IdvChooserManager doMakeIdvChooserManager()
      Factory method to create the IdvChooserManager
      Returns:
      The Chooser manager
    • getIdvChooserManager

      public IdvChooserManager getIdvChooserManager()
      Create, if needed, and return the IdvChooserManager
      Returns:
      The Chooser manager
    • showChooser

      public void showChooser()
      Call show on the IdvChooserManager
    • showChooserModal

      public void showChooserModal()
      Call show on the IdvChooserManager
    • doMakeCollabManager

      protected CollabManager doMakeCollabManager()
      Factory method to create the CollabManager
      Returns:
      The collaboration manager
    • getCollabManager

      public CollabManager getCollabManager()
      Create, if needed, and return the CollabManager
      Returns:
      The collaboration manager
    • haveCollabManager

      public boolean haveCollabManager()
      Do we have a non-null collab manager
      Returns:
      Have a collab manager
    • doMakeAliasEditor

      protected AliasEditor doMakeAliasEditor()
      Factory method to create the AliasEditor
      Returns:
      The alias editor
    • getAliasEditor

      public AliasEditor getAliasEditor()
      Create, if needed, and return the AliasEditor
      Returns:
      The alias editor
    • showAliasEditor

      public void showAliasEditor()
      Show the alias editor
    • doMakeResourceViewer

      protected ResourceViewer doMakeResourceViewer()
      _more_
      Returns:
      _more_
    • getResourceViewer

      public ResourceViewer getResourceViewer()
      Create, if needed, and return the AliasEditor
      Returns:
      The alias editor
    • showResourceViewer

      public void showResourceViewer()
      Show the alias editor
    • doMakeIdvProjectionManager

      protected IdvProjectionManager doMakeIdvProjectionManager()
      Factory method to create the ProjectionManager
      Returns:
      The alias editor
    • getIdvProjectionManager

      public IdvProjectionManager getIdvProjectionManager()
      Create, if needed, and return the ProjectionManager
      Returns:
      The projection manager
    • showIdvProjectionManager

      public void showIdvProjectionManager()
      Show the alias editor
    • doMakeAutoDisplayEditor

      protected AutoDisplayEditor doMakeAutoDisplayEditor()
      Factory method to create the AutoDisplayEditor
      Returns:
      The auto display editor
    • getAutoDisplayEditor

      public AutoDisplayEditor getAutoDisplayEditor()
      Create, if needed, and return the AutoDisplayEditor
      Returns:
      The auto display editor
    • showAutoDisplayEditor

      public void showAutoDisplayEditor()
      Show the alias editor
    • doMakeParamDefaultsEditor

      protected ParamDefaultsEditor doMakeParamDefaultsEditor()
      Factory method to create the ParamDefaultsEditor
      Returns:
      The parameter defaults editor
    • getParamDefaultsEditor

      public ParamDefaultsEditor getParamDefaultsEditor()
      Create, if needed, and return the ParamDefaultsEditor
      Returns:
      The parameter defaults editor
    • showDefaultsEditor

      public void showDefaultsEditor()
      Show the param defaults editor
    • doMakeParamGroupsEditor

      protected ParamGroupsEditor doMakeParamGroupsEditor()
      Factory method to create the ParamGroupsEditor
      Returns:
      The parameter Groups editor
    • getParamGroupsEditor

      public ParamGroupsEditor getParamGroupsEditor()
      Create, if needed, and return the ParamGroupsEditor
      Returns:
      The parameter Groups editor
    • showParamGroupsEditor

      public void showParamGroupsEditor()
      Show the param defaults editor
    • doMakeColorTableEditor

      protected ColorTableEditor doMakeColorTableEditor()
      Factory method to create the ColorTableEditor
      Returns:
      The color table editor
    • getColorTableEditor

      public ColorTableEditor getColorTableEditor()
      Create, if needed, and return the ColorTableEditor
      Returns:
      The color table editor
    • showColorTableEditor

      public void showColorTableEditor()
      Show the color table editor
    • showColorTableEditor

      public void showColorTableEditor(String colorTableName)
      Show the color table editor with the color table with the given name (if non-null)
      Parameters:
      colorTableName - The name of the color table to show
    • doMakePreferenceManager

      protected IdvPreferenceManager doMakePreferenceManager()
      Factory method to create the IdvPreferenceManager
      Returns:
      The preference manager
    • getPreferenceManager

      public IdvPreferenceManager getPreferenceManager()
      Create, if needed, and return the IdvPreferenceManager
      Returns:
      The preference manager
    • showPreferenceManager

      public void showPreferenceManager()
      Create (if null) and popup the user preference dialog window.
    • doMakeResourceManager

      protected IdvResourceManager doMakeResourceManager()
      Factory method to create the IdvResourceManager
      Returns:
      The resource manager
    • getResourceManager

      public IdvResourceManager getResourceManager()
      Create, if needed, and return the IdvResourceManager
      Returns:
      The resource manager
    • doMakePluginManager

      protected PluginManager doMakePluginManager()
      Factory method to create the PluginManager
      Returns:
      The plugin manager
    • getPluginManager

      public PluginManager getPluginManager()
      Create, if needed, and return the IdvResourceManager
      Returns:
      The resource manager
    • getObjectStore

      public XmlObjectStore getObjectStore()
      This simply returns the call to getStore. We have this here because getStore returns an IdvObjectStore, not an XmlObjectStore which is called for in the inteface.
      Returns:
      The XmlObjectStore
    • getStore

      public IdvObjectStore getStore()
      Create the IdvObjectStore (if null) and return it.
      Returns:
      The XmlObjectStore
    • getProperty

      public boolean getProperty(String name, boolean dflt)
      Utility method to retrieve a boolean property from the idv properties. If the property does not exists return the given default value.
      Parameters:
      name - The name of the property
      dflt - The default value if the property is not found
      Returns:
      The given property or the dflt value
    • getProperty

      public int getProperty(String name, int dflt)
      Utility method to retrieve an int property from the idv properties. If the property does not exists return the given default value.
      Parameters:
      name - The name of the property
      dflt - The default value if the property is not found
      Returns:
      The given property or the dflt value
    • getProperty

      public double getProperty(String name, double dflt)
      Utility method to retrieve an int property from the idv properties. If the property does not exists return the given default value.
      Parameters:
      name - The name of the property
      dflt - The default value if the property is not found
      Returns:
      The given property or the dflt value
    • getProperty

      public String getProperty(String name, String dflt)
      Utility method to retrieve a String property from the idv properties. If the property does not exists return the given default value.
      Parameters:
      name - The name of the property
      dflt - The default value if the property is not found
      Returns:
      The given property or the dflt value
    • getColorProperty

      public Color getColorProperty(String name, Color dflt)
      Utility method to retrieve a String property from the idv properties. If the property does not exists return the given default value.
      Parameters:
      name - The name of the property
      dflt - The default value if the property is not found
      Returns:
      The given property or the dflt value
    • getPreference

      public Object getPreference(String pref)
      Helper method that wraps getStore().get (pref)
      Parameters:
      pref - The name of the preference
      Returns:
      The value of the preference, or null if not found
    • getPreference

      public Object getPreference(String pref, Object dflt)
      Helper method that wraps getStore().get (pref)
      Parameters:
      pref - The name of the preference
      dflt - The default value to return if the preference is not found
      Returns:
      The preference value or the dflt
    • createElement

      public Element createElement(XmlEncoder encoder)
      Implement the XmlPersistable createElement method, just return null since we don't really want to be persisted.
      Specified by:
      createElement in interface XmlPersistable
      Parameters:
      encoder - The encoder doing the encoding
      Returns:
      null, because we don't want this object to actually be encoded
    • getEncoder

      protected XmlEncoder getEncoder()
    • initFromXml

      public boolean initFromXml(XmlEncoder encoder, Element element)
      Just needed so we can implement XmlPersistable
      Specified by:
      initFromXml in interface XmlPersistable
      Parameters:
      encoder - The encoder doing the encoding
      element - The xml element that defines the object
      Returns:
      Was this intialization successful