ucar.unidata.ui
Class InteractiveShell

java.lang.Object
  extended by ucar.unidata.ui.InteractiveShell
All Implemented Interfaces:
EventListener, HyperlinkListener
Direct Known Subclasses:
JythonShell, SqlShell

public class InteractiveShell
extends Object
implements HyperlinkListener

This class provides an abstract interactive shell

Version:
$Revision: 1.50 $Date: 2007/08/21 12:15:45 $
Author:
IDV development team

Field Summary
protected  JTextArea commandArea
          _more_
protected  JTextField commandFld
          _more_
protected  JComponent contents
          _more_
protected  JEditorPane editorPane
          _more_
protected  JFrame frame
          _more_
protected  List history
          _more_
protected  int historyIdx
          _more_
protected  StringBuffer sb
          _more_
 
Constructor Summary
InteractiveShell(String title)
          _more_
 
Method Summary
 void clear()
          _more_
 void clearOutput()
           
 void close()
           
protected  JComponent doMakeContents()
          _more_
protected  JMenuBar doMakeMenuBar()
          _more_
protected  void endBufferingOutput()
           
 void eval()
          _more_
 void eval(String code)
          _more_
 void flipField()
          _more_
protected  String formatCode(String code)
          _more_
protected  String getHref(String text, String label)
           
protected  void handleKeyPress(KeyEvent e, JTextComponent cmdFld)
          _more_
protected  void handleRightMouseClick(JTextComponent commandFld, MouseEvent e)
          _more_
 void hyperlinkUpdate(HyperlinkEvent e)
          _more_
protected  void init()
          _more_
 void insert(String s)
          _more_
 void insertText(String t)
          _more_
protected  void makeFrame()
          _more_
 void output(String m)
          _more_
 void setText(String text)
           
 void show()
           
protected  void showNormalCursor()
           
protected  void showWaitCursor()
           
protected  void startBufferingOutput()
           
 void toFront()
          _more_
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

frame

protected JFrame frame
_more_


commandFld

protected JTextField commandFld
_more_


commandArea

protected JTextArea commandArea
_more_


editorPane

protected JEditorPane editorPane
_more_


sb

protected StringBuffer sb
_more_


history

protected List history
_more_


historyIdx

protected int historyIdx
_more_


contents

protected JComponent contents
_more_

Constructor Detail

InteractiveShell

public InteractiveShell(String title)
_more_

Parameters:
title - _more_
Method Detail

makeFrame

protected void makeFrame()
_more_


close

public void close()

show

public void show()

getHref

protected String getHref(String text,
                         String label)

showWaitCursor

protected void showWaitCursor()

showNormalCursor

protected void showNormalCursor()

init

protected void init()
_more_


hyperlinkUpdate

public void hyperlinkUpdate(HyperlinkEvent e)
_more_

Specified by:
hyperlinkUpdate in interface HyperlinkListener
Parameters:
e - _more_

setText

public void setText(String text)

doMakeContents

protected JComponent doMakeContents()
_more_

Returns:
_more_

handleRightMouseClick

protected void handleRightMouseClick(JTextComponent commandFld,
                                     MouseEvent e)
_more_

Parameters:
commandFld - _more_
e - _more_

doMakeMenuBar

protected JMenuBar doMakeMenuBar()
_more_

Returns:
_more_

toFront

public void toFront()
_more_


flipField

public void flipField()
_more_


insertText

public void insertText(String t)
_more_

Parameters:
t - _more_

handleKeyPress

protected void handleKeyPress(KeyEvent e,
                              JTextComponent cmdFld)
_more_

Parameters:
e - _more_
cmdFld - _more_

insert

public void insert(String s)
_more_

Parameters:
s - _more_

clear

public void clear()
_more_


clearOutput

public void clearOutput()

eval

public void eval()
_more_


startBufferingOutput

protected void startBufferingOutput()

endBufferingOutput

protected void endBufferingOutput()

output

public void output(String m)
_more_

Parameters:
m - _more_

eval

public void eval(String code)
_more_

Parameters:
code - the code that was evaluated

formatCode

protected String formatCode(String code)
_more_

Parameters:
code - _more_
Returns:
_more_