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

Print this page

        

@@ -121,11 +121,11 @@
     boolean isApplicationActive() {
         return applicationActive;
     }
 
     void initDispatching() {
-        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
             xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
         }
         XToolkit.awtLock();
         try {
             XToolkit.addEventDispatcher(xembed.handle, xembed);

@@ -140,11 +140,11 @@
 
         notifyChildEmbedded();
     }
 
     void endDispatching() {
-        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
             xembedLog.fine("End dispatching for " + Long.toHexString(xembed.handle));
         }
         XToolkit.awtLock();
         try {
             XDropTargetRegistry.getRegistry().unregisterXEmbedClient(getWindow(), xembed.handle);

@@ -162,11 +162,11 @@
         xembed.handle = child;
         initDispatching();
     }
 
     void childDestroyed() {
-        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
             xembedLog.fine("Child " + Long.toHexString(xembed.handle) + " has self-destroyed.");
         }
         endDispatching();
         xembed.handle = 0;
     }

@@ -194,35 +194,35 @@
     public void dispatchEvent(XEvent ev) {
         super.dispatchEvent(ev);
         switch (ev.get_type()) {
           case XConstants.CreateNotify:
               XCreateWindowEvent cr = ev.get_xcreatewindow();
-              if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
+              if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
                   xembedLog.finest("Message on embedder: " + cr);
               }
-              if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+              if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                   xembedLog.finer("Create notify for parent " + Long.toHexString(cr.get_parent()) +
                                   ", window " + Long.toHexString(cr.get_window()));
               }
               embedChild(cr.get_window());
               break;
           case XConstants.DestroyNotify:
               XDestroyWindowEvent dn = ev.get_xdestroywindow();
-              if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
+              if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
                   xembedLog.finest("Message on embedder: " + dn);
               }
-              if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+              if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                   xembedLog.finer("Destroy notify for parent: " + dn);
               }
               childDestroyed();
               break;
           case XConstants.ReparentNotify:
               XReparentEvent rep = ev.get_xreparent();
-              if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
+              if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
                   xembedLog.finest("Message on embedder: " + rep);
               }
-              if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+              if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                   xembedLog.finer("Reparent notify for parent " + Long.toHexString(rep.get_parent()) +
                                   ", window " + Long.toHexString(rep.get_window()) +
                                   ", event " + Long.toHexString(rep.get_event()));
               }
               if (rep.get_parent() == getWindow()) {

@@ -321,11 +321,11 @@
             XToolkit.awtUnlock();
         }
     }
 
     void childResized() {
-        if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
             Rectangle bounds = getClientBounds();
             xembedLog.finer("Child resized: " + bounds);
             // It is not required to update embedder's size when client size changes
             // However, since there is no any means to get client size it seems to be the
             // only way to provide it. However, it contradicts with Java layout concept -

@@ -386,11 +386,11 @@
             }
         }
     }
 
     void detachChild() {
-        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
             xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
         }
         /**
          *  XEmbed specification:
          *  "The embedder can unmap the client and reparent the client window to the root window. If the

@@ -469,11 +469,11 @@
             return;
         }
         try {
             XKeyEvent ke = new XKeyEvent(data);
             ke.set_window(xembed.handle);
-            if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+            if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                 xembedLog.fine("Forwarding native key event: " + ke);
             }
             XToolkit.awtLock();
             try {
                 XlibWrapper.XSendEvent(XToolkit.getDisplay(), xembed.handle, false, XConstants.NoEventMask, data);

@@ -502,11 +502,11 @@
      */
     void grabKey(final long keysym, final long modifiers) {
         postEvent(new InvocationEvent(target, new Runnable() {
                 public void run() {
                     GrabbedKey grab = new GrabbedKey(keysym, modifiers);
-                    if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+                    if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                         xembedLog.fine("Grabbing key: " + grab);
                     }
                     synchronized(GRAB_LOCK) {
                         grabbed_keys.add(grab);
                     }

@@ -516,11 +516,11 @@
 
     void ungrabKey(final long keysym, final long modifiers) {
         postEvent(new InvocationEvent(target, new Runnable() {
                 public void run() {
                     GrabbedKey grab = new GrabbedKey(keysym, modifiers);
-                    if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+                    if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                         xembedLog.fine("UnGrabbing key: " + grab);
                     }
                     synchronized(GRAB_LOCK) {
                         grabbed_keys.remove(grab);
                     }

@@ -531,11 +531,11 @@
     void registerAccelerator(final long accel_id, final long keysym, final long modifiers) {
         postEvent(new InvocationEvent(target, new Runnable() {
                 public void run() {
                     AWTKeyStroke stroke = xembed.getKeyStrokeForKeySym(keysym, modifiers);
                     if (stroke != null) {
-                        if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+                        if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                             xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
                         }
                         synchronized(ACCEL_LOCK) {
                             accelerators.put(accel_id, stroke);
                             accel_lookup.put(stroke, accel_id);

@@ -551,11 +551,11 @@
                 public void run() {
                     AWTKeyStroke stroke = null;
                     synchronized(ACCEL_LOCK) {
                         stroke = accelerators.get(accel_id);
                         if (stroke != null) {
-                            if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+                            if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                                 xembedLog.fine("Unregistering accelerator: " + accel_id);
                             }
                             accelerators.remove(accel_id);
                             accel_lookup.remove(stroke); // FIXME: How about several accelerators with the same stroke?
                         }

@@ -599,11 +599,11 @@
             return false;
         }
 
         boolean result = false;
 
-        if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
             xembedLog.finer("Post-processing event " + e);
         }
 
         // Process ACCELERATORS
         AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e);

@@ -614,11 +614,11 @@
             if (exists) {
                 accel_id = accel_lookup.get(stroke).longValue();
             }
         }
         if (exists) {
-            if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+            if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                 xembedLog.fine("Activating accelerator " + accel_id);
             }
             xembed.sendMessage(xembed.handle, XEMBED_ACTIVATE_ACCELERATOR, accel_id, 0, 0); // FIXME: How about overloaded?
             result = true;
         }

@@ -628,11 +628,11 @@
         GrabbedKey key = new GrabbedKey(e);
         synchronized(GRAB_LOCK) {
             exists = grabbed_keys.contains(key);
         }
         if (exists) {
-            if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+            if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                 xembedLog.fine("Forwarding grabbed key " + e);
             }
             forwardKeyEvent(e);
             result = true;
         }

@@ -649,15 +649,15 @@
     }
 
     public void handleClientMessage(XEvent xev) {
         super.handleClientMessage(xev);
         XClientMessageEvent msg = xev.get_xclient();
-        if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
             xembedLog.finer("Client message to embedder: " + msg);
         }
         if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
-            if (xembedLog.isLoggable(PlatformLogger.FINE)) {
+            if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
                 xembedLog.fine(xembed.XEmbedMessageToString(msg));
             }
         }
         if (isXEmbedActive()) {
             switch ((int)msg.get_data(1)) {

@@ -721,11 +721,11 @@
             };
         SunToolkit.executeOnEventHandlerThread(target, r);
     }
 
     public boolean processXEmbedDnDEvent(long ctxt, int eventID) {
-        if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
+        if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
             xembedLog.finest("     Drop target=" + target.getDropTarget());
         }
         if (target.getDropTarget() instanceof XEmbedDropTarget) {
             AppContext appContext = XToolkit.targetToAppContext(getTarget());
             XDropTargetContextPeer peer =

@@ -756,11 +756,11 @@
                 version = Native.getCard32(xembed_info_data, 0);
                 flags = Native.getCard32(xembed_info_data, 1);
                 boolean new_mapped = (flags & XEMBED_MAPPED) != 0;
                 boolean currently_mapped = XlibUtil.getWindowMapState(handle) != XConstants.IsUnmapped;
                 if (new_mapped != currently_mapped) {
-                    if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+                    if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                         xembedLog.finer("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped);
                     }
                     if (new_mapped) {
                         XToolkit.awtLock();
                         try {

@@ -775,11 +775,11 @@
                         } finally {
                             XToolkit.awtUnlock();
                         }
                     }
                 } else {
-                    if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+                    if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                         xembedLog.finer("Mapping state didn't change, mapped: " + currently_mapped);
                     }
                 }
                 return true;
             } finally {

@@ -788,11 +788,11 @@
         }
 
         public void handlePropertyNotify(XEvent xev) {
             if (isXEmbedActive()) {
                 XPropertyEvent ev = xev.get_xproperty();
-                if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+                if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                     xembedLog.finer("Property change on client: " + ev);
                 }
                 if (ev.get_atom() == XAtom.XA_WM_NORMAL_HINTS) {
                     childResized();
                 } else if (ev.get_atom() == XEmbedInfo.getAtom()) {

@@ -811,11 +811,11 @@
             }
         }
         void handleConfigureNotify(XEvent xev) {
             if (isXEmbedActive()) {
                 XConfigureEvent ev = xev.get_xconfigure();
-                if (xembedLog.isLoggable(PlatformLogger.FINER)) {
+                if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
                     xembedLog.finer("Bounds change on client: " + ev);
                 }
                 if (xev.get_xany().get_window() == handle) {
                     childResized();
                 }

@@ -864,11 +864,11 @@
                 }
                 XKeyEvent ke = new XKeyEvent(data);
 
                 // We recognize only these masks
                 modifiers = ke.get_state() & (XConstants.ShiftMask | XConstants.ControlMask | XConstants.LockMask);
-                if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
+                if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
                     xembedLog.finest("Mapped " + e + " to " + this);
                 }
             } finally {
                 XlibWrapper.unsafe.freeMemory(data);
             }