src/share/classes/sun/awt/ScrollPaneWheelScroller.java

Print this page

        

@@ -45,20 +45,20 @@
 
     /*
      * Called from ScrollPane.processMouseWheelEvent()
      */
     public static void handleWheelScrolling(ScrollPane sp, MouseWheelEvent e) {
-        if (log.isLoggable(PlatformLogger.FINER)) {
+        if (log.isLoggable(PlatformLogger.Level.FINER)) {
             log.finer("x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
         }
         int increment = 0;
 
         if (sp != null && e.getScrollAmount() != 0) {
             Adjustable adj = getAdjustableToScroll(sp);
             if (adj != null) {
                 increment = getIncrementFromAdjustable(adj, e);
-                if (log.isLoggable(PlatformLogger.FINER)) {
+                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                     log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment);
                 }
                 scrollAdjustable(adj, increment);
             }
         }

@@ -72,11 +72,11 @@
         int policy = sp.getScrollbarDisplayPolicy();
 
         // if policy is display always or never, use vert
         if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
             policy == ScrollPane.SCROLLBARS_NEVER) {
-            if (log.isLoggable(PlatformLogger.FINER)) {
+            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                 log.finer("using vertical scrolling due to scrollbar policy");
             }
             return sp.getVAdjustable();
 
         }

@@ -83,34 +83,34 @@
         else {
 
             Insets ins = sp.getInsets();
             int vertScrollWidth = sp.getVScrollbarWidth();
 
-            if (log.isLoggable(PlatformLogger.FINER)) {
+            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                 log.finer("insets: l = " + ins.left + ", r = " + ins.right +
                  ", t = " + ins.top + ", b = " + ins.bottom);
                 log.finer("vertScrollWidth = " + vertScrollWidth);
             }
 
             // Check if scrollbar is showing by examining insets of the
             // ScrollPane
             if (ins.right >= vertScrollWidth) {
-                if (log.isLoggable(PlatformLogger.FINER)) {
+                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                     log.finer("using vertical scrolling because scrollbar is present");
                 }
                 return sp.getVAdjustable();
             }
             else {
                 int horizScrollHeight = sp.getHScrollbarHeight();
                 if (ins.bottom >= horizScrollHeight) {
-                    if (log.isLoggable(PlatformLogger.FINER)) {
+                    if (log.isLoggable(PlatformLogger.Level.FINER)) {
                         log.finer("using horiz scrolling because scrollbar is present");
                     }
                     return sp.getHAdjustable();
                 }
                 else {
-                    if (log.isLoggable(PlatformLogger.FINER)) {
+                    if (log.isLoggable(PlatformLogger.Level.FINER)) {
                         log.finer("using NO scrollbar becsause neither is present");
                     }
                     return null;
                 }
             }

@@ -122,11 +122,11 @@
      * the amount by which the Adjustable should be adjusted.  This value may
      * be positive or negative.
      */
     public static int getIncrementFromAdjustable(Adjustable adj,
                                                  MouseWheelEvent e) {
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             if (adj == null) {
                 log.fine("Assertion (adj != null) failed");
             }
         }
 

@@ -144,11 +144,11 @@
     /*
      * Scroll the given Adjustable by the given amount.  Checks the Adjustable's
      * bounds and sets the new value to the Adjustable.
      */
     public static void scrollAdjustable(Adjustable adj, int amount) {
-        if (log.isLoggable(PlatformLogger.FINE)) {
+        if (log.isLoggable(PlatformLogger.Level.FINE)) {
             if (adj == null) {
                 log.fine("Assertion (adj != null) failed");
             }
             if (amount == 0) {
                 log.fine("Assertion (amount != 0) failed");

@@ -155,11 +155,11 @@
             }
         }
 
         int current = adj.getValue();
         int upperLimit = adj.getMaximum() - adj.getVisibleAmount();
-        if (log.isLoggable(PlatformLogger.FINER)) {
+        if (log.isLoggable(PlatformLogger.Level.FINER)) {
             log.finer("doScrolling by " + amount);
         }
 
         if (amount > 0 && current < upperLimit) { // still some room to scroll
                                                   // down