jdk/src/share/classes/sun/awt/SunGraphicsCallback.java
changeset 3938 ef327bd847c0
parent 2 90ce3da70b43
child 5506 202f599c92aa
equal deleted inserted replaced
3934:487e1aa949c4 3938:ef327bd847c0
    25 
    25 
    26 package sun.awt;
    26 package sun.awt;
    27 
    27 
    28 import java.awt.*;
    28 import java.awt.*;
    29 
    29 
    30 import java.util.logging.*;
    30 import sun.util.logging.PlatformLogger;
    31 
    31 
    32 public abstract class SunGraphicsCallback {
    32 public abstract class SunGraphicsCallback {
    33     public static final int HEAVYWEIGHTS = 0x1;
    33     public static final int HEAVYWEIGHTS = 0x1;
    34     public static final int LIGHTWEIGHTS = 0x2;
    34     public static final int LIGHTWEIGHTS = 0x2;
    35     public static final int TWO_PASSES = 0x4;
    35     public static final int TWO_PASSES = 0x4;
    36 
    36 
    37     private static final Logger log = Logger.getLogger("sun.awt.SunGraphicsCallback");
    37     private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunGraphicsCallback");
    38 
    38 
    39     public abstract void run(Component comp, Graphics cg);
    39     public abstract void run(Component comp, Graphics cg);
    40 
    40 
    41     protected void constrainGraphics(Graphics g, Rectangle bounds) {
    41     protected void constrainGraphics(Graphics g, Rectangle bounds) {
    42         if (g instanceof ConstrainableGraphics) {
    42         if (g instanceof ConstrainableGraphics) {
    85     public final void runComponents(Component[] comps, Graphics g,
    85     public final void runComponents(Component[] comps, Graphics g,
    86                                     int weightFlags) {
    86                                     int weightFlags) {
    87         int ncomponents = comps.length;
    87         int ncomponents = comps.length;
    88         Shape clip = g.getClip();
    88         Shape clip = g.getClip();
    89 
    89 
    90         if (log.isLoggable(Level.FINER) && (clip != null)) {
    90         if (log.isLoggable(PlatformLogger.FINER) && (clip != null)) {
    91             Rectangle newrect = clip.getBounds();
    91             Rectangle newrect = clip.getBounds();
    92             log.log(Level.FINER, "x = " + newrect.x + ", y = " + newrect.y +
    92             log.finer("x = " + newrect.x + ", y = " + newrect.y +
    93                                  ", width = " + newrect.width +
    93                       ", width = " + newrect.width +
    94                                  ", height = " + newrect.height);
    94                       ", height = " + newrect.height);
    95         }
    95         }
    96 
    96 
    97         // A seriously sad hack--
    97         // A seriously sad hack--
    98         // Lightweight components always paint behind peered components,
    98         // Lightweight components always paint behind peered components,
    99         // even if they are at the top of the Z order. We emulate this
    99         // even if they are at the top of the Z order. We emulate this