src/share/classes/sun/awt/SunToolkit.java

Print this page

        

*** 384,394 **** * This can be used to determine things like which EventQueue * to use for posting events to a Component. If the target is * null or the target can't be found, a null with be returned. */ public static AppContext targetToAppContext(Object target) { ! if (target == null || GraphicsEnvironment.isHeadless()) { return null; } AppContext context = getAppContext(target); if (context == null) { // target is not a Component/MenuComponent, try the --- 384,394 ---- * This can be used to determine things like which EventQueue * to use for posting events to a Component. If the target is * null or the target can't be found, a null with be returned. */ public static AppContext targetToAppContext(Object target) { ! if (target == null) { return null; } AppContext context = getAppContext(target); if (context == null) { // target is not a Component/MenuComponent, try the
*** 458,475 **** /* * Insert a mapping from target to AppContext, for later retrieval * via targetToAppContext() above. */ public static void insertTargetMapping(Object target, AppContext appContext) { - if (!GraphicsEnvironment.isHeadless()) { if (!setAppContext(target, appContext)) { // Target is not a Component/MenuComponent, use the private Map // instead. appContextMap.put(target, appContext); } } - } /* * Post an AWTEvent to the Java EventQueue, using the PostEventQueue * to avoid possibly calling client code (EventQueueSubclass.postEvent()) * on the toolkit (AWT-Windows/AWT-Motif) thread. This function should --- 458,473 ----