src/share/classes/java/awt/Container.java
Print this page
*** 1318,1328 ****
// Should only be called while holding tree lock
int numListening(long mask) {
int superListening = super.numListening(mask);
if (mask == AWTEvent.HIERARCHY_EVENT_MASK) {
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
// Verify listeningChildren is correct
int sum = 0;
for (Component comp : component) {
sum += comp.numListening(mask);
}
--- 1318,1328 ----
// Should only be called while holding tree lock
int numListening(long mask) {
int superListening = super.numListening(mask);
if (mask == AWTEvent.HIERARCHY_EVENT_MASK) {
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
// Verify listeningChildren is correct
int sum = 0;
for (Component comp : component) {
sum += comp.numListening(mask);
}
*** 1330,1340 ****
eventLog.fine("Assertion (listeningChildren == sum) failed");
}
}
return listeningChildren + superListening;
} else if (mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) {
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
// Verify listeningBoundsChildren is correct
int sum = 0;
for (Component comp : component) {
sum += comp.numListening(mask);
}
--- 1330,1340 ----
eventLog.fine("Assertion (listeningChildren == sum) failed");
}
}
return listeningChildren + superListening;
} else if (mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) {
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
// Verify listeningBoundsChildren is correct
int sum = 0;
for (Component comp : component) {
sum += comp.numListening(mask);
}
*** 1343,1362 ****
}
}
return listeningBoundsChildren + superListening;
} else {
// assert false;
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.fine("This code must never be reached");
}
return superListening;
}
}
// Should only be called while holding tree lock
void adjustListeningChildren(long mask, int num) {
! if (eventLog.isLoggable(PlatformLogger.FINE)) {
boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK ||
mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK ||
mask == (AWTEvent.HIERARCHY_EVENT_MASK |
AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK));
if (!toAssert) {
--- 1343,1362 ----
}
}
return listeningBoundsChildren + superListening;
} else {
// assert false;
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("This code must never be reached");
}
return superListening;
}
}
// Should only be called while holding tree lock
void adjustListeningChildren(long mask, int num) {
! if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK ||
mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK ||
mask == (AWTEvent.HIERARCHY_EVENT_MASK |
AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK));
if (!toAssert) {
*** 1393,1403 ****
}
}
// Should only be called while holding tree lock
int countHierarchyMembers() {
! if (log.isLoggable(PlatformLogger.FINE)) {
// Verify descendantsCount is correct
int sum = 0;
for (Component comp : component) {
sum += comp.countHierarchyMembers();
}
--- 1393,1403 ----
}
}
// Should only be called while holding tree lock
int countHierarchyMembers() {
! if (log.isLoggable(PlatformLogger.Level.FINE)) {
// Verify descendantsCount is correct
int sum = 0;
for (Component comp : component) {
sum += comp.countHierarchyMembers();
}
*** 4108,4118 ****
recursiveSubtractAndApplyShape(shape, fromZorder, getBottommostComponentIndex());
}
final void recursiveSubtractAndApplyShape(Region shape, int fromZorder, int toZorder) {
checkTreeLock();
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder);
}
if (fromZorder == -1) {
return;
--- 4108,4118 ----
recursiveSubtractAndApplyShape(shape, fromZorder, getBottommostComponentIndex());
}
final void recursiveSubtractAndApplyShape(Region shape, int fromZorder, int toZorder) {
checkTreeLock();
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this +
"; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder);
}
if (fromZorder == -1) {
return;
*** 4145,4155 ****
recursiveApplyCurrentShape(fromZorder, getBottommostComponentIndex());
}
final void recursiveApplyCurrentShape(int fromZorder, int toZorder) {
checkTreeLock();
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; fromZ=" + fromZorder + "; toZ=" + toZorder);
}
if (fromZorder == -1) {
return;
--- 4145,4155 ----
recursiveApplyCurrentShape(fromZorder, getBottommostComponentIndex());
}
final void recursiveApplyCurrentShape(int fromZorder, int toZorder) {
checkTreeLock();
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this +
"; fromZ=" + fromZorder + "; toZ=" + toZorder);
}
if (fromZorder == -1) {
return;
*** 4262,4272 ****
}
@Override
void mixOnShowing() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
boolean isLightweight = isLightweight();
--- 4262,4272 ----
}
@Override
void mixOnShowing() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
boolean isLightweight = isLightweight();
*** 4287,4297 ****
}
@Override
void mixOnHiding(boolean isLightweight) {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; isLightweight=" + isLightweight);
}
if (isLightweight) {
recursiveHideHeavyweightChildren();
--- 4287,4297 ----
}
@Override
void mixOnHiding(boolean isLightweight) {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this +
"; isLightweight=" + isLightweight);
}
if (isLightweight) {
recursiveHideHeavyweightChildren();
*** 4301,4311 ****
}
@Override
void mixOnReshaping() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
boolean isMixingNeeded = isMixingNeeded();
--- 4301,4311 ----
}
@Override
void mixOnReshaping() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
boolean isMixingNeeded = isMixingNeeded();
*** 4336,4346 ****
}
@Override
void mixOnZOrderChanging(int oldZorder, int newZorder) {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this +
"; oldZ=" + oldZorder + "; newZ=" + newZorder);
}
if (!isMixingNeeded()) {
--- 4336,4346 ----
}
@Override
void mixOnZOrderChanging(int oldZorder, int newZorder) {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this +
"; oldZ=" + oldZorder + "; newZ=" + newZorder);
}
if (!isMixingNeeded()) {
*** 4357,4367 ****
}
@Override
void mixOnValidating() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
--- 4357,4367 ----
}
@Override
void mixOnValidating() {
synchronized (getTreeLock()) {
! if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this);
}
if (!isMixingNeeded()) {
return;
*** 4547,4557 ****
break;
case MouseEvent.MOUSE_WHEEL:
// This may send it somewhere that doesn't have MouseWheelEvents
// enabled. In this case, Component.dispatchEventImpl() will
// retarget the event to a parent that DOES have the events enabled.
! if (eventLog.isLoggable(PlatformLogger.FINEST) && (mouseOver != null)) {
eventLog.finest("retargeting mouse wheel to " +
mouseOver.getName() + ", " +
mouseOver.getClass());
}
retargetMouseEvent(mouseOver, id, e);
--- 4547,4557 ----
break;
case MouseEvent.MOUSE_WHEEL:
// This may send it somewhere that doesn't have MouseWheelEvents
// enabled. In this case, Component.dispatchEventImpl() will
// retarget the event to a parent that DOES have the events enabled.
! if (eventLog.isLoggable(PlatformLogger.Level.FINEST) && (mouseOver != null)) {
eventLog.finest("retargeting mouse wheel to " +
mouseOver.getName() + ", " +
mouseOver.getClass());
}
retargetMouseEvent(mouseOver, id, e);