websphinx.workbench
Class Netscape

java.lang.Object
  |
  +--websphinx.workbench.Browser
        |
        +--websphinx.workbench.Netscape
All Implemented Interfaces:
LinkViewListener, ScriptInterpreter

public class Netscape
extends Browser
implements ScriptInterpreter


Field Summary
 
Fields inherited from class websphinx.workbench.Browser
context, frameName
 
Constructor Summary
Netscape(java.applet.AppletContext context)
           
Netscape(java.applet.AppletContext context, java.lang.String frameName)
           
 
Method Summary
 java.lang.Object apply(java.lang.Object func, java.lang.Object[] args)
          Call a procedure or function.
 java.lang.Object eval(java.lang.String expression)
          Evaluate an expression in the script language.
 java.lang.Object get(java.lang.String name)
          Get a variable defined in the interpreter's global namespace
 java.lang.String getLanguage()
          Return name of language this interpreter handles.
 ScriptInterpreter getScriptInterpreter()
           
 java.lang.Object lambda(java.lang.String[] args, java.lang.String body)
          Construct a procedure or function.
 void set(java.lang.String name, java.lang.Object object)
          Set a variable in the interpreter's global namespace
 void show(java.net.URL url)
           
 
Methods inherited from class websphinx.workbench.Browser
show, show, show, viewLink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Netscape

public Netscape(java.applet.AppletContext context)

Netscape

public Netscape(java.applet.AppletContext context,
                java.lang.String frameName)
Method Detail

getScriptInterpreter

public ScriptInterpreter getScriptInterpreter()

getLanguage

public java.lang.String getLanguage()
Description copied from interface: ScriptInterpreter
Return name of language this interpreter handles.

Specified by:
getLanguage in interface ScriptInterpreter
Following copied from interface: websphinx.workbench.ScriptInterpreter
Returns:
Language name, such as "Javascript" or "TCL"

eval

public java.lang.Object eval(java.lang.String expression)
                      throws ScriptException
Description copied from interface: ScriptInterpreter
Evaluate an expression in the script language.

Specified by:
eval in interface ScriptInterpreter
Following copied from interface: websphinx.workbench.ScriptInterpreter
Parameters:
expression - Expression to evaluate

lambda

public java.lang.Object lambda(java.lang.String[] args,
                               java.lang.String body)
                        throws ScriptException
Description copied from interface: ScriptInterpreter
Construct a procedure or function.

Specified by:
lambda in interface ScriptInterpreter
Following copied from interface: websphinx.workbench.ScriptInterpreter
Parameters:
args - Argument names
body - Function body
Returns:
Function object suitable for apply()

apply

public java.lang.Object apply(java.lang.Object func,
                              java.lang.Object[] args)
                       throws ScriptException
Description copied from interface: ScriptInterpreter
Call a procedure or function.

Specified by:
apply in interface ScriptInterpreter
Following copied from interface: websphinx.workbench.ScriptInterpreter
Parameters:
func - Function object (previously returned by lambda()
args - Arguments for the function

set

public void set(java.lang.String name,
                java.lang.Object object)
Description copied from interface: ScriptInterpreter
Set a variable in the interpreter's global namespace

Specified by:
set in interface ScriptInterpreter
Following copied from interface: websphinx.workbench.ScriptInterpreter
Parameters:
name - Name of variable
object - New value for variable

get

public java.lang.Object get(java.lang.String name)
Description copied from interface: ScriptInterpreter
Get a variable defined in the interpreter's global namespace

Specified by:
get in interface ScriptInterpreter
Following copied from interface: websphinx.workbench.ScriptInterpreter
Parameters:
name - Name of variable to get
Returns:
Value of variable, or null if not defined

show

public void show(java.net.URL url)
Overrides:
show in class Browser