JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / JU / AjaxURLStreamHandlerFactory.js
1 Clazz.declarePackage ("JU");\r
2 Clazz.load (["java.net.URLStreamHandlerFactory", "java.util.Hashtable"], "JU.AjaxURLStreamHandlerFactory", ["JU.AjaxURLStreamHandler"], function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.htFactories = null;\r
5 Clazz.instantialize (this, arguments);\r
6 }, JU, "AjaxURLStreamHandlerFactory", null, java.net.URLStreamHandlerFactory);\r
7 Clazz.prepareFields (c$, function () {\r
8 this.htFactories =  new java.util.Hashtable ();\r
9 });\r
10 Clazz.overrideMethod (c$, "createURLStreamHandler", \r
11 function (protocol) {\r
12 var fac = this.htFactories.get (protocol);\r
13 if (fac == null) this.htFactories.put (protocol, fac =  new JU.AjaxURLStreamHandler (protocol));\r
14 return (fac.protocol == null ? null : fac);\r
15 }, "~S");\r
16 });\r