src/share/classes/java/awt/Component.java
Print this page
*** 4705,4720 ****
int id = e.getID();
// Check that this component belongs to this app-context
AppContext compContext = appContext;
if (compContext != null && !compContext.equals(AppContext.getAppContext())) {
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.fine("Event " + e + " is being dispatched on the wrong AppContext");
}
}
! if (eventLog.isLoggable(PlatformLogger.FINEST)) {
eventLog.finest("{0}", e);
}
/*
* 0. Set timestamp and modifiers of current event.
--- 4705,4720 ----
int id = e.getID();
// Check that this component belongs to this app-context
AppContext compContext = appContext;
if (compContext != null && !compContext.equals(AppContext.getAppContext())) {
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Event " + e + " is being dispatched on the wrong AppContext");
}
}
! if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("{0}", e);
}
/*
* 0. Set timestamp and modifiers of current event.
*** 4749,4759 ****
dispatchEvent(e))
{
return;
}
}
! if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("" + e);
}
// MouseWheel may need to be retargeted here so that
// AWTEventListener sees the event go to the correct
// Component. If the MouseWheelEvent needs to go to an ancestor,
--- 4749,4759 ----
dispatchEvent(e))
{
return;
}
}
! if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("" + e);
}
// MouseWheel may need to be retargeted here so that
// AWTEventListener sees the event go to the correct
// Component. If the MouseWheelEvent needs to go to an ancestor,
*** 4807,4817 ****
if (inputContext != null) {
inputContext.dispatchEvent(e);
if (e.isConsumed()) {
! if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("3579: Skipping " + e);
}
return;
}
}
--- 4807,4817 ----
if (inputContext != null) {
inputContext.dispatchEvent(e);
if (e.isConsumed()) {
! if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("3579: Skipping " + e);
}
return;
}
}
*** 4842,4852 ****
case KeyEvent.KEY_RELEASED:
Container p = (Container)((this instanceof Container) ? this : parent);
if (p != null) {
p.preProcessKeyEvent((KeyEvent)e);
if (e.isConsumed()) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Pre-process consumed event");
}
return;
}
}
--- 4842,4852 ----
case KeyEvent.KEY_RELEASED:
Container p = (Container)((this instanceof Container) ? this : parent);
if (p != null) {
p.preProcessKeyEvent((KeyEvent)e);
if (e.isConsumed()) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Pre-process consumed event");
}
return;
}
}
*** 4975,4985 ****
newY = e.getY() + getY(); // the cursor's position relative to this
// Component (e.getX()), and this Component's
// position relative to its parent.
MouseWheelEvent newMWE;
! if (eventLog.isLoggable(PlatformLogger.FINEST)) {
eventLog.finest("dispatchMouseWheelToAncestor");
eventLog.finest("orig event src is of " + e.getSource().getClass());
}
/* parent field for Window refers to the owning Window.
--- 4975,4985 ----
newY = e.getY() + getY(); // the cursor's position relative to this
// Component (e.getX()), and this Component's
// position relative to its parent.
MouseWheelEvent newMWE;
! if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("dispatchMouseWheelToAncestor");
eventLog.finest("orig event src is of " + e.getSource().getClass());
}
/* parent field for Window refers to the owning Window.
*** 4998,5008 ****
else {
break;
}
}
! if (eventLog.isLoggable(PlatformLogger.FINEST)) {
eventLog.finest("new event src is " + anc.getClass());
}
if (anc != null && anc.eventEnabled(e)) {
// Change event to be from new source, with new x,y
--- 4998,5008 ----
else {
break;
}
}
! if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("new event src is " + anc.getClass());
}
if (anc != null && anc.eventEnabled(e)) {
// Change event to be from new source, with new x,y
*** 5498,5508 ****
}
// Should only be called while holding the tree lock
int numListening(long mask) {
// One mask or the other, but not neither or both.
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) &&
(mask != AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK))
{
eventLog.fine("Assertion failed");
}
--- 5498,5508 ----
}
// Should only be called while holding the tree lock
int numListening(long mask) {
// One mask or the other, but not neither or both.
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) &&
(mask != AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK))
{
eventLog.fine("Assertion failed");
}
*** 5539,5549 ****
return 1;
}
break;
case HierarchyEvent.ANCESTOR_MOVED:
case HierarchyEvent.ANCESTOR_RESIZED:
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
if (changeFlags != 0) {
eventLog.fine("Assertion (changeFlags == 0) failed");
}
}
if (hierarchyBoundsListener != null ||
--- 5539,5549 ----
return 1;
}
break;
case HierarchyEvent.ANCESTOR_MOVED:
case HierarchyEvent.ANCESTOR_RESIZED:
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
if (changeFlags != 0) {
eventLog.fine("Assertion (changeFlags == 0) failed");
}
}
if (hierarchyBoundsListener != null ||
*** 5555,5565 ****
return 1;
}
break;
default:
// assert false
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.fine("This code must never be reached");
}
break;
}
return 0;
--- 5555,5565 ----
return 1;
}
break;
default:
// assert false
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("This code must never be reached");
}
break;
}
return 0;
*** 7641,7651 ****
// toplevel. Otherwise the result may not meet user expectations. See 6981400.
focusedWindowChangeAllowed = false;
}
}
if (!isRequestFocusAccepted(temporary, focusedWindowChangeAllowed, cause)) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("requestFocus is not accepted");
}
return false;
}
// Update most-recent map
--- 7641,7651 ----
// toplevel. Otherwise the result may not meet user expectations. See 6981400.
focusedWindowChangeAllowed = false;
}
}
if (!isRequestFocusAccepted(temporary, focusedWindowChangeAllowed, cause)) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("requestFocus is not accepted");
}
return false;
}
// Update most-recent map
*** 7652,7662 ****
KeyboardFocusManager.setMostRecentFocusOwner(this);
Component window = this;
while ( (window != null) && !(window instanceof Window)) {
if (!window.isVisible()) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("component is recurively invisible");
}
return false;
}
window = window.parent;
--- 7652,7662 ----
KeyboardFocusManager.setMostRecentFocusOwner(this);
Component window = this;
while ( (window != null) && !(window instanceof Window)) {
if (!window.isVisible()) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("component is recurively invisible");
}
return false;
}
window = window.parent;
*** 7664,7681 ****
ComponentPeer peer = this.peer;
Component heavyweight = (peer instanceof LightweightPeer)
? getNativeContainer() : this;
if (heavyweight == null || !heavyweight.isVisible()) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Component is not a part of visible hierarchy");
}
return false;
}
peer = heavyweight.peer;
if (peer == null) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Peer is null");
}
return false;
}
--- 7664,7681 ----
ComponentPeer peer = this.peer;
Component heavyweight = (peer instanceof LightweightPeer)
? getNativeContainer() : this;
if (heavyweight == null || !heavyweight.isVisible()) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Component is not a part of visible hierarchy");
}
return false;
}
peer = heavyweight.peer;
if (peer == null) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Peer is null");
}
return false;
}
*** 7692,7706 ****
boolean success = peer.requestFocus
(this, temporary, focusedWindowChangeAllowed, time, cause);
if (!success) {
KeyboardFocusManager.getCurrentKeyboardFocusManager
(appContext).dequeueKeyEvents(time, this);
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Peer request failed");
}
} else {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Pass for " + this);
}
}
return success;
}
--- 7692,7706 ----
boolean success = peer.requestFocus
(this, temporary, focusedWindowChangeAllowed, time, cause);
if (!success) {
KeyboardFocusManager.getCurrentKeyboardFocusManager
(appContext).dequeueKeyEvents(time, this);
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Peer request failed");
}
} else {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Pass for " + this);
}
}
return success;
}
*** 7708,7734 ****
private boolean isRequestFocusAccepted(boolean temporary,
boolean focusedWindowChangeAllowed,
CausedFocusEvent.Cause cause)
{
if (!isFocusable() || !isVisible()) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Not focusable or not visible");
}
return false;
}
ComponentPeer peer = this.peer;
if (peer == null) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("peer is null");
}
return false;
}
Window window = getContainingWindow();
if (window == null || !window.isFocusableWindow()) {
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("Component doesn't have toplevel");
}
return false;
}
--- 7708,7734 ----
private boolean isRequestFocusAccepted(boolean temporary,
boolean focusedWindowChangeAllowed,
CausedFocusEvent.Cause cause)
{
if (!isFocusable() || !isVisible()) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Not focusable or not visible");
}
return false;
}
ComponentPeer peer = this.peer;
if (peer == null) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("peer is null");
}
return false;
}
Window window = getContainingWindow();
if (window == null || !window.isFocusableWindow()) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Component doesn't have toplevel");
}
return false;
}
*** 7746,7756 ****
if (focusOwner == this || focusOwner == null) {
// Controller is supposed to verify focus transfers and for this it
// should know both from and to components. And it shouldn't verify
// transfers from when these components are equal.
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("focus owner is null or this");
}
return true;
}
--- 7746,7756 ----
if (focusOwner == this || focusOwner == null) {
// Controller is supposed to verify focus transfers and for this it
// should know both from and to components. And it shouldn't verify
// transfers from when these components are equal.
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("focus owner is null or this");
}
return true;
}
*** 7759,7769 ****
// in activation. We do request focus on component which
// has got temporary focus lost and then on component which is
// most recent focus owner. But most recent focus owner can be
// changed by requestFocsuXXX() call only, so this transfer has
// been already approved.
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("cause is activation");
}
return true;
}
--- 7759,7769 ----
// in activation. We do request focus on component which
// has got temporary focus lost and then on component which is
// most recent focus owner. But most recent focus owner can be
// changed by requestFocsuXXX() call only, so this transfer has
// been already approved.
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("cause is activation");
}
return true;
}
*** 7770,7780 ****
boolean ret = Component.requestFocusController.acceptRequestFocus(focusOwner,
this,
temporary,
focusedWindowChangeAllowed,
cause);
! if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.finest("RequestFocusController returns {0}", ret);
}
return ret;
}
--- 7770,7780 ----
boolean ret = Component.requestFocusController.acceptRequestFocus(focusOwner,
this,
temporary,
focusedWindowChangeAllowed,
cause);
! if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("RequestFocusController returns {0}", ret);
}
return ret;
}
*** 7862,7886 ****
public void nextFocus() {
transferFocus(false);
}
boolean transferFocus(boolean clearOnFailure) {
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clearOnFailure = " + clearOnFailure);
}
Component toFocus = getNextFocusCandidate();
boolean res = false;
if (toFocus != null && !toFocus.isFocusOwner() && toFocus != this) {
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
}
if (clearOnFailure && !res) {
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clear global focus owner");
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv();
}
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("returning result: " + res);
}
return res;
}
--- 7862,7886 ----
public void nextFocus() {
transferFocus(false);
}
boolean transferFocus(boolean clearOnFailure) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("clearOnFailure = " + clearOnFailure);
}
Component toFocus = getNextFocusCandidate();
boolean res = false;
if (toFocus != null && !toFocus.isFocusOwner() && toFocus != this) {
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
}
if (clearOnFailure && !res) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("clear global focus owner");
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv();
}
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("returning result: " + res);
}
return res;
}
*** 7891,7913 ****
!(rootAncestor.isShowing() && rootAncestor.canBeFocusOwner()))
{
comp = rootAncestor;
rootAncestor = comp.getFocusCycleRootAncestor();
}
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("comp = " + comp + ", root = " + rootAncestor);
}
Component candidate = null;
if (rootAncestor != null) {
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
Component toFocus = policy.getComponentAfter(rootAncestor, comp);
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("component after is " + toFocus);
}
if (toFocus == null) {
toFocus = policy.getDefaultComponent(rootAncestor);
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("default component is " + toFocus);
}
}
if (toFocus == null) {
Applet applet = EmbeddedFrame.getAppletIfAncestorOf(this);
--- 7891,7913 ----
!(rootAncestor.isShowing() && rootAncestor.canBeFocusOwner()))
{
comp = rootAncestor;
rootAncestor = comp.getFocusCycleRootAncestor();
}
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("comp = " + comp + ", root = " + rootAncestor);
}
Component candidate = null;
if (rootAncestor != null) {
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
Component toFocus = policy.getComponentAfter(rootAncestor, comp);
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("component after is " + toFocus);
}
if (toFocus == null) {
toFocus = policy.getDefaultComponent(rootAncestor);
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("default component is " + toFocus);
}
}
if (toFocus == null) {
Applet applet = EmbeddedFrame.getAppletIfAncestorOf(this);
*** 7915,7925 ****
toFocus = applet;
}
}
candidate = toFocus;
}
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("Focus transfer candidate: " + candidate);
}
return candidate;
}
--- 7915,7925 ----
toFocus = applet;
}
}
candidate = toFocus;
}
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Focus transfer candidate: " + candidate);
}
return candidate;
}
*** 7952,7967 ****
if (toFocus != null) {
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD);
}
}
if (clearOnFailure && !res) {
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("clear global focus owner");
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv();
}
! if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.finer("returning result: " + res);
}
return res;
}
--- 7952,7967 ----
if (toFocus != null) {
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_BACKWARD);
}
}
if (clearOnFailure && !res) {
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("clear global focus owner");
}
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv();
}
! if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("returning result: " + res);
}
return res;
}
*** 9738,9748 ****
*/
void applyCompoundShape(Region shape) {
checkTreeLock();
if (!areBoundsValid()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return;
}
--- 9738,9748 ----
*/
void applyCompoundShape(Region shape) {
checkTreeLock();
if (!areBoundsValid()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return;
}
*** 9774,9784 ****
if (shape.equals(getAppliedShape())) {
return;
}
this.compoundShape = shape;
Point compAbsolute = getLocationOnWindow();
! if (mixingLog.isLoggable(PlatformLogger.FINER)) {
mixingLog.fine("this = " + this +
"; compAbsolute=" + compAbsolute + "; shape=" + shape);
}
peer.applyShape(shape.getTranslatedRegion(-compAbsolute.x, -compAbsolute.y));
}
--- 9774,9784 ----
if (shape.equals(getAppliedShape())) {
return;
}
this.compoundShape = shape;
Point compAbsolute = getLocationOnWindow();
! if (mixingLog.isLoggable(PlatformLogger.Level.FINER)) {
mixingLog.fine("this = " + this +
"; compAbsolute=" + compAbsolute + "; shape=" + shape);
}
peer.applyShape(shape.getTranslatedRegion(-compAbsolute.x, -compAbsolute.y));
}
*** 9908,9918 ****
private Region calculateCurrentShape() {
checkTreeLock();
Region s = getNormalShape();
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; normalShape=" + s);
}
if (getContainer() != null) {
Component comp = this;
--- 9908,9918 ----
private Region calculateCurrentShape() {
checkTreeLock();
Region s = getNormalShape();
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; normalShape=" + s);
}
if (getContainer() != null) {
Component comp = this;
*** 9942,9976 ****
comp = cont;
cont = cont.getContainer();
}
}
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("currentShape=" + s);
}
return s;
}
void applyCurrentShape() {
checkTreeLock();
if (!areBoundsValid()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return; // Because applyCompoundShape() ignores such components anyway
}
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
applyCompoundShape(calculateCurrentShape());
}
final void subtractAndApplyShape(Region s) {
checkTreeLock();
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; s=" + s);
}
applyCompoundShape(getAppliedShape().getDifference(s));
}
--- 9942,9976 ----
comp = cont;
cont = cont.getContainer();
}
}
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("currentShape=" + s);
}
return s;
}
void applyCurrentShape() {
checkTreeLock();
if (!areBoundsValid()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return; // Because applyCompoundShape() ignores such components anyway
}
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
applyCompoundShape(calculateCurrentShape());
}
final void subtractAndApplyShape(Region s) {
checkTreeLock();
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; s=" + s);
}
applyCompoundShape(getAppliedShape().getDifference(s));
}
*** 10013,10023 ****
}
}
void mixOnShowing() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
}
--- 10013,10023 ----
}
}
void mixOnShowing() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
}
*** 10031,10041 ****
void mixOnHiding(boolean isLightweight) {
// We cannot be sure that the peer exists at this point, so we need the argument
// to find out whether the hiding component is (well, actually was) a LW or a HW.
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; isLightweight = " + isLightweight);
}
if (!isMixingNeeded()) {
return;
}
--- 10031,10041 ----
void mixOnHiding(boolean isLightweight) {
// We cannot be sure that the peer exists at this point, so we need the argument
// to find out whether the hiding component is (well, actually was) a LW or a HW.
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; isLightweight = " + isLightweight);
}
if (!isMixingNeeded()) {
return;
}
*** 10045,10055 ****
}
}
void mixOnReshaping() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
}
--- 10045,10055 ----
}
}
void mixOnReshaping() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
}
*** 10064,10074 ****
void mixOnZOrderChanging(int oldZorder, int newZorder) {
synchronized (getTreeLock()) {
boolean becameHigher = newZorder < oldZorder;
Container parent = getContainer();
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; oldZorder=" + oldZorder + "; newZorder=" + newZorder + "; parent=" + parent);
}
if (!isMixingNeeded()) {
return;
--- 10064,10074 ----
void mixOnZOrderChanging(int oldZorder, int newZorder) {
synchronized (getTreeLock()) {
boolean becameHigher = newZorder < oldZorder;
Container parent = getContainer();
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this +
"; oldZorder=" + oldZorder + "; newZorder=" + newZorder + "; parent=" + parent);
}
if (!isMixingNeeded()) {
return;
*** 10108,10141 ****
// non-container components don't need to handle validation.
}
final boolean isMixingNeeded() {
if (SunToolkit.getSunAwtDisableMixing()) {
! if (mixingLog.isLoggable(PlatformLogger.FINEST)) {
mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
}
return false;
}
if (!areBoundsValid()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return false;
}
Window window = getContainingWindow();
if (window != null) {
if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants() || window.isDisposing()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("containing window = " + window +
"; has h/w descendants = " + window.hasHeavyweightDescendants() +
"; has l/w descendants = " + window.hasLightweightDescendants() +
"; disposing = " + window.isDisposing());
}
return false;
}
} else {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + "; containing window is null");
}
return false;
}
return true;
--- 10108,10141 ----
// non-container components don't need to handle validation.
}
final boolean isMixingNeeded() {
if (SunToolkit.getSunAwtDisableMixing()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINEST)) {
mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
}
return false;
}
if (!areBoundsValid()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
}
return false;
}
Window window = getContainingWindow();
if (window != null) {
if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants() || window.isDisposing()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("containing window = " + window +
"; has h/w descendants = " + window.hasHeavyweightDescendants() +
"; has l/w descendants = " + window.hasLightweightDescendants() +
"; disposing = " + window.isDisposing());
}
return false;
}
} else {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; containing window is null");
}
return false;
}
return true;