jdk/src/java.desktop/share/classes/sun/awt/SunToolkit.java
changeset 26037 508779ce6619
parent 26031 812d3082ba6f
parent 25859 3317bb8137f4
child 26353 b5e3b7fbf56d
equal deleted inserted replaced
25992:e9b05e933ddd 26037:508779ce6619
   201 
   201 
   202     public abstract SystemTrayPeer createSystemTray(SystemTray target);
   202     public abstract SystemTrayPeer createSystemTray(SystemTray target);
   203 
   203 
   204     public abstract boolean isTraySupported();
   204     public abstract boolean isTraySupported();
   205 
   205 
   206     public abstract DataTransferer getDataTransferer();
       
   207 
       
   208     @SuppressWarnings("deprecation")
   206     @SuppressWarnings("deprecation")
   209     public abstract FontPeer getFontPeer(String name, int style);
   207     public abstract FontPeer getFontPeer(String name, int style);
   210 
   208 
   211     public abstract RobotPeer createRobot(Robot target, GraphicsDevice screen)
   209     public abstract RobotPeer createRobot(Robot target, GraphicsDevice screen)
   212         throws AWTException;
   210         throws AWTException;
   384      * This can be used to determine things like which EventQueue
   382      * This can be used to determine things like which EventQueue
   385      * to use for posting events to a Component.  If the target is
   383      * to use for posting events to a Component.  If the target is
   386      * null or the target can't be found, a null with be returned.
   384      * null or the target can't be found, a null with be returned.
   387      */
   385      */
   388     public static AppContext targetToAppContext(Object target) {
   386     public static AppContext targetToAppContext(Object target) {
   389         if (target == null || GraphicsEnvironment.isHeadless()) {
   387         if (target == null) {
   390             return null;
   388             return null;
   391         }
   389         }
   392         AppContext context = getAppContext(target);
   390         AppContext context = getAppContext(target);
   393         if (context == null) {
   391         if (context == null) {
   394             // target is not a Component/MenuComponent, try the
   392             // target is not a Component/MenuComponent, try the
   458     /*
   456     /*
   459      * Insert a mapping from target to AppContext, for later retrieval
   457      * Insert a mapping from target to AppContext, for later retrieval
   460      * via targetToAppContext() above.
   458      * via targetToAppContext() above.
   461      */
   459      */
   462     public static void insertTargetMapping(Object target, AppContext appContext) {
   460     public static void insertTargetMapping(Object target, AppContext appContext) {
   463         if (!GraphicsEnvironment.isHeadless()) {
   461         if (!setAppContext(target, appContext)) {
   464             if (!setAppContext(target, appContext)) {
   462             // Target is not a Component/MenuComponent, use the private Map
   465                 // Target is not a Component/MenuComponent, use the private Map
   463             // instead.
   466                 // instead.
   464             appContextMap.put(target, appContext);
   467                 appContextMap.put(target, appContext);
       
   468             }
       
   469         }
   465         }
   470     }
   466     }
   471 
   467 
   472     /*
   468     /*
   473      * Post an AWTEvent to the Java EventQueue, using the PostEventQueue
   469      * Post an AWTEvent to the Java EventQueue, using the PostEventQueue