Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / jssun / awt / AppContext.js
index de384d6..53294b0 100644 (file)
-Clazz.declarePackage ("jssun.awt");\r
-Clazz.load (["java.lang.StringBuffer", "java.util.Collections", "$.HashMap", "$.IdentityHashMap"], ["jssun.awt.AppContext", "$.MostRecentThreadAppContext", "$.MostRecentKeyValue"], ["java.lang.Thread", "java.util.HashSet", "java.beans.PropertyChangeSupport"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.table = null;\r
-this.threadGroup = null;\r
-this.changeSupport = null;\r
-this.$isDisposed = false;\r
-this.mostRecentKeyValue = null;\r
-this.shadowMostRecentKeyValue = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.awt, "AppContext");\r
-Clazz.prepareFields (c$, function () {\r
-this.table =  new java.util.HashMap ();\r
-});\r
-c$.getAppContexts = Clazz.defineMethod (c$, "getAppContexts", \r
-function () {\r
-return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());\r
-});\r
-Clazz.defineMethod (c$, "isDisposed", \r
-function () {\r
-return this.$isDisposed;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (threadGroup) {\r
-jssun.awt.AppContext.numAppContexts++;\r
-this.threadGroup = threadGroup;\r
-jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);\r
-}, "ThreadGroup");\r
-c$.getAppContext = Clazz.defineMethod (c$, "getAppContext", \r
-function () {\r
-var currentThread = Thread.currentThread ();\r
-var appContext = null;\r
-var recent = jssun.awt.AppContext.mostRecentThreadAppContext;\r
-if ((recent != null) && (recent.thread === currentThread)) {\r
-appContext = recent.appContext;\r
-} else {\r
-var currentThreadGroup = currentThread.getThreadGroup ();\r
-var threadGroup = currentThreadGroup;\r
-appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);\r
-while (appContext == null) {\r
-threadGroup = threadGroup.getParent ();\r
-if (threadGroup == null) {\r
-return null;\r
-}appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);\r
-}\r
-for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {\r
-jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);\r
-}\r
-jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);\r
-}return appContext;\r
-});\r
-c$.isMainContext = Clazz.defineMethod (c$, "isMainContext", \r
-function (ctx) {\r
-return false;\r
-}, "jssun.awt.AppContext");\r
-Clazz.defineMethod (c$, "dispose", \r
-function () {\r
-});\r
-Clazz.defineMethod (c$, "get", \r
-function (key) {\r
-{\r
-var recent = this.mostRecentKeyValue;\r
-if ((recent != null) && (recent.key === key)) {\r
-return recent.value;\r
-}var value = this.table.get (key);\r
-if (this.mostRecentKeyValue == null) {\r
-this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);\r
-this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);\r
-} else {\r
-var auxKeyValue = this.mostRecentKeyValue;\r
-this.shadowMostRecentKeyValue.setPair (key, value);\r
-this.mostRecentKeyValue = this.shadowMostRecentKeyValue;\r
-this.shadowMostRecentKeyValue = auxKeyValue;\r
-}return value;\r
-}}, "~O");\r
-Clazz.defineMethod (c$, "put", \r
-function (key, value) {\r
-{\r
-var recent = this.mostRecentKeyValue;\r
-if ((recent != null) && (recent.key === key)) recent.value = value;\r
-return this.table.put (key, value);\r
-}}, "~O,~O");\r
-Clazz.defineMethod (c$, "remove", \r
-function (key) {\r
-{\r
-var recent = this.mostRecentKeyValue;\r
-if ((recent != null) && (recent.key === key)) recent.value = null;\r
-return this.table.remove (key);\r
-}}, "~O");\r
-Clazz.defineMethod (c$, "getThreadGroup", \r
-function () {\r
-return this.threadGroup;\r
-});\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";\r
-});\r
-Clazz.defineMethod (c$, "getPropertyChangeListeners", \r
-function () {\r
-if (this.changeSupport == null) {\r
-return  new Array (0);\r
-}return this.changeSupport.getPropertyChangeListeners ();\r
-});\r
-Clazz.defineMethod (c$, "addPropertyChangeListener", \r
-function (propertyName, listener) {\r
-if (listener == null) {\r
-return;\r
-}if (this.changeSupport == null) {\r
-this.changeSupport =  new java.beans.PropertyChangeSupport (this);\r
-}this.changeSupport.addPropertyChangeListener (propertyName, listener);\r
-}, "~S,java.beans.PropertyChangeListener");\r
-Clazz.defineMethod (c$, "removePropertyChangeListener", \r
-function (propertyName, listener) {\r
-if (listener == null || this.changeSupport == null) {\r
-return;\r
-}this.changeSupport.removePropertyChangeListener (propertyName, listener);\r
-}, "~S,java.beans.PropertyChangeListener");\r
-Clazz.defineMethod (c$, "getPropertyChangeListeners", \r
-function (propertyName) {\r
-if (this.changeSupport == null) {\r
-return  new Array (0);\r
-}return this.changeSupport.getPropertyChangeListeners (propertyName);\r
-}, "~S");\r
-c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");\r
-c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());\r
-Clazz.defineStatics (c$,\r
-"DISPOSED_PROPERTY_NAME", "disposed",\r
-"GUI_DISPOSED", "guidisposed",\r
-"numAppContexts", 0,\r
-"mostRecentThreadAppContext", null);\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.thread = null;\r
-this.appContext = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.awt, "MostRecentThreadAppContext");\r
-Clazz.makeConstructor (c$, \r
-function (key, value) {\r
-this.thread = key;\r
-this.appContext = value;\r
-}, "Thread,jssun.awt.AppContext");\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.key = null;\r
-this.value = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jssun.awt, "MostRecentKeyValue");\r
-Clazz.makeConstructor (c$, \r
-function (k, v) {\r
-this.key = k;\r
-this.value = v;\r
-}, "~O,~O");\r
-Clazz.defineMethod (c$, "setPair", \r
-function (k, v) {\r
-this.key = k;\r
-this.value = v;\r
-}, "~O,~O");\r
-});\r
+Clazz.declarePackage ("jssun.awt");
+Clazz.load (["java.lang.StringBuffer", "java.util.Collections", "$.HashMap", "$.IdentityHashMap"], ["jssun.awt.AppContext", "$.MostRecentThreadAppContext", "$.MostRecentKeyValue"], ["java.lang.Thread", "java.util.HashSet", "java.beans.PropertyChangeSupport"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.table = null;
+this.threadGroup = null;
+this.changeSupport = null;
+this.$isDisposed = false;
+this.mostRecentKeyValue = null;
+this.shadowMostRecentKeyValue = null;
+Clazz.instantialize (this, arguments);
+}, jssun.awt, "AppContext");
+Clazz.prepareFields (c$, function () {
+this.table =  new java.util.HashMap ();
+});
+c$.getAppContexts = Clazz.defineMethod (c$, "getAppContexts", 
+function () {
+return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());
+});
+Clazz.defineMethod (c$, "isDisposed", 
+function () {
+return this.$isDisposed;
+});
+Clazz.makeConstructor (c$, 
+function (threadGroup) {
+jssun.awt.AppContext.numAppContexts++;
+this.threadGroup = threadGroup;
+jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);
+}, "ThreadGroup");
+c$.getAppContext = Clazz.defineMethod (c$, "getAppContext", 
+function () {
+var currentThread = Thread.currentThread ();
+var appContext = null;
+var recent = jssun.awt.AppContext.mostRecentThreadAppContext;
+if ((recent != null) && (recent.thread === currentThread)) {
+appContext = recent.appContext;
+} else {
+var currentThreadGroup = currentThread.getThreadGroup ();
+var threadGroup = currentThreadGroup;
+appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
+while (appContext == null) {
+threadGroup = threadGroup.getParent ();
+if (threadGroup == null) {
+return null;
+}appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
+}
+for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {
+jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);
+}
+jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);
+}return appContext;
+});
+c$.isMainContext = Clazz.defineMethod (c$, "isMainContext", 
+function (ctx) {
+return false;
+}, "jssun.awt.AppContext");
+Clazz.defineMethod (c$, "dispose", 
+function () {
+});
+Clazz.defineMethod (c$, "get", 
+function (key) {
+{
+var recent = this.mostRecentKeyValue;
+if ((recent != null) && (recent.key === key)) {
+return recent.value;
+}var value = this.table.get (key);
+if (this.mostRecentKeyValue == null) {
+this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
+this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
+} else {
+var auxKeyValue = this.mostRecentKeyValue;
+this.shadowMostRecentKeyValue.setPair (key, value);
+this.mostRecentKeyValue = this.shadowMostRecentKeyValue;
+this.shadowMostRecentKeyValue = auxKeyValue;
+}return value;
+}}, "~O");
+Clazz.defineMethod (c$, "put", 
+function (key, value) {
+{
+var recent = this.mostRecentKeyValue;
+if ((recent != null) && (recent.key === key)) recent.value = value;
+return this.table.put (key, value);
+}}, "~O,~O");
+Clazz.defineMethod (c$, "remove", 
+function (key) {
+{
+var recent = this.mostRecentKeyValue;
+if ((recent != null) && (recent.key === key)) recent.value = null;
+return this.table.remove (key);
+}}, "~O");
+Clazz.defineMethod (c$, "getThreadGroup", 
+function () {
+return this.threadGroup;
+});
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";
+});
+Clazz.defineMethod (c$, "getPropertyChangeListeners", 
+function () {
+if (this.changeSupport == null) {
+return  new Array (0);
+}return this.changeSupport.getPropertyChangeListeners ();
+});
+Clazz.defineMethod (c$, "addPropertyChangeListener", 
+function (propertyName, listener) {
+if (listener == null) {
+return;
+}if (this.changeSupport == null) {
+this.changeSupport =  new java.beans.PropertyChangeSupport (this);
+}this.changeSupport.addPropertyChangeListener (propertyName, listener);
+}, "~S,java.beans.PropertyChangeListener");
+Clazz.defineMethod (c$, "removePropertyChangeListener", 
+function (propertyName, listener) {
+if (listener == null || this.changeSupport == null) {
+return;
+}this.changeSupport.removePropertyChangeListener (propertyName, listener);
+}, "~S,java.beans.PropertyChangeListener");
+Clazz.defineMethod (c$, "getPropertyChangeListeners", 
+function (propertyName) {
+if (this.changeSupport == null) {
+return  new Array (0);
+}return this.changeSupport.getPropertyChangeListeners (propertyName);
+}, "~S");
+c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");
+c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());
+Clazz.defineStatics (c$,
+"DISPOSED_PROPERTY_NAME", "disposed",
+"GUI_DISPOSED", "guidisposed",
+"numAppContexts", 0,
+"mostRecentThreadAppContext", null);
+c$ = Clazz.decorateAsClass (function () {
+this.thread = null;
+this.appContext = null;
+Clazz.instantialize (this, arguments);
+}, jssun.awt, "MostRecentThreadAppContext");
+Clazz.makeConstructor (c$, 
+function (key, value) {
+this.thread = key;
+this.appContext = value;
+}, "Thread,jssun.awt.AppContext");
+c$ = Clazz.decorateAsClass (function () {
+this.key = null;
+this.value = null;
+Clazz.instantialize (this, arguments);
+}, jssun.awt, "MostRecentKeyValue");
+Clazz.makeConstructor (c$, 
+function (k, v) {
+this.key = k;
+this.value = v;
+}, "~O,~O");
+Clazz.defineMethod (c$, "setPair", 
+function (k, v) {
+this.key = k;
+this.value = v;
+}, "~O,~O");
+});