Package ucar.unidata.idv.ui
Class JythonShell
java.lang.Object
ucar.unidata.ui.InteractiveShell
ucar.unidata.idv.ui.JythonShell
- All Implemented Interfaces:
EventListener,HyperlinkListener
This class provides an interactive shell for running JYthon
- Version:
- $Revision: 1.50 $Date: 2007/08/21 12:15:45 $
- Author:
- IDV development team
-
Field Summary
FieldsFields inherited from class ucar.unidata.ui.InteractiveShell
commandArea, commandFld, contents, editorPane, frame, history, historyIdx, sb -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear everything, gui and make new interpprotected JMenuBarMake menu barvoidevalvoidTake all of the commands and write them to the libraryprotected StringformatCode(String code) Format code to outputbooleanGet the AutoSelect property.protected List_more_protected Listget menu itemsprotected voidhandleKeyPress(KeyEvent e, JTextComponent cmdFld) handle eventprotected voidhandleRightMouseClick(JTextComponent commandFld, MouseEvent e) handle eventvoidinsertAction(String action) Add the idv actionvoidprint the historyvoidlistVars()List the variables in the interpreterprotected voidThis gets called by the base class to make the frame.voidprint typevoidwrite the hostoryvoidsetAutoSelect(boolean value) Set the AutoSelect property.voidshowHelp()show helpvoidshowProcedurePopup(JTextComponent cmdFld) popup menuMethods inherited from class ucar.unidata.ui.InteractiveShell
clearOutput, close, doMakeContents, endBufferingOutput, eval, flipField, getHref, hyperlinkUpdate, init, insert, insertText, output, setText, show, showNormalCursor, showWaitCursor, startBufferingOutput, toFront
-
Field Details
-
PROP_JYTHON_SHELL_HISTORY
property that holds the history- See Also:
-
-
Constructor Details
-
JythonShell
ctor- Parameters:
theIdv- idv
-
-
Method Details
-
listHistory
public void listHistory()print the history -
saveHistory
public void saveHistory()write the hostory -
makeFrame
protected void makeFrame()This gets called by the base class to make the frame. If you don't want this to popup then make this method a noop You can access the GUI contents with the member contents- Overrides:
makeFramein classInteractiveShell
-
showProcedurePopup
popup menu- Parameters:
cmdFld- field
-
listVars
public void listVars()List the variables in the interpreter -
insertAction
Add the idv action- Parameters:
action- action
-
handleKeyPress
handle event- Overrides:
handleKeyPressin classInteractiveShell- Parameters:
e- eventcmdFld- field
-
showHelp
public void showHelp()show help -
exportHistory
public void exportHistory()Take all of the commands and write them to the library -
clear
public void clear()Clear everything, gui and make new interp- Overrides:
clearin classInteractiveShell
-
doMakeMenuBar
Make menu bar- Overrides:
doMakeMenuBarin classInteractiveShell- Returns:
- menu bar
-
getDisplayMenuItems
get menu items- Returns:
- items
-
getDataMenuItems
_more_- Returns:
- _more_
-
handleRightMouseClick
handle event- Overrides:
handleRightMouseClickin classInteractiveShell- Parameters:
commandFld- fielde- event
-
formatCode
Format code to output- Overrides:
formatCodein classInteractiveShell- Parameters:
code- code- Returns:
- formatted code
-
eval
eval- Overrides:
evalin classInteractiveShell- Parameters:
jython- jython
-
printType
print type- Parameters:
d- data
-
setAutoSelect
public void setAutoSelect(boolean value) Set the AutoSelect property.- Parameters:
value- The new value for AutoSelect
-
getAutoSelect
public boolean getAutoSelect()Get the AutoSelect property.- Returns:
- The AutoSelect
-