|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.unidata.ui.WindowHolder
ucar.unidata.idv.IdvManager
ucar.unidata.idv.JythonManager
edu.wisc.ssec.mcidasv.JythonManager
public class JythonManager
Overrides the IDV's JythonManager
to
associate a JythonShell
with a given JythonManager
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ucar.unidata.idv.JythonManager |
---|
JythonManager.LibHolder |
Field Summary | |
---|---|
private JythonShell |
jythonShell
Associated Jython Shell. |
private static org.slf4j.Logger |
logger
Trusty logging object. |
Fields inherited from class ucar.unidata.idv.JythonManager |
---|
CONSOLE_INIT, jythonLogger, PROP_JYTHON_EDITOR |
Fields inherited from class ucar.unidata.ui.WindowHolder |
---|
contents, dialog, frame, window |
Constructor Summary | |
---|---|
JythonManager(IntegratedDataViewer idv)
Create the manager and call initPython. |
Method Summary | |
---|---|
org.python.util.PythonInterpreter |
createInterpreter()
Create and initialize a Jython interpreter. |
JythonShell |
createShell()
Create a Jython shell, if one doesn't already exist. |
List |
doMakeFormulaDataSourceMenuItems(DataSource dataSource)
Return the list of menu items to use when the user has clicked on a formula DataSource . |
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 . |
JythonShell |
getShell()
Returns the Jython Shell associated with this JythonManager . |
protected void |
initBasicInterpreter(org.python.util.PythonInterpreter interpreter)
Overridden so that McIDAS-V can inject a variable named _idv
into interpreter's globals. |
void |
removeInterpreter(org.python.util.PythonInterpreter interpreter)
Removes the given interpreter from the list of active interpreters. |
Methods inherited from class ucar.unidata.ui.WindowHolder |
---|
actionPerformed, close, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.ActionListener |
---|
actionPerformed |
Field Detail |
---|
private static final org.slf4j.Logger logger
private JythonShell jythonShell
null
.
Constructor Detail |
---|
public JythonManager(IntegratedDataViewer idv)
idv
- The IDV.Method Detail |
---|
public JythonShell createShell()
createShell
in class JythonManager
public JythonShell getShell()
JythonManager
.
null
.public org.python.util.PythonInterpreter createInterpreter()
createInterpreter
in class JythonManager
public void removeInterpreter(org.python.util.PythonInterpreter interpreter)
Also attempts to close any Jython Shell associated with the interpreter.
removeInterpreter
in class JythonManager
interpreter
- Interpreter to remove. Should not be null
.protected void initBasicInterpreter(org.python.util.PythonInterpreter interpreter)
_idv
into interpreter's
globals.
initBasicInterpreter
in class JythonManager
interpreter
- Jython interpreter being initialized by the IDV. Cannot be null
.public void evaluateTrusted(String code, Map<String,Object> properties)
islInterpreter
object
to the interpreter's locals (before executing the contents of
.
evaluateTrusted
in class JythonManager
code
- Jython code to evaluate. null
is probably a bad idea.properties
- String->Object
pairs to insert into the
locals. Parameter may be null
.public List doMakeFormulaDataSourceMenuItems(DataSource dataSource)
DataSource
.
doMakeFormulaDataSourceMenuItems
in class JythonManager
dataSource
- The data source clicked on.
List
of menu items.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |