src/share/classes/java/awt/Component.java

Print this page




10053     void mixOnValidating() {
10054         // This method gets overriden in the Container. Obviously, a plain
10055         // non-container components don't need to handle validation.
10056     }
10057 
10058     final boolean isMixingNeeded() {
10059         if (SunToolkit.getSunAwtDisableMixing()) {
10060             if (mixingLog.isLoggable(PlatformLogger.FINEST)) {
10061                 mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
10062             }
10063             return false;
10064         }
10065         if (!areBoundsValid()) {
10066             if (mixingLog.isLoggable(PlatformLogger.FINE)) {
10067                 mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
10068             }
10069             return false;
10070         }
10071         Window window = getContainingWindow();
10072         if (window != null) {
10073             if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants()) {
10074                 if (mixingLog.isLoggable(PlatformLogger.FINE)) {
10075                     mixingLog.fine("containing window = " + window +
10076                             "; has h/w descendants = " + window.hasHeavyweightDescendants() +
10077                             "; has l/w descendants = " + window.hasLightweightDescendants());
10078                 }
10079                 return false;
10080             }
10081         } else {
10082             if (mixingLog.isLoggable(PlatformLogger.FINE)) {
10083                 mixingLog.fine("this = " + this + "; containing window is null");
10084             }
10085             return false;
10086         }
10087         return true;
10088     }
10089 
10090     // ****************** END OF MIXING CODE ********************************
10091 
10092     // Note that the method is overriden in the Window class,
10093     // a window doesn't need to be updated in the Z-order.


10053     void mixOnValidating() {
10054         // This method gets overriden in the Container. Obviously, a plain
10055         // non-container components don't need to handle validation.
10056     }
10057 
10058     final boolean isMixingNeeded() {
10059         if (SunToolkit.getSunAwtDisableMixing()) {
10060             if (mixingLog.isLoggable(PlatformLogger.FINEST)) {
10061                 mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
10062             }
10063             return false;
10064         }
10065         if (!areBoundsValid()) {
10066             if (mixingLog.isLoggable(PlatformLogger.FINE)) {
10067                 mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
10068             }
10069             return false;
10070         }
10071         Window window = getContainingWindow();
10072         if (window != null) {
10073             if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants() || window.isDisposing()) {
10074                 if (mixingLog.isLoggable(PlatformLogger.FINE)) {
10075                     mixingLog.fine("containing window = " + window +
10076                             "; has h/w descendants = " + window.hasHeavyweightDescendants() +
10077                             "; has l/w descendants = " + window.hasLightweightDescendants());
10078                 }
10079                 return false;
10080             }
10081         } else {
10082             if (mixingLog.isLoggable(PlatformLogger.FINE)) {
10083                 mixingLog.fine("this = " + this + "; containing window is null");
10084             }
10085             return false;
10086         }
10087         return true;
10088     }
10089 
10090     // ****************** END OF MIXING CODE ********************************
10091 
10092     // Note that the method is overriden in the Window class,
10093     // a window doesn't need to be updated in the Z-order.