sun.awt.PeerEvent Java Examples

The following examples show how to use sun.awt.PeerEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WDropTargetContextPeer.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void eventPosted(final SunDropTargetEvent e) {
    if (e.getID() != SunDropTargetEvent.MOUSE_DROPPED) {
        Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    e.getDispatcher().unregisterAllEvents();
                }
            };
        // NOTE: this PeerEvent must be a NORM_PRIORITY event to be
        // dispatched after this SunDropTargetEvent, but before the next
        // one, so we should pass zero flags.
        PeerEvent peerEvent = new PeerEvent(e.getSource(), runnable, 0);
        SunToolkit.executeOnEventHandlerThread(peerEvent);
    }
}
 
Example #2
Source File: WDropTargetContextPeer.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void eventPosted(final SunDropTargetEvent e) {
    if (e.getID() != SunDropTargetEvent.MOUSE_DROPPED) {
        Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    e.getDispatcher().unregisterAllEvents();
                }
            };
        // NOTE: this PeerEvent must be a NORM_PRIORITY event to be
        // dispatched after this SunDropTargetEvent, but before the next
        // one, so we should pass zero flags.
        PeerEvent peerEvent = new PeerEvent(e.getSource(), runnable, 0);
        SunToolkit.executeOnEventHandlerThread(peerEvent);
    }
}
 
Example #3
Source File: EventQueue.java    From jdk-1.7-annotated with Apache License 2.0 6 votes vote down vote up
private static int getPriority(AWTEvent theEvent) {
    if (theEvent instanceof PeerEvent) {
        PeerEvent peerEvent = (PeerEvent)theEvent;
        if ((peerEvent.getFlags() & PeerEvent.ULTIMATE_PRIORITY_EVENT) != 0) {
            return ULTIMATE_PRIORITY;
        }
        if ((peerEvent.getFlags() & PeerEvent.PRIORITY_EVENT) != 0) {
            return HIGH_PRIORITY;
        }
        if ((peerEvent.getFlags() & PeerEvent.LOW_PRIORITY_EVENT) != 0) {
            return LOW_PRIORITY;
        }
    }
    int id = theEvent.getID();
    if ((id >= PaintEvent.PAINT_FIRST) && (id <= PaintEvent.PAINT_LAST)) {
        return LOW_PRIORITY;
    }
    return NORM_PRIORITY;
}
 
Example #4
Source File: Container.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #5
Source File: EventQueue.java    From jdk-1.7-annotated with Apache License 2.0 6 votes vote down vote up
private boolean coalescePeerEvent(PeerEvent e) {
    EventQueueItem[] cache = ((Component)e.getSource()).eventCache;
    if (cache == null) {
        return false;
    }
    int index = eventToCacheIndex(e);
    if (index != -1 && cache[index] != null) {
        e = e.coalesceEvents((PeerEvent)cache[index].event);
        if (e != null) {
            cache[index].event = e;
            return true;
        } else {
            cache[index] = null;
        }
    }
    return false;
}
 
Example #6
Source File: Container.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #7
Source File: Container.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #8
Source File: Container.java    From jdk-1.7-annotated with Apache License 2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #9
Source File: Container.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #10
Source File: Container.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #11
Source File: Container.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #12
Source File: Container.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #13
Source File: Container.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #14
Source File: WDropTargetContextPeer.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void eventPosted(final SunDropTargetEvent e) {
    if (e.getID() != SunDropTargetEvent.MOUSE_DROPPED) {
        Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    e.getDispatcher().unregisterAllEvents();
                }
            };
        // NOTE: this PeerEvent must be a NORM_PRIORITY event to be
        // dispatched after this SunDropTargetEvent, but before the next
        // one, so we should pass zero flags.
        PeerEvent peerEvent = new PeerEvent(e.getSource(), runnable, 0);
        SunToolkit.executeOnEventHandlerThread(peerEvent);
    }
}
 
Example #15
Source File: WDropTargetContextPeer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void eventPosted(final SunDropTargetEvent e) {
    if (e.getID() != SunDropTargetEvent.MOUSE_DROPPED) {
        Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    e.getDispatcher().unregisterAllEvents();
                }
            };
        // NOTE: this PeerEvent must be a NORM_PRIORITY event to be
        // dispatched after this SunDropTargetEvent, but before the next
        // one, so we should pass zero flags.
        PeerEvent peerEvent = new PeerEvent(e.getSource(), runnable, 0);
        SunToolkit.executeOnEventHandlerThread(peerEvent);
    }
}
 
Example #16
Source File: Container.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #17
Source File: Container.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #18
Source File: WDropTargetContextPeer.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void eventPosted(final SunDropTargetEvent e) {
    if (e.getID() != SunDropTargetEvent.MOUSE_DROPPED) {
        Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    e.getDispatcher().unregisterAllEvents();
                }
            };
        // NOTE: this PeerEvent must be a NORM_PRIORITY event to be
        // dispatched after this SunDropTargetEvent, but before the next
        // one, so we should pass zero flags.
        PeerEvent peerEvent = new PeerEvent(e.getSource(), runnable, 0);
        SunToolkit.executeOnEventHandlerThread(peerEvent);
    }
}
 
Example #19
Source File: WDropTargetContextPeer.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
protected void eventPosted(final SunDropTargetEvent e) {
    if (e.getID() != SunDropTargetEvent.MOUSE_DROPPED) {
        Runnable runnable = new Runnable() {
                @Override
                public void run() {
                    e.getDispatcher().unregisterAllEvents();
                }
            };
        // NOTE: this PeerEvent must be a NORM_PRIORITY event to be
        // dispatched after this SunDropTargetEvent, but before the next
        // one, so we should pass zero flags.
        PeerEvent peerEvent = new PeerEvent(e.getSource(), runnable, 0);
        SunToolkit.executeOnEventHandlerThread(peerEvent);
    }
}
 
Example #20
Source File: Container.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #21
Source File: Container.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #22
Source File: Container.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
private void stopLWModal() {
    synchronized (getTreeLock()) {
        if (modalAppContext != null) {
            Container nativeContainer = getHeavyweightContainer();
            if(nativeContainer != null) {
                if (this.modalComp !=  null) {
                    nativeContainer.modalComp = this.modalComp;
                    this.modalComp = null;
                    return;
                }
                else {
                    nativeContainer.modalComp = null;
                }
            }
            // Wake up event dispatch thread on which the dialog was
            // initially shown
            SunToolkit.postEvent(modalAppContext,
                    new PeerEvent(this,
                            new WakingRunnable(),
                            PeerEvent.PRIORITY_EVENT));
        }
        EventQueue.invokeLater(new WakingRunnable());
        getTreeLock().notifyAll();
    }
}
 
Example #23
Source File: Toolkit.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void firePropertyChange(final PropertyChangeEvent evt) {
    Object oldValue = evt.getOldValue();
    Object newValue = evt.getNewValue();
    String propertyName = evt.getPropertyName();
    if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
        return;
    }
    Runnable updater = new Runnable() {
        public void run() {
            PropertyChangeSupport pcs = (PropertyChangeSupport)
                    AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
            if (null != pcs) {
                pcs.firePropertyChange(evt);
            }
        }
    };
    final AppContext currentAppContext = AppContext.getAppContext();
    for (AppContext appContext : AppContext.getAppContexts()) {
        if (null == appContext || appContext.isDisposed()) {
            continue;
        }
        if (currentAppContext == appContext) {
            updater.run();
        } else {
            final PeerEvent e = new PeerEvent(source, updater, PeerEvent.ULTIMATE_PRIORITY_EVENT);
            SunToolkit.postEvent(appContext, e);
        }
    }
}
 
Example #24
Source File: Toolkit.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void firePropertyChange(final PropertyChangeEvent evt) {
    Object oldValue = evt.getOldValue();
    Object newValue = evt.getNewValue();
    String propertyName = evt.getPropertyName();
    if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
        return;
    }
    Runnable updater = new Runnable() {
        public void run() {
            PropertyChangeSupport pcs = (PropertyChangeSupport)
                    AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
            if (null != pcs) {
                pcs.firePropertyChange(evt);
            }
        }
    };
    final AppContext currentAppContext = AppContext.getAppContext();
    for (AppContext appContext : AppContext.getAppContexts()) {
        if (null == appContext || appContext.isDisposed()) {
            continue;
        }
        if (currentAppContext == appContext) {
            updater.run();
        } else {
            final PeerEvent e = new PeerEvent(source, updater, PeerEvent.ULTIMATE_PRIORITY_EVENT);
            SunToolkit.postEvent(appContext, e);
        }
    }
}
 
Example #25
Source File: Toolkit.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void firePropertyChange(final PropertyChangeEvent evt) {
    Object oldValue = evt.getOldValue();
    Object newValue = evt.getNewValue();
    String propertyName = evt.getPropertyName();
    if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
        return;
    }
    Runnable updater = new Runnable() {
        public void run() {
            PropertyChangeSupport pcs = (PropertyChangeSupport)
                    AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
            if (null != pcs) {
                pcs.firePropertyChange(evt);
            }
        }
    };
    final AppContext currentAppContext = AppContext.getAppContext();
    for (AppContext appContext : AppContext.getAppContexts()) {
        if (null == appContext || appContext.isDisposed()) {
            continue;
        }
        if (currentAppContext == appContext) {
            updater.run();
        } else {
            final PeerEvent e = new PeerEvent(source, updater, PeerEvent.ULTIMATE_PRIORITY_EVENT);
            SunToolkit.postEvent(appContext, e);
        }
    }
}
 
Example #26
Source File: WScrollPanePeer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public PeerEvent coalesceEvents(PeerEvent newEvent) {
    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
        log.finest("ScrollEvent coalesced: " + newEvent);
    }
    if (newEvent instanceof ScrollEvent) {
        return newEvent;
    }
    return null;
}
 
Example #27
Source File: WScrollPanePeer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public PeerEvent coalesceEvents(PeerEvent newEvent) {
    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
        log.finest("ScrollEvent coalesced: " + newEvent);
    }
    if (newEvent instanceof ScrollEvent) {
        return newEvent;
    }
    return null;
}
 
Example #28
Source File: Toolkit.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void firePropertyChange(final PropertyChangeEvent evt) {
    Object oldValue = evt.getOldValue();
    Object newValue = evt.getNewValue();
    String propertyName = evt.getPropertyName();
    if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
        return;
    }
    Runnable updater = new Runnable() {
        public void run() {
            PropertyChangeSupport pcs = (PropertyChangeSupport)
                    AppContext.getAppContext().get(PROP_CHANGE_SUPPORT_KEY);
            if (null != pcs) {
                pcs.firePropertyChange(evt);
            }
        }
    };
    final AppContext currentAppContext = AppContext.getAppContext();
    for (AppContext appContext : AppContext.getAppContexts()) {
        if (null == appContext || appContext.isDisposed()) {
            continue;
        }
        if (currentAppContext == appContext) {
            updater.run();
        } else {
            final PeerEvent e = new PeerEvent(source, updater, PeerEvent.ULTIMATE_PRIORITY_EVENT);
            SunToolkit.postEvent(appContext, e);
        }
    }
}
 
Example #29
Source File: WaitDispatchSupport.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private void wakeupEDT() {
    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
        log.finest("wakeupEDT(): EDT == " + dispatchThread);
    }
    EventQueue eq = dispatchThread.getEventQueue();
    eq.postEvent(new PeerEvent(this, wakingRunnable, PeerEvent.PRIORITY_EVENT));
}
 
Example #30
Source File: WaitDispatchSupport.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
private void wakeupEDT() {
    if (log.isLoggable(PlatformLogger.Level.FINEST)) {
        log.finest("wakeupEDT(): EDT == " + dispatchThread);
    }
    EventQueue eq = dispatchThread.getEventQueue();
    eq.postEvent(new PeerEvent(this, wakingRunnable, PeerEvent.PRIORITY_EVENT));
}