Methods Summary |
---|
public static void | activateMultiContextMode()
// TODO: checkPermission
multiContextMode = true;
|
public static ComponentInternals | getComponentInternals()
return getCurrentContext().componentInternals;
|
public static java.lang.Object | getContextLock()
return getCurrentContext().contextLock;
|
private static ContextThreadGroup | getContextThreadGroup()
Thread thread = Thread.currentThread();
ThreadGroup group = thread.getThreadGroup();
while (group != null) {
if (group instanceof ContextThreadGroup) {
return (ContextThreadGroup)group;
}
group = group.getParent();
}
// awt.59=Application has run out of context thread group
throw new RuntimeException(Messages.getString("awt.59")); //$NON-NLS-1$
|
private static org.apache.harmony.awt.ContextStorage | getCurrentContext()
return multiContextMode ? getContextThreadGroup().context : globalContext;
|
public static java.awt.Toolkit | getDefaultToolkit()
return getCurrentContext().toolkit;
|
public static java.awt.GraphicsEnvironment | getGraphicsEnvironment()
return getCurrentContext().graphicsEnvironment;
|
public static NativeEventQueue | getNativeEventQueue()
return getCurrentContext().wtk.getNativeEventQueue();
|
public static NativeIM | getNativeIM()
return getCurrentContext().wtk.getNativeIM();
|
public static Synchronizer | getSynchronizer()
return getCurrentContext().synchronizer;
|
public static WindowFactory | getWindowFactory()
return getCurrentContext().wtk.getWindowFactory();
|
static void | setComponentInternals(ComponentInternals internals)
// TODO: checkPermission
getCurrentContext().componentInternals = internals;
|
public static void | setDefaultToolkit(java.awt.Toolkit newToolkit)
// TODO: checkPermission
getCurrentContext().toolkit = newToolkit;
|
public static void | setGraphicsEnvironment(java.awt.GraphicsEnvironment environment)
getCurrentContext().graphicsEnvironment = environment;
|
public static void | setWTK(WTK wtk)
getCurrentContext().wtk = wtk;
|
void | shutdown()
if (!multiContextMode) {
return;
}
shutdownPending = true;
//???AWT: componentInternals.shutdown();
synchronized(contextLock) {
toolkit = null;
componentInternals = null;
//???AWT: dtk = null;
wtk = null;
graphicsEnvironment = null;
}
|
public static boolean | shutdownPending()
return getCurrentContext().shutdownPending;
|