Package org.apache.pivot.wtk
Class BrowserApplicationContext
- java.lang.Object
-
- org.apache.pivot.wtk.ApplicationContext
-
- org.apache.pivot.wtk.BrowserApplicationContext
-
- All Implemented Interfaces:
java.lang.Thread.UncaughtExceptionHandler
,Application.UncaughtExceptionHandler
public final class BrowserApplicationContext extends ApplicationContext
Application context used to execute applications in a web browser.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BrowserApplicationContext.HostApplet
Applet used to host applications in a web browser.-
Nested classes/interfaces inherited from class org.apache.pivot.wtk.ApplicationContext
ApplicationContext.DisplayHost, ApplicationContext.QueuedCallback, ApplicationContext.ResourceCacheDictionary, ApplicationContext.ScheduledCallback
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.ApplicationContext
applications, displays, origin
-
-
Constructor Summary
Constructors Constructor Description BrowserApplicationContext()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object
eval(java.lang.String script, Application application)
Evaluates a script in the page context and returns the result.static Application
getApplication(java.lang.String name)
Retrieves a named application.static boolean
isActive()
-
Methods inherited from class org.apache.pivot.wtk.ApplicationContext
applyStylesheet, applyStylesheet, createTimer, defaultUncaughtExceptionHandler, destroyTimer, getDisplays, getJavaVersion, getJVMVersion, getOrigin, getPivotVersion, getResourceCache, handleUncaughtException, handleUncaughtException, invalidateDisplays, queueCallback, queueCallback, runAndScheduleRecurringCallback, runAndScheduleRecurringCallback, scheduleCallback, scheduleRecurringCallback, scheduleRecurringCallback, uncaughtException
-
-
-
-
Method Detail
-
isActive
public static boolean isActive()
-
getApplication
public static Application getApplication(java.lang.String name)
Retrieves a named application.- Parameters:
name
- The name of the applet hosting the application.- Returns:
- The application being run in the given applet (if any).
- Throws:
java.lang.IllegalArgumentException
- if the name isnull
.
-
eval
public static java.lang.Object eval(java.lang.String script, Application application)
Evaluates a script in the page context and returns the result.- Parameters:
script
- The script to be run.application
- The application used to find the correct applet.- Returns:
- The result of the script evaluation.
-
-