|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.teamdev.xpcom.Xpcom
public final class Xpcom
Main access point to the XPCOM bridge.
DefaultLocationProvider
Nested Class Summary | |
---|---|
static class |
Xpcom.Toolkit
Deprecated. |
Field Summary | |
---|---|
static Xpcom.Toolkit |
AWT
Deprecated. |
Constructor Summary | |
---|---|
Xpcom()
|
Method Summary | |
---|---|
static void |
initialize()
Initialize XPCOM embedding with default profile directory. |
static void |
initialize(org.mozilla.xpcom.IAppFileLocProvider locProvider)
Initialize XPCOM embedding with custom IAppFileLocProvider implementation and custom profile directory. |
static void |
initialize(Xpcom.Toolkit toolkit)
Deprecated. initialize instead |
static void |
invokeAndWait(java.lang.Runnable runnable)
Execute a runnable in the event processing thread and wait for it to finish. |
static void |
invokeLater(java.lang.Runnable runnable)
Schedule a runnable to run in the event processing thread at some point after the current line of code. |
static void |
invokeLater(java.lang.Runnable runnable,
AsyncHandlerFactory handlerFactory)
Schedule a runnable to run in the event processing thread at some point after the current line of code. |
static boolean |
isEventDispatchThread()
|
static boolean |
isInitialized()
Returns whether the XPCOM embedding has been initialized. |
static boolean |
isJDK5()
Returns true when the current Java Runtime Environment version is
1.5, otherwise false . |
static boolean |
isJDK6()
Returns true when the current Java Runtime Environment version is
1.6, otherwise false . |
static boolean |
isJVMValid()
|
static boolean |
isLinux()
Check whether the application is running on a Linux platform. |
static boolean |
isMacOSX()
Check whether the application is running on a MacOS X platform. |
static boolean |
isSilentMode()
|
static boolean |
isWindows()
Check whether the application is running on a Windows platform. |
static void |
lock()
Lock current thread before call of unlock() method from another
thread. |
static boolean |
runOneMessageLoopIteration()
Execute a platform-specific message processing loop iteration. |
static AsyncHandlerFactory |
setGlobalAsyncHandler(AsyncHandlerFactory handlerFactory)
Defines global asynchronous execution handler facility. |
static void |
setNextCallAsyncHandler(AsyncHandlerFactory handlerFactory)
Define a one-shot asynchronous execution handler. |
static void |
setSilentMode(boolean silentMode)
Set/unsent silent mode Silent mode is mode without popup boxes including - Java Script alerts, confirmation, prompt and authentication dialogs. |
static AsyncHandlerFactory |
setThreadAsyncHandler(AsyncHandlerFactory handlerFactory)
Defines asynchronous execution handler facility for this thread. |
static void |
unlock()
Unlock thread that was locked by lock() Sample: |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final Xpcom.Toolkit AWT
Constructor Detail |
---|
public Xpcom()
Method Detail |
---|
@Deprecated public static void initialize(Xpcom.Toolkit toolkit)
toolkit
- a UI toolkit to initialize for.public static void initialize()
isInitialized()
public static void initialize(org.mozilla.xpcom.IAppFileLocProvider locProvider)
locProvider
- custom implementation of IAppFileLocProviderpublic static boolean isInitialized()
public static boolean isWindows()
public static boolean isMacOSX()
public static boolean isLinux()
public static boolean isJDK5()
true
when the current Java Runtime Environment version is
1.5, otherwise false
.
true
when the current Java Runtime Environment version is
1.5, otherwise false
isJDK6()
public static boolean isJDK6()
true
when the current Java Runtime Environment version is
1.6, otherwise false
.
true
when the current Java Runtime Environment version is
1.6, otherwise false
isJDK5()
public static boolean isJVMValid()
public static void invokeLater(java.lang.Runnable runnable)
runnable
- the Runnable
whose run
method should
be executed asynchronously in the event processing threadpublic static void invokeLater(java.lang.Runnable runnable, AsyncHandlerFactory handlerFactory)
runnable
- the Runnable
whose run
method should
be executed asynchronously in the event processing threadhandlerFactory
- a handler to wrap execution of the runnablepublic static AsyncHandlerFactory setGlobalAsyncHandler(AsyncHandlerFactory handlerFactory)
handlerFactory
- new factory
public static AsyncHandlerFactory setThreadAsyncHandler(AsyncHandlerFactory handlerFactory)
handlerFactory
- new factory
public static void setNextCallAsyncHandler(AsyncHandlerFactory handlerFactory)
handlerFactory
- one-shot handler factorypublic static void invokeAndWait(java.lang.Runnable runnable)
runnable
- the Runnable
whose run
method should
be executed synchronously in the event processing threadpublic static boolean runOneMessageLoopIteration()
true
if there is potentially more work to do,
false
if the caller can sleep upon return from this
methodpublic static boolean isEventDispatchThread()
public static void lock()
unlock()
method from another
thread. volatile boolean canUnlock = false; Xpcom.invokeLater(new Runnable() { public void run() { canUnlock = true; Xpcom.unlock(); } }); while (!canUnlock) { Xpcom.unlock(); }
public static void unlock()
lock()
volatile boolean canUnlock = false; Xpcom.invokeLater(new Runnable() { public void run() { canUnlock = true; Xpcom.unlock(); } }); while (!canUnlock) { Xpcom.unlock(); }
public static void setSilentMode(boolean silentMode)
silentMode
- whether silent mode should be usedpublic static boolean isSilentMode()
setSilentMode(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |