提交 0fdc467c 编写于 作者: C chegar

Merge

...@@ -899,7 +899,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent> ...@@ -899,7 +899,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
boolean focusedWindowChangeAllowed, long time, boolean focusedWindowChangeAllowed, long time,
CausedFocusEvent.Cause cause) CausedFocusEvent.Cause cause)
{ {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("lightweightChild=" + lightweightChild + ", temporary=" + temporary + focusLog.finest("lightweightChild=" + lightweightChild + ", temporary=" + temporary +
", focusedWindowChangeAllowed=" + focusedWindowChangeAllowed + ", focusedWindowChangeAllowed=" + focusedWindowChangeAllowed +
", time= " + time + ", cause=" + cause); ", time= " + time + ", cause=" + cause);
...@@ -940,7 +940,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent> ...@@ -940,7 +940,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
LWWindowPeer.getOwnerFrameDialog(parentPeer) : parentPeer; LWWindowPeer.getOwnerFrameDialog(parentPeer) : parentPeer;
if (decoratedPeer == null || !decoratedPeer.getPlatformWindow().isActive()) { if (decoratedPeer == null || !decoratedPeer.getPlatformWindow().isActive()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("request rejected, focusedWindowChangeAllowed==false, " + focusLog.fine("request rejected, focusedWindowChangeAllowed==false, " +
"decoratedPeer is inactive: " + decoratedPeer); "decoratedPeer is inactive: " + decoratedPeer);
} }
...@@ -953,7 +953,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent> ...@@ -953,7 +953,7 @@ public abstract class LWComponentPeer<T extends Component, D extends JComponent>
// If parent window can be made focused and has been made focused (synchronously) // If parent window can be made focused and has been made focused (synchronously)
// then we can proceed with children, otherwise we retreat // then we can proceed with children, otherwise we retreat
if (!res || !parentWindow.isFocused()) { if (!res || !parentWindow.isFocused()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("request rejected, res= " + res + ", parentWindow.isFocused()=" + focusLog.fine("request rejected, res= " + res + ", parentWindow.isFocused()=" +
parentWindow.isFocused()); parentWindow.isFocused());
} }
......
...@@ -1123,7 +1123,7 @@ public class LWWindowPeer ...@@ -1123,7 +1123,7 @@ public class LWWindowPeer
* In case of a simple window, triggers appropriate java focus change. * In case of a simple window, triggers appropriate java focus change.
*/ */
public boolean requestWindowFocus(CausedFocusEvent.Cause cause) { public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("requesting native focus to " + this); focusLog.fine("requesting native focus to " + this);
} }
...@@ -1149,7 +1149,7 @@ public class LWWindowPeer ...@@ -1149,7 +1149,7 @@ public class LWWindowPeer
// If owner is not natively active, request native // If owner is not natively active, request native
// activation on it w/o sending events up to java. // activation on it w/o sending events up to java.
if (owner != null && !owner.platformWindow.isActive()) { if (owner != null && !owner.platformWindow.isActive()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("requesting native focus to the owner " + owner); focusLog.fine("requesting native focus to the owner " + owner);
} }
LWWindowPeer currentActivePeer = (currentActive != null ? LWWindowPeer currentActivePeer = (currentActive != null ?
...@@ -1157,7 +1157,7 @@ public class LWWindowPeer ...@@ -1157,7 +1157,7 @@ public class LWWindowPeer
// Ensure the opposite is natively active and suppress sending events. // Ensure the opposite is natively active and suppress sending events.
if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) { if (currentActivePeer != null && currentActivePeer.platformWindow.isActive()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("the opposite is " + currentActivePeer); focusLog.fine("the opposite is " + currentActivePeer);
} }
currentActivePeer.skipNextFocusChange = true; currentActivePeer.skipNextFocusChange = true;
...@@ -1214,7 +1214,7 @@ public class LWWindowPeer ...@@ -1214,7 +1214,7 @@ public class LWWindowPeer
* Changes focused window on java level. * Changes focused window on java level.
*/ */
protected void changeFocusedWindow(boolean becomesFocused, Window opposite) { protected void changeFocusedWindow(boolean becomesFocused, Window opposite) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this); focusLog.fine((becomesFocused?"gaining":"loosing") + " focus window: " + this);
} }
if (skipNextFocusChange) { if (skipNextFocusChange) {
...@@ -1229,7 +1229,7 @@ public class LWWindowPeer ...@@ -1229,7 +1229,7 @@ public class LWWindowPeer
if (becomesFocused) { if (becomesFocused) {
synchronized (getPeerTreeLock()) { synchronized (getPeerTreeLock()) {
if (blocker != null) { if (blocker != null) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("the window is blocked by " + blocker); focusLog.finest("the window is blocked by " + blocker);
} }
return; return;
...@@ -1243,7 +1243,7 @@ public class LWWindowPeer ...@@ -1243,7 +1243,7 @@ public class LWWindowPeer
if (!becomesFocused && if (!becomesFocused &&
(isGrabbing() || getOwnerFrameDialog(grabbingWindow) == this)) (isGrabbing() || getOwnerFrameDialog(grabbingWindow) == this))
{ {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("ungrabbing on " + grabbingWindow); focusLog.fine("ungrabbing on " + grabbingWindow);
} }
// ungrab a simple window if its owner looses activation. // ungrab a simple window if its owner looses activation.
......
...@@ -635,7 +635,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo ...@@ -635,7 +635,7 @@ public class CPlatformWindow extends CFRetainedResource implements PlatformWindo
public long getNSWindowPtr() { public long getNSWindowPtr() {
final long nsWindowPtr = ptr; final long nsWindowPtr = ptr;
if (nsWindowPtr == 0L) { if (nsWindowPtr == 0L) {
if(logger.isLoggable(PlatformLogger.FINE)) { if(logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("NSWindow already disposed?", new Exception("Pointer to native NSWindow is invalid.")); logger.fine("NSWindow already disposed?", new Exception("Pointer to native NSWindow is invalid."));
} }
} }
......
...@@ -297,11 +297,11 @@ public abstract class AWTEvent extends EventObject { ...@@ -297,11 +297,11 @@ public abstract class AWTEvent extends EventObject {
field.setAccessible(true); field.setAccessible(true);
return field; return field;
} catch (SecurityException e) { } catch (SecurityException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e); log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got SecurityException ", e);
} }
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e); log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
} }
} }
...@@ -594,7 +594,7 @@ public abstract class AWTEvent extends EventObject { ...@@ -594,7 +594,7 @@ public abstract class AWTEvent extends EventObject {
boolean b = field.getBoolean(this); boolean b = field.getBoolean(this);
field.setBoolean(that, b); field.setBoolean(that, b);
} catch(IllegalAccessException e) { } catch(IllegalAccessException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e); log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
} }
} }
...@@ -610,7 +610,7 @@ public abstract class AWTEvent extends EventObject { ...@@ -610,7 +610,7 @@ public abstract class AWTEvent extends EventObject {
try { try {
field.setBoolean(this, false); field.setBoolean(this, false);
} catch(IllegalAccessException e) { } catch(IllegalAccessException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("AWTEvent.dispatched() got IllegalAccessException ", e); log.fine("AWTEvent.dispatched() got IllegalAccessException ", e);
} }
} }
......
...@@ -33,11 +33,11 @@ abstract class AttributeValue { ...@@ -33,11 +33,11 @@ abstract class AttributeValue {
private final String[] names; private final String[] names;
protected AttributeValue(int value, String[] names) { protected AttributeValue(int value, String[] names) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("value = " + value + ", names = " + names); log.finest("value = " + value + ", names = " + names);
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
if ((value < 0) || (names == null) || (value >= names.length)) { if ((value < 0) || (names == null) || (value >= names.length)) {
log.finer("Assertion failed"); log.finer("Assertion failed");
} }
......
...@@ -4707,12 +4707,12 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -4707,12 +4707,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
// Check that this component belongs to this app-context // Check that this component belongs to this app-context
AppContext compContext = appContext; AppContext compContext = appContext;
if (compContext != null && !compContext.equals(AppContext.getAppContext())) { if (compContext != null && !compContext.equals(AppContext.getAppContext())) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Event " + e + " is being dispatched on the wrong AppContext"); eventLog.fine("Event " + e + " is being dispatched on the wrong AppContext");
} }
} }
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("{0}", e); eventLog.finest("{0}", e);
} }
...@@ -4751,7 +4751,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -4751,7 +4751,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
return; return;
} }
} }
if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) { if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("" + e); focusLog.finest("" + e);
} }
// MouseWheel may need to be retargeted here so that // MouseWheel may need to be retargeted here so that
...@@ -4809,7 +4809,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -4809,7 +4809,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
if (inputContext != null) { if (inputContext != null) {
inputContext.dispatchEvent(e); inputContext.dispatchEvent(e);
if (e.isConsumed()) { if (e.isConsumed()) {
if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.FINEST)) { if ((e instanceof FocusEvent) && focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("3579: Skipping " + e); focusLog.finest("3579: Skipping " + e);
} }
return; return;
...@@ -4844,7 +4844,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -4844,7 +4844,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
if (p != null) { if (p != null) {
p.preProcessKeyEvent((KeyEvent)e); p.preProcessKeyEvent((KeyEvent)e);
if (e.isConsumed()) { if (e.isConsumed()) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Pre-process consumed event"); focusLog.finest("Pre-process consumed event");
} }
return; return;
...@@ -4977,7 +4977,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -4977,7 +4977,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
// position relative to its parent. // position relative to its parent.
MouseWheelEvent newMWE; MouseWheelEvent newMWE;
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("dispatchMouseWheelToAncestor"); eventLog.finest("dispatchMouseWheelToAncestor");
eventLog.finest("orig event src is of " + e.getSource().getClass()); eventLog.finest("orig event src is of " + e.getSource().getClass());
} }
...@@ -5000,7 +5000,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -5000,7 +5000,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
} }
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("new event src is " + anc.getClass()); eventLog.finest("new event src is " + anc.getClass());
} }
...@@ -5500,7 +5500,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -5500,7 +5500,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
// Should only be called while holding the tree lock // Should only be called while holding the tree lock
int numListening(long mask) { int numListening(long mask) {
// One mask or the other, but not neither or both. // One mask or the other, but not neither or both.
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) && if ((mask != AWTEvent.HIERARCHY_EVENT_MASK) &&
(mask != AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK)) (mask != AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK))
{ {
...@@ -5541,7 +5541,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -5541,7 +5541,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
break; break;
case HierarchyEvent.ANCESTOR_MOVED: case HierarchyEvent.ANCESTOR_MOVED:
case HierarchyEvent.ANCESTOR_RESIZED: case HierarchyEvent.ANCESTOR_RESIZED:
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
if (changeFlags != 0) { if (changeFlags != 0) {
eventLog.fine("Assertion (changeFlags == 0) failed"); eventLog.fine("Assertion (changeFlags == 0) failed");
} }
...@@ -5557,7 +5557,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -5557,7 +5557,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
break; break;
default: default:
// assert false // assert false
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("This code must never be reached"); eventLog.fine("This code must never be reached");
} }
break; break;
...@@ -7643,7 +7643,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7643,7 +7643,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
} }
if (!isRequestFocusAccepted(temporary, focusedWindowChangeAllowed, cause)) { if (!isRequestFocusAccepted(temporary, focusedWindowChangeAllowed, cause)) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("requestFocus is not accepted"); focusLog.finest("requestFocus is not accepted");
} }
return false; return false;
...@@ -7654,7 +7654,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7654,7 +7654,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
Component window = this; Component window = this;
while ( (window != null) && !(window instanceof Window)) { while ( (window != null) && !(window instanceof Window)) {
if (!window.isVisible()) { if (!window.isVisible()) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("component is recurively invisible"); focusLog.finest("component is recurively invisible");
} }
return false; return false;
...@@ -7666,14 +7666,14 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7666,14 +7666,14 @@ public abstract class Component implements ImageObserver, MenuContainer,
Component heavyweight = (peer instanceof LightweightPeer) Component heavyweight = (peer instanceof LightweightPeer)
? getNativeContainer() : this; ? getNativeContainer() : this;
if (heavyweight == null || !heavyweight.isVisible()) { if (heavyweight == null || !heavyweight.isVisible()) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Component is not a part of visible hierarchy"); focusLog.finest("Component is not a part of visible hierarchy");
} }
return false; return false;
} }
peer = heavyweight.peer; peer = heavyweight.peer;
if (peer == null) { if (peer == null) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Peer is null"); focusLog.finest("Peer is null");
} }
return false; return false;
...@@ -7694,11 +7694,11 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7694,11 +7694,11 @@ public abstract class Component implements ImageObserver, MenuContainer,
if (!success) { if (!success) {
KeyboardFocusManager.getCurrentKeyboardFocusManager KeyboardFocusManager.getCurrentKeyboardFocusManager
(appContext).dequeueKeyEvents(time, this); (appContext).dequeueKeyEvents(time, this);
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Peer request failed"); focusLog.finest("Peer request failed");
} }
} else { } else {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Pass for " + this); focusLog.finest("Pass for " + this);
} }
} }
...@@ -7710,7 +7710,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7710,7 +7710,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
CausedFocusEvent.Cause cause) CausedFocusEvent.Cause cause)
{ {
if (!isFocusable() || !isVisible()) { if (!isFocusable() || !isVisible()) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Not focusable or not visible"); focusLog.finest("Not focusable or not visible");
} }
return false; return false;
...@@ -7718,7 +7718,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7718,7 +7718,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
ComponentPeer peer = this.peer; ComponentPeer peer = this.peer;
if (peer == null) { if (peer == null) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("peer is null"); focusLog.finest("peer is null");
} }
return false; return false;
...@@ -7726,7 +7726,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7726,7 +7726,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
Window window = getContainingWindow(); Window window = getContainingWindow();
if (window == null || !window.isFocusableWindow()) { if (window == null || !window.isFocusableWindow()) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Component doesn't have toplevel"); focusLog.finest("Component doesn't have toplevel");
} }
return false; return false;
...@@ -7748,7 +7748,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7748,7 +7748,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
// Controller is supposed to verify focus transfers and for this it // Controller is supposed to verify focus transfers and for this it
// should know both from and to components. And it shouldn't verify // should know both from and to components. And it shouldn't verify
// transfers from when these components are equal. // transfers from when these components are equal.
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("focus owner is null or this"); focusLog.finest("focus owner is null or this");
} }
return true; return true;
...@@ -7761,7 +7761,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7761,7 +7761,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
// most recent focus owner. But most recent focus owner can be // most recent focus owner. But most recent focus owner can be
// changed by requestFocsuXXX() call only, so this transfer has // changed by requestFocsuXXX() call only, so this transfer has
// been already approved. // been already approved.
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("cause is activation"); focusLog.finest("cause is activation");
} }
return true; return true;
...@@ -7772,7 +7772,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7772,7 +7772,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
temporary, temporary,
focusedWindowChangeAllowed, focusedWindowChangeAllowed,
cause); cause);
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("RequestFocusController returns {0}", ret); focusLog.finest("RequestFocusController returns {0}", ret);
} }
...@@ -7864,7 +7864,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7864,7 +7864,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
boolean transferFocus(boolean clearOnFailure) { boolean transferFocus(boolean clearOnFailure) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("clearOnFailure = " + clearOnFailure); focusLog.finer("clearOnFailure = " + clearOnFailure);
} }
Component toFocus = getNextFocusCandidate(); Component toFocus = getNextFocusCandidate();
...@@ -7873,12 +7873,12 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7873,12 +7873,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD); res = toFocus.requestFocusInWindow(CausedFocusEvent.Cause.TRAVERSAL_FORWARD);
} }
if (clearOnFailure && !res) { if (clearOnFailure && !res) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("clear global focus owner"); focusLog.finer("clear global focus owner");
} }
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv(); KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv();
} }
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("returning result: " + res); focusLog.finer("returning result: " + res);
} }
return res; return res;
...@@ -7893,19 +7893,19 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7893,19 +7893,19 @@ public abstract class Component implements ImageObserver, MenuContainer,
comp = rootAncestor; comp = rootAncestor;
rootAncestor = comp.getFocusCycleRootAncestor(); rootAncestor = comp.getFocusCycleRootAncestor();
} }
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("comp = " + comp + ", root = " + rootAncestor); focusLog.finer("comp = " + comp + ", root = " + rootAncestor);
} }
Component candidate = null; Component candidate = null;
if (rootAncestor != null) { if (rootAncestor != null) {
FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy(); FocusTraversalPolicy policy = rootAncestor.getFocusTraversalPolicy();
Component toFocus = policy.getComponentAfter(rootAncestor, comp); Component toFocus = policy.getComponentAfter(rootAncestor, comp);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("component after is " + toFocus); focusLog.finer("component after is " + toFocus);
} }
if (toFocus == null) { if (toFocus == null) {
toFocus = policy.getDefaultComponent(rootAncestor); toFocus = policy.getDefaultComponent(rootAncestor);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("default component is " + toFocus); focusLog.finer("default component is " + toFocus);
} }
} }
...@@ -7917,7 +7917,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7917,7 +7917,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
candidate = toFocus; candidate = toFocus;
} }
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Focus transfer candidate: " + candidate); focusLog.finer("Focus transfer candidate: " + candidate);
} }
return candidate; return candidate;
...@@ -7954,12 +7954,12 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -7954,12 +7954,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
} }
if (clearOnFailure && !res) { if (clearOnFailure && !res) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("clear global focus owner"); focusLog.finer("clear global focus owner");
} }
KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv(); KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwnerPriv();
} }
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("returning result: " + res); focusLog.finer("returning result: " + res);
} }
return res; return res;
...@@ -9740,7 +9740,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -9740,7 +9740,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
checkTreeLock(); checkTreeLock();
if (!areBoundsValid()) { if (!areBoundsValid()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid()); mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
} }
return; return;
...@@ -9776,7 +9776,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -9776,7 +9776,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
this.compoundShape = shape; this.compoundShape = shape;
Point compAbsolute = getLocationOnWindow(); Point compAbsolute = getLocationOnWindow();
if (mixingLog.isLoggable(PlatformLogger.FINER)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINER)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; compAbsolute=" + compAbsolute + "; shape=" + shape); "; compAbsolute=" + compAbsolute + "; shape=" + shape);
} }
...@@ -9910,7 +9910,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -9910,7 +9910,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
checkTreeLock(); checkTreeLock();
Region s = getNormalShape(); Region s = getNormalShape();
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; normalShape=" + s); mixingLog.fine("this = " + this + "; normalShape=" + s);
} }
...@@ -9944,7 +9944,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -9944,7 +9944,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
} }
} }
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("currentShape=" + s); mixingLog.fine("currentShape=" + s);
} }
...@@ -9954,12 +9954,12 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -9954,12 +9954,12 @@ public abstract class Component implements ImageObserver, MenuContainer,
void applyCurrentShape() { void applyCurrentShape() {
checkTreeLock(); checkTreeLock();
if (!areBoundsValid()) { if (!areBoundsValid()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid()); mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
} }
return; // Because applyCompoundShape() ignores such components anyway return; // Because applyCompoundShape() ignores such components anyway
} }
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
applyCompoundShape(calculateCurrentShape()); applyCompoundShape(calculateCurrentShape());
...@@ -9968,7 +9968,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -9968,7 +9968,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
final void subtractAndApplyShape(Region s) { final void subtractAndApplyShape(Region s) {
checkTreeLock(); checkTreeLock();
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; s=" + s); mixingLog.fine("this = " + this + "; s=" + s);
} }
...@@ -10015,7 +10015,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10015,7 +10015,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
void mixOnShowing() { void mixOnShowing() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
if (!isMixingNeeded()) { if (!isMixingNeeded()) {
...@@ -10033,7 +10033,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10033,7 +10033,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
// We cannot be sure that the peer exists at this point, so we need the argument // 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. // to find out whether the hiding component is (well, actually was) a LW or a HW.
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; isLightweight = " + isLightweight); mixingLog.fine("this = " + this + "; isLightweight = " + isLightweight);
} }
if (!isMixingNeeded()) { if (!isMixingNeeded()) {
...@@ -10047,7 +10047,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10047,7 +10047,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
void mixOnReshaping() { void mixOnReshaping() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
if (!isMixingNeeded()) { if (!isMixingNeeded()) {
...@@ -10066,7 +10066,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10066,7 +10066,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
boolean becameHigher = newZorder < oldZorder; boolean becameHigher = newZorder < oldZorder;
Container parent = getContainer(); Container parent = getContainer();
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; oldZorder=" + oldZorder + "; newZorder=" + newZorder + "; parent=" + parent); "; oldZorder=" + oldZorder + "; newZorder=" + newZorder + "; parent=" + parent);
} }
...@@ -10110,13 +10110,13 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10110,13 +10110,13 @@ public abstract class Component implements ImageObserver, MenuContainer,
final boolean isMixingNeeded() { final boolean isMixingNeeded() {
if (SunToolkit.getSunAwtDisableMixing()) { if (SunToolkit.getSunAwtDisableMixing()) {
if (mixingLog.isLoggable(PlatformLogger.FINEST)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINEST)) {
mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing"); mixingLog.finest("this = " + this + "; Mixing disabled via sun.awt.disableMixing");
} }
return false; return false;
} }
if (!areBoundsValid()) { if (!areBoundsValid()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid()); mixingLog.fine("this = " + this + "; areBoundsValid = " + areBoundsValid());
} }
return false; return false;
...@@ -10124,7 +10124,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10124,7 +10124,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
Window window = getContainingWindow(); Window window = getContainingWindow();
if (window != null) { if (window != null) {
if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants() || window.isDisposing()) { if (!window.hasHeavyweightDescendants() || !window.hasLightweightDescendants() || window.isDisposing()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("containing window = " + window + mixingLog.fine("containing window = " + window +
"; has h/w descendants = " + window.hasHeavyweightDescendants() + "; has h/w descendants = " + window.hasHeavyweightDescendants() +
"; has l/w descendants = " + window.hasLightweightDescendants() + "; has l/w descendants = " + window.hasLightweightDescendants() +
...@@ -10133,7 +10133,7 @@ public abstract class Component implements ImageObserver, MenuContainer, ...@@ -10133,7 +10133,7 @@ public abstract class Component implements ImageObserver, MenuContainer,
return false; return false;
} }
} else { } else {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + "; containing window is null"); mixingLog.fine("this = " + this + "; containing window is null");
} }
return false; return false;
......
...@@ -1320,7 +1320,7 @@ public class Container extends Component { ...@@ -1320,7 +1320,7 @@ public class Container extends Component {
int superListening = super.numListening(mask); int superListening = super.numListening(mask);
if (mask == AWTEvent.HIERARCHY_EVENT_MASK) { if (mask == AWTEvent.HIERARCHY_EVENT_MASK) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
// Verify listeningChildren is correct // Verify listeningChildren is correct
int sum = 0; int sum = 0;
for (Component comp : component) { for (Component comp : component) {
...@@ -1332,7 +1332,7 @@ public class Container extends Component { ...@@ -1332,7 +1332,7 @@ public class Container extends Component {
} }
return listeningChildren + superListening; return listeningChildren + superListening;
} else if (mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) { } else if (mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
// Verify listeningBoundsChildren is correct // Verify listeningBoundsChildren is correct
int sum = 0; int sum = 0;
for (Component comp : component) { for (Component comp : component) {
...@@ -1345,7 +1345,7 @@ public class Container extends Component { ...@@ -1345,7 +1345,7 @@ public class Container extends Component {
return listeningBoundsChildren + superListening; return listeningBoundsChildren + superListening;
} else { } else {
// assert false; // assert false;
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("This code must never be reached"); eventLog.fine("This code must never be reached");
} }
return superListening; return superListening;
...@@ -1354,7 +1354,7 @@ public class Container extends Component { ...@@ -1354,7 +1354,7 @@ public class Container extends Component {
// Should only be called while holding tree lock // Should only be called while holding tree lock
void adjustListeningChildren(long mask, int num) { void adjustListeningChildren(long mask, int num) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK || boolean toAssert = (mask == AWTEvent.HIERARCHY_EVENT_MASK ||
mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK || mask == AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK ||
mask == (AWTEvent.HIERARCHY_EVENT_MASK | mask == (AWTEvent.HIERARCHY_EVENT_MASK |
...@@ -1395,7 +1395,7 @@ public class Container extends Component { ...@@ -1395,7 +1395,7 @@ public class Container extends Component {
// Should only be called while holding tree lock // Should only be called while holding tree lock
int countHierarchyMembers() { int countHierarchyMembers() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
// Verify descendantsCount is correct // Verify descendantsCount is correct
int sum = 0; int sum = 0;
for (Component comp : component) { for (Component comp : component) {
...@@ -4110,7 +4110,7 @@ public class Container extends Component { ...@@ -4110,7 +4110,7 @@ public class Container extends Component {
final void recursiveSubtractAndApplyShape(Region shape, int fromZorder, int toZorder) { final void recursiveSubtractAndApplyShape(Region shape, int fromZorder, int toZorder) {
checkTreeLock(); checkTreeLock();
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder); "; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder);
} }
...@@ -4147,7 +4147,7 @@ public class Container extends Component { ...@@ -4147,7 +4147,7 @@ public class Container extends Component {
final void recursiveApplyCurrentShape(int fromZorder, int toZorder) { final void recursiveApplyCurrentShape(int fromZorder, int toZorder) {
checkTreeLock(); checkTreeLock();
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; fromZ=" + fromZorder + "; toZ=" + toZorder); "; fromZ=" + fromZorder + "; toZ=" + toZorder);
} }
...@@ -4264,7 +4264,7 @@ public class Container extends Component { ...@@ -4264,7 +4264,7 @@ public class Container extends Component {
@Override @Override
void mixOnShowing() { void mixOnShowing() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
...@@ -4289,7 +4289,7 @@ public class Container extends Component { ...@@ -4289,7 +4289,7 @@ public class Container extends Component {
@Override @Override
void mixOnHiding(boolean isLightweight) { void mixOnHiding(boolean isLightweight) {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; isLightweight=" + isLightweight); "; isLightweight=" + isLightweight);
} }
...@@ -4303,7 +4303,7 @@ public class Container extends Component { ...@@ -4303,7 +4303,7 @@ public class Container extends Component {
@Override @Override
void mixOnReshaping() { void mixOnReshaping() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
...@@ -4338,7 +4338,7 @@ public class Container extends Component { ...@@ -4338,7 +4338,7 @@ public class Container extends Component {
@Override @Override
void mixOnZOrderChanging(int oldZorder, int newZorder) { void mixOnZOrderChanging(int oldZorder, int newZorder) {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; oldZ=" + oldZorder + "; newZ=" + newZorder); "; oldZ=" + oldZorder + "; newZ=" + newZorder);
} }
...@@ -4359,7 +4359,7 @@ public class Container extends Component { ...@@ -4359,7 +4359,7 @@ public class Container extends Component {
@Override @Override
void mixOnValidating() { void mixOnValidating() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(PlatformLogger.FINE)) { if (mixingLog.isLoggable(PlatformLogger.Level.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
...@@ -4549,7 +4549,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { ...@@ -4549,7 +4549,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
// This may send it somewhere that doesn't have MouseWheelEvents // This may send it somewhere that doesn't have MouseWheelEvents
// enabled. In this case, Component.dispatchEventImpl() will // enabled. In this case, Component.dispatchEventImpl() will
// retarget the event to a parent that DOES have the events enabled. // retarget the event to a parent that DOES have the events enabled.
if (eventLog.isLoggable(PlatformLogger.FINEST) && (mouseOver != null)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST) && (mouseOver != null)) {
eventLog.finest("retargeting mouse wheel to " + eventLog.finest("retargeting mouse wheel to " +
mouseOver.getName() + ", " + mouseOver.getName() + ", " +
mouseOver.getClass()); mouseOver.getClass());
......
...@@ -165,7 +165,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -165,7 +165,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
if (getImplicitDownCycleTraversal()) { if (getImplicitDownCycleTraversal()) {
retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont); retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont);
if (retComp != null && log.isLoggable(PlatformLogger.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Transfered focus down-cycle to " + retComp + log.fine("### Transfered focus down-cycle to " + retComp +
" in the focus cycle root " + cont); " in the focus cycle root " + cont);
} }
...@@ -177,7 +177,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -177,7 +177,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
cont.getFocusTraversalPolicy().getDefaultComponent(cont) : cont.getFocusTraversalPolicy().getDefaultComponent(cont) :
cont.getFocusTraversalPolicy().getLastComponent(cont)); cont.getFocusTraversalPolicy().getLastComponent(cont));
if (retComp != null && log.isLoggable(PlatformLogger.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont); log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont);
} }
} }
...@@ -208,7 +208,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -208,7 +208,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
* aComponent is null * aComponent is null
*/ */
public Component getComponentAfter(Container aContainer, Component aComponent) { public Component getComponentAfter(Container aContainer, Component aComponent) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Searching in " + aContainer + " for component after " + aComponent); log.fine("### Searching in " + aContainer + " for component after " + aComponent);
} }
...@@ -238,7 +238,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -238,7 +238,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
// See if the component is inside of policy provider. // See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent); Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) { if (provider != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -249,7 +249,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -249,7 +249,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
// Null result means that we overstepped the limit of the FTP's cycle. // Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found. // In that case we must quit the cycle, otherwise return the component found.
if (afterComp != null) { if (afterComp != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### FTP returned " + afterComp); log.fine("### FTP returned " + afterComp);
} }
return afterComp; return afterComp;
...@@ -259,14 +259,14 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -259,14 +259,14 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle + ", component is " + aComponent); log.fine("### Cycle is " + cycle + ", component is " + aComponent);
} }
int index = getComponentIndex(cycle, aComponent); int index = getComponentIndex(cycle, aComponent);
if (index < 0) { if (index < 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer); log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
} }
return getFirstComponent(aContainer); return getFirstComponent(aContainer);
...@@ -331,7 +331,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -331,7 +331,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
// See if the component is inside of policy provider. // See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent); Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) { if (provider != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -342,7 +342,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -342,7 +342,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
// Null result means that we overstepped the limit of the FTP's cycle. // Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found. // In that case we must quit the cycle, otherwise return the component found.
if (beforeComp != null) { if (beforeComp != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### FTP returned " + beforeComp); log.fine("### FTP returned " + beforeComp);
} }
return beforeComp; return beforeComp;
...@@ -357,14 +357,14 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -357,14 +357,14 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle + ", component is " + aComponent); log.fine("### Cycle is " + cycle + ", component is " + aComponent);
} }
int index = getComponentIndex(cycle, aComponent); int index = getComponentIndex(cycle, aComponent);
if (index < 0) { if (index < 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer); log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
} }
return getLastComponent(aContainer); return getLastComponent(aContainer);
...@@ -411,7 +411,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -411,7 +411,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
public Component getFirstComponent(Container aContainer) { public Component getFirstComponent(Container aContainer) {
List<Component> cycle; List<Component> cycle;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Getting first component in " + aContainer); log.fine("### Getting first component in " + aContainer);
} }
if (aContainer == null) { if (aContainer == null) {
...@@ -432,12 +432,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -432,12 +432,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is empty"); log.fine("### Cycle is empty");
} }
return null; return null;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle); log.fine("### Cycle is " + cycle);
} }
...@@ -467,7 +467,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -467,7 +467,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
*/ */
public Component getLastComponent(Container aContainer) { public Component getLastComponent(Container aContainer) {
List<Component> cycle; List<Component> cycle;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Getting last component in " + aContainer); log.fine("### Getting last component in " + aContainer);
} }
...@@ -488,12 +488,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -488,12 +488,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is empty"); log.fine("### Cycle is empty");
} }
return null; return null;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle); log.fine("### Cycle is " + cycle);
} }
......
...@@ -310,7 +310,7 @@ public class Cursor implements java.io.Serializable { ...@@ -310,7 +310,7 @@ public class Cursor implements java.io.Serializable {
String key = prefix + DotFileSuffix; String key = prefix + DotFileSuffix;
if (!systemCustomCursorProperties.containsKey(key)) { if (!systemCustomCursorProperties.containsKey(key)) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null"); log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
} }
return null; return null;
...@@ -365,7 +365,7 @@ public class Cursor implements java.io.Serializable { ...@@ -365,7 +365,7 @@ public class Cursor implements java.io.Serializable {
} }
if (cursor == null) { if (cursor == null) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null"); log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
} }
} else { } else {
......
...@@ -310,7 +310,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -310,7 +310,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
* <code>false</code> otherwise * <code>false</code> otherwise
*/ */
public boolean dispatchEvent(AWTEvent e) { public boolean dispatchEvent(AWTEvent e) {
if (focusLog.isLoggable(PlatformLogger.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) {
focusLog.fine("" + e); focusLog.fine("" + e);
} }
switch (e.getID()) { switch (e.getID()) {
...@@ -419,7 +419,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -419,7 +419,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
// The component which last has the focus when this window was focused // The component which last has the focus when this window was focused
// should receive focus first // should receive focus first
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("tempLost {0}, toFocus {1}", focusLog.finer("tempLost {0}, toFocus {1}",
tempLost, toFocus); tempLost, toFocus);
} }
...@@ -488,7 +488,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -488,7 +488,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
Component oldFocusOwner = getGlobalFocusOwner(); Component oldFocusOwner = getGlobalFocusOwner();
Component newFocusOwner = fe.getComponent(); Component newFocusOwner = fe.getComponent();
if (oldFocusOwner == newFocusOwner) { if (oldFocusOwner == newFocusOwner) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Skipping {0} because focus owner is the same", e); focusLog.fine("Skipping {0} because focus owner is the same", e);
} }
// We can't just drop the event - there could be // We can't just drop the event - there could be
...@@ -607,7 +607,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -607,7 +607,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
FocusEvent fe = (FocusEvent)e; FocusEvent fe = (FocusEvent)e;
Component currentFocusOwner = getGlobalFocusOwner(); Component currentFocusOwner = getGlobalFocusOwner();
if (currentFocusOwner == null) { if (currentFocusOwner == null) {
if (focusLog.isLoggable(PlatformLogger.FINE)) if (focusLog.isLoggable(PlatformLogger.Level.FINE))
focusLog.fine("Skipping {0} because focus owner is null", e); focusLog.fine("Skipping {0} because focus owner is null", e);
break; break;
} }
...@@ -615,7 +615,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -615,7 +615,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
// If we make a mistake because of retargeting, then the // If we make a mistake because of retargeting, then the
// FOCUS_GAINED handler will correct it. // FOCUS_GAINED handler will correct it.
if (currentFocusOwner == fe.getOppositeComponent()) { if (currentFocusOwner == fe.getOppositeComponent()) {
if (focusLog.isLoggable(PlatformLogger.FINE)) if (focusLog.isLoggable(PlatformLogger.Level.FINE))
focusLog.fine("Skipping {0} because current focus owner is equal to opposite", e); focusLog.fine("Skipping {0} because current focus owner is equal to opposite", e);
break; break;
} }
...@@ -688,7 +688,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -688,7 +688,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
Window losingFocusWindow = we.getWindow(); Window losingFocusWindow = we.getWindow();
Window activeWindow = getGlobalActiveWindow(); Window activeWindow = getGlobalActiveWindow();
Window oppositeWindow = we.getOppositeWindow(); Window oppositeWindow = we.getOppositeWindow();
if (focusLog.isLoggable(PlatformLogger.FINE)) if (focusLog.isLoggable(PlatformLogger.Level.FINE))
focusLog.fine("Active {0}, Current focused {1}, losing focus {2} opposite {3}", focusLog.fine("Active {0}, Current focused {1}, losing focus {2} opposite {3}",
activeWindow, currentFocusedWindow, activeWindow, currentFocusedWindow,
losingFocusWindow, oppositeWindow); losingFocusWindow, oppositeWindow);
...@@ -874,7 +874,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -874,7 +874,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
} }
} }
if (ke != null) { if (ke != null) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Pumping approved event {0}", ke); focusLog.finer("Pumping approved event {0}", ke);
} }
enqueuedKeyEvents.removeFirst(); enqueuedKeyEvents.removeFirst();
...@@ -891,7 +891,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -891,7 +891,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
* Dumps the list of type-ahead queue markers to stderr * Dumps the list of type-ahead queue markers to stderr
*/ */
void dumpMarkers() { void dumpMarkers() {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest(">>> Markers dump, time: {0}", System.currentTimeMillis()); focusLog.finest(">>> Markers dump, time: {0}", System.currentTimeMillis());
synchronized (this) { synchronized (this) {
if (typeAheadMarkers.size() != 0) { if (typeAheadMarkers.size() != 0) {
...@@ -925,7 +925,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -925,7 +925,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
// The fix is rolled out. // The fix is rolled out.
if (ke.getWhen() > marker.after) { if (ke.getWhen() > marker.after) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Storing event {0} because of marker {1}", ke, marker); focusLog.finer("Storing event {0} because of marker {1}", ke, marker);
} }
enqueuedKeyEvents.addLast(ke); enqueuedKeyEvents.addLast(ke);
...@@ -939,7 +939,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -939,7 +939,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
} }
case FocusEvent.FOCUS_GAINED: case FocusEvent.FOCUS_GAINED:
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Markers before FOCUS_GAINED on {0}", target); focusLog.finest("Markers before FOCUS_GAINED on {0}", target);
} }
dumpMarkers(); dumpMarkers();
...@@ -968,7 +968,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -968,7 +968,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
} }
} else { } else {
// Exception condition - event without marker // Exception condition - event without marker
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Event without marker {0}", e); focusLog.finer("Event without marker {0}", e);
} }
} }
...@@ -1209,7 +1209,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -1209,7 +1209,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
return; return;
} }
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Enqueue at {0} for {1}", focusLog.finer("Enqueue at {0} for {1}",
after, untilFocused); after, untilFocused);
} }
...@@ -1251,7 +1251,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -1251,7 +1251,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
return; return;
} }
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Dequeue at {0} for {1}", focusLog.finer("Dequeue at {0} for {1}",
after, untilFocused); after, untilFocused);
} }
......
...@@ -138,7 +138,7 @@ class EventDispatchThread extends Thread { ...@@ -138,7 +138,7 @@ class EventDispatchThread extends Thread {
} }
void addEventFilter(EventFilter filter) { void addEventFilter(EventFilter filter) {
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("adding the event filter: " + filter); eventLog.finest("adding the event filter: " + filter);
} }
synchronized (eventFilters) { synchronized (eventFilters) {
...@@ -164,7 +164,7 @@ class EventDispatchThread extends Thread { ...@@ -164,7 +164,7 @@ class EventDispatchThread extends Thread {
} }
void removeEventFilter(EventFilter filter) { void removeEventFilter(EventFilter filter) {
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("removing the event filter: " + filter); eventLog.finest("removing the event filter: " + filter);
} }
synchronized (eventFilters) { synchronized (eventFilters) {
...@@ -209,7 +209,7 @@ class EventDispatchThread extends Thread { ...@@ -209,7 +209,7 @@ class EventDispatchThread extends Thread {
} }
while (eventOK == false); while (eventOK == false);
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("Dispatching: " + event); eventLog.finest("Dispatching: " + event);
} }
...@@ -236,7 +236,7 @@ class EventDispatchThread extends Thread { ...@@ -236,7 +236,7 @@ class EventDispatchThread extends Thread {
} }
private void processException(Throwable e) { private void processException(Throwable e) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Processing exception: " + e); eventLog.fine("Processing exception: " + e);
} }
getUncaughtExceptionHandler().uncaughtException(this, e); getUncaughtExceptionHandler().uncaughtException(this, e);
......
...@@ -751,7 +751,7 @@ public class EventQueue { ...@@ -751,7 +751,7 @@ public class EventQueue {
dispatchThread.stopDispatching(); dispatchThread.stopDispatching();
} }
} else { } else {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Unable to dispatch event: " + event); eventLog.fine("Unable to dispatch event: " + event);
} }
} }
...@@ -849,7 +849,7 @@ public class EventQueue { ...@@ -849,7 +849,7 @@ public class EventQueue {
* @since 1.2 * @since 1.2
*/ */
public void push(EventQueue newEventQueue) { public void push(EventQueue newEventQueue) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("EventQueue.push(" + newEventQueue + ")"); eventLog.fine("EventQueue.push(" + newEventQueue + ")");
} }
...@@ -875,7 +875,7 @@ public class EventQueue { ...@@ -875,7 +875,7 @@ public class EventQueue {
// Use getNextEventPrivate() as it doesn't call flushPendingEvents() // Use getNextEventPrivate() as it doesn't call flushPendingEvents()
newEventQueue.postEventPrivate(topQueue.getNextEventPrivate()); newEventQueue.postEventPrivate(topQueue.getNextEventPrivate());
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Interrupted push", ie); eventLog.fine("Interrupted push", ie);
} }
} }
...@@ -914,7 +914,7 @@ public class EventQueue { ...@@ -914,7 +914,7 @@ public class EventQueue {
* @since 1.2 * @since 1.2
*/ */
protected void pop() throws EmptyStackException { protected void pop() throws EmptyStackException {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("EventQueue.pop(" + this + ")"); eventLog.fine("EventQueue.pop(" + this + ")");
} }
...@@ -937,7 +937,7 @@ public class EventQueue { ...@@ -937,7 +937,7 @@ public class EventQueue {
try { try {
prevQueue.postEventPrivate(topQueue.getNextEventPrivate()); prevQueue.postEventPrivate(topQueue.getNextEventPrivate());
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine("Interrupted pop", ie); eventLog.fine("Interrupted pop", ie);
} }
} }
......
...@@ -652,7 +652,7 @@ public abstract class KeyboardFocusManager ...@@ -652,7 +652,7 @@ public abstract class KeyboardFocusManager
} }
void setNativeFocusOwner(Component comp) { void setNativeFocusOwner(Component comp) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Calling peer {0} setCurrentFocusOwner for {1}", focusLog.finest("Calling peer {0} setCurrentFocusOwner for {1}",
String.valueOf(peer), String.valueOf(comp)); String.valueOf(peer), String.valueOf(comp));
} }
...@@ -961,7 +961,7 @@ public abstract class KeyboardFocusManager ...@@ -961,7 +961,7 @@ public abstract class KeyboardFocusManager
checkKFMSecurity(); checkKFMSecurity();
oldActiveWindow = getActiveWindow(); oldActiveWindow = getActiveWindow();
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Setting global active window to " + activeWindow + ", old active " + oldActiveWindow); focusLog.finer("Setting global active window to " + activeWindow + ", old active " + oldActiveWindow);
} }
...@@ -2196,7 +2196,7 @@ public abstract class KeyboardFocusManager ...@@ -2196,7 +2196,7 @@ public abstract class KeyboardFocusManager
HeavyweightFocusRequest(Component heavyweight, Component descendant, HeavyweightFocusRequest(Component heavyweight, Component descendant,
boolean temporary, CausedFocusEvent.Cause cause) { boolean temporary, CausedFocusEvent.Cause cause) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (heavyweight == null) { if (heavyweight == null) {
log.fine("Assertion (heavyweight != null) failed"); log.fine("Assertion (heavyweight != null) failed");
} }
...@@ -2208,7 +2208,7 @@ public abstract class KeyboardFocusManager ...@@ -2208,7 +2208,7 @@ public abstract class KeyboardFocusManager
} }
boolean addLightweightRequest(Component descendant, boolean addLightweightRequest(Component descendant,
boolean temporary, CausedFocusEvent.Cause cause) { boolean temporary, CausedFocusEvent.Cause cause) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (this == HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) { if (this == HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) {
log.fine("Assertion (this != HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) failed"); log.fine("Assertion (this != HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) failed");
} }
...@@ -2386,7 +2386,7 @@ public abstract class KeyboardFocusManager ...@@ -2386,7 +2386,7 @@ public abstract class KeyboardFocusManager
(Component heavyweight, Component descendant, boolean temporary, (Component heavyweight, Component descendant, boolean temporary,
boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause) boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause)
{ {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (heavyweight == null) { if (heavyweight == null) {
log.fine("Assertion (heavyweight != null) failed"); log.fine("Assertion (heavyweight != null) failed");
} }
...@@ -2408,11 +2408,11 @@ public abstract class KeyboardFocusManager ...@@ -2408,11 +2408,11 @@ public abstract class KeyboardFocusManager
Component currentFocusOwner = thisManager.getGlobalFocusOwner(); Component currentFocusOwner = thisManager.getGlobalFocusOwner();
Component nativeFocusOwner = thisManager.getNativeFocusOwner(); Component nativeFocusOwner = thisManager.getNativeFocusOwner();
Window nativeFocusedWindow = thisManager.getNativeFocusedWindow(); Window nativeFocusedWindow = thisManager.getNativeFocusedWindow();
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("SNFH for {0} in {1}", focusLog.finer("SNFH for {0} in {1}",
String.valueOf(descendant), String.valueOf(heavyweight)); String.valueOf(descendant), String.valueOf(heavyweight));
} }
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("0. Current focus owner {0}", focusLog.finest("0. Current focus owner {0}",
String.valueOf(currentFocusOwner)); String.valueOf(currentFocusOwner));
focusLog.finest("0. Native focus owner {0}", focusLog.finest("0. Native focus owner {0}",
...@@ -2422,7 +2422,7 @@ public abstract class KeyboardFocusManager ...@@ -2422,7 +2422,7 @@ public abstract class KeyboardFocusManager
} }
synchronized (heavyweightRequests) { synchronized (heavyweightRequests) {
HeavyweightFocusRequest hwFocusRequest = getLastHWRequest(); HeavyweightFocusRequest hwFocusRequest = getLastHWRequest();
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Request {0}", String.valueOf(hwFocusRequest)); focusLog.finest("Request {0}", String.valueOf(hwFocusRequest));
} }
if (hwFocusRequest == null && if (hwFocusRequest == null &&
...@@ -2430,7 +2430,7 @@ public abstract class KeyboardFocusManager ...@@ -2430,7 +2430,7 @@ public abstract class KeyboardFocusManager
{ {
if (descendant == currentFocusOwner) { if (descendant == currentFocusOwner) {
// Redundant request. // Redundant request.
if (focusLog.isLoggable(PlatformLogger.FINEST)) if (focusLog.isLoggable(PlatformLogger.Level.FINEST))
focusLog.finest("1. SNFH_FAILURE for {0}", focusLog.finest("1. SNFH_FAILURE for {0}",
String.valueOf(descendant)); String.valueOf(descendant));
return SNFH_FAILURE; return SNFH_FAILURE;
...@@ -2464,7 +2464,7 @@ public abstract class KeyboardFocusManager ...@@ -2464,7 +2464,7 @@ public abstract class KeyboardFocusManager
// SunToolkit.postPriorityEvent(newFocusOwnerEvent); // SunToolkit.postPriorityEvent(newFocusOwnerEvent);
SunToolkit.postEvent(descendant.appContext, newFocusOwnerEvent); SunToolkit.postEvent(descendant.appContext, newFocusOwnerEvent);
if (focusLog.isLoggable(PlatformLogger.FINEST)) if (focusLog.isLoggable(PlatformLogger.Level.FINEST))
focusLog.finest("2. SNFH_HANDLED for {0}", String.valueOf(descendant)); focusLog.finest("2. SNFH_HANDLED for {0}", String.valueOf(descendant));
return SNFH_SUCCESS_HANDLED; return SNFH_SUCCESS_HANDLED;
} else if (hwFocusRequest != null && } else if (hwFocusRequest != null &&
...@@ -2478,7 +2478,7 @@ public abstract class KeyboardFocusManager ...@@ -2478,7 +2478,7 @@ public abstract class KeyboardFocusManager
manager.enqueueKeyEvents(time, descendant); manager.enqueueKeyEvents(time, descendant);
} }
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("3. SNFH_HANDLED for lightweight" + focusLog.finest("3. SNFH_HANDLED for lightweight" +
descendant + " in " + heavyweight); descendant + " in " + heavyweight);
} }
...@@ -2502,7 +2502,7 @@ public abstract class KeyboardFocusManager ...@@ -2502,7 +2502,7 @@ public abstract class KeyboardFocusManager
(hwFocusRequest != null) (hwFocusRequest != null)
? hwFocusRequest.heavyweight ? hwFocusRequest.heavyweight
: nativeFocusedWindow)) { : nativeFocusedWindow)) {
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("4. SNFH_FAILURE for " + descendant); focusLog.finest("4. SNFH_FAILURE for " + descendant);
} }
return SNFH_FAILURE; return SNFH_FAILURE;
...@@ -2513,7 +2513,7 @@ public abstract class KeyboardFocusManager ...@@ -2513,7 +2513,7 @@ public abstract class KeyboardFocusManager
heavyweightRequests.add heavyweightRequests.add
(new HeavyweightFocusRequest(heavyweight, descendant, (new HeavyweightFocusRequest(heavyweight, descendant,
temporary, cause)); temporary, cause));
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("5. SNFH_PROCEED for " + descendant); focusLog.finest("5. SNFH_PROCEED for " + descendant);
} }
return SNFH_SUCCESS_PROCEED; return SNFH_SUCCESS_PROCEED;
...@@ -2905,11 +2905,11 @@ public abstract class KeyboardFocusManager ...@@ -2905,11 +2905,11 @@ public abstract class KeyboardFocusManager
} }
KeyboardFocusManager manager = getCurrentKeyboardFocusManager(); KeyboardFocusManager manager = getCurrentKeyboardFocusManager();
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
if (event instanceof FocusEvent || event instanceof WindowEvent) { if (event instanceof FocusEvent || event instanceof WindowEvent) {
focusLog.finer(">>> {0}", String.valueOf(event)); focusLog.finer(">>> {0}", String.valueOf(event));
} }
if (focusLog.isLoggable(PlatformLogger.FINER) && event instanceof KeyEvent) { if (focusLog.isLoggable(PlatformLogger.Level.FINER) && event instanceof KeyEvent) {
focusLog.finer(" focus owner is {0}", focusLog.finer(" focus owner is {0}",
String.valueOf(manager.getGlobalFocusOwner())); String.valueOf(manager.getGlobalFocusOwner()));
focusLog.finer(">>> {0}", String.valueOf(event)); focusLog.finer(">>> {0}", String.valueOf(event));
...@@ -2996,7 +2996,7 @@ public abstract class KeyboardFocusManager ...@@ -2996,7 +2996,7 @@ public abstract class KeyboardFocusManager
} }
} }
static void removeLastFocusRequest(Component heavyweight) { static void removeLastFocusRequest(Component heavyweight) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (heavyweight == null) { if (heavyweight == null) {
log.fine("Assertion (heavyweight != null) failed"); log.fine("Assertion (heavyweight != null) failed");
} }
......
...@@ -219,7 +219,7 @@ public final class SplashScreen { ...@@ -219,7 +219,7 @@ public final class SplashScreen {
} }
} }
catch(java.net.MalformedURLException e) { catch(java.net.MalformedURLException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("MalformedURLException caught in the getImageURL() method", e); log.fine("MalformedURLException caught in the getImageURL() method", e);
} }
} }
......
...@@ -108,7 +108,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -108,7 +108,7 @@ class WaitDispatchSupport implements SecondaryLoop {
this.condition = new Conditional() { this.condition = new Conditional() {
@Override @Override
public boolean evaluate() { public boolean evaluate() {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("evaluate(): blockingEDT=" + keepBlockingEDT.get() + log.finest("evaluate(): blockingEDT=" + keepBlockingEDT.get() +
", blockingCT=" + keepBlockingCT.get()); ", blockingCT=" + keepBlockingCT.get());
} }
...@@ -165,7 +165,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -165,7 +165,7 @@ class WaitDispatchSupport implements SecondaryLoop {
*/ */
@Override @Override
public boolean enter() { public boolean enter() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("enter(): blockingEDT=" + keepBlockingEDT.get() + log.fine("enter(): blockingEDT=" + keepBlockingEDT.get() +
", blockingCT=" + keepBlockingCT.get()); ", blockingCT=" + keepBlockingCT.get());
} }
...@@ -192,11 +192,11 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -192,11 +192,11 @@ class WaitDispatchSupport implements SecondaryLoop {
Thread currentThread = Thread.currentThread(); Thread currentThread = Thread.currentThread();
if (currentThread == dispatchThread) { if (currentThread == dispatchThread) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("On dispatch thread: " + dispatchThread); log.finest("On dispatch thread: " + dispatchThread);
} }
if (interval != 0) { if (interval != 0) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("scheduling the timer for " + interval + " ms"); log.finest("scheduling the timer for " + interval + " ms");
} }
timer.schedule(timerTask = new TimerTask() { timer.schedule(timerTask = new TimerTask() {
...@@ -213,7 +213,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -213,7 +213,7 @@ class WaitDispatchSupport implements SecondaryLoop {
SequencedEvent currentSE = KeyboardFocusManager. SequencedEvent currentSE = KeyboardFocusManager.
getCurrentKeyboardFocusManager().getCurrentSequencedEvent(); getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
if (currentSE != null) { if (currentSE != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Dispose current SequencedEvent: " + currentSE); log.fine("Dispose current SequencedEvent: " + currentSE);
} }
currentSE.dispose(); currentSE.dispose();
...@@ -231,7 +231,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -231,7 +231,7 @@ class WaitDispatchSupport implements SecondaryLoop {
} }
}); });
} else { } else {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("On non-dispatch thread: " + currentThread); log.finest("On non-dispatch thread: " + currentThread);
} }
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
...@@ -257,11 +257,11 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -257,11 +257,11 @@ class WaitDispatchSupport implements SecondaryLoop {
getTreeLock().wait(); getTreeLock().wait();
} }
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get()); log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get());
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Exception caught while waiting: " + e); log.fine("Exception caught while waiting: " + e);
} }
} finally { } finally {
...@@ -284,7 +284,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -284,7 +284,7 @@ class WaitDispatchSupport implements SecondaryLoop {
* @inheritDoc * @inheritDoc
*/ */
public boolean exit() { public boolean exit() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("exit(): blockingEDT=" + keepBlockingEDT.get() + log.fine("exit(): blockingEDT=" + keepBlockingEDT.get() +
", blockingCT=" + keepBlockingCT.get()); ", blockingCT=" + keepBlockingCT.get());
} }
...@@ -311,7 +311,7 @@ class WaitDispatchSupport implements SecondaryLoop { ...@@ -311,7 +311,7 @@ class WaitDispatchSupport implements SecondaryLoop {
}; };
private void wakeupEDT() { private void wakeupEDT() {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("wakeupEDT(): EDT == " + dispatchThread); log.finest("wakeupEDT(): EDT == " + dispatchThread);
} }
EventQueue eq = dispatchThread.getEventQueue(); EventQueue eq = dispatchThread.getEventQueue();
......
...@@ -3149,7 +3149,7 @@ public class Window extends Container implements Accessible { ...@@ -3149,7 +3149,7 @@ public class Window extends Container implements Accessible {
} }
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
super.setGraphicsConfiguration(gc); super.setGraphicsConfiguration(gc);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("+ Window.setGraphicsConfiguration(): new GC is \n+ " + getGraphicsConfiguration_NoClientCode() + "\n+ this is " + this); log.finer("+ Window.setGraphicsConfiguration(): new GC is \n+ " + getGraphicsConfiguration_NoClientCode() + "\n+ this is " + this);
} }
} }
......
...@@ -353,7 +353,7 @@ public abstract class InputEvent extends ComponentEvent { ...@@ -353,7 +353,7 @@ public abstract class InputEvent extends ComponentEvent {
sm.checkSystemClipboardAccess(); sm.checkSystemClipboardAccess();
b = true; b = true;
} catch (SecurityException se) { } catch (SecurityException se) {
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se); logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se);
} }
} }
......
...@@ -284,7 +284,7 @@ public class CookieManager extends CookieHandler ...@@ -284,7 +284,7 @@ public class CookieManager extends CookieHandler
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
// Bogus header, make an empty list and log the error // Bogus header, make an empty list and log the error
cookies = java.util.Collections.emptyList(); cookies = java.util.Collections.emptyList();
if (logger.isLoggable(PlatformLogger.SEVERE)) { if (logger.isLoggable(PlatformLogger.Level.SEVERE)) {
logger.severe("Invalid cookie for " + uri + ": " + headerValue); logger.severe("Invalid cookie for " + uri + ": " + headerValue);
} }
} }
......
...@@ -764,7 +764,7 @@ public final class Currency implements Serializable { ...@@ -764,7 +764,7 @@ public final class Currency implements Serializable {
private static void info(String message, Throwable t) { private static void info(String message, Throwable t) {
PlatformLogger logger = PlatformLogger.getLogger("java.util.Currency"); PlatformLogger logger = PlatformLogger.getLogger("java.util.Currency");
if (logger.isLoggable(PlatformLogger.INFO)) { if (logger.isLoggable(PlatformLogger.Level.INFO)) {
if (t != null) { if (t != null) {
logger.info(message, t); logger.info(message, t);
} else { } else {
......
...@@ -215,7 +215,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -215,7 +215,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
private void dispose(java.util.List<BufferInfo> bufferInfos) { private void dispose(java.util.List<BufferInfo> bufferInfos) {
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("BufferStrategyPaintManager disposed", LOGGER.finer("BufferStrategyPaintManager disposed",
new RuntimeException()); new RuntimeException());
} }
...@@ -300,7 +300,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -300,7 +300,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
} }
// Invalid root, do what Swing has always done. // Invalid root, do what Swing has always done.
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("prepare failed"); LOGGER.finer("prepare failed");
} }
return super.paint(paintingComponent, bufferComponent, g, x, y, w, h); return super.paint(paintingComponent, bufferComponent, g, x, y, w, h);
...@@ -332,7 +332,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -332,7 +332,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
accumulate(x + xOffset + deltaX, y + yOffset + deltaY, w, h); accumulate(x + xOffset + deltaX, y + yOffset + deltaY, w, h);
} else { } else {
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("copyArea: prepare failed or not in sync"); LOGGER.finer("copyArea: prepare failed or not in sync");
} }
// Prepare failed, or not in sync. By calling super.copyArea // Prepare failed, or not in sync. By calling super.copyArea
...@@ -360,7 +360,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -360,7 +360,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
} }
} }
if (LOGGER.isLoggable(PlatformLogger.FINEST)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINEST)) {
LOGGER.finest("beginPaint"); LOGGER.finest("beginPaint");
} }
// Reset the area that needs to be painted. // Reset the area that needs to be painted.
...@@ -368,7 +368,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -368,7 +368,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
public void endPaint() { public void endPaint() {
if (LOGGER.isLoggable(PlatformLogger.FINEST)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINEST)) {
LOGGER.finest("endPaint: region " + accumulatedX + " " + LOGGER.finest("endPaint: region " + accumulatedX + " " +
accumulatedY + " " + accumulatedMaxX + " " + accumulatedY + " " + accumulatedMaxX + " " +
accumulatedMaxY); accumulatedMaxY);
...@@ -417,7 +417,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -417,7 +417,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
contentsLost = bufferStrategy.contentsLost(); contentsLost = bufferStrategy.contentsLost();
} }
if (contentsLost) { if (contentsLost) {
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("endPaint: contents lost"); LOGGER.finer("endPaint: contents lost");
} }
// Shown region was bogus, mark buffer as out of sync. // Shown region was bogus, mark buffer as out of sync.
...@@ -511,7 +511,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -511,7 +511,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
contentsLost = true; contentsLost = true;
bufferInfo = new BufferInfo(root); bufferInfo = new BufferInfo(root);
bufferInfos.add(bufferInfo); bufferInfos.add(bufferInfo);
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("prepare: new BufferInfo: " + root); LOGGER.finer("prepare: new BufferInfo: " + root);
} }
} }
...@@ -522,7 +522,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -522,7 +522,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
bsg = bufferStrategy.getDrawGraphics(); bsg = bufferStrategy.getDrawGraphics();
if (bufferStrategy.contentsRestored()) { if (bufferStrategy.contentsRestored()) {
contentsLost = true; contentsLost = true;
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("prepare: contents restored in prepare"); LOGGER.finer("prepare: contents restored in prepare");
} }
} }
...@@ -535,7 +535,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -535,7 +535,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
if (bufferInfo.getContentsLostDuringExpose()) { if (bufferInfo.getContentsLostDuringExpose()) {
contentsLost = true; contentsLost = true;
bufferInfo.setContentsLostDuringExpose(false); bufferInfo.setContentsLostDuringExpose(false);
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("prepare: contents lost on expose"); LOGGER.finer("prepare: contents lost on expose");
} }
} }
...@@ -638,7 +638,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -638,7 +638,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
if (biRoot == null) { if (biRoot == null) {
// Window gc'ed // Window gc'ed
bufferInfos.remove(counter); bufferInfos.remove(counter);
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("BufferInfo pruned, root null"); LOGGER.finer("BufferInfo pruned, root null");
} }
} }
...@@ -744,7 +744,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -744,7 +744,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
if (bs != null) { if (bs != null) {
weakBS = new WeakReference<BufferStrategy>(bs); weakBS = new WeakReference<BufferStrategy>(bs);
} }
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("getBufferStrategy: created bs: " + bs); LOGGER.finer("getBufferStrategy: created bs: " + bs);
} }
} }
...@@ -802,7 +802,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -802,7 +802,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
BufferStrategy bs = null; BufferStrategy bs = null;
if (SwingUtilities3.isVsyncRequested(root)) { if (SwingUtilities3.isVsyncRequested(root)) {
bs = createBufferStrategy(root, true); bs = createBufferStrategy(root, true);
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("createBufferStrategy: using vsynced strategy"); LOGGER.finer("createBufferStrategy: using vsynced strategy");
} }
} }
...@@ -844,7 +844,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -844,7 +844,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
invoke(root); invoke(root);
} catch (InvocationTargetException ite) { } catch (InvocationTargetException ite) {
// Type is not supported // Type is not supported
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("createBufferStratety failed", LOGGER.finer("createBufferStratety failed",
ite); ite);
} }
...@@ -860,7 +860,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -860,7 +860,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
bs = ((Window)root).getBufferStrategy(); bs = ((Window)root).getBufferStrategy();
} catch (AWTException e) { } catch (AWTException e) {
// Type not supported // Type not supported
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("createBufferStratety failed", LOGGER.finer("createBufferStratety failed",
e); e);
} }
...@@ -874,7 +874,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -874,7 +874,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
*/ */
public void dispose() { public void dispose() {
Container root = getRoot(); Container root = getRoot();
if (LOGGER.isLoggable(PlatformLogger.FINER)) { if (LOGGER.isLoggable(PlatformLogger.Level.FINER)) {
LOGGER.finer("disposed BufferInfo for: " + root); LOGGER.finer("disposed BufferInfo for: " + root);
} }
if (root != null) { if (root != null) {
......
...@@ -115,7 +115,7 @@ public class SortingFocusTraversalPolicy ...@@ -115,7 +115,7 @@ public class SortingFocusTraversalPolicy
try { try {
index = Collections.binarySearch(cycle, aComponent, comparator); index = Collections.binarySearch(cycle, aComponent, comparator);
} catch (ClassCastException e) { } catch (ClassCastException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### During the binary search for " + aComponent + " the exception occured: ", e); log.fine("### During the binary search for " + aComponent + " the exception occured: ", e);
} }
return -1; return -1;
...@@ -193,7 +193,7 @@ public class SortingFocusTraversalPolicy ...@@ -193,7 +193,7 @@ public class SortingFocusTraversalPolicy
if (getImplicitDownCycleTraversal()) { if (getImplicitDownCycleTraversal()) {
retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont); retComp = cont.getFocusTraversalPolicy().getDefaultComponent(cont);
if (retComp != null && log.isLoggable(PlatformLogger.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Transfered focus down-cycle to " + retComp + log.fine("### Transfered focus down-cycle to " + retComp +
" in the focus cycle root " + cont); " in the focus cycle root " + cont);
} }
...@@ -205,7 +205,7 @@ public class SortingFocusTraversalPolicy ...@@ -205,7 +205,7 @@ public class SortingFocusTraversalPolicy
cont.getFocusTraversalPolicy().getDefaultComponent(cont) : cont.getFocusTraversalPolicy().getDefaultComponent(cont) :
cont.getFocusTraversalPolicy().getLastComponent(cont)); cont.getFocusTraversalPolicy().getLastComponent(cont));
if (retComp != null && log.isLoggable(PlatformLogger.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont); log.fine("### Transfered focus to " + retComp + " in the FTP provider " + cont);
} }
} }
...@@ -236,7 +236,7 @@ public class SortingFocusTraversalPolicy ...@@ -236,7 +236,7 @@ public class SortingFocusTraversalPolicy
* aComponent is null * aComponent is null
*/ */
public Component getComponentAfter(Container aContainer, Component aComponent) { public Component getComponentAfter(Container aContainer, Component aComponent) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Searching in " + aContainer + " for component after " + aComponent); log.fine("### Searching in " + aContainer + " for component after " + aComponent);
} }
...@@ -260,7 +260,7 @@ public class SortingFocusTraversalPolicy ...@@ -260,7 +260,7 @@ public class SortingFocusTraversalPolicy
// See if the component is inside of policy provider. // See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent); Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) { if (provider != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -271,7 +271,7 @@ public class SortingFocusTraversalPolicy ...@@ -271,7 +271,7 @@ public class SortingFocusTraversalPolicy
// Null result means that we overstepped the limit of the FTP's cycle. // Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found. // In that case we must quit the cycle, otherwise return the component found.
if (afterComp != null) { if (afterComp != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### FTP returned " + afterComp); log.fine("### FTP returned " + afterComp);
} }
return afterComp; return afterComp;
...@@ -281,14 +281,14 @@ public class SortingFocusTraversalPolicy ...@@ -281,14 +281,14 @@ public class SortingFocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle + ", component is " + aComponent); log.fine("### Cycle is " + cycle + ", component is " + aComponent);
} }
int index = getComponentIndex(cycle, aComponent); int index = getComponentIndex(cycle, aComponent);
if (index < 0) { if (index < 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer); log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
} }
return getFirstComponent(aContainer); return getFirstComponent(aContainer);
...@@ -353,7 +353,7 @@ public class SortingFocusTraversalPolicy ...@@ -353,7 +353,7 @@ public class SortingFocusTraversalPolicy
// See if the component is inside of policy provider. // See if the component is inside of policy provider.
Container provider = getTopmostProvider(aContainer, aComponent); Container provider = getTopmostProvider(aContainer, aComponent);
if (provider != null) { if (provider != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -364,7 +364,7 @@ public class SortingFocusTraversalPolicy ...@@ -364,7 +364,7 @@ public class SortingFocusTraversalPolicy
// Null result means that we overstepped the limit of the FTP's cycle. // Null result means that we overstepped the limit of the FTP's cycle.
// In that case we must quit the cycle, otherwise return the component found. // In that case we must quit the cycle, otherwise return the component found.
if (beforeComp != null) { if (beforeComp != null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### FTP returned " + beforeComp); log.fine("### FTP returned " + beforeComp);
} }
return beforeComp; return beforeComp;
...@@ -379,14 +379,14 @@ public class SortingFocusTraversalPolicy ...@@ -379,14 +379,14 @@ public class SortingFocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle + ", component is " + aComponent); log.fine("### Cycle is " + cycle + ", component is " + aComponent);
} }
int index = getComponentIndex(cycle, aComponent); int index = getComponentIndex(cycle, aComponent);
if (index < 0) { if (index < 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer); log.fine("### Didn't find component " + aComponent + " in a cycle " + aContainer);
} }
return getLastComponent(aContainer); return getLastComponent(aContainer);
...@@ -432,7 +432,7 @@ public class SortingFocusTraversalPolicy ...@@ -432,7 +432,7 @@ public class SortingFocusTraversalPolicy
public Component getFirstComponent(Container aContainer) { public Component getFirstComponent(Container aContainer) {
List<Component> cycle; List<Component> cycle;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Getting first component in " + aContainer); log.fine("### Getting first component in " + aContainer);
} }
if (aContainer == null) { if (aContainer == null) {
...@@ -446,12 +446,12 @@ public class SortingFocusTraversalPolicy ...@@ -446,12 +446,12 @@ public class SortingFocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is empty"); log.fine("### Cycle is empty");
} }
return null; return null;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle); log.fine("### Cycle is " + cycle);
} }
...@@ -480,7 +480,7 @@ public class SortingFocusTraversalPolicy ...@@ -480,7 +480,7 @@ public class SortingFocusTraversalPolicy
*/ */
public Component getLastComponent(Container aContainer) { public Component getLastComponent(Container aContainer) {
List<Component> cycle; List<Component> cycle;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Getting last component in " + aContainer); log.fine("### Getting last component in " + aContainer);
} }
...@@ -495,12 +495,12 @@ public class SortingFocusTraversalPolicy ...@@ -495,12 +495,12 @@ public class SortingFocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is empty"); log.fine("### Cycle is empty");
} }
return null; return null;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### Cycle is " + cycle); log.fine("### Cycle is " + cycle);
} }
......
...@@ -375,7 +375,7 @@ public final class AWTAutoShutdown implements Runnable { ...@@ -375,7 +375,7 @@ public final class AWTAutoShutdown implements Runnable {
} }
final void dumpPeers(final PlatformLogger aLog) { final void dumpPeers(final PlatformLogger aLog) {
if (aLog.isLoggable(PlatformLogger.FINE)) { if (aLog.isLoggable(PlatformLogger.Level.FINE)) {
synchronized (activationLock) { synchronized (activationLock) {
synchronized (mainLock) { synchronized (mainLock) {
aLog.fine("Mapped peers:"); aLog.fine("Mapped peers:");
......
...@@ -128,7 +128,7 @@ final class DebugSettings { ...@@ -128,7 +128,7 @@ final class DebugSettings {
}); });
// echo the initial property settings to stdout // echo the initial property settings to stdout
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("DebugSettings:\n{0}", this); log.fine("DebugSettings:\n{0}", this);
} }
} }
...@@ -250,7 +250,7 @@ final class DebugSettings { ...@@ -250,7 +250,7 @@ final class DebugSettings {
} }
private void println(Object object) { private void println(Object object) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(object.toString()); log.finer(object.toString());
} }
} }
......
...@@ -57,7 +57,7 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag ...@@ -57,7 +57,7 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag
public void clearGlobalFocusOwner(Window activeWindow) { public void clearGlobalFocusOwner(Window activeWindow) {
if (activeWindow != null) { if (activeWindow != null) {
Component focusOwner = activeWindow.getFocusOwner(); Component focusOwner = activeWindow.getFocusOwner();
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Clearing global focus owner " + focusOwner); focusLog.fine("Clearing global focus owner " + focusOwner);
} }
if (focusOwner != null) { if (focusOwner != null) {
...@@ -127,7 +127,7 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag ...@@ -127,7 +127,7 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag
FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST, FocusEvent fl = new CausedFocusEvent(currentOwner, FocusEvent.FOCUS_LOST,
false, lightweightChild, cause); false, lightweightChild, cause);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Posting focus event: " + fl); focusLog.finer("Posting focus event: " + fl);
} }
SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl); SunToolkit.postEvent(SunToolkit.targetToAppContext(currentOwner), fl);
...@@ -136,7 +136,7 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag ...@@ -136,7 +136,7 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag
FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED, FocusEvent fg = new CausedFocusEvent(lightweightChild, FocusEvent.FOCUS_GAINED,
false, currentOwner, cause); false, currentOwner, cause);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Posting focus event: " + fg); focusLog.finer("Posting focus event: " + fg);
} }
SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg); SunToolkit.postEvent(SunToolkit.targetToAppContext(lightweightChild), fg);
......
...@@ -47,7 +47,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -47,7 +47,7 @@ public abstract class ScrollPaneWheelScroller {
* Called from ScrollPane.processMouseWheelEvent() * Called from ScrollPane.processMouseWheelEvent()
*/ */
public static void handleWheelScrolling(ScrollPane sp, MouseWheelEvent e) { 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()); log.finer("x = " + e.getX() + ", y = " + e.getY() + ", src is " + e.getSource());
} }
int increment = 0; int increment = 0;
...@@ -56,7 +56,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -56,7 +56,7 @@ public abstract class ScrollPaneWheelScroller {
Adjustable adj = getAdjustableToScroll(sp); Adjustable adj = getAdjustableToScroll(sp);
if (adj != null) { if (adj != null) {
increment = getIncrementFromAdjustable(adj, e); increment = getIncrementFromAdjustable(adj, e);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment); log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment);
} }
scrollAdjustable(adj, increment); scrollAdjustable(adj, increment);
...@@ -74,7 +74,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -74,7 +74,7 @@ public abstract class ScrollPaneWheelScroller {
// if policy is display always or never, use vert // if policy is display always or never, use vert
if (policy == ScrollPane.SCROLLBARS_ALWAYS || if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
policy == ScrollPane.SCROLLBARS_NEVER) { policy == ScrollPane.SCROLLBARS_NEVER) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using vertical scrolling due to scrollbar policy"); log.finer("using vertical scrolling due to scrollbar policy");
} }
return sp.getVAdjustable(); return sp.getVAdjustable();
...@@ -85,7 +85,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -85,7 +85,7 @@ public abstract class ScrollPaneWheelScroller {
Insets ins = sp.getInsets(); Insets ins = sp.getInsets();
int vertScrollWidth = sp.getVScrollbarWidth(); int vertScrollWidth = sp.getVScrollbarWidth();
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("insets: l = " + ins.left + ", r = " + ins.right + log.finer("insets: l = " + ins.left + ", r = " + ins.right +
", t = " + ins.top + ", b = " + ins.bottom); ", t = " + ins.top + ", b = " + ins.bottom);
log.finer("vertScrollWidth = " + vertScrollWidth); log.finer("vertScrollWidth = " + vertScrollWidth);
...@@ -94,7 +94,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -94,7 +94,7 @@ public abstract class ScrollPaneWheelScroller {
// Check if scrollbar is showing by examining insets of the // Check if scrollbar is showing by examining insets of the
// ScrollPane // ScrollPane
if (ins.right >= vertScrollWidth) { if (ins.right >= vertScrollWidth) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using vertical scrolling because scrollbar is present"); log.finer("using vertical scrolling because scrollbar is present");
} }
return sp.getVAdjustable(); return sp.getVAdjustable();
...@@ -102,13 +102,13 @@ public abstract class ScrollPaneWheelScroller { ...@@ -102,13 +102,13 @@ public abstract class ScrollPaneWheelScroller {
else { else {
int horizScrollHeight = sp.getHScrollbarHeight(); int horizScrollHeight = sp.getHScrollbarHeight();
if (ins.bottom >= horizScrollHeight) { if (ins.bottom >= horizScrollHeight) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using horiz scrolling because scrollbar is present"); log.finer("using horiz scrolling because scrollbar is present");
} }
return sp.getHAdjustable(); return sp.getHAdjustable();
} }
else { else {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("using NO scrollbar becsause neither is present"); log.finer("using NO scrollbar becsause neither is present");
} }
return null; return null;
...@@ -124,7 +124,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -124,7 +124,7 @@ public abstract class ScrollPaneWheelScroller {
*/ */
public static int getIncrementFromAdjustable(Adjustable adj, public static int getIncrementFromAdjustable(Adjustable adj,
MouseWheelEvent e) { MouseWheelEvent e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (adj == null) { if (adj == null) {
log.fine("Assertion (adj != null) failed"); log.fine("Assertion (adj != null) failed");
} }
...@@ -146,7 +146,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -146,7 +146,7 @@ public abstract class ScrollPaneWheelScroller {
* bounds and sets the new value to the Adjustable. * bounds and sets the new value to the Adjustable.
*/ */
public static void scrollAdjustable(Adjustable adj, int amount) { public static void scrollAdjustable(Adjustable adj, int amount) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (adj == null) { if (adj == null) {
log.fine("Assertion (adj != null) failed"); log.fine("Assertion (adj != null) failed");
} }
...@@ -157,7 +157,7 @@ public abstract class ScrollPaneWheelScroller { ...@@ -157,7 +157,7 @@ public abstract class ScrollPaneWheelScroller {
int current = adj.getValue(); int current = adj.getValue();
int upperLimit = adj.getMaximum() - adj.getVisibleAmount(); int upperLimit = adj.getMaximum() - adj.getVisibleAmount();
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("doScrolling by " + amount); log.finer("doScrolling by " + amount);
} }
......
...@@ -71,12 +71,12 @@ public class SunDisplayChanger { ...@@ -71,12 +71,12 @@ public class SunDisplayChanger {
* notified when the display is changed. * notified when the display is changed.
*/ */
public void add(DisplayChangedListener theListener) { public void add(DisplayChangedListener theListener) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (theListener == null) { if (theListener == null) {
log.fine("Assertion (theListener != null) failed"); log.fine("Assertion (theListener != null) failed");
} }
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Adding listener: " + theListener); log.finer("Adding listener: " + theListener);
} }
listeners.put(theListener, null); listeners.put(theListener, null);
...@@ -86,12 +86,12 @@ public class SunDisplayChanger { ...@@ -86,12 +86,12 @@ public class SunDisplayChanger {
* Remove the given DisplayChangeListener from this SunDisplayChanger. * Remove the given DisplayChangeListener from this SunDisplayChanger.
*/ */
public void remove(DisplayChangedListener theListener) { public void remove(DisplayChangedListener theListener) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (theListener == null) { if (theListener == null) {
log.fine("Assertion (theListener != null) failed"); log.fine("Assertion (theListener != null) failed");
} }
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Removing listener: " + theListener); log.finer("Removing listener: " + theListener);
} }
listeners.remove(theListener); listeners.remove(theListener);
...@@ -102,7 +102,7 @@ public class SunDisplayChanger { ...@@ -102,7 +102,7 @@ public class SunDisplayChanger {
* taken place by calling their displayChanged() methods. * taken place by calling their displayChanged() methods.
*/ */
public void notifyListeners() { public void notifyListeners() {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("notifyListeners"); log.finest("notifyListeners");
} }
// This method is implemented by making a clone of the set of listeners, // This method is implemented by making a clone of the set of listeners,
...@@ -126,7 +126,7 @@ public class SunDisplayChanger { ...@@ -126,7 +126,7 @@ public class SunDisplayChanger {
while (itr.hasNext()) { while (itr.hasNext()) {
DisplayChangedListener current = itr.next(); DisplayChangedListener current = itr.next();
try { try {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("displayChanged for listener: " + current); log.finest("displayChanged for listener: " + current);
} }
current.displayChanged(); current.displayChanged();
...@@ -146,7 +146,7 @@ public class SunDisplayChanger { ...@@ -146,7 +146,7 @@ public class SunDisplayChanger {
* taken place by calling their paletteChanged() methods. * taken place by calling their paletteChanged() methods.
*/ */
public void notifyPaletteChanged() { public void notifyPaletteChanged() {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("notifyPaletteChanged"); log.finest("notifyPaletteChanged");
} }
// This method is implemented by making a clone of the set of listeners, // This method is implemented by making a clone of the set of listeners,
...@@ -169,7 +169,7 @@ public class SunDisplayChanger { ...@@ -169,7 +169,7 @@ public class SunDisplayChanger {
while (itr.hasNext()) { while (itr.hasNext()) {
DisplayChangedListener current = itr.next(); DisplayChangedListener current = itr.next();
try { try {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("paletteChanged for listener: " + current); log.finest("paletteChanged for listener: " + current);
} }
current.paletteChanged(); current.paletteChanged();
......
...@@ -88,7 +88,7 @@ public abstract class SunGraphicsCallback { ...@@ -88,7 +88,7 @@ public abstract class SunGraphicsCallback {
int ncomponents = comps.length; int ncomponents = comps.length;
Shape clip = g.getClip(); Shape clip = g.getClip();
if (log.isLoggable(PlatformLogger.FINER) && (clip != null)) { if (log.isLoggable(PlatformLogger.Level.FINER) && (clip != null)) {
Rectangle newrect = clip.getBounds(); Rectangle newrect = clip.getBounds();
log.finer("x = " + newrect.x + ", y = " + newrect.y + log.finer("x = " + newrect.x + ", y = " + newrect.y +
", width = " + newrect.width + ", width = " + newrect.width +
......
...@@ -398,7 +398,7 @@ public abstract class DataTransferer { ...@@ -398,7 +398,7 @@ public abstract class DataTransferer {
* "text". * "text".
*/ */
public static boolean doesSubtypeSupportCharset(DataFlavor flavor) { public static boolean doesSubtypeSupportCharset(DataFlavor flavor) {
if (dtLog.isLoggable(PlatformLogger.FINE)) { if (dtLog.isLoggable(PlatformLogger.Level.FINE)) {
if (!"text".equals(flavor.getPrimaryType())) { if (!"text".equals(flavor.getPrimaryType())) {
dtLog.fine("Assertion (\"text\".equals(flavor.getPrimaryType())) failed"); dtLog.fine("Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
} }
......
...@@ -869,7 +869,7 @@ public abstract class SunDropTargetContextPeer implements DropTargetContextPeer, ...@@ -869,7 +869,7 @@ public abstract class SunDropTargetContextPeer implements DropTargetContextPeer,
void registerEvent(SunDropTargetEvent e) { void registerEvent(SunDropTargetEvent e) {
handler.lock(); handler.lock();
if (!eventSet.add(e) && dndLog.isLoggable(PlatformLogger.FINE)) { if (!eventSet.add(e) && dndLog.isLoggable(PlatformLogger.Level.FINE)) {
dndLog.fine("Event is already registered: " + e); dndLog.fine("Event is already registered: " + e);
} }
handler.unlock(); handler.unlock();
......
...@@ -387,7 +387,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -387,7 +387,7 @@ public class InputContext extends java.awt.im.InputContext
} }
previousInputMethod = null; previousInputMethod = null;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Current client component " + currentClientComponent); log.fine("Current client component " + currentClientComponent);
} }
if (inputMethod instanceof InputMethodAdapter) { if (inputMethod instanceof InputMethodAdapter) {
...@@ -887,7 +887,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -887,7 +887,7 @@ public class InputContext extends java.awt.im.InputContext
private void logCreationFailed(Throwable throwable) { private void logCreationFailed(Throwable throwable) {
PlatformLogger logger = PlatformLogger.getLogger("sun.awt.im"); PlatformLogger logger = PlatformLogger.getLogger("sun.awt.im");
if (logger.isLoggable(PlatformLogger.CONFIG)) { if (logger.isLoggable(PlatformLogger.Level.CONFIG)) {
String errorTextFormat = Toolkit.getProperty("AWT.InputMethodCreationFailed", String errorTextFormat = Toolkit.getProperty("AWT.InputMethodCreationFailed",
"Could not create {0}. Reason: {1}"); "Could not create {0}. Reason: {1}");
Object[] args = Object[] args =
......
...@@ -3236,7 +3236,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { ...@@ -3236,7 +3236,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
registeredFontFiles.add(fullName); registeredFontFiles.add(fullName);
if (FontUtilities.debugFonts() if (FontUtilities.debugFonts()
&& FontUtilities.getLogger().isLoggable(PlatformLogger.INFO)) { && FontUtilities.getLogger().isLoggable(PlatformLogger.Level.INFO)) {
String message = "Registering font " + fullName; String message = "Registering font " + fullName;
String[] natNames = getNativeNames(fullName, null); String[] natNames = getNativeNames(fullName, null);
if (natNames == null) { if (natNames == null) {
......
...@@ -430,7 +430,7 @@ public class FtpClient extends sun.net.ftp.FtpClient { ...@@ -430,7 +430,7 @@ public class FtpClient extends sun.net.ftp.FtpClient {
} }
response = replyBuf.toString(); response = replyBuf.toString();
replyBuf.setLength(0); replyBuf.setLength(0);
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Server [" + serverAddr + "] --> " + response); logger.finest("Server [" + serverAddr + "] --> " + response);
} }
...@@ -472,7 +472,7 @@ public class FtpClient extends sun.net.ftp.FtpClient { ...@@ -472,7 +472,7 @@ public class FtpClient extends sun.net.ftp.FtpClient {
/** Sends command <i>cmd</i> to the server. */ /** Sends command <i>cmd</i> to the server. */
private void sendServer(String cmd) { private void sendServer(String cmd) {
out.print(cmd); out.print(cmd);
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Server [" + serverAddr + "] <-- " + cmd); logger.finest("Server [" + serverAddr + "] <-- " + cmd);
} }
} }
......
...@@ -125,7 +125,7 @@ public class HttpClient extends NetworkClient { ...@@ -125,7 +125,7 @@ public class HttpClient extends NetworkClient {
private static final PlatformLogger logger = HttpURLConnection.getHttpLogger(); private static final PlatformLogger logger = HttpURLConnection.getHttpLogger();
private static void logFinest(String msg) { private static void logFinest(String msg) {
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(msg); logger.finest(msg);
} }
} }
......
...@@ -413,13 +413,13 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -413,13 +413,13 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
return java.security.AccessController.doPrivileged( return java.security.AccessController.doPrivileged(
new java.security.PrivilegedAction<PasswordAuthentication>() { new java.security.PrivilegedAction<PasswordAuthentication>() {
public PasswordAuthentication run() { public PasswordAuthentication run() {
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Requesting Authentication: host =" + host + " url = " + url); logger.finest("Requesting Authentication: host =" + host + " url = " + url);
} }
PasswordAuthentication pass = Authenticator.requestPasswordAuthentication( PasswordAuthentication pass = Authenticator.requestPasswordAuthentication(
host, addr, port, protocol, host, addr, port, protocol,
prompt, scheme, url, authType); prompt, scheme, url, authType);
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null")); logger.finest("Authentication returned: " + (pass != null ? pass.toString() : "null"));
} }
return pass; return pass;
...@@ -632,7 +632,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -632,7 +632,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
if (!chunked) { if (!chunked) {
if (requests.findValue("Transfer-Encoding") != null) { if (requests.findValue("Transfer-Encoding") != null) {
requests.remove("Transfer-Encoding"); requests.remove("Transfer-Encoding");
if (logger.isLoggable(PlatformLogger.WARNING)) { if (logger.isLoggable(PlatformLogger.Level.WARNING)) {
logger.warning( logger.warning(
"use streaming mode for chunked encoding"); "use streaming mode for chunked encoding");
} }
...@@ -645,7 +645,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -645,7 +645,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
setRequests=true; setRequests=true;
} }
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(requests.toString()); logger.fine(requests.toString());
} }
http.writeRequests(requests, poster, streaming()); http.writeRequests(requests, poster, streaming());
...@@ -991,7 +991,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -991,7 +991,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
&& !(cachedResponse instanceof SecureCacheResponse)) { && !(cachedResponse instanceof SecureCacheResponse)) {
cachedResponse = null; cachedResponse = null;
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Cache Request for " + uri + " / " + getRequestMethod()); logger.finest("Cache Request for " + uri + " / " + getRequestMethod());
logger.finest("From cache: " + (cachedResponse != null ? cachedResponse.toString() : "null")); logger.finest("From cache: " + (cachedResponse != null ? cachedResponse.toString() : "null"));
} }
...@@ -1032,7 +1032,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -1032,7 +1032,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}); });
if (sel != null) { if (sel != null) {
URI uri = sun.net.www.ParseUtil.toURI(url); URI uri = sun.net.www.ParseUtil.toURI(url);
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("ProxySelector Request for " + uri); logger.finest("ProxySelector Request for " + uri);
} }
Iterator<Proxy> it = sel.select(uri).iterator(); Iterator<Proxy> it = sel.select(uri).iterator();
...@@ -1049,7 +1049,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -1049,7 +1049,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
http = getNewHttpClient(url, p, connectTimeout, false); http = getNewHttpClient(url, p, connectTimeout, false);
http.setReadTimeout(readTimeout); http.setReadTimeout(readTimeout);
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
if (p != null) { if (p != null) {
logger.finest("Proxy used: " + p.toString()); logger.finest("Proxy used: " + p.toString());
} }
...@@ -1308,14 +1308,14 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -1308,14 +1308,14 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
URI uri = ParseUtil.toURI(url); URI uri = ParseUtil.toURI(url);
if (uri != null) { if (uri != null) {
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("CookieHandler request for " + uri); logger.finest("CookieHandler request for " + uri);
} }
Map<String, List<String>> cookies Map<String, List<String>> cookies
= cookieHandler.get( = cookieHandler.get(
uri, requests.getHeaders(EXCLUDE_HEADERS)); uri, requests.getHeaders(EXCLUDE_HEADERS));
if (!cookies.isEmpty()) { if (!cookies.isEmpty()) {
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Cookies retrieved: " + cookies.toString()); logger.finest("Cookies retrieved: " + cookies.toString());
} }
for (Map.Entry<String, List<String>> entry : for (Map.Entry<String, List<String>> entry :
...@@ -1476,14 +1476,14 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -1476,14 +1476,14 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
writeRequests(); writeRequests();
} }
http.parseHTTP(responses, pi, this); http.parseHTTP(responses, pi, this);
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(responses.toString()); logger.fine(responses.toString());
} }
boolean b1 = responses.filterNTLMResponses("WWW-Authenticate"); boolean b1 = responses.filterNTLMResponses("WWW-Authenticate");
boolean b2 = responses.filterNTLMResponses("Proxy-Authenticate"); boolean b2 = responses.filterNTLMResponses("Proxy-Authenticate");
if (b1 || b2) { if (b1 || b2) {
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(">>>> Headers are filtered"); logger.fine(">>>> Headers are filtered");
logger.fine(responses.toString()); logger.fine(responses.toString());
} }
...@@ -1943,12 +1943,12 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -1943,12 +1943,12 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
http.parseHTTP(responses, null, this); http.parseHTTP(responses, null, this);
/* Log the response to the CONNECT */ /* Log the response to the CONNECT */
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(responses.toString()); logger.fine(responses.toString());
} }
if (responses.filterNTLMResponses("Proxy-Authenticate")) { if (responses.filterNTLMResponses("Proxy-Authenticate")) {
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(">>>> Headers are filtered"); logger.fine(">>>> Headers are filtered");
logger.fine(responses.toString()); logger.fine(responses.toString());
} }
...@@ -2075,7 +2075,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -2075,7 +2075,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
setPreemptiveProxyAuthentication(requests); setPreemptiveProxyAuthentication(requests);
/* Log the CONNECT request */ /* Log the CONNECT request */
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(requests.toString()); logger.fine(requests.toString());
} }
...@@ -2218,7 +2218,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -2218,7 +2218,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
ret = new NegotiateAuthentication(new HttpCallerInfo(authhdr.getHttpCallerInfo(), "Kerberos")); ret = new NegotiateAuthentication(new HttpCallerInfo(authhdr.getHttpCallerInfo(), "Kerberos"));
break; break;
case UNKNOWN: case UNKNOWN:
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Unknown/Unsupported authentication scheme: " + scheme); logger.finest("Unknown/Unsupported authentication scheme: " + scheme);
} }
/*fall through*/ /*fall through*/
...@@ -2247,7 +2247,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -2247,7 +2247,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
} }
} }
} }
if (logger.isLoggable(PlatformLogger.FINER)) { if (logger.isLoggable(PlatformLogger.Level.FINER)) {
logger.finer("Proxy Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null")); logger.finer("Proxy Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null"));
} }
return ret; return ret;
...@@ -2377,7 +2377,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -2377,7 +2377,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
} }
break; break;
case UNKNOWN: case UNKNOWN:
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("Unknown/Unsupported authentication scheme: " + scheme); logger.finest("Unknown/Unsupported authentication scheme: " + scheme);
} }
/*fall through*/ /*fall through*/
...@@ -2404,7 +2404,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -2404,7 +2404,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
} }
} }
} }
if (logger.isLoggable(PlatformLogger.FINER)) { if (logger.isLoggable(PlatformLogger.Level.FINER)) {
logger.finer("Server Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null")); logger.finer("Server Authentication for " + authhdr.toString() +" returned " + (ret != null ? ret.toString() : "null"));
} }
return ret; return ret;
...@@ -2532,7 +2532,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection { ...@@ -2532,7 +2532,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
if (streaming()) { if (streaming()) {
throw new HttpRetryException (RETRY_MSG3, stat, loc); throw new HttpRetryException (RETRY_MSG3, stat, loc);
} }
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine("Redirected from " + url + " to " + locUrl); logger.fine("Redirected from " + url + " to " + locUrl);
} }
......
...@@ -142,7 +142,7 @@ class NTLMAuthenticationProxy { ...@@ -142,7 +142,7 @@ class NTLMAuthenticationProxy {
static void finest(Exception e) { static void finest(Exception e) {
PlatformLogger logger = HttpURLConnection.getHttpLogger(); PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("NTLMAuthenticationProxy: " + e); logger.finest("NTLMAuthenticationProxy: " + e);
} }
} }
......
...@@ -76,7 +76,7 @@ public abstract class Negotiator { ...@@ -76,7 +76,7 @@ public abstract class Negotiator {
private static void finest(Exception e) { private static void finest(Exception e) {
PlatformLogger logger = HttpURLConnection.getHttpLogger(); PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("NegotiateAuthentication: " + e); logger.finest("NegotiateAuthentication: " + e);
} }
} }
......
...@@ -350,7 +350,7 @@ final class HttpsClient extends HttpClient ...@@ -350,7 +350,7 @@ final class HttpsClient extends HttpClient
if (httpuc != null && ret.needsTunneling()) if (httpuc != null && ret.needsTunneling())
httpuc.setTunnelState(TUNNELING); httpuc.setTunnelState(TUNNELING);
PlatformLogger logger = HttpURLConnection.getHttpLogger(); PlatformLogger logger = HttpURLConnection.getHttpLogger();
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest("KeepAlive stream retrieved from the cache, " + ret); logger.finest("KeepAlive stream retrieved from the cache, " + ret);
} }
} }
......
...@@ -261,7 +261,7 @@ public class ListHelper implements XScrollbarClient { ...@@ -261,7 +261,7 @@ public class ListHelper implements XScrollbarClient {
} }
public int y2index(int y) { public int y2index(int y) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("y=" + y +", firstIdx=" + firstDisplayedIndex() +", itemHeight=" + getItemHeight() log.fine("y=" + y +", firstIdx=" + firstDisplayedIndex() +", itemHeight=" + getItemHeight()
+ ",item_margin=" + ITEM_MARGIN); + ",item_margin=" + ITEM_MARGIN);
} }
......
...@@ -59,7 +59,7 @@ class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord { ...@@ -59,7 +59,7 @@ class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (!disposed) { if (!disposed) {
if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(PlatformLogger.WARNING)) { if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(PlatformLogger.Level.WARNING)) {
if (place != null) { if (place != null) {
log.warning(name + " object was not disposed before finalization!", place); log.warning(name + " object was not disposed before finalization!", place);
} else { } else {
......
...@@ -55,7 +55,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -55,7 +55,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
} }
void initXSettings() { void initXSettings() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Initializing XAWT XSettings"); log.fine("Initializing XAWT XSettings");
} }
settings = new XMSelection("_XSETTINGS"); settings = new XMSelection("_XSETTINGS");
...@@ -68,27 +68,27 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -68,27 +68,27 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
} }
public void ownerDeath(int screen, XMSelection sel, long deadOwner) { public void ownerDeath(int screen, XMSelection sel, long deadOwner) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen); log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen);
} }
} }
public void ownerChanged(int screen, XMSelection sel, long newOwner, long data, long timestamp) { public void ownerChanged(int screen, XMSelection sel, long newOwner, long data, long timestamp) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen ); log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen );
} }
} }
public void selectionChanged(int screen, XMSelection sel, long owner , XPropertyEvent event) { public void selectionChanged(int screen, XMSelection sel, long owner , XPropertyEvent event) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Selection changed on sel " + sel + " screen = " + screen + " owner = " + owner + " event = " + event); log.fine("Selection changed on sel " + sel + " screen = " + screen + " owner = " + owner + " event = " + event);
} }
updateXSettings(screen,owner); updateXSettings(screen,owner);
} }
void initPerScreenXSettings() { void initPerScreenXSettings() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Updating Per XSettings changes"); log.fine("Updating Per XSettings changes");
} }
...@@ -124,7 +124,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -124,7 +124,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
} }
private Map getUpdatedSettings(final long owner) { private Map getUpdatedSettings(final long owner) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("owner =" + owner); log.fine("owner =" + owner);
} }
if (0 == owner) { if (0 == owner) {
...@@ -140,7 +140,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -140,7 +140,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
int status = getter.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance()); int status = getter.execute(XErrorHandler.IgnoreBadWindowHandler.getInstance());
if (status != XConstants.Success || getter.getData() == 0) { if (status != XConstants.Success || getter.getData() == 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("OH OH : getter failed status = " + status ); log.fine("OH OH : getter failed status = " + status );
} }
settings = null; settings = null;
...@@ -148,7 +148,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -148,7 +148,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
long ptr = getter.getData(); long ptr = getter.getData();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("noItems = " + getter.getNumberOfItems()); log.fine("noItems = " + getter.getNumberOfItems());
} }
byte array[] = Native.toBytes(ptr,getter.getNumberOfItems()); byte array[] = Native.toBytes(ptr,getter.getNumberOfItems());
......
...@@ -330,7 +330,7 @@ abstract public class XBaseMenuWindow extends XWindow { ...@@ -330,7 +330,7 @@ abstract public class XBaseMenuWindow extends XWindow {
items.add(mp); items.add(mp);
} }
} else { } else {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("WARNING: Attempt to add menu item without a peer"); log.fine("WARNING: Attempt to add menu item without a peer");
} }
} }
...@@ -351,7 +351,7 @@ abstract public class XBaseMenuWindow extends XWindow { ...@@ -351,7 +351,7 @@ abstract public class XBaseMenuWindow extends XWindow {
if (index < items.size()) { if (index < items.size()) {
items.remove(index); items.remove(index);
} else { } else {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("WARNING: Attempt to remove non-existing menu item, index : " + index + ", item count : " + items.size()); log.fine("WARNING: Attempt to remove non-existing menu item, index : " + index + ", item count : " + items.size());
} }
} }
...@@ -386,7 +386,7 @@ abstract public class XBaseMenuWindow extends XWindow { ...@@ -386,7 +386,7 @@ abstract public class XBaseMenuWindow extends XWindow {
XMenuPeer showingSubmenu = getShowingSubmenu(); XMenuPeer showingSubmenu = getShowingSubmenu();
int newSelectedIndex = (item != null) ? items.indexOf(item) : -1; int newSelectedIndex = (item != null) ? items.indexOf(item) : -1;
if (this.selectedIndex != newSelectedIndex) { if (this.selectedIndex != newSelectedIndex) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Selected index changed, was : " + this.selectedIndex + ", new : " + newSelectedIndex); log.finest("Selected index changed, was : " + this.selectedIndex + ", new : " + newSelectedIndex);
} }
this.selectedIndex = newSelectedIndex; this.selectedIndex = newSelectedIndex;
...@@ -426,7 +426,7 @@ abstract public class XBaseMenuWindow extends XWindow { ...@@ -426,7 +426,7 @@ abstract public class XBaseMenuWindow extends XWindow {
try { try {
synchronized(getMenuTreeLock()) { synchronized(getMenuTreeLock()) {
if (showingSubmenu != submenuToShow) { if (showingSubmenu != submenuToShow) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Changing showing submenu"); log.finest("Changing showing submenu");
} }
if (showingSubmenu != null) { if (showingSubmenu != null) {
...@@ -1122,7 +1122,7 @@ abstract public class XBaseMenuWindow extends XWindow { ...@@ -1122,7 +1122,7 @@ abstract public class XBaseMenuWindow extends XWindow {
* that grabs input focus * that grabs input focus
*/ */
void doHandleJavaKeyEvent(KeyEvent event) { void doHandleJavaKeyEvent(KeyEvent event) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(event.toString()); log.finer(event.toString());
} }
if (event.getID() != KeyEvent.KEY_PRESSED) { if (event.getID() != KeyEvent.KEY_PRESSED) {
......
...@@ -160,7 +160,7 @@ public class XBaseWindow { ...@@ -160,7 +160,7 @@ public class XBaseWindow {
* with class-specific values and perform post-initialization actions. * with class-specific values and perform post-initialization actions.
*/ */
void postInit(XCreateWindowParams params) { void postInit(XCreateWindowParams params) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("WM name is " + getWMName()); log.fine("WM name is " + getWMName());
} }
updateWMName(); updateWMName();
...@@ -362,7 +362,7 @@ public class XBaseWindow { ...@@ -362,7 +362,7 @@ public class XBaseWindow {
value_mask |= XConstants.CWBitGravity; value_mask |= XConstants.CWBitGravity;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Creating window for " + this + " with the following attributes: \n" + params); log.fine("Creating window for " + this + " with the following attributes: \n" + params);
} }
window = XlibWrapper.XCreateWindow(XToolkit.getDisplay(), window = XlibWrapper.XCreateWindow(XToolkit.getDisplay(),
...@@ -482,7 +482,7 @@ public class XBaseWindow { ...@@ -482,7 +482,7 @@ public class XBaseWindow {
} }
public void setSizeHints(long flags, int x, int y, int width, int height) { public void setSizeHints(long flags, int x, int y, int width, int height) {
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags)); insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -545,7 +545,7 @@ public class XBaseWindow { ...@@ -545,7 +545,7 @@ public class XBaseWindow {
flags |= XUtilConstants.PWinGravity; flags |= XUtilConstants.PWinGravity;
hints.set_flags(flags); hints.set_flags(flags);
hints.set_win_gravity((int)XConstants.NorthWestGravity); hints.set_win_gravity((int)XConstants.NorthWestGravity);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) + insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
", values " + hints); ", values " + hints);
} }
...@@ -599,7 +599,7 @@ public class XBaseWindow { ...@@ -599,7 +599,7 @@ public class XBaseWindow {
public void xRequestFocus(long time) { public void xRequestFocus(long time) {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time); focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
} }
XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time); XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time);
...@@ -610,7 +610,7 @@ public class XBaseWindow { ...@@ -610,7 +610,7 @@ public class XBaseWindow {
public void xRequestFocus() { public void xRequestFocus() {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow())); focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
} }
XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow()); XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow());
...@@ -629,7 +629,7 @@ public class XBaseWindow { ...@@ -629,7 +629,7 @@ public class XBaseWindow {
} }
public void xSetVisible(boolean visible) { public void xSetVisible(boolean visible) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting visible on " + this + " to " + visible); log.fine("Setting visible on " + this + " to " + visible);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -716,7 +716,7 @@ public class XBaseWindow { ...@@ -716,7 +716,7 @@ public class XBaseWindow {
insLog.warning("Attempt to resize uncreated window"); insLog.warning("Attempt to resize uncreated window");
throw new IllegalStateException("Attempt to resize uncreated window"); throw new IllegalStateException("Attempt to resize uncreated window");
} }
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height); insLog.fine("Setting bounds on " + this + " to (" + x + ", " + y + "), " + width + "x" + height);
} }
width = Math.max(MIN_SIZE, width); width = Math.max(MIN_SIZE, width);
...@@ -834,7 +834,7 @@ public class XBaseWindow { ...@@ -834,7 +834,7 @@ public class XBaseWindow {
* The active grab overrides activated automatic grab. * The active grab overrides activated automatic grab.
*/ */
public boolean grabInput() { public boolean grabInput() {
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("Grab input on {0}", this); grabLog.fine("Grab input on {0}", this);
} }
...@@ -899,7 +899,7 @@ public class XBaseWindow { ...@@ -899,7 +899,7 @@ public class XBaseWindow {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
XBaseWindow grabWindow = XAwtState.getGrabWindow(); XBaseWindow grabWindow = XAwtState.getGrabWindow();
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("UnGrab input on {0}", grabWindow); grabLog.fine("UnGrab input on {0}", grabWindow);
} }
if (grabWindow != null) { if (grabWindow != null) {
...@@ -943,7 +943,7 @@ public class XBaseWindow { ...@@ -943,7 +943,7 @@ public class XBaseWindow {
mapped = false; mapped = false;
} }
public void handleReparentNotifyEvent(XEvent xev) { public void handleReparentNotifyEvent(XEvent xev) {
if (eventLog.isLoggable(PlatformLogger.FINER)) { if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
XReparentEvent msg = xev.get_xreparent(); XReparentEvent msg = xev.get_xreparent();
eventLog.finer(msg.toString()); eventLog.finer(msg.toString());
} }
...@@ -953,7 +953,7 @@ public class XBaseWindow { ...@@ -953,7 +953,7 @@ public class XBaseWindow {
if (XPropertyCache.isCachingSupported()) { if (XPropertyCache.isCachingSupported()) {
XPropertyCache.clearCache(window, XAtom.get(msg.get_atom())); XPropertyCache.clearCache(window, XAtom.get(msg.get_atom()));
} }
if (eventLog.isLoggable(PlatformLogger.FINER)) { if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
eventLog.finer("{0}", msg); eventLog.finer("{0}", msg);
} }
} }
...@@ -983,7 +983,7 @@ public class XBaseWindow { ...@@ -983,7 +983,7 @@ public class XBaseWindow {
} }
public void handleClientMessage(XEvent xev) { public void handleClientMessage(XEvent xev) {
if (eventLog.isLoggable(PlatformLogger.FINER)) { if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
XClientMessageEvent msg = xev.get_xclient(); XClientMessageEvent msg = xev.get_xclient();
eventLog.finer(msg.toString()); eventLog.finer(msg.toString());
} }
...@@ -1039,7 +1039,7 @@ public class XBaseWindow { ...@@ -1039,7 +1039,7 @@ public class XBaseWindow {
} }
public void handleConfigureNotifyEvent(XEvent xev) { public void handleConfigureNotifyEvent(XEvent xev) {
XConfigureEvent xe = xev.get_xconfigure(); XConfigureEvent xe = xev.get_xconfigure();
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Configure, {0}", xe); insLog.finer("Configure, {0}", xe);
} }
x = xe.get_x(); x = xe.get_x();
...@@ -1092,7 +1092,7 @@ public class XBaseWindow { ...@@ -1092,7 +1092,7 @@ public class XBaseWindow {
} }
public void dispatchEvent(XEvent xev) { public void dispatchEvent(XEvent xev) {
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest(xev.toString()); eventLog.finest(xev.toString());
} }
int type = xev.get_type(); int type = xev.get_type();
......
...@@ -172,7 +172,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer { ...@@ -172,7 +172,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
Checkbox cb = (Checkbox) e.getSource(); Checkbox cb = (Checkbox) e.getSource();
if (cb.contains(e.getX(), e.getY())) { if (cb.contains(e.getX(), e.getY())) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("mousePressed() on " + target.getName() + " : armed = " + armed + ", pressed = " + pressed log.finer("mousePressed() on " + target.getName() + " : armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled()); + ", selected = " + selected + ", enabled = " + isEnabled());
} }
...@@ -190,7 +190,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer { ...@@ -190,7 +190,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
} }
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("mouseReleased() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed log.finer("mouseReleased() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled()); + ", selected = " + selected + ", enabled = " + isEnabled());
} }
...@@ -215,7 +215,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer { ...@@ -215,7 +215,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
} }
public void mouseEntered(MouseEvent e) { public void mouseEntered(MouseEvent e) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("mouseEntered() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed log.finer("mouseEntered() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled()); + ", selected = " + selected + ", enabled = " + isEnabled());
} }
...@@ -226,7 +226,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer { ...@@ -226,7 +226,7 @@ class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
} }
public void mouseExited(MouseEvent e) { public void mouseExited(MouseEvent e) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("mouseExited() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed log.finer("mouseExited() on " + target.getName() + ": armed = " + armed + ", pressed = " + pressed
+ ", selected = " + selected + ", enabled = " + isEnabled()); + ", selected = " + selected + ", enabled = " + isEnabled());
} }
......
...@@ -892,7 +892,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS ...@@ -892,7 +892,7 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS
if (transX > 0 && transX < width && if (transX > 0 && transX < width &&
transY > 0 && transY < height) { transY > 0 && transY < height) {
int newIdx = helper.y2index(transY); int newIdx = helper.y2index(transY);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("transX=" + transX + ", transY=" + transY log.fine("transX=" + transX + ", transY=" + transY
+ ",width=" + width + ", height=" + height + ",width=" + width + ", height=" + height
+ ", newIdx=" + newIdx + " on " + target); + ", newIdx=" + newIdx + " on " + target);
......
...@@ -214,7 +214,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -214,7 +214,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
* Called when component receives focus * Called when component receives focus
*/ */
public void focusGained(FocusEvent e) { public void focusGained(FocusEvent e) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("{0}", e); focusLog.fine("{0}", e);
} }
bHasFocus = true; bHasFocus = true;
...@@ -224,7 +224,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -224,7 +224,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
* Called when component loses focus * Called when component loses focus
*/ */
public void focusLost(FocusEvent e) { public void focusLost(FocusEvent e) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("{0}", e); focusLog.fine("{0}", e);
} }
bHasFocus = false; bHasFocus = false;
...@@ -298,7 +298,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -298,7 +298,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED: case XKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
// Currently we just generate focus events like we deal with lightweight instead of calling // Currently we just generate focus events like we deal with lightweight instead of calling
// XSetInputFocus on native window // XSetInputFocus on native window
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Proceeding with request to " + focusLog.finer("Proceeding with request to " +
lightweightChild + " in " + target); lightweightChild + " in " + target);
} }
...@@ -325,7 +325,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -325,7 +325,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
*/ */
boolean res = wpeer.requestWindowFocus(null); boolean res = wpeer.requestWindowFocus(null);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Requested window focus: " + res); focusLog.finer("Requested window focus: " + res);
} }
// If parent window can be made focused and has been made focused(synchronously) // If parent window can be made focused and has been made focused(synchronously)
...@@ -347,7 +347,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -347,7 +347,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
private boolean rejectFocusRequestHelper(String logMsg) { private boolean rejectFocusRequestHelper(String logMsg) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer(logMsg); focusLog.finer(logMsg);
} }
XKeyboardFocusManagerPeer.removeLastFocusRequest(target); XKeyboardFocusManagerPeer.removeLastFocusRequest(target);
...@@ -355,7 +355,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -355,7 +355,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
void handleJavaFocusEvent(AWTEvent e) { void handleJavaFocusEvent(AWTEvent e) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer(e.toString()); focusLog.finer(e.toString());
} }
if (e.getID() == FocusEvent.FOCUS_GAINED) { if (e.getID() == FocusEvent.FOCUS_GAINED) {
...@@ -386,7 +386,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -386,7 +386,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
* @see java.awt.peer.ComponentPeer * @see java.awt.peer.ComponentPeer
*/ */
public void setEnabled(final boolean value) { public void setEnabled(final boolean value) {
if (enableLog.isLoggable(PlatformLogger.FINE)) { if (enableLog.isLoggable(PlatformLogger.Level.FINE)) {
enableLog.fine("{0}ing {1}", (value ? "Enabl" : "Disabl"), this); enableLog.fine("{0}ing {1}", (value ? "Enabl" : "Disabl"), this);
} }
boolean status = value; boolean status = value;
...@@ -467,13 +467,13 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -467,13 +467,13 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
if (true) { if (true) {
switch(e.getID()) { switch(e.getID()) {
case PaintEvent.UPDATE: case PaintEvent.UPDATE:
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("XCP coalescePaintEvent : UPDATE : add : x = " + log.finer("XCP coalescePaintEvent : UPDATE : add : x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height); r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
} }
return; return;
case PaintEvent.PAINT: case PaintEvent.PAINT:
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("XCP coalescePaintEvent : PAINT : add : x = " + log.finer("XCP coalescePaintEvent : PAINT : add : x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height); r.x + ", y = " + r.y + ", width = " + r.width + ",height = " + r.height);
} }
...@@ -640,7 +640,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -640,7 +640,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public void setBackground(Color c) { public void setBackground(Color c) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Set background to " + c); log.fine("Set background to " + c);
} }
synchronized (getStateLock()) { synchronized (getStateLock()) {
...@@ -651,7 +651,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -651,7 +651,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public void setForeground(Color c) { public void setForeground(Color c) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Set foreground to " + c); log.fine("Set foreground to " + c);
} }
synchronized (getStateLock()) { synchronized (getStateLock()) {
...@@ -672,7 +672,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -672,7 +672,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
* @since JDK1.0 * @since JDK1.0
*/ */
public FontMetrics getFontMetrics(Font font) { public FontMetrics getFontMetrics(Font font) {
if (fontLog.isLoggable(PlatformLogger.FINE)) { if (fontLog.isLoggable(PlatformLogger.Level.FINE)) {
fontLog.fine("Getting font metrics for " + font); fontLog.fine("Getting font metrics for " + font);
} }
return sun.font.FontDesignMetrics.getMetrics(font); return sun.font.FontDesignMetrics.getMetrics(font);
...@@ -1158,7 +1158,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1158,7 +1158,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
public void createBuffers(int numBuffers, BufferCapabilities caps) public void createBuffers(int numBuffers, BufferCapabilities caps)
throws AWTException throws AWTException
{ {
if (buffersLog.isLoggable(PlatformLogger.FINE)) { if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
buffersLog.fine("createBuffers(" + numBuffers + ", " + caps + ")"); buffersLog.fine("createBuffers(" + numBuffers + ", " + caps + ")");
} }
// set the caps first, they're used when creating the bb // set the caps first, they're used when creating the bb
...@@ -1176,7 +1176,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1176,7 +1176,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
public void flip(int x1, int y1, int x2, int y2, public void flip(int x1, int y1, int x2, int y2,
BufferCapabilities.FlipContents flipAction) BufferCapabilities.FlipContents flipAction)
{ {
if (buffersLog.isLoggable(PlatformLogger.FINE)) { if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
buffersLog.fine("flip(" + flipAction + ")"); buffersLog.fine("flip(" + flipAction + ")");
} }
if (backBuffer == 0) { if (backBuffer == 0) {
...@@ -1187,7 +1187,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1187,7 +1187,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public Image getBackBuffer() { public Image getBackBuffer() {
if (buffersLog.isLoggable(PlatformLogger.FINE)) { if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
buffersLog.fine("getBackBuffer()"); buffersLog.fine("getBackBuffer()");
} }
if (backBuffer == 0) { if (backBuffer == 0) {
...@@ -1197,7 +1197,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1197,7 +1197,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public void destroyBuffers() { public void destroyBuffers() {
if (buffersLog.isLoggable(PlatformLogger.FINE)) { if (buffersLog.isLoggable(PlatformLogger.Level.FINE)) {
buffersLog.fine("destroyBuffers()"); buffersLog.fine("destroyBuffers()");
} }
graphicsConfig.destroyBackBuffer(backBuffer); graphicsConfig.destroyBackBuffer(backBuffer);
...@@ -1232,7 +1232,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1232,7 +1232,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
* ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify * ButtonPress, ButtonRelease, KeyPress, KeyRelease, EnterNotify, LeaveNotify, MotionNotify
*/ */
protected boolean isEventDisabled(XEvent e) { protected boolean isEventDisabled(XEvent e) {
if (enableLog.isLoggable(PlatformLogger.FINEST)) { if (enableLog.isLoggable(PlatformLogger.Level.FINEST)) {
enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable")); enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable"));
} }
if (!isEnabled()) { if (!isEnabled()) {
...@@ -1244,7 +1244,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1244,7 +1244,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
case XConstants.EnterNotify: case XConstants.EnterNotify:
case XConstants.LeaveNotify: case XConstants.LeaveNotify:
case XConstants.MotionNotify: case XConstants.MotionNotify:
if (enableLog.isLoggable(PlatformLogger.FINER)) { if (enableLog.isLoggable(PlatformLogger.Level.FINER)) {
enableLog.finer("Event {0} is disable", e); enableLog.finer("Event {0} is disable", e);
} }
return true; return true;
...@@ -1367,7 +1367,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1367,7 +1367,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
*/ */
public void applyShape(Region shape) { public void applyShape(Region shape) {
if (XlibUtil.isShapingSupported()) { if (XlibUtil.isShapingSupported()) {
if (shapeLog.isLoggable(PlatformLogger.FINER)) { if (shapeLog.isLoggable(PlatformLogger.Level.FINER)) {
shapeLog.finer( shapeLog.finer(
"*** INFO: Setting shape: PEER: " + this "*** INFO: Setting shape: PEER: " + this
+ "; WINDOW: " + getWindow() + "; WINDOW: " + getWindow()
...@@ -1397,7 +1397,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1397,7 +1397,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
XToolkit.awtUnlock(); XToolkit.awtUnlock();
} }
} else { } else {
if (shapeLog.isLoggable(PlatformLogger.FINER)) { if (shapeLog.isLoggable(PlatformLogger.Level.FINER)) {
shapeLog.finer("*** WARNING: Shaping is NOT supported!"); shapeLog.finer("*** WARNING: Shaping is NOT supported!");
} }
} }
......
...@@ -115,7 +115,7 @@ public final class XContentWindow extends XWindow { ...@@ -115,7 +115,7 @@ public final class XContentWindow extends XWindow {
if (in != null) { if (in != null) {
newBounds.setLocation(-in.left, -in.top); newBounds.setLocation(-in.left, -in.top);
} }
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting content bounds {0}, old bounds {1}", insLog.fine("Setting content bounds {0}, old bounds {1}",
newBounds, getBounds()); newBounds, getBounds());
} }
......
...@@ -79,7 +79,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -79,7 +79,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
Rectangle bounds = (Rectangle)params.get(BOUNDS); Rectangle bounds = (Rectangle)params.get(BOUNDS);
dimensions = new WindowDimensions(bounds, getRealInsets(), false); dimensions = new WindowDimensions(bounds, getRealInsets(), false);
params.put(BOUNDS, dimensions.getClientRect()); params.put(BOUNDS, dimensions.getClientRect());
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Initial dimensions {0}", dimensions); insLog.fine("Initial dimensions {0}", dimensions);
} }
...@@ -182,7 +182,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -182,7 +182,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
public void setTitle(String title) { public void setTitle(String title) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Title is " + title); log.fine("Title is " + title);
} }
winAttr.title = title; winAttr.title = title;
...@@ -232,7 +232,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -232,7 +232,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
// If we somehow received focus events forward it instead to proxy // If we somehow received focus events forward it instead to proxy
// FIXME: Shouldn't we instead check for inferrior? // FIXME: Shouldn't we instead check for inferrior?
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Received focus event on shell: " + xfe); focusLog.finer("Received focus event on shell: " + xfe);
} }
// focusProxy.xRequestFocus(); // focusProxy.xRequestFocus();
...@@ -276,7 +276,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -276,7 +276,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom); wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom);
} }
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("FRAME_EXTENTS: {0}", wm_set_insets); insLog.finer("FRAME_EXTENTS: {0}", wm_set_insets);
} }
...@@ -305,7 +305,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -305,7 +305,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
public void handleReparentNotifyEvent(XEvent xev) { public void handleReparentNotifyEvent(XEvent xev) {
XReparentEvent xe = xev.get_xreparent(); XReparentEvent xe = xev.get_xreparent();
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine(xe.toString()); insLog.fine(xe.toString());
} }
reparent_serial = xe.get_serial(); reparent_serial = xe.get_serial();
...@@ -346,7 +346,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -346,7 +346,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
// Check if we have insets provided by the WM // Check if we have insets provided by the WM
Insets correctWM = getWMSetInsets(null); Insets correctWM = getWMSetInsets(null);
if (correctWM != null) { if (correctWM != null) {
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("wm-provided insets {0}", correctWM); insLog.finer("wm-provided insets {0}", correctWM);
} }
// If these insets are equal to our current insets - no actions are necessary // If these insets are equal to our current insets - no actions are necessary
...@@ -361,7 +361,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -361,7 +361,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} else { } else {
correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent()); correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent());
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
if (correctWM != null) { if (correctWM != null) {
insLog.finer("correctWM {0}", correctWM); insLog.finer("correctWM {0}", correctWM);
} else { } else {
...@@ -387,7 +387,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -387,7 +387,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
* initial insets were wrong (most likely they were). * initial insets were wrong (most likely they were).
*/ */
Insets correction = difference(correctWM, currentInsets); Insets correction = difference(correctWM, currentInsets);
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("Corrention {0}", correction); insLog.finest("Corrention {0}", correction);
} }
if (!isNull(correction)) { if (!isNull(correction)) {
...@@ -399,7 +399,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -399,7 +399,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
//update minimum size hints //update minimum size hints
updateMinSizeHints(); updateMinSizeHints();
} }
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Dimensions before reparent: " + dimensions); insLog.finer("Dimensions before reparent: " + dimensions);
} }
...@@ -474,7 +474,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -474,7 +474,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
public Insets getInsets() { public Insets getInsets() {
Insets in = copy(getRealInsets()); Insets in = copy(getRealInsets());
in.top += getMenuBarHeight(); in.top += getMenuBarHeight();
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("Get insets returns {0}", in); insLog.finest("Get insets returns {0}", in);
} }
return in; return in;
...@@ -504,7 +504,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -504,7 +504,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
public void reshape(WindowDimensions newDimensions, int op, public void reshape(WindowDimensions newDimensions, int op,
boolean userReshape) boolean userReshape)
{ {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Reshaping " + this + " to " + newDimensions + " op " + op + " user reshape " + userReshape); insLog.fine("Reshaping " + this + " to " + newDimensions + " op " + op + " user reshape " + userReshape);
} }
if (userReshape) { if (userReshape) {
...@@ -525,7 +525,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -525,7 +525,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (!isReparented() || !isVisible()) { if (!isReparented() || !isVisible()) {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("- not reparented({0}) or not visible({1}), default reshape", insLog.fine("- not reparented({0}) or not visible({1}), default reshape",
Boolean.valueOf(isReparented()), Boolean.valueOf(visible)); Boolean.valueOf(isReparented()), Boolean.valueOf(visible));
} }
...@@ -633,7 +633,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -633,7 +633,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
dims.setSize(width, height); dims.setSize(width, height);
break; break;
} }
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("For the operation {0} new dimensions are {1}", insLog.fine("For the operation {0} new dimensions are {1}",
operationToString(operation), dims); operationToString(operation), dims);
} }
...@@ -666,7 +666,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -666,7 +666,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
public void handleConfigureNotifyEvent(XEvent xev) { public void handleConfigureNotifyEvent(XEvent xev) {
assert (SunToolkit.isAWTLockHeldByCurrentThread()); assert (SunToolkit.isAWTLockHeldByCurrentThread());
XConfigureEvent xe = xev.get_xconfigure(); XConfigureEvent xe = xev.get_xconfigure();
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Configure notify {0}", xe); insLog.fine("Configure notify {0}", xe);
} }
...@@ -705,7 +705,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -705,7 +705,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
* it!!!! or we wind up in a bogus location. * it!!!! or we wind up in a bogus location.
*/ */
int runningWM = XWM.getWMID(); int runningWM = XWM.getWMID();
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("reparented={0}, visible={1}, WM={2}, decorations={3}", insLog.fine("reparented={0}, visible={1}, WM={2}, decorations={3}",
isReparented(), isVisible(), runningWM, getDecorations()); isReparented(), isVisible(), runningWM, getDecorations());
} }
...@@ -719,7 +719,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -719,7 +719,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
if (!insets_corrected && getDecorations() != XWindowAttributesData.AWT_DECOR_NONE) { if (!insets_corrected && getDecorations() != XWindowAttributesData.AWT_DECOR_NONE) {
long parent = XlibUtil.getParentWindow(window); long parent = XlibUtil.getParentWindow(window);
Insets correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null; Insets correctWM = (parent != -1) ? XWM.getWM().getInsets(this, window, parent) : null;
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
if (correctWM != null) { if (correctWM != null) {
insLog.finer("Configure notify - insets : " + correctWM); insLog.finer("Configure notify - insets : " + correctWM);
} else { } else {
...@@ -759,7 +759,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -759,7 +759,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
case XWM.SAWFISH_WM: case XWM.SAWFISH_WM:
{ {
Point xlocation = queryXLocation(); Point xlocation = queryXLocation();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("New X location: {0}", xlocation); log.fine("New X location: {0}", xlocation);
} }
if (xlocation != null) { if (xlocation != null) {
...@@ -778,7 +778,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -778,7 +778,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
copy(currentInsets), copy(currentInsets),
true); true);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Insets are {0}, new dimensions {1}", insLog.finer("Insets are {0}, new dimensions {1}",
currentInsets, newDimensions); currentInsets, newDimensions);
} }
...@@ -816,7 +816,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -816,7 +816,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
public void setShellBounds(Rectangle rec) { public void setShellBounds(Rectangle rec) {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting shell bounds on " + this + " to " + rec); insLog.fine("Setting shell bounds on " + this + " to " + rec);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -830,7 +830,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -830,7 +830,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
} }
public void setShellSize(Rectangle rec) { public void setShellSize(Rectangle rec) {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting shell size on " + this + " to " + rec); insLog.fine("Setting shell size on " + this + " to " + rec);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -843,7 +843,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -843,7 +843,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
} }
public void setShellPosition(Rectangle rec) { public void setShellPosition(Rectangle rec) {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting shell position on " + this + " to " + rec); insLog.fine("Setting shell position on " + this + " to " + rec);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -945,7 +945,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -945,7 +945,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
return toGlobal(0,0); return toGlobal(0,0);
} else { } else {
Point location = target.getLocation(); Point location = target.getLocation();
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("getLocationOnScreen {0} not reparented: {1} ", insLog.fine("getLocationOnScreen {0} not reparented: {1} ",
this, location); this, location);
} }
...@@ -985,7 +985,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -985,7 +985,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
public void setVisible(boolean vis) { public void setVisible(boolean vis) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis)); log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
} }
if (vis && !isVisible()) { if (vis && !isVisible()) {
...@@ -1038,7 +1038,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1038,7 +1038,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
private void handleWmTakeFocus(XClientMessageEvent cl) { private void handleWmTakeFocus(XClientMessageEvent cl) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("WM_TAKE_FOCUS on {0}", this); focusLog.fine("WM_TAKE_FOCUS on {0}", this);
} }
requestWindowFocus(cl.get_data(1), true); requestWindowFocus(cl.get_data(1), true);
...@@ -1053,11 +1053,11 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1053,11 +1053,11 @@ abstract class XDecoratedPeer extends XWindowPeer {
// by "proxy" - invisible mapped window. When we want to set X input focus to // by "proxy" - invisible mapped window. When we want to set X input focus to
// toplevel set it on proxy instead. // toplevel set it on proxy instead.
if (focusProxy == null) { if (focusProxy == null) {
if (focusLog.isLoggable(PlatformLogger.WARNING)) { if (focusLog.isLoggable(PlatformLogger.Level.WARNING)) {
focusLog.warning("Focus proxy is null for " + this); focusLog.warning("Focus proxy is null for " + this);
} }
} else { } else {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Requesting focus to proxy: " + focusProxy); focusLog.fine("Requesting focus to proxy: " + focusProxy);
} }
if (timeProvided) { if (timeProvided) {
...@@ -1151,7 +1151,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1151,7 +1151,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
Window focusedWindow = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusedWindow(); Window focusedWindow = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusedWindow();
Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow); Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Current window is: active={0}, focused={1}", focusLog.finer("Current window is: active={0}, focused={1}",
Boolean.valueOf(target == activeWindow), Boolean.valueOf(target == activeWindow),
Boolean.valueOf(target == focusedWindow)); Boolean.valueOf(target == focusedWindow));
...@@ -1178,20 +1178,20 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1178,20 +1178,20 @@ abstract class XDecoratedPeer extends XWindowPeer {
return true; return true;
} }
Window realNativeFocusedWindow = XWindowPeer.getNativeFocusedWindow(); Window realNativeFocusedWindow = XWindowPeer.getNativeFocusedWindow();
if (focusLog.isLoggable(PlatformLogger.FINEST)) { if (focusLog.isLoggable(PlatformLogger.Level.FINEST)) {
focusLog.finest("Real native focused window: " + realNativeFocusedWindow + focusLog.finest("Real native focused window: " + realNativeFocusedWindow +
"\nKFM's focused window: " + focusedWindow); "\nKFM's focused window: " + focusedWindow);
} }
// A workaround for Metacity. See 6522725, 6613426, 7147075. // A workaround for Metacity. See 6522725, 6613426, 7147075.
if (target == realNativeFocusedWindow && XWM.getWMID() == XWM.METACITY_WM) { if (target == realNativeFocusedWindow && XWM.getWMID() == XWM.METACITY_WM) {
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("The window is already natively focused."); focusLog.fine("The window is already natively focused.");
} }
return true; return true;
} }
} }
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Requesting focus to " + (this == toFocus ? "this window" : toFocus)); focusLog.fine("Requesting focus to " + (this == toFocus ? "this window" : toFocus));
} }
......
...@@ -395,7 +395,7 @@ class XDnDDragSourceProtocol extends XDragSourceProtocol { ...@@ -395,7 +395,7 @@ class XDnDDragSourceProtocol extends XDragSourceProtocol {
return false; return false;
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" sourceWindow=" + sourceWindow + logger.finest(" sourceWindow=" + sourceWindow +
" get_window=" + xclient.get_window() + " get_window=" + xclient.get_window() +
" xclient=" + xclient); " xclient=" + xclient);
......
...@@ -993,7 +993,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -993,7 +993,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
if (sourceFormats != null && sourceFormats.length > 3) { if (sourceFormats != null && sourceFormats.length > 3) {
data1 |= XDnDConstants.XDND_DATA_TYPES_BIT; data1 |= XDnDConstants.XDND_DATA_TYPES_BIT;
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" " logger.finest(" "
+ " entryVersion=" + version + " entryVersion=" + version
+ " sourceProtocolVersion=" + + " sourceProtocolVersion=" +
...@@ -1052,7 +1052,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1052,7 +1052,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
public boolean forwardEventToEmbedded(long embedded, long ctxt, public boolean forwardEventToEmbedded(long embedded, long ctxt,
int eventID) { int eventID) {
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" ctxt=" + ctxt + logger.finest(" ctxt=" + ctxt +
" type=" + (ctxt != 0 ? " type=" + (ctxt != 0 ?
getMessageType(new getMessageType(new
...@@ -1080,7 +1080,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1080,7 +1080,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
long data3 = Native.getLong(ctxt + size + 2 * Native.getLongSize()); long data3 = Native.getLong(ctxt + size + 2 * Native.getLongSize());
long data4 = Native.getLong(ctxt + size + 3 * Native.getLongSize()); long data4 = Native.getLong(ctxt + size + 3 * Native.getLongSize());
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" 1 " logger.finest(" 1 "
+ " embedded=" + embedded + " embedded=" + embedded
+ " source=" + xclient.get_data(0) + " source=" + xclient.get_data(0)
...@@ -1114,7 +1114,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1114,7 +1114,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
if ((XErrorHandlerUtil.saved_error != null) && if ((XErrorHandlerUtil.saved_error != null) &&
(XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) { (XErrorHandlerUtil.saved_error.get_error_code() != XConstants.Success)) {
if (logger.isLoggable(PlatformLogger.WARNING)) { if (logger.isLoggable(PlatformLogger.Level.WARNING)) {
logger.warning("Cannot set XdndTypeList on the proxy window"); logger.warning("Cannot set XdndTypeList on the proxy window");
} }
} }
...@@ -1122,7 +1122,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1122,7 +1122,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
} }
} else { } else {
if (logger.isLoggable(PlatformLogger.WARNING)) { if (logger.isLoggable(PlatformLogger.Level.WARNING)) {
logger.warning("Cannot read XdndTypeList from the source window"); logger.warning("Cannot read XdndTypeList from the source window");
} }
} }
...@@ -1137,7 +1137,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1137,7 +1137,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
overXEmbedClient = true; overXEmbedClient = true;
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" 2 " logger.finest(" 2 "
+ " embedded=" + embedded + " embedded=" + embedded
+ " xclient=" + xclient); + " xclient=" + xclient);
......
...@@ -542,7 +542,7 @@ public final class XDragSourceContextPeer ...@@ -542,7 +542,7 @@ public final class XDragSourceContextPeer
return false; return false;
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" proxyModeSourceWindow=" + logger.finest(" proxyModeSourceWindow=" +
getProxyModeSourceWindow() + getProxyModeSourceWindow() +
" ev=" + ev); " ev=" + ev);
......
...@@ -199,7 +199,7 @@ final class XDropTargetContextPeer extends SunDropTargetContextPeer { ...@@ -199,7 +199,7 @@ final class XDropTargetContextPeer extends SunDropTargetContextPeer {
structure. */ structure. */
long ctxt = getNativeDragContext(); long ctxt = getNativeDragContext();
if (logger.isLoggable(PlatformLogger.FINER)) { if (logger.isLoggable(PlatformLogger.Level.FINER)) {
logger.finer(" processing " + event + " ctxt=" + ctxt + logger.finer(" processing " + event + " ctxt=" + ctxt +
" consumed=" + event.isConsumed()); " consumed=" + event.isConsumed());
} }
......
...@@ -116,7 +116,7 @@ abstract class XDropTargetProtocol { ...@@ -116,7 +116,7 @@ abstract class XDropTargetProtocol {
XClientMessageEvent xclient) { XClientMessageEvent xclient) {
EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel); EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel);
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" entry={0}", entry); logger.finest(" entry={0}", entry);
} }
// Window not registered as an embedder for this protocol. // Window not registered as an embedder for this protocol.
...@@ -124,7 +124,7 @@ abstract class XDropTargetProtocol { ...@@ -124,7 +124,7 @@ abstract class XDropTargetProtocol {
return false; return false;
} }
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" entry.isOverriden()={0}", entry.isOverriden()); logger.finest(" entry.isOverriden()={0}", entry.isOverriden());
} }
// Window didn't have an associated drop site, so there is no need // Window didn't have an associated drop site, so there is no need
...@@ -137,7 +137,7 @@ abstract class XDropTargetProtocol { ...@@ -137,7 +137,7 @@ abstract class XDropTargetProtocol {
long proxy = entry.getProxy(); long proxy = entry.getProxy();
if (logger.isLoggable(PlatformLogger.FINEST)) { if (logger.isLoggable(PlatformLogger.Level.FINEST)) {
logger.finest(" proxy={0} toplevel={1}", proxy, toplevel); logger.finest(" proxy={0} toplevel={1}", proxy, toplevel);
} }
if (proxy == 0) { if (proxy == 0) {
......
...@@ -614,7 +614,7 @@ final class XDropTargetRegistry { ...@@ -614,7 +614,7 @@ final class XDropTargetRegistry {
if (info != null && if (info != null &&
info.getProtocolVersion() >= XDnDConstants.XDND_MIN_PROTOCOL_VERSION) { info.getProtocolVersion() >= XDnDConstants.XDND_MIN_PROTOCOL_VERSION) {
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(" XEmbed drop site will be registered for " + Long.toHexString(clientWindow)); logger.fine(" XEmbed drop site will be registered for " + Long.toHexString(clientWindow));
} }
registerEmbeddedDropSite(canvasWindow, clientWindow); registerEmbeddedDropSite(canvasWindow, clientWindow);
...@@ -628,14 +628,14 @@ final class XDropTargetRegistry { ...@@ -628,14 +628,14 @@ final class XDropTargetRegistry {
dropTargetProtocol.registerEmbeddedDropSite(clientWindow); dropTargetProtocol.registerEmbeddedDropSite(clientWindow);
} }
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(" XEmbed drop site has been registered for " + Long.toHexString(clientWindow)); logger.fine(" XEmbed drop site has been registered for " + Long.toHexString(clientWindow));
} }
} }
} }
public void unregisterXEmbedClient(long canvasWindow, long clientWindow) { public void unregisterXEmbedClient(long canvasWindow, long clientWindow) {
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(" XEmbed drop site will be unregistered for " + Long.toHexString(clientWindow)); logger.fine(" XEmbed drop site will be unregistered for " + Long.toHexString(clientWindow));
} }
Iterator dropTargetProtocols = Iterator dropTargetProtocols =
...@@ -649,7 +649,7 @@ final class XDropTargetRegistry { ...@@ -649,7 +649,7 @@ final class XDropTargetRegistry {
unregisterEmbeddedDropSite(canvasWindow, clientWindow); unregisterEmbeddedDropSite(canvasWindow, clientWindow);
if (logger.isLoggable(PlatformLogger.FINE)) { if (logger.isLoggable(PlatformLogger.Level.FINE)) {
logger.fine(" XEmbed drop site has beed unregistered for " + Long.toHexString(clientWindow)); logger.fine(" XEmbed drop site has beed unregistered for " + Long.toHexString(clientWindow));
} }
} }
......
...@@ -123,7 +123,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -123,7 +123,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
void initDispatching() { void initDispatching() {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle)); xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -142,7 +142,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -142,7 +142,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
void endDispatching() { void endDispatching() {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("End dispatching for " + Long.toHexString(xembed.handle)); xembedLog.fine("End dispatching for " + Long.toHexString(xembed.handle));
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -164,7 +164,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -164,7 +164,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
void childDestroyed() { void childDestroyed() {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Child " + Long.toHexString(xembed.handle) + " has self-destroyed."); xembedLog.fine("Child " + Long.toHexString(xembed.handle) + " has self-destroyed.");
} }
endDispatching(); endDispatching();
...@@ -196,10 +196,10 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -196,10 +196,10 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
switch (ev.get_type()) { switch (ev.get_type()) {
case XConstants.CreateNotify: case XConstants.CreateNotify:
XCreateWindowEvent cr = ev.get_xcreatewindow(); XCreateWindowEvent cr = ev.get_xcreatewindow();
if (xembedLog.isLoggable(PlatformLogger.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
xembedLog.finest("Message on embedder: " + cr); xembedLog.finest("Message on embedder: " + cr);
} }
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Create notify for parent " + Long.toHexString(cr.get_parent()) + xembedLog.finer("Create notify for parent " + Long.toHexString(cr.get_parent()) +
", window " + Long.toHexString(cr.get_window())); ", window " + Long.toHexString(cr.get_window()));
} }
...@@ -207,20 +207,20 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -207,20 +207,20 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
break; break;
case XConstants.DestroyNotify: case XConstants.DestroyNotify:
XDestroyWindowEvent dn = ev.get_xdestroywindow(); XDestroyWindowEvent dn = ev.get_xdestroywindow();
if (xembedLog.isLoggable(PlatformLogger.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
xembedLog.finest("Message on embedder: " + dn); xembedLog.finest("Message on embedder: " + dn);
} }
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Destroy notify for parent: " + dn); xembedLog.finer("Destroy notify for parent: " + dn);
} }
childDestroyed(); childDestroyed();
break; break;
case XConstants.ReparentNotify: case XConstants.ReparentNotify:
XReparentEvent rep = ev.get_xreparent(); XReparentEvent rep = ev.get_xreparent();
if (xembedLog.isLoggable(PlatformLogger.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
xembedLog.finest("Message on embedder: " + rep); xembedLog.finest("Message on embedder: " + rep);
} }
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Reparent notify for parent " + Long.toHexString(rep.get_parent()) + xembedLog.finer("Reparent notify for parent " + Long.toHexString(rep.get_parent()) +
", window " + Long.toHexString(rep.get_window()) + ", window " + Long.toHexString(rep.get_window()) +
", event " + Long.toHexString(rep.get_event())); ", event " + Long.toHexString(rep.get_event()));
...@@ -323,7 +323,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -323,7 +323,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
void childResized() { void childResized() {
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
Rectangle bounds = getClientBounds(); Rectangle bounds = getClientBounds();
xembedLog.finer("Child resized: " + bounds); xembedLog.finer("Child resized: " + bounds);
// It is not required to update embedder's size when client size changes // It is not required to update embedder's size when client size changes
...@@ -388,7 +388,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -388,7 +388,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
void detachChild() { void detachChild() {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle)); xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
} }
/** /**
...@@ -471,7 +471,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -471,7 +471,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
try { try {
XKeyEvent ke = new XKeyEvent(data); XKeyEvent ke = new XKeyEvent(data);
ke.set_window(xembed.handle); ke.set_window(xembed.handle);
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Forwarding native key event: " + ke); xembedLog.fine("Forwarding native key event: " + ke);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -504,7 +504,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -504,7 +504,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
postEvent(new InvocationEvent(target, new Runnable() { postEvent(new InvocationEvent(target, new Runnable() {
public void run() { public void run() {
GrabbedKey grab = new GrabbedKey(keysym, modifiers); GrabbedKey grab = new GrabbedKey(keysym, modifiers);
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Grabbing key: " + grab); xembedLog.fine("Grabbing key: " + grab);
} }
synchronized(GRAB_LOCK) { synchronized(GRAB_LOCK) {
...@@ -518,7 +518,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -518,7 +518,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
postEvent(new InvocationEvent(target, new Runnable() { postEvent(new InvocationEvent(target, new Runnable() {
public void run() { public void run() {
GrabbedKey grab = new GrabbedKey(keysym, modifiers); GrabbedKey grab = new GrabbedKey(keysym, modifiers);
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("UnGrabbing key: " + grab); xembedLog.fine("UnGrabbing key: " + grab);
} }
synchronized(GRAB_LOCK) { synchronized(GRAB_LOCK) {
...@@ -533,7 +533,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -533,7 +533,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
public void run() { public void run() {
AWTKeyStroke stroke = xembed.getKeyStrokeForKeySym(keysym, modifiers); AWTKeyStroke stroke = xembed.getKeyStrokeForKeySym(keysym, modifiers);
if (stroke != null) { if (stroke != null) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke); xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
} }
synchronized(ACCEL_LOCK) { synchronized(ACCEL_LOCK) {
...@@ -553,7 +553,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -553,7 +553,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
synchronized(ACCEL_LOCK) { synchronized(ACCEL_LOCK) {
stroke = accelerators.get(accel_id); stroke = accelerators.get(accel_id);
if (stroke != null) { if (stroke != null) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Unregistering accelerator: " + accel_id); xembedLog.fine("Unregistering accelerator: " + accel_id);
} }
accelerators.remove(accel_id); accelerators.remove(accel_id);
...@@ -601,7 +601,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -601,7 +601,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
boolean result = false; boolean result = false;
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Post-processing event " + e); xembedLog.finer("Post-processing event " + e);
} }
...@@ -616,7 +616,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -616,7 +616,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
} }
if (exists) { if (exists) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Activating accelerator " + accel_id); xembedLog.fine("Activating accelerator " + accel_id);
} }
xembed.sendMessage(xembed.handle, XEMBED_ACTIVATE_ACCELERATOR, accel_id, 0, 0); // FIXME: How about overloaded? xembed.sendMessage(xembed.handle, XEMBED_ACTIVATE_ACCELERATOR, accel_id, 0, 0); // FIXME: How about overloaded?
...@@ -630,7 +630,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -630,7 +630,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
exists = grabbed_keys.contains(key); exists = grabbed_keys.contains(key);
} }
if (exists) { if (exists) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Forwarding grabbed key " + e); xembedLog.fine("Forwarding grabbed key " + e);
} }
forwardKeyEvent(e); forwardKeyEvent(e);
...@@ -651,11 +651,11 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -651,11 +651,11 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
public void handleClientMessage(XEvent xev) { public void handleClientMessage(XEvent xev) {
super.handleClientMessage(xev); super.handleClientMessage(xev);
XClientMessageEvent msg = xev.get_xclient(); XClientMessageEvent msg = xev.get_xclient();
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Client message to embedder: " + msg); xembedLog.finer("Client message to embedder: " + msg);
} }
if (msg.get_message_type() == xembed.XEmbed.getAtom()) { if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine(xembed.XEmbedMessageToString(msg)); xembedLog.fine(xembed.XEmbedMessageToString(msg));
} }
} }
...@@ -723,7 +723,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -723,7 +723,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
public boolean processXEmbedDnDEvent(long ctxt, int eventID) { public boolean processXEmbedDnDEvent(long ctxt, int eventID) {
if (xembedLog.isLoggable(PlatformLogger.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
xembedLog.finest(" Drop target=" + target.getDropTarget()); xembedLog.finest(" Drop target=" + target.getDropTarget());
} }
if (target.getDropTarget() instanceof XEmbedDropTarget) { if (target.getDropTarget() instanceof XEmbedDropTarget) {
...@@ -758,7 +758,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -758,7 +758,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
boolean new_mapped = (flags & XEMBED_MAPPED) != 0; boolean new_mapped = (flags & XEMBED_MAPPED) != 0;
boolean currently_mapped = XlibUtil.getWindowMapState(handle) != XConstants.IsUnmapped; boolean currently_mapped = XlibUtil.getWindowMapState(handle) != XConstants.IsUnmapped;
if (new_mapped != currently_mapped) { if (new_mapped != currently_mapped) {
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped); xembedLog.finer("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped);
} }
if (new_mapped) { if (new_mapped) {
...@@ -777,7 +777,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -777,7 +777,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
} }
} else { } else {
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Mapping state didn't change, mapped: " + currently_mapped); xembedLog.finer("Mapping state didn't change, mapped: " + currently_mapped);
} }
} }
...@@ -790,7 +790,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -790,7 +790,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
public void handlePropertyNotify(XEvent xev) { public void handlePropertyNotify(XEvent xev) {
if (isXEmbedActive()) { if (isXEmbedActive()) {
XPropertyEvent ev = xev.get_xproperty(); XPropertyEvent ev = xev.get_xproperty();
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Property change on client: " + ev); xembedLog.finer("Property change on client: " + ev);
} }
if (ev.get_atom() == XAtom.XA_WM_NORMAL_HINTS) { if (ev.get_atom() == XAtom.XA_WM_NORMAL_HINTS) {
...@@ -813,7 +813,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -813,7 +813,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
void handleConfigureNotify(XEvent xev) { void handleConfigureNotify(XEvent xev) {
if (isXEmbedActive()) { if (isXEmbedActive()) {
XConfigureEvent ev = xev.get_xconfigure(); XConfigureEvent ev = xev.get_xconfigure();
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Bounds change on client: " + ev); xembedLog.finer("Bounds change on client: " + ev);
} }
if (xev.get_xany().get_window() == handle) { if (xev.get_xany().get_window() == handle) {
...@@ -866,7 +866,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -866,7 +866,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
// We recognize only these masks // We recognize only these masks
modifiers = ke.get_state() & (XConstants.ShiftMask | XConstants.ControlMask | XConstants.LockMask); modifiers = ke.get_state() & (XConstants.ShiftMask | XConstants.ControlMask | XConstants.LockMask);
if (xembedLog.isLoggable(PlatformLogger.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINEST)) {
xembedLog.finest("Mapped " + e + " to " + this); xembedLog.finest("Mapped " + e + " to " + this);
} }
} finally { } finally {
......
...@@ -53,7 +53,7 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher ...@@ -53,7 +53,7 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher
} }
void setClient(XEmbeddedFramePeer client) { void setClient(XEmbeddedFramePeer client) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("XEmbed client: " + client); xembedLog.fine("XEmbed client: " + client);
} }
if (embedded != null) { if (embedded != null) {
...@@ -67,7 +67,7 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher ...@@ -67,7 +67,7 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher
} }
void install() { void install() {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Installing xembedder on " + embedded); xembedLog.fine("Installing xembedder on " + embedded);
} }
long[] info = new long[] { XEMBED_VERSION, XEMBED_MAPPED }; long[] info = new long[] { XEMBED_VERSION, XEMBED_MAPPED };
...@@ -95,11 +95,11 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher ...@@ -95,11 +95,11 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher
void handleClientMessage(XEvent xev) { void handleClientMessage(XEvent xev) {
XClientMessageEvent msg = xev.get_xclient(); XClientMessageEvent msg = xev.get_xclient();
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine(msg.toString()); xembedLog.fine(msg.toString());
} }
if (msg.get_message_type() == XEmbed.getAtom()) { if (msg.get_message_type() == XEmbed.getAtom()) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1))); xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
} }
switch ((int)msg.get_data(1)) { switch ((int)msg.get_data(1)) {
......
...@@ -82,13 +82,13 @@ public class XEmbedHelper { ...@@ -82,13 +82,13 @@ public class XEmbedHelper {
XEmbedHelper() { XEmbedHelper() {
if (XEmbed == null) { if (XEmbed == null) {
XEmbed = XAtom.get("_XEMBED"); XEmbed = XAtom.get("_XEMBED");
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Created atom " + XEmbed.toString()); xembedLog.finer("Created atom " + XEmbed.toString());
} }
} }
if (XEmbedInfo == null) { if (XEmbedInfo == null) {
XEmbedInfo = XAtom.get("_XEMBED_INFO"); XEmbedInfo = XAtom.get("_XEMBED_INFO");
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Created atom " + XEmbedInfo.toString()); xembedLog.finer("Created atom " + XEmbedInfo.toString());
} }
} }
...@@ -110,7 +110,7 @@ public class XEmbedHelper { ...@@ -110,7 +110,7 @@ public class XEmbedHelper {
msg.set_data(4, data2); msg.set_data(4, data2);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Sending " + XEmbedMessageToString(msg)); xembedLog.fine("Sending " + XEmbedMessageToString(msg));
} }
XlibWrapper.XSendEvent(XToolkit.getDisplay(), window, false, XConstants.NoEventMask, msg.pData); XlibWrapper.XSendEvent(XToolkit.getDisplay(), window, false, XConstants.NoEventMask, msg.pData);
......
...@@ -81,7 +81,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -81,7 +81,7 @@ public class XEmbedServerTester implements XEventDispatcher {
throw new RuntimeException("Can't create robot"); throw new RuntimeException("Can't create robot");
} }
initAccel(); initAccel();
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("XEmbed client(tester), embedder window: " + Long.toHexString(parent)); xembedLog.finer("XEmbed client(tester), embedder window: " + Long.toHexString(parent));
} }
} }
...@@ -91,7 +91,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -91,7 +91,7 @@ public class XEmbedServerTester implements XEventDispatcher {
} }
private void dumpReceivedEvents() { private void dumpReceivedEvents() {
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Events received so far:"); xembedLog.finer("Events received so far:");
int pos = 0; int pos = 0;
for (Integer event : events) { for (Integer event : events) {
...@@ -395,7 +395,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -395,7 +395,7 @@ public class XEmbedServerTester implements XEventDispatcher {
SubstructureNotifyMask | KeyPressMask)}); SubstructureNotifyMask | KeyPressMask)});
window = new XBaseWindow(params); window = new XBaseWindow(params);
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Created tester window: " + window); xembedLog.finer("Created tester window: " + window);
} }
...@@ -535,7 +535,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -535,7 +535,7 @@ public class XEmbedServerTester implements XEventDispatcher {
synchronized(EVENT_LOCK) { synchronized(EVENT_LOCK) {
// Check for already received events after the request // Check for already received events after the request
if (checkEventList(position, event) != -1) { if (checkEventList(position, event) != -1) {
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("The event " + XEmbedHelper.msgidToString(event) + " has already been received"); xembedLog.finer("The event " + XEmbedHelper.msgidToString(event) + " has already been received");
} }
return; return;
...@@ -543,14 +543,14 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -543,14 +543,14 @@ public class XEmbedServerTester implements XEventDispatcher {
if (eventReceived == event) { if (eventReceived == event) {
// Already received // Already received
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Already received " + XEmbedHelper.msgidToString(event)); xembedLog.finer("Already received " + XEmbedHelper.msgidToString(event));
} }
return; return;
} }
eventReceived = -1; eventReceived = -1;
eventWaited = event; eventWaited = event;
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Waiting for " + XEmbedHelper.msgidToString(event) + " starting from " + position); xembedLog.finer("Waiting for " + XEmbedHelper.msgidToString(event) + " starting from " + position);
} }
try { try {
...@@ -563,7 +563,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -563,7 +563,7 @@ public class XEmbedServerTester implements XEventDispatcher {
dumpReceivedEvents(); dumpReceivedEvents();
throw new RuntimeException("Didn't receive event " + XEmbedHelper.msgidToString(event) + " but recevied " + XEmbedHelper.msgidToString(eventReceived)); throw new RuntimeException("Didn't receive event " + XEmbedHelper.msgidToString(event) + " but recevied " + XEmbedHelper.msgidToString(eventReceived));
} else { } else {
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Successfully recevied " + XEmbedHelper.msgidToString(event)); xembedLog.finer("Successfully recevied " + XEmbedHelper.msgidToString(event));
} }
} }
...@@ -648,7 +648,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -648,7 +648,7 @@ public class XEmbedServerTester implements XEventDispatcher {
if (ev.get_type() == ClientMessage) { if (ev.get_type() == ClientMessage) {
XClientMessageEvent msg = ev.get_xclient(); XClientMessageEvent msg = ev.get_xclient();
if (msg.get_message_type() == xembed.XEmbed.getAtom()) { if (msg.get_message_type() == xembed.XEmbed.getAtom()) {
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1))); xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
} }
switch ((int)msg.get_data(1)) { switch ((int)msg.get_data(1)) {
...@@ -675,12 +675,12 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -675,12 +675,12 @@ public class XEmbedServerTester implements XEventDispatcher {
synchronized(EVENT_LOCK) { synchronized(EVENT_LOCK) {
events.add((int)msg.get_data(1)); events.add((int)msg.get_data(1));
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Tester is waiting for " + XEmbedHelper.msgidToString(eventWaited)); xembedLog.finer("Tester is waiting for " + XEmbedHelper.msgidToString(eventWaited));
} }
if ((int)msg.get_data(1) == eventWaited) { if ((int)msg.get_data(1) == eventWaited) {
eventReceived = (int)msg.get_data(1); eventReceived = (int)msg.get_data(1);
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Notifying waiting object for event " + System.identityHashCode(EVENT_LOCK)); xembedLog.finer("Notifying waiting object for event " + System.identityHashCode(EVENT_LOCK));
} }
EVENT_LOCK.notifyAll(); EVENT_LOCK.notifyAll();
...@@ -692,12 +692,12 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -692,12 +692,12 @@ public class XEmbedServerTester implements XEventDispatcher {
int eventID = (int)ev.get_type() | SYSTEM_EVENT_MASK; int eventID = (int)ev.get_type() | SYSTEM_EVENT_MASK;
events.add(eventID); events.add(eventID);
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Tester is waiting for " + XEmbedHelper.msgidToString(eventWaited) + ", but we received " + ev + "(" + XEmbedHelper.msgidToString(eventID) + ")"); xembedLog.finer("Tester is waiting for " + XEmbedHelper.msgidToString(eventWaited) + ", but we received " + ev + "(" + XEmbedHelper.msgidToString(eventID) + ")");
} }
if (eventID == eventWaited) { if (eventID == eventWaited) {
eventReceived = eventID; eventReceived = eventID;
if (xembedLog.isLoggable(PlatformLogger.FINER)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINER)) {
xembedLog.finer("Notifying waiting object" + System.identityHashCode(EVENT_LOCK)); xembedLog.finer("Notifying waiting object" + System.identityHashCode(EVENT_LOCK));
} }
EVENT_LOCK.notifyAll(); EVENT_LOCK.notifyAll();
......
...@@ -139,7 +139,7 @@ public class XEmbeddedFramePeer extends XFramePeer { ...@@ -139,7 +139,7 @@ public class XEmbeddedFramePeer extends XFramePeer {
{ {
assert (SunToolkit.isAWTLockHeldByCurrentThread()); assert (SunToolkit.isAWTLockHeldByCurrentThread());
XConfigureEvent xe = xev.get_xconfigure(); XConfigureEvent xe = xev.get_xconfigure();
if (xembedLog.isLoggable(PlatformLogger.FINE)) { if (xembedLog.isLoggable(PlatformLogger.Level.FINE)) {
xembedLog.fine(xe.toString()); xembedLog.fine(xe.toString());
} }
......
...@@ -119,7 +119,7 @@ public final class XErrorHandlerUtil { ...@@ -119,7 +119,7 @@ public final class XErrorHandlerUtil {
// Default XErrorHandler may just terminate the process. Don't call it. // Default XErrorHandler may just terminate the process. Don't call it.
// return XlibWrapper.CallErrorHandler(saved_error_handler, display, error.pData); // return XlibWrapper.CallErrorHandler(saved_error_handler, display, error.pData);
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Unhandled XErrorEvent: " + log.fine("Unhandled XErrorEvent: " +
"id=" + error.get_resourceid() + ", " + "id=" + error.get_resourceid() + ", " +
"serial=" + error.get_serial() + ", " + "serial=" + error.get_serial() + ", " +
......
...@@ -720,7 +720,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe ...@@ -720,7 +720,7 @@ class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListe
} }
File fe = new File(dir).getAbsoluteFile(); File fe = new File(dir).getAbsoluteFile();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Current directory : " + fe); log.fine("Current directory : " + fe);
} }
......
...@@ -75,7 +75,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -75,7 +75,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
winAttr.isResizable = true; // target.isResizable(); winAttr.isResizable = true; // target.isResizable();
winAttr.title = target.getTitle(); winAttr.title = target.getTitle();
winAttr.initialResizability = target.isResizable(); winAttr.initialResizability = target.isResizable();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Frame''s initial attributes: decor {0}, resizable {1}, undecorated {2}, initial state {3}", log.fine("Frame''s initial attributes: decor {0}, resizable {1}, undecorated {2}, initial state {3}",
Integer.valueOf(winAttr.decorations), Boolean.valueOf(winAttr.initialResizability), Integer.valueOf(winAttr.decorations), Boolean.valueOf(winAttr.initialResizability),
Boolean.valueOf(!winAttr.nativeDecor), Integer.valueOf(winAttr.initialState)); Boolean.valueOf(!winAttr.nativeDecor), Integer.valueOf(winAttr.initialState));
...@@ -209,7 +209,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -209,7 +209,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
} }
public void setMaximizedBounds(Rectangle b) { public void setMaximizedBounds(Rectangle b) {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting maximized bounds to " + b); insLog.fine("Setting maximized bounds to " + b);
} }
if (b == null) return; if (b == null) return;
...@@ -228,7 +228,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -228,7 +228,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
} else { } else {
hints.set_max_height((int)XlibWrapper.DisplayHeight(XToolkit.getDisplay(), XlibWrapper.DefaultScreen(XToolkit.getDisplay()))); hints.set_max_height((int)XlibWrapper.DisplayHeight(XToolkit.getDisplay(), XlibWrapper.DefaultScreen(XToolkit.getDisplay())));
} }
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags())); insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
} }
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData); XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData);
...@@ -258,18 +258,18 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -258,18 +258,18 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
int changed = state ^ newState; int changed = state ^ newState;
int changeIconic = changed & Frame.ICONIFIED; int changeIconic = changed & Frame.ICONIFIED;
boolean iconic = (newState & Frame.ICONIFIED) != 0; boolean iconic = (newState & Frame.ICONIFIED) != 0;
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("Changing state, old state {0}, new state {1}(iconic {2})", stateLog.finer("Changing state, old state {0}, new state {1}(iconic {2})",
Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic)); Integer.valueOf(state), Integer.valueOf(newState), Boolean.valueOf(iconic));
} }
if (changeIconic != 0 && iconic) { if (changeIconic != 0 && iconic) {
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber()); stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber());
} }
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
int res = XlibWrapper.XIconifyWindow(XToolkit.getDisplay(), getShell(), getScreenNumber()); int res = XlibWrapper.XIconifyWindow(XToolkit.getDisplay(), getShell(), getScreenNumber());
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("XIconifyWindow returned " + res); stateLog.finer("XIconifyWindow returned " + res);
} }
} }
...@@ -281,7 +281,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -281,7 +281,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
setExtendedState(newState); setExtendedState(newState);
} }
if (changeIconic != 0 && !iconic) { if (changeIconic != 0 && !iconic) {
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("DeIconifying " + this); stateLog.finer("DeIconifying " + this);
} }
xSetVisible(true); xSetVisible(true);
...@@ -296,7 +296,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -296,7 +296,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
super.handlePropertyNotify(xev); super.handlePropertyNotify(xev);
XPropertyEvent ev = xev.get_xproperty(); XPropertyEvent ev = xev.get_xproperty();
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Property change {0}", ev); log.finer("Property change {0}", ev);
} }
/* /*
...@@ -311,7 +311,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -311,7 +311,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
final int newState = XWM.getWM().getState(this); final int newState = XWM.getWM().getState(this);
int changed = state ^ newState; int changed = state ^ newState;
if (changed == 0) { if (changed == 0) {
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("State is the same: " + state); stateLog.finer("State is the same: " + state);
} }
return; return;
...@@ -365,7 +365,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -365,7 +365,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
XWMHints hints = getWMHints(); XWMHints hints = getWMHints();
hints.set_flags((int)XUtilConstants.StateHint | hints.get_flags()); hints.set_flags((int)XUtilConstants.StateHint | hints.get_flags());
hints.set_initial_state(wm_state); hints.set_initial_state(wm_state);
if (stateLog.isLoggable(PlatformLogger.FINE)) { if (stateLog.isLoggable(PlatformLogger.Level.FINE)) {
stateLog.fine("Setting initial WM state on " + this + " to " + wm_state); stateLog.fine("Setting initial WM state on " + this + " to " + wm_state);
} }
XlibWrapper.XSetWMHints(XToolkit.getDisplay(), getWindow(), hints.pData); XlibWrapper.XSetWMHints(XToolkit.getDisplay(), getWindow(), hints.pData);
......
...@@ -62,7 +62,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -62,7 +62,7 @@ public class XIconWindow extends XBaseWindow {
final long screen = adata.get_awt_visInfo().get_screen(); final long screen = adata.get_awt_visInfo().get_screen();
final long display = XToolkit.getDisplay(); final long display = XToolkit.getDisplay();
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest(adata.toString()); log.finest(adata.toString());
} }
...@@ -74,13 +74,13 @@ public class XIconWindow extends XBaseWindow { ...@@ -74,13 +74,13 @@ public class XIconWindow extends XBaseWindow {
} }
int count = Native.getInt(XlibWrapper.iarg1); int count = Native.getInt(XlibWrapper.iarg1);
long sizes_ptr = Native.getLong(XlibWrapper.larg1); // XIconSize* long sizes_ptr = Native.getLong(XlibWrapper.larg1); // XIconSize*
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("count = {1}, sizes_ptr = {0}", Long.valueOf(sizes_ptr), Integer.valueOf(count)); log.finest("count = {1}, sizes_ptr = {0}", Long.valueOf(sizes_ptr), Integer.valueOf(count));
} }
XIconSize[] res = new XIconSize[count]; XIconSize[] res = new XIconSize[count];
for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) { for (int i = 0; i < count; i++, sizes_ptr += XIconSize.getSize()) {
res[i] = new XIconSize(sizes_ptr); res[i] = new XIconSize(sizes_ptr);
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i)); log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i));
} }
} }
...@@ -99,7 +99,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -99,7 +99,7 @@ public class XIconWindow extends XBaseWindow {
} }
XIconSize[] sizeList = getIconSizes(); XIconSize[] sizeList = getIconSizes();
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Icon sizes: {0}", (Object[]) sizeList); log.finest("Icon sizes: {0}", (Object[]) sizeList);
} }
if (sizeList == null) { if (sizeList == null) {
...@@ -148,11 +148,11 @@ public class XIconWindow extends XBaseWindow { ...@@ -148,11 +148,11 @@ public class XIconWindow extends XBaseWindow {
} }
} }
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("found=" + found); log.finest("found=" + found);
} }
if (!found) { if (!found) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("widthHint=" + widthHint + ", heightHint=" + heightHint log.finest("widthHint=" + widthHint + ", heightHint=" + heightHint
+ ", saveWidth=" + saveWidth + ", saveHeight=" + saveHeight + ", saveWidth=" + saveWidth + ", saveHeight=" + saveHeight
+ ", max_width=" + sizeList[0].get_max_width() + ", max_width=" + sizeList[0].get_max_width()
...@@ -168,7 +168,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -168,7 +168,7 @@ public class XIconWindow extends XBaseWindow {
/* determine which way to scale */ /* determine which way to scale */
int wdiff = widthHint - sizeList[0].get_max_width(); int wdiff = widthHint - sizeList[0].get_max_width();
int hdiff = heightHint - sizeList[0].get_max_height(); int hdiff = heightHint - sizeList[0].get_max_height();
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("wdiff=" + wdiff + ", hdiff=" + hdiff); log.finest("wdiff=" + wdiff + ", hdiff=" + hdiff);
} }
if (wdiff >= hdiff) { /* need to scale width more */ if (wdiff >= hdiff) { /* need to scale width more */
...@@ -200,7 +200,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -200,7 +200,7 @@ public class XIconWindow extends XBaseWindow {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("return " + saveWidth + "x" + saveHeight); log.finest("return " + saveWidth + "x" + saveHeight);
} }
return new Dimension(saveWidth, saveHeight); return new Dimension(saveWidth, saveHeight);
...@@ -427,7 +427,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -427,7 +427,7 @@ public class XIconWindow extends XBaseWindow {
} }
} }
if (min != null) { if (min != null) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null)); log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
} }
setIconImage(min); setIconImage(min);
...@@ -455,7 +455,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -455,7 +455,7 @@ public class XIconWindow extends XBaseWindow {
} }
Dimension iconSize = getIconSize(width, height); Dimension iconSize = getIconSize(width, height);
if (iconSize != null) { if (iconSize != null) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Icon size: {0}", iconSize); log.finest("Icon size: {0}", iconSize);
} }
iconWidth = iconSize.width; iconWidth = iconSize.width;
......
...@@ -102,7 +102,7 @@ public class XInputMethod extends X11InputMethod { ...@@ -102,7 +102,7 @@ public class XInputMethod extends X11InputMethod {
protected ComponentPeer getPeer(Component client) { protected ComponentPeer getPeer(Component client) {
XComponentPeer peer; XComponentPeer peer;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Client is " + client); log.fine("Client is " + client);
} }
peer = (XComponentPeer)XToolkit.targetToPeer(client); peer = (XComponentPeer)XToolkit.targetToPeer(client);
...@@ -110,7 +110,7 @@ public class XInputMethod extends X11InputMethod { ...@@ -110,7 +110,7 @@ public class XInputMethod extends X11InputMethod {
client = getParent(client); client = getParent(client);
peer = (XComponentPeer)XToolkit.targetToPeer(client); peer = (XComponentPeer)XToolkit.targetToPeer(client);
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Peer is {0}, client is {1}", peer, client); log.fine("Peer is {0}, client is {1}", peer, client);
} }
......
...@@ -60,7 +60,7 @@ public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl { ...@@ -60,7 +60,7 @@ public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
@Override @Override
public void setCurrentFocusedWindow(Window win) { public void setCurrentFocusedWindow(Window win) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Setting current focused window " + win); focusLog.finer("Setting current focused window " + win);
} }
......
...@@ -575,12 +575,12 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -575,12 +575,12 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
void mousePressed(MouseEvent mouseEvent) { void mousePressed(MouseEvent mouseEvent) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis); log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis);
} }
if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) { if (isEnabled() && mouseEvent.getButton() == MouseEvent.BUTTON1) {
if (inWindow(mouseEvent.getX(), mouseEvent.getY())) { if (inWindow(mouseEvent.getX(), mouseEvent.getY())) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Mouse press in items area"); log.fine("Mouse press in items area");
} }
active = WINDOW; active = WINDOW;
...@@ -619,7 +619,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -619,7 +619,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
currentIndex = -1; currentIndex = -1;
} }
} else if (inVerticalScrollbar(mouseEvent.getX(), mouseEvent.getY())) { } else if (inVerticalScrollbar(mouseEvent.getX(), mouseEvent.getY())) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Mouse press in vertical scrollbar"); log.fine("Mouse press in vertical scrollbar");
} }
active = VERSCROLLBAR; active = VERSCROLLBAR;
...@@ -628,7 +628,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -628,7 +628,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
mouseEvent.getX() - (width - SCROLLBAR_WIDTH), mouseEvent.getX() - (width - SCROLLBAR_WIDTH),
mouseEvent.getY()); mouseEvent.getY());
} else if (inHorizontalScrollbar(mouseEvent.getX(), mouseEvent.getY())) { } else if (inHorizontalScrollbar(mouseEvent.getX(), mouseEvent.getY())) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Mouse press in horizontal scrollbar"); log.fine("Mouse press in horizontal scrollbar");
} }
active = HORSCROLLBAR; active = HORSCROLLBAR;
...@@ -813,7 +813,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -813,7 +813,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
void keyPressed(KeyEvent e) { void keyPressed(KeyEvent e) {
int keyCode = e.getKeyCode(); int keyCode = e.getKeyCode();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(e.toString()); log.fine(e.toString());
} }
switch(keyCode) { switch(keyCode) {
...@@ -1000,7 +1000,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1000,7 +1000,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
*/ */
public void notifyValue(XScrollbar obj, int type, int v, boolean isAdjusting) { public void notifyValue(XScrollbar obj, int type, int v, boolean isAdjusting) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Notify value changed on " + obj + " to " + v); log.fine("Notify value changed on " + obj + " to " + v);
} }
int value = obj.getValue(); int value = obj.getValue();
...@@ -1085,7 +1085,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1085,7 +1085,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
} }
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Adding item '" + item + "' to " + addedIndex); log.finer("Adding item '" + item + "' to " + addedIndex);
} }
...@@ -1105,7 +1105,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1105,7 +1105,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
| ((vsb.needsRepaint())?(PAINT_VSCROLL):0); | ((vsb.needsRepaint())?(PAINT_VSCROLL):0);
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Last visible: " + getLastVisibleItem() + log.finest("Last visible: " + getLastVisibleItem() +
", hsb changed : " + (hsbWasVis ^ hsbVis) + ", items changed " + repaintItems); ", hsb changed : " + (hsbWasVis ^ hsbVis) + ", items changed " + repaintItems);
} }
...@@ -1123,11 +1123,11 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1123,11 +1123,11 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
boolean vsbWasVisible = vsbVis; boolean vsbWasVisible = vsbVis;
int oldLastDisplayed = lastItemDisplayed(); int oldLastDisplayed = lastItemDisplayed();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Deleting from " + s + " to " + e); log.fine("Deleting from " + s + " to " + e);
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() + log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() +
", size " + items.size()); ", size " + items.size());
} }
...@@ -1197,7 +1197,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1197,7 +1197,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
options |= PAINT_FOCUS; options |= PAINT_FOCUS;
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Multiple selections: " + multipleSelections); log.finest("Multiple selections: " + multipleSelections);
} }
...@@ -1452,7 +1452,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1452,7 +1452,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
* y is the number of items to scroll * y is the number of items to scroll
*/ */
void scrollVertical(int y) { void scrollVertical(int y) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Scrolling vertically by " + y); log.fine("Scrolling vertically by " + y);
} }
int itemsInWin = itemsInWindow(); int itemsInWin = itemsInWindow();
...@@ -1494,7 +1494,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1494,7 +1494,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
* x is the number of pixels to scroll * x is the number of pixels to scroll
*/ */
void scrollHorizontal(int x) { void scrollHorizontal(int x) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Scrolling horizontally by " + y); log.fine("Scrolling horizontally by " + y);
} }
int w = getListWidth(); int w = getListWidth();
...@@ -1732,7 +1732,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1732,7 +1732,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
if (localBuffer == null) { if (localBuffer == null) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Creating buffer " + width + "x" + height); log.fine("Creating buffer " + width + "x" + height);
} }
// use GraphicsConfig.cCVI() instead of Component.cVI(), // use GraphicsConfig.cCVI() instead of Component.cVI(),
...@@ -1771,7 +1771,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1771,7 +1771,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
private void paint(Graphics listG, int firstItem, int lastItem, int options, private void paint(Graphics listG, int firstItem, int lastItem, int options,
Rectangle source, Point distance) { Rectangle source, Point distance) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options); log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options);
} }
if (firstItem > lastItem) { if (firstItem > lastItem) {
...@@ -1862,7 +1862,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1862,7 +1862,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
private void paintItems(Graphics g, int firstItem, int lastItem, int options) { private void paintItems(Graphics g, int firstItem, int lastItem, int options) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem()); log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem());
} }
...@@ -1875,7 +1875,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1875,7 +1875,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
firstItem = Math.max(getFirstVisibleItem(), firstItem); firstItem = Math.max(getFirstVisibleItem(), firstItem);
lastItem = Math.min(lastItem, items.size()-1); lastItem = Math.min(lastItem, items.size()-1);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Actually painting items from " + firstItem + " to " + lastItem + log.finer("Actually painting items from " + firstItem + " to " + lastItem +
", items in window " + itemsInWindow()); ", items in window " + itemsInWindow());
} }
...@@ -1885,7 +1885,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1885,7 +1885,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
private void paintItem(Graphics g, int index) { private void paintItem(Graphics g, int index) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Painting item " + index); log.finest("Painting item " + index);
} }
// 4895367 - only paint items which are visible // 4895367 - only paint items which are visible
...@@ -1895,7 +1895,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1895,7 +1895,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
int h = getItemHeight(); int h = getItemHeight();
int y = getItemY(index); int y = getItemY(index);
int x = getItemX(); int x = getItemX();
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2))); log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2)));
} }
g.setClip(x, y, w - (SPACE*2), h-(SPACE*2)); g.setClip(x, y, w - (SPACE*2), h-(SPACE*2));
...@@ -1903,14 +1903,14 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1903,14 +1903,14 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
// Always paint the background so that focus is unpainted in // Always paint the background so that focus is unpainted in
// multiselect mode // multiselect mode
if (isSelected(index)) { if (isSelected(index)) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Painted item is selected"); log.finest("Painted item is selected");
} }
g.setColor(getListForeground()); g.setColor(getListForeground());
} else { } else {
g.setColor(getListBackground()); g.setColor(getListBackground());
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Filling " + new Rectangle(x, y, w, h)); log.finest("Filling " + new Rectangle(x, y, w, h));
} }
g.fillRect(x, y, w, h); g.fillRect(x, y, w, h);
...@@ -1936,7 +1936,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1936,7 +1936,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
void paintScrollBar(XScrollbar scr, Graphics g, int x, int y, int width, int height, boolean paintAll) { void paintScrollBar(XScrollbar scr, Graphics g, int x, int y, int width, int height, boolean paintAll) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Painting scrollbar " + scr + " width " + log.finest("Painting scrollbar " + scr + " width " +
width + " height " + height + ", paintAll " + paintAll); width + " height " + height + ", paintAll " + paintAll);
} }
...@@ -1976,19 +1976,19 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1976,19 +1976,19 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
if (paintFocus && !hasFocus()) { if (paintFocus && !hasFocus()) {
paintFocus = false; paintFocus = false;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " + log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " +
(isItemHidden(getFocusIndex())?("invisible"):("visible")) + ", paint focus is " + paintFocus); (isItemHidden(getFocusIndex())?("invisible"):("visible")) + ", paint focus is " + paintFocus);
} }
Shape clip = g.getClip(); Shape clip = g.getClip();
g.setClip(0, 0, listWidth, listHeight); g.setClip(0, 0, listWidth, listHeight);
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight)); log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight));
} }
Rectangle rect = getFocusRect(); Rectangle rect = getFocusRect();
if (prevFocusRect != null) { if (prevFocusRect != null) {
// Erase focus rect // Erase focus rect
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Erasing previous focus rect " + prevFocusRect); log.finest("Erasing previous focus rect " + prevFocusRect);
} }
g.setColor(getListBackground()); g.setColor(getListBackground());
...@@ -1997,7 +1997,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1997,7 +1997,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
if (paintFocus) { if (paintFocus) {
// Paint new // Paint new
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Painting focus rect " + rect); log.finest("Painting focus rect " + rect);
} }
g.setColor(getListForeground()); // Focus color is always black on Linux g.setColor(getListForeground()); // Focus color is always black on Linux
......
...@@ -128,7 +128,7 @@ public class XMSelection { ...@@ -128,7 +128,7 @@ public class XMSelection {
long display = XToolkit.getDisplay(); long display = XToolkit.getDisplay();
synchronized(this) { synchronized(this) {
setOwner(owner, screen); setOwner(owner, screen);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("New Selection Owner for screen " + screen + " = " + owner ); log.fine("New Selection Owner for screen " + screen + " = " + owner );
} }
XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | eventMask); XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | eventMask);
...@@ -150,14 +150,14 @@ public class XMSelection { ...@@ -150,14 +150,14 @@ public class XMSelection {
try { try {
try { try {
long display = XToolkit.getDisplay(); long display = XToolkit.getDisplay();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Grabbing XServer"); log.fine("Grabbing XServer");
} }
XlibWrapper.XGrabServer(display); XlibWrapper.XGrabServer(display);
synchronized(this) { synchronized(this) {
String selection_name = getName()+"_S"+screen; String selection_name = getName()+"_S"+screen;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Screen = " + screen + " selection name = " + selection_name); log.fine("Screen = " + screen + " selection name = " + selection_name);
} }
XAtom atom = XAtom.get(selection_name); XAtom atom = XAtom.get(selection_name);
...@@ -166,7 +166,7 @@ public class XMSelection { ...@@ -166,7 +166,7 @@ public class XMSelection {
long owner = XlibWrapper.XGetSelectionOwner(display, atom.getAtom()); long owner = XlibWrapper.XGetSelectionOwner(display, atom.getAtom());
if (owner != 0) { if (owner != 0) {
setOwner(owner, screen); setOwner(owner, screen);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Selection Owner for screen " + screen + " = " + owner ); log.fine("Selection Owner for screen " + screen + " = " + owner );
} }
XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | extra_mask); XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | extra_mask);
...@@ -183,7 +183,7 @@ public class XMSelection { ...@@ -183,7 +183,7 @@ public class XMSelection {
e.printStackTrace(); e.printStackTrace();
} }
finally { finally {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("UnGrabbing XServer"); log.fine("UnGrabbing XServer");
} }
XlibWrapper.XUngrabServer(XToolkit.getDisplay()); XlibWrapper.XUngrabServer(XToolkit.getDisplay());
...@@ -197,7 +197,7 @@ public class XMSelection { ...@@ -197,7 +197,7 @@ public class XMSelection {
static boolean processClientMessage(XEvent xev, int screen) { static boolean processClientMessage(XEvent xev, int screen) {
XClientMessageEvent xce = xev.get_xclient(); XClientMessageEvent xce = xev.get_xclient();
if (xce.get_message_type() == XA_MANAGER.getAtom()) { if (xce.get_message_type() == XA_MANAGER.getAtom()) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("client messags = " + xce); log.fine("client messags = " + xce);
} }
long timestamp = xce.get_data(0); long timestamp = xce.get_data(0);
...@@ -306,7 +306,7 @@ public class XMSelection { ...@@ -306,7 +306,7 @@ public class XMSelection {
synchronized void dispatchSelectionChanged( XPropertyEvent ev, int screen) { synchronized void dispatchSelectionChanged( XPropertyEvent ev, int screen) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Selection Changed : Screen = " + screen + "Event =" + ev); log.fine("Selection Changed : Screen = " + screen + "Event =" + ev);
} }
if (listeners != null) { if (listeners != null) {
...@@ -319,7 +319,7 @@ public class XMSelection { ...@@ -319,7 +319,7 @@ public class XMSelection {
} }
synchronized void dispatchOwnerDeath(XDestroyWindowEvent de, int screen) { synchronized void dispatchOwnerDeath(XDestroyWindowEvent de, int screen) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Owner dead : Screen = " + screen + "Event =" + de); log.fine("Owner dead : Screen = " + screen + "Event =" + de);
} }
if (listeners != null) { if (listeners != null) {
...@@ -333,7 +333,7 @@ public class XMSelection { ...@@ -333,7 +333,7 @@ public class XMSelection {
} }
void dispatchSelectionEvent(XEvent xev, int screen) { void dispatchSelectionEvent(XEvent xev, int screen) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Event =" + xev); log.fine("Event =" + xev);
} }
if (xev.get_type() == XConstants.DestroyNotify) { if (xev.get_type() == XConstants.DestroyNotify) {
......
...@@ -519,7 +519,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer { ...@@ -519,7 +519,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
*/ */
public void handleKeyPress(XEvent xev) { public void handleKeyPress(XEvent xev) {
XKeyEvent xkey = xev.get_xkey(); XKeyEvent xkey = xev.get_xkey();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(xkey.toString()); log.fine(xkey.toString());
} }
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
......
...@@ -111,7 +111,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -111,7 +111,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
* for adding separators * for adding separators
*/ */
public void addSeparator() { public void addSeparator() {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("addSeparator is not implemented"); log.finer("addSeparator is not implemented");
} }
} }
...@@ -121,7 +121,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -121,7 +121,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
if (menuWindow != null) { if (menuWindow != null) {
menuWindow.addItem(item); menuWindow.addItem(item);
} else { } else {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Attempt to use XMenuWindowPeer without window"); log.fine("Attempt to use XMenuWindowPeer without window");
} }
} }
...@@ -132,7 +132,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -132,7 +132,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
if (menuWindow != null) { if (menuWindow != null) {
menuWindow.delItem(index); menuWindow.delItem(index);
} else { } else {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Attempt to use XMenuWindowPeer without window"); log.fine("Attempt to use XMenuWindowPeer without window");
} }
} }
......
...@@ -399,7 +399,7 @@ public class XMenuWindow extends XBaseMenuWindow { ...@@ -399,7 +399,7 @@ public class XMenuWindow extends XBaseMenuWindow {
if (!isCreated()) { if (!isCreated()) {
return; return;
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("showing menu window + " + getWindow() + " at " + bounds); log.finer("showing menu window + " + getWindow() + " at " + bounds);
} }
XToolkit.awtLock(); XToolkit.awtLock();
......
...@@ -45,7 +45,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -45,7 +45,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
} }
public void setState(XWindowPeer window, int state) { public void setState(XWindowPeer window, int state) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting state of " + window + " to " + state); log.fine("Setting state of " + window + " to " + state);
} }
if (window.isShowing()) { if (window.isShowing()) {
...@@ -57,7 +57,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -57,7 +57,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
private void setInitialState(XWindowPeer window, int state) { private void setInitialState(XWindowPeer window, int state) {
XAtomList old_state = window.getNETWMState(); XAtomList old_state = window.getNETWMState();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Current state of the window {0} is {1}", window, old_state); log.fine("Current state of the window {0} is {1}", window, old_state);
} }
if ((state & Frame.MAXIMIZED_VERT) != 0) { if ((state & Frame.MAXIMIZED_VERT) != 0) {
...@@ -70,7 +70,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -70,7 +70,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
} else { } else {
old_state.remove(XA_NET_WM_STATE_MAXIMIZED_HORZ); old_state.remove(XA_NET_WM_STATE_MAXIMIZED_HORZ);
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting initial state of the window {0} to {1}", window, old_state); log.fine("Setting initial state of the window {0} to {1}", window, old_state);
} }
window.setNETWMState(old_state); window.setNETWMState(old_state);
...@@ -105,7 +105,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -105,7 +105,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
default: default:
return; return;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Requesting state on " + window + " for " + state); log.fine("Requesting state on " + window + " for " + state);
} }
req.set_type((int)XConstants.ClientMessage); req.set_type((int)XConstants.ClientMessage);
...@@ -189,7 +189,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -189,7 +189,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
req.set_data(1, state.getAtom()); req.set_data(1, state.getAtom());
// Fix for 6735584: req.data[2] must be set to 0 when only one property is changed // Fix for 6735584: req.data[2] must be set to 0 when only one property is changed
req.set_data(2, 0); req.set_data(2, 0);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting _NET_STATE atom {0} on {1} for {2}", state, window, Boolean.valueOf(isAdd)); log.fine("Setting _NET_STATE atom {0} on {1} for {2}", state, window, Boolean.valueOf(isAdd));
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -216,7 +216,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -216,7 +216,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
* @param reset Indicates operation, 'set' if false, 'reset' if true * @param reset Indicates operation, 'set' if false, 'reset' if true
*/ */
private void setStateHelper(XWindowPeer window, XAtom state, boolean set) { private void setStateHelper(XWindowPeer window, XAtom state, boolean set) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Window visibility is: withdrawn={0}, visible={1}, mapped={2} showing={3}", log.finer("Window visibility is: withdrawn={0}, visible={1}, mapped={2} showing={3}",
Boolean.valueOf(window.isWithdrawn()), Boolean.valueOf(window.isVisible()), Boolean.valueOf(window.isWithdrawn()), Boolean.valueOf(window.isVisible()),
Boolean.valueOf(window.isMapped()), Boolean.valueOf(window.isShowing())); Boolean.valueOf(window.isMapped()), Boolean.valueOf(window.isShowing()));
...@@ -225,7 +225,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -225,7 +225,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
requestState(window, state, set); requestState(window, state, set);
} else { } else {
XAtomList net_wm_state = window.getNETWMState(); XAtomList net_wm_state = window.getNETWMState();
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Current state on {0} is {1}", window, net_wm_state); log.finer("Current state on {0} is {1}", window, net_wm_state);
} }
if (!set) { if (!set) {
...@@ -233,7 +233,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -233,7 +233,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
} else { } else {
net_wm_state.add(state); net_wm_state.add(state);
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting states on {0} to {1}", window, net_wm_state); log.fine("Setting states on {0} to {1}", window, net_wm_state);
} }
window.setNETWMState(net_wm_state); window.setNETWMState(net_wm_state);
...@@ -292,7 +292,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -292,7 +292,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
} }
NetWindow = checkAnchor(XA_NET_SUPPORTING_WM_CHECK, XAtom.XA_WINDOW); NetWindow = checkAnchor(XA_NET_SUPPORTING_WM_CHECK, XAtom.XA_WINDOW);
supportChecked = true; supportChecked = true;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### " + this + " is active: " + (NetWindow != 0)); log.fine("### " + this + " is active: " + (NetWindow != 0));
} }
} }
...@@ -304,7 +304,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -304,7 +304,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
boolean doStateProtocol() { boolean doStateProtocol() {
boolean res = active() && checkProtocol(XA_NET_SUPPORTED, XA_NET_WM_STATE); boolean res = active() && checkProtocol(XA_NET_SUPPORTED, XA_NET_WM_STATE);
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("doStateProtocol() returns " + res); stateLog.finer("doStateProtocol() returns " + res);
} }
return res; return res;
...@@ -333,7 +333,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -333,7 +333,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
if (net_wm_name_string == null) { if (net_wm_name_string == null) {
return false; return false;
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### WM_NAME = " + net_wm_name_string); log.fine("### WM_NAME = " + net_wm_name_string);
} }
return net_wm_name_string.startsWith(name); return net_wm_name_string.startsWith(name);
......
...@@ -123,7 +123,7 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer { ...@@ -123,7 +123,7 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
* for adding separators * for adding separators
*/ */
public void addSeparator() { public void addSeparator() {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("addSeparator is not implemented"); log.finer("addSeparator is not implemented");
} }
} }
...@@ -343,7 +343,7 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer { ...@@ -343,7 +343,7 @@ public class XPopupMenuPeer extends XMenuWindow implements PopupMenuPeer {
*/ */
public void handleKeyPress(XEvent xev) { public void handleKeyPress(XEvent xev) {
XKeyEvent xkey = xev.get_xkey(); XKeyEvent xkey = xev.get_xkey();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(xkey.toString()); log.fine(xkey.toString());
} }
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
......
...@@ -54,7 +54,7 @@ class XProtocol { ...@@ -54,7 +54,7 @@ class XProtocol {
} finally { } finally {
if (firstCheck) { if (firstCheck) {
firstCheck = false; firstCheck = false;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("{0}:{1} supports {2}", this, listName, protocols); log.fine("{0}:{1} supports {2}", this, listName, protocols);
} }
} }
......
...@@ -118,7 +118,7 @@ abstract class XScrollbar { ...@@ -118,7 +118,7 @@ abstract class XScrollbar {
abstract protected void rebuildArrows(); abstract protected void rebuildArrows();
public void setSize(int width, int height) { public void setSize(int width, int height) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Setting scroll bar " + this + " size to " + width + "x" + height); log.finer("Setting scroll bar " + this + " size to " + width + "x" + height);
} }
this.width = width; this.width = width;
...@@ -166,7 +166,7 @@ abstract class XScrollbar { ...@@ -166,7 +166,7 @@ abstract class XScrollbar {
* @param paintAll paint the whole scrollbar if true, just the thumb is false * @param paintAll paint the whole scrollbar if true, just the thumb is false
*/ */
void paint(Graphics g, Color colors[], boolean paintAll) { void paint(Graphics g, Color colors[], boolean paintAll) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Painting scrollbar " + this); log.finer("Painting scrollbar " + this);
} }
...@@ -339,7 +339,7 @@ abstract class XScrollbar { ...@@ -339,7 +339,7 @@ abstract class XScrollbar {
* Tell the scroller to start scrolling. * Tell the scroller to start scrolling.
*/ */
void startScrolling() { void startScrolling() {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Start scrolling on " + this); log.finer("Start scrolling on " + this);
} }
// Make sure that we scroll at least once // Make sure that we scroll at least once
...@@ -361,7 +361,7 @@ abstract class XScrollbar { ...@@ -361,7 +361,7 @@ abstract class XScrollbar {
* See 6243382 for more information * See 6243382 for more information
*/ */
void startScrollingInstance() { void startScrollingInstance() {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Start scrolling on " + this); log.finer("Start scrolling on " + this);
} }
// Make sure that we scroll at least once // Make sure that we scroll at least once
...@@ -376,7 +376,7 @@ abstract class XScrollbar { ...@@ -376,7 +376,7 @@ abstract class XScrollbar {
* See 6243382 for more information * See 6243382 for more information
*/ */
void stopScrollingInstance() { void stopScrollingInstance() {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Stop scrolling on " + this); log.finer("Stop scrolling on " + this);
} }
...@@ -464,7 +464,7 @@ abstract class XScrollbar { ...@@ -464,7 +464,7 @@ abstract class XScrollbar {
return; return;
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
String type; String type;
switch (id) { switch (id) {
case MouseEvent.MOUSE_PRESSED: case MouseEvent.MOUSE_PRESSED:
......
...@@ -156,7 +156,7 @@ class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbar ...@@ -156,7 +156,7 @@ class XScrollbarPeer extends XComponentPeer implements ScrollbarPeer, XScrollbar
public void handleJavaKeyEvent(KeyEvent event) { public void handleJavaKeyEvent(KeyEvent event) {
super.handleJavaKeyEvent(event); super.handleJavaKeyEvent(event);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("KeyEvent on scrollbar: " + event); log.finer("KeyEvent on scrollbar: " + event);
} }
if (!(event.isConsumed()) && event.getID() == KeyEvent.KEY_RELEASED) { if (!(event.isConsumed()) && event.getID() == KeyEvent.KEY_RELEASED) {
......
...@@ -58,7 +58,7 @@ public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener { ...@@ -58,7 +58,7 @@ public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener {
long selection_owner = selection.getOwner(SCREEN); long selection_owner = selection.getOwner(SCREEN);
available = (selection_owner != XConstants.None); available = (selection_owner != XConstants.None);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(" check if system tray is available. selection owner: " + selection_owner); log.fine(" check if system tray is available. selection owner: " + selection_owner);
} }
} }
...@@ -108,7 +108,7 @@ public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener { ...@@ -108,7 +108,7 @@ public class XSystemTrayPeer implements SystemTrayPeer, XMSelectionListener {
void addTrayIcon(XTrayIconPeer tiPeer) throws AWTException { void addTrayIcon(XTrayIconPeer tiPeer) throws AWTException {
long selection_owner = selection.getOwner(SCREEN); long selection_owner = selection.getOwner(SCREEN);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(" send SYSTEM_TRAY_REQUEST_DOCK message to owner: " + selection_owner); log.fine(" send SYSTEM_TRAY_REQUEST_DOCK message to owner: " + selection_owner);
} }
......
...@@ -258,7 +258,7 @@ public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer { ...@@ -258,7 +258,7 @@ public class XTextFieldPeer extends XComponentPeer implements TextFieldPeer {
} }
public void setBackground(Color c) { public void setBackground(Color c) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("target="+ target + ", old=" + background + ", new=" + c); log.fine("target="+ target + ", old=" + background + ", new=" + c);
} }
background = c; background = c;
......
...@@ -266,7 +266,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -266,7 +266,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
((XAWTXSettings)xs).dispose(); ((XAWTXSettings)xs).dispose();
} }
freeXKB(); freeXKB();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
dumpPeers(); dumpPeers();
} }
} }
...@@ -524,7 +524,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -524,7 +524,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
} }
static void processException(Throwable thr) { static void processException(Throwable thr) {
if (log.isLoggable(PlatformLogger.WARNING)) { if (log.isLoggable(PlatformLogger.Level.WARNING)) {
log.warning("Exception on Toolkit thread", thr); log.warning("Exception on Toolkit thread", thr);
} }
} }
...@@ -586,7 +586,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -586,7 +586,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
continue; continue;
} }
if (eventLog.isLoggable(PlatformLogger.FINER)) { if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
eventLog.finer("{0}", ev); eventLog.finer("{0}", ev);
} }
...@@ -602,13 +602,13 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -602,13 +602,13 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
} }
} }
} }
if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) { if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
keyEventLog.fine("before XFilterEvent:"+ev); keyEventLog.fine("before XFilterEvent:"+ev);
} }
if (XlibWrapper.XFilterEvent(ev.getPData(), w)) { if (XlibWrapper.XFilterEvent(ev.getPData(), w)) {
continue; continue;
} }
if( keyEventLog.isLoggable(PlatformLogger.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) { if( keyEventLog.isLoggable(PlatformLogger.Level.FINE) && (ev.get_type() == XConstants.KeyPress || ev.get_type() == XConstants.KeyRelease) ) {
keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT? keyEventLog.fine("after XFilterEvent:"+ev); // IS THIS CORRECT?
} }
...@@ -1321,7 +1321,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1321,7 +1321,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
} }
static void dumpPeers() { static void dumpPeers() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Mapped windows:"); log.fine("Mapped windows:");
Iterator iter = winMap.entrySet().iterator(); Iterator iter = winMap.entrySet().iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -1417,7 +1417,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1417,7 +1417,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
} }
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
// Note: the returned timeStamp can be incorrect in this case. // Note: the returned timeStamp can be incorrect in this case.
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")"); log.fine("Catched exception, timeStamp may not be correct (ie = " + ie + ")");
} }
} }
...@@ -1584,7 +1584,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1584,7 +1584,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
name = "gnome." + name; name = "gnome." + name;
setDesktopProperty(name, e.getValue()); setDesktopProperty(name, e.getValue());
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("name = " + name + " value = " + e.getValue()); log.fine("name = " + name + " value = " + e.getValue());
} }
...@@ -1773,7 +1773,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1773,7 +1773,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
} finally { } finally {
awtUnlock(); awtUnlock();
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("metaMask = " + metaMask); log.fine("metaMask = " + metaMask);
log.fine("altMask = " + altMask); log.fine("altMask = " + altMask);
log.fine("numLockMask = " + numLockMask); log.fine("numLockMask = " + numLockMask);
...@@ -1795,11 +1795,11 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1795,11 +1795,11 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
} }
awtLock(); awtLock();
try { try {
if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) { if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
timeoutTaskLog.finer("Removing task " + task); timeoutTaskLog.finer("Removing task " + task);
} }
if (timeoutTasks == null) { if (timeoutTasks == null) {
if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) { if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
timeoutTaskLog.finer("Task is not scheduled"); timeoutTaskLog.finer("Task is not scheduled");
} }
return; return;
...@@ -1846,7 +1846,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1846,7 +1846,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
awtLock(); awtLock();
try { try {
if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) { if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
timeoutTaskLog.finer("XToolkit.schedule(): current time={0}" + timeoutTaskLog.finer("XToolkit.schedule(): current time={0}" +
"; interval={1}" + "; interval={1}" +
"; task being added={2}" + "; tasks before addition={3}", "; task being added={2}" + "; tasks before addition={3}",
...@@ -1893,7 +1893,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1893,7 +1893,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
* Called from run() under awtLock. * Called from run() under awtLock.
*/ */
private static void callTimeoutTasks() { private static void callTimeoutTasks() {
if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) { if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" + timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
"; tasks={1}", Long.valueOf(System.currentTimeMillis()), timeoutTasks); "; tasks={1}", Long.valueOf(System.currentTimeMillis()), timeoutTasks);
} }
...@@ -1911,7 +1911,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1911,7 +1911,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
for (Iterator iter = tasks.iterator(); iter.hasNext();) { for (Iterator iter = tasks.iterator(); iter.hasNext();) {
Runnable task = (Runnable)iter.next(); Runnable task = (Runnable)iter.next();
if (timeoutTaskLog.isLoggable(PlatformLogger.FINER)) { if (timeoutTaskLog.isLoggable(PlatformLogger.Level.FINER)) {
timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" + timeoutTaskLog.finer("XToolkit.callTimeoutTasks(): current time={0}" +
"; about to run task={1}", Long.valueOf(currentTime), task); "; about to run task={1}", Long.valueOf(currentTime), task);
} }
...@@ -1986,7 +1986,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1986,7 +1986,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
*/ */
long current_time_utc = System.currentTimeMillis(); long current_time_utc = System.currentTimeMillis();
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("reset_time=" + reset_time_utc + ", current_time=" + current_time_utc log.finer("reset_time=" + reset_time_utc + ", current_time=" + current_time_utc
+ ", server_offset=" + server_offset + ", wrap_time=" + WRAP_TIME_MILLIS); + ", server_offset=" + server_offset + ", wrap_time=" + WRAP_TIME_MILLIS);
} }
...@@ -1995,7 +1995,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -1995,7 +1995,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
reset_time_utc = System.currentTimeMillis() - getCurrentServerTime(); reset_time_utc = System.currentTimeMillis() - getCurrentServerTime();
} }
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("result = " + (reset_time_utc + server_offset)); log.finer("result = " + (reset_time_utc + server_offset));
} }
return reset_time_utc + server_offset; return reset_time_utc + server_offset;
...@@ -2074,14 +2074,14 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2074,14 +2074,14 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
if (prop == null) { if (prop == null) {
backingStoreType = XConstants.NotUseful; backingStoreType = XConstants.NotUseful;
if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) { if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
backingStoreLog.config("The system property sun.awt.backingStore is not set" + backingStoreLog.config("The system property sun.awt.backingStore is not set" +
", by default backingStore=NotUseful"); ", by default backingStore=NotUseful");
} }
return; return;
} }
if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) { if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
backingStoreLog.config("The system property sun.awt.backingStore is " + prop); backingStoreLog.config("The system property sun.awt.backingStore is " + prop);
} }
prop = prop.toLowerCase(); prop = prop.toLowerCase();
...@@ -2093,7 +2093,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2093,7 +2093,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
backingStoreType = XConstants.NotUseful; backingStoreType = XConstants.NotUseful;
} }
if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) { if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
backingStoreLog.config("backingStore(as provided by the system property)=" + backingStoreLog.config("backingStore(as provided by the system property)=" +
( backingStoreType == XConstants.NotUseful ? "NotUseful" ( backingStoreType == XConstants.NotUseful ? "NotUseful"
: backingStoreType == XConstants.WhenMapped ? : backingStoreType == XConstants.WhenMapped ?
...@@ -2103,7 +2103,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2103,7 +2103,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
if (sun.java2d.x11.X11SurfaceData.isDgaAvailable()) { if (sun.java2d.x11.X11SurfaceData.isDgaAvailable()) {
backingStoreType = XConstants.NotUseful; backingStoreType = XConstants.NotUseful;
if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) { if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
backingStoreLog.config("DGA is available, backingStore=NotUseful"); backingStoreLog.config("DGA is available, backingStore=NotUseful");
} }
...@@ -2118,7 +2118,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2118,7 +2118,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
== XConstants.NotUseful) { == XConstants.NotUseful) {
backingStoreType = XConstants.NotUseful; backingStoreType = XConstants.NotUseful;
if (backingStoreLog.isLoggable(PlatformLogger.CONFIG)) { if (backingStoreLog.isLoggable(PlatformLogger.Level.CONFIG)) {
backingStoreLog.config("Backing store is not available on the screen " + backingStoreLog.config("Backing store is not available on the screen " +
i + ", backingStore=NotUseful"); i + ", backingStore=NotUseful");
} }
...@@ -2396,7 +2396,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -2396,7 +2396,7 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
// Wait for selection notify for oops on win // Wait for selection notify for oops on win
long event_number = getEventNumber(); long event_number = getEventNumber();
XAtom atom = XAtom.get("WM_S0"); XAtom atom = XAtom.get("WM_S0");
if (eventLog.isLoggable(PlatformLogger.FINER)) { if (eventLog.isLoggable(PlatformLogger.Level.FINER)) {
eventLog.finer("WM_S0 selection owner {0}", XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom())); eventLog.finer("WM_S0 selection owner {0}", XlibWrapper.XGetSelectionOwner(getDisplay(), atom.getAtom()));
} }
XlibWrapper.XConvertSelection(getDisplay(), atom.getAtom(), XlibWrapper.XConvertSelection(getDisplay(), atom.getAtom(),
......
...@@ -106,7 +106,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -106,7 +106,7 @@ public class XTrayIconPeer implements TrayIconPeer,
XConfigureEvent ce = ev.get_xconfigure(); XConfigureEvent ce = ev.get_xconfigure();
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})", ctrLog.fine("ConfigureNotify on parent of {0}: {1}x{2}+{3}+{4} (old: {5}+{6})",
XTrayIconPeer.this, ce.get_width(), ce.get_height(), XTrayIconPeer.this, ce.get_width(), ce.get_height(),
ce.get_x(), ce.get_y(), old_x, old_y); ce.get_x(), ce.get_y(), old_x, old_y);
...@@ -130,7 +130,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -130,7 +130,7 @@ public class XTrayIconPeer implements TrayIconPeer,
// If both the height and the width differ from the fixed size then WM // If both the height and the width differ from the fixed size then WM
// must level at least one side to the fixed size. For some reason it may take // must level at least one side to the fixed size. For some reason it may take
// a few hops (even after reparenting) and we have to skip the intermediate ones. // a few hops (even after reparenting) and we have to skip the intermediate ones.
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}. Skipping as intermediate resizing.", ctrLog.fine("ConfigureNotify on parent of {0}. Skipping as intermediate resizing.",
XTrayIconPeer.this); XTrayIconPeer.this);
} }
...@@ -138,7 +138,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -138,7 +138,7 @@ public class XTrayIconPeer implements TrayIconPeer,
} else if (ce.get_height() > TRAY_ICON_HEIGHT) { } else if (ce.get_height() > TRAY_ICON_HEIGHT) {
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"Y\".", ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"Y\".",
XTrayIconPeer.this); XTrayIconPeer.this);
} }
...@@ -153,7 +153,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -153,7 +153,7 @@ public class XTrayIconPeer implements TrayIconPeer,
} else if (ce.get_width() > TRAY_ICON_WIDTH) { } else if (ce.get_width() > TRAY_ICON_WIDTH) {
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"X\".", ctrLog.fine("ConfigureNotify on parent of {0}. Centering by \"X\".",
XTrayIconPeer.this); XTrayIconPeer.this);
} }
...@@ -173,7 +173,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -173,7 +173,7 @@ public class XTrayIconPeer implements TrayIconPeer,
if (ex_height != 0) { if (ex_height != 0) {
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".", ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"Y\".",
XTrayIconPeer.this); XTrayIconPeer.this);
} }
...@@ -184,7 +184,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -184,7 +184,7 @@ public class XTrayIconPeer implements TrayIconPeer,
} else if (ex_width != 0) { } else if (ex_width != 0) {
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".", ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Centering by \"X\".",
XTrayIconPeer.this); XTrayIconPeer.this);
} }
...@@ -193,7 +193,7 @@ public class XTrayIconPeer implements TrayIconPeer, ...@@ -193,7 +193,7 @@ public class XTrayIconPeer implements TrayIconPeer,
ce.get_x() + ex_width/2 - TRAY_ICON_WIDTH/2, ce.get_x() + ex_width/2 - TRAY_ICON_WIDTH/2,
ce.get_y()); ce.get_y());
} else { } else {
if (ctrLog.isLoggable(PlatformLogger.FINE)) { if (ctrLog.isLoggable(PlatformLogger.Level.FINE)) {
ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Skipping.", ctrLog.fine("ConfigureNotify on parent of {0}. Move detected. Skipping.",
XTrayIconPeer.this); XTrayIconPeer.this);
} }
......
...@@ -63,7 +63,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -63,7 +63,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
req.set_format(32); req.set_format(32);
req.set_data(0, (WIN_STATE_MAXIMIZED_HORIZ | WIN_STATE_MAXIMIZED_VERT)); req.set_data(0, (WIN_STATE_MAXIMIZED_HORIZ | WIN_STATE_MAXIMIZED_VERT));
req.set_data(1, win_state); req.set_data(1, win_state);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Sending WIN_STATE to root to change the state to " + win_state); log.fine("Sending WIN_STATE to root to change the state to " + win_state);
} }
try { try {
...@@ -113,7 +113,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -113,7 +113,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
win_state &= ~WIN_STATE_MAXIMIZED_HORIZ; win_state &= ~WIN_STATE_MAXIMIZED_HORIZ;
} }
if ((old_win_state ^ win_state) != 0) { if ((old_win_state ^ win_state) != 0) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting WIN_STATE on " + window + " to change the state to " + win_state); log.fine("Setting WIN_STATE on " + window + " to change the state to " + win_state);
} }
XA_WIN_STATE.setCard32Property(window, win_state); XA_WIN_STATE.setCard32Property(window, win_state);
...@@ -160,7 +160,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -160,7 +160,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
req.set_data(0, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP); req.set_data(0, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP);
req.set_data(1, 0); req.set_data(1, 0);
req.set_data(2, 0); req.set_data(2, 0);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting layer " + layer + " by root message : " + req); log.fine("Setting layer " + layer + " by root message : " + req);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -177,7 +177,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -177,7 +177,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
} }
req.dispose(); req.dispose();
} else { } else {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting layer property to " + layer); log.fine("Setting layer property to " + layer);
} }
XA_WIN_LAYER.setCard32Property(window, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP); XA_WIN_LAYER.setCard32Property(window, layer == LAYER_NORMAL ? WIN_LAYER_NORMAL : WIN_LAYER_ONTOP);
...@@ -205,7 +205,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -205,7 +205,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
} }
WinWindow = checkAnchor(XA_WIN_SUPPORTING_WM_CHECK, XAtom.XA_CARDINAL); WinWindow = checkAnchor(XA_WIN_SUPPORTING_WM_CHECK, XAtom.XA_CARDINAL);
supportChecked = true; supportChecked = true;
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### " + this + " is active: " + (WinWindow != 0)); log.fine("### " + this + " is active: " + (WinWindow != 0));
} }
} }
...@@ -216,7 +216,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -216,7 +216,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
} }
boolean doStateProtocol() { boolean doStateProtocol() {
boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_STATE); boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_STATE);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### " + this + " supports state: " + res); log.fine("### " + this + " supports state: " + res);
} }
return res; return res;
...@@ -224,7 +224,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { ...@@ -224,7 +224,7 @@ class XWINProtocol extends XProtocol implements XStateProtocol, XLayerProtocol {
boolean doLayerProtocol() { boolean doLayerProtocol() {
boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_LAYER); boolean res = active() && checkProtocol(XA_WIN_PROTOCOLS, XA_WIN_LAYER);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("### " + this + " supports layer: " + res); log.fine("### " + this + " supports layer: " + res);
} }
return res; return res;
......
...@@ -149,7 +149,7 @@ final class XWM ...@@ -149,7 +149,7 @@ final class XWM
XWM(int WMID) { XWM(int WMID) {
this.WMID = WMID; this.WMID = WMID;
initializeProtocols(); initializeProtocols();
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Window manager: " + toString()); log.fine("Window manager: " + toString());
} }
} }
...@@ -255,7 +255,7 @@ final class XWM ...@@ -255,7 +255,7 @@ final class XWM
* having a window manager running. I.e. it does not reparent * having a window manager running. I.e. it does not reparent
* top level shells. * top level shells.
*/ */
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("eXcursion means NO_WM"); insLog.finer("eXcursion means NO_WM");
} }
return true; return true;
...@@ -273,7 +273,7 @@ final class XWM ...@@ -273,7 +273,7 @@ final class XWM
long selection_owner = long selection_owner =
XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(), XlibWrapper.XGetSelectionOwner(XToolkit.getDisplay(),
XAtom.get(selection_name).getAtom()); XAtom.get(selection_name).getAtom());
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("selection owner of " + selection_name insLog.finer("selection owner of " + selection_name
+ " is " + selection_owner); + " is " + selection_owner);
} }
...@@ -302,7 +302,7 @@ final class XWM ...@@ -302,7 +302,7 @@ final class XWM
XToolkit.getDefaultRootWindow(), XToolkit.getDefaultRootWindow(),
XConstants.CWEventMask, XConstants.CWEventMask,
substruct.pData); substruct.pData);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("It looks like there is no WM thus NO_WM"); insLog.finer("It looks like there is no WM thus NO_WM");
} }
} }
...@@ -346,7 +346,7 @@ final class XWM ...@@ -346,7 +346,7 @@ final class XWM
byte[] bytes = XlibWrapper.getStringBytes(getter.getData()); byte[] bytes = XlibWrapper.getStringBytes(getter.getData());
String id = new String(bytes); String id = new String(bytes);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("ENLIGHTENMENT_COMMS is " + id); log.finer("ENLIGHTENMENT_COMMS is " + id);
} }
...@@ -355,15 +355,15 @@ final class XWM ...@@ -355,15 +355,15 @@ final class XWM
try { try {
Matcher match = winIdPat.matcher(id); Matcher match = winIdPat.matcher(id);
if (match.matches()) { if (match.matches()) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Match group count: " + match.groupCount()); log.finest("Match group count: " + match.groupCount());
} }
String longId = match.group(1); String longId = match.group(1);
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("Match group 1 " + longId); log.finest("Match group 1 " + longId);
} }
long winid = Long.parseLong(longId, 16); long winid = Long.parseLong(longId, 16);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Enlightenment communication window " + winid); log.finer("Enlightenment communication window " + winid);
} }
return winid; return winid;
...@@ -372,7 +372,7 @@ final class XWM ...@@ -372,7 +372,7 @@ final class XWM
return 0; return 0;
} }
} catch (Exception e) { } catch (Exception e) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
e.printStackTrace(); e.printStackTrace();
} }
return 0; return 0;
...@@ -418,7 +418,7 @@ final class XWM ...@@ -418,7 +418,7 @@ final class XWM
static boolean isCDE() { static boolean isCDE() {
if (!XA_DT_SM_WINDOW_INFO.isInterned()) { if (!XA_DT_SM_WINDOW_INFO.isInterned()) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("{0} is not interned", XA_DT_SM_WINDOW_INFO); log.finer("{0} is not interned", XA_DT_SM_WINDOW_INFO);
} }
return false; return false;
...@@ -451,7 +451,7 @@ final class XWM ...@@ -451,7 +451,7 @@ final class XWM
/* Now check that this window has _DT_SM_STATE_INFO (ignore contents) */ /* Now check that this window has _DT_SM_STATE_INFO (ignore contents) */
if (!XA_DT_SM_STATE_INFO.isInterned()) { if (!XA_DT_SM_STATE_INFO.isInterned()) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("{0} is not interned", XA_DT_SM_STATE_INFO); log.finer("{0} is not interned", XA_DT_SM_STATE_INFO);
} }
return false; return false;
...@@ -625,7 +625,7 @@ final class XWM ...@@ -625,7 +625,7 @@ final class XWM
*/ */
if (!XA_ICEWM_WINOPTHINT.isInterned()) { if (!XA_ICEWM_WINOPTHINT.isInterned()) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT); log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
} }
return false; return false;
...@@ -661,7 +661,7 @@ final class XWM ...@@ -661,7 +661,7 @@ final class XWM
*/ */
static boolean isIceWM() { static boolean isIceWM() {
if (!XA_ICEWM_WINOPTHINT.isInterned()) { if (!XA_ICEWM_WINOPTHINT.isInterned()) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT); log.finer("{0} is not interned", XA_ICEWM_WINOPTHINT);
} }
return false; return false;
...@@ -674,7 +674,7 @@ final class XWM ...@@ -674,7 +674,7 @@ final class XWM
try { try {
int status = getter.execute(); int status = getter.execute();
boolean res = (status == XConstants.Success && getter.getActualType() != 0); boolean res = (status == XConstants.Success && getter.getActualType() != 0);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Status getting XA_ICEWM_WINOPTHINT: " + !res); log.finer("Status getting XA_ICEWM_WINOPTHINT: " + !res);
} }
return !res || isNetWMName("IceWM"); return !res || isNetWMName("IceWM");
...@@ -730,7 +730,7 @@ final class XWM ...@@ -730,7 +730,7 @@ final class XWM
return wm; return wm;
} }
static int getWMID() { static int getWMID() {
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("awt_wmgr = " + awt_wmgr); insLog.finest("awt_wmgr = " + awt_wmgr);
} }
/* /*
...@@ -754,7 +754,7 @@ final class XWM ...@@ -754,7 +754,7 @@ final class XWM
// Later, WM will initialize its own version of protocol // Later, WM will initialize its own version of protocol
XNETProtocol l_net_protocol = g_net_protocol = new XNETProtocol(); XNETProtocol l_net_protocol = g_net_protocol = new XNETProtocol();
l_net_protocol.detect(); l_net_protocol.detect();
if (log.isLoggable(PlatformLogger.FINE) && l_net_protocol.active()) { if (log.isLoggable(PlatformLogger.Level.FINE) && l_net_protocol.active()) {
log.fine("_NET_WM_NAME is " + l_net_protocol.getWMName()); log.fine("_NET_WM_NAME is " + l_net_protocol.getWMName());
} }
XWINProtocol win = g_win_protocol = new XWINProtocol(); XWINProtocol win = g_win_protocol = new XWINProtocol();
...@@ -838,7 +838,7 @@ final class XWM ...@@ -838,7 +838,7 @@ final class XWM
} }
hints.set_flags(hints.get_flags() & ~mask); hints.set_flags(hints.get_flags() & ~mask);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags())); insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
} }
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(),
...@@ -897,7 +897,7 @@ final class XWM ...@@ -897,7 +897,7 @@ final class XWM
XAtomList decorDel = new XAtomList(); XAtomList decorDel = new XAtomList();
decorations = normalizeMotifDecor(decorations); decorations = normalizeMotifDecor(decorations);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations)); insLog.finer("Setting OL_DECOR to " + Integer.toBinaryString(decorations));
} }
if ((decorations & MWMConstants.MWM_DECOR_TITLE) == 0) { if ((decorations & MWMConstants.MWM_DECOR_TITLE) == 0) {
...@@ -916,7 +916,7 @@ final class XWM ...@@ -916,7 +916,7 @@ final class XWM
insLog.finer("Deleting OL_DECOR"); insLog.finer("Deleting OL_DECOR");
XA_OL_DECOR_DEL.DeleteProperty(window); XA_OL_DECOR_DEL.DeleteProperty(window);
} else { } else {
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Setting OL_DECOR to " + decorDel); insLog.finer("Setting OL_DECOR to " + decorDel);
} }
XA_OL_DECOR_DEL.setAtomListProperty(window, decorDel); XA_OL_DECOR_DEL.setAtomListProperty(window, decorDel);
...@@ -946,7 +946,7 @@ final class XWM ...@@ -946,7 +946,7 @@ final class XWM
hints.set_functions(functions); hints.set_functions(functions);
hints.set_decorations(decorations); hints.set_decorations(decorations);
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("Setting MWM_HINTS to " + hints); stateLog.finer("Setting MWM_HINTS to " + hints);
} }
window.setMWMHints(hints); window.setMWMHints(hints);
...@@ -1010,7 +1010,7 @@ final class XWM ...@@ -1010,7 +1010,7 @@ final class XWM
* Make specified shell resizable. * Make specified shell resizable.
*/ */
static void setShellResizable(XDecoratedPeer window) { static void setShellResizable(XDecoratedPeer window) {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting shell resizable " + window); insLog.fine("Setting shell resizable " + window);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -1042,7 +1042,7 @@ final class XWM ...@@ -1042,7 +1042,7 @@ final class XWM
static void setShellNotResizable(XDecoratedPeer window, WindowDimensions newDimensions, Rectangle shellBounds, static void setShellNotResizable(XDecoratedPeer window, WindowDimensions newDimensions, Rectangle shellBounds,
boolean justChangeSize) boolean justChangeSize)
{ {
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions + insLog.fine("Setting non-resizable shell " + window + ", dimensions " + newDimensions +
", shellBounds " + shellBounds +", just change size: " + justChangeSize); ", shellBounds " + shellBounds +", just change size: " + justChangeSize);
} }
...@@ -1176,7 +1176,7 @@ final class XWM ...@@ -1176,7 +1176,7 @@ final class XWM
stateLog.finer("WithdrawnState"); stateLog.finer("WithdrawnState");
return false; return false;
} else { } else {
if (stateLog.isLoggable(PlatformLogger.FINER)) { if (stateLog.isLoggable(PlatformLogger.Level.FINER)) {
stateLog.finer("Window WM_STATE is " + wm_state); stateLog.finer("Window WM_STATE is " + wm_state);
} }
} }
...@@ -1187,7 +1187,7 @@ final class XWM ...@@ -1187,7 +1187,7 @@ final class XWM
for (XStateProtocol proto : getProtocols(XStateProtocol.class)) { for (XStateProtocol proto : getProtocols(XStateProtocol.class)) {
is_state_change |= proto.isStateChange(e); is_state_change |= proto.isStateChange(e);
if (stateLog.isLoggable(PlatformLogger.FINEST)) { if (stateLog.isLoggable(PlatformLogger.Level.FINEST)) {
stateLog.finest(proto + ": is state changed = " + is_state_change); stateLog.finest(proto + ": is state changed = " + is_state_change);
} }
} }
...@@ -1341,7 +1341,7 @@ final class XWM ...@@ -1341,7 +1341,7 @@ final class XWM
res = defaultInsets; res = defaultInsets;
} }
} }
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("WM guessed insets: " + res); insLog.finest("WM guessed insets: " + res);
} }
return res; return res;
...@@ -1412,7 +1412,7 @@ final class XWM ...@@ -1412,7 +1412,7 @@ final class XWM
XNETProtocol net_protocol = getWM().getNETProtocol(); XNETProtocol net_protocol = getWM().getNETProtocol();
if (net_protocol != null && net_protocol.active()) { if (net_protocol != null && net_protocol.active()) {
Insets insets = getInsetsFromProp(window, XA_NET_FRAME_EXTENTS); Insets insets = getInsetsFromProp(window, XA_NET_FRAME_EXTENTS);
if (insLog.isLoggable(PlatformLogger.FINE)) { if (insLog.isLoggable(PlatformLogger.Level.FINE)) {
insLog.fine("_NET_FRAME_EXTENTS: {0}", insets); insLog.fine("_NET_FRAME_EXTENTS: {0}", insets);
} }
...@@ -1555,7 +1555,7 @@ final class XWM ...@@ -1555,7 +1555,7 @@ final class XWM
* [mwm, e!, kwin, fvwm2 ... ] * [mwm, e!, kwin, fvwm2 ... ]
*/ */
Insets correctWM = XWM.getInsetsFromExtents(window); Insets correctWM = XWM.getInsetsFromExtents(window);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Got insets from property: {0}", correctWM); insLog.finer("Got insets from property: {0}", correctWM);
} }
...@@ -1618,7 +1618,7 @@ final class XWM ...@@ -1618,7 +1618,7 @@ final class XWM
} }
case XWM.OTHER_WM: case XWM.OTHER_WM:
default: { /* this is very similar to the E! case above */ default: { /* this is very similar to the E! case above */
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("Getting correct insets for OTHER_WM/default, parent: {0}", parent); insLog.finest("Getting correct insets for OTHER_WM/default, parent: {0}", parent);
} }
syncTopLevelPos(parent, lwinAttr); syncTopLevelPos(parent, lwinAttr);
...@@ -1647,7 +1647,7 @@ final class XWM ...@@ -1647,7 +1647,7 @@ final class XWM
&& lwinAttr.get_width()+2*lwinAttr.get_border_width() == pattr.get_width() && lwinAttr.get_width()+2*lwinAttr.get_border_width() == pattr.get_width()
&& lwinAttr.get_height()+2*lwinAttr.get_border_width() == pattr.get_height()) && lwinAttr.get_height()+2*lwinAttr.get_border_width() == pattr.get_height())
{ {
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}", insLog.finest("Double reparenting detected, pattr({2})={0}, lwinAttr({3})={1}",
lwinAttr, pattr, parent, window); lwinAttr, pattr, parent, window);
} }
...@@ -1677,7 +1677,7 @@ final class XWM ...@@ -1677,7 +1677,7 @@ final class XWM
* widths and inner/outer distinction, so for the time * widths and inner/outer distinction, so for the time
* being, just ignore it. * being, just ignore it.
*/ */
if (insLog.isLoggable(PlatformLogger.FINEST)) { if (insLog.isLoggable(PlatformLogger.Level.FINEST)) {
insLog.finest("Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}", insLog.finest("Attrs before calculation: pattr({2})={0}, lwinAttr({3})={1}",
lwinAttr, pattr, parent, window); lwinAttr, pattr, parent, window);
} }
......
...@@ -402,7 +402,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -402,7 +402,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
((Component)e.getSource()).dispatchEvent(e); ((Component)e.getSource()).dispatchEvent(e);
} }
}, PeerEvent.ULTIMATE_PRIORITY_EVENT); }, PeerEvent.ULTIMATE_PRIORITY_EVENT);
if (focusLog.isLoggable(PlatformLogger.FINER) && (e instanceof FocusEvent)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER) && (e instanceof FocusEvent)) {
focusLog.finer("Sending " + e); focusLog.finer("Sending " + e);
} }
XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe); XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe);
...@@ -662,7 +662,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -662,7 +662,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
return; return;
} }
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine(xbe.toString()); eventLog.fine(xbe.toString());
} }
long when; long when;
...@@ -698,7 +698,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -698,7 +698,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
/* /*
multiclick checking multiclick checking
*/ */
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest("lastWindow = " + lastWindow + ", lastButton " eventLog.finest("lastWindow = " + lastWindow + ", lastButton "
+ lastButton + ", lastTime " + lastTime + ", multiClickTime " + lastButton + ", lastTime " + lastTime + ", multiClickTime "
+ XToolkit.getMultiClickTime()); + XToolkit.getMultiClickTime());
...@@ -891,7 +891,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -891,7 +891,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
super.handleXCrossingEvent(xev); super.handleXCrossingEvent(xev);
XCrossingEvent xce = xev.get_xcrossing(); XCrossingEvent xce = xev.get_xcrossing();
if (eventLog.isLoggable(PlatformLogger.FINEST)) { if (eventLog.isLoggable(PlatformLogger.Level.FINEST)) {
eventLog.finest(xce.toString()); eventLog.finest(xce.toString());
} }
...@@ -995,7 +995,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -995,7 +995,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
Rectangle oldBounds = getBounds(); Rectangle oldBounds = getBounds();
super.handleConfigureNotifyEvent(xev); super.handleConfigureNotifyEvent(xev);
if (insLog.isLoggable(PlatformLogger.FINER)) { if (insLog.isLoggable(PlatformLogger.Level.FINER)) {
insLog.finer("Configure, {0}, event disabled: {1}", insLog.finer("Configure, {0}, event disabled: {1}",
xev.get_xconfigure(), isEventDisabled(xev)); xev.get_xconfigure(), isEventDisabled(xev));
} }
...@@ -1017,7 +1017,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1017,7 +1017,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
public void handleMapNotifyEvent(XEvent xev) { public void handleMapNotifyEvent(XEvent xev) {
super.handleMapNotifyEvent(xev); super.handleMapNotifyEvent(xev);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Mapped {0}", this); log.fine("Mapped {0}", this);
} }
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
...@@ -1041,7 +1041,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1041,7 +1041,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
} }
private void dumpKeysymArray(XKeyEvent ev) { private void dumpKeysymArray(XKeyEvent ev) {
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine(" "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 0))+ keyEventLog.fine(" "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 0))+
"\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 1))+ "\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 1))+
"\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 2))+ "\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 2))+
...@@ -1071,18 +1071,18 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1071,18 +1071,18 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
//return (uni > 0? uni + 0x01000000 : 0); //return (uni > 0? uni + 0x01000000 : 0);
} }
void logIncomingKeyEvent(XKeyEvent ev) { void logIncomingKeyEvent(XKeyEvent ev) {
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("--XWindow.java:handleKeyEvent:"+ev); keyEventLog.fine("--XWindow.java:handleKeyEvent:"+ev);
} }
dumpKeysymArray(ev); dumpKeysymArray(ev);
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("XXXXXXXXXXXXXX javakeycode will be most probably:0x"+ Integer.toHexString(XKeysym.getJavaKeycodeOnly(ev))); keyEventLog.fine("XXXXXXXXXXXXXX javakeycode will be most probably:0x"+ Integer.toHexString(XKeysym.getJavaKeycodeOnly(ev)));
} }
} }
public void handleKeyPress(XEvent xev) { public void handleKeyPress(XEvent xev) {
super.handleKeyPress(xev); super.handleKeyPress(xev);
XKeyEvent ev = xev.get_xkey(); XKeyEvent ev = xev.get_xkey();
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine(ev.toString()); eventLog.fine(ev.toString());
} }
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
...@@ -1097,14 +1097,14 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1097,14 +1097,14 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
int unicodeKey = 0; int unicodeKey = 0;
keysym[0] = XConstants.NoSymbol; keysym[0] = XConstants.NoSymbol;
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
logIncomingKeyEvent( ev ); logIncomingKeyEvent( ev );
} }
if ( //TODO check if there's an active input method instance if ( //TODO check if there's an active input method instance
// without calling a native method. Is it necessary though? // without calling a native method. Is it necessary though?
haveCurrentX11InputMethodInstance()) { haveCurrentX11InputMethodInstance()) {
if (x11inputMethodLookupString(ev.pData, keysym)) { if (x11inputMethodLookupString(ev.pData, keysym)) {
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("--XWindow.java XIM did process event; return; dec keysym processed:"+(keysym[0])+ keyEventLog.fine("--XWindow.java XIM did process event; return; dec keysym processed:"+(keysym[0])+
"; hex keysym processed:"+Long.toHexString(keysym[0]) "; hex keysym processed:"+Long.toHexString(keysym[0])
); );
...@@ -1112,7 +1112,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1112,7 +1112,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
return; return;
}else { }else {
unicodeKey = keysymToUnicode( keysym[0], ev.get_state() ); unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("--XWindow.java XIM did NOT process event, hex keysym:"+Long.toHexString(keysym[0])+"\n"+ keyEventLog.fine("--XWindow.java XIM did NOT process event, hex keysym:"+Long.toHexString(keysym[0])+"\n"+
" unicode key:"+Integer.toHexString((int)unicodeKey)); " unicode key:"+Integer.toHexString((int)unicodeKey));
} }
...@@ -1122,7 +1122,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1122,7 +1122,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
// Produce do-it-yourself keysym and perhaps unicode character. // Produce do-it-yourself keysym and perhaps unicode character.
keysym[0] = xkeycodeToKeysym(ev); keysym[0] = xkeycodeToKeysym(ev);
unicodeKey = keysymToUnicode( keysym[0], ev.get_state() ); unicodeKey = keysymToUnicode( keysym[0], ev.get_state() );
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("--XWindow.java XIM is absent; hex keysym:"+Long.toHexString(keysym[0])+"\n"+ keyEventLog.fine("--XWindow.java XIM is absent; hex keysym:"+Long.toHexString(keysym[0])+"\n"+
" unicode key:"+Integer.toHexString((int)unicodeKey)); " unicode key:"+Integer.toHexString((int)unicodeKey));
} }
...@@ -1148,7 +1148,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1148,7 +1148,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
// is undefined, we still have a guess of what has been engraved on a keytop. // is undefined, we still have a guess of what has been engraved on a keytop.
int unicodeFromPrimaryKeysym = keysymToUnicode( xkeycodeToPrimaryKeysym(ev) ,0); int unicodeFromPrimaryKeysym = keysymToUnicode( xkeycodeToPrimaryKeysym(ev) ,0);
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine(">>>Fire Event:"+ keyEventLog.fine(">>>Fire Event:"+
(ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+ (ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+
"jkeycode:decimal="+jkc.getJavaKeycode()+ "jkeycode:decimal="+jkc.getJavaKeycode()+
...@@ -1173,7 +1173,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1173,7 +1173,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
if (unicodeKey > 0 && !isDeadKey) { if (unicodeKey > 0 && !isDeadKey) {
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine("fire _TYPED on "+unicodeKey); keyEventLog.fine("fire _TYPED on "+unicodeKey);
} }
postKeyEvent( java.awt.event.KeyEvent.KEY_TYPED, postKeyEvent( java.awt.event.KeyEvent.KEY_TYPED,
...@@ -1193,7 +1193,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1193,7 +1193,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
public void handleKeyRelease(XEvent xev) { public void handleKeyRelease(XEvent xev) {
super.handleKeyRelease(xev); super.handleKeyRelease(xev);
XKeyEvent ev = xev.get_xkey(); XKeyEvent ev = xev.get_xkey();
if (eventLog.isLoggable(PlatformLogger.FINE)) { if (eventLog.isLoggable(PlatformLogger.Level.FINE)) {
eventLog.fine(ev.toString()); eventLog.fine(ev.toString());
} }
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
...@@ -1205,7 +1205,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1205,7 +1205,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
private void handleKeyRelease(XKeyEvent ev) { private void handleKeyRelease(XKeyEvent ev) {
int unicodeKey = 0; int unicodeKey = 0;
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
logIncomingKeyEvent( ev ); logIncomingKeyEvent( ev );
} }
// Keysym should be converted to Unicode, if possible and necessary, // Keysym should be converted to Unicode, if possible and necessary,
...@@ -1220,7 +1220,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1220,7 +1220,7 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
if( jkc == null ) { if( jkc == null ) {
jkc = new XKeysym.Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_UNDEFINED, java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN); jkc = new XKeysym.Keysym2JavaKeycode(java.awt.event.KeyEvent.VK_UNDEFINED, java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN);
} }
if (keyEventLog.isLoggable(PlatformLogger.FINE)) { if (keyEventLog.isLoggable(PlatformLogger.Level.FINE)) {
keyEventLog.fine(">>>Fire Event:"+ keyEventLog.fine(">>>Fire Event:"+
(ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+ (ev.get_type() == XConstants.KeyPress ? "KEY_PRESSED; " : "KEY_RELEASED; ")+
"jkeycode:decimal="+jkc.getJavaKeycode()+ "jkeycode:decimal="+jkc.getJavaKeycode()+
...@@ -1357,12 +1357,12 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1357,12 +1357,12 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
void updateSizeHints(int x, int y, int width, int height) { void updateSizeHints(int x, int y, int width, int height) {
long flags = XUtilConstants.PSize | (isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition)); long flags = XUtilConstants.PSize | (isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition));
if (!isResizable()) { if (!isResizable()) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Window {0} is not resizable", this); log.finer("Window {0} is not resizable", this);
} }
flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize; flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize;
} else { } else {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Window {0} is resizable", this); log.finer("Window {0} is resizable", this);
} }
} }
...@@ -1372,12 +1372,12 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer { ...@@ -1372,12 +1372,12 @@ public class XWindow extends XBaseWindow implements X11ComponentPeer {
void updateSizeHints(int x, int y) { void updateSizeHints(int x, int y) {
long flags = isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition); long flags = isLocationByPlatform() ? 0 : (XUtilConstants.PPosition | XUtilConstants.USPosition);
if (!isResizable()) { if (!isResizable()) {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Window {0} is not resizable", this); log.finer("Window {0} is not resizable", this);
} }
flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize | XUtilConstants.PSize; flags |= XUtilConstants.PMinSize | XUtilConstants.PMaxSize | XUtilConstants.PSize;
} else { } else {
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Window {0} is resizable", this); log.finer("Window {0} is resizable", this);
} }
} }
......
...@@ -225,7 +225,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -225,7 +225,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
Window owner = t_window.getOwner(); Window owner = t_window.getOwner();
if (owner != null) { if (owner != null) {
ownerPeer = (XWindowPeer)owner.getPeer(); ownerPeer = (XWindowPeer)owner.getPeer();
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Owner is " + owner); focusLog.finer("Owner is " + owner);
focusLog.finer("Owner peer is " + ownerPeer); focusLog.finer("Owner peer is " + ownerPeer);
focusLog.finer("Owner X window " + Long.toHexString(ownerPeer.getWindow())); focusLog.finer("Owner X window " + Long.toHexString(ownerPeer.getWindow()));
...@@ -238,7 +238,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -238,7 +238,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
// Set WM_TRANSIENT_FOR // Set WM_TRANSIENT_FOR
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Setting transient on " + Long.toHexString(getWindow()) focusLog.fine("Setting transient on " + Long.toHexString(getWindow())
+ " for " + Long.toHexString(ownerWindow)); + " for " + Long.toHexString(ownerWindow));
} }
...@@ -300,7 +300,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -300,7 +300,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
for (Iterator<Image> i = iconImages.iterator(); i.hasNext(); ) { for (Iterator<Image> i = iconImages.iterator(); i.hasNext(); ) {
Image image = i.next(); Image image = i.next();
if (image == null) { if (image == null) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("XWindowPeer.updateIconImages: Skipping the image passed into Java because it's null."); log.finest("XWindowPeer.updateIconImages: Skipping the image passed into Java because it's null.");
} }
continue; continue;
...@@ -309,7 +309,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -309,7 +309,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
try { try {
iconInfo = new IconInfo(image); iconInfo = new IconInfo(image);
} catch (Exception e){ } catch (Exception e){
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("XWindowPeer.updateIconImages: Perhaps the image passed into Java is broken. Skipping this icon."); log.finest("XWindowPeer.updateIconImages: Perhaps the image passed into Java is broken. Skipping this icon.");
} }
continue; continue;
...@@ -380,7 +380,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -380,7 +380,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
} }
} }
if (iconLog.isLoggable(PlatformLogger.FINEST)) { if (iconLog.isLoggable(PlatformLogger.Level.FINEST)) {
iconLog.finest(">>> Length_ of buffer of icons data: " + totalLength + iconLog.finest(">>> Length_ of buffer of icons data: " + totalLength +
", maximum length: " + MAXIMUM_BUFFER_LENGTH_NET_WM_ICON); ", maximum length: " + MAXIMUM_BUFFER_LENGTH_NET_WM_ICON);
} }
...@@ -392,7 +392,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -392,7 +392,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
* Dumps each icon from the list * Dumps each icon from the list
*/ */
static void dumpIcons(java.util.List<IconInfo> icons) { static void dumpIcons(java.util.List<IconInfo> icons) {
if (iconLog.isLoggable(PlatformLogger.FINEST)) { if (iconLog.isLoggable(PlatformLogger.Level.FINEST)) {
iconLog.finest(">>> Sizes of icon images:"); iconLog.finest(">>> Sizes of icon images:");
for (Iterator<IconInfo> i = icons.iterator(); i.hasNext(); ) { for (Iterator<IconInfo> i = icons.iterator(); i.hasNext(); ) {
iconLog.finest(" {0}", i.next()); iconLog.finest(" {0}", i.next());
...@@ -666,7 +666,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -666,7 +666,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
return; return;
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("XWindowPeer: Check if we've been moved to a new screen since we're running in Xinerama mode"); log.finest("XWindowPeer: Check if we've been moved to a new screen since we're running in Xinerama mode");
} }
...@@ -703,7 +703,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -703,7 +703,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
} }
} }
if (newScreenNum != curScreenNum) { if (newScreenNum != curScreenNum) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("XWindowPeer: Moved to a new screen"); log.finest("XWindowPeer: Moved to a new screen");
} }
executeDisplayChangedOnEDT(newGC); executeDisplayChangedOnEDT(newGC);
...@@ -778,7 +778,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -778,7 +778,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
// override_redirect all we can do is check whether our parent // override_redirect all we can do is check whether our parent
// is active. If it is - we can freely synthesize focus transfer. // is active. If it is - we can freely synthesize focus transfer.
// Luckily, this logic is already implemented in requestWindowFocus. // Luckily, this logic is already implemented in requestWindowFocus.
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("Requesting window focus"); focusLog.fine("Requesting window focus");
} }
requestWindowFocus(time, timeProvided); requestWindowFocus(time, timeProvided);
...@@ -806,7 +806,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -806,7 +806,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
public void handleFocusEvent(XEvent xev) { public void handleFocusEvent(XEvent xev) {
XFocusChangeEvent xfe = xev.get_xfocus(); XFocusChangeEvent xfe = xev.get_xfocus();
FocusEvent fe; FocusEvent fe;
if (focusLog.isLoggable(PlatformLogger.FINE)) { if (focusLog.isLoggable(PlatformLogger.Level.FINE)) {
focusLog.fine("{0}", xfe); focusLog.fine("{0}", xfe);
} }
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
...@@ -991,7 +991,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -991,7 +991,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
} }
private void updateAlwaysOnTop() { private void updateAlwaysOnTop() {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Promoting always-on-top state {0}", Boolean.valueOf(alwaysOnTop)); log.fine("Promoting always-on-top state {0}", Boolean.valueOf(alwaysOnTop));
} }
XWM.getWM().setLayer(this, XWM.getWM().setLayer(this,
...@@ -1173,7 +1173,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -1173,7 +1173,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
public void dispose() { public void dispose() {
if (isGrabbed()) { if (isGrabbed()) {
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("Generating UngrabEvent on {0} because of the window disposal", this); grabLog.fine("Generating UngrabEvent on {0} because of the window disposal", this);
} }
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource())); postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
...@@ -1518,7 +1518,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -1518,7 +1518,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
synchronized(getStateLock()) { synchronized(getStateLock()) {
XDialogPeer blockerPeer = (XDialogPeer) AWTAccessor.getComponentAccessor().getPeer(d); XDialogPeer blockerPeer = (XDialogPeer) AWTAccessor.getComponentAccessor().getPeer(d);
if (blocked) { if (blocked) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("{0} is blocked by {1}", this, blockerPeer); log.fine("{0} is blocked by {1}", this, blockerPeer);
} }
modalBlocker = d; modalBlocker = d;
...@@ -1911,7 +1911,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -1911,7 +1911,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
@Override @Override
public void xSetVisible(boolean visible) { public void xSetVisible(boolean visible) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Setting visible on " + this + " to " + visible); log.fine("Setting visible on " + this + " to " + visible);
} }
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -2053,7 +2053,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2053,7 +2053,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
public void handleXCrossingEvent(XEvent xev) { public void handleXCrossingEvent(XEvent xev) {
XCrossingEvent xce = xev.get_xcrossing(); XCrossingEvent xce = xev.get_xcrossing();
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("{0}, when grabbed {1}, contains {2}", grabLog.fine("{0}, when grabbed {1}, contains {2}",
xce, isGrabbed(), containsGlobal(xce.get_x_root(), xce.get_y_root())); xce, isGrabbed(), containsGlobal(xce.get_x_root(), xce.get_y_root()));
} }
...@@ -2066,7 +2066,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2066,7 +2066,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
// since it generates MOUSE_ENTERED/MOUSE_EXITED for frame and dialog. // since it generates MOUSE_ENTERED/MOUSE_EXITED for frame and dialog.
// (fix for 6390326) // (fix for 6390326)
XBaseWindow target = XToolkit.windowToXWindow(xce.get_window()); XBaseWindow target = XToolkit.windowToXWindow(xce.get_window());
if (grabLog.isLoggable(PlatformLogger.FINER)) { if (grabLog.isLoggable(PlatformLogger.Level.FINER)) {
grabLog.finer(" - Grab event target {0}", target); grabLog.finer(" - Grab event target {0}", target);
} }
if (target != null && target != this) { if (target != null && target != this) {
...@@ -2079,7 +2079,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2079,7 +2079,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
public void handleMotionNotify(XEvent xev) { public void handleMotionNotify(XEvent xev) {
XMotionEvent xme = xev.get_xmotion(); XMotionEvent xme = xev.get_xmotion();
if (grabLog.isLoggable(PlatformLogger.FINER)) { if (grabLog.isLoggable(PlatformLogger.Level.FINER)) {
grabLog.finer("{0}, when grabbed {1}, contains {2}", grabLog.finer("{0}, when grabbed {1}, contains {2}",
xme, isGrabbed(), containsGlobal(xme.get_x_root(), xme.get_y_root())); xme, isGrabbed(), containsGlobal(xme.get_x_root(), xme.get_y_root()));
} }
...@@ -2110,7 +2110,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2110,7 +2110,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
xme.set_x(localCoord.x); xme.set_x(localCoord.x);
xme.set_y(localCoord.y); xme.set_y(localCoord.y);
} }
if (grabLog.isLoggable(PlatformLogger.FINER)) { if (grabLog.isLoggable(PlatformLogger.Level.FINER)) {
grabLog.finer(" - Grab event target {0}", target); grabLog.finer(" - Grab event target {0}", target);
} }
if (target != null) { if (target != null) {
...@@ -2144,7 +2144,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2144,7 +2144,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
if (xbe.get_button() > SunToolkit.MAX_BUTTONS_SUPPORTED) { if (xbe.get_button() > SunToolkit.MAX_BUTTONS_SUPPORTED) {
return; return;
} }
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})", grabLog.fine("{0}, when grabbed {1}, contains {2} ({3}, {4}, {5}x{6})",
xbe, isGrabbed(), containsGlobal(xbe.get_x_root(), xbe.get_y_root()), getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight()); xbe, isGrabbed(), containsGlobal(xbe.get_x_root(), xbe.get_y_root()), getAbsoluteX(), getAbsoluteY(), getWidth(), getHeight());
} }
...@@ -2155,7 +2155,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2155,7 +2155,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
// translation) // translation)
XBaseWindow target = XToolkit.windowToXWindow(xbe.get_window()); XBaseWindow target = XToolkit.windowToXWindow(xbe.get_window());
try { try {
if (grabLog.isLoggable(PlatformLogger.FINER)) { if (grabLog.isLoggable(PlatformLogger.Level.FINER)) {
grabLog.finer(" - Grab event target {0} (press target {1})", target, pressTarget); grabLog.finer(" - Grab event target {0} (press target {1})", target, pressTarget);
} }
if (xbe.get_type() == XConstants.ButtonPress if (xbe.get_type() == XConstants.ButtonPress
...@@ -2191,7 +2191,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2191,7 +2191,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
// According to the specification of UngrabEvent, post it // According to the specification of UngrabEvent, post it
// when press occurs outside of the window and not on its owned windows // when press occurs outside of the window and not on its owned windows
if (xbe.get_type() == XConstants.ButtonPress) { if (xbe.get_type() == XConstants.ButtonPress) {
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this); grabLog.fine("Generating UngrabEvent on {0} because not inside of shell", this);
} }
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource())); postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
...@@ -2212,14 +2212,14 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2212,14 +2212,14 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
// toplevel == null - outside of // toplevel == null - outside of
// hierarchy, toplevel is Dialog - should // hierarchy, toplevel is Dialog - should
// send ungrab (but shouldn't for Window) // send ungrab (but shouldn't for Window)
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("Generating UngrabEvent on {0} because hierarchy ended", this); grabLog.fine("Generating UngrabEvent on {0} because hierarchy ended", this);
} }
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource())); postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
} }
} else { } else {
// toplevel is null - outside of hierarchy // toplevel is null - outside of hierarchy
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("Generating UngrabEvent on {0} because toplevel is null", this); grabLog.fine("Generating UngrabEvent on {0} because toplevel is null", this);
} }
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource())); postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
...@@ -2227,7 +2227,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, ...@@ -2227,7 +2227,7 @@ class XWindowPeer extends XPanelPeer implements WindowPeer,
} }
} else { } else {
// target doesn't map to XAWT window - outside of hierarchy // target doesn't map to XAWT window - outside of hierarchy
if (grabLog.isLoggable(PlatformLogger.FINE)) { if (grabLog.isLoggable(PlatformLogger.Level.FINE)) {
grabLog.fine("Generating UngrabEvent on because target is null {0}", this); grabLog.fine("Generating UngrabEvent on because target is null {0}", this);
} }
postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource())); postEventToEventQueue(new sun.awt.UngrabEvent(getEventSource()));
......
...@@ -324,7 +324,7 @@ public class X11GraphicsEnvironment ...@@ -324,7 +324,7 @@ public class X11GraphicsEnvironment
// pRunningXinerama() simply returns a global boolean variable, // pRunningXinerama() simply returns a global boolean variable,
// so there is no need to synchronize here // so there is no need to synchronize here
xinerState = Boolean.valueOf(pRunningXinerama()); xinerState = Boolean.valueOf(pRunningXinerama());
if (screenLog.isLoggable(PlatformLogger.FINER)) { if (screenLog.isLoggable(PlatformLogger.Level.FINER)) {
screenLog.finer("Running Xinerama: " + xinerState); screenLog.finer("Running Xinerama: " + xinerState);
} }
} }
...@@ -408,7 +408,7 @@ public class X11GraphicsEnvironment ...@@ -408,7 +408,7 @@ public class X11GraphicsEnvironment
(unionRect.width / 2) + unionRect.x < center.x + 1 && (unionRect.width / 2) + unionRect.x < center.x + 1 &&
(unionRect.height / 2) + unionRect.y < center.y + 1) { (unionRect.height / 2) + unionRect.y < center.y + 1) {
if (screenLog.isLoggable(PlatformLogger.FINER)) { if (screenLog.isLoggable(PlatformLogger.Level.FINER)) {
screenLog.finer("Video Wall: center point is at center of all displays."); screenLog.finer("Video Wall: center point is at center of all displays.");
} }
return unionRect; return unionRect;
...@@ -416,7 +416,7 @@ public class X11GraphicsEnvironment ...@@ -416,7 +416,7 @@ public class X11GraphicsEnvironment
// next, check if at center of one monitor // next, check if at center of one monitor
if (centerMonitorRect != null) { if (centerMonitorRect != null) {
if (screenLog.isLoggable(PlatformLogger.FINER)) { if (screenLog.isLoggable(PlatformLogger.Level.FINER)) {
screenLog.finer("Center point at center of a particular " + screenLog.finer("Center point at center of a particular " +
"monitor, but not of the entire virtual display."); "monitor, but not of the entire virtual display.");
} }
...@@ -424,7 +424,7 @@ public class X11GraphicsEnvironment ...@@ -424,7 +424,7 @@ public class X11GraphicsEnvironment
} }
// otherwise, the center is at some weird spot: return unionRect // otherwise, the center is at some weird spot: return unionRect
if (screenLog.isLoggable(PlatformLogger.FINER)) { if (screenLog.isLoggable(PlatformLogger.Level.FINER)) {
screenLog.finer("Center point is somewhere strange - return union of all bounds."); screenLog.finer("Center point is somewhere strange - return union of all bounds.");
} }
return unionRect; return unionRect;
......
...@@ -326,7 +326,7 @@ public abstract class X11InputMethod extends InputMethodAdapter { ...@@ -326,7 +326,7 @@ public abstract class X11InputMethod extends InputMethodAdapter {
return; return;
if (lastXICFocussedComponent != null){ if (lastXICFocussedComponent != null){
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("XICFocused {0}, AWTFocused {1}", log.fine("XICFocused {0}, AWTFocused {1}",
lastXICFocussedComponent, awtFocussedComponent); lastXICFocussedComponent, awtFocussedComponent);
} }
......
...@@ -177,7 +177,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -177,7 +177,7 @@ public abstract class WComponentPeer extends WObjectPeer
void dynamicallyLayoutContainer() { void dynamicallyLayoutContainer() {
// If we got the WM_SIZING, this must be a Container, right? // If we got the WM_SIZING, this must be a Container, right?
// In fact, it must be the top-level Container. // In fact, it must be the top-level Container.
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
Container parent = WToolkit.getNativeContainer((Component)target); Container parent = WToolkit.getNativeContainer((Component)target);
if (parent != null) { if (parent != null) {
log.fine("Assertion (parent == null) failed"); log.fine("Assertion (parent == null) failed");
...@@ -282,7 +282,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -282,7 +282,7 @@ public abstract class WComponentPeer extends WObjectPeer
paintArea.add(r, e.getID()); paintArea.add(r, e.getID());
} }
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
switch(e.getID()) { switch(e.getID()) {
case PaintEvent.UPDATE: case PaintEvent.UPDATE:
log.finest("coalescePaintEvent: UPDATE: add: x = " + log.finest("coalescePaintEvent: UPDATE: add: x = " +
...@@ -360,7 +360,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -360,7 +360,7 @@ public abstract class WComponentPeer extends WObjectPeer
} }
void handleJavaFocusEvent(FocusEvent fe) { void handleJavaFocusEvent(FocusEvent fe) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer(fe.toString()); focusLog.finer(fe.toString());
} }
setFocus(fe.getID() == FocusEvent.FOCUS_GAINED); setFocus(fe.getID() == FocusEvent.FOCUS_GAINED);
...@@ -682,7 +682,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -682,7 +682,7 @@ public abstract class WComponentPeer extends WObjectPeer
case WKeyboardFocusManagerPeer.SNFH_FAILURE: case WKeyboardFocusManagerPeer.SNFH_FAILURE:
return false; return false;
case WKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED: case WKeyboardFocusManagerPeer.SNFH_SUCCESS_PROCEED:
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Proceeding with request to " + lightweightChild + " in " + target); focusLog.finer("Proceeding with request to " + lightweightChild + " in " + target);
} }
Window parentWindow = SunToolkit.getContainingWindow((Component)target); Window parentWindow = SunToolkit.getContainingWindow((Component)target);
...@@ -695,7 +695,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -695,7 +695,7 @@ public abstract class WComponentPeer extends WObjectPeer
} }
boolean res = wpeer.requestWindowFocus(cause); boolean res = wpeer.requestWindowFocus(cause);
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer("Requested window focus: " + res); focusLog.finer("Requested window focus: " + res);
} }
// If parent window can be made focused and has been made focused(synchronously) // If parent window can be made focused and has been made focused(synchronously)
...@@ -717,7 +717,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -717,7 +717,7 @@ public abstract class WComponentPeer extends WObjectPeer
} }
private boolean rejectFocusRequestHelper(String logMsg) { private boolean rejectFocusRequestHelper(String logMsg) {
if (focusLog.isLoggable(PlatformLogger.FINER)) { if (focusLog.isLoggable(PlatformLogger.Level.FINER)) {
focusLog.finer(logMsg); focusLog.finer(logMsg);
} }
WKeyboardFocusManagerPeer.removeLastFocusRequest((Component)target); WKeyboardFocusManagerPeer.removeLastFocusRequest((Component)target);
...@@ -1094,7 +1094,7 @@ public abstract class WComponentPeer extends WObjectPeer ...@@ -1094,7 +1094,7 @@ public abstract class WComponentPeer extends WObjectPeer
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void applyShape(Region shape) { public void applyShape(Region shape) {
if (shapeLog.isLoggable(PlatformLogger.FINER)) { if (shapeLog.isLoggable(PlatformLogger.Level.FINER)) {
shapeLog.finer("*** INFO: Setting shape: PEER: " + this shapeLog.finer("*** INFO: Setting shape: PEER: " + this
+ "; TARGET: " + target + "; TARGET: " + target
+ "; SHAPE: " + shape); + "; SHAPE: " + shape);
......
...@@ -110,7 +110,7 @@ class WDesktopProperties { ...@@ -110,7 +110,7 @@ class WDesktopProperties {
*/ */
private synchronized void setBooleanProperty(String key, boolean value) { private synchronized void setBooleanProperty(String key, boolean value) {
assert( key != null ); assert( key != null );
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(key + "=" + String.valueOf(value)); log.fine(key + "=" + String.valueOf(value));
} }
map.put(key, Boolean.valueOf(value)); map.put(key, Boolean.valueOf(value));
...@@ -121,7 +121,7 @@ class WDesktopProperties { ...@@ -121,7 +121,7 @@ class WDesktopProperties {
*/ */
private synchronized void setIntegerProperty(String key, int value) { private synchronized void setIntegerProperty(String key, int value) {
assert( key != null ); assert( key != null );
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(key + "=" + String.valueOf(value)); log.fine(key + "=" + String.valueOf(value));
} }
map.put(key, Integer.valueOf(value)); map.put(key, Integer.valueOf(value));
...@@ -132,7 +132,7 @@ class WDesktopProperties { ...@@ -132,7 +132,7 @@ class WDesktopProperties {
*/ */
private synchronized void setStringProperty(String key, String value) { private synchronized void setStringProperty(String key, String value) {
assert( key != null ); assert( key != null );
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(key + "=" + value); log.fine(key + "=" + value);
} }
map.put(key, value); map.put(key, value);
...@@ -144,7 +144,7 @@ class WDesktopProperties { ...@@ -144,7 +144,7 @@ class WDesktopProperties {
private synchronized void setColorProperty(String key, int r, int g, int b) { private synchronized void setColorProperty(String key, int r, int g, int b) {
assert( key != null && r <= 255 && g <=255 && b <= 255 ); assert( key != null && r <= 255 && g <=255 && b <= 255 );
Color color = new Color(r, g, b); Color color = new Color(r, g, b);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(key + "=" + color); log.fine(key + "=" + color);
} }
map.put(key, color); map.put(key, color);
...@@ -172,14 +172,14 @@ class WDesktopProperties { ...@@ -172,14 +172,14 @@ class WDesktopProperties {
name = mappedName; name = mappedName;
} }
Font font = new Font(name, style, size); Font font = new Font(name, style, size);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(key + "=" + font); log.fine(key + "=" + font);
} }
map.put(key, font); map.put(key, font);
String sizeKey = key + ".height"; String sizeKey = key + ".height";
Integer iSize = Integer.valueOf(size); Integer iSize = Integer.valueOf(size);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(sizeKey + "=" + iSize); log.fine(sizeKey + "=" + iSize);
} }
map.put(sizeKey, iSize); map.put(sizeKey, iSize);
...@@ -192,7 +192,7 @@ class WDesktopProperties { ...@@ -192,7 +192,7 @@ class WDesktopProperties {
assert( key != null && winEventName != null ); assert( key != null && winEventName != null );
Runnable soundRunnable = new WinPlaySound(winEventName); Runnable soundRunnable = new WinPlaySound(winEventName);
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(key + "=" + soundRunnable); log.fine(key + "=" + soundRunnable);
} }
map.put(key, soundRunnable); map.put(key, soundRunnable);
......
...@@ -165,7 +165,7 @@ class WMenuItemPeer extends WObjectPeer implements MenuItemPeer { ...@@ -165,7 +165,7 @@ class WMenuItemPeer extends WObjectPeer implements MenuItemPeer {
ResourceBundle rb = ResourceBundle.getBundle("sun.awt.windows.awtLocalization"); ResourceBundle rb = ResourceBundle.getBundle("sun.awt.windows.awtLocalization");
return Font.decode(rb.getString("menuFont")); return Font.decode(rb.getString("menuFont"));
} catch (MissingResourceException e) { } catch (MissingResourceException e) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("WMenuItemPeer: " + e.getMessage()+". Using default MenuItem font.", e); log.fine("WMenuItemPeer: " + e.getMessage()+". Using default MenuItem font.", e);
} }
return new Font("SanSerif", Font.PLAIN, 11); return new Font("SanSerif", Font.PLAIN, 11);
......
...@@ -161,7 +161,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer { ...@@ -161,7 +161,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
} }
public PeerEvent coalesceEvents(PeerEvent newEvent) { public PeerEvent coalesceEvents(PeerEvent newEvent) {
if (log.isLoggable(PlatformLogger.FINEST)) { if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("ScrollEvent coalesced: " + newEvent); log.finest("ScrollEvent coalesced: " + newEvent);
} }
if (newEvent instanceof ScrollEvent) { if (newEvent instanceof ScrollEvent) {
...@@ -204,7 +204,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer { ...@@ -204,7 +204,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
} else if (orient == Adjustable.HORIZONTAL) { } else if (orient == Adjustable.HORIZONTAL) {
adj = (ScrollPaneAdjustable)sp.getHAdjustable(); adj = (ScrollPaneAdjustable)sp.getHAdjustable();
} else { } else {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Assertion failed: unknown orient"); log.fine("Assertion failed: unknown orient");
} }
} }
...@@ -231,7 +231,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer { ...@@ -231,7 +231,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
newpos = this.pos; newpos = this.pos;
break; break;
default: default:
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Assertion failed: unknown type"); log.fine("Assertion failed: unknown type");
} }
return; return;
...@@ -259,7 +259,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer { ...@@ -259,7 +259,7 @@ class WScrollPanePeer extends WPanelPeer implements ScrollPanePeer {
{ {
hwAncestor = hwAncestor.getParent(); hwAncestor = hwAncestor.getParent();
} }
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
if (hwAncestor == null) { if (hwAncestor == null) {
log.fine("Assertion (hwAncestor != null) failed, " + log.fine("Assertion (hwAncestor != null) failed, " +
"couldn't find heavyweight ancestor of scroll pane child"); "couldn't find heavyweight ancestor of scroll pane child");
......
...@@ -112,7 +112,7 @@ public class WToolkit extends SunToolkit implements Runnable { ...@@ -112,7 +112,7 @@ public class WToolkit extends SunToolkit implements Runnable {
initIDs(); initIDs();
// Print out which version of Windows is running // Print out which version of Windows is running
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Win version: " + getWindowsVersion()); log.fine("Win version: " + getWindowsVersion());
} }
...@@ -848,7 +848,7 @@ public class WToolkit extends SunToolkit implements Runnable { ...@@ -848,7 +848,7 @@ public class WToolkit extends SunToolkit implements Runnable {
lazilyInitWProps(); lazilyInitWProps();
Boolean prop = (Boolean) desktopProperties.get("awt.dynamicLayoutSupported"); Boolean prop = (Boolean) desktopProperties.get("awt.dynamicLayoutSupported");
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("In WTK.isDynamicLayoutSupported()" + log.finer("In WTK.isDynamicLayoutSupported()" +
" nativeDynamic == " + nativeDynamic + " nativeDynamic == " + nativeDynamic +
" wprops.dynamic == " + prop); " wprops.dynamic == " + prop);
...@@ -886,7 +886,7 @@ public class WToolkit extends SunToolkit implements Runnable { ...@@ -886,7 +886,7 @@ public class WToolkit extends SunToolkit implements Runnable {
Map<String, Object> props = wprops.getProperties(); Map<String, Object> props = wprops.getProperties();
for (String propName : props.keySet()) { for (String propName : props.keySet()) {
Object val = props.get(propName); Object val = props.get(propName);
if (log.isLoggable(PlatformLogger.FINER)) { if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("changed " + propName + " to " + val); log.finer("changed " + propName + " to " + val);
} }
setDesktopProperty(propName, val); setDesktopProperty(propName, val);
......
...@@ -460,7 +460,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, ...@@ -460,7 +460,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
public void updateGC() { public void updateGC() {
int scrn = getScreenImOn(); int scrn = getScreenImOn();
if (screenLog.isLoggable(PlatformLogger.FINER)) { if (screenLog.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Screen number: " + scrn); log.finer("Screen number: " + scrn);
} }
...@@ -485,7 +485,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, ...@@ -485,7 +485,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
// is now mostly on. // is now mostly on.
winGraphicsConfig = (Win32GraphicsConfig)newDev winGraphicsConfig = (Win32GraphicsConfig)newDev
.getDefaultConfiguration(); .getDefaultConfiguration();
if (screenLog.isLoggable(PlatformLogger.FINE)) { if (screenLog.isLoggable(PlatformLogger.Level.FINE)) {
if (winGraphicsConfig == null) { if (winGraphicsConfig == null) {
screenLog.fine("Assertion (winGraphicsConfig != null) failed"); screenLog.fine("Assertion (winGraphicsConfig != null) failed");
} }
...@@ -730,7 +730,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, ...@@ -730,7 +730,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
TranslucentWindowPainter currentPainter = painter; TranslucentWindowPainter currentPainter = painter;
if (currentPainter != null) { if (currentPainter != null) {
currentPainter.updateWindow(repaint); currentPainter.updateWindow(repaint);
} else if (log.isLoggable(PlatformLogger.FINER)) { } else if (log.isLoggable(PlatformLogger.Level.FINER)) {
log.finer("Translucent window painter is null in updateWindow"); log.finer("Translucent window painter is null in updateWindow");
} }
} }
...@@ -766,7 +766,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, ...@@ -766,7 +766,7 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer,
public void propertyChange(PropertyChangeEvent e) { public void propertyChange(PropertyChangeEvent e) {
boolean isDisposed = (Boolean)e.getNewValue(); boolean isDisposed = (Boolean)e.getNewValue();
if (isDisposed != true) { if (isDisposed != true) {
if (log.isLoggable(PlatformLogger.FINE)) { if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine(" Assertion (newValue != true) failed for AppContext.GUI_DISPOSED "); log.fine(" Assertion (newValue != true) failed for AppContext.GUI_DISPOSED ");
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册