Java Code Examples for sun.awt.AppContext#getAppContexts()
The following examples show how to use
sun.awt.AppContext#getAppContexts() .
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: RepaintManager.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 2
Source File: RepaintManager.java From JDKSourceCode1.8 with MIT License | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 3
Source File: RepaintManager.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (Object c : AppContext.getAppContexts()) { AppContext context = (AppContext) c; synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 4
Source File: RepaintManager.java From Bytecoder with Apache License 2.0 | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 5
Source File: RepaintManager.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 6
Source File: RepaintManager.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 7
Source File: RepaintManager.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 8
Source File: RepaintManager.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private static void scheduleDisplayChanges() { // To avoid threading problems, we notify each RepaintManager // on the thread it was created on. for (AppContext context : AppContext.getAppContexts()) { synchronized(context) { if (!context.isDisposed()) { EventQueue eventQueue = (EventQueue)context.get( AppContext.EVENT_QUEUE_KEY); if (eventQueue != null) { eventQueue.postEvent(new InvocationEvent( Toolkit.getDefaultToolkit(), new DisplayChangedRunnable())); } } } } }
Example 9
Source File: Toolkit.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@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 10
Source File: Toolkit.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@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 11
Source File: Toolkit.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@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 12
Source File: Toolkit.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@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 13
Source File: Toolkit.java From Bytecoder with Apache License 2.0 | 5 votes |
@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 14
Source File: XSystemTrayPeer.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }
Example 15
Source File: XSystemTrayPeer.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }
Example 16
Source File: XSystemTrayPeer.java From hottub with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }
Example 17
Source File: XSystemTrayPeer.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }
Example 18
Source File: XSystemTrayPeer.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }
Example 19
Source File: XSystemTrayPeer.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }
Example 20
Source File: XSystemTrayPeer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
private void invokeOnEachAppContext(Runnable runnable) { for (AppContext appContext : AppContext.getAppContexts()) { SunToolkit.invokeLaterOnAppContext(appContext, runnable); } }