提交 f0b89a21 编写于 作者: M mchung

6879044: Eliminate the dependency on logging from the AWT/2D/Swing classes

Summary: Replace calls to Logger with sun.util.logging.PlatformLogger
Reviewed-by: prr, art, alexp, dcherepanov, igor, dav, anthony
上级 d3b300ff
...@@ -30,9 +30,8 @@ import java.awt.event.*; ...@@ -30,9 +30,8 @@ import java.awt.event.*;
import java.awt.peer.ComponentPeer; import java.awt.peer.ComponentPeer;
import java.awt.peer.LightweightPeer; import java.awt.peer.LightweightPeer;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.logging.Logger;
import java.util.logging.Level;
import sun.awt.AWTAccessor; import sun.awt.AWTAccessor;
import sun.util.logging.PlatformLogger;
/** /**
* The root event class for all AWT events. * The root event class for all AWT events.
...@@ -76,7 +75,7 @@ import sun.awt.AWTAccessor; ...@@ -76,7 +75,7 @@ import sun.awt.AWTAccessor;
* @since 1.1 * @since 1.1
*/ */
public abstract class AWTEvent extends EventObject { public abstract class AWTEvent extends EventObject {
private static final Logger log = Logger.getLogger("java.awt.AWTEvent"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AWTEvent");
private byte bdata[]; private byte bdata[];
/** /**
...@@ -252,12 +251,12 @@ public abstract class AWTEvent extends EventObject { ...@@ -252,12 +251,12 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.FINE, "AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e); log.fine("AWTEvent.get_InputEvent_CanAccessSystemClipboard() got NoSuchFieldException ", e);
} }
} }
return null; return null;
...@@ -549,8 +548,8 @@ public abstract class AWTEvent extends EventObject { ...@@ -549,8 +548,8 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.FINE, "AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e); log.fine("AWTEvent.copyPrivateDataInto() got IllegalAccessException ", e);
} }
} }
} }
...@@ -564,8 +563,8 @@ public abstract class AWTEvent extends EventObject { ...@@ -564,8 +563,8 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.FINE, "AWTEvent.dispatched() got IllegalAccessException ", e); log.fine("AWTEvent.dispatched() got IllegalAccessException ", e);
} }
} }
} }
......
...@@ -25,21 +25,21 @@ ...@@ -25,21 +25,21 @@
package java.awt; package java.awt;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
abstract class AttributeValue { abstract class AttributeValue {
private static final Logger log = Logger.getLogger("java.awt.AttributeValue"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.AttributeValue");
private final int value; private final int value;
private final String[] names; private final String[] names;
protected AttributeValue(int value, String[] names) { protected AttributeValue(int value, String[] names) {
if (log.isLoggable(Level.FINEST)) { if (log.isLoggable(PlatformLogger.FINEST)) {
log.log(Level.FINEST, "value = " + value + ", names = " + names); log.finest("value = " + value + ", names = " + names);
} }
if (log.isLoggable(Level.FINER)) {
if (log.isLoggable(PlatformLogger.FINER)) {
if ((value < 0) || (names == null) || (value >= names.length)) { if ((value < 0) || (names == null) || (value >= names.length)) {
log.log(Level.FINER, "Assertion failed"); log.finer("Assertion failed");
} }
} }
this.value = value; this.value = value;
......
...@@ -46,10 +46,10 @@ import java.util.EventListener; ...@@ -46,10 +46,10 @@ import java.util.EventListener;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.logging.*;
import javax.accessibility.*; import javax.accessibility.*;
import sun.util.logging.PlatformLogger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.CausedFocusEvent; import sun.awt.CausedFocusEvent;
import sun.awt.PeerEvent; import sun.awt.PeerEvent;
...@@ -85,8 +85,8 @@ import sun.java2d.pipe.Region; ...@@ -85,8 +85,8 @@ import sun.java2d.pipe.Region;
*/ */
public class Container extends Component { public class Container extends Component {
private static final Logger log = Logger.getLogger("java.awt.Container"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Container");
private static final Logger eventLog = Logger.getLogger("java.awt.event.Container"); private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.Container");
private static final Component[] EMPTY_ARRAY = new Component[0]; private static final Component[] EMPTY_ARRAY = new Component[0];
...@@ -201,7 +201,7 @@ public class Container extends Component { ...@@ -201,7 +201,7 @@ public class Container extends Component {
private transient int numOfHWComponents = 0; private transient int numOfHWComponents = 0;
private transient int numOfLWComponents = 0; private transient int numOfLWComponents = 0;
private static final Logger mixingLog = Logger.getLogger("java.awt.mixing.Container"); private static final PlatformLogger mixingLog = PlatformLogger.getLogger("java.awt.mixing.Container");
/** /**
* @serialField ncomponents int * @serialField ncomponents int
...@@ -1287,33 +1287,33 @@ public class Container extends Component { ...@@ -1287,33 +1287,33 @@ 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(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
// Verify listeningChildren is correct // Verify listeningChildren is correct
int sum = 0; int sum = 0;
for (Component comp : component) { for (Component comp : component) {
sum += comp.numListening(mask); sum += comp.numListening(mask);
} }
if (listeningChildren != sum) { if (listeningChildren != sum) {
eventLog.log(Level.FINE, "Assertion (listeningChildren == sum) failed"); eventLog.fine("Assertion (listeningChildren == sum) failed");
} }
} }
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(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
// Verify listeningBoundsChildren is correct // Verify listeningBoundsChildren is correct
int sum = 0; int sum = 0;
for (Component comp : component) { for (Component comp : component) {
sum += comp.numListening(mask); sum += comp.numListening(mask);
} }
if (listeningBoundsChildren != sum) { if (listeningBoundsChildren != sum) {
eventLog.log(Level.FINE, "Assertion (listeningBoundsChildren == sum) failed"); eventLog.fine("Assertion (listeningBoundsChildren == sum) failed");
} }
} }
return listeningBoundsChildren + superListening; return listeningBoundsChildren + superListening;
} else { } else {
// assert false; // assert false;
if (eventLog.isLoggable(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.log(Level.FINE, "This code must never be reached"); eventLog.fine("This code must never be reached");
} }
return superListening; return superListening;
} }
...@@ -1321,13 +1321,13 @@ public class Container extends Component { ...@@ -1321,13 +1321,13 @@ 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(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.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 |
AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK)); AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK));
if (!toAssert) { if (!toAssert) {
eventLog.log(Level.FINE, "Assertion failed"); eventLog.fine("Assertion failed");
} }
} }
...@@ -1362,14 +1362,14 @@ public class Container extends Component { ...@@ -1362,14 +1362,14 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
// Verify descendantsCount is correct // Verify descendantsCount is correct
int sum = 0; int sum = 0;
for (Component comp : component) { for (Component comp : component) {
sum += comp.countHierarchyMembers(); sum += comp.countHierarchyMembers();
} }
if (descendantsCount != sum) { if (descendantsCount != sum) {
log.log(Level.FINE, "Assertion (descendantsCount == sum) failed"); log.fine("Assertion (descendantsCount == sum) failed");
} }
} }
return descendantsCount + 1; return descendantsCount + 1;
...@@ -3924,7 +3924,7 @@ public class Container extends Component { ...@@ -3924,7 +3924,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(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder); "; shape=" + shape + "; fromZ=" + fromZorder + "; toZ=" + toZorder);
} }
...@@ -3961,7 +3961,7 @@ public class Container extends Component { ...@@ -3961,7 +3961,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(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; fromZ=" + fromZorder + "; toZ=" + toZorder); "; fromZ=" + fromZorder + "; toZ=" + toZorder);
} }
...@@ -4065,7 +4065,7 @@ public class Container extends Component { ...@@ -4065,7 +4065,7 @@ public class Container extends Component {
@Override @Override
void mixOnShowing() { void mixOnShowing() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
...@@ -4090,7 +4090,7 @@ public class Container extends Component { ...@@ -4090,7 +4090,7 @@ public class Container extends Component {
@Override @Override
void mixOnHiding(boolean isLightweight) { void mixOnHiding(boolean isLightweight) {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; isLightweight=" + isLightweight); "; isLightweight=" + isLightweight);
} }
...@@ -4104,7 +4104,7 @@ public class Container extends Component { ...@@ -4104,7 +4104,7 @@ public class Container extends Component {
@Override @Override
void mixOnReshaping() { void mixOnReshaping() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
...@@ -4139,7 +4139,7 @@ public class Container extends Component { ...@@ -4139,7 +4139,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(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this + mixingLog.fine("this = " + this +
"; oldZ=" + oldZorder + "; newZ=" + newZorder); "; oldZ=" + oldZorder + "; newZ=" + newZorder);
} }
...@@ -4160,7 +4160,7 @@ public class Container extends Component { ...@@ -4160,7 +4160,7 @@ public class Container extends Component {
@Override @Override
void mixOnValidating() { void mixOnValidating() {
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
if (mixingLog.isLoggable(Level.FINE)) { if (mixingLog.isLoggable(PlatformLogger.FINE)) {
mixingLog.fine("this = " + this); mixingLog.fine("this = " + this);
} }
...@@ -4206,7 +4206,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { ...@@ -4206,7 +4206,7 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener {
*/ */
private static final int LWD_MOUSE_DRAGGED_OVER = 1500; private static final int LWD_MOUSE_DRAGGED_OVER = 1500;
private static final Logger eventLog = Logger.getLogger("java.awt.event.LightweightDispatcher"); private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.LightweightDispatcher");
LightweightDispatcher(Container nativeContainer) { LightweightDispatcher(Container nativeContainer) {
this.nativeContainer = nativeContainer; this.nativeContainer = nativeContainer;
...@@ -4348,8 +4348,8 @@ class LightweightDispatcher implements java.io.Serializable, AWTEventListener { ...@@ -4348,8 +4348,8 @@ 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(Level.FINEST) && (mouseOver != null)) { if (eventLog.isLoggable(PlatformLogger.FINEST) && (mouseOver != null)) {
eventLog.log(Level.FINEST, "retargeting mouse wheel to " + eventLog.finest("retargeting mouse wheel to " +
mouseOver.getName() + ", " + mouseOver.getName() + ", " +
mouseOver.getClass()); mouseOver.getClass());
} }
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
*/ */
package java.awt; package java.awt;
import java.util.logging.*;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import sun.util.logging.PlatformLogger;
/** /**
* A FocusTraversalPolicy that determines traversal order based on the order * A FocusTraversalPolicy that determines traversal order based on the order
...@@ -60,7 +60,7 @@ import java.util.ArrayList; ...@@ -60,7 +60,7 @@ import java.util.ArrayList;
public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
implements java.io.Serializable implements java.io.Serializable
{ {
private static final Logger log = Logger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.ContainerOrderFocusTraversalPolicy");
final private int FORWARD_TRAVERSAL = 0; final private int FORWARD_TRAVERSAL = 0;
final private int BACKWARD_TRAVERSAL = 1; final private int BACKWARD_TRAVERSAL = 1;
...@@ -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(Level.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.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(Level.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.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(Level.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Searching in " + aContainer + " for component after " + aComponent);
if (aContainer == null || aComponent == null) { if (aContainer == null || aComponent == null) {
throw new IllegalArgumentException("aContainer and aComponent cannot be null"); throw new IllegalArgumentException("aContainer and aComponent cannot be null");
...@@ -236,7 +236,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -236,7 +236,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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -247,7 +247,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -247,7 +247,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(Level.FINE)) log.fine("### FTP returned " + afterComp); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + afterComp);
return afterComp; return afterComp;
} }
aComponent = provider; aComponent = provider;
...@@ -255,12 +255,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -255,12 +255,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent); if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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);
...@@ -325,7 +325,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -325,7 +325,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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -336,7 +336,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -336,7 +336,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(Level.FINE)) log.fine("### FTP returned " + beforeComp); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + beforeComp);
return beforeComp; return beforeComp;
} }
aComponent = provider; aComponent = provider;
...@@ -349,12 +349,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -349,12 +349,12 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent); if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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);
...@@ -401,7 +401,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -401,7 +401,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(Level.FINE)) log.fine("### Getting first component in " + aContainer); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting first component in " + aContainer);
if (aContainer == null) { if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null"); throw new IllegalArgumentException("aContainer cannot be null");
...@@ -420,10 +420,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -420,10 +420,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null; return null;
} }
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (Component comp : cycle) { for (Component comp : cycle) {
if (accept(comp)) { if (accept(comp)) {
...@@ -451,7 +451,7 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -451,7 +451,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(Level.FINE)) log.fine("### Getting last component in " + aContainer); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting last component in " + aContainer);
if (aContainer == null) { if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null"); throw new IllegalArgumentException("aContainer cannot be null");
...@@ -470,10 +470,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -470,10 +470,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null; return null;
} }
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (int i= cycle.size() - 1; i >= 0; i--) { for (int i= cycle.size() - 1; i >= 0; i--) {
Component comp = cycle.get(i); Component comp = cycle.get(i);
......
...@@ -36,10 +36,10 @@ import java.util.Hashtable; ...@@ -36,10 +36,10 @@ import java.util.Hashtable;
import java.util.Properties; import java.util.Properties;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.logging.*;
import java.security.AccessController; import java.security.AccessController;
import sun.util.logging.PlatformLogger;
/** /**
* A class to encapsulate the bitmap representation of the mouse cursor. * A class to encapsulate the bitmap representation of the mouse cursor.
* *
...@@ -191,7 +191,7 @@ public class Cursor implements java.io.Serializable { ...@@ -191,7 +191,7 @@ public class Cursor implements java.io.Serializable {
*/ */
private static final long serialVersionUID = 8028237497568985504L; private static final long serialVersionUID = 8028237497568985504L;
private static final Logger log = Logger.getLogger("java.awt.Cursor"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Cursor");
static { static {
/* ensure that the necessary native libraries are loaded */ /* ensure that the necessary native libraries are loaded */
...@@ -298,8 +298,8 @@ public class Cursor implements java.io.Serializable { ...@@ -298,8 +298,8 @@ 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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null"); log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
} }
return null; return null;
} }
...@@ -353,8 +353,8 @@ public class Cursor implements java.io.Serializable { ...@@ -353,8 +353,8 @@ public class Cursor implements java.io.Serializable {
} }
if (cursor == null) { if (cursor == null) {
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "Cursor.getSystemCustomCursor(" + name + ") returned null"); log.finer("Cursor.getSystemCustomCursor(" + name + ") returned null");
} }
} else { } else {
systemCustomCursors.put(name, cursor); systemCustomCursors.put(name, cursor);
......
...@@ -35,8 +35,7 @@ import java.util.Iterator; ...@@ -35,8 +35,7 @@ import java.util.Iterator;
import java.util.ListIterator; import java.util.ListIterator;
import java.util.Set; import java.util.Set;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
...@@ -62,7 +61,7 @@ import sun.awt.CausedFocusEvent; ...@@ -62,7 +61,7 @@ import sun.awt.CausedFocusEvent;
* @since 1.4 * @since 1.4
*/ */
public class DefaultKeyboardFocusManager extends KeyboardFocusManager { public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
private static final Logger focusLog = Logger.getLogger("java.awt.focus.DefaultKeyboardFocusManager"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.DefaultKeyboardFocusManager");
// null weak references to not create too many objects // null weak references to not create too many objects
private static final WeakReference<Window> NULL_WINDOW_WR = private static final WeakReference<Window> NULL_WINDOW_WR =
...@@ -275,7 +274,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -275,7 +274,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(Level.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e); if (focusLog.isLoggable(PlatformLogger.FINE) && (e instanceof WindowEvent || e instanceof FocusEvent)) focusLog.fine("" + e);
switch (e.getID()) { switch (e.getID()) {
case WindowEvent.WINDOW_GAINED_FOCUS: { case WindowEvent.WINDOW_GAINED_FOCUS: {
WindowEvent we = (WindowEvent)e; WindowEvent we = (WindowEvent)e;
...@@ -378,9 +377,9 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -378,9 +377,9 @@ 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(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "tempLost {0}, toFocus {1}", focusLog.finer("tempLost {0}, toFocus {1}",
new Object[]{tempLost, toFocus}); tempLost, toFocus);
} }
if (tempLost != null) { if (tempLost != null) {
tempLost.requestFocusInWindow(CausedFocusEvent.Cause.ACTIVATION); tempLost.requestFocusInWindow(CausedFocusEvent.Cause.ACTIVATION);
...@@ -447,8 +446,8 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -447,8 +446,8 @@ 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(Level.FINE)) { if (focusLog.isLoggable(PlatformLogger.FINE)) {
focusLog.log(Level.FINE, "Skipping {0} because focus owner is the same", new Object[] {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
// type-ahead markers associated with it. // type-ahead markers associated with it.
...@@ -565,16 +564,16 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -565,16 +564,16 @@ 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(Level.FINE)) focusLog.log(Level.FINE, "Skipping {0} because focus owner is null", if (focusLog.isLoggable(PlatformLogger.FINE))
new Object[] {e}); focusLog.fine("Skipping {0} because focus owner is null", e);
break; break;
} }
// Ignore cases where a Component loses focus to itself. // Ignore cases where a Component loses focus to itself.
// 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(Level.FINE)) focusLog.log(Level.FINE, "Skipping {0} because current focus owner is equal to opposite", if (focusLog.isLoggable(PlatformLogger.FINE))
new Object[] {e}); focusLog.fine("Skipping {0} because current focus owner is equal to opposite", e);
break; break;
} }
...@@ -642,9 +641,10 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -642,9 +641,10 @@ 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(Level.FINE)) focusLog.log(Level.FINE, "Active {0}, Current focused {1}, losing focus {2} opposite {3}", if (focusLog.isLoggable(PlatformLogger.FINE))
new Object[] {activeWindow, currentFocusedWindow, focusLog.fine("Active {0}, Current focused {1}, losing focus {2} opposite {3}",
losingFocusWindow, oppositeWindow}); activeWindow, currentFocusedWindow,
losingFocusWindow, oppositeWindow);
if (currentFocusedWindow == null) { if (currentFocusedWindow == null) {
break; break;
} }
...@@ -828,7 +828,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -828,7 +828,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
} }
} }
if (ke != null) { if (ke != null) {
focusLog.log(Level.FINER, "Pumping approved event {0}", new Object[] {ke}); focusLog.finer("Pumping approved event {0}", ke);
enqueuedKeyEvents.removeFirst(); enqueuedKeyEvents.removeFirst();
} }
} }
...@@ -843,14 +843,14 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -843,14 +843,14 @@ 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(Level.FINEST)) { if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.log(Level.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) {
Iterator iter = typeAheadMarkers.iterator(); Iterator iter = typeAheadMarkers.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
TypeAheadMarker marker = (TypeAheadMarker)iter.next(); TypeAheadMarker marker = (TypeAheadMarker)iter.next();
focusLog.log(Level.FINEST, " {0}", marker); focusLog.finest(" {0}", marker);
} }
} }
} }
...@@ -878,7 +878,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -878,7 +878,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) {
focusLog.log(Level.FINER, "Storing event {0} because of marker {1}", new Object[] {ke, marker}); focusLog.finer("Storing event {0} because of marker {1}", ke, marker);
enqueuedKeyEvents.addLast(ke); enqueuedKeyEvents.addLast(ke);
return true; return true;
} }
...@@ -890,7 +890,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -890,7 +890,7 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
} }
case FocusEvent.FOCUS_GAINED: case FocusEvent.FOCUS_GAINED:
focusLog.log(Level.FINEST, "Markers before FOCUS_GAINED on {0}", new Object[] {target}); focusLog.finest("Markers before FOCUS_GAINED on {0}", target);
dumpMarkers(); dumpMarkers();
// Search the marker list for the first marker tied to // Search the marker list for the first marker tied to
// the Component which just gained focus. Then remove // the Component which just gained focus. Then remove
...@@ -919,10 +919,10 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -919,10 +919,10 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
} }
} else { } else {
// Exception condition - event without marker // Exception condition - event without marker
focusLog.log(Level.FINER, "Event without marker {0}", e); focusLog.finer("Event without marker {0}", e);
} }
} }
focusLog.log(Level.FINEST, "Markers after FOCUS_GAINED"); focusLog.finest("Markers after FOCUS_GAINED");
dumpMarkers(); dumpMarkers();
redispatchEvent(target, e); redispatchEvent(target, e);
...@@ -1159,8 +1159,8 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -1159,8 +1159,8 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
return; return;
} }
focusLog.log(Level.FINER, "Enqueue at {0} for {1}", focusLog.finer("Enqueue at {0} for {1}",
new Object[] {after, untilFocused}); after, untilFocused);
int insertionIndex = 0, int insertionIndex = 0,
i = typeAheadMarkers.size(); i = typeAheadMarkers.size();
...@@ -1199,8 +1199,8 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager { ...@@ -1199,8 +1199,8 @@ public class DefaultKeyboardFocusManager extends KeyboardFocusManager {
return; return;
} }
focusLog.log(Level.FINER, "Dequeue at {0} for {1}", focusLog.finer("Dequeue at {0} for {1}",
new Object[] {after, untilFocused}); after, untilFocused);
TypeAheadMarker marker; TypeAheadMarker marker;
ListIterator iter = typeAheadMarkers.listIterator ListIterator iter = typeAheadMarkers.listIterator
......
...@@ -36,7 +36,7 @@ import sun.awt.AWTAutoShutdown; ...@@ -36,7 +36,7 @@ import sun.awt.AWTAutoShutdown;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
import java.util.Vector; import java.util.Vector;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.dnd.SunDragSourceContextPeer; import sun.awt.dnd.SunDragSourceContextPeer;
import sun.awt.EventQueueDelegate; import sun.awt.EventQueueDelegate;
...@@ -61,7 +61,7 @@ import sun.awt.EventQueueDelegate; ...@@ -61,7 +61,7 @@ import sun.awt.EventQueueDelegate;
* @since 1.1 * @since 1.1
*/ */
class EventDispatchThread extends Thread { class EventDispatchThread extends Thread {
private static final Logger eventLog = Logger.getLogger("java.awt.event.EventDispatchThread"); private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventDispatchThread");
private EventQueue theQueue; private EventQueue theQueue;
private boolean doDispatch = true; private boolean doDispatch = true;
...@@ -275,8 +275,8 @@ class EventDispatchThread extends Thread { ...@@ -275,8 +275,8 @@ class EventDispatchThread extends Thread {
} }
while (eventOK == false); while (eventOK == false);
if (eventLog.isLoggable(Level.FINEST)) { if (eventLog.isLoggable(PlatformLogger.FINEST)) {
eventLog.log(Level.FINEST, "Dispatching: " + event); eventLog.finest("Dispatching: " + event);
} }
Object handle = null; Object handle = null;
...@@ -308,8 +308,8 @@ class EventDispatchThread extends Thread { ...@@ -308,8 +308,8 @@ class EventDispatchThread extends Thread {
} }
private void processException(Throwable e) { private void processException(Throwable e) {
if (eventLog.isLoggable(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.log(Level.FINE, "Processing exception: " + e); eventLog.fine("Processing exception: " + e);
} }
getUncaughtExceptionHandler().uncaughtException(this, e); getUncaughtExceptionHandler().uncaughtException(this, e);
// don't rethrow the exception to avoid EDT recreation // don't rethrow the exception to avoid EDT recreation
......
...@@ -36,7 +36,7 @@ import java.security.AccessController; ...@@ -36,7 +36,7 @@ import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import java.util.EmptyStackException; import java.util.EmptyStackException;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.AWTAutoShutdown; import sun.awt.AWTAutoShutdown;
...@@ -153,7 +153,7 @@ public class EventQueue { ...@@ -153,7 +153,7 @@ public class EventQueue {
private final String name = "AWT-EventQueue-" + nextThreadNum(); private final String name = "AWT-EventQueue-" + nextThreadNum();
private static final Logger eventLog = Logger.getLogger("java.awt.event.EventQueue"); private static final PlatformLogger eventLog = PlatformLogger.getLogger("java.awt.event.EventQueue");
static { static {
AWTAccessor.setEventQueueAccessor( AWTAccessor.setEventQueueAccessor(
...@@ -707,8 +707,8 @@ public class EventQueue { ...@@ -707,8 +707,8 @@ public class EventQueue {
* @since 1.2 * @since 1.2
*/ */
public synchronized void push(EventQueue newEventQueue) { public synchronized void push(EventQueue newEventQueue) {
if (eventLog.isLoggable(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.log(Level.FINE, "EventQueue.push(" + newEventQueue + ")"); eventLog.fine("EventQueue.push(" + newEventQueue + ")");
} }
if (nextQueue != null) { if (nextQueue != null) {
...@@ -722,8 +722,8 @@ public class EventQueue { ...@@ -722,8 +722,8 @@ public class EventQueue {
try { try {
newEventQueue.postEventPrivate(getNextEvent()); newEventQueue.postEventPrivate(getNextEvent());
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
if (eventLog.isLoggable(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.log(Level.FINE, "Interrupted push", ie); eventLog.fine("Interrupted push", ie);
} }
} }
} }
...@@ -766,8 +766,8 @@ public class EventQueue { ...@@ -766,8 +766,8 @@ public class EventQueue {
* @since 1.2 * @since 1.2
*/ */
protected void pop() throws EmptyStackException { protected void pop() throws EmptyStackException {
if (eventLog.isLoggable(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.log(Level.FINE, "EventQueue.pop(" + this + ")"); eventLog.fine("EventQueue.pop(" + this + ")");
} }
// To prevent deadlock, we lock on the previous EventQueue before // To prevent deadlock, we lock on the previous EventQueue before
...@@ -790,8 +790,8 @@ public class EventQueue { ...@@ -790,8 +790,8 @@ public class EventQueue {
try { try {
previousQueue.postEventPrivate(getNextEvent()); previousQueue.postEventPrivate(getNextEvent());
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
if (eventLog.isLoggable(Level.FINE)) { if (eventLog.isLoggable(PlatformLogger.FINE)) {
eventLog.log(Level.FINE, "Interrupted pop", ie); eventLog.fine("Interrupted pop", ie);
} }
} }
} }
......
...@@ -53,8 +53,7 @@ import java.util.Set; ...@@ -53,8 +53,7 @@ import java.util.Set;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.HeadlessToolkit; import sun.awt.HeadlessToolkit;
...@@ -111,7 +110,7 @@ public abstract class KeyboardFocusManager ...@@ -111,7 +110,7 @@ public abstract class KeyboardFocusManager
{ {
// Shared focus engine logger // Shared focus engine logger
private static final Logger focusLog = Logger.getLogger("java.awt.focus.KeyboardFocusManager"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("java.awt.focus.KeyboardFocusManager");
static { static {
/* ensure that the necessary native libraries are loaded */ /* ensure that the necessary native libraries are loaded */
...@@ -154,7 +153,7 @@ public abstract class KeyboardFocusManager ...@@ -154,7 +153,7 @@ public abstract class KeyboardFocusManager
*/ */
private static native void initIDs(); private static native void initIDs();
private static final Logger log = Logger.getLogger("java.awt.KeyboardFocusManager"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.KeyboardFocusManager");
/** /**
* The identifier for the Forward focus traversal keys. * The identifier for the Forward focus traversal keys.
...@@ -504,8 +503,8 @@ public abstract class KeyboardFocusManager ...@@ -504,8 +503,8 @@ public abstract class KeyboardFocusManager
if (this == getCurrentKeyboardFocusManager()) { if (this == getCurrentKeyboardFocusManager()) {
return focusOwner; return focusOwner;
} else { } else {
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
} }
throw new SecurityException(notPrivileged); throw new SecurityException(notPrivileged);
} }
...@@ -609,9 +608,9 @@ public abstract class KeyboardFocusManager ...@@ -609,9 +608,9 @@ public abstract class KeyboardFocusManager
} }
void setNativeFocusOwner(Component comp) { void setNativeFocusOwner(Component comp) {
if (focusLog.isLoggable(Level.FINEST)) { if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.log(Level.FINEST, "Calling peer {0} setCurrentFocusOwner for {1}", focusLog.finest("Calling peer {0} setCurrentFocusOwner for {1}",
new Object[] {peer, comp}); peer, comp);
} }
peer.setCurrentFocusOwner(comp); peer.setCurrentFocusOwner(comp);
} }
...@@ -673,8 +672,8 @@ public abstract class KeyboardFocusManager ...@@ -673,8 +672,8 @@ public abstract class KeyboardFocusManager
if (this == getCurrentKeyboardFocusManager()) { if (this == getCurrentKeyboardFocusManager()) {
return permanentFocusOwner; return permanentFocusOwner;
} else { } else {
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
} }
throw new SecurityException(notPrivileged); throw new SecurityException(notPrivileged);
} }
...@@ -781,8 +780,8 @@ public abstract class KeyboardFocusManager ...@@ -781,8 +780,8 @@ public abstract class KeyboardFocusManager
if (this == getCurrentKeyboardFocusManager()) { if (this == getCurrentKeyboardFocusManager()) {
return focusedWindow; return focusedWindow;
} else { } else {
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
} }
throw new SecurityException(notPrivileged); throw new SecurityException(notPrivileged);
} }
...@@ -885,8 +884,8 @@ public abstract class KeyboardFocusManager ...@@ -885,8 +884,8 @@ public abstract class KeyboardFocusManager
if (this == getCurrentKeyboardFocusManager()) { if (this == getCurrentKeyboardFocusManager()) {
return activeWindow; return activeWindow;
} else { } else {
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
} }
throw new SecurityException(notPrivileged); throw new SecurityException(notPrivileged);
} }
...@@ -919,8 +918,8 @@ public abstract class KeyboardFocusManager ...@@ -919,8 +918,8 @@ public abstract class KeyboardFocusManager
Window oldActiveWindow; Window oldActiveWindow;
synchronized (KeyboardFocusManager.class) { synchronized (KeyboardFocusManager.class) {
oldActiveWindow = getActiveWindow(); oldActiveWindow = getActiveWindow();
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "Setting global active window to " + activeWindow + ", old active " + oldActiveWindow); focusLog.finer("Setting global active window to " + activeWindow + ", old active " + oldActiveWindow);
} }
try { try {
...@@ -1215,8 +1214,8 @@ public abstract class KeyboardFocusManager ...@@ -1215,8 +1214,8 @@ public abstract class KeyboardFocusManager
if (this == getCurrentKeyboardFocusManager()) { if (this == getCurrentKeyboardFocusManager()) {
return currentFocusCycleRoot; return currentFocusCycleRoot;
} else { } else {
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "This manager is " + this + ", current is " + getCurrentKeyboardFocusManager()); focusLog.finer("This manager is " + this + ", current is " + getCurrentKeyboardFocusManager());
} }
throw new SecurityException(notPrivileged); throw new SecurityException(notPrivileged);
} }
...@@ -2149,9 +2148,9 @@ public abstract class KeyboardFocusManager ...@@ -2149,9 +2148,9 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (heavyweight == null) { if (heavyweight == null) {
log.log(Level.FINE, "Assertion (heavyweight != null) failed"); log.fine("Assertion (heavyweight != null) failed");
} }
} }
...@@ -2161,12 +2160,12 @@ public abstract class KeyboardFocusManager ...@@ -2161,12 +2160,12 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (this == HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) { if (this == HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) {
log.log(Level.FINE, "Assertion (this != HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) failed"); log.fine("Assertion (this != HeavyweightFocusRequest.CLEAR_GLOBAL_FOCUS_OWNER) failed");
} }
if (descendant == null) { if (descendant == null) {
log.log(Level.FINE, "Assertion (descendant != null) failed"); log.fine("Assertion (descendant != null) failed");
} }
} }
...@@ -2339,12 +2338,12 @@ public abstract class KeyboardFocusManager ...@@ -2339,12 +2338,12 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (heavyweight == null) { if (heavyweight == null) {
log.log(Level.FINE, "Assertion (heavyweight != null) failed"); log.fine("Assertion (heavyweight != null) failed");
} }
if (time == 0) { if (time == 0) {
log.log(Level.FINE, "Assertion (time != 0) failed"); log.fine("Assertion (time != 0) failed");
} }
} }
...@@ -2361,30 +2360,30 @@ public abstract class KeyboardFocusManager ...@@ -2361,30 +2360,30 @@ 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(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
focusLog.log(Level.FINER, "SNFH for {0} in {1}", focusLog.finer("SNFH for {0} in {1}",
new Object[] {descendant, heavyweight}); descendant, heavyweight);
} }
if (focusLog.isLoggable(Level.FINEST)) { if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.log(Level.FINEST, "0. Current focus owner {0}", focusLog.finest("0. Current focus owner {0}",
currentFocusOwner); currentFocusOwner);
focusLog.log(Level.FINEST, "0. Native focus owner {0}", focusLog.finest("0. Native focus owner {0}",
nativeFocusOwner); nativeFocusOwner);
focusLog.log(Level.FINEST, "0. Native focused window {0}", focusLog.finest("0. Native focused window {0}",
nativeFocusedWindow); nativeFocusedWindow);
} }
synchronized (heavyweightRequests) { synchronized (heavyweightRequests) {
HeavyweightFocusRequest hwFocusRequest = getLastHWRequest(); HeavyweightFocusRequest hwFocusRequest = getLastHWRequest();
if (focusLog.isLoggable(Level.FINEST)) { if (focusLog.isLoggable(PlatformLogger.FINEST)) {
focusLog.log(Level.FINEST, "Request {0}", hwFocusRequest); focusLog.finest("Request {0}", hwFocusRequest);
} }
if (hwFocusRequest == null && if (hwFocusRequest == null &&
heavyweight == nativeFocusOwner) heavyweight == nativeFocusOwner)
{ {
if (descendant == currentFocusOwner) { if (descendant == currentFocusOwner) {
// Redundant request. // Redundant request.
if (focusLog.isLoggable(Level.FINEST)) if (focusLog.isLoggable(PlatformLogger.FINEST))
focusLog.log(Level.FINEST, "1. SNFH_FAILURE for {0}", focusLog.finest("1. SNFH_FAILURE for {0}",
descendant); descendant);
return SNFH_FAILURE; return SNFH_FAILURE;
} }
...@@ -2417,8 +2416,8 @@ public abstract class KeyboardFocusManager ...@@ -2417,8 +2416,8 @@ public abstract class KeyboardFocusManager
// SunToolkit.postPriorityEvent(newFocusOwnerEvent); // SunToolkit.postPriorityEvent(newFocusOwnerEvent);
SunToolkit.postEvent(descendant.appContext, newFocusOwnerEvent); SunToolkit.postEvent(descendant.appContext, newFocusOwnerEvent);
if (focusLog.isLoggable(Level.FINEST)) if (focusLog.isLoggable(PlatformLogger.FINEST))
focusLog.log(Level.FINEST, "2. SNFH_HANDLED for {0}", descendant); focusLog.finest("2. SNFH_HANDLED for {0}", descendant);
return SNFH_SUCCESS_HANDLED; return SNFH_SUCCESS_HANDLED;
} else if (hwFocusRequest != null && } else if (hwFocusRequest != null &&
hwFocusRequest.heavyweight == heavyweight) { hwFocusRequest.heavyweight == heavyweight) {
...@@ -2431,7 +2430,7 @@ public abstract class KeyboardFocusManager ...@@ -2431,7 +2430,7 @@ public abstract class KeyboardFocusManager
manager.enqueueKeyEvents(time, descendant); manager.enqueueKeyEvents(time, descendant);
} }
if (focusLog.isLoggable(Level.FINEST)) if (focusLog.isLoggable(PlatformLogger.FINEST))
focusLog.finest("3. SNFH_HANDLED for lightweight" + focusLog.finest("3. SNFH_HANDLED for lightweight" +
descendant + " in " + heavyweight); descendant + " in " + heavyweight);
return SNFH_SUCCESS_HANDLED; return SNFH_SUCCESS_HANDLED;
...@@ -2454,7 +2453,7 @@ public abstract class KeyboardFocusManager ...@@ -2454,7 +2453,7 @@ public abstract class KeyboardFocusManager
(hwFocusRequest != null) (hwFocusRequest != null)
? hwFocusRequest.heavyweight ? hwFocusRequest.heavyweight
: nativeFocusedWindow)) { : nativeFocusedWindow)) {
if (focusLog.isLoggable(Level.FINEST)) if (focusLog.isLoggable(PlatformLogger.FINEST))
focusLog.finest("4. SNFH_FAILURE for " + descendant); focusLog.finest("4. SNFH_FAILURE for " + descendant);
return SNFH_FAILURE; return SNFH_FAILURE;
} }
...@@ -2464,7 +2463,7 @@ public abstract class KeyboardFocusManager ...@@ -2464,7 +2463,7 @@ public abstract class KeyboardFocusManager
heavyweightRequests.add heavyweightRequests.add
(new HeavyweightFocusRequest(heavyweight, descendant, (new HeavyweightFocusRequest(heavyweight, descendant,
temporary, cause)); temporary, cause));
if (focusLog.isLoggable(Level.FINEST)) if (focusLog.isLoggable(PlatformLogger.FINEST))
focusLog.finest("5. SNFH_PROCEED for " + descendant); focusLog.finest("5. SNFH_PROCEED for " + descendant);
return SNFH_SUCCESS_PROCEED; return SNFH_SUCCESS_PROCEED;
} }
...@@ -2855,13 +2854,13 @@ public abstract class KeyboardFocusManager ...@@ -2855,13 +2854,13 @@ public abstract class KeyboardFocusManager
} }
KeyboardFocusManager manager = getCurrentKeyboardFocusManager(); KeyboardFocusManager manager = getCurrentKeyboardFocusManager();
if (focusLog.isLoggable(Level.FINER)) { if (focusLog.isLoggable(PlatformLogger.FINER)) {
if (event instanceof FocusEvent || event instanceof WindowEvent) { if (event instanceof FocusEvent || event instanceof WindowEvent) {
focusLog.log(Level.FINER, ">>> {0}", new Object[] {event}); focusLog.finer(">>> {0}", event);
} }
if (focusLog.isLoggable(Level.FINER) && event instanceof KeyEvent) { if (focusLog.isLoggable(PlatformLogger.FINER) && event instanceof KeyEvent) {
focusLog.log(Level.FINER, " focus owner is {0}", new Object[] {manager.getGlobalFocusOwner()}); focusLog.finer(" focus owner is {0}", manager.getGlobalFocusOwner());
focusLog.log(Level.FINER, ">>> {0}", new Object[] {event}); focusLog.finer(">>> {0}", event);
} }
} }
...@@ -2945,9 +2944,9 @@ public abstract class KeyboardFocusManager ...@@ -2945,9 +2944,9 @@ public abstract class KeyboardFocusManager
} }
} }
static void removeLastFocusRequest(Component heavyweight) { static void removeLastFocusRequest(Component heavyweight) {
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (heavyweight == null) { if (heavyweight == null) {
log.log(Level.FINE, "Assertion (heavyweight != null) failed"); log.fine("Assertion (heavyweight != null) failed");
} }
} }
......
...@@ -29,8 +29,7 @@ import java.awt.image.*; ...@@ -29,8 +29,7 @@ import java.awt.image.*;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.io.File; import java.io.File;
import java.util.logging.Logger; import sun.util.logging.PlatformLogger;
import java.util.logging.Level;
import sun.awt.image.SunWritableRaster; import sun.awt.image.SunWritableRaster;
/** /**
...@@ -204,8 +203,8 @@ public final class SplashScreen { ...@@ -204,8 +203,8 @@ public final class SplashScreen {
} }
} }
catch(java.net.MalformedURLException e) { catch(java.net.MalformedURLException e) {
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.FINE, "MalformedURLException caught in the getImageURL() method", e); log.fine("MalformedURLException caught in the getImageURL() method", e);
} }
} }
} }
...@@ -355,7 +354,7 @@ public final class SplashScreen { ...@@ -355,7 +354,7 @@ public final class SplashScreen {
*/ */
private static SplashScreen theInstance = null; private static SplashScreen theInstance = null;
private static final Logger log = Logger.getLogger("java.awt.SplashScreen"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.SplashScreen");
private native static void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride); private native static void _update(long splashPtr, int[] data, int x, int y, int width, int height, int scanlineStride);
private native static boolean _isVisible(long splashPtr); private native static boolean _isVisible(long splashPtr);
......
...@@ -48,7 +48,7 @@ import java.io.File; ...@@ -48,7 +48,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.util.*; import java.util.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeSupport;
...@@ -1956,7 +1956,7 @@ public abstract class Toolkit { ...@@ -1956,7 +1956,7 @@ public abstract class Toolkit {
*/ */
public abstract boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType); public abstract boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType modalExclusionType);
private static final Logger log = Logger.getLogger("java.awt.Toolkit"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Toolkit");
private static final int LONG_BITS = 64; private static final int LONG_BITS = 64;
private int[] calls = new int[LONG_BITS]; private int[] calls = new int[LONG_BITS];
...@@ -2123,9 +2123,9 @@ public abstract class Toolkit { ...@@ -2123,9 +2123,9 @@ public abstract class Toolkit {
} }
synchronized int countAWTEventListeners(long eventMask) { synchronized int countAWTEventListeners(long eventMask) {
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (eventMask == 0) { if (eventMask == 0) {
log.log(Level.FINE, "Assertion (eventMask != 0) failed"); log.fine("Assertion (eventMask != 0) failed");
} }
} }
......
...@@ -48,8 +48,6 @@ import java.util.Locale; ...@@ -48,8 +48,6 @@ import java.util.Locale;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.Set; import java.util.Set;
import java.util.Vector; import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import javax.accessibility.*; import javax.accessibility.*;
import sun.awt.AWTAccessor; import sun.awt.AWTAccessor;
...@@ -61,6 +59,7 @@ import sun.java2d.Disposer; ...@@ -61,6 +59,7 @@ import sun.java2d.Disposer;
import sun.java2d.pipe.Region; import sun.java2d.pipe.Region;
import sun.security.action.GetPropertyAction; import sun.security.action.GetPropertyAction;
import sun.security.util.SecurityConstants; import sun.security.util.SecurityConstants;
import sun.util.logging.PlatformLogger;
/** /**
* A <code>Window</code> object is a top-level window with no borders and no * A <code>Window</code> object is a top-level window with no borders and no
...@@ -324,7 +323,7 @@ public class Window extends Container implements Accessible { ...@@ -324,7 +323,7 @@ public class Window extends Container implements Accessible {
*/ */
private static final long serialVersionUID = 4497834738069338734L; private static final long serialVersionUID = 4497834738069338734L;
private static final Logger log = Logger.getLogger("java.awt.Window"); private static final PlatformLogger log = PlatformLogger.getLogger("java.awt.Window");
private static final boolean locationByPlatformProp; private static final boolean locationByPlatformProp;
...@@ -2985,7 +2984,7 @@ public class Window extends Container implements Accessible { ...@@ -2985,7 +2984,7 @@ public class Window extends Container implements Accessible {
} }
synchronized (getTreeLock()) { synchronized (getTreeLock()) {
super.setGraphicsConfiguration(gc); super.setGraphicsConfiguration(gc);
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.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);
} }
} }
......
...@@ -29,8 +29,7 @@ import java.awt.Event; ...@@ -29,8 +29,7 @@ import java.awt.Event;
import java.awt.Component; import java.awt.Component;
import java.awt.GraphicsEnvironment; import java.awt.GraphicsEnvironment;
import java.awt.Toolkit; import java.awt.Toolkit;
import java.util.logging.Logger; import sun.util.logging.PlatformLogger;
import java.util.logging.Level;
import java.util.Arrays; import java.util.Arrays;
/** /**
...@@ -55,7 +54,7 @@ import java.util.Arrays; ...@@ -55,7 +54,7 @@ import java.util.Arrays;
* @since 1.1 * @since 1.1
*/ */
public abstract class InputEvent extends ComponentEvent { public abstract class InputEvent extends ComponentEvent {
private static final Logger log = Logger.getLogger("java.awt.event.InputEvent"); private static final PlatformLogger logger = PlatformLogger.getLogger("java.awt.event.InputEvent");
/** /**
* The Shift key modifier constant. * The Shift key modifier constant.
...@@ -344,8 +343,8 @@ public abstract class InputEvent extends ComponentEvent { ...@@ -344,8 +343,8 @@ public abstract class InputEvent extends ComponentEvent {
sm.checkSystemClipboardAccess(); sm.checkSystemClipboardAccess();
b = true; b = true;
} catch (SecurityException se) { } catch (SecurityException se) {
if (log.isLoggable(Level.FINE)) { if (logger.isLoggable(PlatformLogger.FINE)) {
log.log(Level.FINE, "InputEvent.canAccessSystemClipboard() got SecurityException ", se); logger.fine("InputEvent.canAccessSystemClipboard() got SecurityException ", se);
} }
} }
} else { } else {
......
...@@ -32,7 +32,6 @@ import java.lang.reflect.*; ...@@ -32,7 +32,6 @@ import java.lang.reflect.*;
import java.lang.ref.WeakReference; import java.lang.ref.WeakReference;
import java.security.AccessController; import java.security.AccessController;
import java.util.*; import java.util.*;
import java.util.logging.*;
import com.sun.java.swing.SwingUtilities3; import com.sun.java.swing.SwingUtilities3;
...@@ -41,6 +40,7 @@ import sun.java2d.SunGraphics2D; ...@@ -41,6 +40,7 @@ import sun.java2d.SunGraphics2D;
import sun.security.action.GetPropertyAction; import sun.security.action.GetPropertyAction;
import sun.java2d.pipe.hw.ExtendedBufferCapabilities; import sun.java2d.pipe.hw.ExtendedBufferCapabilities;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
import sun.util.logging.PlatformLogger;
/** /**
* A PaintManager implementation that uses a BufferStrategy for * A PaintManager implementation that uses a BufferStrategy for
...@@ -78,7 +78,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -78,7 +78,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
private static Method COMPONENT_CREATE_BUFFER_STRATEGY_METHOD; private static Method COMPONENT_CREATE_BUFFER_STRATEGY_METHOD;
private static Method COMPONENT_GET_BUFFER_STRATEGY_METHOD; private static Method COMPONENT_GET_BUFFER_STRATEGY_METHOD;
private static final Logger LOGGER = Logger.getLogger( private static final PlatformLogger LOGGER = PlatformLogger.getLogger(
"javax.swing.BufferStrategyPaintManager"); "javax.swing.BufferStrategyPaintManager");
/** /**
...@@ -222,8 +222,8 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -222,8 +222,8 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
private void dispose(java.util.List<BufferInfo> bufferInfos) { private void dispose(java.util.List<BufferInfo> bufferInfos) {
if (LOGGER.isLoggable(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.log(Level.FINER, "BufferStrategyPaintManager disposed", LOGGER.finer("BufferStrategyPaintManager disposed",
new RuntimeException()); new RuntimeException());
} }
if (bufferInfos != null) { if (bufferInfos != null) {
...@@ -305,7 +305,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -305,7 +305,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.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);
...@@ -335,7 +335,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -335,7 +335,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.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
...@@ -363,7 +363,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -363,7 +363,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
} }
} }
if (LOGGER.isLoggable(Level.FINEST)) { if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
LOGGER.finest("beginPaint"); LOGGER.finest("beginPaint");
} }
// Reset the area that needs to be painted. // Reset the area that needs to be painted.
...@@ -371,7 +371,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -371,7 +371,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
} }
public void endPaint() { public void endPaint() {
if (LOGGER.isLoggable(Level.FINEST)) { if (LOGGER.isLoggable(PlatformLogger.FINEST)) {
LOGGER.finest("endPaint: region " + accumulatedX + " " + LOGGER.finest("endPaint: region " + accumulatedX + " " +
accumulatedY + " " + accumulatedMaxX + " " + accumulatedY + " " + accumulatedMaxX + " " +
accumulatedMaxY); accumulatedMaxY);
...@@ -420,7 +420,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -420,7 +420,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
contentsLost = bufferStrategy.contentsLost(); contentsLost = bufferStrategy.contentsLost();
} }
if (contentsLost) { if (contentsLost) {
if (LOGGER.isLoggable(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.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.
...@@ -514,7 +514,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -514,7 +514,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("prepare: new BufferInfo: " + root); LOGGER.finer("prepare: new BufferInfo: " + root);
} }
} }
...@@ -525,7 +525,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -525,7 +525,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer( LOGGER.finer(
"prepare: contents restored in prepare"); "prepare: contents restored in prepare");
} }
...@@ -539,7 +539,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -539,7 +539,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("prepare: contents lost on expose"); LOGGER.finer("prepare: contents lost on expose");
} }
} }
...@@ -642,7 +642,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -642,7 +642,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("BufferInfo pruned, root null"); LOGGER.finer("BufferInfo pruned, root null");
} }
} }
...@@ -748,7 +748,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -748,7 +748,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("getBufferStrategy: created bs: " + bs); LOGGER.finer("getBufferStrategy: created bs: " + bs);
} }
} }
...@@ -806,7 +806,7 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -806,7 +806,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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.finer("createBufferStrategy: using vsynced strategy"); LOGGER.finer("createBufferStrategy: using vsynced strategy");
} }
} }
...@@ -848,8 +848,8 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -848,8 +848,8 @@ 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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.log(Level.FINER, "createBufferStratety failed", LOGGER.finer("createBufferStratety failed",
ite); ite);
} }
} catch (IllegalArgumentException iae) { } catch (IllegalArgumentException iae) {
...@@ -864,8 +864,8 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -864,8 +864,8 @@ 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(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.log(Level.FINER, "createBufferStratety failed", LOGGER.finer("createBufferStratety failed",
e); e);
} }
} }
...@@ -878,8 +878,8 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager { ...@@ -878,8 +878,8 @@ class BufferStrategyPaintManager extends RepaintManager.PaintManager {
*/ */
public void dispose() { public void dispose() {
Container root = getRoot(); Container root = getRoot();
if (LOGGER.isLoggable(Level.FINER)) { if (LOGGER.isLoggable(PlatformLogger.FINER)) {
LOGGER.log(Level.FINER, "disposed BufferInfo for: " + root); LOGGER.finer("disposed BufferInfo for: " + root);
} }
if (root != null) { if (root != null) {
root.removeComponentListener(this); root.removeComponentListener(this);
......
...@@ -29,7 +29,7 @@ import java.awt.Container; ...@@ -29,7 +29,7 @@ import java.awt.Container;
import java.awt.Window; import java.awt.Window;
import java.util.*; import java.util.*;
import java.awt.FocusTraversalPolicy; import java.awt.FocusTraversalPolicy;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
/** /**
* A FocusTraversalPolicy that determines traversal order by sorting the * A FocusTraversalPolicy that determines traversal order by sorting the
...@@ -64,7 +64,7 @@ public class SortingFocusTraversalPolicy ...@@ -64,7 +64,7 @@ public class SortingFocusTraversalPolicy
private Comparator<? super Component> comparator; private Comparator<? super Component> comparator;
private boolean implicitDownCycleTraversal = true; private boolean implicitDownCycleTraversal = true;
private Logger log = Logger.getLogger("javax.swing.SortingFocusTraversalPolicy"); private PlatformLogger log = PlatformLogger.getLogger("javax.swing.SortingFocusTraversalPolicy");
/** /**
* Used by getComponentAfter and getComponentBefore for efficiency. In * Used by getComponentAfter and getComponentBefore for efficiency. In
...@@ -115,8 +115,8 @@ public class SortingFocusTraversalPolicy ...@@ -115,8 +115,8 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.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(Level.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.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(Level.FINE)) { if (retComp != null && log.isLoggable(PlatformLogger.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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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(Level.FINE)) log.fine("### FTP returned " + afterComp); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + afterComp);
return afterComp; return afterComp;
} }
aComponent = provider; aComponent = provider;
...@@ -279,12 +279,12 @@ public class SortingFocusTraversalPolicy ...@@ -279,12 +279,12 @@ public class SortingFocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent); if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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);
...@@ -349,7 +349,7 @@ public class SortingFocusTraversalPolicy ...@@ -349,7 +349,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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("### Asking FTP " + provider + " for component after " + aComponent); log.fine("### Asking FTP " + provider + " for component after " + aComponent);
} }
...@@ -360,7 +360,7 @@ public class SortingFocusTraversalPolicy ...@@ -360,7 +360,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(Level.FINE)) log.fine("### FTP returned " + beforeComp); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### FTP returned " + beforeComp);
return beforeComp; return beforeComp;
} }
aComponent = provider; aComponent = provider;
...@@ -373,12 +373,12 @@ public class SortingFocusTraversalPolicy ...@@ -373,12 +373,12 @@ public class SortingFocusTraversalPolicy
List<Component> cycle = getFocusTraversalCycle(aContainer); List<Component> cycle = getFocusTraversalCycle(aContainer);
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle + ", component is " + aComponent); if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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);
...@@ -424,7 +424,7 @@ public class SortingFocusTraversalPolicy ...@@ -424,7 +424,7 @@ public class SortingFocusTraversalPolicy
public Component getFirstComponent(Container aContainer) { public Component getFirstComponent(Container aContainer) {
List<Component> cycle; List<Component> cycle;
if (log.isLoggable(Level.FINE)) log.fine("### Getting first component in " + aContainer); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting first component in " + aContainer);
if (aContainer == null) { if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null"); throw new IllegalArgumentException("aContainer cannot be null");
} }
...@@ -436,10 +436,10 @@ public class SortingFocusTraversalPolicy ...@@ -436,10 +436,10 @@ public class SortingFocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null; return null;
} }
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (Component comp : cycle) { for (Component comp : cycle) {
if (accept(comp)) { if (accept(comp)) {
...@@ -466,7 +466,7 @@ public class SortingFocusTraversalPolicy ...@@ -466,7 +466,7 @@ public class SortingFocusTraversalPolicy
*/ */
public Component getLastComponent(Container aContainer) { public Component getLastComponent(Container aContainer) {
List<Component> cycle; List<Component> cycle;
if (log.isLoggable(Level.FINE)) log.fine("### Getting last component in " + aContainer); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Getting last component in " + aContainer);
if (aContainer == null) { if (aContainer == null) {
throw new IllegalArgumentException("aContainer cannot be null"); throw new IllegalArgumentException("aContainer cannot be null");
...@@ -479,10 +479,10 @@ public class SortingFocusTraversalPolicy ...@@ -479,10 +479,10 @@ public class SortingFocusTraversalPolicy
} }
if (cycle.size() == 0) { if (cycle.size() == 0) {
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is empty"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is empty");
return null; return null;
} }
if (log.isLoggable(Level.FINE)) log.fine("### Cycle is " + cycle); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### Cycle is " + cycle);
for (int i= cycle.size() - 1; i >= 0; i--) { for (int i= cycle.size() - 1; i >= 0; i--) {
Component comp = cycle.get(i); Component comp = cycle.get(i);
......
...@@ -30,7 +30,7 @@ import java.util.Collections; ...@@ -30,7 +30,7 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.IdentityHashMap; import java.util.IdentityHashMap;
import java.util.Map; import java.util.Map;
import java.util.logging.Logger; import sun.util.logging.PlatformLogger;
/** /**
* This class is to let AWT shutdown automatically when a user is done * This class is to let AWT shutdown automatically when a user is done
...@@ -363,7 +363,7 @@ public final class AWTAutoShutdown implements Runnable { ...@@ -363,7 +363,7 @@ public final class AWTAutoShutdown implements Runnable {
} }
} }
final void dumpPeers(final Logger aLog) { final void dumpPeers(final PlatformLogger aLog) {
synchronized (activationLock) { synchronized (activationLock) {
synchronized (mainLock) { synchronized (mainLock) {
aLog.fine("Mapped peers:"); aLog.fine("Mapped peers:");
......
...@@ -40,10 +40,9 @@ import java.util.IdentityHashMap; ...@@ -40,10 +40,9 @@ import java.util.IdentityHashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.HashSet; import java.util.HashSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.beans.PropertyChangeSupport; import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener; import java.beans.PropertyChangeListener;
import sun.util.logging.PlatformLogger;
/** /**
* The AppContext is a table referenced by ThreadGroup which stores * The AppContext is a table referenced by ThreadGroup which stores
...@@ -128,7 +127,7 @@ import java.beans.PropertyChangeListener; ...@@ -128,7 +127,7 @@ import java.beans.PropertyChangeListener;
* @author Fred Ecks * @author Fred Ecks
*/ */
public final class AppContext { public final class AppContext {
private static final Logger log = Logger.getLogger("sun.awt.AppContext"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.AppContext");
/* Since the contents of an AppContext are unique to each Java /* Since the contents of an AppContext are unique to each Java
* session, this class should never be serialized. */ * session, this class should never be serialized. */
...@@ -380,9 +379,7 @@ public final class AppContext { ...@@ -380,9 +379,7 @@ public final class AppContext {
try { try {
w.dispose(); w.dispose();
} catch (Throwable t) { } catch (Throwable t) {
if (log.isLoggable(Level.FINER)) { log.finer("exception occured while disposing app context", t);
log.log(Level.FINER, "exception occured while disposing app context", t);
}
} }
} }
AccessController.doPrivileged(new PrivilegedAction() { AccessController.doPrivileged(new PrivilegedAction() {
......
...@@ -39,8 +39,7 @@ import java.lang.reflect.Field; ...@@ -39,8 +39,7 @@ import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.logging.Logger; import sun.util.logging.PlatformLogger;
import java.util.logging.Level;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
...@@ -78,7 +77,7 @@ public class ComponentAccessor ...@@ -78,7 +77,7 @@ public class ComponentAccessor
private static Method methodGetCursorNoClientCode; private static Method methodGetCursorNoClientCode;
private static Method methodLocationNoClientCode; private static Method methodLocationNoClientCode;
private static final Logger log = Logger.getLogger("sun.awt.ComponentAccessor"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ComponentAccessor");
private ComponentAccessor() { private ComponentAccessor() {
} }
...@@ -136,13 +135,13 @@ public class ComponentAccessor ...@@ -136,13 +135,13 @@ public class ComponentAccessor
methodLocationNoClientCode.setAccessible(true); methodLocationNoClientCode.setAccessible(true);
} }
catch (NoSuchFieldException e) { catch (NoSuchFieldException e) {
log.log(Level.FINE, "Unable to initialize ComponentAccessor", e); log.fine("Unable to initialize ComponentAccessor", e);
} }
catch (ClassNotFoundException e) { catch (ClassNotFoundException e) {
log.log(Level.FINE, "Unable to initialize ComponentAccessor", e); log.fine("Unable to initialize ComponentAccessor", e);
} }
catch (NoSuchMethodException e) { catch (NoSuchMethodException e) {
log.log(Level.FINE, "Unable to initialize ComponentAccessor", e); log.fine("Unable to initialize ComponentAccessor", e);
} }
// to please javac // to please javac
return null; return null;
...@@ -157,7 +156,7 @@ public class ComponentAccessor ...@@ -157,7 +156,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -168,7 +167,7 @@ public class ComponentAccessor ...@@ -168,7 +167,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -179,7 +178,7 @@ public class ComponentAccessor ...@@ -179,7 +178,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -190,7 +189,7 @@ public class ComponentAccessor ...@@ -190,7 +189,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -204,7 +203,7 @@ public class ComponentAccessor ...@@ -204,7 +203,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -214,7 +213,7 @@ public class ComponentAccessor ...@@ -214,7 +213,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return 0; return 0;
} }
...@@ -225,7 +224,7 @@ public class ComponentAccessor ...@@ -225,7 +224,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return 0; return 0;
} }
...@@ -236,7 +235,7 @@ public class ComponentAccessor ...@@ -236,7 +235,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return 0; return 0;
} }
...@@ -247,7 +246,7 @@ public class ComponentAccessor ...@@ -247,7 +246,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return 0; return 0;
} }
...@@ -258,7 +257,7 @@ public class ComponentAccessor ...@@ -258,7 +257,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return false; return false;
} }
...@@ -271,10 +270,10 @@ public class ComponentAccessor ...@@ -271,10 +270,10 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
return parent; return parent;
...@@ -288,10 +287,10 @@ public class ComponentAccessor ...@@ -288,10 +287,10 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
return font; return font;
...@@ -307,10 +306,10 @@ public class ComponentAccessor ...@@ -307,10 +306,10 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
} }
...@@ -322,10 +321,10 @@ public class ComponentAccessor ...@@ -322,10 +321,10 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
} }
...@@ -336,7 +335,7 @@ public class ComponentAccessor ...@@ -336,7 +335,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -348,7 +347,7 @@ public class ComponentAccessor ...@@ -348,7 +347,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return color; return color;
} }
...@@ -361,7 +360,7 @@ public class ComponentAccessor ...@@ -361,7 +360,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return color; return color;
} }
...@@ -372,7 +371,7 @@ public class ComponentAccessor ...@@ -372,7 +371,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -384,7 +383,7 @@ public class ComponentAccessor ...@@ -384,7 +383,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return f; return f;
} }
...@@ -396,7 +395,7 @@ public class ComponentAccessor ...@@ -396,7 +395,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return peer; return peer;
} }
...@@ -406,7 +405,7 @@ public class ComponentAccessor ...@@ -406,7 +405,7 @@ public class ComponentAccessor
fieldPeer.set(c, peer); fieldPeer.set(c, peer);
} catch (IllegalAccessException e) } catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
} }
...@@ -415,7 +414,7 @@ public class ComponentAccessor ...@@ -415,7 +414,7 @@ public class ComponentAccessor
return fieldIgnoreRepaint.getBoolean(comp); return fieldIgnoreRepaint.getBoolean(comp);
} }
catch (IllegalAccessException e) { catch (IllegalAccessException e) {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return false; return false;
...@@ -427,7 +426,7 @@ public class ComponentAccessor ...@@ -427,7 +426,7 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
return false; return false;
} }
...@@ -439,10 +438,10 @@ public class ComponentAccessor ...@@ -439,10 +438,10 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
return enabled; return enabled;
} }
...@@ -455,10 +454,10 @@ public class ComponentAccessor ...@@ -455,10 +454,10 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
return cursor; return cursor;
...@@ -472,12 +471,13 @@ public class ComponentAccessor ...@@ -472,12 +471,13 @@ public class ComponentAccessor
} }
catch (IllegalAccessException e) catch (IllegalAccessException e)
{ {
log.log(Level.FINE, "Unable to access the Component object", e); log.fine("Unable to access the Component object", e);
} }
catch (InvocationTargetException e) { catch (InvocationTargetException e) {
log.log(Level.FINE, "Unable to invoke on the Component object", e); log.fine("Unable to invoke on the Component object", e);
} }
return loc; return loc;
} }
} }
...@@ -28,7 +28,7 @@ package sun.awt; ...@@ -28,7 +28,7 @@ package sun.awt;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
/* /*
* Internal class that manages sun.awt.Debug settings. * Internal class that manages sun.awt.Debug settings.
...@@ -72,7 +72,7 @@ import java.util.logging.*; ...@@ -72,7 +72,7 @@ import java.util.logging.*;
* the fix for 4638447). * the fix for 4638447).
*/ */
final class DebugSettings { final class DebugSettings {
private static final Logger log = Logger.getLogger("sun.awt.debug.DebugSettings"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.debug.DebugSettings");
/* standard debug property key names */ /* standard debug property key names */
static final String PREFIX = "awtdebug"; static final String PREFIX = "awtdebug";
...@@ -128,8 +128,8 @@ final class DebugSettings { ...@@ -128,8 +128,8 @@ final class DebugSettings {
}); });
// echo the initial property settings to stdout // echo the initial property settings to stdout
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.FINE, "DebugSettings:\n{0}", this); log.fine("DebugSettings:\n{0}" + this);
} }
} }
...@@ -258,8 +258,8 @@ final class DebugSettings { ...@@ -258,8 +258,8 @@ final class DebugSettings {
} }
private void println(Object object) { private void println(Object object) {
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, object.toString()); log.finer(object.toString());
} }
} }
......
...@@ -37,7 +37,6 @@ import java.nio.charset.Charset; ...@@ -37,7 +37,6 @@ import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder; import java.nio.charset.CharsetEncoder;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import java.util.logging.Logger;
import java.util.HashMap; import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Hashtable; import java.util.Hashtable;
...@@ -51,6 +50,7 @@ import sun.font.CompositeFontDescriptor; ...@@ -51,6 +50,7 @@ import sun.font.CompositeFontDescriptor;
import sun.font.SunFontManager; import sun.font.SunFontManager;
import sun.font.FontManagerFactory; import sun.font.FontManagerFactory;
import sun.font.FontUtilities; import sun.font.FontUtilities;
import sun.util.logging.PlatformLogger;
/** /**
* Provides the definitions of the five logical fonts: Serif, SansSerif, * Provides the definitions of the five logical fonts: Serif, SansSerif,
...@@ -66,7 +66,7 @@ public abstract class FontConfiguration { ...@@ -66,7 +66,7 @@ public abstract class FontConfiguration {
protected static Locale startupLocale = null; protected static Locale startupLocale = null;
protected static Hashtable localeMap = null; protected static Hashtable localeMap = null;
private static FontConfiguration fontConfig; private static FontConfiguration fontConfig;
private static Logger logger; private static PlatformLogger logger;
protected static boolean isProperties = true; protected static boolean isProperties = true;
protected SunFontManager fontManager; protected SunFontManager fontManager;
...@@ -83,7 +83,7 @@ public abstract class FontConfiguration { ...@@ -83,7 +83,7 @@ public abstract class FontConfiguration {
*/ */
public FontConfiguration(SunFontManager fm) { public FontConfiguration(SunFontManager fm) {
if (FontUtilities.debugFonts() && logger == null) { if (FontUtilities.debugFonts() && logger == null) {
logger = Logger.getLogger("sun.awt.FontConfiguration"); logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
} }
fontManager = fm; fontManager = fm;
setOsNameAndVersion(); /* static initialization */ setOsNameAndVersion(); /* static initialization */
...@@ -366,7 +366,7 @@ public abstract class FontConfiguration { ...@@ -366,7 +366,7 @@ public abstract class FontConfiguration {
stringTable = new StringBuilder(4096); stringTable = new StringBuilder(4096);
if (verbose && logger == null) { if (verbose && logger == null) {
logger = Logger.getLogger("sun.awt.FontConfiguration"); logger = PlatformLogger.getLogger("sun.awt.FontConfiguration");
} }
new PropertiesHandler().load(in); new PropertiesHandler().load(in);
......
...@@ -39,12 +39,11 @@ import java.awt.peer.ComponentPeer; ...@@ -39,12 +39,11 @@ import java.awt.peer.ComponentPeer;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer { public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManagerPeer {
private static final Logger focusLog = Logger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.focus.KeyboardFocusManagerPeerImpl");
private static AWTAccessor.KeyboardFocusManagerAccessor kfmAccessor = private static AWTAccessor.KeyboardFocusManagerAccessor kfmAccessor =
AWTAccessor.getKeyboardFocusManagerAccessor(); AWTAccessor.getKeyboardFocusManagerAccessor();
...@@ -64,7 +63,8 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag ...@@ -64,7 +63,8 @@ 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(Level.FINE)) focusLog.fine("Clearing global focus owner " + focusOwner); if (focusLog.isLoggable(PlatformLogger.FINE))
focusLog.fine("Clearing global focus owner " + focusOwner);
if (focusOwner != null) { if (focusOwner != null) {
FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null, FocusEvent fl = new CausedFocusEvent(focusOwner, FocusEvent.FOCUS_LOST, false, null,
CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER); CausedFocusEvent.Cause.CLEAR_GLOBAL_FOCUS_OWNER);
...@@ -130,14 +130,16 @@ public abstract class KeyboardFocusManagerPeerImpl implements KeyboardFocusManag ...@@ -130,14 +130,16 @@ 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(Level.FINER)) focusLog.finer("Posting focus event: " + fl); if (focusLog.isLoggable(PlatformLogger.FINER))
focusLog.finer("Posting focus event: " + fl);
SunToolkit.postPriorityEvent(fl); SunToolkit.postPriorityEvent(fl);
} }
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(Level.FINER)) focusLog.finer("Posting focus event: " + fg); if (focusLog.isLoggable(PlatformLogger.FINER))
focusLog.finer("Posting focus event: " + fg);
SunToolkit.postPriorityEvent(fg); SunToolkit.postPriorityEvent(fg);
return true; return true;
} }
......
...@@ -30,7 +30,7 @@ import java.awt.Insets; ...@@ -30,7 +30,7 @@ import java.awt.Insets;
import java.awt.Adjustable; import java.awt.Adjustable;
import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelEvent;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
/* /*
* ScrollPaneWheelScroller is a helper class for implmenenting mouse wheel * ScrollPaneWheelScroller is a helper class for implmenenting mouse wheel
...@@ -39,7 +39,7 @@ import java.util.logging.*; ...@@ -39,7 +39,7 @@ import java.util.logging.*;
*/ */
public abstract class ScrollPaneWheelScroller { public abstract class ScrollPaneWheelScroller {
private static final Logger log = Logger.getLogger("sun.awt.ScrollPaneWheelScroller"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ScrollPaneWheelScroller");
private ScrollPaneWheelScroller() {} private ScrollPaneWheelScroller() {}
...@@ -47,8 +47,8 @@ public abstract class ScrollPaneWheelScroller { ...@@ -47,8 +47,8 @@ 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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.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,8 +56,8 @@ public abstract class ScrollPaneWheelScroller { ...@@ -56,8 +56,8 @@ 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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "increment from adjustable(" + adj.getClass() + ") : " + increment); log.finer("increment from adjustable(" + adj.getClass() + ") : " + increment);
} }
scrollAdjustable(adj, increment); scrollAdjustable(adj, increment);
} }
...@@ -74,8 +74,8 @@ public abstract class ScrollPaneWheelScroller { ...@@ -74,8 +74,8 @@ 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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "using vertical scrolling due to scrollbar policy"); log.finer("using vertical scrolling due to scrollbar policy");
} }
return sp.getVAdjustable(); return sp.getVAdjustable();
...@@ -85,31 +85,31 @@ public abstract class ScrollPaneWheelScroller { ...@@ -85,31 +85,31 @@ public abstract class ScrollPaneWheelScroller {
Insets ins = sp.getInsets(); Insets ins = sp.getInsets();
int vertScrollWidth = sp.getVScrollbarWidth(); int vertScrollWidth = sp.getVScrollbarWidth();
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.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.log(Level.FINER, "vertScrollWidth = " + vertScrollWidth); log.finer("vertScrollWidth = " + vertScrollWidth);
} }
// 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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "using vertical scrolling because scrollbar is present"); log.finer("using vertical scrolling because scrollbar is present");
} }
return sp.getVAdjustable(); return sp.getVAdjustable();
} }
else { else {
int horizScrollHeight = sp.getHScrollbarHeight(); int horizScrollHeight = sp.getHScrollbarHeight();
if (ins.bottom >= horizScrollHeight) { if (ins.bottom >= horizScrollHeight) {
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "using NO scrollbar becsause neither is present"); log.finer("using NO scrollbar becsause neither is present");
} }
return null; return null;
} }
...@@ -124,9 +124,9 @@ public abstract class ScrollPaneWheelScroller { ...@@ -124,9 +124,9 @@ public abstract class ScrollPaneWheelScroller {
*/ */
public static int getIncrementFromAdjustable(Adjustable adj, public static int getIncrementFromAdjustable(Adjustable adj,
MouseWheelEvent e) { MouseWheelEvent e) {
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (adj == null) { if (adj == null) {
log.log(Level.FINE, "Assertion (adj != null) failed"); log.fine("Assertion (adj != null) failed");
} }
} }
...@@ -146,19 +146,19 @@ public abstract class ScrollPaneWheelScroller { ...@@ -146,19 +146,19 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (adj == null) { if (adj == null) {
log.log(Level.FINE, "Assertion (adj != null) failed"); log.fine("Assertion (adj != null) failed");
} }
if (amount == 0) { if (amount == 0) {
log.log(Level.FINE, "Assertion (amount != 0) failed"); log.fine("Assertion (amount != 0) failed");
} }
} }
int current = adj.getValue(); int current = adj.getValue();
int upperLimit = adj.getMaximum() - adj.getVisibleAmount(); int upperLimit = adj.getMaximum() - adj.getVisibleAmount();
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "doScrolling by " + amount); log.finer("doScrolling by " + amount);
} }
if (amount > 0 && current < upperLimit) { // still some room to scroll if (amount > 0 && current < upperLimit) { // still some room to scroll
......
...@@ -33,7 +33,7 @@ import java.util.Set; ...@@ -33,7 +33,7 @@ import java.util.Set;
import java.util.HashMap; import java.util.HashMap;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
/** /**
* This class is used to aid in keeping track of DisplayChangedListeners and * This class is used to aid in keeping track of DisplayChangedListeners and
...@@ -54,7 +54,7 @@ import java.util.logging.*; ...@@ -54,7 +54,7 @@ import java.util.logging.*;
* screen to another on a system equipped with multiple displays. * screen to another on a system equipped with multiple displays.
*/ */
public class SunDisplayChanger { public class SunDisplayChanger {
private static final Logger log = Logger.getLogger("sun.awt.multiscreen.SunDisplayChanger"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.multiscreen.SunDisplayChanger");
// Create a new synchronizedMap with initial capacity of one listener. // Create a new synchronizedMap with initial capacity of one listener.
// It is asserted that the most common case is to have one GraphicsDevice // It is asserted that the most common case is to have one GraphicsDevice
...@@ -68,13 +68,13 @@ public class SunDisplayChanger { ...@@ -68,13 +68,13 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (theListener == null) { if (theListener == null) {
log.log(Level.FINE, "Assertion (theListener != null) failed"); log.fine("Assertion (theListener != null) failed");
} }
} }
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "Adding listener: " + theListener); log.finer("Adding listener: " + theListener);
} }
listeners.put(theListener, null); listeners.put(theListener, null);
} }
...@@ -83,13 +83,13 @@ public class SunDisplayChanger { ...@@ -83,13 +83,13 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
if (theListener == null) { if (theListener == null) {
log.log(Level.FINE, "Assertion (theListener != null) failed"); log.fine("Assertion (theListener != null) failed");
} }
} }
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "Removing listener: " + theListener); log.finer("Removing listener: " + theListener);
} }
listeners.remove(theListener); listeners.remove(theListener);
} }
...@@ -99,8 +99,8 @@ public class SunDisplayChanger { ...@@ -99,8 +99,8 @@ 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(Level.FINEST)) { if (log.isLoggable(PlatformLogger.FINEST)) {
log.log(Level.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,
// and then iterating over the clone. This is because during the course // and then iterating over the clone. This is because during the course
...@@ -126,8 +126,8 @@ public class SunDisplayChanger { ...@@ -126,8 +126,8 @@ public class SunDisplayChanger {
DisplayChangedListener current = DisplayChangedListener current =
(DisplayChangedListener) itr.next(); (DisplayChangedListener) itr.next();
try { try {
if (log.isLoggable(Level.FINEST)) { if (log.isLoggable(PlatformLogger.FINEST)) {
log.log(Level.FINEST, "displayChanged for listener: " + current); log.finest("displayChanged for listener: " + current);
} }
current.displayChanged(); current.displayChanged();
} catch (IllegalComponentStateException e) { } catch (IllegalComponentStateException e) {
...@@ -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(Level.FINEST)) { if (log.isLoggable(PlatformLogger.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,
...@@ -172,8 +172,8 @@ public class SunDisplayChanger { ...@@ -172,8 +172,8 @@ public class SunDisplayChanger {
DisplayChangedListener current = DisplayChangedListener current =
(DisplayChangedListener) itr.next(); (DisplayChangedListener) itr.next();
try { try {
if (log.isLoggable(Level.FINEST)) { if (log.isLoggable(PlatformLogger.FINEST)) {
log.log(Level.FINEST, "paletteChanged for listener: " + current); log.finest("paletteChanged for listener: " + current);
} }
current.paletteChanged(); current.paletteChanged();
} catch (IllegalComponentStateException e) { } catch (IllegalComponentStateException e) {
......
...@@ -27,14 +27,14 @@ package sun.awt; ...@@ -27,14 +27,14 @@ package sun.awt;
import java.awt.*; import java.awt.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
public abstract class SunGraphicsCallback { public abstract class SunGraphicsCallback {
public static final int HEAVYWEIGHTS = 0x1; public static final int HEAVYWEIGHTS = 0x1;
public static final int LIGHTWEIGHTS = 0x2; public static final int LIGHTWEIGHTS = 0x2;
public static final int TWO_PASSES = 0x4; public static final int TWO_PASSES = 0x4;
private static final Logger log = Logger.getLogger("sun.awt.SunGraphicsCallback"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunGraphicsCallback");
public abstract void run(Component comp, Graphics cg); public abstract void run(Component comp, Graphics cg);
...@@ -87,9 +87,9 @@ public abstract class SunGraphicsCallback { ...@@ -87,9 +87,9 @@ public abstract class SunGraphicsCallback {
int ncomponents = comps.length; int ncomponents = comps.length;
Shape clip = g.getClip(); Shape clip = g.getClip();
if (log.isLoggable(Level.FINER) && (clip != null)) { if (log.isLoggable(PlatformLogger.FINER) && (clip != null)) {
Rectangle newrect = clip.getBounds(); Rectangle newrect = clip.getBounds();
log.log(Level.FINER, "x = " + newrect.x + ", y = " + newrect.y + log.finer("x = " + newrect.x + ", y = " + newrect.y +
", width = " + newrect.width + ", width = " + newrect.width +
", height = " + newrect.height); ", height = " + newrect.height);
} }
......
...@@ -40,8 +40,7 @@ import java.util.*; ...@@ -40,8 +40,7 @@ import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.misc.SoftCache; import sun.misc.SoftCache;
import sun.font.FontDesignMetrics; import sun.font.FontDesignMetrics;
import sun.awt.im.InputContext; import sun.awt.im.InputContext;
...@@ -61,7 +60,7 @@ public abstract class SunToolkit extends Toolkit ...@@ -61,7 +60,7 @@ public abstract class SunToolkit extends Toolkit
implements WindowClosingSupport, WindowClosingListener, implements WindowClosingSupport, WindowClosingListener,
ComponentFactory, InputMethodSupport, KeyboardFocusManagerPeerProvider { ComponentFactory, InputMethodSupport, KeyboardFocusManagerPeerProvider {
private static final Logger log = Logger.getLogger("sun.awt.SunToolkit"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.SunToolkit");
/* Load debug settings for native code */ /* Load debug settings for native code */
static { static {
...@@ -986,8 +985,8 @@ public abstract class SunToolkit extends Toolkit ...@@ -986,8 +985,8 @@ public abstract class SunToolkit extends Toolkit
//with scale factors x1, x3/4, x2/3, xN, x1/N. //with scale factors x1, x3/4, x2/3, xN, x1/N.
Image im = i.next(); Image im = i.next();
if (im == null) { if (im == null) {
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "SunToolkit.getScaledIconImage: " + log.finer("SunToolkit.getScaledIconImage: " +
"Skipping the image passed into Java because it's null."); "Skipping the image passed into Java because it's null.");
} }
continue; continue;
...@@ -1002,8 +1001,8 @@ public abstract class SunToolkit extends Toolkit ...@@ -1002,8 +1001,8 @@ public abstract class SunToolkit extends Toolkit
iw = im.getWidth(null); iw = im.getWidth(null);
ih = im.getHeight(null); ih = im.getHeight(null);
} catch (Exception e){ } catch (Exception e){
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "SunToolkit.getScaledIconImage: " + log.finer("SunToolkit.getScaledIconImage: " +
"Perhaps the image passed into Java is broken. Skipping this icon."); "Perhaps the image passed into Java is broken. Skipping this icon.");
} }
continue; continue;
...@@ -1077,8 +1076,8 @@ public abstract class SunToolkit extends Toolkit ...@@ -1077,8 +1076,8 @@ public abstract class SunToolkit extends Toolkit
try { try {
int x = (width - bestWidth) / 2; int x = (width - bestWidth) / 2;
int y = (height - bestHeight) / 2; int y = (height - bestHeight) / 2;
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "WWindowPeer.getScaledIconData() result : " + log.finer("WWindowPeer.getScaledIconData() result : " +
"w : " + width + " h : " + height + "w : " + width + " h : " + height +
" iW : " + bestImage.getWidth(null) + " iH : " + bestImage.getHeight(null) + " iW : " + bestImage.getWidth(null) + " iH : " + bestImage.getHeight(null) +
" sim : " + bestSimilarity + " sf : " + bestScaleFactor + " sim : " + bestSimilarity + " sf : " + bestScaleFactor +
...@@ -1095,8 +1094,8 @@ public abstract class SunToolkit extends Toolkit ...@@ -1095,8 +1094,8 @@ public abstract class SunToolkit extends Toolkit
public static DataBufferInt getScaledIconData(java.util.List<Image> imageList, int width, int height) { public static DataBufferInt getScaledIconData(java.util.List<Image> imageList, int width, int height) {
BufferedImage bimage = getScaledIconImage(imageList, width, height); BufferedImage bimage = getScaledIconImage(imageList, width, height);
if (bimage == null) { if (bimage == null) {
if (log.isLoggable(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.log(Level.FINER, "SunToolkit.getScaledIconData: " + log.finer("SunToolkit.getScaledIconData: " +
"Perhaps the image passed into Java is broken. Skipping this icon."); "Perhaps the image passed into Java is broken. Skipping this icon.");
} }
return null; return null;
...@@ -1913,7 +1912,7 @@ public abstract class SunToolkit extends Toolkit ...@@ -1913,7 +1912,7 @@ public abstract class SunToolkit extends Toolkit
} }
} }
protected static void dumpPeers(final Logger aLog) { protected static void dumpPeers(final PlatformLogger aLog) {
AWTAutoShutdown.getInstance().dumpPeers(aLog); AWTAutoShutdown.getInstance().dumpPeers(aLog);
} }
......
...@@ -29,8 +29,7 @@ import java.awt.Window; ...@@ -29,8 +29,7 @@ import java.awt.Window;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.logging.Logger; import sun.util.logging.PlatformLogger;
import java.util.logging.Level;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
...@@ -41,7 +40,7 @@ public class WindowAccessor { ...@@ -41,7 +40,7 @@ public class WindowAccessor {
private static Field fieldIsAutoRequestFocus; private static Field fieldIsAutoRequestFocus;
private static Field fieldIsTrayIconWindow; private static Field fieldIsTrayIconWindow;
private static final Logger log = Logger.getLogger("sun.awt.WindowAccessor"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.WindowAccessor");
private WindowAccessor() { private WindowAccessor() {
} }
...@@ -57,9 +56,9 @@ public class WindowAccessor { ...@@ -57,9 +56,9 @@ public class WindowAccessor {
fieldIsTrayIconWindow.setAccessible(true); fieldIsTrayIconWindow.setAccessible(true);
} catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) {
log.log(Level.FINE, "Unable to initialize WindowAccessor: ", e); log.fine("Unable to initialize WindowAccessor: ", e);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
log.log(Level.FINE, "Unable to initialize WindowAccessor: ", e); log.fine("Unable to initialize WindowAccessor: ", e);
} }
return null; return null;
} }
...@@ -71,7 +70,7 @@ public class WindowAccessor { ...@@ -71,7 +70,7 @@ public class WindowAccessor {
return fieldIsAutoRequestFocus.getBoolean(w); return fieldIsAutoRequestFocus.getBoolean(w);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
log.log(Level.FINE, "Unable to access the Window object", e); log.fine("Unable to access the Window object", e);
} }
return true; return true;
} }
...@@ -81,7 +80,7 @@ public class WindowAccessor { ...@@ -81,7 +80,7 @@ public class WindowAccessor {
return fieldIsTrayIconWindow.getBoolean(w); return fieldIsTrayIconWindow.getBoolean(w);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
log.log(Level.FINE, "Unable to access the Window object", e); log.fine("Unable to access the Window object", e);
} }
return false; return false;
} }
...@@ -91,7 +90,7 @@ public class WindowAccessor { ...@@ -91,7 +90,7 @@ public class WindowAccessor {
fieldIsTrayIconWindow.set(w, isTrayIconWindow); fieldIsTrayIconWindow.set(w, isTrayIconWindow);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
log.log(Level.FINE, "Unable to access the Window object", e); log.fine("Unable to access the Window object", e);
} }
} }
} }
...@@ -89,7 +89,7 @@ import java.util.Stack; ...@@ -89,7 +89,7 @@ import java.util.Stack;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.TreeSet; import java.util.TreeSet;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
...@@ -222,7 +222,7 @@ public abstract class DataTransferer { ...@@ -222,7 +222,7 @@ public abstract class DataTransferer {
*/ */
private static DataTransferer transferer; private static DataTransferer transferer;
private static final Logger dtLog = Logger.getLogger("sun.awt.datatransfer.DataTransfer"); private static final PlatformLogger dtLog = PlatformLogger.getLogger("sun.awt.datatransfer.DataTransfer");
static { static {
Class tCharArrayClass = null, tByteArrayClass = null; Class tCharArrayClass = null, tByteArrayClass = null;
...@@ -382,9 +382,9 @@ public abstract class DataTransferer { ...@@ -382,9 +382,9 @@ public abstract class DataTransferer {
* "text". * "text".
*/ */
public static boolean doesSubtypeSupportCharset(DataFlavor flavor) { public static boolean doesSubtypeSupportCharset(DataFlavor flavor) {
if (dtLog.isLoggable(Level.FINE)) { if (dtLog.isLoggable(PlatformLogger.FINE)) {
if (!"text".equals(flavor.getPrimaryType())) { if (!"text".equals(flavor.getPrimaryType())) {
dtLog.log(Level.FINE, "Assertion (\"text\".equals(flavor.getPrimaryType())) failed"); dtLog.fine("Assertion (\"text\".equals(flavor.getPrimaryType())) failed");
} }
} }
......
...@@ -48,7 +48,7 @@ import java.util.HashSet; ...@@ -48,7 +48,7 @@ import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Arrays; import java.util.Arrays;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
...@@ -99,7 +99,7 @@ public abstract class SunDropTargetContextPeer implements DropTargetContextPeer, ...@@ -99,7 +99,7 @@ public abstract class SunDropTargetContextPeer implements DropTargetContextPeer,
protected static final Object _globalLock = new Object(); protected static final Object _globalLock = new Object();
private static final Logger dndLog = Logger.getLogger("sun.awt.dnd.SunDropTargetContextPeer"); private static final PlatformLogger dndLog = PlatformLogger.getLogger("sun.awt.dnd.SunDropTargetContextPeer");
/* /*
* a primitive mechanism for advertising intra-JVM Transferables * a primitive mechanism for advertising intra-JVM Transferables
...@@ -845,8 +845,8 @@ public abstract class SunDropTargetContextPeer implements DropTargetContextPeer, ...@@ -845,8 +845,8 @@ public abstract class SunDropTargetContextPeer implements DropTargetContextPeer,
void registerEvent(SunDropTargetEvent e) { void registerEvent(SunDropTargetEvent e) {
handler.lock(); handler.lock();
if (!eventSet.add(e) && dndLog.isLoggable(Level.FINE)) { if (!eventSet.add(e) && dndLog.isLoggable(PlatformLogger.FINE)) {
dndLog.log(Level.FINE, "Event is already registered: " + e); dndLog.fine("Event is already registered: " + e);
} }
handler.unlock(); handler.unlock();
} }
......
...@@ -50,9 +50,9 @@ import java.text.MessageFormat; ...@@ -50,9 +50,9 @@ import java.text.MessageFormat;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Locale; import java.util.Locale;
import java.util.logging.*;
import java.util.prefs.BackingStoreException; import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences; import java.util.prefs.Preferences;
import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
/** /**
...@@ -67,7 +67,7 @@ import sun.awt.SunToolkit; ...@@ -67,7 +67,7 @@ import sun.awt.SunToolkit;
public class InputContext extends java.awt.im.InputContext public class InputContext extends java.awt.im.InputContext
implements ComponentListener, WindowListener { implements ComponentListener, WindowListener {
private static final Logger log = Logger.getLogger("sun.awt.im.InputContext"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.im.InputContext");
// The current input method is represented by two objects: // The current input method is represented by two objects:
// a locator is used to keep information about the selected // a locator is used to keep information about the selected
// input method and locale until we actually need a real input // input method and locale until we actually need a real input
...@@ -386,7 +386,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -386,7 +386,7 @@ public class InputContext extends java.awt.im.InputContext
} }
previousInputMethod = null; previousInputMethod = null;
if (log.isLoggable(Level.FINE)) log.fine("Current client component " + currentClientComponent); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Current client component " + currentClientComponent);
if (inputMethod instanceof InputMethodAdapter) { if (inputMethod instanceof InputMethodAdapter) {
((InputMethodAdapter) inputMethod).setClientComponent(currentClientComponent); ((InputMethodAdapter) inputMethod).setClientComponent(currentClientComponent);
} }
...@@ -889,7 +889,7 @@ public class InputContext extends java.awt.im.InputContext ...@@ -889,7 +889,7 @@ public class InputContext extends java.awt.im.InputContext
{inputMethodLocator.getDescriptor().getInputMethodDisplayName(null, Locale.getDefault()), {inputMethodLocator.getDescriptor().getInputMethodDisplayName(null, Locale.getDefault()),
throwable.getLocalizedMessage()}; throwable.getLocalizedMessage()};
MessageFormat mf = new MessageFormat(errorTextFormat); MessageFormat mf = new MessageFormat(errorTextFormat);
Logger logger = Logger.getLogger("sun.awt.im"); PlatformLogger logger = PlatformLogger.getLogger("sun.awt.im");
logger.config(mf.format(args)); logger.config(mf.format(args));
} }
......
...@@ -31,12 +31,11 @@ import java.io.File; ...@@ -31,12 +31,11 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.security.AccessController; import java.security.AccessController;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.plaf.FontUIResource; import javax.swing.plaf.FontUIResource;
import sun.security.action.GetPropertyAction; import sun.security.action.GetPropertyAction;
import sun.util.logging.PlatformLogger;
/** /**
* A collection of utility methods. * A collection of utility methods.
...@@ -139,7 +138,7 @@ public final class FontUtilities { ...@@ -139,7 +138,7 @@ public final class FontUtilities {
public static final int MAX_LAYOUT_CHARCODE = 0x206F; public static final int MAX_LAYOUT_CHARCODE = 0x206F;
private static boolean debugFonts = false; private static boolean debugFonts = false;
private static Logger logger = null; private static PlatformLogger logger = null;
private static boolean logging; private static boolean logging;
static { static {
...@@ -149,17 +148,17 @@ public final class FontUtilities { ...@@ -149,17 +148,17 @@ public final class FontUtilities {
if (debugLevel != null && !debugLevel.equals("false")) { if (debugLevel != null && !debugLevel.equals("false")) {
debugFonts = true; debugFonts = true;
logger = Logger.getLogger("sun.java2d"); logger = PlatformLogger.getLogger("sun.java2d");
if (debugLevel.equals("warning")) { if (debugLevel.equals("warning")) {
logger.setLevel(Level.WARNING); logger.setLevel(PlatformLogger.WARNING);
} else if (debugLevel.equals("severe")) { } else if (debugLevel.equals("severe")) {
logger.setLevel(Level.SEVERE); logger.setLevel(PlatformLogger.SEVERE);
} }
} }
if (debugFonts) { if (debugFonts) {
logger = Logger.getLogger("sun.java2d", null); logger = PlatformLogger.getLogger("sun.java2d");
logging = logger.getLevel() != Level.OFF; logging = logger.isEnabled();
} }
} }
...@@ -298,7 +297,7 @@ public final class FontUtilities { ...@@ -298,7 +297,7 @@ public final class FontUtilities {
return false; return false;
} }
public static Logger getLogger() { public static PlatformLogger getLogger() {
return logger; return logger;
} }
......
...@@ -47,14 +47,13 @@ import java.util.StringTokenizer; ...@@ -47,14 +47,13 @@ import java.util.StringTokenizer;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.Vector; import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.plaf.FontUIResource; import javax.swing.plaf.FontUIResource;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.FontConfiguration; import sun.awt.FontConfiguration;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
import sun.java2d.FontSupport; import sun.java2d.FontSupport;
import sun.util.logging.PlatformLogger;
/** /**
* The base implementation of the {@link FontManager} interface. It implements * The base implementation of the {@link FontManager} interface. It implements
...@@ -473,7 +472,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { ...@@ -473,7 +472,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
if (FontUtilities.debugFonts()) { if (FontUtilities.debugFonts()) {
Logger logger = FontUtilities.getLogger(); PlatformLogger logger = FontUtilities.getLogger();
logger.info("JRE font directory: " + jreFontDirName); logger.info("JRE font directory: " + jreFontDirName);
logger.info("Extra font path: " + extraFontPath); logger.info("Extra font path: " + extraFontPath);
logger.info("Debug font path: " + dbgFontPath); logger.info("Debug font path: " + dbgFontPath);
...@@ -1615,7 +1614,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { ...@@ -1615,7 +1614,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
} }
private void logPlatformFontInfo() { private void logPlatformFontInfo() {
Logger logger = FontUtilities.getLogger(); PlatformLogger logger = FontUtilities.getLogger();
for (int i=0; i< pathDirs.length;i++) { for (int i=0; i< pathDirs.length;i++) {
logger.info("fontdir="+pathDirs[i]); logger.info("fontdir="+pathDirs[i]);
} }
...@@ -2997,7 +2996,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { ...@@ -2997,7 +2996,7 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE {
registeredFontFiles.add(fullName); registeredFontFiles.add(fullName);
if (FontUtilities.debugFonts() if (FontUtilities.debugFonts()
&& FontUtilities.getLogger().isLoggable(Level.INFO)) { && FontUtilities.getLogger().isLoggable(PlatformLogger.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) {
......
...@@ -43,7 +43,6 @@ import java.util.HashMap; ...@@ -43,7 +43,6 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Locale; import java.util.Locale;
import java.util.logging.Level;
import sun.java2d.Disposer; import sun.java2d.Disposer;
import sun.java2d.DisposerRecord; import sun.java2d.DisposerRecord;
...@@ -405,7 +404,7 @@ public class TrueTypeFont extends FileFont { ...@@ -405,7 +404,7 @@ public class TrueTypeFont extends FileFont {
} }
} catch (FontFormatException e) { } catch (FontFormatException e) {
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().log(Level.SEVERE, FontUtilities.getLogger().severe(
"While reading " + platName, e); "While reading " + platName, e);
} }
bread = -1; // signal EOF bread = -1; // signal EOF
...@@ -426,7 +425,7 @@ public class TrueTypeFont extends FileFont { ...@@ -426,7 +425,7 @@ public class TrueTypeFont extends FileFont {
* file are handled as a FontFormatException. * file are handled as a FontFormatException.
*/ */
if (FontUtilities.isLogging()) { if (FontUtilities.isLogging()) {
FontUtilities.getLogger().log(Level.SEVERE, FontUtilities.getLogger().severe(
"While reading " + platName, e); "While reading " + platName, e);
} }
if (bread == 0) { if (bread == 0) {
......
...@@ -55,8 +55,6 @@ import java.util.StringTokenizer; ...@@ -55,8 +55,6 @@ import java.util.StringTokenizer;
import java.util.TreeMap; import java.util.TreeMap;
import java.util.Vector; import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.DisplayChangedListener; import sun.awt.DisplayChangedListener;
import sun.awt.FontConfiguration; import sun.awt.FontConfiguration;
...@@ -80,7 +78,6 @@ public abstract class SunGraphicsEnvironment extends GraphicsEnvironment ...@@ -80,7 +78,6 @@ public abstract class SunGraphicsEnvironment extends GraphicsEnvironment
public static boolean isOpenSolaris; public static boolean isOpenSolaris;
private static Font defaultFont; private static Font defaultFont;
protected static Logger logger = null;
public SunGraphicsEnvironment() { public SunGraphicsEnvironment() {
java.security.AccessController.doPrivileged( java.security.AccessController.doPrivileged(
......
...@@ -31,8 +31,6 @@ import java.awt.peer.TrayIconPeer; ...@@ -31,8 +31,6 @@ import java.awt.peer.TrayIconPeer;
import sun.awt.*; import sun.awt.*;
import java.awt.image.*; import java.awt.image.*;
import java.text.BreakIterator; import java.text.BreakIterator;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ArrayBlockingQueue;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
......
...@@ -33,7 +33,7 @@ import java.util.List; ...@@ -33,7 +33,7 @@ import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import sun.awt.motif.X11FontMetrics; import sun.awt.motif.X11FontMetrics;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
// FIXME: implement multi-select // FIXME: implement multi-select
/* /*
...@@ -43,7 +43,7 @@ import java.util.logging.*; ...@@ -43,7 +43,7 @@ import java.util.logging.*;
* posting of Item or ActionEvents * posting of Item or ActionEvents
*/ */
public class ListHelper implements XScrollbarClient { public class ListHelper implements XScrollbarClient {
private static final Logger log = Logger.getLogger("sun.awt.X11.ListHelper"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.ListHelper");
private final int FOCUS_INSET = 1; private final int FOCUS_INSET = 1;
...@@ -263,7 +263,7 @@ public class ListHelper implements XScrollbarClient { ...@@ -263,7 +263,7 @@ public class ListHelper implements XScrollbarClient {
} }
public int y2index(int y) { public int y2index(int y) {
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.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);
} }
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
package sun.awt.X11; package sun.awt.X11;
import sun.misc.Unsafe; import sun.misc.Unsafe;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord { class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord {
private static final Logger log = Logger.getLogger("sun.awt.X11.UnsafeXDisposerRecord"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.UnsafeXDisposerRecord");
private static Unsafe unsafe = XlibWrapper.unsafe; private static Unsafe unsafe = XlibWrapper.unsafe;
final long[] unsafe_ptrs, x_ptrs; final long[] unsafe_ptrs, x_ptrs;
final String name; final String name;
...@@ -59,11 +59,11 @@ class UnsafeXDisposerRecord implements sun.java2d.DisposerRecord { ...@@ -59,11 +59,11 @@ 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(Level.WARNING)) { if (XlibWrapper.isBuildInternal && "Java2D Disposer".equals(Thread.currentThread().getName()) && log.isLoggable(PlatformLogger.WARNING)) {
if (place != null) { if (place != null) {
log.log(Level.WARNING, name + " object was not disposed before finalization!", place); log.warning(name + " object was not disposed before finalization!", place);
} else { } else {
log.log(Level.WARNING, name + " object was not disposed before finalization!"); log.warning(name + " object was not disposed before finalization!");
} }
} }
......
...@@ -35,15 +35,14 @@ package sun.awt.X11; ...@@ -35,15 +35,14 @@ package sun.awt.X11;
import java.util.*; import java.util.*;
import java.awt.*; import java.awt.*;
import sun.awt.XSettings; import sun.awt.XSettings;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
class XAWTXSettings extends XSettings implements XMSelectionListener { class XAWTXSettings extends XSettings implements XMSelectionListener {
private final XAtom xSettingsPropertyAtom = XAtom.get("_XSETTINGS_SETTINGS"); private final XAtom xSettingsPropertyAtom = XAtom.get("_XSETTINGS_SETTINGS");
private static Logger log = Logger.getLogger("sun.awt.X11.XAWTXSettings"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XAWTXSettings");
/* The maximal length of the property data. */ /* The maximal length of the property data. */
public static final long MAX_LENGTH = 1000000; public static final long MAX_LENGTH = 1000000;
...@@ -56,7 +55,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -56,7 +55,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
} }
void initXSettings() { void initXSettings() {
if (log.isLoggable(Level.FINE)) log.fine("Initializing XAWT XSettings"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Initializing XAWT XSettings");
settings = new XMSelection("_XSETTINGS"); settings = new XMSelection("_XSETTINGS");
settings.addSelectionListener(this); settings.addSelectionListener(this);
initPerScreenXSettings(); initPerScreenXSettings();
...@@ -67,12 +66,12 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -67,12 +66,12 @@ 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(Level.FINE)) log.fine("Owner " + deadOwner + " died for selection " + sel + " screen "+ screen); if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINE)) log.fine("New Owner "+ newOwner + " for selection = " + sel + " screen " +screen ); if (log.isLoggable(PlatformLogger.FINE)) 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) {
...@@ -81,7 +80,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -81,7 +80,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
} }
void initPerScreenXSettings() { void initPerScreenXSettings() {
if (log.isLoggable(Level.FINE)) log.fine("Updating Per XSettings changes"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Updating Per XSettings changes");
/* /*
* As toolkit cannot yet cope with per-screen desktop properties, * As toolkit cannot yet cope with per-screen desktop properties,
...@@ -115,7 +114,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -115,7 +114,7 @@ class XAWTXSettings extends XSettings implements XMSelectionListener {
} }
private Map getUpdatedSettings(final long owner) { private Map getUpdatedSettings(final long owner) {
if (log.isLoggable(Level.FINE)) log.fine("owner =" + owner); if (log.isLoggable(PlatformLogger.FINE)) log.fine("owner =" + owner);
if (0 == owner) { if (0 == owner) {
return null; return null;
} }
...@@ -129,13 +128,13 @@ class XAWTXSettings extends XSettings implements XMSelectionListener { ...@@ -129,13 +128,13 @@ 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(Level.FINE)) log.fine("OH OH : getter failed status = " + status ); if (log.isLoggable(PlatformLogger.FINE)) log.fine("OH OH : getter failed status = " + status );
settings = null; settings = null;
} }
long ptr = getter.getData(); long ptr = getter.getData();
if (log.isLoggable(Level.FINE)) log.fine("noItems = " + getter.getNumberOfItems()); if (log.isLoggable(PlatformLogger.FINE)) log.fine("noItems = " + getter.getNumberOfItems());
byte array[] = Native.toBytes(ptr,getter.getNumberOfItems()); byte array[] = Native.toBytes(ptr,getter.getNumberOfItems());
if (array != null) { if (array != null) {
settings = update(array); settings = update(array);
......
...@@ -33,7 +33,7 @@ import sun.awt.*; ...@@ -33,7 +33,7 @@ import sun.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Vector; import java.util.Vector;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.java2d.SurfaceData; import sun.java2d.SurfaceData;
import sun.java2d.SunGraphics2D; import sun.java2d.SunGraphics2D;
...@@ -49,7 +49,7 @@ abstract public class XBaseMenuWindow extends XWindow { ...@@ -49,7 +49,7 @@ abstract public class XBaseMenuWindow extends XWindow {
* *
************************************************/ ************************************************/
private static Logger log = Logger.getLogger("sun.awt.X11.XBaseMenuWindow"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseMenuWindow");
/* /*
* Colors are calculated using MotifColorUtilities class * Colors are calculated using MotifColorUtilities class
...@@ -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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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(Level.FINEST)) { if (log.isLoggable(PlatformLogger.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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
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(Level.FINER)) log.finer(event.toString()); if (log.isLoggable(PlatformLogger.FINER)) log.finer(event.toString());
if (event.getID() != KeyEvent.KEY_PRESSED) { if (event.getID() != KeyEvent.KEY_PRESSED) {
return; return;
} }
......
...@@ -27,15 +27,15 @@ package sun.awt.X11; ...@@ -27,15 +27,15 @@ package sun.awt.X11;
import java.awt.*; import java.awt.*;
import sun.awt.*; import sun.awt.*;
import java.util.logging.*;
import java.util.*; import java.util.*;
import sun.util.logging.PlatformLogger;
public class XBaseWindow { public class XBaseWindow {
private static final Logger log = Logger.getLogger("sun.awt.X11.XBaseWindow"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XBaseWindow");
private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XBaseWindow"); private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XBaseWindow");
private static final Logger eventLog = Logger.getLogger("sun.awt.X11.event.XBaseWindow"); private static final PlatformLogger eventLog = PlatformLogger.getLogger("sun.awt.X11.event.XBaseWindow");
private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XBaseWindow"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XBaseWindow");
private static final Logger grabLog = Logger.getLogger("sun.awt.X11.grab.XBaseWindow"); private static final PlatformLogger grabLog = PlatformLogger.getLogger("sun.awt.X11.grab.XBaseWindow");
public static final String public static final String
PARENT_WINDOW = "parent window", // parent window, Long PARENT_WINDOW = "parent window", // parent window, Long
...@@ -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(Level.FINE)) log.fine("WM name is " + getWMName()); if (log.isLoggable(PlatformLogger.FINE)) log.fine("WM name is " + getWMName());
updateWMName(); updateWMName();
// Set WM_CLIENT_LEADER property // Set WM_CLIENT_LEADER property
...@@ -198,7 +198,7 @@ public class XBaseWindow { ...@@ -198,7 +198,7 @@ public class XBaseWindow {
awtUnlock(); awtUnlock();
throw re; throw re;
} catch (Throwable t) { } catch (Throwable t) {
log.log(Level.WARNING, "Exception during peer initialization", t); log.warning("Exception during peer initialization", t);
awtLock(); awtLock();
initialising = InitialiseState.FAILED_INITIALISATION; initialising = InitialiseState.FAILED_INITIALISATION;
awtLockNotifyAll(); awtLockNotifyAll();
...@@ -360,7 +360,7 @@ public class XBaseWindow { ...@@ -360,7 +360,7 @@ public class XBaseWindow {
value_mask |= XConstants.CWBitGravity; value_mask |= XConstants.CWBitGravity;
} }
if (log.isLoggable(Level.FINE)) { if (log.isLoggable(PlatformLogger.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(),
...@@ -480,7 +480,7 @@ public class XBaseWindow { ...@@ -480,7 +480,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(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags)); if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(flags));
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
XSizeHints hints = getHints(); XSizeHints hints = getHints();
...@@ -541,7 +541,7 @@ public class XBaseWindow { ...@@ -541,7 +541,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(Level.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) + if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, resulted flags " + XlibWrapper.hintsToString(flags) +
", values " + hints); ", values " + hints);
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData); XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), getWindow(), hints.pData);
} finally { } finally {
...@@ -593,7 +593,7 @@ public class XBaseWindow { ...@@ -593,7 +593,7 @@ public class XBaseWindow {
public void xRequestFocus(long time) { public void xRequestFocus(long time) {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (focusLog.isLoggable(Level.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time); if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()) + " with time " + time);
XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time); XlibWrapper.XSetInputFocus2(XToolkit.getDisplay(), getWindow(), time);
} finally { } finally {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
...@@ -602,7 +602,7 @@ public class XBaseWindow { ...@@ -602,7 +602,7 @@ public class XBaseWindow {
public void xRequestFocus() { public void xRequestFocus() {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (focusLog.isLoggable(Level.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow())); if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("XSetInputFocus on " + Long.toHexString(getWindow()));
XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow()); XlibWrapper.XSetInputFocus(XToolkit.getDisplay(), getWindow());
} finally { } finally {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
...@@ -619,7 +619,7 @@ public class XBaseWindow { ...@@ -619,7 +619,7 @@ public class XBaseWindow {
} }
public void xSetVisible(boolean visible) { public void xSetVisible(boolean visible) {
if (log.isLoggable(Level.FINE)) log.fine("Setting visible on " + this + " to " + visible); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting visible on " + this + " to " + visible);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
this.visible = visible; this.visible = visible;
...@@ -824,7 +824,7 @@ public class XBaseWindow { ...@@ -824,7 +824,7 @@ public class XBaseWindow {
* The active grab overrides activated automatic grab. * The active grab overrides activated automatic grab.
*/ */
public boolean grabInput() { public boolean grabInput() {
grabLog.log(Level.FINE, "Grab input on {0}", new Object[] {this}); grabLog.fine("Grab input on {0}", this);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
...@@ -887,7 +887,7 @@ public class XBaseWindow { ...@@ -887,7 +887,7 @@ public class XBaseWindow {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
XBaseWindow grabWindow = XAwtState.getGrabWindow(); XBaseWindow grabWindow = XAwtState.getGrabWindow();
grabLog.log(Level.FINE, "UnGrab input on {0}", new Object[] {grabWindow}); grabLog.fine("UnGrab input on {0}", grabWindow);
if (grabWindow != null) { if (grabWindow != null) {
grabWindow.ungrabInputImpl(); grabWindow.ungrabInputImpl();
if (!XToolkit.getSunAwtDisableGrab()) { if (!XToolkit.getSunAwtDisableGrab()) {
...@@ -929,7 +929,7 @@ public class XBaseWindow { ...@@ -929,7 +929,7 @@ public class XBaseWindow {
mapped = false; mapped = false;
} }
public void handleReparentNotifyEvent(XEvent xev) { public void handleReparentNotifyEvent(XEvent xev) {
if (eventLog.isLoggable(Level.FINER)) { if (eventLog.isLoggable(PlatformLogger.FINER)) {
XReparentEvent msg = xev.get_xreparent(); XReparentEvent msg = xev.get_xreparent();
eventLog.finer(msg.toString()); eventLog.finer(msg.toString());
} }
...@@ -939,8 +939,8 @@ public class XBaseWindow { ...@@ -939,8 +939,8 @@ 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(Level.FINER)) { if (eventLog.isLoggable(PlatformLogger.FINER)) {
eventLog.log(Level.FINER, "{0}", new Object[] {msg}); eventLog.finer("{0}", msg);
} }
} }
...@@ -969,7 +969,7 @@ public class XBaseWindow { ...@@ -969,7 +969,7 @@ public class XBaseWindow {
} }
public void handleClientMessage(XEvent xev) { public void handleClientMessage(XEvent xev) {
if (eventLog.isLoggable(Level.FINER)) { if (eventLog.isLoggable(PlatformLogger.FINER)) {
XClientMessageEvent msg = xev.get_xclient(); XClientMessageEvent msg = xev.get_xclient();
eventLog.finer(msg.toString()); eventLog.finer(msg.toString());
} }
...@@ -1021,8 +1021,7 @@ public class XBaseWindow { ...@@ -1021,8 +1021,7 @@ public class XBaseWindow {
} }
public void handleConfigureNotifyEvent(XEvent xev) { public void handleConfigureNotifyEvent(XEvent xev) {
XConfigureEvent xe = xev.get_xconfigure(); XConfigureEvent xe = xev.get_xconfigure();
insLog.log(Level.FINER, "Configure, {0}", insLog.finer("Configure, {0}", xe);
new Object[] {xe});
x = xe.get_x(); x = xe.get_x();
y = xe.get_y(); y = xe.get_y();
width = xe.get_width(); width = xe.get_width();
...@@ -1073,7 +1072,7 @@ public class XBaseWindow { ...@@ -1073,7 +1072,7 @@ public class XBaseWindow {
} }
public void dispatchEvent(XEvent xev) { public void dispatchEvent(XEvent xev) {
if (eventLog.isLoggable(Level.FINEST)) eventLog.finest(xev.toString()); if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xev.toString());
int type = xev.get_type(); int type = xev.get_type();
if (isDisposed()) { if (isDisposed()) {
......
...@@ -29,8 +29,6 @@ import java.awt.*; ...@@ -29,8 +29,6 @@ import java.awt.*;
import java.awt.peer.*; import java.awt.peer.*;
import java.awt.event.*; import java.awt.event.*;
import java.util.logging.*;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
...@@ -42,8 +40,6 @@ class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPee ...@@ -42,8 +40,6 @@ class XCheckboxMenuItemPeer extends XMenuItemPeer implements CheckboxMenuItemPee
* *
************************************************/ ************************************************/
private static Logger log = Logger.getLogger("sun.awt.X11.XCheckboxMenuItemPeer");
/* /*
* CheckboxMenuItem's fields * CheckboxMenuItem's fields
*/ */
......
...@@ -32,11 +32,11 @@ import java.awt.image.BufferedImage; ...@@ -32,11 +32,11 @@ import java.awt.image.BufferedImage;
import javax.swing.plaf.basic.BasicGraphicsUtils; import javax.swing.plaf.basic.BasicGraphicsUtils;
import java.awt.geom.AffineTransform; import java.awt.geom.AffineTransform;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
class XCheckboxPeer extends XComponentPeer implements CheckboxPeer { class XCheckboxPeer extends XComponentPeer implements CheckboxPeer {
private static final Logger log = Logger.getLogger("sun.awt.X11.XCheckboxPeer"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XCheckboxPeer");
private static final Insets focusInsets = new Insets(0,0,0,0); private static final Insets focusInsets = new Insets(0,0,0,0);
private static final Insets borderInsets = new Insets(2,2,2,2); private static final Insets borderInsets = new Insets(2,2,2,2);
...@@ -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(Level.FINER)) { if (log.isLoggable(PlatformLogger.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(Level.FINER)) { if (log.isLoggable(PlatformLogger.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(Level.FINER)) { if (log.isLoggable(PlatformLogger.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(Level.FINER)) { if (log.isLoggable(PlatformLogger.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());
} }
......
...@@ -28,7 +28,7 @@ package sun.awt.X11; ...@@ -28,7 +28,7 @@ package sun.awt.X11;
import java.awt.*; import java.awt.*;
import java.awt.peer.*; import java.awt.peer.*;
import java.awt.event.*; import java.awt.event.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
// FIXME: tab traversal should be disabled when mouse is captured (4816336) // FIXME: tab traversal should be disabled when mouse is captured (4816336)
...@@ -43,7 +43,7 @@ import java.util.logging.*; ...@@ -43,7 +43,7 @@ import java.util.logging.*;
// TODO: make painting more efficient (i.e. when down arrow is pressed, only two items should need to be repainted. // TODO: make painting more efficient (i.e. when down arrow is pressed, only two items should need to be repainted.
public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelStateListener { public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelStateListener {
private static final Logger log = Logger.getLogger("sun.awt.X11.XChoicePeer"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XChoicePeer");
private static final int MAX_UNFURLED_ITEMS = 10; // Maximum number of private static final int MAX_UNFURLED_ITEMS = 10; // Maximum number of
// items to be displayed // items to be displayed
...@@ -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(Level.FINE)) { if (log.isLoggable(PlatformLogger.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);
......
...@@ -66,7 +66,8 @@ import java.util.Collection; ...@@ -66,7 +66,8 @@ import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.Vector; import java.util.Vector;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.*; import sun.awt.*;
import sun.awt.event.IgnorePaintEvent; import sun.awt.event.IgnorePaintEvent;
import sun.awt.image.SunVolatileImage; import sun.awt.image.SunVolatileImage;
...@@ -77,12 +78,12 @@ import sun.java2d.pipe.Region; ...@@ -77,12 +78,12 @@ import sun.java2d.pipe.Region;
public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer, public class XComponentPeer extends XWindow implements ComponentPeer, DropTargetPeer,
BackBufferCapsProvider BackBufferCapsProvider
{ {
private static final Logger log = Logger.getLogger("sun.awt.X11.XComponentPeer"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XComponentPeer");
private static final Logger buffersLog = Logger.getLogger("sun.awt.X11.XComponentPeer.multibuffer"); private static final PlatformLogger buffersLog = PlatformLogger.getLogger("sun.awt.X11.XComponentPeer.multibuffer");
private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XComponentPeer"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XComponentPeer");
private static final Logger fontLog = Logger.getLogger("sun.awt.X11.font.XComponentPeer"); private static final PlatformLogger fontLog = PlatformLogger.getLogger("sun.awt.X11.font.XComponentPeer");
private static final Logger enableLog = Logger.getLogger("sun.awt.X11.enable.XComponentPeer"); private static final PlatformLogger enableLog = PlatformLogger.getLogger("sun.awt.X11.enable.XComponentPeer");
private static final Logger shapeLog = Logger.getLogger("sun.awt.X11.shape.XComponentPeer"); private static final PlatformLogger shapeLog = PlatformLogger.getLogger("sun.awt.X11.shape.XComponentPeer");
boolean paintPending = false; boolean paintPending = false;
boolean isLayouting = false; boolean isLayouting = false;
...@@ -159,7 +160,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -159,7 +160,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
break; break;
} }
} }
enableLog.log(Level.FINE, "Initial enable state: {0}", new Object[] {Boolean.valueOf(enabled)}); enableLog.fine("Initial enable state: {0}", Boolean.valueOf(enabled));
if (target.isVisible()) { if (target.isVisible()) {
setVisible(true); setVisible(true);
...@@ -253,7 +254,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -253,7 +254,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) {
focusLog.log(Level.FINE, "{0}", new Object[] {e}); focusLog.fine("{0}", e);
bHasFocus = true; bHasFocus = true;
} }
...@@ -261,7 +262,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -261,7 +262,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) {
focusLog.log(Level.FINE, "{0}", new Object[] {e}); focusLog.fine("{0}", e);
bHasFocus = false; bHasFocus = false;
} }
...@@ -333,7 +334,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -333,7 +334,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(Level.FINER)) focusLog.finer("Proceeding with request to " + if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Proceeding with request to " +
lightweightChild + " in " + target); lightweightChild + " in " + target);
/** /**
* The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight * The problems with requests in non-focused window arise because shouldNativelyFocusHeavyweight
...@@ -358,7 +359,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -358,7 +359,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
*/ */
boolean res = wpeer.requestWindowFocus(null); boolean res = wpeer.requestWindowFocus(null);
if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Requested window focus: " + res); if (focusLog.isLoggable(PlatformLogger.FINER)) 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)
// 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())) {
...@@ -378,13 +379,13 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -378,13 +379,13 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
private boolean rejectFocusRequestHelper(String logMsg) { private boolean rejectFocusRequestHelper(String logMsg) {
if (focusLog.isLoggable(Level.FINER)) focusLog.finer(logMsg); if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(logMsg);
XKeyboardFocusManagerPeer.removeLastFocusRequest(target); XKeyboardFocusManagerPeer.removeLastFocusRequest(target);
return false; return false;
} }
void handleJavaFocusEvent(AWTEvent e) { void handleJavaFocusEvent(AWTEvent e) {
if (focusLog.isLoggable(Level.FINER)) focusLog.finer(e.toString()); if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer(e.toString());
if (e.getID() == FocusEvent.FOCUS_GAINED) { if (e.getID() == FocusEvent.FOCUS_GAINED) {
focusGained((FocusEvent)e); focusGained((FocusEvent)e);
} else { } else {
...@@ -414,7 +415,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -414,7 +415,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
* @see java.awt.peer.ComponentPeer * @see java.awt.peer.ComponentPeer
*/ */
public void setEnabled(boolean value) { public void setEnabled(boolean value) {
enableLog.log(Level.FINE, "{0}ing {1}", new Object[] {(value?"Enabl":"Disabl"), this}); enableLog.fine("{0}ing {1}", (value?"Enabl":"Disabl"), this);
boolean repaintNeeded = (enabled != value); boolean repaintNeeded = (enabled != value);
enabled = value; enabled = value;
if (target instanceof Container) { if (target instanceof Container) {
...@@ -690,7 +691,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -690,7 +691,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public void setBackground(Color c) { public void setBackground(Color c) {
if (log.isLoggable(Level.FINE)) log.fine("Set background to " + c); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set background to " + c);
synchronized (getStateLock()) { synchronized (getStateLock()) {
background = c; background = c;
} }
...@@ -699,7 +700,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -699,7 +700,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public void setForeground(Color c) { public void setForeground(Color c) {
if (log.isLoggable(Level.FINE)) log.fine("Set foreground to " + c); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Set foreground to " + c);
synchronized (getStateLock()) { synchronized (getStateLock()) {
foreground = c; foreground = c;
} }
...@@ -718,7 +719,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -718,7 +719,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(Level.FINE)) fontLog.fine("Getting font metrics for " + font); if (fontLog.isLoggable(PlatformLogger.FINE)) fontLog.fine("Getting font metrics for " + font);
return sun.font.FontDesignMetrics.getMetrics(font); return sun.font.FontDesignMetrics.getMetrics(font);
} }
...@@ -1188,7 +1189,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1188,7 +1189,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(Level.FINE)) { if (buffersLog.isLoggable(PlatformLogger.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
...@@ -1206,7 +1207,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1206,7 +1207,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(Level.FINE)) { if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("flip(" + flipAction + ")"); buffersLog.fine("flip(" + flipAction + ")");
} }
if (backBuffer == 0) { if (backBuffer == 0) {
...@@ -1217,7 +1218,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1217,7 +1218,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public Image getBackBuffer() { public Image getBackBuffer() {
if (buffersLog.isLoggable(Level.FINE)) { if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("getBackBuffer()"); buffersLog.fine("getBackBuffer()");
} }
if (backBuffer == 0) { if (backBuffer == 0) {
...@@ -1227,7 +1228,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1227,7 +1228,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
} }
public void destroyBuffers() { public void destroyBuffers() {
if (buffersLog.isLoggable(Level.FINE)) { if (buffersLog.isLoggable(PlatformLogger.FINE)) {
buffersLog.fine("destroyBuffers()"); buffersLog.fine("destroyBuffers()");
} }
graphicsConfig.destroyBackBuffer(backBuffer); graphicsConfig.destroyBackBuffer(backBuffer);
...@@ -1262,7 +1263,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1262,7 +1263,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) {
enableLog.log(Level.FINEST, "Component is {1}, checking for disabled event {0}", new Object[] {e, (isEnabled()?"enabled":"disable")}); enableLog.finest("Component is {1}, checking for disabled event {0}", e, (isEnabled()?"enabled":"disable"));
if (!isEnabled()) { if (!isEnabled()) {
switch (e.get_type()) { switch (e.get_type()) {
case XConstants.ButtonPress: case XConstants.ButtonPress:
...@@ -1272,7 +1273,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1272,7 +1273,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:
enableLog.log(Level.FINER, "Event {0} is disable", new Object[] {e}); enableLog.finer("Event {0} is disable", e);
return true; return true;
} }
} }
...@@ -1393,7 +1394,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1393,7 +1394,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(Level.FINER)) { if (shapeLog.isLoggable(PlatformLogger.FINER)) {
shapeLog.finer( shapeLog.finer(
"*** INFO: Setting shape: PEER: " + this "*** INFO: Setting shape: PEER: " + this
+ "; WINDOW: " + getWindow() + "; WINDOW: " + getWindow()
...@@ -1423,7 +1424,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget ...@@ -1423,7 +1424,7 @@ public class XComponentPeer extends XWindow implements ComponentPeer, DropTarget
XToolkit.awtUnlock(); XToolkit.awtUnlock();
} }
} else { } else {
if (shapeLog.isLoggable(Level.FINER)) { if (shapeLog.isLoggable(PlatformLogger.FINER)) {
shapeLog.finer("*** WARNING: Shaping is NOT supported!"); shapeLog.finer("*** WARNING: Shaping is NOT supported!");
} }
} }
......
...@@ -30,8 +30,7 @@ import java.awt.Insets; ...@@ -30,8 +30,7 @@ import java.awt.Insets;
import java.awt.event.ComponentEvent; import java.awt.event.ComponentEvent;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.ComponentAccessor; import sun.awt.ComponentAccessor;
...@@ -44,7 +43,7 @@ import sun.awt.ComponentAccessor; ...@@ -44,7 +43,7 @@ import sun.awt.ComponentAccessor;
* decorated window. So coordinates in it would be the same as java coordinates. * decorated window. So coordinates in it would be the same as java coordinates.
*/ */
public final class XContentWindow extends XWindow { public final class XContentWindow extends XWindow {
private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XContentWindow"); private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XContentWindow");
static XContentWindow createContent(XDecoratedPeer parentFrame) { static XContentWindow createContent(XDecoratedPeer parentFrame) {
final WindowDimensions dims = parentFrame.getDimensions(); final WindowDimensions dims = parentFrame.getDimensions();
...@@ -116,8 +115,8 @@ public final class XContentWindow extends XWindow { ...@@ -116,8 +115,8 @@ 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(Level.FINE)) insLog.log(Level.FINE, "Setting content bounds {0}, old bounds {1}", if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting content bounds {0}, old bounds {1}",
new Object[] {newBounds, getBounds()}); newBounds, getBounds());
// Fix for 5023533: // Fix for 5023533:
// Change in the size of the content window means, well, change of the size // Change in the size of the content window means, well, change of the size
// Change in the location of the content window means change in insets // Change in the location of the content window means change in insets
......
...@@ -30,17 +30,16 @@ import java.awt.event.ComponentEvent; ...@@ -30,17 +30,16 @@ import java.awt.event.ComponentEvent;
import java.awt.event.InvocationEvent; import java.awt.event.InvocationEvent;
import java.awt.event.WindowEvent; import java.awt.event.WindowEvent;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.ComponentAccessor; import sun.awt.ComponentAccessor;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
abstract class XDecoratedPeer extends XWindowPeer { abstract class XDecoratedPeer extends XWindowPeer {
private static final Logger log = Logger.getLogger("sun.awt.X11.XDecoratedPeer"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XDecoratedPeer");
private static final Logger insLog = Logger.getLogger("sun.awt.X11.insets.XDecoratedPeer"); private static final PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XDecoratedPeer");
private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XDecoratedPeer"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XDecoratedPeer");
private static final Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XDecoratedPeer"); private static final PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XDecoratedPeer");
// Set to true when we get the first ConfigureNotify after being // Set to true when we get the first ConfigureNotify after being
// reparented - indicates that WM has adopted the top-level. // reparented - indicates that WM has adopted the top-level.
...@@ -79,7 +78,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -79,7 +78,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());
insLog.log(Level.FINE, "Initial dimensions {0}", new Object[] { dimensions }); insLog.fine("Initial dimensions {0}", dimensions);
// Deny default processing of these events on the shell - proxy will take care of // Deny default processing of these events on the shell - proxy will take care of
// them instead // them instead
...@@ -175,7 +174,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -175,7 +174,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
public void setTitle(String title) { public void setTitle(String title) {
if (log.isLoggable(Level.FINE)) log.fine("Title is " + title); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Title is " + title);
winAttr.title = title; winAttr.title = title;
updateWMName(); updateWMName();
} }
...@@ -265,7 +264,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -265,7 +264,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom); wm_set_insets = XWM.getInsetsFromProp(getWindow(), changedAtom);
} }
insLog.log(Level.FINER, "FRAME_EXTENTS: {0}", new Object[]{wm_set_insets}); insLog.finer("FRAME_EXTENTS: {0}", wm_set_insets);
if (wm_set_insets != null) { if (wm_set_insets != null) {
wm_set_insets = copy(wm_set_insets); wm_set_insets = copy(wm_set_insets);
...@@ -292,7 +291,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -292,7 +291,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(Level.FINE)) insLog.fine(xe.toString()); if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine(xe.toString());
reparent_serial = xe.get_serial(); reparent_serial = xe.get_serial();
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
...@@ -331,7 +330,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -331,7 +330,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) {
insLog.log(Level.FINER, "wm-provided insets {0}", new Object[]{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
Insets dimInsets = dimensions.getInsets(); Insets dimInsets = dimensions.getInsets();
if (correctWM.equals(dimInsets)) { if (correctWM.equals(dimInsets)) {
...@@ -345,9 +344,9 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -345,9 +344,9 @@ abstract class XDecoratedPeer extends XWindowPeer {
correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent()); correctWM = XWM.getWM().getInsets(this, xe.get_window(), xe.get_parent());
if (correctWM != null) { if (correctWM != null) {
insLog.log(Level.FINER, "correctWM {0}", new Object[] {correctWM}); insLog.finer("correctWM {0}", correctWM);
} else { } else {
insLog.log(Level.FINER, "correctWM insets are not available, waiting for configureNotify"); insLog.finer("correctWM insets are not available, waiting for configureNotify");
} }
} }
...@@ -368,7 +367,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -368,7 +367,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);
insLog.log(Level.FINEST, "Corrention {0}", new Object[] {correction}); insLog.finest("Corrention {0}", correction);
if (!isNull(correction)) { if (!isNull(correction)) {
currentInsets = copy(correctWM); currentInsets = copy(correctWM);
applyGuessedInsets(); applyGuessedInsets();
...@@ -378,7 +377,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -378,7 +377,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
//update minimum size hints //update minimum size hints
updateMinSizeHints(); updateMinSizeHints();
} }
if (insLog.isLoggable(Level.FINER)) insLog.finer("Dimensions before reparent: " + dimensions); if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Dimensions before reparent: " + dimensions);
dimensions.setInsets(getRealInsets()); dimensions.setInsets(getRealInsets());
insets_corrected = true; insets_corrected = true;
...@@ -452,8 +451,8 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -452,8 +451,8 @@ 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(Level.FINEST)) { if (insLog.isLoggable(PlatformLogger.FINEST)) {
insLog.log(Level.FINEST, "Get insets returns {0}", new Object[] {in}); insLog.finest("Get insets returns {0}", in);
} }
return in; return in;
} }
...@@ -482,7 +481,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -482,7 +481,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(Level.FINE)) { if (insLog.isLoggable(PlatformLogger.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) {
...@@ -503,8 +502,8 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -503,8 +502,8 @@ abstract class XDecoratedPeer extends XWindowPeer {
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (!isReparented() || !isVisible()) { if (!isReparented() || !isVisible()) {
insLog.log(Level.FINE, "- not reparented({0}) or not visible({1}), default reshape", insLog.fine("- not reparented({0}) or not visible({1}), default reshape",
new Object[] {Boolean.valueOf(isReparented()), Boolean.valueOf(visible)}); Boolean.valueOf(isReparented()), Boolean.valueOf(visible));
// Fix for 6323293. // Fix for 6323293.
// This actually is needed to preserve compatibility with previous releases - // This actually is needed to preserve compatibility with previous releases -
...@@ -609,8 +608,9 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -609,8 +608,9 @@ abstract class XDecoratedPeer extends XWindowPeer {
dims.setSize(width, height); dims.setSize(width, height);
break; break;
} }
if (insLog.isLoggable(Level.FINE)) insLog.log(Level.FINE, "For the operation {0} new dimensions are {1}", if (insLog.isLoggable(PlatformLogger.FINE))
new Object[] {operationToString(operation), dims}); insLog.fine("For the operation {0} new dimensions are {1}",
operationToString(operation), dims);
reshape(dims, operation, userReshape); reshape(dims, operation, userReshape);
} }
...@@ -640,7 +640,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -640,7 +640,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();
insLog.log(Level.FINE, "Configure notify {0}", new Object[] {xe}); insLog.fine("Configure notify {0}", xe);
// XXX: should really only consider synthetic events, but // XXX: should really only consider synthetic events, but
if (isReparented()) { if (isReparented()) {
...@@ -677,9 +677,9 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -677,9 +677,9 @@ 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(Level.FINE)) { if (insLog.isLoggable(PlatformLogger.FINE)) {
insLog.log(Level.FINE, "reparented={0}, visible={1}, WM={2}, decorations={3}", insLog.fine("reparented={0}, visible={1}, WM={2}, decorations={3}",
new Object[] {isReparented(), isVisible(), runningWM, getDecorations()}); isReparented(), isVisible(), runningWM, getDecorations());
} }
if (!isReparented() && isVisible() && runningWM != XWM.NO_WM if (!isReparented() && isVisible() && runningWM != XWM.NO_WM
&& !XWM.isNonReparentingWM() && !XWM.isNonReparentingWM()
...@@ -691,7 +691,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -691,7 +691,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(Level.FINER)) { if (insLog.isLoggable(PlatformLogger.FINER)) {
if (correctWM != null) { if (correctWM != null) {
insLog.finer("Configure notify - insets : " + correctWM); insLog.finer("Configure notify - insets : " + correctWM);
} else { } else {
...@@ -732,7 +732,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -732,7 +732,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
case XWM.SAWFISH_WM: case XWM.SAWFISH_WM:
{ {
Point xlocation = queryXLocation(); Point xlocation = queryXLocation();
if (log.isLoggable(Level.FINE)) log.log(Level.FINE, "New X location: {0}", new Object[]{xlocation}); if (log.isLoggable(PlatformLogger.FINE)) log.fine("New X location: {0}", xlocation);
if (xlocation != null) { if (xlocation != null) {
newLocation = xlocation; newLocation = xlocation;
} }
...@@ -749,8 +749,8 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -749,8 +749,8 @@ abstract class XDecoratedPeer extends XWindowPeer {
copy(currentInsets), copy(currentInsets),
true); true);
insLog.log(Level.FINER, "Insets are {0}, new dimensions {1}", insLog.finer("Insets are {0}, new dimensions {1}",
new Object[] {currentInsets, newDimensions}); currentInsets, newDimensions);
checkIfOnNewScreen(newDimensions.getBounds()); checkIfOnNewScreen(newDimensions.getBounds());
...@@ -789,7 +789,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -789,7 +789,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
public void setShellBounds(Rectangle rec) { public void setShellBounds(Rectangle rec) {
if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell bounds on " + if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell bounds on " +
this + " to " + rec); this + " to " + rec);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
...@@ -802,7 +802,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -802,7 +802,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
} }
public void setShellSize(Rectangle rec) { public void setShellSize(Rectangle rec) {
if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell size on " + if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell size on " +
this + " to " + rec); this + " to " + rec);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
...@@ -814,7 +814,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -814,7 +814,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
} }
public void setShellPosition(Rectangle rec) { public void setShellPosition(Rectangle rec) {
if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting shell position on " + if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting shell position on " +
this + " to " + rec); this + " to " + rec);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
...@@ -915,9 +915,9 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -915,9 +915,9 @@ 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(Level.FINE)) if (insLog.isLoggable(PlatformLogger.FINE))
insLog.log(Level.FINE, "getLocationOnScreen {0} not reparented: {1} ", insLog.fine("getLocationOnScreen {0} not reparented: {1} ",
new Object[] {this, location}); this, location);
return location; return location;
} }
} finally { } finally {
...@@ -954,7 +954,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -954,7 +954,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
public void setVisible(boolean vis) { public void setVisible(boolean vis) {
log.log(Level.FINER, "Setting {0} to visible {1}", new Object[] {this, Boolean.valueOf(vis)}); log.finer("Setting {0} to visible {1}", this, Boolean.valueOf(vis));
if (vis && !isVisible()) { if (vis && !isVisible()) {
XWM.setShellDecor(this); XWM.setShellDecor(this);
super.setVisible(vis); super.setVisible(vis);
...@@ -1005,7 +1005,7 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1005,7 +1005,7 @@ abstract class XDecoratedPeer extends XWindowPeer {
} }
private void handleWmTakeFocus(XClientMessageEvent cl) { private void handleWmTakeFocus(XClientMessageEvent cl) {
focusLog.log(Level.FINE, "WM_TAKE_FOCUS on {0}", new Object[]{this}); focusLog.fine("WM_TAKE_FOCUS on {0}", this);
requestWindowFocus(cl.get_data(1), true); requestWindowFocus(cl.get_data(1), true);
} }
...@@ -1018,9 +1018,9 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1018,9 +1018,9 @@ 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(Level.FINE)) focusLog.warning("Focus proxy is null for " + this); if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.warning("Focus proxy is null for " + this);
} else { } else {
if (focusLog.isLoggable(Level.FINE)) focusLog.fine("Requesting focus to proxy: " + focusProxy); if (focusLog.isLoggable(PlatformLogger.FINE)) focusLog.fine("Requesting focus to proxy: " + focusProxy);
if (timeProvided) { if (timeProvided) {
focusProxy.xRequestFocus(time); focusProxy.xRequestFocus(time);
} else { } else {
...@@ -1111,9 +1111,9 @@ abstract class XDecoratedPeer extends XWindowPeer { ...@@ -1111,9 +1111,9 @@ abstract class XDecoratedPeer extends XWindowPeer {
Window focusedWindow = XKeyboardFocusManagerPeer.getCurrentNativeFocusedWindow(); Window focusedWindow = XKeyboardFocusManagerPeer.getCurrentNativeFocusedWindow();
Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow); Window activeWindow = XWindowPeer.getDecoratedOwner(focusedWindow);
focusLog.log(Level.FINER, "Current window is: active={0}, focused={1}", focusLog.finer("Current window is: active={0}, focused={1}",
new Object[]{ Boolean.valueOf(target == activeWindow), Boolean.valueOf(target == activeWindow),
Boolean.valueOf(target == focusedWindow)}); Boolean.valueOf(target == focusedWindow));
XWindowPeer toFocus = this; XWindowPeer toFocus = this;
while (toFocus.nextTransientFor != null) { while (toFocus.nextTransientFor != null) {
......
...@@ -32,7 +32,7 @@ import java.awt.dnd.InvalidDnDOperationException; ...@@ -32,7 +32,7 @@ import java.awt.dnd.InvalidDnDOperationException;
import java.util.Map; import java.util.Map;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.misc.Unsafe; import sun.misc.Unsafe;
...@@ -42,8 +42,8 @@ import sun.misc.Unsafe; ...@@ -42,8 +42,8 @@ import sun.misc.Unsafe;
* @since 1.5 * @since 1.5
*/ */
class XDnDDragSourceProtocol extends XDragSourceProtocol { class XDnDDragSourceProtocol extends XDragSourceProtocol {
private static final Logger logger = private static final PlatformLogger logger =
Logger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDragSourceProtocol"); PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDragSourceProtocol");
private static final Unsafe unsafe = XlibWrapper.unsafe; private static final Unsafe unsafe = XlibWrapper.unsafe;
...@@ -395,7 +395,7 @@ class XDnDDragSourceProtocol extends XDragSourceProtocol { ...@@ -395,7 +395,7 @@ class XDnDDragSourceProtocol extends XDragSourceProtocol {
return false; return false;
} }
if (logger.isLoggable(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" sourceWindow=" + sourceWindow + logger.finest(" sourceWindow=" + sourceWindow +
" get_window=" + xclient.get_window() + " get_window=" + xclient.get_window() +
" xclient=" + xclient); " xclient=" + xclient);
......
...@@ -33,7 +33,7 @@ import java.awt.event.MouseEvent; ...@@ -33,7 +33,7 @@ import java.awt.event.MouseEvent;
import java.io.IOException; import java.io.IOException;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.misc.Unsafe; import sun.misc.Unsafe;
...@@ -43,8 +43,8 @@ import sun.misc.Unsafe; ...@@ -43,8 +43,8 @@ import sun.misc.Unsafe;
* @since 1.5 * @since 1.5
*/ */
class XDnDDropTargetProtocol extends XDropTargetProtocol { class XDnDDropTargetProtocol extends XDropTargetProtocol {
private static final Logger logger = private static final PlatformLogger logger =
Logger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDropTargetProtocol"); PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDnDDropTargetProtocol");
private static final Unsafe unsafe = XlibWrapper.unsafe; private static final Unsafe unsafe = XlibWrapper.unsafe;
...@@ -999,7 +999,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -999,7 +999,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(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" " logger.finest(" "
+ " entryVersion=" + version + " entryVersion=" + version
+ " sourceProtocolVersion=" + + " sourceProtocolVersion=" +
...@@ -1058,7 +1058,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1058,7 +1058,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(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" ctxt=" + ctxt + logger.finest(" ctxt=" + ctxt +
" type=" + (ctxt != 0 ? " type=" + (ctxt != 0 ?
getMessageType(new getMessageType(new
...@@ -1086,7 +1086,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1086,7 +1086,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(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" 1 " logger.finest(" 1 "
+ " embedded=" + embedded + " embedded=" + embedded
+ " source=" + xclient.get_data(0) + " source=" + xclient.get_data(0)
...@@ -1120,7 +1120,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1120,7 +1120,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
if (XToolkit.saved_error != null && if (XToolkit.saved_error != null &&
XToolkit.saved_error.get_error_code() != XConstants.Success) { XToolkit.saved_error.get_error_code() != XConstants.Success) {
if (logger.isLoggable(Level.WARNING)) { if (logger.isLoggable(PlatformLogger.WARNING)) {
logger.warning("Cannot set XdndTypeList on the proxy window"); logger.warning("Cannot set XdndTypeList on the proxy window");
} }
} }
...@@ -1128,7 +1128,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1128,7 +1128,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
} }
} else { } else {
if (logger.isLoggable(Level.WARNING)) { if (logger.isLoggable(PlatformLogger.WARNING)) {
logger.warning("Cannot read XdndTypeList from the source window"); logger.warning("Cannot read XdndTypeList from the source window");
} }
} }
...@@ -1143,7 +1143,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol { ...@@ -1143,7 +1143,7 @@ class XDnDDropTargetProtocol extends XDropTargetProtocol {
overXEmbedClient = true; overXEmbedClient = true;
} }
if (logger.isLoggable(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" 2 " logger.finest(" 2 "
+ " embedded=" + embedded + " embedded=" + embedded
+ " xclient=" + xclient); + " xclient=" + xclient);
......
...@@ -37,7 +37,8 @@ import java.awt.dnd.InvalidDnDOperationException; ...@@ -37,7 +37,8 @@ import java.awt.dnd.InvalidDnDOperationException;
import java.util.*; import java.util.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.ComponentAccessor; import sun.awt.ComponentAccessor;
import sun.awt.dnd.SunDragSourceContextPeer; import sun.awt.dnd.SunDragSourceContextPeer;
...@@ -52,8 +53,8 @@ import sun.awt.SunToolkit; ...@@ -52,8 +53,8 @@ import sun.awt.SunToolkit;
*/ */
public final class XDragSourceContextPeer public final class XDragSourceContextPeer
extends SunDragSourceContextPeer implements XDragSourceProtocolListener { extends SunDragSourceContextPeer implements XDragSourceProtocolListener {
private static final Logger logger = private static final PlatformLogger logger =
Logger.getLogger("sun.awt.X11.xembed.xdnd.XDragSourceContextPeer"); PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDragSourceContextPeer");
/* The events selected on the root window when the drag begins. */ /* The events selected on the root window when the drag begins. */
private static final int ROOT_EVENT_MASK = (int)XConstants.ButtonMotionMask | private static final int ROOT_EVENT_MASK = (int)XConstants.ButtonMotionMask |
...@@ -542,7 +543,7 @@ public final class XDragSourceContextPeer ...@@ -542,7 +543,7 @@ public final class XDragSourceContextPeer
return false; return false;
} }
if (logger.isLoggable(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.finest(" proxyModeSourceWindow=" + logger.finest(" proxyModeSourceWindow=" +
getProxyModeSourceWindow() + getProxyModeSourceWindow() +
" ev=" + ev); " ev=" + ev);
......
...@@ -31,7 +31,8 @@ import java.awt.peer.ComponentPeer; ...@@ -31,7 +31,8 @@ import java.awt.peer.ComponentPeer;
import java.io.IOException; import java.io.IOException;
import java.util.Iterator; import java.util.Iterator;
import java.util.logging.*;
import sun.util.logging.PlatformLogger;
import sun.awt.AppContext; import sun.awt.AppContext;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
...@@ -48,8 +49,8 @@ import sun.misc.Unsafe; ...@@ -48,8 +49,8 @@ import sun.misc.Unsafe;
* @since 1.5 * @since 1.5
*/ */
final class XDropTargetContextPeer extends SunDropTargetContextPeer { final class XDropTargetContextPeer extends SunDropTargetContextPeer {
private static final Logger logger = private static final PlatformLogger logger =
Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetContextPeer"); PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetContextPeer");
private static final Unsafe unsafe = XlibWrapper.unsafe; private static final Unsafe unsafe = XlibWrapper.unsafe;
...@@ -198,7 +199,7 @@ final class XDropTargetContextPeer extends SunDropTargetContextPeer { ...@@ -198,7 +199,7 @@ final class XDropTargetContextPeer extends SunDropTargetContextPeer {
structure. */ structure. */
long ctxt = getNativeDragContext(); long ctxt = getNativeDragContext();
if (logger.isLoggable(Level.FINER)) { if (logger.isLoggable(PlatformLogger.FINER)) {
logger.finer(" processing " + event + " ctxt=" + ctxt + logger.finer(" processing " + event + " ctxt=" + ctxt +
" consumed=" + event.isConsumed()); " consumed=" + event.isConsumed());
} }
......
...@@ -29,7 +29,7 @@ import java.io.IOException; ...@@ -29,7 +29,7 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
/** /**
* An abstract class for drop protocols on X11 systems. * An abstract class for drop protocols on X11 systems.
...@@ -38,8 +38,8 @@ import java.util.logging.*; ...@@ -38,8 +38,8 @@ import java.util.logging.*;
* @since 1.5 * @since 1.5
*/ */
abstract class XDropTargetProtocol { abstract class XDropTargetProtocol {
private static final Logger logger = private static final PlatformLogger logger =
Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetProtocol"); PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetProtocol");
private final XDropTargetProtocolListener listener; private final XDropTargetProtocolListener listener;
...@@ -116,16 +116,16 @@ abstract class XDropTargetProtocol { ...@@ -116,16 +116,16 @@ abstract class XDropTargetProtocol {
XClientMessageEvent xclient) { XClientMessageEvent xclient) {
EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel); EmbedderRegistryEntry entry = getEmbedderRegistryEntry(toplevel);
if (logger.isLoggable(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.log(Level.FINEST, " entry={0}", new Object[] {entry}); logger.finest(" entry={0}", entry);
} }
// Window not registered as an embedder for this protocol. // Window not registered as an embedder for this protocol.
if (entry == null) { if (entry == null) {
return false; return false;
} }
if (logger.isLoggable(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.log(Level.FINEST, " entry.isOverriden()={0}", new Object[] {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
// to forward the message. // to forward the message.
...@@ -137,8 +137,8 @@ abstract class XDropTargetProtocol { ...@@ -137,8 +137,8 @@ abstract class XDropTargetProtocol {
long proxy = entry.getProxy(); long proxy = entry.getProxy();
if (logger.isLoggable(Level.FINEST)) { if (logger.isLoggable(PlatformLogger.FINEST)) {
logger.log(Level.FINEST, " proxy={0} toplevel={1}", new Object[] {proxy, toplevel}); logger.finest(" proxy={0} toplevel={1}", proxy, toplevel);
} }
if (proxy == 0) { if (proxy == 0) {
proxy = toplevel; proxy = toplevel;
......
...@@ -31,7 +31,7 @@ import java.util.HashMap; ...@@ -31,7 +31,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import java.awt.Point; import java.awt.Point;
...@@ -42,8 +42,8 @@ import java.awt.Point; ...@@ -42,8 +42,8 @@ import java.awt.Point;
* @since 1.5 * @since 1.5
*/ */
final class XDropTargetRegistry { final class XDropTargetRegistry {
private static final Logger logger = private static final PlatformLogger logger =
Logger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetRegistry"); PlatformLogger.getLogger("sun.awt.X11.xembed.xdnd.XDropTargetRegistry");
private static final long DELAYED_REGISTRATION_PERIOD = 200; private static final long DELAYED_REGISTRATION_PERIOD = 200;
...@@ -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(Level.FINE)) { if (logger.isLoggable(PlatformLogger.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(Level.FINE)) { if (logger.isLoggable(PlatformLogger.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(Level.FINE)) { if (logger.isLoggable(PlatformLogger.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(Level.FINE)) { if (logger.isLoggable(PlatformLogger.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));
} }
} }
......
...@@ -37,7 +37,7 @@ import java.awt.peer.*; ...@@ -37,7 +37,7 @@ import java.awt.peer.*;
import sun.awt.*; import sun.awt.*;
import sun.awt.motif.X11FontMetrics; import sun.awt.motif.X11FontMetrics;
import java.lang.reflect.*; import java.lang.reflect.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import java.util.*; import java.util.*;
import static sun.awt.X11.XEmbedHelper.*; import static sun.awt.X11.XEmbedHelper.*;
...@@ -45,7 +45,7 @@ import java.security.AccessController; ...@@ -45,7 +45,7 @@ import java.security.AccessController;
import sun.security.action.GetBooleanAction; import sun.security.action.GetBooleanAction;
public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener, KeyEventPostProcessor, ModalityListener, WindowIDProvider { public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener, KeyEventPostProcessor, ModalityListener, WindowIDProvider {
private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedCanvasPeer"); private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedCanvasPeer");
boolean applicationActive; // Whether the application is active(has focus) boolean applicationActive; // Whether the application is active(has focus)
XEmbedServer xembed = new XEmbedServer(); // Helper object, contains XEmbed intrinsics XEmbedServer xembed = new XEmbedServer(); // Helper object, contains XEmbed intrinsics
...@@ -129,7 +129,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -129,7 +129,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
void initDispatching() { void initDispatching() {
if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle)); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Init embedding for " + Long.toHexString(xembed.handle));
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
XToolkit.addEventDispatcher(xembed.handle, xembed); XToolkit.addEventDispatcher(xembed.handle, xembed);
...@@ -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(Level.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest("Message on embedder: " + cr); xembedLog.finest("Message on embedder: " + cr);
} }
if (xembedLog.isLoggable(Level.FINER)) { if (xembedLog.isLoggable(PlatformLogger.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(Level.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest("Message on embedder: " + dn); xembedLog.finest("Message on embedder: " + dn);
} }
if (xembedLog.isLoggable(Level.FINER)) { if (xembedLog.isLoggable(PlatformLogger.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(Level.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest("Message on embedder: " + rep); xembedLog.finest("Message on embedder: " + rep);
} }
if (xembedLog.isLoggable(Level.FINER)) { if (xembedLog.isLoggable(PlatformLogger.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(Level.FINER)) { if (xembedLog.isLoggable(PlatformLogger.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(Level.FINE)) xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle)); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Detaching child " + Long.toHexString(xembed.handle));
/** /**
* XEmbed specification: * XEmbed specification:
* "The embedder can unmap the client and reparent the client window to the root window. If the * "The embedder can unmap the client and reparent the client window to the root window. If the
...@@ -477,7 +477,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -477,7 +477,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(Level.FINE)) xembedLog.fine("Forwarding native key event: " + ke); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Forwarding native key event: " + ke);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
XlibWrapper.XSendEvent(XToolkit.getDisplay(), xembed.handle, false, XConstants.NoEventMask, data); XlibWrapper.XSendEvent(XToolkit.getDisplay(), xembed.handle, false, XConstants.NoEventMask, data);
...@@ -508,7 +508,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -508,7 +508,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(Level.FINE)) xembedLog.fine("Grabbing key: " + grab); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Grabbing key: " + grab);
synchronized(GRAB_LOCK) { synchronized(GRAB_LOCK) {
grabbed_keys.add(grab); grabbed_keys.add(grab);
} }
...@@ -520,7 +520,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -520,7 +520,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(Level.FINE)) xembedLog.fine("UnGrabbing key: " + grab); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("UnGrabbing key: " + grab);
synchronized(GRAB_LOCK) { synchronized(GRAB_LOCK) {
grabbed_keys.remove(grab); grabbed_keys.remove(grab);
} }
...@@ -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(Level.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Registering accelerator " + accel_id + " for " + stroke);
synchronized(ACCEL_LOCK) { synchronized(ACCEL_LOCK) {
accelerators.put(accel_id, stroke); accelerators.put(accel_id, stroke);
accel_lookup.put(stroke, accel_id); accel_lookup.put(stroke, accel_id);
...@@ -551,7 +551,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -551,7 +551,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(Level.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Unregistering accelerator: " + accel_id);
accelerators.remove(accel_id); accelerators.remove(accel_id);
accel_lookup.remove(stroke); // FIXME: How about several accelerators with the same stroke? accel_lookup.remove(stroke); // FIXME: How about several accelerators with the same stroke?
} }
...@@ -597,7 +597,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -597,7 +597,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
boolean result = false; boolean result = false;
if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Post-processing event " + e); if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Post-processing event " + e);
// Process ACCELERATORS // Process ACCELERATORS
AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e); AWTKeyStroke stroke = AWTKeyStroke.getAWTKeyStrokeForEvent(e);
...@@ -610,7 +610,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -610,7 +610,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener
} }
} }
if (exists) { if (exists) {
if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Activating accelerator " + accel_id); if (xembedLog.isLoggable(PlatformLogger.FINE)) 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?
result = true; result = true;
} }
...@@ -622,7 +622,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -622,7 +622,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(Level.FINE)) xembedLog.fine("Forwarding grabbed key " + e); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Forwarding grabbed key " + e);
forwardKeyEvent(e); forwardKeyEvent(e);
result = true; result = true;
} }
...@@ -641,9 +641,9 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -641,9 +641,9 @@ 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(Level.FINER)) xembedLog.finer("Client message to embedder: " + msg); if (xembedLog.isLoggable(PlatformLogger.FINER)) 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(Level.FINE)) xembedLog.fine(xembed.XEmbedMessageToString(msg)); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(xembed.XEmbedMessageToString(msg));
} }
if (isXEmbedActive()) { if (isXEmbedActive()) {
switch ((int)msg.get_data(1)) { switch ((int)msg.get_data(1)) {
...@@ -709,7 +709,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -709,7 +709,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(Level.FINEST)) { if (xembedLog.isLoggable(PlatformLogger.FINEST)) {
xembedLog.finest(" Drop target=" + target.getDropTarget()); xembedLog.finest(" Drop target=" + target.getDropTarget());
} }
if (target.getDropTarget() instanceof XEmbedDropTarget) { if (target.getDropTarget() instanceof XEmbedDropTarget) {
...@@ -744,7 +744,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -744,7 +744,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(Level.FINER)) if (xembedLog.isLoggable(PlatformLogger.FINER))
xembedLog.fine("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped); xembedLog.fine("Mapping state of the client has changed, old state: " + currently_mapped + ", new state: " + new_mapped);
if (new_mapped) { if (new_mapped) {
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -773,7 +773,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -773,7 +773,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(Level.FINER)) xembedLog.finer("Property change on client: " + ev); if (xembedLog.isLoggable(PlatformLogger.FINER)) 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) {
childResized(); childResized();
} else if (ev.get_atom() == XEmbedInfo.getAtom()) { } else if (ev.get_atom() == XEmbedInfo.getAtom()) {
...@@ -794,7 +794,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -794,7 +794,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(Level.FINER)) xembedLog.finer("Bounds change on client: " + ev); if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Bounds change on client: " + ev);
if (xev.get_xany().get_window() == handle) { if (xev.get_xany().get_window() == handle) {
childResized(); childResized();
} }
...@@ -845,7 +845,7 @@ public class XEmbedCanvasPeer extends XCanvasPeer implements WindowFocusListener ...@@ -845,7 +845,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(Level.FINEST)) xembedLog.finest("Mapped " + e + " to " + this); if (xembedLog.isLoggable(PlatformLogger.FINEST)) xembedLog.finest("Mapped " + e + " to " + this);
} finally { } finally {
XlibWrapper.unsafe.freeMemory(data); XlibWrapper.unsafe.freeMemory(data);
} }
......
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
package sun.awt.X11; package sun.awt.X11;
import java.awt.AWTKeyStroke; import java.awt.AWTKeyStroke;
import java.util.logging.*;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
import java.awt.Component; import java.awt.Component;
import java.awt.Container; import java.awt.Container;
import sun.util.logging.PlatformLogger;
import sun.awt.X11GraphicsConfig; import sun.awt.X11GraphicsConfig;
import sun.awt.X11GraphicsDevice; import sun.awt.X11GraphicsDevice;
...@@ -40,7 +40,7 @@ import sun.awt.X11GraphicsDevice; ...@@ -40,7 +40,7 @@ import sun.awt.X11GraphicsDevice;
* call install and forward all XClientMessageEvents to it. * call install and forward all XClientMessageEvents to it.
*/ */
public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher { public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher {
private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper"); private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedClientHelper");
private XEmbeddedFramePeer embedded; // XEmbed client private XEmbeddedFramePeer embedded; // XEmbed client
private long server; // XEmbed server private long server; // XEmbed server
...@@ -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(Level.FINE)) { if (xembedLog.isLoggable(PlatformLogger.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(Level.FINE)) { if (xembedLog.isLoggable(PlatformLogger.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,9 +95,9 @@ public class XEmbedClientHelper extends XEmbedHelper implements XEventDispatcher ...@@ -95,9 +95,9 @@ 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(Level.FINE)) xembedLog.fine(msg.toString()); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine(msg.toString());
if (msg.get_message_type() == XEmbed.getAtom()) { if (msg.get_message_type() == XEmbed.getAtom()) {
if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1))); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + msgidToString((int)msg.get_data(1)));
switch ((int)msg.get_data(1)) { switch ((int)msg.get_data(1)) {
case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start case XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
active = true; active = true;
......
...@@ -27,7 +27,8 @@ package sun.awt.X11; ...@@ -27,7 +27,8 @@ package sun.awt.X11;
import sun.misc.Unsafe; import sun.misc.Unsafe;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import java.awt.AWTKeyStroke; import java.awt.AWTKeyStroke;
import java.awt.event.InputEvent; import java.awt.event.InputEvent;
...@@ -36,7 +37,7 @@ import java.awt.event.InputEvent; ...@@ -36,7 +37,7 @@ import java.awt.event.InputEvent;
* Contains constant definitions and helper routines. * Contains constant definitions and helper routines.
*/ */
public class XEmbedHelper { public class XEmbedHelper {
private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed"); private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed");
final static Unsafe unsafe = Unsafe.getUnsafe(); final static Unsafe unsafe = Unsafe.getUnsafe();
final static int XEMBED_VERSION = 0, final static int XEMBED_VERSION = 0,
...@@ -81,11 +82,11 @@ public class XEmbedHelper { ...@@ -81,11 +82,11 @@ public class XEmbedHelper {
XEmbedHelper() { XEmbedHelper() {
if (XEmbed == null) { if (XEmbed == null) {
XEmbed = XAtom.get("_XEMBED"); XEmbed = XAtom.get("_XEMBED");
if (xembedLog.isLoggable(Level.FINER)) xembedLog.finer("Created atom " + XEmbed.toString()); if (xembedLog.isLoggable(PlatformLogger.FINER)) 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(Level.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString()); if (xembedLog.isLoggable(PlatformLogger.FINER)) xembedLog.finer("Created atom " + XEmbedInfo.toString());
} }
} }
...@@ -105,7 +106,7 @@ public class XEmbedHelper { ...@@ -105,7 +106,7 @@ public class XEmbedHelper {
msg.set_data(4, data2); msg.set_data(4, data2);
XToolkit.awtLock(); XToolkit.awtLock();
try { try {
if (xembedLog.isLoggable(Level.FINE)) xembedLog.fine("Sending " + XEmbedMessageToString(msg)); if (xembedLog.isLoggable(PlatformLogger.FINE)) 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);
} }
finally { finally {
......
...@@ -28,7 +28,7 @@ package sun.awt.X11; ...@@ -28,7 +28,7 @@ package sun.awt.X11;
//import static sun.awt.X11.XEmbed.*; //import static sun.awt.X11.XEmbed.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import static sun.awt.X11.XConstants.*; import static sun.awt.X11.XConstants.*;
import java.util.LinkedList; import java.util.LinkedList;
...@@ -37,7 +37,7 @@ import java.util.LinkedList; ...@@ -37,7 +37,7 @@ import java.util.LinkedList;
* specification and references. * specification and references.
*/ */
public class XEmbedServerTester implements XEventDispatcher { public class XEmbedServerTester implements XEventDispatcher {
private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbedServerTester"); private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbedServerTester");
private final Object EVENT_LOCK = new Object(); private final Object EVENT_LOCK = new Object();
static final int SYSTEM_EVENT_MASK = 0x8000; static final int SYSTEM_EVENT_MASK = 0x8000;
int my_version, server_version; int my_version, server_version;
...@@ -544,7 +544,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -544,7 +544,7 @@ public class XEmbedServerTester implements XEventDispatcher {
try { try {
EVENT_LOCK.wait(3000); EVENT_LOCK.wait(3000);
} catch (InterruptedException ie) { } catch (InterruptedException ie) {
xembedLog.log(Level.WARNING, "Event wait interrupted", ie); xembedLog.warning("Event wait interrupted", ie);
} }
eventWaited = -1; eventWaited = -1;
if (checkEventList(position, event) == -1) { if (checkEventList(position, event) == -1) {
...@@ -634,7 +634,7 @@ public class XEmbedServerTester implements XEventDispatcher { ...@@ -634,7 +634,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(Level.FINE)) xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1))); if (xembedLog.isLoggable(PlatformLogger.FINE)) xembedLog.fine("Embedded message: " + XEmbedHelper.msgidToString((int)msg.get_data(1)));
switch ((int)msg.get_data(1)) { switch ((int)msg.get_data(1)) {
case XEmbedHelper.XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start case XEmbedHelper.XEMBED_EMBEDDED_NOTIFY: // Notification about embedding protocol start
xembedActive = true; xembedActive = true;
......
...@@ -30,15 +30,14 @@ import java.awt.*; ...@@ -30,15 +30,14 @@ import java.awt.*;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Iterator; import java.util.Iterator;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.EmbeddedFrame; import sun.awt.EmbeddedFrame;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
public class XEmbeddedFramePeer extends XFramePeer { public class XEmbeddedFramePeer extends XFramePeer {
private static final Logger xembedLog = Logger.getLogger("sun.awt.X11.xembed.XEmbeddedFramePeer"); private static final PlatformLogger xembedLog = PlatformLogger.getLogger("sun.awt.X11.xembed.XEmbeddedFramePeer");
LinkedList<AWTKeyStroke> strokes; LinkedList<AWTKeyStroke> strokes;
...@@ -138,7 +137,7 @@ public class XEmbeddedFramePeer extends XFramePeer { ...@@ -138,7 +137,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(Level.FINE)) { if (xembedLog.isLoggable(PlatformLogger.FINE)) {
xembedLog.fine(xe.toString()); xembedLog.fine(xe.toString());
} }
......
...@@ -34,12 +34,12 @@ import java.util.Locale; ...@@ -34,12 +34,12 @@ import java.util.Locale;
import java.util.Arrays; import java.util.Arrays;
import com.sun.java.swing.plaf.motif.*; import com.sun.java.swing.plaf.motif.*;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import java.util.logging.*;
import java.security.AccessController; import java.security.AccessController;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import sun.util.logging.PlatformLogger;
class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener { class XFileDialogPeer extends XDialogPeer implements FileDialogPeer, ActionListener, ItemListener, KeyEventDispatcher, XChoicePeerListener {
private static final Logger log = Logger.getLogger("sun.awt.X11.XFileDialogPeer"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFileDialogPeer");
FileDialog target; FileDialog target;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
package sun.awt.X11; package sun.awt.X11;
import java.awt.*; import java.awt.*;
import java.util.logging.*;
/** /**
* This class represent focus holder window implementation. When toplevel requests or receives focus * This class represent focus holder window implementation. When toplevel requests or receives focus
...@@ -34,7 +33,6 @@ import java.util.logging.*; ...@@ -34,7 +33,6 @@ import java.util.logging.*;
* and therefore X doesn't control focus after we have set it to proxy. * and therefore X doesn't control focus after we have set it to proxy.
*/ */
public class XFocusProxyWindow extends XBaseWindow { public class XFocusProxyWindow extends XBaseWindow {
private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XFocusProxyWindow");
XWindowPeer owner; XWindowPeer owner;
public XFocusProxyWindow(XWindowPeer owner) { public XFocusProxyWindow(XWindowPeer owner) {
......
...@@ -34,14 +34,13 @@ import java.awt.Insets; ...@@ -34,14 +34,13 @@ import java.awt.Insets;
import java.awt.MenuBar; import java.awt.MenuBar;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.awt.peer.FramePeer; import java.awt.peer.FramePeer;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.AWTAccessor; import sun.awt.AWTAccessor;
class XFramePeer extends XDecoratedPeer implements FramePeer { class XFramePeer extends XDecoratedPeer implements FramePeer {
private static Logger log = Logger.getLogger("sun.awt.X11.XFramePeer"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XFramePeer");
private static Logger stateLog = Logger.getLogger("sun.awt.X11.states"); private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states");
private static Logger insLog = Logger.getLogger("sun.awt.X11.insets.XFramePeer"); private static PlatformLogger insLog = PlatformLogger.getLogger("sun.awt.X11.insets.XFramePeer");
XMenuBarPeer menubarPeer; XMenuBarPeer menubarPeer;
MenuBar menubar; MenuBar menubar;
...@@ -76,10 +75,10 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -76,10 +75,10 @@ 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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.log(Level.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}",
new Object[] {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));
} }
} }
...@@ -208,7 +207,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -208,7 +207,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
} }
public void setMaximizedBounds(Rectangle b) { public void setMaximizedBounds(Rectangle b) {
if (insLog.isLoggable(Level.FINE)) insLog.fine("Setting maximized bounds to " + b); if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting maximized bounds to " + b);
if (b == null) return; if (b == null) return;
maxBounds = new Rectangle(b); maxBounds = new Rectangle(b);
XToolkit.awtLock(); XToolkit.awtLock();
...@@ -225,7 +224,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -225,7 +224,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(Level.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags())); if (insLog.isLoggable(PlatformLogger.FINER)) insLog.finer("Setting hints, flags " + XlibWrapper.hintsToString(hints.get_flags()));
XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData); XlibWrapper.XSetWMNormalHints(XToolkit.getDisplay(), window, hints.pData);
} finally { } finally {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
...@@ -253,14 +252,14 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -253,14 +252,14 @@ 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;
stateLog.log(Level.FINER, "Changing state, old state {0}, new state {1}(iconic {2})", stateLog.finer("Changing state, old state {0}, new state {1}(iconic {2})",
new Object[] {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(Level.FINER)) stateLog.finer("Iconifying shell " + getShell() + ", this " + this + ", screen " + getScreenNumber()); if (stateLog.isLoggable(PlatformLogger.FINER)) 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(Level.FINER)) stateLog.finer("XIconifyWindow returned " + res); if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("XIconifyWindow returned " + res);
} }
finally { finally {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
...@@ -270,7 +269,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -270,7 +269,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
setExtendedState(newState); setExtendedState(newState);
} }
if (changeIconic != 0 && !iconic) { if (changeIconic != 0 && !iconic) {
if (stateLog.isLoggable(Level.FINER)) stateLog.finer("DeIconifying " + this); if (stateLog.isLoggable(PlatformLogger.FINER)) stateLog.finer("DeIconifying " + this);
xSetVisible(true); xSetVisible(true);
} }
} }
...@@ -283,7 +282,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -283,7 +282,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer {
super.handlePropertyNotify(xev); super.handlePropertyNotify(xev);
XPropertyEvent ev = xev.get_xproperty(); XPropertyEvent ev = xev.get_xproperty();
log.log(Level.FINER, "Property change {0}", new Object[] {ev}); log.finer("Property change {0}", ev);
/* /*
* Let's see if this is a window state protocol message, and * Let's see if this is a window state protocol message, and
* if it is - decode a new state in terms of java constants. * if it is - decode a new state in terms of java constants.
...@@ -348,7 +347,7 @@ class XFramePeer extends XDecoratedPeer implements FramePeer { ...@@ -348,7 +347,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(Level.FINE)) stateLog.fine("Setting initial WM state on " + this + " to " + wm_state); if (stateLog.isLoggable(PlatformLogger.FINE)) 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);
} }
finally { finally {
......
...@@ -30,10 +30,10 @@ import sun.awt.X11GraphicsConfig; ...@@ -30,10 +30,10 @@ import sun.awt.X11GraphicsConfig;
import sun.awt.image.ToolkitImage; import sun.awt.image.ToolkitImage;
import sun.awt.image.ImageRepresentation; import sun.awt.image.ImageRepresentation;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
public class XIconWindow extends XBaseWindow { public class XIconWindow extends XBaseWindow {
private final static Logger log = Logger.getLogger("sun.awt.X11.XIconWindow"); private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XIconWindow");
XDecoratedPeer parent; XDecoratedPeer parent;
Dimension size; Dimension size;
long iconPixmap = 0; long iconPixmap = 0;
...@@ -61,7 +61,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -61,7 +61,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(Level.FINEST)) log.finest(adata.toString()); if (log.isLoggable(PlatformLogger.FINEST)) log.finest(adata.toString());
long status = long status =
XlibWrapper.XGetIconSizes(display, XToolkit.getDefaultRootWindow(), XlibWrapper.XGetIconSizes(display, XToolkit.getDefaultRootWindow(),
...@@ -71,11 +71,11 @@ public class XIconWindow extends XBaseWindow { ...@@ -71,11 +71,11 @@ 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*
log.log(Level.FINEST, "count = {1}, sizes_ptr = {0}", new Object[] {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);
log.log(Level.FINEST, "sizes_ptr[{1}] = {0}", new Object[] {res[i], Integer.valueOf(i)}); log.finest("sizes_ptr[{1}] = {0}", res[i], Integer.valueOf(i));
} }
return res; return res;
} finally { } finally {
...@@ -87,12 +87,12 @@ public class XIconWindow extends XBaseWindow { ...@@ -87,12 +87,12 @@ public class XIconWindow extends XBaseWindow {
if (XWM.getWMID() == XWM.ICE_WM) { if (XWM.getWMID() == XWM.ICE_WM) {
// ICE_WM has a bug - it only displays icons of the size // ICE_WM has a bug - it only displays icons of the size
// 16x16, while reporting 32x32 in its size list // 16x16, while reporting 32x32 in its size list
log.log(Level.FINEST, "Returning ICE_WM icon size: 16x16"); log.finest("Returning ICE_WM icon size: 16x16");
return new Dimension(16, 16); return new Dimension(16, 16);
} }
XIconSize[] sizeList = getIconSizes(); XIconSize[] sizeList = getIconSizes();
log.log(Level.FINEST, "Icon sizes: {0}", new Object[] {sizeList}); log.finest("Icon sizes: {0}", sizeList);
if (sizeList == null) { if (sizeList == null) {
// No icon sizes so we simply fall back to 16x16 // No icon sizes so we simply fall back to 16x16
return new Dimension(16, 16); return new Dimension(16, 16);
...@@ -139,11 +139,11 @@ public class XIconWindow extends XBaseWindow { ...@@ -139,11 +139,11 @@ public class XIconWindow extends XBaseWindow {
} }
} }
} }
if (log.isLoggable(Level.FINEST)) { if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("found=" + found); log.finest("found=" + found);
} }
if (!found) { if (!found) {
if (log.isLoggable(Level.FINEST)) { if (log.isLoggable(PlatformLogger.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()
...@@ -159,7 +159,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -159,7 +159,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(Level.FINEST)) { if (log.isLoggable(PlatformLogger.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 */
...@@ -191,7 +191,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -191,7 +191,7 @@ public class XIconWindow extends XBaseWindow {
XToolkit.awtUnlock(); XToolkit.awtUnlock();
} }
if (log.isLoggable(Level.FINEST)) { if (log.isLoggable(PlatformLogger.FINEST)) {
log.finest("return " + saveWidth + "x" + saveHeight); log.finest("return " + saveWidth + "x" + saveHeight);
} }
return new Dimension(saveWidth, saveHeight); return new Dimension(saveWidth, saveHeight);
...@@ -418,7 +418,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -418,7 +418,7 @@ public class XIconWindow extends XBaseWindow {
} }
} }
if (min != null) { if (min != null) {
log.log(Level.FINER, "Icon: {0}x{1}", new Object[] { min.getWidth(null), min.getHeight(null)}); log.finer("Icon: {0}x{1}", min.getWidth(null), min.getHeight(null));
setIconImage(min); setIconImage(min);
} }
} }
...@@ -444,7 +444,7 @@ public class XIconWindow extends XBaseWindow { ...@@ -444,7 +444,7 @@ public class XIconWindow extends XBaseWindow {
} }
Dimension iconSize = getIconSize(width, height); Dimension iconSize = getIconSize(width, height);
if (iconSize != null) { if (iconSize != null) {
log.log(Level.FINEST, "Icon size: {0}", iconSize); log.finest("Icon size: {0}", iconSize);
iconWidth = iconSize.width; iconWidth = iconSize.width;
iconHeight = iconSize.height; iconHeight = iconSize.height;
} else { } else {
......
...@@ -33,7 +33,7 @@ import java.awt.im.spi.InputMethodContext; ...@@ -33,7 +33,7 @@ import java.awt.im.spi.InputMethodContext;
import java.awt.peer.ComponentPeer; import java.awt.peer.ComponentPeer;
import sun.awt.X11InputMethod; import sun.awt.X11InputMethod;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
/** /**
* Input Method Adapter for XIM (without Motif) * Input Method Adapter for XIM (without Motif)
...@@ -41,7 +41,7 @@ import java.util.logging.*; ...@@ -41,7 +41,7 @@ import java.util.logging.*;
* @author JavaSoft International * @author JavaSoft International
*/ */
public class XInputMethod extends X11InputMethod { public class XInputMethod extends X11InputMethod {
private static final Logger log = Logger.getLogger("sun.awt.X11.XInputMethod"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XInputMethod");
public XInputMethod() throws AWTException { public XInputMethod() throws AWTException {
super(); super();
...@@ -102,13 +102,13 @@ public class XInputMethod extends X11InputMethod { ...@@ -102,13 +102,13 @@ public class XInputMethod extends X11InputMethod {
protected ComponentPeer getPeer(Component client) { protected ComponentPeer getPeer(Component client) {
XComponentPeer peer; XComponentPeer peer;
if (log.isLoggable(Level.FINE)) log.fine("Client is " + client); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Client is " + client);
peer = (XComponentPeer)XToolkit.targetToPeer(client); peer = (XComponentPeer)XToolkit.targetToPeer(client);
while (client != null && peer == null) { while (client != null && peer == null) {
client = getParent(client); client = getParent(client);
peer = (XComponentPeer)XToolkit.targetToPeer(client); peer = (XComponentPeer)XToolkit.targetToPeer(client);
} }
log.log(Level.FINE, "Peer is {0}, client is {1}", new Object[] {peer, client}); log.fine("Peer is {0}, client is {1}", peer, client);
if (peer != null) if (peer != null)
return peer; return peer;
......
...@@ -36,15 +36,14 @@ import java.awt.peer.ComponentPeer; ...@@ -36,15 +36,14 @@ import java.awt.peer.ComponentPeer;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
import sun.awt.CausedFocusEvent; import sun.awt.CausedFocusEvent;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
import sun.awt.KeyboardFocusManagerPeerImpl; import sun.awt.KeyboardFocusManagerPeerImpl;
public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl { public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
private static final Logger focusLog = Logger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer"); private static final PlatformLogger focusLog = PlatformLogger.getLogger("sun.awt.X11.focus.XKeyboardFocusManagerPeer");
private static Object lock = new Object() {}; private static Object lock = new Object() {};
private static Component currentFocusOwner; private static Component currentFocusOwner;
...@@ -82,7 +81,7 @@ public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl { ...@@ -82,7 +81,7 @@ public class XKeyboardFocusManagerPeer extends KeyboardFocusManagerPeerImpl {
} }
public static void setCurrentNativeFocusedWindow(Window win) { public static void setCurrentNativeFocusedWindow(Window win) {
if (focusLog.isLoggable(Level.FINER)) focusLog.finer("Setting current native focused window " + win); if (focusLog.isLoggable(PlatformLogger.FINER)) focusLog.finer("Setting current native focused window " + win);
XWindowPeer from = null, to = null; XWindowPeer from = null, to = null;
synchronized(lock) { synchronized(lock) {
......
...@@ -29,8 +29,7 @@ package sun.awt.X11; ...@@ -29,8 +29,7 @@ package sun.awt.X11;
import java.util.Hashtable; import java.util.Hashtable;
import sun.misc.Unsafe; import sun.misc.Unsafe;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
public class XKeysym { public class XKeysym {
...@@ -70,7 +69,7 @@ public class XKeysym { ...@@ -70,7 +69,7 @@ public class XKeysym {
static Hashtable<Integer, Long> javaKeycode2KeysymHash = new Hashtable<Integer, Long>(); static Hashtable<Integer, Long> javaKeycode2KeysymHash = new Hashtable<Integer, Long>();
static long keysym_lowercase = unsafe.allocateMemory(Native.getLongSize()); static long keysym_lowercase = unsafe.allocateMemory(Native.getLongSize());
static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize()); static long keysym_uppercase = unsafe.allocateMemory(Native.getLongSize());
private static Logger keyEventLog = Logger.getLogger("sun.awt.X11.kye.XKeysym"); private static PlatformLogger keyEventLog = PlatformLogger.getLogger("sun.awt.X11.kye.XKeysym");
public static char convertKeysym( long ks, int state ) { public static char convertKeysym( long ks, int state ) {
/* First check for Latin-1 characters (1:1 mapping) */ /* First check for Latin-1 characters (1:1 mapping) */
......
...@@ -34,13 +34,13 @@ import java.awt.peer.*; ...@@ -34,13 +34,13 @@ import java.awt.peer.*;
import java.util.Vector; import java.util.Vector;
import java.awt.geom.*; import java.awt.geom.*;
import java.awt.image.*; import java.awt.image.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
// TODO: some input actions should do nothing if Shift or Control are down // TODO: some input actions should do nothing if Shift or Control are down
class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
private static final Logger log = Logger.getLogger("sun.awt.X11.XListPeer"); private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XListPeer");
public final static int MARGIN = 2; public final static int MARGIN = 2;
public final static int SPACE = 1; public final static int SPACE = 1;
...@@ -578,10 +578,10 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -578,10 +578,10 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
void mousePressed(MouseEvent mouseEvent) { void mousePressed(MouseEvent mouseEvent) {
if (log.isLoggable(Level.FINER)) log.finer(mouseEvent.toString() + ", hsb " + hsbVis + ", vsb " + vsbVis); if (log.isLoggable(PlatformLogger.FINER)) 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(Level.FINE)) log.fine("Mouse press in items area"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in items area");
active = WINDOW; active = WINDOW;
int i = y2index(mouseEvent.getY()); int i = y2index(mouseEvent.getY());
if (i >= 0) { if (i >= 0) {
...@@ -618,14 +618,14 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -618,14 +618,14 @@ 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(Level.FINE)) log.fine("Mouse press in vertical scrollbar"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in vertical scrollbar");
active = VERSCROLLBAR; active = VERSCROLLBAR;
vsb.handleMouseEvent(mouseEvent.getID(), vsb.handleMouseEvent(mouseEvent.getID(),
mouseEvent.getModifiers(), mouseEvent.getModifiers(),
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(Level.FINE)) log.fine("Mouse press in horizontal scrollbar"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Mouse press in horizontal scrollbar");
active = HORSCROLLBAR; active = HORSCROLLBAR;
hsb.handleMouseEvent(mouseEvent.getID(), hsb.handleMouseEvent(mouseEvent.getID(),
mouseEvent.getModifiers(), mouseEvent.getModifiers(),
...@@ -808,7 +808,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -808,7 +808,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(Level.FINE)) log.fine(e.toString()); if (log.isLoggable(PlatformLogger.FINE)) log.fine(e.toString());
switch(keyCode) { switch(keyCode) {
case KeyEvent.VK_UP: case KeyEvent.VK_UP:
case KeyEvent.VK_KP_UP: // TODO: I assume we also want this, too case KeyEvent.VK_KP_UP: // TODO: I assume we also want this, too
...@@ -993,7 +993,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -993,7 +993,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(Level.FINE)) log.fine("Notify value changed on " + obj + " to " + v); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Notify value changed on " + obj + " to " + v);
int value = obj.getValue(); int value = obj.getValue();
if (obj == vsb) { if (obj == vsb) {
scrollVertical(v - value); scrollVertical(v - value);
...@@ -1076,7 +1076,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1076,7 +1076,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
} }
} }
if (log.isLoggable(Level.FINER)) log.finer("Adding item '" + item + "' to " + addedIndex); if (log.isLoggable(PlatformLogger.FINER)) log.finer("Adding item '" + item + "' to " + addedIndex);
// Update maxLength // Update maxLength
boolean repaintItems = !isItemHidden(addedIndex); boolean repaintItems = !isItemHidden(addedIndex);
...@@ -1094,7 +1094,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1094,7 +1094,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
| ((vsb.needsRepaint())?(PAINT_VSCROLL):0); | ((vsb.needsRepaint())?(PAINT_VSCROLL):0);
} }
if (log.isLoggable(Level.FINEST)) log.finest("Last visible: " + getLastVisibleItem() + if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Last visible: " + getLastVisibleItem() +
", hsb changed : " + (hsbWasVis ^ hsbVis) + ", items changed " + repaintItems); ", hsb changed : " + (hsbWasVis ^ hsbVis) + ", items changed " + repaintItems);
repaint(addedIndex, getLastVisibleItem(), options); repaint(addedIndex, getLastVisibleItem(), options);
} }
...@@ -1110,9 +1110,9 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1110,9 +1110,9 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
boolean vsbWasVisible = vsbVis; boolean vsbWasVisible = vsbVis;
int oldLastDisplayed = lastItemDisplayed(); int oldLastDisplayed = lastItemDisplayed();
if (log.isLoggable(Level.FINE)) log.fine("Deleting from " + s + " to " + e); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Deleting from " + s + " to " + e);
if (log.isLoggable(Level.FINEST)) log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() + if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Last displayed item: " + oldLastDisplayed + ", items in window " + itemsInWindow() +
", size " + items.size()); ", size " + items.size());
if (items.size() == 0) { if (items.size() == 0) {
...@@ -1180,7 +1180,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1180,7 +1180,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
options |= PAINT_FOCUS; options |= PAINT_FOCUS;
} }
if (log.isLoggable(Level.FINEST)) log.finest("Multiple selections: " + multipleSelections); if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Multiple selections: " + multipleSelections);
// update vsb.val // update vsb.val
if (vsb.getValue() >= s) { if (vsb.getValue() >= s) {
...@@ -1433,7 +1433,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1433,7 +1433,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(Level.FINE)) log.fine("Scrolling vertically by " + y); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Scrolling vertically by " + y);
int itemsInWin = itemsInWindow(); int itemsInWin = itemsInWindow();
int h = getItemHeight(); int h = getItemHeight();
int pixelsToScroll = y * h; int pixelsToScroll = y * h;
...@@ -1473,7 +1473,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1473,7 +1473,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(Level.FINE)) log.fine("Scrolling horizontally by " + y); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Scrolling horizontally by " + y);
int w = getListWidth(); int w = getListWidth();
w -= ((2 * SPACE) + (2 * MARGIN)); w -= ((2 * SPACE) + (2 * MARGIN));
int h = height - (SCROLLBAR_AREA + (2 * MARGIN)); int h = height - (SCROLLBAR_AREA + (2 * MARGIN));
...@@ -1706,7 +1706,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1706,7 +1706,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
} }
if (localBuffer == null) { if (localBuffer == null) {
if (log.isLoggable(Level.FINE)) log.fine("Creating buffer " + width + "x" + height); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Creating buffer " + width + "x" + height);
// use GraphicsConfig.cCVI() instead of Component.cVI(), // use GraphicsConfig.cCVI() instead of Component.cVI(),
// because the latter may cause a deadlock with the tree lock // because the latter may cause a deadlock with the tree lock
localBuffer = localBuffer =
...@@ -1743,7 +1743,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1743,7 +1743,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(Level.FINER)) log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options); if (log.isLoggable(PlatformLogger.FINER)) log.finer("Repaint from " + firstItem + " to " + lastItem + " options " + options);
if (firstItem > lastItem) { if (firstItem > lastItem) {
int t = lastItem; int t = lastItem;
lastItem = firstItem; lastItem = firstItem;
...@@ -1832,7 +1832,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1832,7 +1832,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(Level.FINER)) log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem()); if (log.isLoggable(PlatformLogger.FINER)) log.finer("Painting items from " + firstItem + " to " + lastItem + ", focused " + focusIndex + ", first " + getFirstVisibleItem() + ", last " + getLastVisibleItem());
firstItem = Math.max(getFirstVisibleItem(), firstItem); firstItem = Math.max(getFirstVisibleItem(), firstItem);
if (firstItem > lastItem) { if (firstItem > lastItem) {
...@@ -1843,7 +1843,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1843,7 +1843,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(Level.FINER)) log.finer("Actually painting items from " + firstItem + " to " + lastItem + if (log.isLoggable(PlatformLogger.FINER)) log.finer("Actually painting items from " + firstItem + " to " + lastItem +
", items in window " + itemsInWindow()); ", items in window " + itemsInWindow());
for (int i = firstItem; i <= lastItem; i++) { for (int i = firstItem; i <= lastItem; i++) {
paintItem(g, i); paintItem(g, i);
...@@ -1851,7 +1851,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1851,7 +1851,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(Level.FINEST)) log.finest("Painting item " + index); if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting item " + index);
// 4895367 - only paint items which are visible // 4895367 - only paint items which are visible
if (!isItemHidden(index)) { if (!isItemHidden(index)) {
Shape clip = g.getClip(); Shape clip = g.getClip();
...@@ -1859,18 +1859,18 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1859,18 +1859,18 @@ 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(Level.FINEST)) log.finest("Setting clip " + new Rectangle(x, y, w - (SPACE*2), h-(SPACE*2))); if (log.isLoggable(PlatformLogger.FINEST)) 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));
// 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(Level.FINEST)) log.finest("Painted item is selected"); if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painted item is selected");
g.setColor(getListForeground()); g.setColor(getListForeground());
} else { } else {
g.setColor(getListBackground()); g.setColor(getListBackground());
} }
if (log.isLoggable(Level.FINEST)) log.finest("Filling " + new Rectangle(x, y, w, h)); if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Filling " + new Rectangle(x, y, w, h));
g.fillRect(x, y, w, h); g.fillRect(x, y, w, h);
if (index <= getLastVisibleItem() && index < items.size()) { if (index <= getLastVisibleItem() && index < items.size()) {
...@@ -1894,7 +1894,7 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1894,7 +1894,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(Level.FINEST)) log.finest("Painting scrollbar " + scr + " width " + if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Painting scrollbar " + scr + " width " +
width + " height " + height + ", paintAll " + paintAll); width + " height " + height + ", paintAll " + paintAll);
g.translate(x, y); g.translate(x, y);
scr.paint(g, getSystemColors(), paintAll); scr.paint(g, getSystemColors(), paintAll);
...@@ -1932,22 +1932,22 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { ...@@ -1932,22 +1932,22 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient {
if (paintFocus && !hasFocus()) { if (paintFocus && !hasFocus()) {
paintFocus = false; paintFocus = false;
} }
if (log.isLoggable(Level.FINE)) log.fine("Painting focus, focus index " + getFocusIndex() + ", focus is " + if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINEST)) log.finest("Setting focus clip " + new Rectangle(0, 0, listWidth, listHeight)); if (log.isLoggable(PlatformLogger.FINEST)) 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(Level.FINEST)) log.finest("Erasing previous focus rect " + prevFocusRect); if (log.isLoggable(PlatformLogger.FINEST)) log.finest("Erasing previous focus rect " + prevFocusRect);
g.setColor(getListBackground()); g.setColor(getListBackground());
g.drawRect(prevFocusRect.x, prevFocusRect.y, prevFocusRect.width, prevFocusRect.height); g.drawRect(prevFocusRect.x, prevFocusRect.y, prevFocusRect.width, prevFocusRect.height);
prevFocusRect = null; prevFocusRect = null;
} }
if (paintFocus) { if (paintFocus) {
// Paint new // Paint new
if (log.isLoggable(Level.FINEST)) log.finest("Painting focus rect " + rect); if (log.isLoggable(PlatformLogger.FINEST)) 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
g.drawRect(rect.x, rect.y, rect.width, rect.height); g.drawRect(rect.x, rect.y, rect.width, rect.height);
prevFocusRect = rect; prevFocusRect = rect;
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
package sun.awt.X11; package sun.awt.X11;
import java.util.*; import java.util.*;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
public class XMSelection { public class XMSelection {
...@@ -56,7 +55,7 @@ public class XMSelection { ...@@ -56,7 +55,7 @@ public class XMSelection {
*/ */
private static Logger log = Logger.getLogger("sun.awt.X11.XMSelection"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMSelection");
/* Name of the selection */ /* Name of the selection */
String selectionName; String selectionName;
...@@ -129,7 +128,7 @@ public class XMSelection { ...@@ -129,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(Level.FINE)) log.fine("New Selection Owner for screen " + screen + " = " + owner ); if (log.isLoggable(PlatformLogger.FINE)) log.fine("New Selection Owner for screen " + screen + " = " + owner );
XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | eventMask); XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | eventMask);
XToolkit.addEventDispatcher(owner, XToolkit.addEventDispatcher(owner,
new XEventDispatcher() { new XEventDispatcher() {
...@@ -149,19 +148,19 @@ public class XMSelection { ...@@ -149,19 +148,19 @@ public class XMSelection {
try { try {
try { try {
long display = XToolkit.getDisplay(); long display = XToolkit.getDisplay();
if (log.isLoggable(Level.FINE)) log.fine("Grabbing XServer"); if (log.isLoggable(PlatformLogger.FINE)) 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(Level.FINE)) log.fine("Screen = " + screen + " selection name = " + selection_name); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Screen = " + screen + " selection name = " + selection_name);
XAtom atom = XAtom.get(selection_name); XAtom atom = XAtom.get(selection_name);
selectionMap.put(Long.valueOf(atom.getAtom()),this); // add mapping from atom to the instance of XMSelection selectionMap.put(Long.valueOf(atom.getAtom()),this); // add mapping from atom to the instance of XMSelection
setAtom(atom,screen); setAtom(atom,screen);
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(Level.FINE)) log.fine("Selection Owner for screen " + screen + " = " + owner ); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Selection Owner for screen " + screen + " = " + owner );
XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | extra_mask); XlibWrapper.XSelectInput(display, owner, XConstants.StructureNotifyMask | extra_mask);
XToolkit.addEventDispatcher(owner, XToolkit.addEventDispatcher(owner,
new XEventDispatcher() { new XEventDispatcher() {
...@@ -176,7 +175,7 @@ public class XMSelection { ...@@ -176,7 +175,7 @@ public class XMSelection {
e.printStackTrace(); e.printStackTrace();
} }
finally { finally {
if (log.isLoggable(Level.FINE)) log.fine("UnGrabbing XServer"); if (log.isLoggable(PlatformLogger.FINE)) log.fine("UnGrabbing XServer");
XlibWrapper.XUngrabServer(XToolkit.getDisplay()); XlibWrapper.XUngrabServer(XToolkit.getDisplay());
} }
} finally { } finally {
...@@ -188,7 +187,7 @@ public class XMSelection { ...@@ -188,7 +187,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(Level.FINE)) log.fine("client messags = " + xce); if (log.isLoggable(PlatformLogger.FINE)) log.fine("client messags = " + xce);
long timestamp = xce.get_data(0); long timestamp = xce.get_data(0);
long atom = xce.get_data(1); long atom = xce.get_data(1);
long owner = xce.get_data(2); long owner = xce.get_data(2);
...@@ -295,7 +294,7 @@ public class XMSelection { ...@@ -295,7 +294,7 @@ public class XMSelection {
synchronized void dispatchSelectionChanged( XPropertyEvent ev, int screen) { synchronized void dispatchSelectionChanged( XPropertyEvent ev, int screen) {
if (log.isLoggable(Level.FINE)) log.fine("Selection Changed : Screen = " + screen + "Event =" + ev); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Selection Changed : Screen = " + screen + "Event =" + ev);
if (listeners != null) { if (listeners != null) {
Iterator iter = listeners.iterator(); Iterator iter = listeners.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -306,7 +305,7 @@ public class XMSelection { ...@@ -306,7 +305,7 @@ public class XMSelection {
} }
synchronized void dispatchOwnerDeath(XDestroyWindowEvent de, int screen) { synchronized void dispatchOwnerDeath(XDestroyWindowEvent de, int screen) {
if (log.isLoggable(Level.FINE)) log.fine("Owner dead : Screen = " + screen + "Event =" + de); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Owner dead : Screen = " + screen + "Event =" + de);
if (listeners != null) { if (listeners != null) {
Iterator iter = listeners.iterator(); Iterator iter = listeners.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
...@@ -318,7 +317,7 @@ public class XMSelection { ...@@ -318,7 +317,7 @@ public class XMSelection {
} }
void dispatchSelectionEvent(XEvent xev, int screen) { void dispatchSelectionEvent(XEvent xev, int screen) {
if (log.isLoggable(Level.FINE)) log.fine("Event =" + xev); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Event =" + xev);
if (xev.get_type() == XConstants.DestroyNotify) { if (xev.get_type() == XConstants.DestroyNotify) {
XDestroyWindowEvent de = xev.get_xdestroywindow(); XDestroyWindowEvent de = xev.get_xdestroywindow();
dispatchOwnerDeath( de, screen); dispatchOwnerDeath( de, screen);
......
...@@ -30,7 +30,7 @@ import java.awt.event.*; ...@@ -30,7 +30,7 @@ import java.awt.event.*;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Vector; import java.util.Vector;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer { public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
...@@ -41,7 +41,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer { ...@@ -41,7 +41,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer {
* *
************************************************/ ************************************************/
private static Logger log = Logger.getLogger("sun.awt.X11.XMenuBarPeer"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuBarPeer");
/* /*
* Primary members * Primary members
...@@ -533,7 +533,7 @@ public class XMenuBarPeer extends XBaseMenuWindow implements MenuBarPeer { ...@@ -533,7 +533,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(Level.FINE)) log.fine(xkey.toString()); if (log.isLoggable(PlatformLogger.FINE)) log.fine(xkey.toString());
if (isEventDisabled(xev)) { if (isEventDisabled(xev)) {
return; return;
} }
......
...@@ -28,8 +28,6 @@ import java.awt.*; ...@@ -28,8 +28,6 @@ import java.awt.*;
import java.awt.peer.*; import java.awt.peer.*;
import java.awt.event.*; import java.awt.event.*;
import java.util.logging.*;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
...@@ -43,8 +41,6 @@ public class XMenuItemPeer implements MenuItemPeer { ...@@ -43,8 +41,6 @@ public class XMenuItemPeer implements MenuItemPeer {
* *
************************************************/ ************************************************/
private static Logger log = Logger.getLogger("sun.awt.X11.XMenuItemPeer");
/* /*
* Primary members * Primary members
*/ */
......
...@@ -29,7 +29,7 @@ import java.awt.peer.*; ...@@ -29,7 +29,7 @@ import java.awt.peer.*;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Vector; import java.util.Vector;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
import sun.awt.SunToolkit; import sun.awt.SunToolkit;
public class XMenuPeer extends XMenuItemPeer implements MenuPeer { public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
...@@ -39,7 +39,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -39,7 +39,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
* Data members * Data members
* *
************************************************/ ************************************************/
private static Logger log = Logger.getLogger("sun.awt.X11.XMenuPeer"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuPeer");
/** /**
* Window that correspond to this menu * Window that correspond to this menu
...@@ -122,7 +122,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -122,7 +122,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer {
* for adding separators * for adding separators
*/ */
public void addSeparator() { public void addSeparator() {
if (log.isLoggable(Level.FINER)) log.finer("addSeparator is not implemented"); if (log.isLoggable(PlatformLogger.FINER)) log.finer("addSeparator is not implemented");
} }
public void addItem(MenuItem item) { public void addItem(MenuItem item) {
...@@ -130,7 +130,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -130,7 +130,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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("Attempt to use XMenuWindowPeer without window"); log.fine("Attempt to use XMenuWindowPeer without window");
} }
} }
...@@ -141,7 +141,7 @@ public class XMenuPeer extends XMenuItemPeer implements MenuPeer { ...@@ -141,7 +141,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(Level.FINE)) { if (log.isLoggable(PlatformLogger.FINE)) {
log.fine("Attempt to use XMenuWindowPeer without window"); log.fine("Attempt to use XMenuWindowPeer without window");
} }
} }
......
...@@ -32,7 +32,7 @@ import java.awt.image.BufferedImage; ...@@ -32,7 +32,7 @@ import java.awt.image.BufferedImage;
import java.awt.geom.Point2D; import java.awt.geom.Point2D;
import java.util.Vector; import java.util.Vector;
import java.util.logging.*; import sun.util.logging.PlatformLogger;
public class XMenuWindow extends XBaseMenuWindow { public class XMenuWindow extends XBaseMenuWindow {
...@@ -42,7 +42,7 @@ public class XMenuWindow extends XBaseMenuWindow { ...@@ -42,7 +42,7 @@ public class XMenuWindow extends XBaseMenuWindow {
* *
************************************************/ ************************************************/
private static Logger log = Logger.getLogger("sun.awt.X11.XMenuWindow"); private static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XMenuWindow");
/* /*
* Primary members * Primary members
...@@ -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(Level.FINER)) { if (log.isLoggable(PlatformLogger.FINER)) {
log.finer("showing menu window + " + getWindow() + " at " + bounds); log.finer("showing menu window + " + getWindow() + " at " + bounds);
} }
XToolkit.awtLock(); XToolkit.awtLock();
......
...@@ -27,14 +27,13 @@ ...@@ -27,14 +27,13 @@
package sun.awt.X11; package sun.awt.X11;
import java.awt.Frame; import java.awt.Frame;
import java.util.logging.Level; import sun.util.logging.PlatformLogger;
import java.util.logging.Logger;
final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol
{ {
private final static Logger log = Logger.getLogger("sun.awt.X11.XNETProtocol"); private final static PlatformLogger log = PlatformLogger.getLogger("sun.awt.X11.XNETProtocol");
private final static Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XNETProtocol"); private final static PlatformLogger iconLog = PlatformLogger.getLogger("sun.awt.X11.icon.XNETProtocol");
private static Logger stateLog = Logger.getLogger("sun.awt.X11.states.XNETProtocol"); private static PlatformLogger stateLog = PlatformLogger.getLogger("sun.awt.X11.states.XNETProtocol");
/** /**
* XStateProtocol * XStateProtocol
...@@ -44,7 +43,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -44,7 +43,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(Level.FINE)) log.fine("Setting state of " + window + " to " + state); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Setting state of " + window + " to " + state);
if (window.isShowing()) { if (window.isShowing()) {
requestState(window, state); requestState(window, state);
} else { } else {
...@@ -54,7 +53,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -54,7 +53,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();
log.log(Level.FINE, "Current state of the window {0} is {1}", new Object[] {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) {
old_state.add(XA_NET_WM_STATE_MAXIMIZED_VERT); old_state.add(XA_NET_WM_STATE_MAXIMIZED_VERT);
} else { } else {
...@@ -65,7 +64,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -65,7 +64,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);
} }
log.log(Level.FINE, "Setting initial state of the window {0} to {1}", new Object[] {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);
} }
...@@ -98,7 +97,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -98,7 +97,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
default: default:
return; return;
} }
if (log.isLoggable(Level.FINE)) log.fine("Requesting state on " + window + " for " + state); if (log.isLoggable(PlatformLogger.FINE)) log.fine("Requesting state on " + window + " for " + state);
req.set_type((int)XConstants.ClientMessage); req.set_type((int)XConstants.ClientMessage);
req.set_window(window.getWindow()); req.set_window(window.getWindow());
req.set_message_type(XA_NET_WM_STATE.getAtom()); req.set_message_type(XA_NET_WM_STATE.getAtom());
...@@ -180,7 +179,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -180,7 +179,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);
log.log(Level.FINE, "Setting _NET_STATE atom {0} on {1} for {2}", new Object[] {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();
try { try {
XlibWrapper.XSendEvent(XToolkit.getDisplay(), XlibWrapper.XSendEvent(XToolkit.getDisplay(),
...@@ -205,20 +204,20 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -205,20 +204,20 @@ 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) {
log.log(Level.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}",
new Object[] {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()));
if (window.isShowing()) { if (window.isShowing()) {
requestState(window, state, set); requestState(window, state, set);
} else { } else {
XAtomList net_wm_state = window.getNETWMState(); XAtomList net_wm_state = window.getNETWMState();
log.log(Level.FINE, "Current state on {0} is {1}", new Object[] {window, net_wm_state}); log.finer("Current state on {0} is {1}", window, net_wm_state);
if (!set) { if (!set) {
net_wm_state.remove(state); net_wm_state.remove(state);
} else { } else {
net_wm_state.add(state); net_wm_state.add(state);
} }
log.log(Level.FINE, "Setting states on {0} to {1}", new Object[] {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);
} }
XToolkit.XSync(); XToolkit.XSync();
...@@ -272,7 +271,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -272,7 +271,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(Level.FINE)) log.fine("### " + this + " is active: " + (NetWindow != 0)); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### " + this + " is active: " + (NetWindow != 0));
} }
boolean active() { boolean active() {
...@@ -309,7 +308,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt ...@@ -309,7 +308,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(Level.FINE)) log.fine("### WM_NAME = " + net_wm_name_string); if (log.isLoggable(PlatformLogger.FINE)) log.fine("### WM_NAME = " + net_wm_name_string);
return net_wm_name_string.startsWith(name); return net_wm_name_string.startsWith(name);
} }
......
...@@ -28,11 +28,9 @@ ...@@ -28,11 +28,9 @@
package sun.awt.X11; package sun.awt.X11;
import sun.misc.Unsafe; import sun.misc.Unsafe;
import java.util.logging.*;
public class XQueryTree { public class XQueryTree {
private static Unsafe unsafe = XlibWrapper.unsafe; private static Unsafe unsafe = XlibWrapper.unsafe;
private static final Logger log = Logger.getLogger("sun.awt.X11.XQueryTree");
private boolean __executed = false; private boolean __executed = false;
long _w; long _w;
long root_ptr = unsafe.allocateMemory(Native.getLongSize()); long root_ptr = unsafe.allocateMemory(Native.getLongSize());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册