|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.javatest.util.MainAppletContext
public class MainAppletContext
This class provides a means whereby tools can temporarily give access to a shared AppletContext and applet instance(s) which will be used in AppletContext tests. With hindsight, this code should probably be in com.sun.javatest.agent but the tests expect the class to be here in com.sun.javatest.util.
Constructor Summary | |
---|---|
MainAppletContext()
|
Method Summary | |
---|---|
static java.applet.Applet |
getAgentApplet()
Get the applet that has been identified as the JT Harness Agent applet. |
static java.applet.Applet |
getApplet(java.lang.String name)
Get the applet that has been registered with a given name. |
static java.applet.AppletContext |
getAppletContext()
Get the current AppletContext. |
static java.util.Enumeration |
getAppletNames()
Get an enumeration of all the names that have been used to register applets. |
static boolean |
isStarted()
Check the flag that indicates whether the agent applet has been started. |
static void |
putApplet(java.lang.String name,
java.applet.Applet applet)
Register an applet in a table of applets. |
static void |
setAgentApplet(java.applet.Applet applet)
Set the applet to be identified as the JT Harness Agent applet. |
static void |
setAppletContext(java.applet.AppletContext ctx)
Set the AppletContext in use, so that it might be shared. |
static void |
setStarted(boolean value)
Set a flag to indicate that the agent applet has been started. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MainAppletContext()
Method Detail |
---|
public static void setAppletContext(java.applet.AppletContext ctx)
ctx
- the AppletContext to be shared.getAppletContext()
public static java.applet.AppletContext getAppletContext()
setAppletContext(java.applet.AppletContext)
public static void putApplet(java.lang.String name, java.applet.Applet applet)
name
- the name with which to register the appletapplet
- the applet to be registeredgetApplet(java.lang.String)
,
getAppletNames()
public static java.applet.Applet getApplet(java.lang.String name)
name
- the name of the applet to return
public static java.util.Enumeration getAppletNames()
public static void setAgentApplet(java.applet.Applet applet)
applet
- the Javatest Agent appletgetAgentApplet()
public static java.applet.Applet getAgentApplet()
setAgentApplet(java.applet.Applet)
public static void setStarted(boolean value)
value
- a boolean value indicating whether the agent applet has been
started or not.public static boolean isStarted()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |