X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fswingjs%2Fplaf%2FLazyActionMap.js;fp=site%2Fj2s%2Fswingjs%2Fplaf%2FLazyActionMap.js;h=6a5929b25eb88f4a041125433fe16cf7fbf746f5;hp=4193043de6d80a7deddfe578184c54879063384a;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/swingjs/plaf/LazyActionMap.js b/site/j2s/swingjs/plaf/LazyActionMap.js index 4193043..6a5929b 100644 --- a/site/j2s/swingjs/plaf/LazyActionMap.js +++ b/site/j2s/swingjs/plaf/LazyActionMap.js @@ -1,77 +1,77 @@ -Clazz.declarePackage ("swingjs.plaf"); -Clazz.load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () { -c$ = Clazz.decorateAsClass (function () { -this._loader = null; -Clazz.instantialize (this, arguments); -}, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource); -c$.installLazyActionMap = Clazz.defineMethod (c$, "installLazyActionMap", -function (c, loaderClass, defaultsKey) { -var map = javax.swing.UIManager.get (defaultsKey); -if (map == null) { -map = new swingjs.plaf.LazyActionMap (loaderClass); -}javax.swing.SwingUtilities.replaceUIActionMap (c, map); -}, "javax.swing.JComponent,Class,~S"); -c$.getActionMap = Clazz.defineMethod (c$, "getActionMap", -function (loaderClass, defaultsKey) { -var map = javax.swing.UIManager.get (defaultsKey); -if (map == null) { -map = new swingjs.plaf.LazyActionMap (loaderClass); -}return map; -}, "Class,~S"); -Clazz.makeConstructor (c$, - function (loader) { -Clazz.superConstructor (this, swingjs.plaf.LazyActionMap, []); -this._loader = loader; -}, "Class"); -Clazz.defineMethod (c$, "put", -function (action) { -this.put (action.getValue ("Name"), action); -}, "javax.swing.Action"); -Clazz.defineMethod (c$, "put", -function (key, action) { -this.loadIfNecessary (); -Clazz.superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]); -}, "~O,javax.swing.Action"); -Clazz.defineMethod (c$, "get", -function (key) { -this.loadIfNecessary (); -return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "get", [key]); -}, "~O"); -Clazz.defineMethod (c$, "remove", -function (key) { -this.loadIfNecessary (); -Clazz.superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]); -}, "~O"); -Clazz.defineMethod (c$, "clear", -function () { -this.loadIfNecessary (); -Clazz.superCall (this, swingjs.plaf.LazyActionMap, "clear", []); -}); -Clazz.defineMethod (c$, "keys", -function () { -this.loadIfNecessary (); -return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "keys", []); -}); -Clazz.defineMethod (c$, "size", -function () { -this.loadIfNecessary (); -return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "size", []); -}); -Clazz.defineMethod (c$, "allKeys", -function () { -this.loadIfNecessary (); -return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []); -}); -Clazz.defineMethod (c$, "setParent", -function (map) { -this.loadIfNecessary (); -Clazz.superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]); -}, "javax.swing.ActionMap"); -Clazz.defineMethod (c$, "loadIfNecessary", - function () { -if (this._loader != null) { -{ -this._loader.loadActionMap(this); -this._loader = null; -}}}); -}); +Clazz.declarePackage ("swingjs.plaf"); +Clazz.load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () { +c$ = Clazz.decorateAsClass (function () { +this._loader = null; +Clazz.instantialize (this, arguments); +}, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource); +c$.installLazyActionMap = Clazz.defineMethod (c$, "installLazyActionMap", +function (c, loaderClass, defaultsKey) { +var map = javax.swing.UIManager.get (defaultsKey); +if (map == null) { +map = new swingjs.plaf.LazyActionMap (loaderClass); +}javax.swing.SwingUtilities.replaceUIActionMap (c, map); +}, "javax.swing.JComponent,Class,~S"); +c$.getActionMap = Clazz.defineMethod (c$, "getActionMap", +function (loaderClass, defaultsKey) { +var map = javax.swing.UIManager.get (defaultsKey); +if (map == null) { +map = new swingjs.plaf.LazyActionMap (loaderClass); +}return map; +}, "Class,~S"); +Clazz.makeConstructor (c$, + function (loader) { +Clazz.superConstructor (this, swingjs.plaf.LazyActionMap, []); +this._loader = loader; +}, "Class"); +Clazz.defineMethod (c$, "put", +function (action) { +this.put (action.getValue ("Name"), action); +}, "javax.swing.Action"); +Clazz.defineMethod (c$, "put", +function (key, action) { +this.loadIfNecessary (); +Clazz.superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]); +}, "~O,javax.swing.Action"); +Clazz.defineMethod (c$, "get", +function (key) { +this.loadIfNecessary (); +return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "get", [key]); +}, "~O"); +Clazz.defineMethod (c$, "remove", +function (key) { +this.loadIfNecessary (); +Clazz.superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]); +}, "~O"); +Clazz.defineMethod (c$, "clear", +function () { +this.loadIfNecessary (); +Clazz.superCall (this, swingjs.plaf.LazyActionMap, "clear", []); +}); +Clazz.defineMethod (c$, "keys", +function () { +this.loadIfNecessary (); +return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "keys", []); +}); +Clazz.defineMethod (c$, "size", +function () { +this.loadIfNecessary (); +return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "size", []); +}); +Clazz.defineMethod (c$, "allKeys", +function () { +this.loadIfNecessary (); +return Clazz.superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []); +}); +Clazz.defineMethod (c$, "setParent", +function (map) { +this.loadIfNecessary (); +Clazz.superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]); +}, "javax.swing.ActionMap"); +Clazz.defineMethod (c$, "loadIfNecessary", + function () { +if (this._loader != null) { +{ +this._loader.loadActionMap(this); +this._loader = null; +}}}); +});