abbot.script
Class Appletviewer
java.lang.Object
abbot.script.Step
abbot.script.Call
abbot.script.Launch
abbot.script.Appletviewer
- All Implemented Interfaces:
- Serializable, XMLConstants, XMLifiable
- public class Appletviewer
- extends Launch
Provides applet launch capability. Usage:
<applet code="..." [codebase="..."] [params="..."]
[archive="..."]>
The attributes are equivalent to those provided in the HTML
applet
tag. The params
attribute is a
comma-separated list of name=value
pairs, which will be passed
to the applet within the applet
tag as param
elements.
WARNING: Closing the appletviewer window from the window manager
close button will result in any subsequent launches locking up the event
queue. Always use its Quit menu item or use the #terminate()
method here.
- See Also:
- Serialized Form
Fields inherited from interface abbot.script.XMLConstants |
TAG_ACTION, TAG_APPLETVIEWER, TAG_ARCHIVE, TAG_ARGS, TAG_ASSERT, TAG_AWT, TAG_AWTTESTSCRIPT, TAG_BORDER_TITLE, TAG_CALL, TAG_CLASS, TAG_CLASSPATH, TAG_CODE, TAG_CODEBASE, TAG_COMMENT, TAG_COMPONENT, TAG_COUNT, TAG_DELEGATE, TAG_DESC, TAG_DOCBASE, TAG_EVENT, TAG_EXPR, TAG_FILENAME, TAG_FORKED, TAG_HEIGHT, TAG_HORDER, TAG_ICON, TAG_ID, TAG_INDEX, TAG_INVERT, TAG_INVOKER, TAG_KEYCHAR, TAG_KEYCODE, TAG_KIND, TAG_LABEL, TAG_LAUNCH, TAG_METHOD, TAG_MODIFIERS, TAG_NAME, TAG_PARAMS, TAG_PARENT, TAG_POLL_INTERVAL, TAG_PROPERTY, TAG_ROOT, TAG_SAMPLE, TAG_SCRIPT, TAG_SEQUENCE, TAG_SLOW, TAG_STOP_ON_ERROR, TAG_STOP_ON_FAILURE, TAG_TAG, TAG_TERMINATE, TAG_TEXT, TAG_THREADED, TAG_TIMEOUT, TAG_TITLE, TAG_TRIGGER, TAG_TYPE, TAG_VALUE, TAG_VMARGS, TAG_VORDER, TAG_WAIT, TAG_WEIGHTED, TAG_WIDTH, TAG_WINDOW, TAG_X, TAG_Y |
Methods inherited from class abbot.script.Launch |
createClassLoader, getClasspath, getMethod, getTarget, getTargetClass, isThreaded, launch, resolveClass, setClasspath, setThreaded, setThreadedLaunchListener |
Methods inherited from class abbot.script.Call |
disambiguateMethod, evaluateParameter, evaluateParameters, getArgs, getArguments, getArgumentsDescription, getEncodedArguments, getMethodName, getMethods, getTargetClassName, invoke, resolveMethod, resolveMethods, setArguments, setArguments |
Methods inherited from class abbot.script.Step |
addAttributes, addContent, createAttributeMap, createStep, createStep, getDescription, getResolver, parseStepAttributes, resolveTester, run, setDescription, setScriptError, simpleClassName, toEditableString, toString, toXML, toXMLString, usage, usage |
Appletviewer
public Appletviewer(Resolver resolver,
Map attributes)
- Create an applet-launching step.
Appletviewer
public Appletviewer(Resolver resolver,
String description,
String code,
Map params,
String codebase,
String archive,
String classpath)
- Create an applet-launching step.
runStep
public void runStep()
throws Throwable
- Run this step. Causes the appropriate HTML file to be written for use
by appletviewer and its path used as the sole argument.
- Overrides:
runStep
in class Launch
- Throws:
Throwable
generateHTML
protected String generateHTML()
- Generate HTML suitable for launching this applet.
setTargetClassName
public void setTargetClassName(String name)
- Overrides:
setTargetClassName
in class Call
setMethodName
public void setMethodName(String name)
- Overrides:
setMethodName
in class Call
setCode
public void setCode(String code)
getCode
public String getCode()
setCodebase
public void setCodebase(String codebase)
getCodebase
public String getCodebase()
setArchive
public void setArchive(String archive)
getArchive
public String getArchive()
getWidth
public String getWidth()
setWidth
public void setWidth(String width)
getHeight
public String getHeight()
setHeight
public void setHeight(String height)
getParams
public Map getParams()
setParams
public void setParams(Map params)
parseParams
protected Map parseParams(String attribute)
getParamsAsArray
public String[] getParamsAsArray()
getParamsAttribute
public String getParamsAttribute()
getAttributes
public Map getAttributes()
- Description copied from class:
Call
- Attributes to save in script.
- Overrides:
getAttributes
in class Launch
getDefaultDescription
public String getDefaultDescription()
- Description copied from class:
Step
- Return a reasonable default description for this script step.
This value is used in the absence of an explicit description.
- Overrides:
getDefaultDescription
in class Launch
getUsage
public String getUsage()
- Description copied from class:
Step
- Provide a usage String for this step.
- Overrides:
getUsage
in class Launch
getXMLTag
public String getXMLTag()
- Description copied from class:
Step
- Define the XML tag to use for this script step.
- Overrides:
getXMLTag
in class Launch
getClassLoader
public ClassLoader getClassLoader()
- Returns the applet class loader.
- Overrides:
getClassLoader
in class Launch
installContext
public void installContext()
- Description copied from class:
Launch
- Install the class loader context for the code being launched. The
context class loader for the current thread is modified.
- Overrides:
installContext
in class Launch
terminate
protected void terminate()
- To properly terminate, we need to invoke AppletViewer's appletQuit()
method (protected, but accessible).
- Overrides:
terminate
in class Launch
uninstallContext
public void uninstallContext()
- Description copied from class:
Launch
- Remove the class loader context. May be invoked from any thread.
- Overrides:
uninstallContext
in class Launch
Copyright © 2002-2004 Timothy Wall. All Rights Reserved.
Abbot is hosted on