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

Print this page

        

@@ -212,21 +212,21 @@
 
     /**
      * Called when component receives focus
      */
     public void focusGained(FocusEvent e) {
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
             focusLog.fine("{0}", e);
         }
         bHasFocus = true;
     }
 
     /**
      * Called when component loses focus
      */
     public void focusLost(FocusEvent e) {
-        if (focusLog.isLoggable(PlatformLogger.FINE)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
             focusLog.fine("{0}", e);
         }
         bHasFocus = false;
     }
 

@@ -296,11 +296,11 @@
           case XKeyboardFocusManagerPeer.SNFH_FAILURE:
               return false;
           case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
               // Currently we just generate focus events like we deal with lightweight instead of calling
               // XSetInputFocus on native window
-              if (focusLog.isLoggable(PlatformLogger.FINER)) {
+              if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
                   focusLog.finer("Proceeding with request to " +
                                  lightweightChild + " in " + target);
               }
               /**
                * The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight

@@ -323,11 +323,11 @@
                * when a component inside a Frame is requesting focus.
                * See 6314575 for details.
                */
               boolean res = wpeer.requestWindowFocus(null);
 
-              if (focusLog.isLoggable(PlatformLogger.FINER)) {
+              if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
                   focusLog.finer("Requested window focus: " + res);
               }
               // If parent window can be made focused and has been made focused(synchronously)
               // then we can proceed with children, otherwise we retreat.
               if (!(res && parentWindow.isFocused())) {

@@ -345,19 +345,19 @@
         }
         return false;
     }
 
     private boolean rejectFocusRequestHelper(String logMsg) {
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
             focusLog.finer(logMsg);
         }
         XKeyboardFocusManagerPeer.removeLastFocusRequest(target);
         return false;
     }
 
     void handleJavaFocusEvent(AWTEvent e) {
-        if (focusLog.isLoggable(PlatformLogger.FINER)) {
+        if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
             focusLog.finer(e.toString());
         }
         if (e.getID() == FocusEvent.FOCUS_GAINED) {
             focusGained((FocusEvent)e);
         } else {

@@ -384,11 +384,11 @@
 
     /**
      * @see java.awt.peer.ComponentPeer
      */
     public void setEnabled(final boolean value) {
-        if (enableLog.isLoggable(PlatformLogger.FINE)) {
+        if (enableLog.isLoggable(PlatformLogger.Level.FINE)) {
             enableLog.fine("{0}ing {1}", (value ? "Enabl" : "Disabl"), this);
         }
         boolean status = value;
         // If any of our heavyweight ancestors are disable, we should be too
         // See 6176875 for more information

@@ -465,17 +465,17 @@
             paintArea.add(r, e.getID());
         }
         if (true) {
             switch(e.getID()) {
               case PaintEvent.UPDATE:
-                  if (log.isLoggable(PlatformLogger.FINER)) {
+                  if (log.isLoggable(PlatformLogger.Level.FINER)) {
                       log.finer("XCP coalescePaintEvent : UPDATE : add : x = " +
                             r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
                   }
                   return;
               case PaintEvent.PAINT:
-                  if (log.isLoggable(PlatformLogger.FINER)) {
+                  if (log.isLoggable(PlatformLogger.Level.FINER)) {
                       log.finer("XCP coalescePaintEvent : PAINT : add : x = " +
                             r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
                   }
                   return;
             }

@@ -638,11 +638,11 @@
         g.drawLine(x+1, y+height, x+width, y+height); // bottom
         g.drawLine(x+width, y+height, x+width, y+1);  // right
     }
 
     public void setBackground(Color c) {
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("Set background to " + c);
         }
         synchronized (getStateLock()) {
             background = c;
         }

@@ -649,11 +649,11 @@
         super.setBackground(c);
         repaint();
     }
 
     public void setForeground(Color c) {
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             log.fine("Set foreground to " + c);
         }
         synchronized (getStateLock()) {
             foreground = c;
         }

@@ -670,11 +670,11 @@
      * @see       java.awt.peer.ComponentPeer#getFontMetrics(Font)
      * @see       Toolkit#getFontMetrics(Font)
      * @since     JDK1.0
      */
     public FontMetrics getFontMetrics(Font font) {
-        if (fontLog.isLoggable(PlatformLogger.FINE)) {
+        if (fontLog.isLoggable(PlatformLogger.Level.FINE)) {
             fontLog.fine("Getting font metrics for " + font);
         }
         return sun.font.FontDesignMetrics.getMetrics(font);
     }
 

@@ -1156,11 +1156,11 @@
     private BufferCapabilities backBufferCaps;
 
     public void createBuffers(int numBuffers, BufferCapabilities caps)
       throws AWTException
     {
-        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
             buffersLog.fine("createBuffers(" + numBuffers + ", " + caps + ")");
         }
         // set the caps first, they're used when creating the bb
         backBufferCaps = caps;
         backBuffer = graphicsConfig.createBackBuffer(this, numBuffers, caps);

@@ -1174,11 +1174,11 @@
     }
 
     public void flip(int x1, int y1, int x2, int y2,
                      BufferCapabilities.FlipContents flipAction)
     {
-        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
             buffersLog.fine("flip(" + flipAction + ")");
         }
         if (backBuffer == 0) {
             throw new IllegalStateException("Buffers have not been created");
         }

@@ -1185,21 +1185,21 @@
         graphicsConfig.flip(this, target, xBackBuffer,
                             x1, y1, x2, y2, flipAction);
     }
 
     public Image getBackBuffer() {
-        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
             buffersLog.fine("getBackBuffer()");
         }
         if (backBuffer == 0) {
             throw new IllegalStateException("Buffers have not been created");
         }
         return xBackBuffer;
     }
 
     public void destroyBuffers() {
-        if (buffersLog.isLoggable(PlatformLogger.FINE)) {
+        if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
             buffersLog.fine("destroyBuffers()");
         }
         graphicsConfig.destroyBackBuffer(backBuffer);
         backBuffer = 0;
         xBackBuffer = null;

@@ -1230,11 +1230,11 @@
      * Returns true if this event is disabled and shouldn't be processed by window
      * Currently if target component is disabled the following event will be disabled on window:
      * ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify
      */
     protected boolean isEventDisabled(XEvent e) {
-        if (enableLog.isLoggable(PlatformLogger.FINEST)) {
+        if (enableLog.isLoggable(PlatformLogger.Level.FINEST)) {
             enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable"));
         }
         if (!isEnabled()) {
             switch (e.get_type()) {
               case XConstants.ButtonPress:

@@ -1242,11 +1242,11 @@
               case XConstants.KeyPress:
               case XConstants.KeyRelease:
               case XConstants.EnterNotify:
               case XConstants.LeaveNotify:
               case XConstants.MotionNotify:
-                  if (enableLog.isLoggable(PlatformLogger.FINER)) {
+                  if (enableLog.isLoggable(PlatformLogger.Level.FINER)) {
                       enableLog.finer("Event {0} is disable", e);
                   }
                   return true;
             }
         }

@@ -1365,11 +1365,11 @@
      * Applies the shape to the X-window.
      * @since 1.7
      */
     public void applyShape(Region shape) {
         if (XlibUtil.isShapingSupported()) {
-            if (shapeLog.isLoggable(PlatformLogger.FINER)) {
+            if (shapeLog.isLoggable(PlatformLogger.Level.FINER)) {
                 shapeLog.finer(
                         "*** INFO: Setting shape: PEER: " + this
                         + "; WINDOW: " + getWindow()
                         + "; TARGET: " + target
                         + "; SHAPE: " + shape);

@@ -1395,11 +1395,11 @@
                 }
             } finally {
                 XToolkit.awtUnlock();
             }
         } else {
-            if (shapeLog.isLoggable(PlatformLogger.FINER)) {
+            if (shapeLog.isLoggable(PlatformLogger.Level.FINER)) {
                 shapeLog.finer("*** WARNING: Shaping is NOT supported!");
             }
         }
     }