jdk/src/share/classes/java/awt/Cursor.java
changeset 3938 ef327bd847c0
parent 3711 675253c23780
child 5506 202f599c92aa
equal deleted inserted replaced
3934:487e1aa949c4 3938:ef327bd847c0
    34 import java.beans.ConstructorProperties;
    34 import java.beans.ConstructorProperties;
    35 import java.util.Hashtable;
    35 import java.util.Hashtable;
    36 import java.util.Properties;
    36 import java.util.Properties;
    37 import java.util.StringTokenizer;
    37 import java.util.StringTokenizer;
    38 
    38 
    39 import java.util.logging.*;
       
    40 
       
    41 import java.security.AccessController;
    39 import java.security.AccessController;
       
    40 
       
    41 import sun.util.logging.PlatformLogger;
    42 
    42 
    43 /**
    43 /**
    44  * A class to encapsulate the bitmap representation of the mouse cursor.
    44  * A class to encapsulate the bitmap representation of the mouse cursor.
    45  *
    45  *
    46  * @see Component#setCursor
    46  * @see Component#setCursor
   189     /*
   189     /*
   190      * JDK 1.1 serialVersionUID
   190      * JDK 1.1 serialVersionUID
   191      */
   191      */
   192     private static final long serialVersionUID = 8028237497568985504L;
   192     private static final long serialVersionUID = 8028237497568985504L;
   193 
   193 
   194     private static final Logger log = Logger.getLogger("java.awt.Cursor");
   194     private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Cursor");
   195 
   195 
   196     static {
   196     static {
   197         /* ensure that the necessary native libraries are loaded */
   197         /* ensure that the necessary native libraries are loaded */
   198         Toolkit.loadLibraries();
   198         Toolkit.loadLibraries();
   199         if (!GraphicsEnvironment.isHeadless()) {
   199         if (!GraphicsEnvironment.isHeadless()) {
   296 
   296 
   297             String prefix = CursorDotPrefix + name;
   297             String prefix = CursorDotPrefix + name;
   298             String key    = prefix + DotFileSuffix;
   298             String key    = prefix + DotFileSuffix;
   299 
   299 
   300             if (!systemCustomCursorProperties.containsKey(key)) {
   300             if (!systemCustomCursorProperties.containsKey(key)) {
   301                 if (log.isLoggable(Level.FINER)) {
   301                 if (log.isLoggable(PlatformLogger.FINER)) {
   302                     log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null");
   302                     log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
   303                 }
   303                 }
   304                 return null;
   304                 return null;
   305             }
   305             }
   306 
   306 
   307             final String fileName =
   307             final String fileName =
   351                     "Exception: " + e.getClass() + " " + e.getMessage() +
   351                     "Exception: " + e.getClass() + " " + e.getMessage() +
   352                     " occurred while creating cursor " + name);
   352                     " occurred while creating cursor " + name);
   353             }
   353             }
   354 
   354 
   355             if (cursor == null) {
   355             if (cursor == null) {
   356                 if (log.isLoggable(Level.FINER)) {
   356                 if (log.isLoggable(PlatformLogger.FINER)) {
   357                     log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null");
   357                     log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
   358                 }
   358                 }
   359             } else {
   359             } else {
   360                 systemCustomCursors.put(name, cursor);
   360                 systemCustomCursors.put(name, cursor);
   361             }
   361             }
   362         }
   362         }