src/solaris/classes/sun/awt/X11/XToolkit.java

Print this page

        

@@ -264,11 +264,11 @@
                             }
                             if (xs != null) {
                                 ((XAWTXSettings)xs).dispose();
                             }
                             freeXKB();
-                            if (log.isLoggable(PlatformLogger.FINE)) {
+                            if (log.isLoggable(PlatformLogger.Level.FINE)) {
                                 dumpPeers();
                             }
                         }
                     };
                 shutdownThread.setContextClassLoader(null);

@@ -522,11 +522,11 @@
         }
         notifyListeners(ev);
     }
 
     static void processException(Throwable thr) {
-        if (log.isLoggable(PlatformLogger.WARNING)) {
+        if (log.isLoggable(PlatformLogger.Level.WARNING)) {
             log.warning("Exception on Toolkit thread", thr);
         }
     }
 
     static native void awt_toolkit_init();

@@ -584,11 +584,11 @@
                 if (XDropTargetEventProcessor.processEvent(ev) ||
                     XDragSourceContextPeer.processEvent(ev)) {
                     continue;
                 }
 
-                if (eventLog.isLoggable(PlatformLogger.FINER)) {
+                if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
                     eventLog.finer("{0}", ev);
                 }
 
                 // Check if input method consumes the event
                 long w = 0;

@@ -600,17 +600,17 @@
                         if (ownerWindow != null) {
                             w = ownerWindow.getContentWindow();
                         }
                     }
                 }
-                if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
+                if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
                     keyEventLog.fine("before XFilterEvent:"+ev);
                 }
                 if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
                     continue;
                 }
-                if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
+                if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
                     keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT?
                 }
 
                 dispatchEvent(ev);
             } catch (ThreadDeath td) {

@@ -1319,11 +1319,11 @@
             return XWM.getWM().supportsExtendedState(state);
         }
     }
 
     static void dumpPeers() {
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("Mapped windows:");
             Iterator iter = winMap.entrySet().iterator();
             while (iter.hasNext()) {
                 Map.Entry entry = (Map.Entry)iter.next();
                 log.fine(entry.getKey() + "->" + entry.getValue());

@@ -1415,11 +1415,11 @@
                         awtLockWait();
                     }
                 }
             } catch (InterruptedException ie) {
             // Note: the returned timeStamp can be incorrect in this case.
-                if (log.isLoggable(PlatformLogger.FINE)) {
+                if (log.isLoggable(PlatformLogger.Level.FINE)) {
                     log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
                 }
             }
         } finally {
             awtUnlock();

@@ -1582,11 +1582,11 @@
             Map.Entry e = (Map.Entry)i.next();
             String name = (String)e.getKey();
 
             name = "gnome." + name;
             setDesktopProperty(name, e.getValue());
-            if (log.isLoggable(PlatformLogger.FINE)) {
+            if (log.isLoggable(PlatformLogger.Level.FINE)) {
                 log.fine("name = " + name + " value = " + e.getValue());
             }
 
             // XXX: we probably want to do something smarter.  In
             // particular, "Net" properties are of interest to the

@@ -1771,11 +1771,11 @@
             }
             XlibWrapper.XFreeModifiermap(modmap.pData);
         } finally {
             awtUnlock();
         }
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("metaMask = " + metaMask);
             log.fine("altMask = " + altMask);
             log.fine("numLockMask = " + numLockMask);
             log.fine("modeSwitchMask = " + modeSwitchMask);
             log.fine("modLockIsShiftLock = " + modLockIsShiftLock);

@@ -1793,15 +1793,15 @@
         if (task == null) {
             throw new NullPointerException("task is null");
         }
         awtLock();
         try {
-            if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+            if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
                 timeoutTaskLog.finer("Removing task " + task);
             }
             if (timeoutTasks == null) {
-                if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+                if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
                     timeoutTaskLog.finer("Task is not scheduled");
                 }
                 return;
             }
             Collection values = timeoutTasks.values();

@@ -1844,11 +1844,11 @@
             throw new IllegalArgumentException("interval " + interval + " is not positive");
         }
 
         awtLock();
         try {
-            if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+            if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
                 timeoutTaskLog.finer("XToolkit.schedule(): current time={0}" +
                                      ";  interval={1}" +
                                      ";  task being added={2}" + ";  tasks before addition={3}",
                                      Long.valueOf(System.currentTimeMillis()), Long.valueOf(interval), task, timeoutTasks);
             }

@@ -1891,11 +1891,11 @@
     /**
      * Executes mature timeout tasks registered with schedule().
      * Called from run() under awtLock.
      */
     private static void callTimeoutTasks() {
-        if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+        if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
             timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
                                  ";  tasks={1}", Long.valueOf(System.currentTimeMillis()), timeoutTasks);
         }
 
         if (timeoutTasks == null || timeoutTasks.isEmpty()) {

@@ -1909,11 +1909,11 @@
             java.util.List tasks = (java.util.List)timeoutTasks.remove(time);
 
             for (Iterator iter = tasks.iterator(); iter.hasNext();) {
                 Runnable task = (Runnable)iter.next();
 
-                if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) {
+                if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
                     timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
                                          ";  about to run task={1}", Long.valueOf(currentTime), task);
                 }
 
                 try {

@@ -1984,20 +1984,20 @@
          * we should not attempt to remove the wrap checking even if _LP64 is
          * true.
          */
 
         long current_time_utc = System.currentTimeMillis();
-        if (log.isLoggable(PlatformLogger.FINER)) {
+        if (log.isLoggable(PlatformLogger.Level.FINER)) {
             log.finer("reset_time=" + reset_time_utc + ", current_time=" + current_time_utc
                       + ", server_offset=" + server_offset + ", wrap_time=" + WRAP_TIME_MILLIS);
         }
 
         if ((current_time_utc - reset_time_utc) > WRAP_TIME_MILLIS) {
             reset_time_utc = System.currentTimeMillis() - getCurrentServerTime();
         }
 
-        if (log.isLoggable(PlatformLogger.FINER)) {
+        if (log.isLoggable(PlatformLogger.Level.FINER)) {
             log.finer("result = " + (reset_time_utc + server_offset));
         }
         return reset_time_utc + server_offset;
     }
 

@@ -2072,18 +2072,18 @@
         String prop = (String)AccessController.doPrivileged(
                 new sun.security.action.GetPropertyAction("sun.awt.backingStore"));
 
         if (prop == null) {
             backingStoreType = XConstants.NotUseful;
-            if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
+            if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
                 backingStoreLog.config("The system property sun.awt.backingStore is not set" +
                                        ", by default backingStore=NotUseful");
             }
             return;
         }
 
-        if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
+        if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
             backingStoreLog.config("The system property sun.awt.backingStore is " + prop);
         }
         prop = prop.toLowerCase();
         if (prop.equals("always")) {
             backingStoreType = XConstants.Always;

@@ -2091,21 +2091,21 @@
             backingStoreType = XConstants.WhenMapped;
         } else {
             backingStoreType = XConstants.NotUseful;
         }
 
-        if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
+        if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
             backingStoreLog.config("backingStore(as provided by the system property)=" +
                                    ( backingStoreType == XConstants.NotUseful ? "NotUseful"
                                      : backingStoreType == XConstants.WhenMapped ?
                                      "WhenMapped" : "Always") );
         }
 
         if (sun.java2d.x11.X11SurfaceData.isDgaAvailable()) {
             backingStoreType = XConstants.NotUseful;
 
-            if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
+            if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
                 backingStoreLog.config("DGA is available, backingStore=NotUseful");
             }
 
             return;
         }

@@ -2116,11 +2116,11 @@
             for (int i = 0; i < screenCount; i++) {
                 if (XlibWrapper.DoesBackingStore(XlibWrapper.ScreenOfDisplay(getDisplay(), i))
                         == XConstants.NotUseful) {
                     backingStoreType = XConstants.NotUseful;
 
-                    if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) {
+                    if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
                         backingStoreLog.config("Backing store is not available on the screen " +
                                                i + ", backingStore=NotUseful");
                     }
 
                     return;

@@ -2394,11 +2394,11 @@
             oops_updated = false;
             oops_failed = false;
             // Wait for selection notify for oops on win
             long event_number = getEventNumber();
             XAtom atom = XAtom.get("WM_S0");
-            if (eventLog.isLoggable(PlatformLogger.FINER)) {
+            if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
                 eventLog.finer("WM_S0 selection owner {0}", XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom()));
             }
             XlibWrapper.XConvertSelection(getDisplay(), atom.getAtom(),
                                           XAtom.get("VERSION").getAtom(), oops.getAtom(),
                                           win.getWindow(), XConstants.CurrentTime);