< prev index next >

src/java.desktop/share/classes/sun/awt/AppContext.java

Print this page




  27 
  28 import java.awt.EventQueue;
  29 import java.awt.Window;
  30 import java.awt.SystemTray;
  31 import java.awt.TrayIcon;
  32 import java.awt.Toolkit;
  33 import java.awt.GraphicsEnvironment;
  34 import java.awt.event.InvocationEvent;
  35 import java.security.AccessController;
  36 import java.security.PrivilegedAction;
  37 import java.util.Collections;
  38 import java.util.HashMap;
  39 import java.util.IdentityHashMap;
  40 import java.util.Map;
  41 import java.util.Set;
  42 import java.util.HashSet;
  43 import java.beans.PropertyChangeSupport;
  44 import java.beans.PropertyChangeListener;
  45 import java.lang.ref.SoftReference;
  46 
  47 import jdk.internal.misc.JavaAWTAccess;
  48 import jdk.internal.misc.SharedSecrets;
  49 import sun.util.logging.PlatformLogger;
  50 import java.util.concurrent.locks.Condition;
  51 import java.util.concurrent.locks.Lock;
  52 import java.util.concurrent.locks.ReentrantLock;
  53 import java.util.concurrent.atomic.AtomicInteger;
  54 import java.util.function.Supplier;
  55 
  56 /**
  57  * The AppContext is a table referenced by ThreadGroup which stores
  58  * application service instances.  (If you are not writing an application
  59  * service, or don't know what one is, please do not use this class.)
  60  * The AppContext allows applet access to what would otherwise be
  61  * potentially dangerous services, such as the ability to peek at
  62  * EventQueues or change the look-and-feel of a Swing application.<p>
  63  *
  64  * Most application services use a singleton object to provide their
  65  * services, either as a default (such as getSystemEventQueue or
  66  * getDefaultToolkit) or as static methods with class data (System).
  67  * The AppContext works with the former method by extending the concept
  68  * of "default" to be ThreadGroup-specific.  Application services




  27 
  28 import java.awt.EventQueue;
  29 import java.awt.Window;
  30 import java.awt.SystemTray;
  31 import java.awt.TrayIcon;
  32 import java.awt.Toolkit;
  33 import java.awt.GraphicsEnvironment;
  34 import java.awt.event.InvocationEvent;
  35 import java.security.AccessController;
  36 import java.security.PrivilegedAction;
  37 import java.util.Collections;
  38 import java.util.HashMap;
  39 import java.util.IdentityHashMap;
  40 import java.util.Map;
  41 import java.util.Set;
  42 import java.util.HashSet;
  43 import java.beans.PropertyChangeSupport;
  44 import java.beans.PropertyChangeListener;
  45 import java.lang.ref.SoftReference;
  46 
  47 import jdk.internal.access.JavaAWTAccess;
  48 import jdk.internal.access.SharedSecrets;
  49 import sun.util.logging.PlatformLogger;
  50 import java.util.concurrent.locks.Condition;
  51 import java.util.concurrent.locks.Lock;
  52 import java.util.concurrent.locks.ReentrantLock;
  53 import java.util.concurrent.atomic.AtomicInteger;
  54 import java.util.function.Supplier;
  55 
  56 /**
  57  * The AppContext is a table referenced by ThreadGroup which stores
  58  * application service instances.  (If you are not writing an application
  59  * service, or don't know what one is, please do not use this class.)
  60  * The AppContext allows applet access to what would otherwise be
  61  * potentially dangerous services, such as the ability to peek at
  62  * EventQueues or change the look-and-feel of a Swing application.<p>
  63  *
  64  * Most application services use a singleton object to provide their
  65  * services, either as a default (such as getSystemEventQueue or
  66  * getDefaultToolkit) or as static methods with class data (System).
  67  * The AppContext works with the former method by extending the concept
  68  * of "default" to be ThreadGroup-specific.  Application services


< prev index next >