public static void modalityChanged(int paramInt, boolean paramBoolean) {
    PerPluginInfo localPerPluginInfo = (PerPluginInfo) pluginInfoMap.get(new Integer(paramInt));
    if (localPerPluginInfo == null) return;
    final AppletID localAppletID = new AppletID(paramInt);
    if (paramBoolean) {
      final int i = localPerPluginInfo.modalityPushed();
      final Plugin localPlugin = localPerPluginInfo.getPlugin();
      localPlugin.invokeLater(
          new Runnable() {
            private final ModalitySupport.PerPluginInfo val$info;
            private final AppletID val$id;
            private final int val$depth;
            private final Plugin val$plugin;

            public void run() {
              if (this.val$info.getPlugin().getActiveJSCounter() > 0) {
                this.val$info.modalityPopped();
                return;
              }
              while ((!JVMManager.getManager().appletExited(localAppletID))
                  && (this.val$info.getModalityDepth() >= i))
                localPlugin.waitForSignalWithModalBlocking();
              localPlugin.notifyMainThread();
            }
          });
    } else {
      localPerPluginInfo.modalityPopped();
    }
  }
 public static synchronized void shutdown(int paramInt) {
   PerPluginInfo localPerPluginInfo = (PerPluginInfo) pluginInfoMap.remove(new Integer(paramInt));
   localPerPluginInfo.getPlugin().notifyMainThread();
 }
 public static synchronized void initialize(int paramInt, Plugin paramPlugin) {
   PerPluginInfo localPerPluginInfo = (PerPluginInfo) pluginInfoMap.get(new Integer(paramInt));
   if (localPerPluginInfo == null)
     pluginInfoMap.put(new Integer(paramInt), new PerPluginInfo(paramPlugin));
   else assert (localPerPluginInfo.getPlugin() == paramPlugin);
 }