src/share/classes/java/awt/WaitDispatchSupport.java
Print this page
@@ -106,11 +106,11 @@
this.dispatchThread = dispatchThread;
this.extCondition = extCond;
this.condition = new Conditional() {
@Override
public boolean evaluate() {
- if (log.isLoggable(PlatformLogger.FINEST)) {
+ if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("evaluate(): blockingEDT=" + keepBlockingEDT.get() +
", blockingCT=" + keepBlockingCT.get());
}
boolean extEvaluate =
(extCondition != null) ? extCondition.evaluate() : true;
@@ -163,11 +163,11 @@
/**
* @inheritDoc
*/
@Override
public boolean enter() {
- if (log.isLoggable(PlatformLogger.FINE)) {
+ if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("enter(): blockingEDT=" + keepBlockingEDT.get() +
", blockingCT=" + keepBlockingCT.get());
}
if (!keepBlockingEDT.compareAndSet(false, true)) {
@@ -190,15 +190,15 @@
// dispatch thread, start a new event pump; if we're
// on any other thread, call wait() on the treelock
Thread currentThread = Thread.currentThread();
if (currentThread == dispatchThread) {
- if (log.isLoggable(PlatformLogger.FINEST)) {
+ if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("On dispatch thread: " + dispatchThread);
}
if (interval != 0) {
- if (log.isLoggable(PlatformLogger.FINEST)) {
+ if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("scheduling the timer for " + interval + " ms");
}
timer.schedule(timerTask = new TimerTask() {
@Override
public void run() {
@@ -211,11 +211,11 @@
// Dispose SequencedEvent we are dispatching on the the current
// AppContext, to prevent us from hang - see 4531693 for details
SequencedEvent currentSE = KeyboardFocusManager.
getCurrentKeyboardFocusManager().getCurrentSequencedEvent();
if (currentSE != null) {
- if (log.isLoggable(PlatformLogger.FINE)) {
+ if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Dispose current SequencedEvent: " + currentSE);
}
currentSE.dispose();
}
// In case the exit() method is called before starting
@@ -229,11 +229,11 @@
run.run();
return null;
}
});
} else {
- if (log.isLoggable(PlatformLogger.FINEST)) {
+ if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("On non-dispatch thread: " + currentThread);
}
synchronized (getTreeLock()) {
if (filter != null) {
dispatchThread.addEventFilter(filter);
@@ -255,15 +255,15 @@
((extCondition != null) ? extCondition.evaluate() : true))
{
getTreeLock().wait();
}
}
- if (log.isLoggable(PlatformLogger.FINE)) {
+ if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("waitDone " + keepBlockingEDT.get() + " " + keepBlockingCT.get());
}
} catch (InterruptedException e) {
- if (log.isLoggable(PlatformLogger.FINE)) {
+ if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("Exception caught while waiting: " + e);
}
} finally {
if (filter != null) {
dispatchThread.removeEventFilter(filter);
@@ -282,11 +282,11 @@
/**
* @inheritDoc
*/
public boolean exit() {
- if (log.isLoggable(PlatformLogger.FINE)) {
+ if (log.isLoggable(PlatformLogger.Level.FINE)) {
log.fine("exit(): blockingEDT=" + keepBlockingEDT.get() +
", blockingCT=" + keepBlockingCT.get());
}
if (keepBlockingEDT.compareAndSet(true, false)) {
wakeupEDT();
@@ -309,11 +309,11 @@
log.fine("Wake up EDT done");
}
};
private void wakeupEDT() {
- if (log.isLoggable(PlatformLogger.FINEST)) {
+ if (log.isLoggable(PlatformLogger.Level.FINEST)) {
log.finest("wakeupEDT(): EDT == " + dispatchThread);
}
EventQueue eq = dispatchThread.getEventQueue();
eq.postEvent(new PeerEvent(this, wakingRunnable, PeerEvent.PRIORITY_EVENT));
}