Class JythonManager

All Implemented Interfaces:
OnFileChangeListener, ActionListener, EventListener, IdvConstants

public class JythonManager extends JythonManager
Overrides the IDV's JythonManager to associate a JythonShell with a given JythonManager.
  • Field Details

  • Constructor Details

  • Method Details

    • createShell

      Create a Jython shell, if one doesn't already exist. This will also bring the window "to the front" of the rest of the McIDAS-V session.
      Overrides:
      createShell in class JythonManager
      Returns:
      JythonShell object for interactive Jython usage.
    • getShell

      Returns the Jython Shell associated with this JythonManager.
      Returns:
      Jython Shell being used by this manager. May be null.
    • createInterpreter

      public org.python.util.PythonInterpreter createInterpreter()
      Create and initialize a Jython interpreter.
      Overrides:
      createInterpreter in class JythonManager
      Returns:
      Newly created Jython interpreter.
    • removeInterpreter

      public void removeInterpreter(org.python.util.PythonInterpreter interpreter)
      Removes the given interpreter from the list of active interpreters.

      Also attempts to close any Jython Shell associated with the interpreter.

      Overrides:
      removeInterpreter in class JythonManager
      Parameters:
      interpreter - Interpreter to remove. Should not be null.
    • evaluateTrusted

      public void evaluateTrusted(String code, Map<String,Object> properties)
      Overridden so that McIDAS-V can add an islInterpreter object to the interpreter's locals (before executing the contents of .
      Overrides:
      evaluateTrusted in class JythonManager
      Parameters:
      code - Jython code to evaluate. null is probably a bad idea.
      properties - String->Object pairs to insert into the locals. Parameter may be null.
    • doMakeFormulaDataSourceMenuItems

      Return the list of menu items to use when the user has clicked on a formula DataSource.
      Overrides:
      doMakeFormulaDataSourceMenuItems in class JythonManager
      Parameters:
      dataSource - The data source clicked on.
      Returns:
      List of menu items.
    • shouldWarnImageCapturing

      public static boolean shouldWarnImageCapturing()
      Determine if the user should be warned about a potential bug that we've been unable to resolve.

      The conditions for the bug to appear are:

      • In background mode (i.e. running a script).
      • Geometry by reference is disabled.
      • New font rendering is enabled.
      Returns:
      true if the user's configuration has made it possible for bug to manifest.