|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pivot.wtk.ApplicationContext
public abstract class ApplicationContext
Base class for application contexts.
Nested Class Summary | |
---|---|
static class |
ApplicationContext.DisplayHost
Native display host. |
static class |
ApplicationContext.QueuedCallback
Class representing a queued callback. |
static class |
ApplicationContext.ResourceCacheDictionary
Resource cache dictionary implementation. |
static class |
ApplicationContext.ScheduledCallback
Class representing a scheduled callback. |
Field Summary | |
---|---|
protected static ArrayList<Application> |
applications
|
protected static ArrayList<Display> |
displays
|
protected static URL |
origin
|
Constructor Summary | |
---|---|
ApplicationContext()
|
Method Summary | |
---|---|
static void |
applyStylesheet(String resourceName)
Adds the styles from a named stylesheet to the named or typed style collections. |
protected static void |
createTimer()
|
static void |
defaultUncaughtExceptionHandler(Exception exception)
|
protected static void |
destroyTimer()
|
static List<Display> |
getDisplays()
|
static Version |
getJavaVersion()
Returns the current Java Runtime version, parsed from the "java.runtime.version" system property. |
static Version |
getJVMVersion()
Returns the current JVM version, parsed from the "java.vm.version" system property. |
static URL |
getOrigin()
Returns this application's origin (the URL of it's originating server). |
static Version |
getPivotVersion()
Returns the current Pivot version. |
static ApplicationContext.ResourceCacheDictionary |
getResourceCache()
Resource properties accessor. |
static void |
handleUncaughtException(Exception exception)
|
protected static void |
invalidateDisplays()
|
static ApplicationContext.QueuedCallback |
queueCallback(Runnable callback)
Queues a task to execute after all pending events have been processed and returns without waiting for the task to complete. |
static ApplicationContext.QueuedCallback |
queueCallback(Runnable callback,
boolean wait)
Queues a task to execute after all pending events have been processed and optionally waits for the task to complete. |
static ApplicationContext.ScheduledCallback |
scheduleCallback(Runnable callback,
long delay)
Schedules a task for one-time execution. |
static ApplicationContext.ScheduledCallback |
scheduleRecurringCallback(Runnable callback,
long period)
Schedules a task for repeated execution. |
static ApplicationContext.ScheduledCallback |
scheduleRecurringCallback(Runnable callback,
long delay,
long period)
Schedules a task for repeated execution. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static URL origin
protected static ArrayList<Display> displays
protected static ArrayList<Application> applications
Constructor Detail |
---|
public ApplicationContext()
Method Detail |
---|
public static URL getOrigin()
public static ApplicationContext.ResourceCacheDictionary getResourceCache()
public static void applyStylesheet(String resourceName)
resourceName
- public static Version getJVMVersion()
public static Version getJavaVersion()
public static Version getPivotVersion()
public static ApplicationContext.ScheduledCallback scheduleCallback(Runnable callback, long delay)
callback
- The task to execute.delay
- The length of time to wait before executing the task (in milliseconds).public static ApplicationContext.ScheduledCallback scheduleRecurringCallback(Runnable callback, long period)
callback
- The task to execute.period
- The interval at which the task will be repeated (in milliseconds).public static ApplicationContext.ScheduledCallback scheduleRecurringCallback(Runnable callback, long delay, long period)
callback
- The task to execute.delay
- The length of time to wait before the first execution of the task (milliseconds).period
- The interval at which the task will be repeated (also in milliseconds).public static ApplicationContext.QueuedCallback queueCallback(Runnable callback)
callback
- The task to execute.public static ApplicationContext.QueuedCallback queueCallback(Runnable callback, boolean wait)
callback
- The task to execute.wait
- If true, does not return until the task has executed.
Otherwise, returns immediately.protected static void createTimer()
protected static void destroyTimer()
public static List<Display> getDisplays()
protected static void invalidateDisplays()
public static void defaultUncaughtExceptionHandler(Exception exception)
public static void handleUncaughtException(Exception exception)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |