All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.mit.ai.psg.jevaESUI.JevaESUI

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----edu.mit.ai.psg.jevaESUI.JevaESUI

public class JevaESUI
extends Applet
implements ActionListener
JevaESUI is the user interface for the JevaES Java Expression & Statement evaluator. JevaESUI can be used as In any situation, results can be explored in an outline tree using Jexa, and objects found in Jexa can become parameters of statements and expressions.

Author:
CarlManning, caroma@ai.mit.edu
Copyright (c) 1997, 1998 Massachusetts Institute of Technology
See Also:
JevaES, Jexa

Variable Index

 o DontRedirectSystemOutAndErr
option bits fit into a 32 bit int.
 o err
PrintWriter stream for printing errors to result pane.
 o NoThrowDeclarations
default empty array argument for repl(...
 o out
PrintWriter stream for printing to result pane.
 o results
Vector of result values from expressions typed at the window
 o systemErr
Saved system.err present when loaded
 o systemOut
Saved system.out present when loaded

Constructor Index

 o JevaESUI()

Method Index

 o actionPerformed(ActionEvent)
Start up window frame when applet button is pushed.
 o awaitResult(Container)
 o dontRedirectSystemOutAndErr(int)
 o getHerald()
 o init()
Applet startup: Starts a window at which users can type top level expressions.
 o main(String[])
Application Startup: Starts a window at which users can type top level expressions.
 o repl()
Read-Eval-Print-Loop: creates a new window in which user may type java expressions and statements, including return to return a value.
 o repl(int, String, Class, Class[], IEnv)
Read-Eval-Print-Loop: creates a new window in which user may type java expressions and statements, including return to return a value.
 o replTop()
Top read-eval-print-loop: creates a new window in which user may type java expressions and statements.

Variables

 o out
 public static PrintWriter out
PrintWriter stream for printing to result pane.

 o err
 public static PrintWriter err
PrintWriter stream for printing errors to result pane.

 o systemOut
 public static PrintStream systemOut
Saved system.out present when loaded

 o systemErr
 public static PrintStream systemErr
Saved system.err present when loaded

 o results
 public static Vector results
Vector of result values from expressions typed at the window

 o DontRedirectSystemOutAndErr
 public static final int DontRedirectSystemOutAndErr
option bits fit into a 32 bit int. 0 is default for each option. For applets in security sandbox, use DontRedirectSystemOutAndErr

 o NoThrowDeclarations
 public static final Class NoThrowDeclarations[]
default empty array argument for repl(... throwClasses)

Constructors

 o JevaESUI
 public JevaESUI()

Methods

 o main
 public static void main(String ignore[])
Application Startup: Starts a window at which users can type top level expressions.

 o init
 public void init()
Applet startup: Starts a window at which users can type top level expressions.

Overrides:
init in class Applet
 o actionPerformed
 public void actionPerformed(ActionEvent e)
Start up window frame when applet button is pushed.

 o dontRedirectSystemOutAndErr
 public static boolean dontRedirectSystemOutAndErr(int options)
 o replTop
 public static void replTop()
Top read-eval-print-loop: creates a new window in which user may type java expressions and statements. Returns when window is closed.

 o repl
 public static Object repl() throws Throwable, AWTException
Read-Eval-Print-Loop: creates a new window in which user may type java expressions and statements, including return to return a value.

Throws: Throwable
--- throws anything user throws.
Throws: AWTException
if window is closed.
 o repl
 public static Object repl(int options,
                           String initialMessage,
                           Class returnClass,
                           Class throwClasses[],
                           IEnv env) throws Throwable, AWTException
Read-Eval-Print-Loop: creates a new window in which user may type java expressions and statements, including return to return a value.

Parameters:
options - Option flag bits or'ed together; 0 is default. Applets: require DontRedirectSystemOutAndErr due to security sandbox.
initialMessage - Non-null text replaces herald; if called from a breakpoint, a good practice is to show user contents of env.
returnClass - user may only return a value of this class (like method return type); Object.class is default. Use void.class for void result. If null, never returns (like a top level loop).
throwClasses - user may only throw Throwables which are instances of these classes, or instances of Error or RuntimeException (like method throw declarations). If null, defaults to no delcarations.
env - initial environment created with JevaES.makeDefaultEnv, JevaES.extendEnv(), or JevaES.parseEval..Statement If null, defaults to JevaES.makeDefaultEnv() Applet sandbox requires JevaES.checkPackageNames==false .
Throws: Throwable
--- throws anything user throws compatibile with throwClasses
Throws: AWTException
if window is closed.
 o awaitResult
 public static Object awaitResult(Container container) throws Throwable, AWTException
 o getHerald
 public static String getHerald()

All Packages  Class Hierarchy  This Package  Previous  Next  Index