JAL-1807 - Bob's last(?) before leaving Dundee -- adds fast file loading
[jalviewjs.git] / site / j2s / core / coreswingjs.js
1 (function(Clazz
2 ,Clazz_getClassName
3 ,Clazz_newLongArray
4 ,Clazz_doubleToByte
5 ,Clazz_doubleToInt
6 ,Clazz_doubleToLong
7 ,Clazz_declarePackage
8 ,Clazz_instanceOf
9 ,Clazz_load
10 ,Clazz_instantialize
11 ,Clazz_decorateAsClass
12 ,Clazz_floatToInt
13 ,Clazz_floatToLong
14 ,Clazz_makeConstructor
15 ,Clazz_defineEnumConstant
16 ,Clazz_exceptionOf
17 ,Clazz_newIntArray
18 ,Clazz_defineStatics
19 ,Clazz_newFloatArray
20 ,Clazz_declareType
21 ,Clazz_prepareFields
22 ,Clazz_superConstructor
23 ,Clazz_newByteArray
24 ,Clazz_declareInterface
25 ,Clazz_p0p
26 ,Clazz_pu$h
27 ,Clazz_newShortArray
28 ,Clazz_innerTypeInstance
29 ,Clazz_isClassDefined
30 ,Clazz_prepareCallback
31 ,Clazz_newArray
32 ,Clazz_castNullAs
33 ,Clazz_floatToShort
34 ,Clazz_superCall
35 ,Clazz_decorateAsType
36 ,Clazz_newBooleanArray
37 ,Clazz_newCharArray
38 ,Clazz_implementOf
39 ,Clazz_newDoubleArray
40 ,Clazz_overrideConstructor
41 ,Clazz_clone
42 ,Clazz_doubleToShort
43 ,Clazz_getInheritedLevel
44 ,Clazz_getParamsType
45 ,Clazz_isAF
46 ,Clazz_isAI
47 ,Clazz_isAS
48 ,Clazz_isASS
49 ,Clazz_isAP
50 ,Clazz_isAFloat
51 ,Clazz_isAII
52 ,Clazz_isAFF
53 ,Clazz_isAFFF
54 ,Clazz_tryToSearchAndExecute
55 ,Clazz_getStackTrace
56 ,Clazz_inheritArgs
57 ,Clazz_alert
58 ,Clazz_defineMethod
59 ,Clazz_overrideMethod
60 ,Clazz_declareAnonymous
61 ,Clazz_checkPrivateMethod
62 ,Clazz_cloneFinals
63 ){
64 var $t$;
65 //var c$;
66 // SwingJSJavaExt.js
67  
68
69 // This library will be wrapped by an additional anonymous function using ANT in 
70 // build_03_tojs.xml. This task will also modify variable names. References 
71 // to Clazz._ will not be changed, but other Clazz_xxx will be changed to 
72 // (local scope) Clazz_xxx, allowing them to be further compressed using
73 // Google Closure Compiler in that same ANT task.
74
75 // BH 7/24/2015 7:21:51 AM renamed from JSmolJavaExt.js
76 // BH 5/31/2015 5:53:04 PM Number.compareTo added
77 // BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1
78 // BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works  
79 // BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round
80 // BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string
81 // BH 8/14/2014 6:49:22 PM Character class efficiencies
82 // BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt()
83 // BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false 
84 // BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString
85 // BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; 
86 // BH 4/1/2014 7:51:46 AM removing java.lang.B00lean
87 // BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js
88 // BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING
89 // BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString()
90 // BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) 
91 // BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed!
92 // BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions
93 // BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean)
94 // BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz_" to "nativeClazz_"
95 // BH 10/19/2013 1:29:27 PM fixed String.$replace()
96 // BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error
97 // BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string"
98 // BH 10/10/2013 2:40:20 PM  added Math.log10   
99 // BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values
100 // BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes
101 // BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" 
102 // BH 3/2/2013 10:46:45 PM removed Double.valueOf(String)
103 // BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize
104 // BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix
105 // BH 11/1/2012 added Short
106 // BH 9/10/2012 6:27:21 AM added java.net.URL... classes
107 // BH 1/7/2013 7:40:06 AM added Clazz_dateToString
108
109 ;(function(Clazz) {
110
111 // moved here from package.js
112 // these classes will be created as objects prior to any others
113 // and are then available immediately
114
115         Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]);
116
117   var sJU = "java.util";
118
119   //var sJU = "JU";  
120         //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]);
121         //var javautil = JU;
122
123   var javautil = java.util;
124
125         Clazz._Loader.ignore([
126                 "net.sf.j2s.ajax.HttpRequest",
127                 sJU + ".MapEntry.Type",
128                 //"java.net.UnknownServiceException",
129                 "java.lang.Runtime",
130                 "java.security.AccessController",
131                 "java.security.PrivilegedExceptionAction",
132                 "java.io.File",
133                 "java.io.FileInputStream",
134                 "java.io.FileWriter",
135                 "java.io.OutputStreamWriter",
136 //              sJU + ".Calendar", // bypassed in ModelCollection
137 //              "java.text.SimpleDateFormat", // not used
138 //              "java.text.DateFormat", // not used
139                 sJU + ".concurrent.Executors"
140         ])
141
142 Math.rint = Math.round;
143
144 Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});
145
146 if(Clazz._supportsNativeObject){
147         // Number and Array are special -- do not override prototype.toString -- "length - 2" here
148         for(var i=0;i<Clazz._extendedObjectMethods.length - 2;i++){
149                 var p=Clazz._extendedObjectMethods[i];
150                 Array.prototype[p] = Clazz._O.prototype[p];
151                 Number.prototype[p] = Clazz._O.prototype[p];
152         }
153 }
154
155 java.lang.Number=Number;
156 Number.__CLASS_NAME__="Number";
157 Clazz_implementOf(Number,java.io.Serializable);
158 Number.equals=Clazz._innerFunctions.equals;
159 Number.getName=Clazz._innerFunctions.getName;
160 Number.prototype.compareTo = function(x) { var a = this.value, b = x.value; return (a < b ? -1 : a == b ? 0 : 1) };
161
162 Clazz_defineMethod(Number,"shortValue",
163 function(){
164 var x = Math.round(this)&0xffff;
165 return (this < 0 && x > 0 ? x - 0x10000 : x);
166 });
167
168 Clazz_defineMethod(Number,"byteValue",
169 function(){
170 var x = Math.round(this)&0xff;
171 return (this < 0 && x > 0 ? x - 0x100 : x);
172 });
173
174 Clazz_defineMethod(Number,"intValue",
175 function(){
176 return Math.round(this)&0xffffffff;
177 });
178
179 Clazz_defineMethod(Number,"longValue",
180 function(){
181 return Math.round(this);
182 });
183
184 Clazz_defineMethod(Number,"floatValue",
185 function(){
186 return this.valueOf();
187 });
188 Clazz_defineMethod(Number,"doubleValue",
189 function(){
190 return parseFloat(this.valueOf());
191 });
192
193 Clazz_overrideMethod(Number,"hashCode",
194 function(){
195 return this.valueOf();
196 });
197
198 java.lang.Integer=Integer=function(){
199 Clazz_instantialize(this,arguments);
200 };
201 Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true);
202 Integer.prototype.valueOf=function(){return 0;};
203 Integer.toString=Integer.prototype.toString=function(){
204 if(arguments.length!=0){
205 return""+arguments[0];
206 } else if(this===Integer){
207 return"class java.lang.Integer";
208 }
209 return""+this.valueOf();
210 };
211
212 /*
213
214 Clazz_makeConstructor(Integer,
215 function(){
216 this.valueOf=function(){
217 return 0;
218 };
219 });
220 */
221
222
223 Clazz_overrideConstructor(Integer, function(v){
224  v == null && (v = 0);
225  if (typeof v != "number")
226         v = Integer.parseIntRadix(v, 10);
227  this.valueOf=function(){return v;};
228 }); //BH
229 /*
230 Clazz_makeConstructor(Integer,
231 function(s){
232 var value=Integer.parseInt(s,10);
233 this.valueOf=function(){
234 return value;
235 };
236 },"String");
237 */
238 Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000;
239 Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff;
240 Integer.TYPE=Integer.prototype.TYPE=Integer;
241
242
243 Clazz_defineMethod(Integer,"bitCount",
244 function(i) {
245         i = i - ((i >>> 1) & 0x55555555);
246         i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
247         i = (i + (i >>> 4)) & 0x0f0f0f0f;
248         i = i + (i >>> 8);
249         i = i + (i >>> 16);
250         return i & 0x3f;
251 },"Number");
252 Integer.bitCount=Integer.prototype.bitCount;
253
254 Clazz_defineMethod(Integer,"numberOfLeadingZeros",
255 function(i) {
256  if (i == 0) return 32;
257  var n = 1;
258  if (i >>> 16 == 0) { n += 16; i <<= 16; }
259  if (i >>> 24 == 0) { n +=  8; i <<=  8; }
260  if (i >>> 28 == 0) { n +=  4; i <<=  4; }
261  if (i >>> 30 == 0) { n +=  2; i <<=  2; }
262  n -= i >>> 31;
263  return n;
264 },"Number");
265 Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;
266
267 Clazz_defineMethod(Integer,"numberOfTrailingZeros",
268 function(i) {
269         if (i == 0) return 32;
270         var n = 31;
271         var y = i <<16; if (y != 0) { n = n -16; i = y; }
272         y = i << 8; if (y != 0) { n = n - 8; i = y; }
273         y = i << 4; if (y != 0) { n = n - 4; i = y; }
274         y = i << 2; if (y != 0) { n = n - 2; i = y; }
275         return n - ((i << 1) >>> 31);
276 },"Number");
277 Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;
278
279 Clazz_defineMethod(Integer,"parseIntRadix",
280 function(s,radix){
281 if(s==null){
282 throw new NumberFormatException("null");
283 }if(radix<2){
284 throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX");
285 }if(radix>36){
286 throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX");
287 }
288 if (radix == 10) {
289         for (var i = s.length; --i >= 0;) {
290                 var c = s.charCodeAt(i);
291                 if (c >= 48 && c <= 57) continue;
292                 if (i > 0 || c != 43 && c != 45)
293                         throw new NumberFormatException("Not a Number : "+s);
294
295         }
296 }
297 var i=parseInt(s,radix);
298 if(isNaN(i)){
299 throw new NumberFormatException("Not a Number : "+s);
300 }
301 return i;
302 },"String, Number");
303 Integer.parseIntRadix=Integer.prototype.parseIntRadix;
304
305 Clazz_defineMethod(Integer,"parseInt",
306 function(s){
307 return Integer.parseIntRadix(s,10);
308 },"String");
309 Integer.parseInt=Integer.prototype.parseInt;
310
311 /*
312 Clazz_defineMethod(Integer,"$valueOf",
313 function(s){
314 return new Integer(Integer.parseIntRadix(s,10));
315 },"String");
316 */
317
318 Clazz_overrideMethod(Integer,"$valueOf",
319 function(s){
320 return new Integer(s);
321 });
322
323 /*
324 Clazz_defineMethod(Integer,"$valueOf",
325 function(s,r){
326 return new Integer(Integer.parseIntRadix(s,r));
327 },"String, Number");
328 */
329
330 Integer.$valueOf=Integer.prototype.$valueOf;
331
332
333 Clazz_overrideMethod(Integer,"equals",
334 function(s){
335 if(s==null||!Clazz_instanceOf(s,Integer)){
336 return false;
337 }
338 return s.valueOf()==this.valueOf();
339 },"Object");
340 Integer.toHexString=Integer.prototype.toHexString=function(d){
341 if(d.valueOf)d=d.valueOf();
342 if (d < 0) {
343 var b = d & 0xFFFFFF;
344 var c = ((d>>24)&0xFF);
345 return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6);
346 }
347 return d._numberToString(16);};
348 Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);};
349 Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);};
350
351 Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){
352 if (n.indexOf(".") >= 0)n = "";
353 var i = (n.startsWith("-") ? 1 : 0);
354 n = n.replace(/\#/, "0x").toLowerCase();
355 var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10);
356 // The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10.
357 // Number is strict, but Number("055") does not work, though ParseInt("055", 8) does.
358 // need to make sure negative numbers are negative
359 n = Number(n) & 0xFFFFFFFF;
360 return (radix == 8 ? parseInt(n, 8) : n);
361 },"~S");
362
363 Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){
364         n = Integer.decodeRaw(n);
365         if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE)
366         throw new NumberFormatException("Invalid Integer");
367         return new Integer(n);
368 },"~S");
369
370 Clazz_overrideMethod(Integer,"hashCode",
371 function(){
372 return this.valueOf();
373 });
374
375 // Note that Long is problematic in JavaScript 
376
377 java.lang.Long=Long=function(){
378 Clazz_instantialize(this,arguments);
379 };
380 Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true);
381 Long.prototype.valueOf=function(){return 0;};
382 Long.toString=Long.prototype.toString=function(){
383 if(arguments.length!=0){
384 return""+arguments[0];
385 }else if(this===Long){
386 return"class java.lang.Long";
387 }
388 return""+this.valueOf();
389 };
390
391 Clazz_overrideConstructor(Long, function(v){
392  v == null && (v = 0);
393  v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10));
394 this.valueOf=function(){return v;};
395 });
396
397 //Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000;
398 //Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff;
399 Long.TYPE=Long.prototype.TYPE=Long;
400
401 Clazz_defineMethod(Long,"parseLong",
402 function(s,radix){
403  return Integer.parseInt(s, radix || 10);
404 });
405
406 Long.parseLong=Long.prototype.parseLong;
407
408 Clazz_overrideMethod(Long,"$valueOf",
409 function(s){
410 return new Long(s);
411 });
412 /*
413 Clazz_defineMethod(Long,"$valueOf",
414 function(s){
415 return new Long(s);
416 },"Number");
417
418 Clazz_defineMethod(Long,"$valueOf",
419 function(s,r){
420 return new Long(Long.parseLong(s,r));
421 },"String, Number");
422 */
423 Long.$valueOf=Long.prototype.$valueOf;
424 Clazz_overrideMethod(Long,"equals",
425 function(s){
426 if(s==null||!Clazz_instanceOf(s,Long)){
427 return false;
428 }
429 return s.valueOf()==this.valueOf();
430 },"Object");
431 Long.toHexString=Long.prototype.toHexString=function(i){
432 return i.toString(16);
433 };
434 Long.toOctalString=Long.prototype.toOctalString=function(i){
435 return i.toString(8);
436 };
437 Long.toBinaryString=Long.prototype.toBinaryString=function(i){
438 return i.toString(2);
439 };
440
441
442 Long.decode=Clazz_defineMethod(Long,"decode",
443 function(n){
444         n = Integer.decodeRaw(n);
445         if (isNaN(n))
446                 throw new NumberFormatException("Invalid Long");
447         return new Long(n);
448 },"~S");
449
450 java.lang.Short = Short = function () {
451 Clazz_instantialize (this, arguments);
452 };
453 Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true);
454 Short.prototype.valueOf = function () { return 0; };
455 Short.toString = Short.prototype.toString = function () {
456         if (arguments.length != 0) {
457                 return "" + arguments[0];
458         } else if (this === Short) {
459                 return "class java.lang.Short"; // Short.class.toString
460         }
461         return "" + this.valueOf ();
462 };
463
464 Clazz_overrideConstructor(Short,
465 function (v) {
466  v == null && (v = 0);
467  if (typeof v != "number")
468         v = Integer.parseIntRadix(v, 10);
469  v = v.shortValue();
470  this.valueOf = function () {return v;};
471 });
472
473
474 Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768;
475 Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767;
476 Short.TYPE = Short.prototype.TYPE = Short;
477
478 Clazz_defineMethod(Short, "parseShortRadix",
479 function (s, radix) {
480 return Integer.parseIntRadix(s, radix).shortValue();
481 }, "String, Number");
482 Short.parseShortRadix = Short.prototype.parseShortRadix;
483
484 Clazz_defineMethod(Short, "parseShort",
485 function (s) {
486 return Short.parseShortRadix (s, 10);
487 }, "String");
488
489 Short.parseShort = Short.prototype.parseShort;
490
491 /*
492 Clazz_defineMethod(Short, "$valueOf",
493 function (s) {
494 return new Short(Short.parseShort (s, 10));
495 }, "String");
496         */
497
498 Clazz_overrideMethod(Short, "$valueOf",
499 function (s) {
500 return new Short(s);
501 });
502
503 /*
504 Clazz_defineMethod(Short, "$valueOf",
505 function (s, r) {
506 return new Short(Short.parseShort (s, r));
507 }, "String, Number");
508         */
509
510 Short.$valueOf = Short.prototype.$valueOf;
511 Clazz_overrideMethod(Short, "equals",
512 function (s) {
513 if(s == null || !Clazz_instanceOf(s, Short) ){
514         return false;
515 }
516 return s.valueOf()  == this.valueOf();
517 }, "Object");
518 Short.toHexString = Short.prototype.toHexString = function (i) {
519         return i.toString (16);
520 };
521 Short.toOctalString = Short.prototype.toOctalString = function (i) {
522         return i.toString (8);
523 };
524 Short.toBinaryString = Short.prototype.toBinaryString = function (i) {
525         return i.toString (2);
526 };
527 Short.decode = Clazz_defineMethod(Short, "decode",
528 function(n){
529         n = Integer.decodeRaw(n);
530         if (isNaN(n) || n < -32768|| n > 32767)
531                 throw new NumberFormatException("Invalid Short");
532         return new Short(n);
533 }, "~S");
534
535 java.lang.Byte=Byte=function(){
536 Clazz_instantialize(this,arguments);
537 };
538 Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true);
539 Byte.prototype.valueOf=function(){return 0;};
540 Byte.toString=Byte.prototype.toString=function(){
541 if(arguments.length!=0){
542 return""+arguments[0];
543 }else if(this===Byte){
544 return"class java.lang.Byte";
545 }
546 return""+this.valueOf();
547 };
548 Clazz_makeConstructor(Byte,
549 function(v){
550  if (typeof v != "number")
551          v = Integer.parseIntRadix(v, 10);
552  v = v.byteValue();
553 this.valueOf=function(){
554 return v;
555 };
556 });
557
558 Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828;
559 Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;
560 Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;
561 Byte.SIZE=Byte.prototype.SIZE=8;
562 Byte.TYPE=Byte.prototype.TYPE=Byte;
563
564 Clazz_defineMethod(Byte,"parseByteRadix",
565 function(s,radix){
566  return Integer.parseIntRadix(s, radix).byteValue();
567 },"String, Number");
568 Byte.parseByteRadix=Byte.prototype.parseByteRadix;
569
570 Clazz_defineMethod(Byte,"parseByte",
571 function(s){
572 return Byte.parseByte(s,10);
573 },"String");
574
575 Byte.parseByte=Byte.prototype.parseByte;
576
577 Clazz_overrideMethod(Byte, "$valueOf",
578 function (s) {
579 return new Byte(s);
580 });
581
582 Byte.$valueOf=Byte.prototype.$valueOf;
583 Clazz_overrideMethod(Byte,"equals",
584 function(s){
585 if(s==null||!Clazz_instanceOf(s,Byte)){
586 return false;
587 }
588 return s.valueOf()==this.valueOf();
589 },"Object");
590 Byte.toHexString=Byte.prototype.toHexString=function(i){
591 return i.toString(16);
592 };
593 Byte.toOctalString=Byte.prototype.toOctalString=function(i){
594 return i.toString(8);
595 };
596 Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){
597 return i.toString(2);
598 };
599 Byte.decode=Clazz_defineMethod(Byte,"decode",
600 function(n){
601         n = Integer.decodeRaw(n);
602         if (isNaN(n) || n < -128|| n > 127)
603                 throw new NumberFormatException("Invalid Byte");
604 return new Byte(n);
605 },"~S");
606
607 Clazz._floatToString = function(f) {
608  var s = ""+f
609  if (s.indexOf(".") < 0 && s.indexOf("e") < 0)
610          s += ".0";
611  return s;
612 }
613
614 java.lang.Float=Float=function(){
615 Clazz_instantialize(this,arguments);
616 };
617 Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true);
618 Float.prototype.valueOf=function(){return 0;};
619 Float.toString=Float.prototype.toString=function(){
620 if(arguments.length!=0){
621 return Clazz._floatToString(arguments[0]);
622 }else if(this===Float){
623 return"class java.lang.Float";
624 }
625 return Clazz._floatToString(this.valueOf());
626 };
627
628 Clazz_overrideConstructor(Float, function(v){
629  v == null && (v = 0);
630  if (typeof v != "number") 
631         v = Number(v);
632  this.valueOf=function(){return v;}
633 });
634
635 Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028;
636 Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38;
637 Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45;
638 Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
639 Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
640 Float.NaN=Number.NaN;
641 Float.TYPE=Float.prototype.TYPE=Float;
642
643 Clazz_defineMethod(Float,"parseFloat",
644 function(s){
645 if(s==null){
646 throw new NumberFormatException("null");
647 }
648 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
649 var floatVal=Number(s);
650 if(isNaN(floatVal)){
651 throw new NumberFormatException("Not a Number : "+s);
652 }
653 return floatVal;
654 },"String");
655 Float.parseFloat=Float.prototype.parseFloat;
656
657 Clazz_overrideMethod(Float,"$valueOf",
658 function(s){
659 return new Float(s);
660 });
661
662 Float.$valueOf=Float.prototype.$valueOf;
663
664 Clazz_defineMethod(Float,"isNaN",
665 function(num){
666 return isNaN(num);
667 },"Number");
668 Float.isNaN=Float.prototype.isNaN;
669 Clazz_defineMethod(Float,"isInfinite",
670 function(num){
671 return!isFinite(num);
672 },"Number");
673 Float.isInfinite=Float.prototype.isInfinite;
674
675 Clazz_overrideMethod(Float,"equals",
676 function(s){
677 if(s==null||!Clazz_instanceOf(s,Float)){
678 return false;
679 }
680 return s.valueOf()==this.valueOf();
681 },"Object");
682
683 java.lang.Double=Double=function(){
684 Clazz_instantialize(this,arguments);
685 };
686 Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true);
687 Double.prototype.valueOf=function(){return 0;};
688 Double.toString=Double.prototype.toString=function(){
689 if(arguments.length!=0){
690 return Clazz._floatToString(arguments[0]);
691 }else if(this===Double){
692 return"class java.lang.Double";
693 }
694 return Clazz._floatToString(this.valueOf());
695 };
696
697 Clazz_overrideConstructor(Double, function(v){
698  v == null && (v = 0);
699  if (typeof v != "number") 
700         v = Double.parseDouble(v);
701  this.valueOf=function(){return v;};
702 }); // BH
703
704 Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468;
705 Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324;
706 Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308;
707 Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
708 Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
709 Double.NaN=Number.NaN;
710 Double.TYPE=Double.prototype.TYPE=Double;
711
712 Clazz_defineMethod(Double,"isNaN",
713 function(num){
714 return isNaN(num);
715 },"Number");
716 Double.isNaN=Double.prototype.isNaN;
717 Clazz_defineMethod(Double,"isInfinite",
718 function(num){
719 return!isFinite(num);
720 },"Number");
721 Double.isInfinite=Double.prototype.isInfinite;
722
723 Clazz_defineMethod(Double,"parseDouble",
724 function(s){
725 if(s==null){
726 throw new NumberFormatException("null");
727 }
728 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
729 var doubleVal=Number(s);
730 if(isNaN(doubleVal)){
731 throw new NumberFormatException("Not a Number : "+s);
732 }
733 return doubleVal;
734 },"String");
735 Double.parseDouble=Double.prototype.parseDouble;
736
737 /*
738 Clazz_defineMethod(Double,"$valueOf",
739 function(s){
740 return new Double(this.parseDouble(s));
741 },"String");
742 */
743
744 Clazz_defineMethod(Double,"$valueOf",
745 function(v){
746 return new Double(v);
747 },"Number");
748
749 Double.$valueOf=Double.prototype.$valueOf;
750
751 Clazz_overrideMethod(Double,"equals",
752 function(s){
753 if(s==null||!Clazz_instanceOf(s,Double)){
754 return false;
755 }
756 return s.valueOf()==this.valueOf();
757 },"Object");
758
759
760 //java.lang.B00lean = Boolean; ?? BH why this?
761 Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);};
762 if (Clazz._supportsNativeObject) {
763         for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) {
764                 var p = Clazz._extendedObjectMethods[i];
765                 Boolean.prototype[p] = Clazz._O.prototype[p];
766         }
767 }
768 Boolean.__CLASS_NAME__="Boolean";
769 Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]);
770 Boolean.equals=Clazz._innerFunctions.equals;
771 Boolean.getName=Clazz._innerFunctions.getName;
772 Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530;
773
774 //Clazz_makeConstructor(Boolean,
775 //function(value){
776 //this.valueOf=function(){
777 //return value;
778 //};
779 //},"~B");
780
781 Clazz_overrideConstructor(Boolean,
782 function(s){
783         var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false);
784         this.valueOf=function(){return b;};
785 },"~O");
786
787 Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean",
788 function(s){
789 return Boolean.toBoolean(s);
790 },"~S");
791 Clazz_defineMethod(Boolean,"booleanValue",
792 function(){
793 return this.valueOf();
794 });
795 Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf",
796 function(b){
797 return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE);
798 });
799
800 /*
801 Boolean.toString=Clazz_defineMethod(Boolean,"toString",
802 function(b){
803 return b?"true":"false";
804 },"~B");
805 */
806
807 Clazz_overrideMethod(Boolean,"toString",
808 function(){
809 return this.valueOf()?"true":"false";
810 });
811 Clazz_overrideMethod(Boolean,"hashCode",
812 function(){
813 return this.valueOf()?1231:1237;
814 });
815 Clazz_overrideMethod(Boolean,"equals",
816 function(obj){
817 if(Clazz_instanceOf(obj,Boolean)){
818 return this.booleanValue()==obj.booleanValue();
819 }return false;
820 },"~O");
821 Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean",
822 function(name){
823 var result=false;
824 try{
825 result=Boolean.toBoolean(System.getProperty(name));
826 }catch(e){
827 if(Clazz_instanceOf(e,IllegalArgumentException)){
828 }else if(Clazz_instanceOf(e,NullPointerException)){
829 }else{
830 throw e;
831 }
832 }
833 return result;
834 },"~S");
835 Clazz_overrideMethod(Boolean,"compareTo",
836 function(b){
837 return(b.value==this.value?0:(this.value?1:-1));
838 },"Boolean");
839 Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean",
840 ($fz=function(name){
841 return((name!=null)&&name.equalsIgnoreCase("true"));
842 },$fz.isPrivate=true,$fz),"~S");
843 Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true);
844 Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false);
845 Boolean.TYPE=Boolean.prototype.TYPE=Boolean;
846
847
848 Clazz._Encoding=new Object();
849
850 (function(Encoding) {
851
852 Encoding.UTF8="utf-8";
853 Encoding.UTF16="utf-16";
854 Encoding.ASCII="ascii";
855
856
857 Encoding.guessEncoding=function(str){
858 if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){
859 return Encoding.UTF8;
860 }else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){
861 return Encoding.UTF16;
862 }else{
863 return Encoding.ASCII;
864 }
865 };
866
867 Encoding.readUTF8=function(str){
868 var encoding=this.guessEncoding(str);
869 var startIdx=0;
870 if(encoding==Encoding.UTF8){
871 startIdx=3;
872 }else if(encoding==Encoding.UTF16){
873 startIdx=2;
874 }
875 var arrs=new Array();
876 for(var i=startIdx;i<str.length;i++){
877 var charCode=str.charCodeAt(i);
878 if(charCode<0x80){
879 arrs[arrs.length]=str.charAt(i);
880 }else if(charCode>0xc0&&charCode<0xe0){
881 var c1=charCode&0x1f;
882 i++;
883 var c2=str.charCodeAt(i)&0x3f;
884 var c=(c1<<6)+c2;
885 arrs[arrs.length]=String.fromCharCode(c);
886 }else if(charCode>=0xe0){
887 var c1=charCode&0x0f;
888 i++;
889 var c2=str.charCodeAt(i)&0x3f;
890 i++;
891 var c3=str.charCodeAt(i)&0x3f;
892 var c=(c1<<12)+(c2<<6)+c3;
893 arrs[arrs.length]=String.fromCharCode(c);
894 }
895 }
896 return arrs.join('');
897 };
898
899 Encoding.convert2UTF8=function(str){
900 var encoding=this.guessEncoding(str);
901 var startIdx=0;
902 if(encoding==Encoding.UTF8){
903 return str;
904 }else if(encoding==Encoding.UTF16){
905 startIdx=2;
906 }
907
908 var offset=0;
909 var arrs=new Array(offset+str.length-startIdx);
910
911 for(var i=startIdx;i<str.length;i++){
912 var charCode=str.charCodeAt(i);
913 if(charCode<0x80){
914 arrs[offset+i-startIdx]=str.charAt(i);
915 }else if(charCode<=0x07ff){
916 var c1=0xc0+((charCode&0x07c0)>>6);
917 var c2=0x80+(charCode&0x003f);
918 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2);
919 }else{
920 var c1=0xe0+((charCode&0xf000)>>12);
921 var c2=0x80+((charCode&0x0fc0)>>6);
922 var c3=0x80+(charCode&0x003f);
923 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3);
924 }
925 }
926 return arrs.join('');
927 };
928 Encoding.base64Chars=new Array(
929 'A','B','C','D','E','F','G','H',
930 'I','J','K','L','M','N','O','P',
931 'Q','R','S','T','U','V','W','X',
932 'Y','Z','a','b','c','d','e','f',
933 'g','h','i','j','k','l','m','n',
934 'o','p','q','r','s','t','u','v',
935 'w','x','y','z','0','1','2','3',
936 '4','5','6','7','8','9','+','/'
937 );
938 Encoding.encodeBase64=function(str){
939 if(str==null||str.length==0)return str;
940 var b64=Encoding.base64Chars;
941 var length=str.length;
942 var index=0;
943 var buf=[];
944 var c0,c1,c2;
945 while(index<length){
946 c0=str.charCodeAt(index++);
947 buf[buf.length]=b64[c0>>2];
948 if(index<length){
949 c1=str.charCodeAt(index++);
950 buf[buf.length]=b64[((c0<<4)&0x30)|(c1>>4)];
951 if(index<length){
952 c2=str.charCodeAt(index++);
953 buf[buf.length]=b64[((c1<<2)&0x3c)|(c2>>6)];
954 buf[buf.length]=b64[c2&0x3F];
955 }else{
956 buf[buf.length]=b64[((c1<<2)&0x3c)];
957 buf[buf.length]='=';
958 }
959 }else{
960 buf[buf.length]=b64[(c0<<4)&0x30];
961 buf[buf.length]='=';
962 buf[buf.length]='=';
963 }
964 }
965 return buf.join('');
966 };
967 Encoding.decodeBase64=function(str){
968 if(str==null||str.length==0)return str;
969 var b64=Encoding.base64Chars;
970 var xb64=Encoding.xBase64Chars;
971 if(Encoding.xBase64Chars==null){
972 xb64=new Object();
973 for(var i=0;i<b64.length;i++){
974 xb64[b64[i]]=i;
975 }
976 Encoding.xBase64Chars=xb64;
977 }
978 var length=str.length;
979 var index=0;
980 var buf=[];
981 var c0,c1,c2,c3;
982 var c=0;
983 while(index<length&&c++<60000){
984 c0=xb64[str.charAt(index++)];
985 c1=xb64[str.charAt(index++)];
986 c2=xb64[str.charAt(index++)];
987 c3=xb64[str.charAt(index++)];
988 buf[buf.length]=String.fromCharCode(((c0<<2)&0xff)|c1>>4);
989 if(c2!=null){
990 buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2);
991 if(c3!=null){
992 buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3);
993 }
994 }
995 }
996 return buf.join('');
997 };
998
999 if(String.prototype.$replace==null){
1000 java.lang.String=String;
1001 if(Clazz._supportsNativeObject){
1002 for(var i=0;i<Clazz._extendedObjectMethods.length;i++){
1003 var p=Clazz._extendedObjectMethods[i];
1004 if("to$tring"==p||"toString"==p||"equals"==p||"hashCode"==p){
1005 continue;
1006 }
1007 String.prototype[p]=Clazz._O.prototype[p];
1008 }
1009 }
1010
1011 Clazz_implementOf(String,[java.io.Serializable,CharSequence,Comparable]);
1012
1013 String.getName=Clazz._innerFunctions.getName;
1014
1015 String.serialVersionUID=String.prototype.serialVersionUID=-6849794470754667710;
1016
1017
1018 ;(function(sp) {
1019
1020 sp.$replace=function(c1,c2){
1021         if (c1 == c2 || this.indexOf (c1) < 0) return "" + this;
1022         if (c1.length == 1) {
1023                 if ("\\$.*+|?^{}()[]".indexOf(c1) >= 0)         c1 = "\\" + c1;
1024         } else {    
1025                 c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;});
1026         }
1027         return this.replace(new RegExp(c1,"gm"),c2);
1028 };
1029 sp.$generateExpFunction=function(str){
1030 var arr=[];
1031 var orders=[];
1032 var idx=0;
1033 arr[0]="";
1034 var i=0;
1035 for(;i<str.length;i++){
1036 var ch=str.charAt(i);
1037 if(i!=str.length-1&&ch=='\\'){
1038 i++;
1039 var c=str.charAt(i);
1040 if(c=='\\'){
1041 arr[idx]+='\\';
1042 }
1043 arr[idx]+=c;
1044 }else if(i!=str.length-1&&ch=='$'){
1045 i++;
1046 orders[idx]=parseInt(str.charAt(i));
1047 idx++;
1048 arr[idx]="";
1049 }else if(ch=='\r'){
1050 arr[idx]+="\\r";
1051 }else if(ch=='\n'){
1052 arr[idx]+="\\n";
1053 }else if(ch=='\t'){
1054 arr[idx]+="\\t";
1055 }else if(ch=='\"'){
1056 arr[idx]+="\\\"";
1057 }else{
1058 arr[idx]+=ch;
1059 }
1060 }
1061 var funStr="f = function (";
1062 var max=Math.max.apply({},orders);
1063 for(i=0;i<=max;i++){
1064 funStr+="$"+i;
1065 if(i!=max){
1066 funStr+=", ";
1067 }
1068 }
1069 funStr+=") { return ";
1070 for(i=0;i<arr.length-1;i++){
1071 funStr+="\""+arr[i]+"\" + $"+orders[i]+" + ";
1072 }
1073 funStr+="\""+arr[i]+"\"; }";
1074 var f=null;
1075 eval(funStr)
1076 return f;
1077 };
1078
1079 sp.replaceAll=function(exp,str){
1080 var regExp=new RegExp(exp,"gm");
1081 return this.replace(regExp,this.$generateExpFunction(str));
1082 };
1083 sp.replaceFirst=function(exp,str){
1084 var regExp=new RegExp(exp,"m");
1085 return this.replace(regExp,this.$generateExpFunction(str));
1086 };
1087 sp.matches=function(exp){
1088 if(exp!=null){
1089 exp="^("+exp+")$";
1090 }
1091 var regExp=new RegExp(exp,"gm");
1092 var m=this.match(regExp);
1093 return m!=null&&m.length!=0;
1094 };
1095 sp.regionMatches=function(ignoreCase,toffset,
1096 other,ooffset,len){
1097
1098 if(typeof ignoreCase=="number"
1099 ||(ignoreCase!=true&&ignoreCase!=false)){
1100 len=ooffset;
1101 ooffset=other;
1102 other=toffset;
1103 toffset=ignoreCase;
1104 ignoreCase=false;
1105 }
1106 var to=toffset;
1107 var po=ooffset;
1108
1109 if((ooffset<0)||(toffset<0)||(toffset>this.length-len)||
1110 (ooffset>other.length-len)){
1111 return false;
1112 }
1113 var s1=this.substring(toffset,toffset+len);
1114 var s2=other.substring(ooffset,ooffset+len);
1115 if(ignoreCase){
1116 s1=s1.toLowerCase();
1117 s2=s2.toLowerCase();
1118 }
1119 return s1==s2;
1120 };
1121
1122
1123
1124 sp.$plit=function(regex,limit){
1125 if (!limit && regex == " ")
1126         return this.split(regex);
1127
1128 if(limit!=null&&limit>0){
1129 if(limit==1){
1130 return this;
1131 }
1132 var regExp=new RegExp("("+regex+")","gm");
1133 var count=1;
1134 var s=this.replace(regExp,function($0,$1){
1135 count++;
1136 if(count==limit){
1137 return"@@_@@";
1138 }else if(count>limit){
1139 return $0;
1140 }else{
1141 return $0;
1142 }
1143 });
1144 regExp=new RegExp(regex,"gm");
1145 var arr=this.split(regExp);
1146 if(arr.length>limit){
1147 arr[limit-1]=s.substring(s.indexOf("@@_@@")+5);
1148 arr.length=limit;
1149 }
1150 return arr;
1151 }else{
1152 var regExp=new RegExp(regex,"gm");
1153 return this.split(regExp);
1154 }
1155 };
1156 /*
1157 sp.trim=function(){
1158 var len=this.length;
1159 var st=0;
1160
1161 while((st<len)&&(this.charAt(st)<=' ')){
1162 st++;
1163 }
1164 while((st<len)&&(this.charAt(len-1)<=' ')){
1165 len--;
1166 }
1167 return((st>0)||(len<len))?this.substring(st,len):this;
1168 };
1169
1170
1171 */
1172
1173 if (!sp.trim)
1174 sp.trim=function(){
1175 return this.replace(/^\s+/g,'').replace(/\s+$/g,'');
1176 };
1177
1178 if (!sp.startsWith || !sp.endsWith) {
1179 var sn=function(s, prefix,toffset){
1180 var to=toffset;
1181 var po=0;
1182 var pc=prefix.length;
1183
1184 if((toffset<0)||(toffset>s.length-pc)){
1185 return false;
1186 }
1187 while(--pc>=0){
1188 if(s.charAt(to++)!=prefix.charAt(po++)){
1189 return false;
1190 }
1191 }
1192 return true;
1193 };
1194
1195 sp.startsWith=function(prefix){
1196 if(arguments.length==1){
1197 return sn(this,arguments[0],0);
1198 }else if(arguments.length==2){
1199 return sn(this,arguments[0],arguments[1]);
1200 }else{
1201 return false;
1202 }
1203 };
1204
1205 sp.endsWith=function(suffix){
1206 return sn(this, suffix,this.length-suffix.length);
1207 };
1208
1209 }
1210
1211 sp.equals=function(anObject){
1212 return this.valueOf()==anObject;
1213 };
1214
1215 sp.equalsIgnoreCase=function(anotherString){
1216 return(anotherString==null)?false:(this==anotherString
1217 ||this.toLowerCase()==anotherString.toLowerCase());
1218 };
1219
1220
1221 sp.hash=0;
1222
1223 sp.hashCode=function(){
1224 var h=this.hash;
1225 if(h==0){
1226 var off=0;
1227 var len=this.length;
1228 for(var i=0;i<len;i++){
1229 h=31*h+this.charCodeAt(off++);
1230 h&=0xffffffff;
1231 }
1232 this.hash=h;
1233 }
1234 return h;
1235 };
1236
1237 sp.getBytes=function(){
1238 if(arguments.length==4){
1239 return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);
1240 }
1241 var s=this;
1242 if(arguments.length==1){
1243 var cs=arguments[0].toString().toLowerCase();
1244 var charset=[
1245 "utf-8","UTF8","us-ascii","iso-8859-1","8859_1","gb2312","gb18030","gbk"
1246 ];
1247 var existed=false;
1248 for(var i=0;i<charset.length;i++){
1249 if(charset[i]==cs){
1250 existed=true;
1251 break;
1252 }
1253 }
1254 if(!existed){
1255 throw new java.io.UnsupportedEncodingException();
1256 }
1257 if(cs=="utf-8"||cs=="utf8"){
1258 s=Encoding.convert2UTF8(this);
1259 }
1260 }
1261 var arrs=new Array(s.length);
1262 var c=0,ii=0;
1263 for(var i=0;i<s.length;i++){
1264 c=s.charCodeAt(i);
1265 if(c>255){
1266 arrs[ii]=0x1a;
1267 arrs[ii+1]=c&0xff;
1268 arrs[ii+2]=(c&0xff00)>>8;
1269 ii+=2;
1270 }else{
1271 arrs[ii]=c;
1272 }
1273 ii++;
1274 }
1275 return arrs;
1276 };
1277
1278 /*
1279 sp.compareTo=function(anotherString){
1280 if(anotherString==null){
1281 throw new java.lang.NullPointerException();
1282 }
1283 var len1=this.length;
1284 var len2=anotherString.length;
1285 var n=Math.min(len1,len2);
1286 var k=0;
1287 while(k<n){
1288 var c1=this.charCodeAt(k);
1289 var c2=anotherString.charCodeAt(k);
1290 if(c1!=c2){
1291 return c1-c2;
1292 }
1293 k++;
1294 }
1295 return len1-len2;
1296 };
1297
1298 */
1299
1300 sp.contains = function(a) {return this.indexOf(a) >= 0}  // bh added
1301 sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added
1302
1303
1304
1305 sp.toCharArray=function(){
1306 var result=new Array(this.length);
1307 for(var i=0;i<this.length;i++){
1308 result[i]=this.charAt(i);
1309 }
1310 return result;
1311 };
1312 String.value0f=String.valueOf;
1313 String.valueOf=function(o){
1314 if(o=="undefined"){
1315 return String.value0f();
1316 }
1317 if(o instanceof Array){
1318 if(arguments.length==1){
1319 return o.join('');
1320 }else{
1321 var off=arguments[1];
1322 var len=arguments[2];
1323 var oo=new Array(len);
1324 for(var i=0;i<len;i++){
1325 oo[i]=o[off+i];
1326 }
1327 return oo.join('');
1328 }
1329 }
1330 return""+o;
1331 };
1332
1333 sp.subSequence=function(beginIndex,endIndex){
1334 return this.substring(beginIndex,endIndex);
1335 };
1336
1337 sp.compareToIgnoreCase=function(str){
1338 if(str==null){
1339 throw new NullPointerException();
1340 }
1341 var s1=this.toUpperCase();
1342 var s2=str.toUpperCase();
1343 if(s1==s2){
1344 return 0;
1345 }else{
1346 var s1=this.toLowerCase();
1347 var s2=str.toLowerCase();
1348 if(s1==s2){
1349 return 0;
1350 }else if(s1>s2){
1351 return 1;
1352 }else{
1353 return-1;
1354 }
1355 }
1356 };
1357
1358 sp.contentEquals=function(sb){
1359 if(this.length!=sb.length()){
1360 return false;
1361 }
1362 var v=sb.getValue();
1363 var i=0;
1364 var j=0;
1365 var n=this.length;
1366 while(n--!=0){
1367 if(this.charCodeAt(i++)!=v[j++]){
1368 return false;
1369 }
1370 }
1371 return true;
1372 };
1373
1374 sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){
1375 if(srcBegin<0){
1376 throw new StringIndexOutOfBoundsException(srcBegin);
1377 }
1378 if(srcEnd>this.length){
1379 throw new StringIndexOutOfBoundsException(srcEnd);
1380 }
1381 if(srcBegin>srcEnd){
1382 throw new StringIndexOutOfBoundsException(srcEnd-srcBegin);
1383 }
1384 if(dst==null){
1385 throw new NullPointerException();
1386 }
1387 for(var i=0;i<srcEnd-srcBegin;i++){
1388 dst[dstBegin+i]=this.charAt(srcBegin+i);
1389 }
1390 };
1391 sp.$concat=sp.concat;
1392 sp.concat=function(s){
1393 if(s==null){
1394 throw new NullPointerException();
1395 }
1396 return this.$concat(s);
1397 };
1398
1399 sp.$lastIndexOf=sp.lastIndexOf;
1400 sp.lastIndexOf=function(s,last){
1401 if(last!=null&&last+this.length<=0){
1402 return-1;
1403 }
1404 if(last!=null){
1405 return this.$lastIndexOf(s,last);
1406 }else{
1407 return this.$lastIndexOf(s);
1408 }
1409 };
1410
1411 sp.intern=function(){
1412 return this.valueOf();
1413 };
1414 String.copyValueOf=sp.copyValueOf=function(){
1415 if(arguments.length==1){
1416 return String.instantialize(arguments[0]);
1417 }else{
1418 return String.instantialize(arguments[0],arguments[1],arguments[2]);
1419 }
1420 };
1421
1422 sp.codePointAt || (sp.codePointAt = sp.charCodeAt); // Firefox only
1423
1424
1425 })(String.prototype);
1426
1427 /*
1428
1429 String.indexOf=function(source,sourceOffset,sourceCount,
1430 target,targetOffset,targetCount,fromIndex){
1431 if(fromIndex>=sourceCount){
1432 return(targetCount==0?sourceCount:-1);
1433 }
1434 if(fromIndex<0){
1435 fromIndex=0;
1436 }
1437 if(targetCount==0){
1438 return fromIndex;
1439 }
1440
1441 var first=target[targetOffset];
1442 var i=sourceOffset+fromIndex;
1443 var max=sourceOffset+(sourceCount-targetCount);
1444
1445 startSearchForFirstChar:
1446 while(true){
1447
1448 while(i<=max&&source[i]!=first){
1449 i++;
1450 }
1451 if(i>max){
1452 return-1;
1453 }
1454
1455
1456 var j=i+1;
1457 var end=j+targetCount-1;
1458 var k=targetOffset+1;
1459 while(j<end){
1460 if(source[j++]!=target[k++]){
1461 i++;
1462
1463 continue startSearchForFirstChar;
1464 }
1465 }
1466 return i-sourceOffset;
1467 }
1468 };
1469
1470
1471
1472 String.instantialize=function(){
1473 if(arguments.length==0){
1474 return new String();
1475 }else if(arguments.length==1){
1476 var x=arguments[0];
1477 if(typeof x=="string"||x instanceof String){
1478 return new String(x);
1479 }else if(x instanceof Array){
1480 if(x.length>0&&typeof x[0]=="number"){
1481 var arr=new Array(x.length);
1482 for(var i=0;i<x.length;i++){
1483 arr[i]=String.fromCharCode(x[i]&0xff);
1484 }
1485 return Encoding.readUTF8(arr.join(''));
1486 }
1487 return x.join('');
1488 }else if(x.__CLASS_NAME__=="StringBuffer"
1489 ||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1490 var value=x.shareValue();
1491 var length=x.length();
1492 var valueCopy=new Array(length);
1493 for(var i=0;i<length;i++){
1494 valueCopy[i]=value[i];
1495 }
1496 return valueCopy.join('')
1497
1498 }else{
1499 return""+x;
1500 }
1501 }else if(arguments.length==2){
1502 var x=arguments[0];
1503 var hibyte=arguments[1];
1504 if(typeof hibyte=="string"){
1505 return String.instantialize(x,0,x.length,hibyte);
1506 }else{
1507 return String.instantialize(x,hibyte,0,x.length);
1508 }
1509 }else if(arguments.length==3){
1510 var bytes=arguments[0];
1511 var offset=arguments[1];
1512 var length=arguments[2];
1513 if(arguments[2]instanceof Array){
1514 bytes=arguments[2];
1515 offset=arguments[0];
1516 length=arguments[1];
1517 }
1518 var arr=new Array(length);
1519 if(offset<0||length+offset>bytes.length){
1520 throw new IndexOutOfBoundsException();
1521 }
1522 if(length>0){
1523 var isChar=(bytes[offset].length!=null);
1524 if(isChar){
1525 for(var i=0;i<length;i++){
1526 arr[i]=bytes[offset+i];
1527 }
1528 }else{
1529 for(var i=0;i<length;i++){
1530 arr[i]=String.fromCharCode(bytes[offset+i]);
1531 }
1532 }
1533 }
1534 return arr.join('');
1535 }else if(arguments.length==4){
1536 var bytes=arguments[0];
1537 var y=arguments[3];
1538 if(typeof y=="string"||y instanceof String){
1539 var offset=arguments[1];
1540 var length=arguments[2];
1541 var arr=new Array(length);
1542 for(var i=0;i<length;i++){
1543 arr[i]=bytes[offset+i];
1544 if(typeof arr[i]=="number"){
1545 arr[i]=String.fromCharCode(arr[i]&0xff);
1546 }
1547 }
1548 var cs=y.toLowerCase();
1549 if(cs=="utf-8"||cs=="utf8"){
1550 return Encoding.readUTF8(arr.join(''));
1551 }else{
1552 return arr.join('');
1553 }
1554 }else{
1555 var count=arguments[3];
1556 var offset=arguments[2];
1557 var hibyte=arguments[1];
1558 var value=new Array(count);
1559 if(hibyte==0){
1560 for(var i=count;i-->0;){
1561 value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1562 }
1563 }else{
1564 hibyte<<=8;
1565 for(var i=count;i-->0;){
1566 value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1567 }
1568 }
1569 return value.join('');
1570 }
1571 }else{
1572 var s="";
1573 for(var i=0;i<arguments.length;i++){
1574 s+=arguments[i];
1575 }
1576 return s;
1577 }
1578 };
1579
1580
1581 */
1582
1583
1584 String.instantialize=function(){
1585 switch (arguments.length) {
1586 case 0:
1587         return new String();
1588 case 1:
1589         var x=arguments[0];
1590         if(typeof x=="string"||x instanceof String){
1591                 return new String(x);
1592         }
1593         if(x instanceof Array || x instanceof Int32Array){
1594                 if(x.length == 0)
1595                         return "";
1596                 if(typeof x[0]!="number")
1597                         return x.join('');
1598                 var arr=new Array(x.length);
1599                 for(var i=0;i<x.length;i++)
1600                         arr[i]=String.fromCharCode(x[i]&0xff);
1601                 return Encoding.readUTF8(arr.join(''));
1602         }
1603         if(x.__CLASS_NAME__=="StringBuffer"||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1604                 var value=x.shareValue();
1605                 var length=x.length();
1606                 var valueCopy=new Array(length);
1607                 for(var i=0;i<length;i++){
1608                         valueCopy[i]=value[i];
1609                 }
1610                 return valueCopy.join('')
1611         }
1612         return""+x;
1613 case 2: 
1614         var x=arguments[0];
1615         var hibyte=arguments[1];
1616         if(typeof hibyte=="string"){
1617                 return String.instantialize(x,0,x.length,hibyte);
1618         }
1619         return String.instantialize(x,hibyte,0,x.length);
1620 case 3:
1621         var bytes=arguments[0];
1622         var offset=arguments[1];
1623         var length=arguments[2];
1624         if(arguments[2]instanceof Array){
1625                 bytes=arguments[2];
1626                 offset=arguments[0];
1627                 length=arguments[1];
1628         }
1629         var arr=new Array(length);
1630         if(offset<0||length+offset>bytes.length){
1631                 throw new IndexOutOfBoundsException();
1632         }
1633         if(length>0){
1634                 var isChar=(bytes[offset].length!=null);
1635                 if(isChar){
1636                         for(var i=0;i<length;i++){
1637                                 arr[i]=bytes[offset+i];
1638                         }
1639                 }else{
1640                         for(var i=0;i<length;i++){
1641                                 arr[i]=String.fromCharCode(bytes[offset+i]);
1642                         }
1643                 }
1644         }
1645         return arr.join('');
1646 case 4:
1647         var bytes=arguments[0];
1648         var y=arguments[3];
1649         if(typeof y=="string"||y instanceof String){
1650                 var offset=arguments[1];
1651                 var length=arguments[2];
1652                 var arr=new Array(length);
1653                 for(var i=0;i<length;i++){
1654                         arr[i]=bytes[offset+i];
1655                         if(typeof arr[i]=="number"){
1656                                 arr[i]=String.fromCharCode(arr[i]&0xff);
1657                         }
1658                 }
1659                 var cs=y.toLowerCase();
1660                 if(cs=="utf-8"||cs=="utf8"){
1661                         return Encoding.readUTF8(arr.join(''));
1662                 }
1663                 return arr.join('');
1664         }
1665         var count=arguments[3];
1666         var offset=arguments[2];
1667         var hibyte=arguments[1];
1668         var value=new Array(count);
1669         if(hibyte==0){
1670                 for(var i=count;i-->0;){
1671                         value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1672                 }
1673         }else{
1674                 hibyte<<=8;
1675                 for(var i=count;i-->0;){
1676                         value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1677                 }
1678         }
1679         return value.join('');
1680 default:
1681         var s="";
1682         for(var i=0;i<arguments.length;i++){
1683                 s+=arguments[i];
1684         }
1685         return s;
1686 }
1687 };
1688
1689 if(navigator.userAgent.toLowerCase().indexOf("chrome")!=-1){
1690         String.prototype.toString=function(){return this.valueOf();};
1691 }
1692
1693 }
1694
1695 })(Clazz._Encoding);
1696
1697
1698
1699 c$=Clazz_decorateAsClass(function(){
1700 this.value=0;
1701 Clazz_instantialize(this,arguments);
1702 },java.lang,"Character",null,[java.io.Serializable,Comparable]);
1703 Clazz_makeConstructor(c$,
1704 function(value){
1705 this.value=value;
1706 },"~N");
1707 Clazz_defineMethod(c$,"charValue",
1708 function(){
1709 return this.value;
1710 });
1711 Clazz_overrideMethod(c$,"hashCode",
1712 function(){
1713 return(this.value).charCodeAt(0);
1714 });
1715 Clazz_overrideMethod(c$,"equals",
1716 function(obj){
1717 if(Clazz_instanceOf(obj,Character)){
1718 return(this.value).charCodeAt(0)==((obj).charValue()).charCodeAt(0);
1719 }return false;
1720 },"~O");
1721 Clazz_overrideMethod(c$,"compareTo",
1722 function(c){
1723 return(this.value).charCodeAt(0)-(c.value).charCodeAt(0);
1724 },"Character");
1725 c$.toLowerCase=Clazz_defineMethod(c$,"toLowerCase",
1726 function(c){
1727 return(""+c).toLowerCase().charAt(0);
1728 },"~N");
1729 c$.toUpperCase=Clazz_defineMethod(c$,"toUpperCase",
1730 function(c){
1731 return(""+c).toUpperCase().charAt(0);
1732 },"~N");
1733 c$.isDigit=Clazz_defineMethod(c$,"isDigit",
1734 function(c){
1735 c = c.charCodeAt(0);
1736 return (48 <= c && c <= 57);
1737 },"~N");
1738 c$.isUpperCase=Clazz_defineMethod(c$,"isUpperCase",
1739 function(c){
1740 c = c.charCodeAt(0);
1741 return (65 <= c && c <= 90);
1742 },"~N");
1743 c$.isLowerCase=Clazz_defineMethod(c$,"isLowerCase",
1744 function(c){
1745 c = c.charCodeAt(0);
1746 return (97 <= c && c <= 122);
1747 },"~N");
1748 c$.isWhitespace=Clazz_defineMethod(c$,"isWhitespace",
1749 function(c){
1750 c = (c).charCodeAt(0);
1751 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680
1752         || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000));
1753 },"~N");
1754 c$.isLetter=Clazz_defineMethod(c$,"isLetter",
1755 function(c){
1756 c = c.charCodeAt(0);
1757 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
1758 },"~N");
1759 c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit",
1760 function(c){
1761 c = c.charCodeAt(0);
1762 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
1763 },"~N");
1764 c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar",
1765 function(c){
1766  var i = c.charCodeAt(0);
1767 if(i==0x20||i==0xa0||i==0x1680)return true;
1768 if(i<0x2000)return false;
1769 return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000;
1770 },"~N");
1771 c$.digit=Clazz_defineMethod(c$,"digit",
1772 function(c,radix){
1773 var i = c.charCodeAt(0);
1774 if(radix >= 2 && radix <= 36){
1775         if(i < 128){
1776                 var result = -1;
1777                 if(48 <= i && i <= 57){
1778                 result = i - 48;
1779                 }else if(97 <= i && i <= 122){
1780                 result = i - 87;
1781                 }else if(65 <= i && i <= 90){
1782                 result=i-(55);
1783                 }
1784                 return (result < radix ? result : -1);
1785         }
1786 }
1787 return -1;
1788 },"~N,~N");
1789 Clazz_overrideMethod(c$,"toString",
1790 function(){
1791 var buf=[this.value];
1792 return String.valueOf(buf);
1793 });
1794 c$.toString=Clazz_overrideMethod(c$,"toString",
1795 function(c){
1796 {
1797 if(this===Character){
1798 return"class java.lang.Character";
1799 }
1800 }return String.valueOf(c);
1801 },"~N");
1802 Clazz_defineStatics(c$,
1803 "MIN_VALUE",'\u0000',
1804 "MAX_VALUE",'\uffff',
1805 "MIN_RADIX",2,
1806 "MAX_RADIX",36,
1807 "TYPE",null);
1808
1809 java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character;
1810
1811
1812
1813 Clazz._ArrayWrapper = function(a, type) {
1814  return {
1815    a: a,
1816    __CLASS_NAME__:"Array",
1817    superClazz: Array,
1818    getComponentType: function() {return type},
1819    instanceOf: function(o) { return  Clazz_instanceOf(type, o) },
1820    getName: function() { return this.__CLASS_NAME__ }
1821  };
1822 }
1823 c$=Clazz_declareType(java.lang.reflect,"Array");
1824 c$.newInstance=Clazz_defineMethod(c$,"newInstance",
1825 function(componentType,size){
1826 var a = Clazz_newArray(size);
1827  a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);};
1828 return a;
1829 },"Class,~N");
1830
1831 javautil.Date=Date;
1832 Date.TYPE="javautil.Date";
1833 Date.__CLASS_NAME__="Date";
1834 Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]);
1835
1836 Clazz_defineMethod(javautil.Date,"clone",
1837 function(){
1838 return new Date(this.getTime());
1839 });
1840
1841 Clazz_defineMethod(javautil.Date,"before",
1842 function(when){
1843 return this.getTime()<when.getTime();
1844 },"javautil.Date");
1845 Clazz_defineMethod(javautil.Date,"after",
1846 function(when){
1847 return this.getTime()>when.getTime();
1848 },"javautil.Date");
1849 Clazz_defineMethod(javautil.Date,"equals",
1850 function(obj){
1851 return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime();
1852 },"Object");
1853 Clazz_defineMethod(javautil.Date,"compareTo",
1854 function(anotherDate){
1855 var thisTime=this.getTime();
1856 var anotherTime=anotherDate.getTime();
1857 return(thisTime<anotherTime?-1:(thisTime==anotherTime?0:1));
1858 },"javautil.Date");
1859 Clazz_defineMethod(javautil.Date,"compareTo",
1860 function(o){
1861 return this.compareTo(o);
1862 },"Object");
1863 Clazz_overrideMethod(javautil.Date,"hashCode",
1864 function(){
1865 var ht=this.getTime();
1866 return parseInt(ht)^parseInt((ht>>32));
1867 });
1868
1869 c$=Clazz_decorateAsClass(function(){
1870 this.source=null;
1871 Clazz_instantialize(this,arguments);
1872 },javautil,"EventObject",null,java.io.Serializable);
1873 Clazz_makeConstructor(c$,
1874 function(source){
1875 if(source!=null)this.source=source;
1876 else throw new IllegalArgumentException();
1877 },"~O");
1878 Clazz_defineMethod(c$,"getSource",
1879 function(){
1880 return this.source;
1881 });
1882 Clazz_overrideMethod(c$,"toString",
1883 function(){
1884 return this.getClass().getName()+"[source="+String.valueOf(this.source)+']';
1885 });
1886 Clazz_declareInterface(javautil,"EventListener");
1887
1888 c$=Clazz_decorateAsClass(function(){
1889 this.listener=null;
1890 Clazz_instantialize(this,arguments);
1891 },javautil,"EventListenerProxy",null,javautil.EventListener);
1892 Clazz_makeConstructor(c$,
1893 function(listener){
1894 this.listener=listener;
1895 },"javautil.EventListener");
1896 Clazz_defineMethod(c$,"getListener",
1897 function(){
1898 return this.listener;
1899 });
1900 Clazz_declareInterface(javautil,"Iterator");
1901
1902 Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator);
1903 Clazz_declareInterface(javautil,"Enumeration");
1904 Clazz_declareInterface(javautil,"Collection",Iterable);
1905
1906 Clazz_declareInterface(javautil,"Set",javautil.Collection);
1907 Clazz_declareInterface(javautil,"Map");
1908 Clazz_declareInterface(javautil.Map,"Entry");
1909
1910 Clazz_declareInterface(javautil,"List",javautil.Collection);
1911
1912 Clazz_declareInterface(javautil,"Queue",javautil.Collection);
1913 Clazz_declareInterface(javautil,"RandomAccess");
1914 c$=Clazz_decorateAsClass(function(){
1915 this.detailMessage=null;
1916 this.cause=null;
1917 this.stackTrace=null;
1918 Clazz_instantialize(this,arguments);
1919 },java.lang,"Throwable",null,java.io.Serializable);
1920 Clazz_prepareFields(c$,function(){
1921 this.cause=this;
1922 //alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller)
1923 });
1924 Clazz_makeConstructor(c$,
1925 function(){
1926 this.fillInStackTrace();
1927 });
1928 Clazz_makeConstructor(c$,
1929 function(message){
1930 this.fillInStackTrace();
1931 this.detailMessage=message;
1932 },"~S");
1933 Clazz_makeConstructor(c$,
1934 function(message,cause){
1935 this.fillInStackTrace();
1936 this.detailMessage=message;
1937 this.cause=cause;
1938 },"~S,Throwable");
1939 Clazz_makeConstructor(c$,
1940 function(cause){
1941 this.fillInStackTrace();
1942 this.detailMessage=(cause==null?null:cause.toString());
1943 this.cause=cause;
1944 },"Throwable");
1945 Clazz_defineMethod(c$,"getMessage",
1946 function(){
1947 return (this.message || this.detailMessage || this.toString());
1948 });
1949 Clazz_defineMethod(c$,"getLocalizedMessage",
1950 function(){
1951 return this.getMessage();
1952 });
1953 Clazz_defineMethod(c$,"getCause",
1954 function(){
1955 return(this.cause===this?null:this.cause);
1956 });
1957 Clazz_defineMethod(c$,"initCause",
1958 function(cause){
1959 if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");
1960 if(cause===this)throw new IllegalArgumentException("Self-causation not permitted");
1961 this.cause=cause;
1962 return this;
1963 },"Throwable");
1964 Clazz_overrideMethod(c$,"toString",
1965 function(){
1966 var s=this.getClass().getName();
1967 var message=this.message || this.detailMessage;
1968 return(message ? s+": "+message : s);
1969 });
1970 Clazz_defineMethod(c$,"printStackTrace",
1971 function(){
1972 System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace());
1973 });
1974
1975 Clazz_defineMethod(c$,"getStackTrace",
1976 function(){
1977 var s = "" + this + "\n";
1978 for(var i=0;i<this.stackTrace.length;i++){
1979  var t=this.stackTrace[i];
1980         var x=t.methodName.indexOf("(");
1981         var n=t.methodName.substring(0,x).replace(/\s+/g,"");
1982         if(n!="construct"||t.nativeClazz==null
1983                  ||Clazz_getInheritedLevel(t.nativeClazz,Throwable)<0){
1984                                 s += t + "\n";
1985         }
1986 }
1987 return s;
1988 });
1989
1990
1991 Clazz_defineMethod(c$,"printStackTrace",
1992 function(s){
1993 this.printStackTrace();
1994 },"java.io.PrintStream");
1995 Clazz_defineMethod(c$,"printStackTrace",
1996 function(s){
1997 this.printStackTrace();
1998 },"java.io.PrintWriter");
1999 Clazz_defineMethod(c$,"fillInStackTrace",
2000 function(){
2001 this.stackTrace=new Array();
2002 var caller=arguments.callee.caller;
2003 var superCaller=null;
2004 var callerList=new Array();
2005 var index=Clazz._callingStackTraces.length-1;
2006 var noLooping=true;
2007 while(index>-1||caller!=null){
2008 var clazzName=null;
2009 var nativeClass=null;
2010 if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){
2011 if(index<0){
2012 break;
2013 }
2014 noLooping=true;
2015 superCaller=Clazz._callingStackTraces[index].caller;
2016 nativeClass=Clazz._callingStackTraces[index].owner;
2017 index--;
2018 }else{
2019 superCaller=caller;
2020 if(superCaller.claxxOwner!=null){
2021 nativeClass=superCaller.claxxOwner;
2022 }else if(superCaller.exClazz!=null){
2023 nativeClass=superCaller.exClazz;
2024 }
2025 }
2026 var st=new StackTraceElement(
2027 ((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)?
2028 nativeClass.__CLASS_NAME__:"anonymous"),
2029 ((superCaller.exName==null)?"anonymous":superCaller.exName)
2030 +" ("+Clazz_getParamsType(superCaller.arguments)+")",
2031 null,-1);
2032 st.nativeClazz=nativeClass;
2033 this.stackTrace[this.stackTrace.length]=st;
2034 for(var i=0;i<callerList.length;i++){
2035 if(callerList[i]==superCaller){
2036
2037 var st=new StackTraceElement("lost","missing",null,-3);
2038 st.nativeClazz=null;
2039 this.stackTrace[this.stackTrace.length]=st;
2040 noLooping=false;
2041
2042 }
2043 }
2044 if(superCaller!=null){
2045 callerList[callerList.length]=superCaller;
2046 }
2047 caller=superCaller.arguments.callee.caller;
2048 }
2049 Clazz._initializingException=false;
2050 return this;
2051 });
2052 Clazz_defineMethod(c$,"setStackTrace",
2053 function(stackTrace){
2054 var defensiveCopy=stackTrace.clone();
2055 for(var i=0;i<defensiveCopy.length;i++)if(defensiveCopy[i]==null)throw new NullPointerException("stackTrace["+i+"]");
2056
2057 this.stackTrace=defensiveCopy;
2058 },"~A");
2059
2060 c$=Clazz_decorateAsClass(function(){
2061 this.declaringClass=null;
2062 this.methodName=null;
2063 this.fileName=null;
2064 this.lineNumber=0;
2065 Clazz_instantialize(this,arguments);
2066 },java.lang,"StackTraceElement",null,java.io.Serializable);
2067 Clazz_makeConstructor(c$,
2068 function(cls,method,file,line){
2069 if(cls==null||method==null){
2070 throw new NullPointerException();
2071 }this.declaringClass=cls;
2072 this.methodName=method;
2073 this.fileName=file;
2074 this.lineNumber=line;
2075 },"~S,~S,~S,~N");
2076 Clazz_overrideMethod(c$,"equals",
2077 function(obj){
2078 if(!(Clazz_instanceOf(obj,StackTraceElement))){
2079 return false;
2080 }var castObj=obj;
2081 if((this.methodName==null)||(castObj.methodName==null)){
2082 return false;
2083 }if(!this.getMethodName().equals(castObj.getMethodName())){
2084 return false;
2085 }if(!this.getClassName().equals(castObj.getClassName())){
2086 return false;
2087 }var localFileName=this.getFileName();
2088 if(localFileName==null){
2089 if(castObj.getFileName()!=null){
2090 return false;
2091 }}else{
2092 if(!localFileName.equals(castObj.getFileName())){
2093 return false;
2094 }}if(this.getLineNumber()!=castObj.getLineNumber()){
2095 return false;
2096 }return true;
2097 },"~O");
2098 Clazz_defineMethod(c$,"getClassName",
2099 function(){
2100 return(this.declaringClass==null)?"<unknown class>":this.declaringClass;
2101 });
2102 Clazz_defineMethod(c$,"getFileName",
2103 function(){
2104 return this.fileName;
2105 });
2106 Clazz_defineMethod(c$,"getLineNumber",
2107 function(){
2108 return this.lineNumber;
2109 });
2110 Clazz_defineMethod(c$,"getMethodName",
2111 function(){
2112 return(this.methodName==null)?"<unknown method>":this.methodName;
2113 });
2114 Clazz_overrideMethod(c$,"hashCode",
2115 function(){
2116 if(this.methodName==null){
2117 return 0;
2118 }return this.methodName.hashCode()^this.declaringClass.hashCode();
2119 });
2120 Clazz_defineMethod(c$,"isNativeMethod",
2121 function(){
2122 return this.lineNumber==-2;
2123 });
2124 Clazz_overrideMethod(c$,"toString",
2125 function(){
2126 var buf=new StringBuilder(80);
2127 buf.append(this.getClassName());
2128 buf.append('.');
2129 buf.append(this.getMethodName());
2130 if(this.isNativeMethod()){
2131 buf.append("(Native Method)");
2132 }else{
2133 var fName=this.getFileName();
2134 if(fName==null){
2135 buf.append("(Unknown Source)");
2136 }else{
2137 var lineNum=this.getLineNumber();
2138 buf.append('(');
2139 buf.append(fName);
2140 if(lineNum>=0){
2141 buf.append(':');
2142 buf.append(lineNum);
2143 }buf.append(')');
2144 }}return buf.toString();
2145 });
2146 TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())});
2147 c$=Clazz_declareType(java.lang,"Error",Throwable);
2148
2149 c$=Clazz_declareType(java.lang,"LinkageError",Error);
2150
2151 c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError);
2152
2153 c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError);
2154
2155 c$=Clazz_declareType(java.lang,"AssertionError",Error);
2156 Clazz_makeConstructor(c$,
2157 function(detailMessage){
2158 Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]);
2159 },"~O");
2160 Clazz_makeConstructor(c$,
2161 function(detailMessage){
2162 this.construct("" + detailMessage);
2163 },"~B");
2164 Clazz_makeConstructor(c$,
2165 function(detailMessage){
2166 this.construct("" + detailMessage);
2167 },"~N");
2168
2169 c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError);
2170
2171 c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError);
2172
2173 c$=Clazz_decorateAsClass(function(){
2174 this.exception=null;
2175 Clazz_instantialize(this,arguments);
2176 },java.lang,"ExceptionInInitializerError",LinkageError);
2177 Clazz_makeConstructor(c$,
2178 function(){
2179 Clazz_superConstructor(this,ExceptionInInitializerError);
2180 this.initCause(null);
2181 });
2182 Clazz_makeConstructor(c$,
2183 function(detailMessage){
2184 Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]);
2185 this.initCause(null);
2186 },"~S");
2187 Clazz_makeConstructor(c$,
2188 function(exception){
2189 Clazz_superConstructor(this,ExceptionInInitializerError);
2190 this.exception=exception;
2191 this.initCause(exception);
2192 },"Throwable");
2193 Clazz_defineMethod(c$,"getException",
2194 function(){
2195 return this.exception;
2196 });
2197 Clazz_overrideMethod(c$,"getCause",
2198 function(){
2199 return this.exception;
2200 });
2201
2202 c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError);
2203
2204 c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError);
2205
2206 c$=Clazz_declareType(java.lang,"VirtualMachineError",Error);
2207
2208 c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError);
2209
2210 c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError);
2211
2212 c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);
2213
2214 c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);
2215
2216 c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError);
2217
2218 c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError);
2219
2220 c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError);
2221
2222 c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError);
2223
2224 c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError);
2225
2226 c$=Clazz_declareType(java.lang,"VerifyError",LinkageError);
2227
2228 c$=Clazz_declareType(java.lang,"ThreadDeath",Error);
2229 Clazz_makeConstructor(c$,
2230 function(){
2231 Clazz_superConstructor(this,ThreadDeath,[]);
2232 });
2233
2234 c$=Clazz_declareType(java.lang,"Exception",Throwable);
2235
2236 c$=Clazz_declareType(java.lang,"RuntimeException",Exception);
2237
2238 c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException);
2239
2240 c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException);
2241
2242 c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);
2243 Clazz_makeConstructor(c$,
2244 function(index){
2245 Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]);
2246 },"~N");
2247
2248 c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException);
2249
2250 c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException);
2251
2252 c$=Clazz_decorateAsClass(function(){
2253 this.ex=null;
2254 Clazz_instantialize(this,arguments);
2255 },java.lang,"ClassNotFoundException",Exception);
2256 Clazz_makeConstructor(c$,
2257 function(){
2258 Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]);
2259 });
2260 Clazz_makeConstructor(c$,
2261 function(detailMessage){
2262 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]);
2263 },"~S");
2264 Clazz_makeConstructor(c$,
2265 function(detailMessage,exception){
2266 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]);
2267 this.ex=exception;
2268 },"~S,Throwable");
2269 Clazz_defineMethod(c$,"getException",
2270 function(){
2271 return this.ex;
2272 });
2273 Clazz_overrideMethod(c$,"getCause",
2274 function(){
2275 return this.ex;
2276 });
2277
2278 c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception);
2279
2280 c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception);
2281
2282 c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException);
2283 Clazz_makeConstructor(c$,
2284 function(cause){
2285 Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]);
2286 },"Throwable");
2287
2288 c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException);
2289
2290 c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException);
2291 Clazz_makeConstructor(c$,
2292 function(cause){
2293 Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]);
2294 },"Throwable");
2295
2296 c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException);
2297
2298 c$=Clazz_declareType(java.lang,"InstantiationException",Exception);
2299
2300 c$=Clazz_declareType(java.lang,"InterruptedException",Exception);
2301
2302 c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException);
2303
2304 c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception);
2305
2306 c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception);
2307
2308 c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException);
2309
2310 c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException);
2311
2312 c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException);
2313 Clazz_makeConstructor(c$,
2314 function(cause){
2315 Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]);
2316 },"Throwable");
2317
2318 c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);
2319 Clazz_makeConstructor(c$,
2320 function(index){
2321 Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]);
2322 },"~N");
2323
2324 c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException);
2325 Clazz_makeConstructor(c$,
2326 function(){
2327 Clazz_superConstructor(this,UnsupportedOperationException,[]);
2328 });
2329 Clazz_makeConstructor(c$,
2330 function(cause){
2331 Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]);
2332 },"Throwable");
2333
2334 c$=Clazz_decorateAsClass(function(){
2335 this.target=null;
2336 Clazz_instantialize(this,arguments);
2337 },java.lang.reflect,"InvocationTargetException",Exception);
2338 Clazz_makeConstructor(c$,
2339 function(){
2340 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]);
2341 });
2342 Clazz_makeConstructor(c$,
2343 function(exception){
2344 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]);
2345 this.target=exception;
2346 },"Throwable");
2347 Clazz_makeConstructor(c$,
2348 function(exception,detailMessage){
2349 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]);
2350 this.target=exception;
2351 },"Throwable,~S");
2352 Clazz_defineMethod(c$,"getTargetException",
2353 function(){
2354 return this.target;
2355 });
2356 Clazz_overrideMethod(c$,"getCause",
2357 function(){
2358 return this.target;
2359 });
2360
2361 c$=Clazz_decorateAsClass(function(){
2362 this.undeclaredThrowable=null;
2363 Clazz_instantialize(this,arguments);
2364 },java.lang.reflect,"UndeclaredThrowableException",RuntimeException);
2365 Clazz_makeConstructor(c$,
2366 function(exception){
2367 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException);
2368 this.undeclaredThrowable=exception;
2369 this.initCause(exception);
2370 },"Throwable");
2371 Clazz_makeConstructor(c$,
2372 function(exception,detailMessage){
2373 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]);
2374 this.undeclaredThrowable=exception;
2375 this.initCause(exception);
2376 },"Throwable,~S");
2377 Clazz_defineMethod(c$,"getUndeclaredThrowable",
2378 function(){
2379 return this.undeclaredThrowable;
2380 });
2381 Clazz_overrideMethod(c$,"getCause",
2382 function(){
2383 return this.undeclaredThrowable;
2384 });
2385
2386 c$=Clazz_declareType(java.io,"IOException",Exception);
2387
2388
2389 c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException);
2390
2391 c$=Clazz_declareType(java.io,"EOFException",java.io.IOException);
2392
2393 c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException);
2394
2395 c$=Clazz_decorateAsClass(function(){
2396 this.bytesTransferred=0;
2397 Clazz_instantialize(this,arguments);
2398 },java.io,"InterruptedIOException",java.io.IOException);
2399
2400 c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException);
2401
2402 c$=Clazz_decorateAsClass(function(){
2403 this.classname=null;
2404 Clazz_instantialize(this,arguments);
2405 },java.io,"InvalidClassException",java.io.ObjectStreamException);
2406 Clazz_makeConstructor(c$,
2407 function(className,detailMessage){
2408 Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]);
2409 this.classname=className;
2410 },"~S,~S");
2411 Clazz_defineMethod(c$,"getMessage",
2412 function(){
2413 var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]);
2414 if(this.classname!=null){
2415 msg=this.classname+';' + ' '+msg;
2416 }return msg;
2417 });
2418
2419 c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException);
2420
2421 c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException);
2422
2423 c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException);
2424
2425 c$=Clazz_decorateAsClass(function(){
2426 this.eof=false;
2427 this.length=0;
2428 Clazz_instantialize(this,arguments);
2429 },java.io,"OptionalDataException",java.io.ObjectStreamException);
2430
2431 c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException);
2432
2433 c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException);
2434
2435 c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException);
2436
2437 c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException);
2438
2439 c$=Clazz_decorateAsClass(function(){
2440 this.detail=null;
2441 Clazz_instantialize(this,arguments);
2442 },java.io,"WriteAbortedException",java.io.ObjectStreamException);
2443 Clazz_makeConstructor(c$,
2444 function(detailMessage,rootCause){
2445 Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]);
2446 this.detail=rootCause;
2447 this.initCause(rootCause);
2448 },"~S,Exception");
2449 Clazz_defineMethod(c$,"getMessage",
2450 function(){
2451 var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]);
2452 return (this.detail ? msg + "; "+this.detail.toString() : msg);
2453 });
2454 Clazz_overrideMethod(c$,"getCause",
2455 function(){
2456 return this.detail;
2457 });
2458
2459 c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException);
2460 Clazz_makeConstructor(c$,
2461 function(){
2462 Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]);
2463 });
2464
2465 c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException);
2466
2467 c$=Clazz_decorateAsClass(function(){
2468 this.className=null;
2469 this.key=null;
2470 Clazz_instantialize(this,arguments);
2471 },javautil,"MissingResourceException",RuntimeException);
2472 Clazz_makeConstructor(c$,
2473 function(detailMessage,className,resourceName){
2474 Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]);
2475 this.className=className;
2476 this.key=resourceName;
2477 },"~S,~S,~S");
2478 Clazz_defineMethod(c$,"getClassName",
2479 function(){
2480 return this.className;
2481 });
2482 Clazz_defineMethod(c$,"getKey",
2483 function(){
2484 return this.key;
2485 });
2486
2487 c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException);
2488
2489 c$=Clazz_declareType(javautil,"TooManyListenersException",Exception);
2490
2491 c$=Clazz_declareType(java.lang,"Void");
2492 Clazz_defineStatics(c$,
2493 "TYPE",null);
2494 {
2495 java.lang.Void.TYPE=java.lang.Void;
2496 }Clazz_declareInterface(java.lang.reflect,"GenericDeclaration");
2497 Clazz_declareInterface(java.lang.reflect,"AnnotatedElement");
2498
2499 c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);
2500 Clazz_makeConstructor(c$,
2501 function(){
2502 });
2503 Clazz_defineMethod(c$,"isAccessible",
2504 function(){
2505 return false;
2506 });
2507 c$.setAccessible=Clazz_defineMethod(c$,"setAccessible",
2508 function(objects,flag){
2509 return;
2510 },"~A,~B");
2511 Clazz_defineMethod(c$,"setAccessible",
2512 function(flag){
2513 return;
2514 },"~B");
2515 Clazz_overrideMethod(c$,"isAnnotationPresent",
2516 function(annotationType){
2517 return false;
2518 },"Class");
2519 Clazz_overrideMethod(c$,"getDeclaredAnnotations",
2520 function(){
2521 return new Array(0);
2522 });
2523 Clazz_overrideMethod(c$,"getAnnotations",
2524 function(){
2525 return new Array(0);
2526 });
2527 Clazz_overrideMethod(c$,"getAnnotation",
2528 function(annotationType){
2529 return null;
2530 },"Class");
2531 c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments",
2532 function(parameterTypes,args){
2533 return null;
2534 },"~A,~A");
2535 Clazz_defineMethod(c$,"invokeV",
2536 function(receiver,args){
2537 return;
2538 },"~O,~A");
2539 Clazz_defineMethod(c$,"invokeL",
2540 function(receiver,args){
2541 return null;
2542 },"~O,~A");
2543 Clazz_defineMethod(c$,"invokeI",
2544 function(receiver,args){
2545 return 0;
2546 },"~O,~A");
2547 Clazz_defineMethod(c$,"invokeJ",
2548 function(receiver,args){
2549 return 0;
2550 },"~O,~A");
2551 Clazz_defineMethod(c$,"invokeF",
2552 function(receiver,args){
2553 return 0.0;
2554 },"~O,~A");
2555 Clazz_defineMethod(c$,"invokeD",
2556 function(receiver,args){
2557 return 0.0;
2558 },"~O,~A");
2559 c$.emptyArgs=c$.prototype.emptyArgs=new Array(0);
2560 Clazz_declareInterface(java.lang.reflect,"InvocationHandler");
2561 c$=Clazz_declareInterface(java.lang.reflect,"Member");
2562 Clazz_defineStatics(c$,
2563 "PUBLIC",0,
2564 "DECLARED",1);
2565
2566 c$=Clazz_declareType(java.lang.reflect,"Modifier");
2567 Clazz_makeConstructor(c$,
2568 function(){
2569 });
2570 c$.isAbstract=Clazz_defineMethod(c$,"isAbstract",
2571 function(modifiers){
2572 return((modifiers&1024)!=0);
2573 },"~N");
2574 c$.isFinal=Clazz_defineMethod(c$,"isFinal",
2575 function(modifiers){
2576 return((modifiers&16)!=0);
2577 },"~N");
2578 c$.isInterface=Clazz_defineMethod(c$,"isInterface",
2579 function(modifiers){
2580 return((modifiers&512)!=0);
2581 },"~N");
2582 c$.isNative=Clazz_defineMethod(c$,"isNative",
2583 function(modifiers){
2584 return((modifiers&256)!=0);
2585 },"~N");
2586 c$.isPrivate=Clazz_defineMethod(c$,"isPrivate",
2587 function(modifiers){
2588 return((modifiers&2)!=0);
2589 },"~N");
2590 c$.isProtected=Clazz_defineMethod(c$,"isProtected",
2591 function(modifiers){
2592 return((modifiers&4)!=0);
2593 },"~N");
2594 c$.isPublic=Clazz_defineMethod(c$,"isPublic",
2595 function(modifiers){
2596 return((modifiers&1)!=0);
2597 },"~N");
2598 c$.isStatic=Clazz_defineMethod(c$,"isStatic",
2599 function(modifiers){
2600 return((modifiers&8)!=0);
2601 },"~N");
2602 c$.isStrict=Clazz_defineMethod(c$,"isStrict",
2603 function(modifiers){
2604 return((modifiers&2048)!=0);
2605 },"~N");
2606 c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized",
2607 function(modifiers){
2608 return((modifiers&32)!=0);
2609 },"~N");
2610 c$.isTransient=Clazz_defineMethod(c$,"isTransient",
2611 function(modifiers){
2612 return((modifiers&128)!=0);
2613 },"~N");
2614 c$.isVolatile=Clazz_defineMethod(c$,"isVolatile",
2615 function(modifiers){
2616 return((modifiers&64)!=0);
2617 },"~N");
2618 c$.toString=Clazz_defineMethod(c$,"toString",
2619 function(modifiers){
2620 var sb=new Array(0);
2621 if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public";
2622 if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected";
2623 if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private";
2624 if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract";
2625 if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static";
2626 if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final";
2627 if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient";
2628 if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile";
2629 if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized";
2630 if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native";
2631 if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp";
2632 if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface";
2633 if(sb.length>0){
2634 return sb.join(" ");
2635 }return"";
2636 },"~N");
2637 Clazz_defineStatics(c$,
2638 "PUBLIC",0x1,
2639 "PRIVATE",0x2,
2640 "PROTECTED",0x4,
2641 "STATIC",0x8,
2642 "FINAL",0x10,
2643 "SYNCHRONIZED",0x20,
2644 "VOLATILE",0x40,
2645 "TRANSIENT",0x80,
2646 "NATIVE",0x100,
2647 "INTERFACE",0x200,
2648 "ABSTRACT",0x400,
2649 "STRICT",0x800,
2650 "BRIDGE",0x40,
2651 "VARARGS",0x80,
2652 "SYNTHETIC",0x1000,
2653 "ANNOTATION",0x2000,
2654 "ENUM",0x4000);
2655
2656 c$=Clazz_decorateAsClass(function(){
2657 this.clazz=null;
2658 this.parameterTypes=null;
2659 this.exceptionTypes=null;
2660 this.modifiers=0;
2661 Clazz_instantialize(this,arguments);
2662 },java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2663 Clazz_makeConstructor(c$,
2664 function(declaringClass,parameterTypes,checkedExceptions,modifiers){
2665 Clazz_superConstructor(this,java.lang.reflect.Constructor,[]);
2666 this.clazz=declaringClass;
2667 this.parameterTypes=parameterTypes;
2668 this.exceptionTypes=checkedExceptions;
2669 this.modifiers=modifiers;
2670 },"Class,~A,~A,~N");
2671 Clazz_overrideMethod(c$,"getTypeParameters",
2672 function(){
2673 return null;
2674 });
2675 Clazz_defineMethod(c$,"toGenericString",
2676 function(){
2677 return null;
2678 });
2679 Clazz_defineMethod(c$,"getGenericParameterTypes",
2680 function(){
2681 return null;
2682 });
2683 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2684 function(){
2685 return null;
2686 });
2687 Clazz_defineMethod(c$,"getParameterAnnotations",
2688 function(){
2689 return null;
2690 });
2691 Clazz_defineMethod(c$,"isVarArgs",
2692 function(){
2693 return false;
2694 });
2695 Clazz_overrideMethod(c$,"isSynthetic",
2696 function(){
2697 return false;
2698 });
2699 Clazz_overrideMethod(c$,"equals",
2700 function(object){
2701 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){
2702 var other=object;
2703 if(this.getDeclaringClass()===other.getDeclaringClass()){
2704 var params1=this.parameterTypes;
2705 var params2=other.parameterTypes;
2706 if(params1.length==params2.length){
2707 for(var i=0;i<params1.length;i++){
2708 if(params1[i]!==params2[i])return false;
2709 }
2710 return true;
2711 }}}return false;
2712 },"~O");
2713 Clazz_overrideMethod(c$,"getDeclaringClass",
2714 function(){
2715 return this.clazz;
2716 });
2717 Clazz_defineMethod(c$,"getExceptionTypes",
2718 function(){
2719 return this.exceptionTypes;
2720 });
2721 Clazz_overrideMethod(c$,"getModifiers",
2722 function(){
2723 return this.modifiers;
2724 });
2725 Clazz_overrideMethod(c$,"getName",
2726 function(){
2727 return this.getDeclaringClass().getName();
2728 });
2729 Clazz_defineMethod(c$,"getParameterTypes",
2730 function(){
2731 return this.parameterTypes;
2732 });
2733 Clazz_overrideMethod(c$,"hashCode",
2734 function(){
2735 return this.getDeclaringClass().getName().hashCode();
2736 });
2737 Clazz_defineMethod(c$,"newInstance",
2738 function(args){
2739 var instance=new this.clazz(Clazz_inheritArgs);
2740 Clazz_instantialize(instance,args);
2741 return instance;
2742 },"~A");
2743 Clazz_overrideMethod(c$,"toString",
2744 function(){
2745 return null;
2746 });
2747
2748 c$=Clazz_declareType(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);
2749 Clazz_overrideMethod(c$,"isSynthetic",
2750 function(){
2751 return false;
2752 });
2753 Clazz_defineMethod(c$,"toGenericString",
2754 function(){
2755 return null;
2756 });
2757 Clazz_defineMethod(c$,"isEnumConstant",
2758 function(){
2759 return false;
2760 });
2761 Clazz_defineMethod(c$,"getGenericType",
2762 function(){
2763 return null;
2764 });
2765 Clazz_overrideMethod(c$,"equals",
2766 function(object){
2767 return false;
2768 },"~O");
2769 Clazz_overrideMethod(c$,"getDeclaringClass",
2770 function(){
2771 return null;
2772 });
2773 Clazz_overrideMethod(c$,"getName",
2774 function(){
2775 return null;
2776 });
2777 Clazz_defineMethod(c$,"getType",
2778 function(){
2779 return null;
2780 });
2781 Clazz_overrideMethod(c$,"hashCode",
2782 function(){
2783 return 0;
2784 });
2785 Clazz_overrideMethod(c$,"toString",
2786 function(){
2787 return null;
2788 });
2789
2790 c$=Clazz_decorateAsClass(function(){
2791 this.clazz=null;
2792 this.name=null;
2793 this.returnType=null;
2794 this.parameterTypes=null;
2795 this.exceptionTypes=null;
2796 this.modifiers=0;
2797 Clazz_instantialize(this,arguments);
2798 },java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2799 Clazz_makeConstructor(c$,
2800 function(declaringClass,name,parameterTypes,returnType,checkedExceptions,modifiers){
2801 Clazz_superConstructor(this,java.lang.reflect.Method,[]);
2802 this.clazz=declaringClass;
2803 this.name=name;
2804 this.parameterTypes=parameterTypes;
2805 this.returnType=returnType;
2806 this.exceptionTypes=checkedExceptions;
2807 this.modifiers=modifiers;
2808 },"Class,~S,~A,Class,~A,~N");
2809 Clazz_overrideMethod(c$,"getTypeParameters",
2810 function(){
2811 return null;
2812 });
2813 Clazz_defineMethod(c$,"toGenericString",
2814 function(){
2815 return null;
2816 });
2817 Clazz_defineMethod(c$,"getGenericParameterTypes",
2818 function(){
2819 return null;
2820 });
2821 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2822 function(){
2823 return null;
2824 });
2825 Clazz_defineMethod(c$,"getGenericReturnType",
2826 function(){
2827 return null;
2828 });
2829 Clazz_defineMethod(c$,"getParameterAnnotations",
2830 function(){
2831 return null;
2832 });
2833 Clazz_defineMethod(c$,"isVarArgs",
2834 function(){
2835 return false;
2836 });
2837 Clazz_defineMethod(c$,"isBridge",
2838 function(){
2839 return false;
2840 });
2841 Clazz_overrideMethod(c$,"isSynthetic",
2842 function(){
2843 return false;
2844 });
2845 Clazz_defineMethod(c$,"getDefaultValue",
2846 function(){
2847 return null;
2848 });
2849 Clazz_overrideMethod(c$,"equals",
2850 function(object){
2851 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Method)){
2852 var other=object;
2853 if((this.getDeclaringClass()===other.getDeclaringClass())&&(this.getName()===other.getName())){
2854 var params1=this.parameterTypes;
2855 var params2=other.parameterTypes;
2856 if(params1.length==params2.length){
2857 for(var i=0;i<params1.length;i++){
2858 if(params1[i]!==params2[i])return false;
2859 }
2860 return true;
2861 }}}return false;
2862 },"~O");
2863 Clazz_overrideMethod(c$,"getDeclaringClass",
2864 function(){
2865 return this.clazz;
2866 });
2867 Clazz_defineMethod(c$,"getExceptionTypes",
2868 function(){
2869 return this.exceptionTypes;
2870 });
2871 Clazz_overrideMethod(c$,"getModifiers",
2872 function(){
2873 return this.modifiers;
2874 });
2875 Clazz_overrideMethod(c$,"getName",
2876 function(){
2877 return this.name;
2878 });
2879 Clazz_defineMethod(c$,"getParameterTypes",
2880 function(){
2881 return this.parameterTypes; 
2882 });
2883 Clazz_defineMethod(c$,"getReturnType",
2884 function(){
2885 return this.returnType;
2886 });
2887 Clazz_overrideMethod(c$,"hashCode",
2888 function(){
2889 return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode();
2890 });
2891 Clazz_defineMethod(c$,"invoke",
2892 function(receiver,args){
2893 var m=this.clazz.prototype[this.getName()];
2894 if(m==null){
2895 m=this.clazz[this.getName()];
2896 }
2897 if(m!=null){
2898 m.apply(receiver,args);
2899 }else{
2900
2901 }
2902 },"~O,~A");
2903 Clazz_overrideMethod(c$,"toString",
2904 function(){
2905 return null;
2906 });
2907
2908 })(Clazz);
2909 Clazz_declarePackage ("JU");
2910 c$ = Clazz_declareType (JU, "DebugJS");
2911 c$._ = Clazz_defineMethod (c$, "_", 
2912 function (msg) {
2913 {
2914 if (Clazz._debugging) {
2915 debugger;
2916 }
2917 }}, "~S");
2918 Clazz_declarePackage ("java.awt");
2919 Clazz_load (["java.awt.Stroke"], "java.awt.BasicStroke", ["java.lang.Float", "$.IllegalArgumentException", "java.util.Arrays"], function () {
2920 c$ = Clazz_decorateAsClass (function () {
2921 this.width = 0;
2922 this.join = 0;
2923 this.cap = 0;
2924 this.miterlimit = 0;
2925 this.dash = null;
2926 this.dash_phase = 0;
2927 Clazz_instantialize (this, arguments);
2928 }, java.awt, "BasicStroke", null, java.awt.Stroke);
2929 Clazz_makeConstructor (c$, 
2930 function (width, cap, join, miterlimit, dash, dash_phase) {
2931 if (width < 0.0) {
2932 throw  new IllegalArgumentException ("negative width");
2933 }if (cap != 0 && cap != 1 && cap != 2) {
2934 throw  new IllegalArgumentException ("illegal end cap value");
2935 }if (join == 0) {
2936 if (miterlimit < 1.0) {
2937 throw  new IllegalArgumentException ("miter limit < 1");
2938 }} else if (join != 1 && join != 2) {
2939 throw  new IllegalArgumentException ("illegal line join value");
2940 }if (dash != null) {
2941 if (dash_phase < 0.0) {
2942 throw  new IllegalArgumentException ("negative dash phase");
2943 }var allzero = true;
2944 for (var i = 0; i < dash.length; i++) {
2945 var d = dash[i];
2946 if (d > 0.0) {
2947 allzero = false;
2948 } else if (d < 0.0) {
2949 throw  new IllegalArgumentException ("negative dash length");
2950 }}
2951 if (allzero) {
2952 throw  new IllegalArgumentException ("dash lengths all zero");
2953 }}this.width = width;
2954 this.cap = cap;
2955 this.join = join;
2956 this.miterlimit = miterlimit;
2957 if (dash != null) {
2958 this.dash = dash.clone ();
2959 }this.dash_phase = dash_phase;
2960 }, "~N,~N,~N,~N,~A,~N");
2961 Clazz_makeConstructor (c$, 
2962 function (width, cap, join, miterlimit) {
2963 this.construct (width, cap, join, miterlimit, null, 0.0);
2964 }, "~N,~N,~N,~N");
2965 Clazz_makeConstructor (c$, 
2966 function (width, cap, join) {
2967 this.construct (width, cap, join, 10.0, null, 0.0);
2968 }, "~N,~N,~N");
2969 Clazz_makeConstructor (c$, 
2970 function (width) {
2971 this.construct (width, 2, 0, 10.0, null, 0.0);
2972 }, "~N");
2973 Clazz_makeConstructor (c$, 
2974 function () {
2975 this.construct (1.0, 2, 0, 10.0, null, 0.0);
2976 });
2977 Clazz_overrideMethod (c$, "createStrokedShape", 
2978 function (s) {
2979 return s;
2980 }, "java.awt.Shape");
2981 Clazz_defineMethod (c$, "getLineWidth", 
2982 function () {
2983 return this.width;
2984 });
2985 Clazz_defineMethod (c$, "getEndCap", 
2986 function () {
2987 return this.cap;
2988 });
2989 Clazz_defineMethod (c$, "getLineJoin", 
2990 function () {
2991 return this.join;
2992 });
2993 Clazz_defineMethod (c$, "getMiterLimit", 
2994 function () {
2995 return this.miterlimit;
2996 });
2997 Clazz_defineMethod (c$, "getDashArray", 
2998 function () {
2999 if (this.dash == null) {
3000 return null;
3001 }return this.dash.clone ();
3002 });
3003 Clazz_defineMethod (c$, "getDashPhase", 
3004 function () {
3005 return this.dash_phase;
3006 });
3007 Clazz_overrideMethod (c$, "hashCode", 
3008 function () {
3009 var hash = Float.floatToIntBits (this.width);
3010 hash = hash * 31 + this.join;
3011 hash = hash * 31 + this.cap;
3012 hash = hash * 31 + Float.floatToIntBits (this.miterlimit);
3013 if (this.dash != null) {
3014 hash = hash * 31 + Float.floatToIntBits (this.dash_phase);
3015 for (var i = 0; i < this.dash.length; i++) {
3016 hash = hash * 31 + Float.floatToIntBits (this.dash[i]);
3017 }
3018 }return hash;
3019 });
3020 Clazz_overrideMethod (c$, "equals", 
3021 function (obj) {
3022 if (!(Clazz_instanceOf (obj, java.awt.BasicStroke))) {
3023 return false;
3024 }var bs = obj;
3025 if (this.width != bs.width) {
3026 return false;
3027 }if (this.join != bs.join) {
3028 return false;
3029 }if (this.cap != bs.cap) {
3030 return false;
3031 }if (this.miterlimit != bs.miterlimit) {
3032 return false;
3033 }if (this.dash != null) {
3034 if (this.dash_phase != bs.dash_phase) {
3035 return false;
3036 }if (!java.util.Arrays.equals (this.dash, bs.dash)) {
3037 return false;
3038 }} else if (bs.dash != null) {
3039 return false;
3040 }return true;
3041 }, "~O");
3042 Clazz_defineStatics (c$,
3043 "JOIN_MITER", 0,
3044 "JOIN_ROUND", 1,
3045 "JOIN_BEVEL", 2,
3046 "CAP_BUTT", 0,
3047 "CAP_ROUND", 1,
3048 "CAP_SQUARE", 2);
3049 });
3050 Clazz_declarePackage ("java.awt");
3051 Clazz_declareInterface (java.awt, "Stroke");
3052 Clazz_declarePackage ("java.util");
3053 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
3054 c$ = Clazz_decorateAsClass (function () {
3055 this.language = null;
3056 this.country = null;
3057 this.variant = null;
3058 this.hashCodeValue = 0;
3059 Clazz_instantialize (this, arguments);
3060 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
3061 Clazz_makeConstructor (c$, 
3062 function (language, country, variant) {
3063 this.language = language.intern ();
3064 this.country = country.intern ();
3065 this.variant = variant.intern ();
3066 }, "~S,~S,~S");
3067 Clazz_makeConstructor (c$, 
3068 function (language, country) {
3069 this.construct (language, country, "");
3070 }, "~S,~S");
3071 Clazz_makeConstructor (c$, 
3072 function (language) {
3073 this.construct (language, "", "");
3074 }, "~S");
3075 Clazz_makeConstructor (c$, 
3076  function (language, country, flag) {
3077 this.language = language;
3078 this.country = country;
3079 this.variant = "";
3080 }, "~S,~S,~B");
3081 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
3082  function (key, language, country) {
3083 var locale =  new java.util.Locale (language, country, false);
3084 java.util.Locale.cache.put (key, locale);
3085 return locale;
3086 }, "~S,~S,~S");
3087 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
3088 function (language, country, variant) {
3089 if (language == null || country == null || variant == null) {
3090 throw  new NullPointerException ();
3091 }var sb =  new StringBuilder ();
3092 sb.append (language).append ('_').append (country).append ('_').append (variant);
3093 var key = sb.toString ();
3094 var locale = java.util.Locale.cache.get (key);
3095 if (locale == null) {
3096 locale =  new java.util.Locale (language, country, variant);
3097 var l = java.util.Locale.cache.put (key, locale);
3098 if (l != null) {
3099 locale = l;
3100 }}return locale;
3101 }, "~S,~S,~S");
3102 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
3103 function () {
3104 if (java.util.Locale.defaultLocale == null) {
3105 var language;
3106 var country;
3107 var variant;
3108 language = "en";
3109 country = "";
3110 variant = "";
3111 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
3112 }return java.util.Locale.defaultLocale;
3113 });
3114 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
3115 function (newLocale) {
3116 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
3117 java.util.Locale.defaultLocale = newLocale;
3118 }, "java.util.Locale");
3119 Clazz_defineMethod (c$, "getLanguage", 
3120 function () {
3121 return this.language;
3122 });
3123 Clazz_defineMethod (c$, "getCountry", 
3124 function () {
3125 return this.country;
3126 });
3127 Clazz_defineMethod (c$, "getVariant", 
3128 function () {
3129 return this.variant;
3130 });
3131 Clazz_overrideMethod (c$, "toString", 
3132 function () {
3133 var l = this.language.length != 0;
3134 var c = this.country.length != 0;
3135 var v = this.variant.length != 0;
3136 var result =  new StringBuilder (this.language);
3137 if (c || (l && v)) {
3138 result.append ('_').append (this.country);
3139 }if (v && (l || c)) {
3140 result.append ('_').append (this.variant);
3141 }return result.toString ();
3142 });
3143 Clazz_defineMethod (c$, "getDisplayLanguage", 
3144 function () {
3145 return this.getDisplayLanguage (java.util.Locale.getDefault ());
3146 });
3147 Clazz_defineMethod (c$, "getDisplayLanguage", 
3148 function (inLocale) {
3149 return this.getDisplayString (this.language, inLocale, 0);
3150 }, "java.util.Locale");
3151 Clazz_defineMethod (c$, "getDisplayCountry", 
3152 function () {
3153 return this.getDisplayCountry (java.util.Locale.getDefault ());
3154 });
3155 Clazz_defineMethod (c$, "getDisplayCountry", 
3156 function (inLocale) {
3157 return this.getDisplayString (this.country, inLocale, 1);
3158 }, "java.util.Locale");
3159 Clazz_defineMethod (c$, "getDisplayString", 
3160  function (code, inLocale, type) {
3161 if (code.length == 0) {
3162 return "";
3163 }if (inLocale == null) {
3164 throw  new NullPointerException ();
3165 }return inLocale.toString ();
3166 }, "~S,java.util.Locale,~N");
3167 Clazz_defineMethod (c$, "getDisplayVariant", 
3168 function () {
3169 return this.getDisplayVariant (java.util.Locale.getDefault ());
3170 });
3171 Clazz_defineMethod (c$, "getDisplayVariant", 
3172 function (inLocale) {
3173 if (this.variant.length == 0) return "";
3174 return this.variant;
3175 }, "java.util.Locale");
3176 Clazz_defineMethod (c$, "getDisplayName", 
3177 function () {
3178 return this.getDisplayName (java.util.Locale.getDefault ());
3179 });
3180 Clazz_defineMethod (c$, "getDisplayName", 
3181 function (inLocale) {
3182 return inLocale.toString ();
3183 }, "java.util.Locale");
3184 Clazz_defineMethod (c$, "clone", 
3185 function () {
3186 try {
3187 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
3188 return that;
3189 } catch (e) {
3190 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3191 throw  new InternalError ();
3192 } else {
3193 throw e;
3194 }
3195 }
3196 });
3197 Clazz_overrideMethod (c$, "hashCode", 
3198 function () {
3199 var hc = this.hashCodeValue;
3200 if (hc == 0) {
3201 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
3202 this.hashCodeValue = hc;
3203 }return hc;
3204 });
3205 Clazz_overrideMethod (c$, "equals", 
3206 function (obj) {
3207 if (this === obj) return true;
3208 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
3209 var other = obj;
3210 return this.language === other.language && this.country === other.country && this.variant === other.variant;
3211 }, "~O");
3212 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
3213 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
3214 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
3215 Clazz_defineStatics (c$,
3216 "DISPLAY_LANGUAGE", 0,
3217 "DISPLAY_COUNTRY", 1,
3218 "defaultLocale", null);
3219 });
3220 Clazz_declarePackage ("java.util");
3221 Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () {
3222 c$ = Clazz_decorateAsClass (function () {
3223 this.parent = null;
3224 this.locale = null;
3225 this.expired = false;
3226 this.$keySet = null;
3227 Clazz_instantialize (this, arguments);
3228 }, java.util, "ResourceBundle");
3229 Clazz_makeConstructor (c$, 
3230 function () {
3231 });
3232 Clazz_defineMethod (c$, "getString", 
3233 function (key) {
3234 return this.getObject (key);
3235 }, "~S");
3236 Clazz_defineMethod (c$, "getStringArray", 
3237 function (key) {
3238 return this.getObject (key);
3239 }, "~S");
3240 Clazz_defineMethod (c$, "getObject", 
3241 function (key) {
3242 var obj = this.handleGetObject (key);
3243 if (obj == null) {
3244 if (this.parent != null) {
3245 obj = this.parent.getObject (key);
3246 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
3247 }return obj;
3248 }, "~S");
3249 Clazz_defineMethod (c$, "getLocale", 
3250 function () {
3251 return this.locale;
3252 });
3253 Clazz_defineMethod (c$, "setParent", 
3254 function (parent) {
3255 this.parent = parent;
3256 }, "java.util.ResourceBundle");
3257 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
3258 function (baseName, targetLocale, loader, control) {
3259 var n = 4;
3260 {
3261 n = arguments.length;
3262 }switch (n) {
3263 case 2:
3264 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
3265 control = targetLocale;
3266 targetLocale = null;
3267 }break;
3268 case 3:
3269 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
3270 control = loader;
3271 loader = null;
3272 }break;
3273 }
3274 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
3275 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3276 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
3277 }, "~S,~O,~O,java.util.ResourceBundle.Control");
3278 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
3279  function (baseName, locale, loader, control) {
3280 if (control == null) {
3281 throw  new NullPointerException ("ResourceBundle locale or control is null");
3282 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
3283 var bundle = null;
3284 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3285 if (bundleRef != null) {
3286 bundle = bundleRef;
3287 bundleRef = null;
3288 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
3289 return bundle;
3290 }var formats = control.getFormats (baseName);
3291 var baseBundle = null;
3292 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
3293 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
3294 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
3295 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3296 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
3297 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
3298 break;
3299 }if (isBaseBundle && baseBundle == null) {
3300 baseBundle = bundle;
3301 }}}
3302 if (bundle == null) {
3303 if (baseBundle == null) {
3304 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
3305 }bundle = baseBundle;
3306 }return bundle;
3307 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
3308 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
3309  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
3310 var targetLocale = candidateLocales.get (index);
3311 var parent = null;
3312 if (index != candidateLocales.size () - 1) {
3313 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
3314 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
3315 return baseBundle;
3316 }var expiredBundle = false;
3317 cacheKey.setLocale (targetLocale);
3318 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
3319 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3320 expiredBundle = bundle.expired;
3321 if (!expiredBundle) {
3322 if (bundle.parent === parent) {
3323 return bundle;
3324 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3325 if (bundleRef != null && bundleRef === bundle) {
3326 java.util.ResourceBundle.cacheList.remove (cacheKey);
3327 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
3328 var constKey = cacheKey.clone ();
3329 try {
3330 try {
3331 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
3332 if (bundle != null) {
3333 if (bundle.parent == null) {
3334 bundle.setParent (parent);
3335 }bundle.locale = targetLocale;
3336 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
3337 return bundle;
3338 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
3339 } finally {
3340 }
3341 } finally {
3342 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
3343 Thread.currentThread ().interrupt ();
3344 }}
3345 }return parent;
3346 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
3347 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
3348  function (cacheKey, formats, control, reload) {
3349 var targetLocale = cacheKey.getLocale ();
3350 var bundle = null;
3351 var size = formats.size ();
3352 for (var i = 0; i < size; i++) {
3353 var format = formats.get (i);
3354 try {
3355 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
3356 } catch (e$$) {
3357 if (Clazz_exceptionOf (e$$, LinkageError)) {
3358 var error = e$$;
3359 {
3360 cacheKey.setCause (error);
3361 }
3362 } else if (Clazz_exceptionOf (e$$, Exception)) {
3363 var cause = e$$;
3364 {
3365 cacheKey.setCause (cause);
3366 }
3367 } else {
3368 throw e$$;
3369 }
3370 }
3371 if (bundle != null) {
3372 cacheKey.setFormat (format);
3373 bundle.locale = targetLocale;
3374 bundle.expired = false;
3375 break;
3376 }}
3377 return bundle;
3378 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
3379 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
3380  function (bundle) {
3381 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
3382 }, "java.util.ResourceBundle");
3383 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
3384  function (baseName, locale, cause) {
3385 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
3386 cause = null;
3387 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
3388 }, "~S,java.util.Locale,Throwable");
3389 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
3390  function (cacheKey, control) {
3391 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3392 if (bundleRef == null) {
3393 return null;
3394 }var bundle = bundleRef;
3395 return bundle;
3396 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
3397 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
3398  function (cacheKey, bundle, control) {
3399 var key = cacheKey.clone ();
3400 java.util.ResourceBundle.cacheList.put (key, bundle);
3401 return bundle;
3402 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
3403 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
3404 function () {
3405 java.util.ResourceBundle.cacheList.clear ();
3406 });
3407 Clazz_defineMethod (c$, "containsKey", 
3408 function (key) {
3409 if (key == null) {
3410 throw  new NullPointerException ();
3411 }for (var rb = this; rb != null; rb = rb.parent) {
3412 if (rb.handleKeySet ().contains (key)) {
3413 return true;
3414 }}
3415 return false;
3416 }, "~S");
3417 Clazz_defineMethod (c$, "keySet", 
3418 function () {
3419 var keys =  new java.util.HashSet ();
3420 for (var rb = this; rb != null; rb = rb.parent) {
3421 keys.addAll (rb.handleKeySet ());
3422 }
3423 return keys;
3424 });
3425 Clazz_defineMethod (c$, "handleKeySet", 
3426 function () {
3427 if (this.$keySet == null) {
3428 {
3429 if (this.$keySet == null) {
3430 var keys =  new java.util.HashSet ();
3431 var enumKeys = this.getKeys ();
3432 while (enumKeys.hasMoreElements ()) {
3433 var key = enumKeys.nextElement ();
3434 if (this.handleGetObject (key) != null) {
3435 keys.add (key);
3436 }}
3437 this.$keySet = keys;
3438 }}}return this.$keySet;
3439 });
3440 c$.$ResourceBundle$1$ = function () {
3441 Clazz_pu$h(self.c$);
3442 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
3443 Clazz_defineMethod (c$, "getKeys", 
3444 function () {
3445 return null;
3446 });
3447 Clazz_defineMethod (c$, "handleGetObject", 
3448 function (key) {
3449 return null;
3450 }, "~S");
3451 Clazz_overrideMethod (c$, "toString", 
3452 function () {
3453 return "NONEXISTENT_BUNDLE";
3454 });
3455 c$ = Clazz_p0p ();
3456 };
3457 Clazz_pu$h(self.c$);
3458 c$ = Clazz_decorateAsClass (function () {
3459 this.name = null;
3460 this.locale = null;
3461 this.format = null;
3462 this.cause = null;
3463 this.hashCodeCache = 0;
3464 Clazz_instantialize (this, arguments);
3465 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
3466 Clazz_makeConstructor (c$, 
3467 function (a, b, c) {
3468 this.name = a;
3469 this.locale = b;
3470 if (this.name != null) this.calculateHashCode ();
3471 }, "~S,java.util.Locale,~O");
3472 Clazz_defineMethod (c$, "getName", 
3473 function () {
3474 return this.name;
3475 });
3476 Clazz_defineMethod (c$, "getLocale", 
3477 function () {
3478 return this.locale;
3479 });
3480 Clazz_defineMethod (c$, "setLocale", 
3481 function (a) {
3482 if (!this.locale.equals (a)) {
3483 this.locale = a;
3484 this.calculateHashCode ();
3485 }return this;
3486 }, "java.util.Locale");
3487 Clazz_overrideMethod (c$, "equals", 
3488 function (a) {
3489 if (this === a) {
3490 return true;
3491 }try {
3492 var b = a;
3493 if (this.hashCodeCache != b.hashCodeCache) {
3494 return false;
3495 }if (!this.name.equals (b.name)) {
3496 return false;
3497 }if (!this.locale.equals (b.locale)) {
3498 return false;
3499 }return true;
3500 } catch (e$$) {
3501 if (Clazz_exceptionOf (e$$, NullPointerException)) {
3502 var e = e$$;
3503 {
3504 }
3505 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
3506 var e = e$$;
3507 {
3508 }
3509 } else {
3510 throw e$$;
3511 }
3512 }
3513 return false;
3514 }, "~O");
3515 Clazz_overrideMethod (c$, "hashCode", 
3516 function () {
3517 return this.hashCodeCache;
3518 });
3519 Clazz_defineMethod (c$, "calculateHashCode", 
3520  function () {
3521 this.hashCodeCache = this.name.hashCode () << 3;
3522 this.hashCodeCache ^= this.locale.hashCode ();
3523 });
3524 Clazz_defineMethod (c$, "clone", 
3525 function () {
3526 try {
3527 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
3528 a.cause = null;
3529 return a;
3530 } catch (e) {
3531 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3532 throw  new InternalError ();
3533 } else {
3534 throw e;
3535 }
3536 }
3537 });
3538 Clazz_defineMethod (c$, "setFormat", 
3539 function (a) {
3540 this.format = a;
3541 }, "~S");
3542 Clazz_defineMethod (c$, "setCause", 
3543  function (a) {
3544 if (this.cause == null) {
3545 this.cause = a;
3546 } else {
3547 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
3548 this.cause = a;
3549 }}}, "Throwable");
3550 Clazz_defineMethod (c$, "getCause", 
3551  function () {
3552 return this.cause;
3553 });
3554 Clazz_overrideMethod (c$, "toString", 
3555 function () {
3556 var a = this.locale.toString ();
3557 if (a.length == 0) {
3558 if (this.locale.getVariant ().length != 0) {
3559 a = "__" + this.locale.getVariant ();
3560 } else {
3561 a = "\"\"";
3562 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
3563 });
3564 c$ = Clazz_p0p ();
3565 Clazz_pu$h(self.c$);
3566 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
3567 Clazz_makeConstructor (c$, 
3568 function () {
3569 });
3570 c$.getControl = Clazz_defineMethod (c$, "getControl", 
3571 function (a) {
3572 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3573 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
3574 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3575 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
3576 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3577 return java.util.ResourceBundle.Control.INSTANCE;
3578 }throw  new IllegalArgumentException ();
3579 }, "java.util.List");
3580 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
3581 function (a) {
3582 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3583 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
3584 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3585 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
3586 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3587 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
3588 }throw  new IllegalArgumentException ();
3589 }, "java.util.List");
3590 Clazz_defineMethod (c$, "getFormats", 
3591 function (a) {
3592 if (a == null) {
3593 throw  new NullPointerException ();
3594 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
3595 }, "~S");
3596 Clazz_defineMethod (c$, "getCandidateLocales", 
3597 function (a, b) {
3598 if (a == null) {
3599 throw  new NullPointerException ();
3600 }var c = b.getLanguage ();
3601 var d = b.getCountry ();
3602 var e = b.getVariant ();
3603 var f =  new java.util.ArrayList (4);
3604 if (e.length > 0) {
3605 f.add (b);
3606 }if (d.length > 0) {
3607 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
3608 }if (c.length > 0) {
3609 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
3610 }f.add (java.util.Locale.ROOT);
3611 return f;
3612 }, "~S,java.util.Locale");
3613 Clazz_defineMethod (c$, "getFallbackLocale", 
3614 function (a, b) {
3615 if (a == null) {
3616 throw  new NullPointerException ();
3617 }var c = java.util.Locale.getDefault ();
3618 return b.equals (c) ? null : c;
3619 }, "~S,java.util.Locale");
3620 Clazz_defineMethod (c$, "newBundle", 
3621 function (a, b, c, d, e) {
3622 var f = this.toBundleName (a, b);
3623 var g = null;
3624 if (c.equals ("java.class")) {
3625 g = swingjs.api.Interface.getInstance (f, false);
3626 } else if (c.equals ("java.properties")) {
3627 var h = this.toResourceName0 (f, "properties");
3628 if (h == null) {
3629 return null;
3630 }var i = swingjs.JSToolkit.getJavaResource (h, false);
3631 var j = null;
3632 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
3633 if (j != null) {
3634 try {
3635 g = this.newPropertyBundle (j);
3636 } finally {
3637 j.close ();
3638 }
3639 }} else {
3640 throw  new IllegalArgumentException ("unknown format: " + c);
3641 }return g;
3642 }, "~S,java.util.Locale,~S,~O,~B");
3643 Clazz_defineMethod (c$, "newPropertyBundle", 
3644  function (a) {
3645 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
3646 }, "java.io.InputStream");
3647 Clazz_defineMethod (c$, "getTimeToLive", 
3648 function (a, b) {
3649 if (a == null || b == null) {
3650 throw  new NullPointerException ();
3651 }return -2;
3652 }, "~S,java.util.Locale");
3653 Clazz_defineMethod (c$, "toBundleName", 
3654 function (a, b) {
3655 if (b === java.util.Locale.ROOT) {
3656 return a;
3657 }var c = b.getLanguage ();
3658 var d = b.getCountry ();
3659 var e = b.getVariant ();
3660 if (c === "" && d === "" && e === "") {
3661 return a;
3662 }var f =  new StringBuilder (a);
3663 f.append ('_');
3664 if (e !== "") {
3665 f.append (c).append ('_').append (d).append ('_').append (e);
3666 } else if (d !== "") {
3667 f.append (c).append ('_').append (d);
3668 } else {
3669 f.append (c);
3670 }return f.toString ();
3671 }, "~S,java.util.Locale");
3672 Clazz_defineMethod (c$, "toResourceName", 
3673 function (a, b) {
3674 var c =  new StringBuilder (a.length + 1 + b.length);
3675 c.append (a.$replace ('.', '/')).append ('.').append (b);
3676 return c.toString ();
3677 }, "~S,~S");
3678 Clazz_defineMethod (c$, "toResourceName0", 
3679  function (a, b) {
3680 if (a.contains ("://")) {
3681 return null;
3682 } else {
3683 return this.toResourceName (a, b);
3684 }}, "~S,~S");
3685 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
3686 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
3687 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
3688 Clazz_defineStatics (c$,
3689 "TTL_DONT_CACHE", -1,
3690 "TTL_NO_EXPIRATION_CONTROL", -2);
3691 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
3692 c$ = Clazz_p0p ();
3693 Clazz_pu$h(self.c$);
3694 c$ = Clazz_decorateAsClass (function () {
3695 this.formats = null;
3696 Clazz_instantialize (this, arguments);
3697 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
3698 Clazz_makeConstructor (c$, 
3699 function (a) {
3700 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
3701 this.formats = a;
3702 }, "java.util.List");
3703 Clazz_overrideMethod (c$, "getFormats", 
3704 function (a) {
3705 if (a == null) {
3706 throw  new NullPointerException ();
3707 }return this.formats;
3708 }, "~S");
3709 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3710 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3711 c$ = Clazz_p0p ();
3712 Clazz_pu$h(self.c$);
3713 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
3714 Clazz_overrideMethod (c$, "getFallbackLocale", 
3715 function (a, b) {
3716 if (a == null || b == null) {
3717 throw  new NullPointerException ();
3718 }return null;
3719 }, "~S,java.util.Locale");
3720 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
3721 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3722 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3723 c$ = Clazz_p0p ();
3724 Clazz_defineStatics (c$,
3725 "INITIAL_CACHE_SIZE", 32);
3726 c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null));
3727 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
3728 });
3729 Clazz_declarePackage ("JU");
3730 Clazz_load (["javajs.api.GenericLineReader"], "JU.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "JU.AU", "$.Base64", "$.Encoding", "$.SB"], function () {
3731 c$ = Clazz_decorateAsClass (function () {
3732 this.reader = null;
3733 Clazz_instantialize (this, arguments);
3734 }, JU, "Rdr", null, javajs.api.GenericLineReader);
3735 Clazz_makeConstructor (c$, 
3736 function (reader) {
3737 this.reader = reader;
3738 }, "java.io.BufferedReader");
3739 Clazz_overrideMethod (c$, "readNextLine", 
3740 function () {
3741 return this.reader.readLine ();
3742 });
3743 c$.readCifData = Clazz_defineMethod (c$, "readCifData", 
3744 function (parser, br) {
3745 return parser.set (null, br).getAllCifData ();
3746 }, "javajs.api.GenericCifDataParser,java.io.BufferedReader");
3747 c$.fixUTF = Clazz_defineMethod (c$, "fixUTF", 
3748 function (bytes) {
3749 var encoding = JU.Rdr.getUTFEncoding (bytes);
3750 if (encoding !== JU.Encoding.NONE) try {
3751 var s =  String.instantialize (bytes, encoding.name ().$replace ('_', '-'));
3752 switch (encoding) {
3753 case JU.Encoding.UTF8:
3754 case JU.Encoding.UTF_16BE:
3755 case JU.Encoding.UTF_16LE:
3756 s = s.substring (1);
3757 break;
3758 default:
3759 break;
3760 }
3761 return s;
3762 } catch (e) {
3763 if (Clazz_exceptionOf (e, java.io.UnsupportedEncodingException)) {
3764 System.out.println (e);
3765 } else {
3766 throw e;
3767 }
3768 }
3769 return  String.instantialize (bytes);
3770 }, "~A");
3771 c$.getUTFEncoding = Clazz_defineMethod (c$, "getUTFEncoding", 
3772  function (bytes) {
3773 if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return JU.Encoding.UTF8;
3774 if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return JU.Encoding.UTF_32BE;
3775 if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return JU.Encoding.UTF_32LE;
3776 if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return JU.Encoding.UTF_16LE;
3777 if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return JU.Encoding.UTF_16BE;
3778 return JU.Encoding.NONE;
3779 }, "~A");
3780 c$.getUTFEncodingForStream = Clazz_defineMethod (c$, "getUTFEncodingForStream", 
3781  function (is) {
3782 {
3783 is.resetStream();
3784 }var abMagic =  Clazz_newByteArray (4, 0);
3785 abMagic[3] = 1;
3786 try {
3787 is.mark (5);
3788 } catch (e) {
3789 if (Clazz_exceptionOf (e, Exception)) {
3790 return JU.Encoding.NONE;
3791 } else {
3792 throw e;
3793 }
3794 }
3795 is.read (abMagic, 0, 4);
3796 is.reset ();
3797 return JU.Rdr.getUTFEncoding (abMagic);
3798 }, "java.io.BufferedInputStream");
3799 c$.isBase64 = Clazz_defineMethod (c$, "isBase64", 
3800 function (sb) {
3801 return (sb.indexOf (";base64,") == 0);
3802 }, "JU.SB");
3803 c$.isCompoundDocumentS = Clazz_defineMethod (c$, "isCompoundDocumentS", 
3804 function (is) {
3805 return JU.Rdr.isCompoundDocumentB (JU.Rdr.getMagic (is, 8));
3806 }, "java.io.InputStream");
3807 c$.isCompoundDocumentB = Clazz_defineMethod (c$, "isCompoundDocumentB", 
3808 function (bytes) {
3809 return (bytes.length >= 8 && bytes[0] == 0xD0 && bytes[1] == 0xCF && bytes[2] == 0x11 && bytes[3] == 0xE0 && bytes[4] == 0xA1 && bytes[5] == 0xB1 && bytes[6] == 0x1A && bytes[7] == 0xE1);
3810 }, "~A");
3811 c$.isGzipS = Clazz_defineMethod (c$, "isGzipS", 
3812 function (is) {
3813 return JU.Rdr.isGzipB (JU.Rdr.getMagic (is, 2));
3814 }, "java.io.InputStream");
3815 c$.isGzipB = Clazz_defineMethod (c$, "isGzipB", 
3816 function (bytes) {
3817 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B);
3818 }, "~A");
3819 c$.isPickleS = Clazz_defineMethod (c$, "isPickleS", 
3820 function (is) {
3821 return JU.Rdr.isPickleB (JU.Rdr.getMagic (is, 2));
3822 }, "java.io.InputStream");
3823 c$.isPickleB = Clazz_defineMethod (c$, "isPickleB", 
3824 function (bytes) {
3825 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71);
3826 }, "~A");
3827 c$.isPngZipStream = Clazz_defineMethod (c$, "isPngZipStream", 
3828 function (is) {
3829 return JU.Rdr.isPngZipB (JU.Rdr.getMagic (is, 55));
3830 }, "java.io.InputStream");
3831 c$.isPngZipB = Clazz_defineMethod (c$, "isPngZipB", 
3832 function (bytes) {
3833 return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A);
3834 }, "~A");
3835 c$.isZipS = Clazz_defineMethod (c$, "isZipS", 
3836 function (is) {
3837 return JU.Rdr.isZipB (JU.Rdr.getMagic (is, 4));
3838 }, "java.io.InputStream");
3839 c$.isZipB = Clazz_defineMethod (c$, "isZipB", 
3840 function (bytes) {
3841 return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04);
3842 }, "~A");
3843 c$.getMagic = Clazz_defineMethod (c$, "getMagic", 
3844  function (is, n) {
3845 var abMagic =  Clazz_newByteArray (n, 0);
3846 {
3847 is.resetStream();
3848 }try {
3849 is.mark (n + 1);
3850 is.read (abMagic, 0, n);
3851 } catch (e) {
3852 if (Clazz_exceptionOf (e, java.io.IOException)) {
3853 } else {
3854 throw e;
3855 }
3856 }
3857 try {
3858 is.reset ();
3859 } catch (e) {
3860 if (Clazz_exceptionOf (e, java.io.IOException)) {
3861 } else {
3862 throw e;
3863 }
3864 }
3865 return abMagic;
3866 }, "java.io.InputStream,~N");
3867 c$.getBIS = Clazz_defineMethod (c$, "getBIS", 
3868 function (bytes) {
3869 return  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes));
3870 }, "~A");
3871 c$.getBR = Clazz_defineMethod (c$, "getBR", 
3872 function (string) {
3873 return  new java.io.BufferedReader ( new java.io.StringReader (string));
3874 }, "~S");
3875 c$.getUnzippedInputStream = Clazz_defineMethod (c$, "getUnzippedInputStream", 
3876 function (jzt, bis) {
3877 while (JU.Rdr.isGzipS (bis)) bis =  new java.io.BufferedInputStream (JU.Rdr.newGZIPInputStream (jzt, bis));
3878
3879 return bis;
3880 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
3881 c$.getBytesFromSB = Clazz_defineMethod (c$, "getBytesFromSB", 
3882 function (sb) {
3883 return (JU.Rdr.isBase64 (sb) ? JU.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1));
3884 }, "JU.SB");
3885 c$.getStreamAsBytes = Clazz_defineMethod (c$, "getStreamAsBytes", 
3886 function (bis, out) {
3887 var buf =  Clazz_newByteArray (1024, 0);
3888 var bytes = (out == null ?  Clazz_newByteArray (4096, 0) : null);
3889 var len = 0;
3890 var totalLen = 0;
3891 while ((len = bis.read (buf, 0, 1024)) > 0) {
3892 totalLen += len;
3893 if (out == null) {
3894 if (totalLen >= bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3895 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3896 } else {
3897 out.write (buf, 0, len);
3898 }}
3899 bis.close ();
3900 if (out == null) {
3901 return JU.AU.arrayCopyByte (bytes, totalLen);
3902 }return totalLen + " bytes";
3903 }, "java.io.BufferedInputStream,JU.OC");
3904 c$.getBufferedReader = Clazz_defineMethod (c$, "getBufferedReader", 
3905 function (bis, charSet) {
3906 if (JU.Rdr.getUTFEncodingForStream (bis) === JU.Encoding.NONE) return  new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet)));
3907 var bytes = JU.Rdr.getLimitedStreamBytes (bis, -1);
3908 bis.close ();
3909 return JU.Rdr.getBR (charSet == null ? JU.Rdr.fixUTF (bytes) :  String.instantialize (bytes, charSet));
3910 }, "java.io.BufferedInputStream,~S");
3911 c$.getLimitedStreamBytes = Clazz_defineMethod (c$, "getLimitedStreamBytes", 
3912 function (is, n) {
3913 var buflen = (n > 0 && n < 1024 ? n : 1024);
3914 var buf =  Clazz_newByteArray (buflen, 0);
3915 var bytes =  Clazz_newByteArray (n < 0 ? 4096 : n, 0);
3916 var len = 0;
3917 var totalLen = 0;
3918 if (n < 0) n = 2147483647;
3919 while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) {
3920 totalLen += len;
3921 if (totalLen > bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3922 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3923 if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen;
3924 }
3925 if (totalLen == bytes.length) return bytes;
3926 buf =  Clazz_newByteArray (totalLen, 0);
3927 System.arraycopy (bytes, 0, buf, 0, totalLen);
3928 return buf;
3929 }, "java.io.InputStream,~N");
3930 c$.StreamToUTF8String = Clazz_defineMethod (c$, "StreamToUTF8String", 
3931 function (bis) {
3932 var data =  new Array (1);
3933 try {
3934 JU.Rdr.readAllAsString (JU.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0);
3935 } catch (e) {
3936 if (Clazz_exceptionOf (e, java.io.IOException)) {
3937 } else {
3938 throw e;
3939 }
3940 }
3941 return data[0];
3942 }, "java.io.BufferedInputStream");
3943 c$.readAllAsString = Clazz_defineMethod (c$, "readAllAsString", 
3944 function (br, nBytesMax, allowBinary, data, i) {
3945 try {
3946 var sb = JU.SB.newN (8192);
3947 var line;
3948 if (nBytesMax < 0) {
3949 line = br.readLine ();
3950 if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) {
3951 sb.append (line).appendC ('\n');
3952 while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n');
3953
3954 }} else {
3955 var n = 0;
3956 var len;
3957 while (n < nBytesMax && (line = br.readLine ()) != null) {
3958 if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1);
3959 sb.append (line).appendC ('\n');
3960 n += len + 1;
3961 }
3962 }br.close ();
3963 data[i] = sb.toString ();
3964 return true;
3965 } catch (ioe) {
3966 if (Clazz_exceptionOf (ioe, Exception)) {
3967 data[i] = ioe.toString ();
3968 return false;
3969 } else {
3970 throw ioe;
3971 }
3972 }
3973 }, "java.io.BufferedReader,~N,~B,~A,~N");
3974 c$.getPngZipPointAndCount = Clazz_defineMethod (c$, "getPngZipPointAndCount", 
3975 function (bis, pt_count) {
3976 bis.mark (75);
3977 try {
3978 var data = JU.Rdr.getLimitedStreamBytes (bis, 74);
3979 bis.reset ();
3980 var pt = 0;
3981 for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f;
3982
3983 var n = 0;
3984 for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f;
3985
3986 pt_count[0] = pt;
3987 pt_count[1] = n;
3988 } catch (e) {
3989 pt_count[1] = 0;
3990 }
3991 }, "java.io.BufferedInputStream,~A");
3992 c$.getPngZipStream = Clazz_defineMethod (c$, "getPngZipStream", 
3993 function (bis, asNewStream) {
3994 if (!JU.Rdr.isPngZipStream (bis)) return bis;
3995 var data =  Clazz_newByteArray (0, 0);
3996 bis.mark (75);
3997 try {
3998 var pt_count =  Clazz_newIntArray (2, 0);
3999 JU.Rdr.getPngZipPointAndCount (bis, pt_count);
4000 if (pt_count[1] != 0) {
4001 var pt = pt_count[0];
4002 while (pt > 0) pt -= bis.skip (pt);
4003
4004 if (!asNewStream) return bis;
4005 data = JU.Rdr.getLimitedStreamBytes (bis, pt_count[1]);
4006 }} catch (e) {
4007 } finally {
4008 try {
4009 if (asNewStream) bis.close ();
4010 } catch (e) {
4011 if (Clazz_exceptionOf (e, Exception)) {
4012 } else {
4013 throw e;
4014 }
4015 }
4016 }
4017 return JU.Rdr.getBIS (data);
4018 }, "java.io.BufferedInputStream,~B");
4019 c$.readFileAsMap = Clazz_defineMethod (c$, "readFileAsMap", 
4020 function (jzt, is, bdata, name) {
4021 jzt.readFileAsMap (is, bdata, name);
4022 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,java.util.Map,~S");
4023 c$.getZipDirectoryAsStringAndClose = Clazz_defineMethod (c$, "getZipDirectoryAsStringAndClose", 
4024 function (jzt, t) {
4025 return jzt.getZipDirectoryAsStringAndClose (t);
4026 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
4027 c$.newGZIPInputStream = Clazz_defineMethod (c$, "newGZIPInputStream", 
4028 function (jzt, bis) {
4029 return jzt.newGZIPInputStream (bis);
4030 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
4031 c$.newZipInputStream = Clazz_defineMethod (c$, "newZipInputStream", 
4032 function (jzt, $in) {
4033 return jzt.newZipInputStream ($in);
4034 }, "javajs.api.GenericZipTools,java.io.InputStream");
4035 c$.getZipFileDirectory = Clazz_defineMethod (c$, "getZipFileDirectory", 
4036 function (jzt, bis, subFileList, listPtr, asBufferedInputStream) {
4037 return jzt.getZipFileDirectory (jzt, bis, subFileList, listPtr, asBufferedInputStream);
4038 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N,~B");
4039 c$.getZipDirectoryAndClose = Clazz_defineMethod (c$, "getZipDirectoryAndClose", 
4040 function (jzt, t, manifestID) {
4041 return jzt.getZipDirectoryAndClose (t, manifestID);
4042 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~S");
4043 c$.getAllZipData = Clazz_defineMethod (c$, "getAllZipData", 
4044 function (jzt, bis, subFileList, replace, string, fileData) {
4045 jzt.getAllZipData (bis, subFileList, replace, string, fileData);
4046 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~S,~S,java.util.Map");
4047 c$.getZipFileContentsAsBytes = Clazz_defineMethod (c$, "getZipFileContentsAsBytes", 
4048 function (jzt, bis, subFileList, i) {
4049 return jzt.getZipFileContentsAsBytes (bis, subFileList, i);
4050 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N");
4051 c$.addZipEntry = Clazz_defineMethod (c$, "addZipEntry", 
4052 function (jzt, zos, fileName) {
4053 jzt.addZipEntry (zos, fileName);
4054 }, "javajs.api.GenericZipTools,~O,~S");
4055 c$.closeZipEntry = Clazz_defineMethod (c$, "closeZipEntry", 
4056 function (jzt, zos) {
4057 jzt.closeZipEntry (zos);
4058 }, "javajs.api.GenericZipTools,~O");
4059 c$.getZipOutputStream = Clazz_defineMethod (c$, "getZipOutputStream", 
4060 function (jzt, bos) {
4061 return jzt.getZipOutputStream (bos);
4062 }, "javajs.api.GenericZipTools,~O");
4063 c$.getCrcValue = Clazz_defineMethod (c$, "getCrcValue", 
4064 function (jzt, bytes) {
4065 return jzt.getCrcValue (bytes);
4066 }, "javajs.api.GenericZipTools,~A");
4067 c$.getZipRoot = Clazz_defineMethod (c$, "getZipRoot", 
4068 function (fileName) {
4069 var pt = fileName.indexOf ("|");
4070 return (pt < 0 ? fileName : fileName.substring (0, pt));
4071 }, "~S");
4072 });
4073 Clazz_declarePackage ("javajs.api");
4074 Clazz_declareInterface (javajs.api, "GenericLineReader");
4075 Clazz_load (["java.io.FilterInputStream"], "java.io.BufferedInputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException"], function () {
4076 c$ = Clazz_decorateAsClass (function () {
4077 this.buf = null;
4078 this.count = 0;
4079 this.pos = 0;
4080 this.markpos = -1;
4081 this.marklimit = 0;
4082 Clazz_instantialize (this, arguments);
4083 }, java.io, "BufferedInputStream", java.io.FilterInputStream);
4084 Clazz_defineMethod (c$, "getInIfOpen", 
4085  function () {
4086 var input = this.$in;
4087 if (input == null) throw  new java.io.IOException ("Stream closed");
4088 return input;
4089 });
4090 Clazz_defineMethod (c$, "getBufIfOpen", 
4091  function () {
4092 var buffer = this.buf;
4093 if (buffer == null) throw  new java.io.IOException ("Stream closed");
4094 return buffer;
4095 });
4096 Clazz_overrideMethod (c$, "resetStream", 
4097 function () {
4098 });
4099 Clazz_makeConstructor (c$, 
4100 function ($in) {
4101 Clazz_superConstructor (this, java.io.BufferedInputStream, [$in]);
4102 this.buf =  Clazz_newByteArray (8192, 0);
4103 }, "java.io.InputStream");
4104 Clazz_defineMethod (c$, "fill", 
4105  function () {
4106 var buffer = this.getBufIfOpen ();
4107 if (this.markpos < 0) this.pos = 0;
4108  else if (this.pos >= buffer.length) if (this.markpos > 0) {
4109 var sz = this.pos - this.markpos;
4110 System.arraycopy (buffer, this.markpos, buffer, 0, sz);
4111 this.pos = sz;
4112 this.markpos = 0;
4113 } else if (buffer.length >= this.marklimit) {
4114 this.markpos = -1;
4115 this.pos = 0;
4116 } else {
4117 var nsz = this.pos * 2;
4118 if (nsz > this.marklimit) nsz = this.marklimit;
4119 var nbuf =  Clazz_newByteArray (nsz, 0);
4120 System.arraycopy (buffer, 0, nbuf, 0, this.pos);
4121 buffer = this.buf = nbuf;
4122 }this.count = this.pos;
4123 var n = this.getInIfOpen ().read (buffer, this.pos, buffer.length - this.pos);
4124 if (n > 0) this.count = n + this.pos;
4125 });
4126 Clazz_overrideMethod (c$, "readByteAsInt", 
4127 function () {
4128 if (this.pos >= this.count) {
4129 this.fill ();
4130 if (this.pos >= this.count) return -1;
4131 }return this.getBufIfOpen ()[this.pos++] & 0xff;
4132 });
4133 Clazz_defineMethod (c$, "read1", 
4134  function (b, off, len) {
4135 var avail = this.count - this.pos;
4136 if (avail <= 0) {
4137 if (len >= this.getBufIfOpen ().length && this.markpos < 0) {
4138 return this.getInIfOpen ().read (b, off, len);
4139 }this.fill ();
4140 avail = this.count - this.pos;
4141 if (avail <= 0) return -1;
4142 }var cnt = (avail < len) ? avail : len;
4143 System.arraycopy (this.getBufIfOpen (), this.pos, b, off, cnt);
4144 this.pos += cnt;
4145 return cnt;
4146 }, "~A,~N,~N");
4147 Clazz_overrideMethod (c$, "read", 
4148 function (b, off, len) {
4149 if (arguments.length == 1) {
4150   off = 0;
4151   len  = b.length;
4152 }
4153 this.getBufIfOpen ();
4154 if ((off | len | (off + len) | (b.length - (off + len))) < 0) {
4155 throw  new IndexOutOfBoundsException ();
4156 } else if (len == 0) {
4157 return 0;
4158 }var n = 0;
4159 for (; ; ) {
4160 var nread = this.read1 (b, off + n, len - n);
4161 if (nread <= 0) return (n == 0) ? nread : n;
4162 n += nread;
4163 if (n >= len) return n;
4164 var input = this.$in;
4165 if (input != null && input.available () <= 0) return n;
4166 }
4167 }, "~A,~N,~N");
4168 Clazz_overrideMethod (c$, "skip", 
4169 function (n) {
4170 this.getBufIfOpen ();
4171 if (n <= 0) {
4172 return 0;
4173 }var avail = this.count - this.pos;
4174 if (avail <= 0) {
4175 if (this.markpos < 0) return this.getInIfOpen ().skip (n);
4176 this.fill ();
4177 avail = this.count - this.pos;
4178 if (avail <= 0) return 0;
4179 }var skipped = (avail < n) ? avail : n;
4180 this.pos += skipped;
4181 return skipped;
4182 }, "~N");
4183 Clazz_overrideMethod (c$, "available", 
4184 function () {
4185 var n = this.count - this.pos;
4186 var avail = this.getInIfOpen ().available ();
4187 return n > (2147483647 - avail) ? 2147483647 : n + avail;
4188 });
4189 Clazz_overrideMethod (c$, "mark", 
4190 function (readlimit) {
4191 this.marklimit = readlimit;
4192 this.markpos = this.pos;
4193 }, "~N");
4194 Clazz_overrideMethod (c$, "reset", 
4195 function () {
4196 this.getBufIfOpen ();
4197 if (this.markpos < 0) throw  new java.io.IOException ("Resetting to invalid mark");
4198 this.pos = this.markpos;
4199 });
4200 Clazz_overrideMethod (c$, "markSupported", 
4201 function () {
4202 return true;
4203 });
4204 Clazz_overrideMethod (c$, "close", 
4205 function () {
4206 var input = this.$in;
4207 this.$in = null;
4208 if (input != null) input.close ();
4209 return;
4210 });
4211 Clazz_defineStatics (c$,
4212 "DEFAULT_BUFFER_SIZE", 8192);
4213 });
4214 Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () {
4215 c$ = Clazz_decorateAsClass (function () {
4216 this.$in = null;
4217 Clazz_instantialize (this, arguments);
4218 }, java.io, "FilterInputStream", java.io.InputStream);
4219 Clazz_makeConstructor (c$, 
4220 function ($in) {
4221 Clazz_superConstructor (this, java.io.FilterInputStream, []);
4222 this.$in = $in;
4223 }, "java.io.InputStream");
4224 Clazz_defineMethod (c$, "readByteAsInt", 
4225 function () {
4226 return this.$in.readByteAsInt ();
4227 });
4228 Clazz_defineMethod (c$, "read", 
4229 function (b, off, len) {
4230     if (arguments.length == 1) { off = 0; len = b.length; }
4231 return this.$in.read (b, off, len);
4232 }, "~A,~N,~N");
4233 Clazz_defineMethod (c$, "skip", 
4234 function (n) {
4235 return this.$in.skip (n);
4236 }, "~N");
4237 Clazz_defineMethod (c$, "available", 
4238 function () {
4239 return this.$in.available ();
4240 });
4241 Clazz_defineMethod (c$, "close", 
4242 function () {
4243 this.$in.close ();
4244 });
4245 Clazz_defineMethod (c$, "mark", 
4246 function (readlimit) {
4247 this.$in.mark (readlimit);
4248 }, "~N");
4249 Clazz_defineMethod (c$, "reset", 
4250 function () {
4251 this.$in.reset ();
4252 });
4253 Clazz_defineMethod (c$, "markSupported", 
4254 function () {
4255 return this.$in.markSupported ();
4256 });
4257 });
4258 Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4259 c$ = Clazz_declareType (java.io, "InputStream");
4260 Clazz_defineMethod (c$, "read", 
4261 function (b, off, len) {
4262 if (b == null) {
4263 throw  new NullPointerException ();
4264
4265     if (arguments.length == 1) { off = 0; len = b.length; }
4266
4267 if (off < 0 || len < 0 || len > b.length - off) {
4268 throw  new IndexOutOfBoundsException ();
4269 } else if (len == 0) {
4270 return 0;
4271 }var c = this.readByteAsInt ();
4272 if (c == -1) {
4273 return -1;
4274 }b[off] = c;
4275 var i = 1;
4276 try {
4277 for (; i < len; i++) {
4278 c = this.readByteAsInt ();
4279 if (c == -1) {
4280 break;
4281 }b[off + i] = c;
4282 }
4283 } catch (ee) {
4284 if (Clazz_exceptionOf (ee, java.io.IOException)) {
4285 } else {
4286 throw ee;
4287 }
4288 }
4289 return i;
4290 }, "~A,~N,~N");
4291 Clazz_defineMethod (c$, "skip", 
4292 function (n) {
4293 var remaining = n;
4294 var nr;
4295 if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer =  Clazz_newByteArray (2048, 0);
4296 var localSkipBuffer = java.io.InputStream.skipBuffer;
4297 if (n <= 0) {
4298 return 0;
4299 }while (remaining > 0) {
4300 nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining));
4301 if (nr < 0) {
4302 break;
4303 }remaining -= nr;
4304 }
4305 return n - remaining;
4306 }, "~N");
4307 Clazz_defineMethod (c$, "available", 
4308 function () {
4309 return 0;
4310 });
4311 Clazz_defineMethod (c$, "close", 
4312 function () {
4313 });
4314 Clazz_defineMethod (c$, "mark", 
4315 function (readlimit) {
4316 }, "~N");
4317 Clazz_defineMethod (c$, "reset", 
4318 function () {
4319 throw  new java.io.IOException ("mark/reset not supported");
4320 });
4321 Clazz_defineMethod (c$, "markSupported", 
4322 function () {
4323 return false;
4324 });
4325 Clazz_defineMethod (c$, "resetStream", 
4326 function () {
4327 });
4328 Clazz_defineStatics (c$,
4329 "SKIP_BUFFER_SIZE", 2048,
4330 "skipBuffer", null);
4331 });
4332 Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () {
4333 c$ = Clazz_decorateAsClass (function () {
4334 this.$in = null;
4335 this.cb = null;
4336 this.nChars = 0;
4337 this.nextChar = 0;
4338 this.markedChar = -1;
4339 this.readAheadLimit = 0;
4340 this.skipLF = false;
4341 this.markedSkipLF = false;
4342 Clazz_instantialize (this, arguments);
4343 }, java.io, "BufferedReader", java.io.Reader);
4344 Clazz_defineMethod (c$, "setSize", 
4345  function (sz) {
4346 if (sz <= 0) throw  new IllegalArgumentException ("Buffer size <= 0");
4347 this.cb =  Clazz_newCharArray (sz, '\0');
4348 this.nextChar = this.nChars = 0;
4349 }, "~N");
4350 Clazz_makeConstructor (c$, 
4351 function ($in) {
4352 Clazz_superConstructor (this, java.io.BufferedReader, [$in]);
4353 this.$in = $in;
4354 this.setSize (8192);
4355 }, "java.io.Reader");
4356 Clazz_defineMethod (c$, "ensureOpen", 
4357  function () {
4358 if (this.$in == null) throw  new java.io.IOException ("Stream closed");
4359 });
4360 Clazz_defineMethod (c$, "fill", 
4361  function () {
4362 var dst;
4363 if (this.markedChar <= -1) {
4364 dst = 0;
4365 } else {
4366 var delta = this.nextChar - this.markedChar;
4367 if (delta >= this.readAheadLimit) {
4368 this.markedChar = -2;
4369 this.readAheadLimit = 0;
4370 dst = 0;
4371 } else {
4372 if (this.readAheadLimit <= this.cb.length) {
4373 System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta);
4374 this.markedChar = 0;
4375 dst = delta;
4376 } else {
4377 var ncb =  Clazz_newCharArray (this.readAheadLimit, '\0');
4378 System.arraycopy (this.cb, this.markedChar, ncb, 0, delta);
4379 this.cb = ncb;
4380 this.markedChar = 0;
4381 dst = delta;
4382 }this.nextChar = this.nChars = delta;
4383 }}var n;
4384 do {
4385 n = this.$in.read (this.cb, dst, this.cb.length - dst);
4386 } while (n == 0);
4387 if (n > 0) {
4388 this.nChars = dst + n;
4389 this.nextChar = dst;
4390 }});
4391 Clazz_defineMethod (c$, "read1", 
4392  function (cbuf, off, len) {
4393 if (this.nextChar >= this.nChars) {
4394 if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) {
4395 return this.$in.read (cbuf, off, len);
4396 }this.fill ();
4397 }if (this.nextChar >= this.nChars) return -1;
4398 if (this.skipLF) {
4399 this.skipLF = false;
4400 if (this.cb[this.nextChar] == '\n') {
4401 this.nextChar++;
4402 if (this.nextChar >= this.nChars) this.fill ();
4403 if (this.nextChar >= this.nChars) return -1;
4404 }}var n = Math.min (len, this.nChars - this.nextChar);
4405 System.arraycopy (this.cb, this.nextChar, cbuf, off, n);
4406 this.nextChar += n;
4407 return n;
4408 }, "~A,~N,~N");
4409 Clazz_defineMethod (c$, "read", 
4410 function (cbuf, off, len) {
4411 {
4412 this.ensureOpen ();
4413 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4414 throw  new IndexOutOfBoundsException ();
4415 } else if (len == 0) {
4416 return 0;
4417 }var n = this.read1 (cbuf, off, len);
4418 if (n <= 0) return n;
4419 while ((n < len) && this.$in.ready ()) {
4420 var n1 = this.read1 (cbuf, off + n, len - n);
4421 if (n1 <= 0) break;
4422 n += n1;
4423 }
4424 return n;
4425 }}, "~A,~N,~N");
4426 Clazz_defineMethod (c$, "readLine1", 
4427  function (ignoreLF) {
4428 var s = null;
4429 var startChar;
4430 {
4431 this.ensureOpen ();
4432 var omitLF = ignoreLF || this.skipLF;
4433 for (; ; ) {
4434 if (this.nextChar >= this.nChars) this.fill ();
4435 if (this.nextChar >= this.nChars) {
4436 if (s != null && s.length () > 0) return s.toString ();
4437 return null;
4438 }var eol = false;
4439 var c = String.fromCharCode (0);
4440 var i;
4441 if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++;
4442 this.skipLF = false;
4443 omitLF = false;
4444 charLoop : for (i = this.nextChar; i < this.nChars; i++) {
4445 c = this.cb[i];
4446 if ((c == '\n') || (c == '\r')) {
4447 eol = true;
4448 break charLoop;
4449 }}
4450 startChar = this.nextChar;
4451 this.nextChar = i;
4452 if (eol) {
4453 var str;
4454 if (s == null) {
4455 str =  String.instantialize (this.cb, startChar, i - startChar);
4456 } else {
4457 s.appendCB (this.cb, startChar, i - startChar);
4458 str = s.toString ();
4459 }this.nextChar++;
4460 if (c == '\r') {
4461 this.skipLF = true;
4462 }return str;
4463 }if (s == null) s = JU.SB.newN (80);
4464 s.appendCB (this.cb, startChar, i - startChar);
4465 }
4466 }}, "~B");
4467 Clazz_defineMethod (c$, "readLine", 
4468 function () {
4469 return this.readLine1 (false);
4470 });
4471 Clazz_overrideMethod (c$, "skip", 
4472 function (n) {
4473 if (n < 0) {
4474 throw  new IllegalArgumentException ("skip value is negative");
4475 }{
4476 this.ensureOpen ();
4477 var r = n;
4478 while (r > 0) {
4479 if (this.nextChar >= this.nChars) this.fill ();
4480 if (this.nextChar >= this.nChars) break;
4481 if (this.skipLF) {
4482 this.skipLF = false;
4483 if (this.cb[this.nextChar] == '\n') {
4484 this.nextChar++;
4485 }}var d = this.nChars - this.nextChar;
4486 if (r <= d) {
4487 this.nextChar += r;
4488 r = 0;
4489 break;
4490 }r -= d;
4491 this.nextChar = this.nChars;
4492 }
4493 return n - r;
4494 }}, "~N");
4495 Clazz_defineMethod (c$, "ready", 
4496 function () {
4497 {
4498 this.ensureOpen ();
4499 if (this.skipLF) {
4500 if (this.nextChar >= this.nChars && this.$in.ready ()) {
4501 this.fill ();
4502 }if (this.nextChar < this.nChars) {
4503 if (this.cb[this.nextChar] == '\n') this.nextChar++;
4504 this.skipLF = false;
4505 }}return (this.nextChar < this.nChars) || this.$in.ready ();
4506 }});
4507 Clazz_overrideMethod (c$, "markSupported", 
4508 function () {
4509 return true;
4510 });
4511 Clazz_overrideMethod (c$, "mark", 
4512 function (readAheadLimit) {
4513 if (readAheadLimit < 0) {
4514 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4515 }{
4516 this.ensureOpen ();
4517 this.readAheadLimit = readAheadLimit;
4518 this.markedChar = this.nextChar;
4519 this.markedSkipLF = this.skipLF;
4520 }}, "~N");
4521 Clazz_overrideMethod (c$, "reset", 
4522 function () {
4523 {
4524 this.ensureOpen ();
4525 if (this.markedChar < 0) throw  new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked");
4526 this.nextChar = this.markedChar;
4527 this.skipLF = this.markedSkipLF;
4528 }});
4529 Clazz_defineMethod (c$, "close", 
4530 function () {
4531 {
4532 if (this.$in == null) return;
4533 this.$in.close ();
4534 this.$in = null;
4535 this.cb = null;
4536 }});
4537 Clazz_defineStatics (c$,
4538 "INVALIDATED", -2,
4539 "UNMARKED", -1,
4540 "DEFAULT_CHAR_BUFFER_SIZE", 8192,
4541 "DEFAULT_EXPECTED_LINE_LENGTH", 80);
4542 });
4543 Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4544 c$ = Clazz_decorateAsClass (function () {
4545 this.buf = null;
4546 this.pos = 0;
4547 this.$mark = 0;
4548 this.count = 0;
4549 Clazz_instantialize (this, arguments);
4550 }, java.io, "ByteArrayInputStream", java.io.InputStream);
4551 Clazz_makeConstructor (c$, 
4552 function (buf) {
4553 Clazz_superConstructor (this, java.io.ByteArrayInputStream, []);
4554 this.buf = buf;
4555 this.pos = 0;
4556 this.count = buf.length;
4557 }, "~A");
4558 Clazz_overrideMethod (c$, "readByteAsInt", 
4559 function () {
4560 return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
4561 });
4562 Clazz_overrideMethod (c$, "read", 
4563 function (b, off, len) {
4564 if (b == null) {
4565 throw  new NullPointerException ();
4566 }
4567     if (arguments.length == 1) { off = 0; len = b.length; }
4568
4569 if (off < 0 || len < 0 || len > b.length - off) {
4570 throw  new IndexOutOfBoundsException ();
4571 }if (this.pos >= this.count) {
4572 return -1;
4573 }var avail = this.count - this.pos;
4574 if (len > avail) {
4575 len = avail;
4576 }if (len <= 0) {
4577 return 0;
4578 }System.arraycopy (this.buf, this.pos, b, off, len);
4579 this.pos += len;
4580 return len;
4581 }, "~A,~N,~N");
4582 Clazz_overrideMethod (c$, "skip", 
4583 function (n) {
4584 var k = this.count - this.pos;
4585 if (n < k) {
4586 k = n < 0 ? 0 : n;
4587 }this.pos += k;
4588 return k;
4589 }, "~N");
4590 Clazz_overrideMethod (c$, "available", 
4591 function () {
4592 return this.count - this.pos;
4593 });
4594 Clazz_overrideMethod (c$, "markSupported", 
4595 function () {
4596 return true;
4597 });
4598 Clazz_overrideMethod (c$, "mark", 
4599 function (readAheadLimit) {
4600 this.$mark = this.pos;
4601 }, "~N");
4602 Clazz_overrideMethod (c$, "resetStream", 
4603 function () {
4604 });
4605 Clazz_overrideMethod (c$, "reset", 
4606 function () {
4607 this.pos = this.$mark;
4608 });
4609 Clazz_overrideMethod (c$, "close", 
4610 function () {
4611 });
4612 });
4613 Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () {
4614 c$ = Clazz_decorateAsClass (function () {
4615 this.lock = null;
4616 this.skipBuffer = null;
4617 Clazz_instantialize (this, arguments);
4618 }, java.io, "Reader", null, java.io.Closeable);
4619 Clazz_makeConstructor (c$, 
4620 function (lock) {
4621 if (lock == null) {
4622 throw  new NullPointerException ();
4623 }this.lock = lock;
4624 }, "~O");
4625 Clazz_defineMethod (c$, "skip", 
4626 function (n) {
4627 if (n < 0) throw  new IllegalArgumentException ("skip value is negative");
4628 var nn = Math.min (n, 8192);
4629 {
4630 if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer =  Clazz_newCharArray (nn, '\0');
4631 var r = n;
4632 while (r > 0) {
4633 var nc = this.read (this.skipBuffer, 0, Math.min (r, nn));
4634 if (nc == -1) break;
4635 r -= nc;
4636 }
4637 return n - r;
4638 }}, "~N");
4639 Clazz_defineMethod (c$, "ready", 
4640 function () {
4641 return false;
4642 });
4643 Clazz_defineMethod (c$, "markSupported", 
4644 function () {
4645 return false;
4646 });
4647 Clazz_defineMethod (c$, "mark", 
4648 function (readAheadLimit) {
4649 throw  new java.io.IOException ("mark() not supported");
4650 }, "~N");
4651 Clazz_defineMethod (c$, "reset", 
4652 function () {
4653 throw  new java.io.IOException ("reset() not supported");
4654 });
4655 Clazz_defineStatics (c$,
4656 "MAX_SKIP_BUFFE_SIZE", 8192);
4657 });
4658 Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {
4659 c$ = Clazz_decorateAsClass (function () {
4660 this.str = null;
4661 this.length = 0;
4662 this.next = 0;
4663 this.$mark = 0;
4664 Clazz_instantialize (this, arguments);
4665 }, java.io, "StringReader", java.io.Reader);
4666 Clazz_makeConstructor (c$, 
4667 function (s) {
4668 Clazz_superConstructor (this, java.io.StringReader, [s]);
4669 this.str = s;
4670 this.length = s.length;
4671 }, "~S");
4672 Clazz_defineMethod (c$, "ensureOpen", 
4673  function () {
4674 if (this.str == null) throw  new java.io.IOException ("Stream closed");
4675 });
4676 Clazz_overrideMethod (c$, "read", 
4677 function (cbuf, off, len) {
4678 {
4679 this.ensureOpen ();
4680 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4681 throw  new IndexOutOfBoundsException ();
4682 } else if (len == 0) {
4683 return 0;
4684 }if (this.next >= this.length) return -1;
4685 var n = Math.min (this.length - this.next, len);
4686 this.str.getChars (this.next, this.next + n, cbuf, off);
4687 this.next += n;
4688 return n;
4689 }}, "~A,~N,~N");
4690 Clazz_overrideMethod (c$, "skip", 
4691 function (ns) {
4692 {
4693 this.ensureOpen ();
4694 if (this.next >= this.length) return 0;
4695 var n = Math.min (this.length - this.next, ns);
4696 n = Math.max (-this.next, n);
4697 this.next += n;
4698 return n;
4699 }}, "~N");
4700 Clazz_overrideMethod (c$, "ready", 
4701 function () {
4702 {
4703 this.ensureOpen ();
4704 return true;
4705 }});
4706 Clazz_overrideMethod (c$, "markSupported", 
4707 function () {
4708 return true;
4709 });
4710 Clazz_overrideMethod (c$, "mark", 
4711 function (readAheadLimit) {
4712 if (readAheadLimit < 0) {
4713 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4714 }{
4715 this.ensureOpen ();
4716 this.$mark = this.next;
4717 }}, "~N");
4718 Clazz_overrideMethod (c$, "reset", 
4719 function () {
4720 {
4721 this.ensureOpen ();
4722 this.next = this.$mark;
4723 }});
4724 Clazz_overrideMethod (c$, "close", 
4725 function () {
4726 this.str = null;
4727 });
4728 });
4729 Clazz_declarePackage ("JU");
4730 Clazz_load (null, "JU.Base64", ["JU.SB"], function () {
4731 c$ = Clazz_declareType (JU, "Base64");
4732 c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", 
4733 function (bytes) {
4734 return JU.Base64.getBase64 (bytes).toBytes (0, -1);
4735 }, "~A");
4736 c$.getBase64 = Clazz_defineMethod (c$, "getBase64", 
4737 function (bytes) {
4738 var nBytes = bytes.length;
4739 var sout =  new JU.SB ();
4740 if (nBytes == 0) return sout;
4741 for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) {
4742 if (i % 75 == 0 && i != 0) sout.append ("\r\n");
4743 nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0);
4744 var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF);
4745 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F));
4746 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F));
4747 sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F));
4748 sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F));
4749 }
4750 return sout;
4751 }, "~A");
4752 c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", 
4753 function (strBase64) {
4754 var nBytes = 0;
4755 var ch;
4756 var pt0 = strBase64.indexOf (";base64,") + 1;
4757 if (pt0 > 0) pt0 += 7;
4758 var chars64 = strBase64.toCharArray ();
4759 var len64 = chars64.length;
4760 if (len64 == 0) return  Clazz_newByteArray (0, 0);
4761 for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0);
4762
4763 nBytes = nBytes >> 2;
4764 var bytes =  Clazz_newByteArray (nBytes, 0);
4765 var offset = 18;
4766 for (var i = pt0, pt = 0, b = 0; i < len64; i++) {
4767 if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) {
4768 b |= JU.Base64.decode64[ch] << offset;
4769 offset -= 6;
4770 if (offset < 0) {
4771 bytes[pt++] = ((b & 0xFF0000) >> 16);
4772 if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8);
4773 if (pt < nBytes) bytes[pt++] = (b & 0xFF);
4774 offset = 18;
4775 b = 0;
4776 }}}
4777 return bytes;
4778 }, "~S");
4779 Clazz_defineStatics (c$,
4780 "base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
4781 "decode64",  Clazz_newIntArray (-1, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 0, 62, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 63, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0]));
4782 });
4783 Clazz_declarePackage ("JU");
4784 Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () {
4785 c$ = Clazz_declareType (JU, "Encoding", Enum);
4786 Clazz_defineEnumConstant (c$, "NONE", 0, []);
4787 Clazz_defineEnumConstant (c$, "UTF8", 1, []);
4788 Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []);
4789 Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []);
4790 Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []);
4791 Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []);
4792 });
4793 Clazz_declarePackage ("java.util");
4794 Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () {
4795 c$ = Clazz_decorateAsClass (function () {
4796 this.className = null;
4797 this.key = null;
4798 Clazz_instantialize (this, arguments);
4799 }, java.util, "MissingResourceException", RuntimeException);
4800 Clazz_makeConstructor (c$, 
4801 function (s, className, key) {
4802 Clazz_superConstructor (this, java.util.MissingResourceException, [s]);
4803 this.className = className;
4804 this.key = key;
4805 }, "~S,~S,~S");
4806 Clazz_makeConstructor (c$, 
4807 function (message, className, key, cause) {
4808 Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]);
4809 this.className = className;
4810 this.key = key;
4811 }, "~S,~S,~S,Throwable");
4812 Clazz_defineMethod (c$, "getClassName", 
4813 function () {
4814 return this.className;
4815 });
4816 Clazz_defineMethod (c$, "getKey", 
4817 function () {
4818 return this.key;
4819 });
4820 });
4821 Clazz_declarePackage ("jssun.misc");
4822 Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () {
4823 c$ = Clazz_declareType (jssun.misc, "MessageUtils");
4824 Clazz_makeConstructor (c$, 
4825 function () {
4826 });
4827 c$.subst = Clazz_defineMethod (c$, "subst", 
4828 function (patt, arg) {
4829 var args =  Clazz_newArray (-1, [arg]);
4830 return jssun.misc.MessageUtils.subst (patt, args);
4831 }, "~S,~S");
4832 c$.subst = Clazz_defineMethod (c$, "subst", 
4833 function (patt, arg1, arg2) {
4834 var args =  Clazz_newArray (-1, [arg1, arg2]);
4835 return jssun.misc.MessageUtils.subst (patt, args);
4836 }, "~S,~S,~S");
4837 c$.subst = Clazz_defineMethod (c$, "subst", 
4838 function (patt, arg1, arg2, arg3) {
4839 var args =  Clazz_newArray (-1, [arg1, arg2, arg3]);
4840 return jssun.misc.MessageUtils.subst (patt, args);
4841 }, "~S,~S,~S,~S");
4842 c$.subst = Clazz_defineMethod (c$, "subst", 
4843 function (patt, args) {
4844 var result =  new StringBuffer ();
4845 var len = patt.length;
4846 for (var i = 0; i >= 0 && i < len; i++) {
4847 var ch = patt.charAt (i);
4848 if (ch == '%') {
4849 if (i != len) {
4850 var index = Character.digit (patt.charAt (i + 1), 10);
4851 if (index == -1) {
4852 result.append (patt.charAt (i + 1));
4853 i++;
4854 } else if (index < args.length) {
4855 result.append (args[index]);
4856 i++;
4857 }}} else {
4858 result.append (ch);
4859 }}
4860 return result.toString ();
4861 }, "~S,~A");
4862 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4863 function (propName, arg) {
4864 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg);
4865 }, "~S,~S");
4866 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4867 function (propName, arg1, arg2) {
4868 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2);
4869 }, "~S,~S,~S");
4870 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4871 function (propName, arg1, arg2, arg3) {
4872 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3);
4873 }, "~S,~S,~S,~S");
4874 c$.toStderr = Clazz_defineMethod (c$, "toStderr", 
4875 function (msg) {
4876 {
4877 System.out.println(msg);
4878 }}, "~S");
4879 c$.toStdout = Clazz_defineMethod (c$, "toStdout", 
4880 function (msg) {
4881 {
4882 System.out.println(msg);
4883 }}, "~S");
4884 c$.err = Clazz_defineMethod (c$, "err", 
4885 function (s) {
4886 jssun.misc.MessageUtils.toStderr (s + "\n");
4887 }, "~S");
4888 c$.out = Clazz_defineMethod (c$, "out", 
4889 function (s) {
4890 jssun.misc.MessageUtils.toStdout (s + "\n");
4891 }, "~S");
4892 c$.where = Clazz_defineMethod (c$, "where", 
4893 function () {
4894 {
4895 System.out.println(Clazz_getStackTrace());
4896 }});
4897 });
4898 Clazz_declarePackage ("java.awt");
4899 Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () {
4900 c$ = Clazz_decorateAsClass (function () {
4901 this.width = 0;
4902 this.height = 0;
4903 Clazz_instantialize (this, arguments);
4904 }, java.awt, "Dimension", java.awt.geom.Dimension2D);
4905 Clazz_makeConstructor (c$, 
4906 function () {
4907 this.construct (0, 0);
4908 });
4909 Clazz_makeConstructor (c$, 
4910 function (d) {
4911 this.construct (d.width, d.height);
4912 }, "java.awt.Dimension");
4913 Clazz_makeConstructor (c$, 
4914 function (width, height) {
4915 Clazz_superConstructor (this, java.awt.Dimension, []);
4916 this.width = width;
4917 this.height = height;
4918 }, "~N,~N");
4919 Clazz_overrideMethod (c$, "getWidth", 
4920 function () {
4921 return this.width;
4922 });
4923 Clazz_overrideMethod (c$, "getHeight", 
4924 function () {
4925 return this.height;
4926 });
4927 Clazz_defineMethod (c$, "setSize", 
4928 function (width, height) {
4929 this.width = Clazz_doubleToInt (Math.ceil (width));
4930 this.height = Clazz_doubleToInt (Math.ceil (height));
4931 }, "~N,~N");
4932 Clazz_defineMethod (c$, "getSize", 
4933 function () {
4934 return  new java.awt.Dimension (this.width, this.height);
4935 });
4936 Clazz_defineMethod (c$, "setSize", 
4937 function (d) {
4938 this.setSize (d.width, d.height);
4939 }, "java.awt.Dimension");
4940 Clazz_defineMethod (c$, "setSize", 
4941 function (width, height) {
4942 this.width = width;
4943 this.height = height;
4944 }, "~N,~N");
4945 Clazz_overrideMethod (c$, "equals", 
4946 function (obj) {
4947 if (Clazz_instanceOf (obj, java.awt.Dimension)) {
4948 var d = obj;
4949 return (this.width == d.width) && (this.height == d.height);
4950 }return false;
4951 }, "~O");
4952 Clazz_overrideMethod (c$, "hashCode", 
4953 function () {
4954 var sum = this.width + this.height;
4955 return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width;
4956 });
4957 Clazz_overrideMethod (c$, "toString", 
4958 function () {
4959 return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]";
4960 });
4961 });
4962 Clazz_declarePackage ("java.awt.geom");
4963 Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () {
4964 c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable);
4965 Clazz_makeConstructor (c$, 
4966 function () {
4967 });
4968 Clazz_defineMethod (c$, "setSize", 
4969 function (d) {
4970 this.setSize (d.getWidth (), d.getHeight ());
4971 }, "java.awt.geom.Dimension2D");
4972 Clazz_defineMethod (c$, "clone", 
4973 function () {
4974 try {
4975 return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []);
4976 } catch (e) {
4977 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
4978 throw  new InternalError ();
4979 } else {
4980 throw e;
4981 }
4982 }
4983 });
4984 });
4985 Clazz_declarePackage ("java.awt");
4986 Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () {
4987 c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container);
4988 Clazz_makeConstructor (c$, 
4989 function () {
4990 Clazz_superConstructor (this, java.awt.Panel, []);
4991 this.setPanel ();
4992 });
4993 Clazz_defineMethod (c$, "setPanel", 
4994 function () {
4995 this.setAppContext ();
4996 this.setLayout ( new java.awt.FlowLayout ());
4997 });
4998 Clazz_makeConstructor (c$, 
4999 function (layout) {
5000 Clazz_superConstructor (this, java.awt.Panel, []);
5001 if (layout == null) layout =  new java.awt.FlowLayout ();
5002 this.setAppContext ();
5003 this.setLayout (layout);
5004 }, "java.awt.LayoutManager");
5005 Clazz_overrideMethod (c$, "constructComponentName", 
5006 function () {
5007 {
5008 return "panel" + java.awt.Panel.nameCounter++;
5009 }});
5010 Clazz_defineMethod (c$, "addNotify", 
5011 function () {
5012 if (this.peer == null) this.peer = this.getToolkit ().createPanel (this);
5013 Clazz_superCall (this, java.awt.Panel, "addNotify", []);
5014 });
5015 Clazz_defineStatics (c$,
5016 "base", "panel",
5017 "nameCounter", 0);
5018 });
5019 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){
5020 c$=Clazz_decorateAsClass(function(){
5021 this.firstIndex=0;
5022 this.lastIndex=0;
5023 this.array=null;
5024 Clazz_instantialize(this,arguments);
5025 },java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
5026
5027 Clazz_overrideConstructor(c$,
5028 function(){
5029 this.setup(0);
5030 });
5031
5032 Clazz_defineMethod(c$, "setup",
5033 function(capacity){
5034 //Clazz_superConstructor(this,java.util.ArrayList,[]);
5035 this.firstIndex=this.lastIndex=0;
5036 try{
5037 this.array=this.newElementArray(capacity);
5038 }catch(e){
5039 if(Clazz_instanceOf(e,NegativeArraySizeException)){
5040 throw new IllegalArgumentException();
5041 }else{
5042 throw e;
5043 }
5044 }
5045 },"~N");
5046 /*
5047 Clazz_makeConstructor(c$,
5048 function(collection){
5049 Clazz_superConstructor(this,java.util.ArrayList,[]);
5050 var size=collection.size();
5051 this.firstIndex=this.lastIndex=0;
5052 this.array=this.newElementArray(size+(Math.floor(size/10)));
5053 this.addAll(collection);
5054 },"java.util.Collection");
5055
5056 */
5057
5058 Clazz_defineMethod(c$,"newElementArray",
5059 ($fz=function(size){
5060 return new Array(size);
5061 },$fz.isPrivate=true,$fz),"~N");
5062
5063 Clazz_overrideMethod(c$,"add",
5064 function(location,object){
5065
5066 if (arguments.length == 1) {
5067         // coming from Java methods, e.g. Collections.list()
5068         // location is actually the object
5069         return this.add1(location);
5070 }
5071 var size=this.size();
5072 if(0<location&&location<size){
5073 if(this.firstIndex==0&&this.lastIndex==this.array.length){
5074 this.growForInsert(location,1);
5075 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex==this.array.length){
5076 System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location);
5077 }else{
5078 var index=location+this.firstIndex;
5079 System.arraycopy(this.array,index,this.array,index+1,size-location);
5080 this.lastIndex++;
5081 }this.array[location+this.firstIndex]=object;
5082 }else if(location==0){
5083 if(this.firstIndex==0){
5084 this.growAtFront(1);
5085 }this.array[--this.firstIndex]=object;
5086 }else if(location==size){
5087 if(this.lastIndex==this.array.length){
5088 this.growAtEnd(1);
5089 }this.array[this.lastIndex++]=object;
5090 }else{
5091 throw new IndexOutOfBoundsException();
5092 }this.modCount++;
5093 },"~N,~O");
5094
5095 Clazz_overrideMethod(c$,"add1",
5096 function(object){
5097 if(this.lastIndex==this.array.length){
5098 this.growAtEnd(1);
5099 }this.array[this.lastIndex++]=object;
5100 this.modCount++;
5101 return true;
5102 },"~O");
5103
5104 /* BH disallow addAll(int,List)
5105  * 
5106 Clazz_defineMethod(c$,"addAll",
5107 function(location,collection){
5108 var size=this.size();
5109 if(location<0||location>size){
5110 throw new IndexOutOfBoundsException();
5111 }var growSize=collection.size();
5112 if(0<location&&location<size){
5113 if(this.array.length-size<growSize){
5114 this.growForInsert(location,growSize);
5115 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex>this.array.length-growSize){
5116 var newFirst=this.firstIndex-growSize;
5117 if(newFirst<0){
5118 var index=location+this.firstIndex;
5119 System.arraycopy(this.array,index,this.array,index-newFirst,size-location);
5120 this.lastIndex-=newFirst;
5121 newFirst=0;
5122 }System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location);
5123 this.firstIndex=newFirst;
5124 }else{
5125 var index=location+this.firstIndex;
5126 System.arraycopy(this.array,index,this.array,index+growSize,size-location);
5127 this.lastIndex+=growSize;
5128 }}else if(location==0){
5129 this.growAtFront(growSize);
5130 this.firstIndex-=growSize;
5131 }else if(location==size){
5132 if(this.lastIndex>this.array.length-growSize){
5133 this.growAtEnd(growSize);
5134 }this.lastIndex+=growSize;
5135 }if(growSize>0){
5136 var it=collection.iterator();
5137 var index=location+this.firstIndex;
5138 var end=index+growSize;
5139 while(index<end){
5140 this.array[index++]=it.next();
5141 }
5142 this.modCount++;
5143 return true;
5144 }return false;
5145 },"~N,java.util.Collection");
5146
5147  */
5148
5149 Clazz_overrideMethod(c$,"addAll",
5150 function(collection){
5151 var growSize=collection.size();
5152 if(growSize>0){
5153         if(this.lastIndex>this.array.length-growSize){
5154                 this.growAtEnd(growSize);
5155 }
5156 var it=collection.iterator();
5157 var end=this.lastIndex+growSize;
5158 while(this.lastIndex<end){
5159         this.array[this.lastIndex++]=it.next();
5160 }
5161 this.modCount++;
5162 return true;
5163 }return false;
5164 },"java.util.Collection");
5165
5166 Clazz_overrideMethod(c$,"clear",
5167 function(){
5168 if(this.firstIndex!=this.lastIndex){
5169 this.fill(this.firstIndex,this.lastIndex);
5170 this.firstIndex=this.lastIndex=0;
5171 this.modCount++;
5172 }});
5173
5174 Clazz_defineMethod(c$,"fill", function(i1, i2) { // BH
5175 for (var i = i2; --i >= i1;)
5176 this.array[i] = null;
5177 },"~N,~N");
5178
5179 Clazz_defineMethod(c$,"clone",
5180 function(){
5181 try{
5182 var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]);
5183 newList.array=this.array.clone();
5184 return newList;
5185 }catch(e){
5186 if(Clazz_instanceOf(e,CloneNotSupportedException)){
5187 return null;
5188 }else{
5189 throw e;
5190 }
5191 }
5192 });
5193 Clazz_overrideMethod(c$,"contains",
5194 function(object){
5195 if(object!=null){
5196 for(var i=this.firstIndex;i<this.lastIndex;i++){
5197 if(object.equals(this.array[i])){
5198 return true;
5199 }}
5200 }else{
5201 for(var i=this.firstIndex;i<this.lastIndex;i++){
5202 if(this.array[i]==null){
5203 return true;
5204 }}
5205 }return false;
5206 },"~O");
5207 Clazz_defineMethod(c$,"ensureCapacity",
5208 function(minimumCapacity){
5209 if(this.array.length<minimumCapacity){
5210 if(this.firstIndex>0){
5211 this.growAtFront(minimumCapacity-this.array.length);
5212 }else{
5213 this.growAtEnd(minimumCapacity-this.array.length);
5214 }}},"~N");
5215 Clazz_overrideMethod(c$,"get",
5216 function(location){
5217 if(0<=location&&location<this.size()){
5218 return this.array[this.firstIndex+location];
5219 }throw new IndexOutOfBoundsException();
5220 },"~N");
5221
5222
5223 Clazz_defineMethod(c$,"growAtEnd",
5224 ($fz=function(required){
5225 var size=this.size();
5226 if(this.firstIndex>=required-(this.array.length-this.lastIndex)){
5227         var newLast=this.lastIndex-this.firstIndex;
5228         if(size>0){
5229                 System.arraycopy(this.array,this.firstIndex,this.array,0,size);
5230                 var start=newLast<this.firstIndex?this.firstIndex:newLast;
5231                 this.fill(start,this.array.length);
5232         }
5233         this.firstIndex=0;
5234         this.lastIndex=newLast;
5235 }else{
5236         var increment=Math.floor(size/2);
5237         if(required>increment){
5238                 increment=required;
5239         }
5240         if(increment<12){
5241                 increment=12;
5242         }
5243         var newArray=this.newElementArray(size+increment);
5244         if(size>0){
5245                 System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size);
5246         }
5247         this.array=newArray;
5248 }
5249
5250 },$fz.isPrivate=true,$fz),"~N");
5251 Clazz_defineMethod(c$,"growAtFront",
5252 ($fz=function(required){
5253 var size=this.size();
5254 if(this.array.length-this.lastIndex>=required){
5255 var newFirst=this.array.length-size;
5256 if(size>0){
5257 System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size);
5258 var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size;
5259 this.fill(this.firstIndex,length);
5260 }this.firstIndex=newFirst;
5261 this.lastIndex=this.array.length;
5262 }else{
5263 var increment=Math.floor(size/2);
5264 if(required>increment){
5265 increment=required;
5266 }if(increment<12){
5267 increment=12;
5268 }var newArray=this.newElementArray(size+increment);
5269 if(size>0){
5270 System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size);
5271 }this.firstIndex=newArray.length-size;
5272 this.lastIndex=newArray.length;
5273 this.array=newArray;
5274 }},$fz.isPrivate=true,$fz),"~N");
5275 Clazz_defineMethod(c$,"growForInsert",
5276 ($fz=function(location,required){
5277 var size=this.size();
5278 var increment=Math.floor(size/2);
5279 if(required>increment){
5280 increment=required;
5281 }if(increment<12){
5282 increment=12;
5283 }var newArray=this.newElementArray(size+increment);
5284 if(location<Math.floor(size/2)){
5285 var newFirst=newArray.length-(size+required);
5286 System.arraycopy(this.array,location,newArray,location+increment,size-location);
5287 System.arraycopy(this.array,this.firstIndex,newArray,newFirst,location);
5288 this.firstIndex=newFirst;
5289 this.lastIndex=newArray.length;
5290 }else{
5291 System.arraycopy(this.array,this.firstIndex,newArray,0,location);
5292 System.arraycopy(this.array,location,newArray,location+required,size-location);
5293 this.firstIndex=0;
5294 this.lastIndex+=required;
5295 }this.array=newArray;
5296 },$fz.isPrivate=true,$fz),"~N,~N");
5297 Clazz_overrideMethod(c$,"indexOf",
5298 function(object){
5299 if(object!=null){
5300 for(var i=this.firstIndex;i<this.lastIndex;i++){
5301 if(object.equals(this.array[i])){
5302 return i-this.firstIndex;
5303 }}
5304 }else{
5305 for(var i=this.firstIndex;i<this.lastIndex;i++){
5306 if(this.array[i]==null){
5307 return i-this.firstIndex;
5308 }}
5309 }return-1;
5310 },"~O");
5311 Clazz_overrideMethod(c$,"isEmpty",
5312 function(){
5313 return this.lastIndex==this.firstIndex;
5314 });
5315 Clazz_overrideMethod(c$,"lastIndexOf",
5316 function(object){
5317 if(object!=null){
5318 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5319 if(object.equals(this.array[i])){
5320 return i-this.firstIndex;
5321 }}
5322 }else{
5323 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5324 if(this.array[i]==null){
5325 return i-this.firstIndex;
5326 }}
5327 }return-1;
5328 },"~O");
5329 Clazz_overrideMethod(c$,"remove",
5330 function(location){
5331 if (0 + location != location)return this.removeObject(location)
5332 var result;
5333 var size=this.size();
5334 if(0<=location&&location<size){
5335 if(location==size-1){
5336 result=this.array[--this.lastIndex];
5337 this.array[this.lastIndex]=null;
5338 }else if(location==0){
5339 result=this.array[this.firstIndex];
5340 this.array[this.firstIndex++]=null;
5341 }else{
5342 var elementIndex=this.firstIndex+location;
5343 result=this.array[elementIndex];
5344 if(location<Math.floor(size/2)){
5345 System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,location);
5346 this.array[this.firstIndex++]=null;
5347 }else{
5348 System.arraycopy(this.array,elementIndex+1,this.array,elementIndex,size-location-1);
5349 this.array[--this.lastIndex]=null;
5350 }}}else{
5351 throw new IndexOutOfBoundsException();
5352 }this.modCount++;
5353 return result;
5354 },"~N"); 
5355
5356 Clazz_defineMethod(c$, "removeObject", function(o) {
5357         var i = this.indexOf(o);
5358         if (i < 0)return null;
5359         return this.remove(i);
5360 }, "~O");
5361
5362 Clazz_overrideMethod(c$,"removeRange",
5363 function(start,end){
5364 if(start>=0&&start<=end&&end<=this.size()){
5365 if(start==end){
5366 return;
5367 }var size=this.size();
5368 if(end==size){
5369         this.fill(this.firstIndex+start,this.lastIndex);
5370 this.lastIndex=this.firstIndex+start;
5371 }else if(start==0){
5372         this.fill(this.firstIndex,this.firstIndex+end);
5373 this.firstIndex+=end;
5374 }else{
5375 System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end);
5376 var newLast=this.lastIndex+start-end;
5377 this.fill(newLast,this.lastIndex);
5378 this.lastIndex=newLast;
5379 }this.modCount++;
5380 }else{
5381 throw new IndexOutOfBoundsException();
5382 }},"~N,~N");
5383 Clazz_overrideMethod(c$,"set",
5384 function(location,object){
5385 if(0<=location&&location<this.size()){
5386 var result=this.array[this.firstIndex+location];
5387 this.array[this.firstIndex+location]=object;
5388 return result;
5389 }throw new IndexOutOfBoundsException();
5390 },"~N,~O");
5391 Clazz_overrideMethod(c$,"size",
5392 function(){
5393 return this.lastIndex-this.firstIndex;
5394 });
5395 /*
5396 Clazz_defineMethod(c$,"toArray",
5397 function(){
5398 var size=this.size();
5399 var result=new Array(size);
5400 System.arraycopy(this.array,this.firstIndex,result,0,size);
5401 return result;
5402 });
5403 */
5404
5405 Clazz_overrideMethod(c$,"toArray",
5406 function(contents){
5407 var size=this.size();
5408 if(!contents || size>contents.length)
5409         contents= new Array(size);
5410 System.arraycopy(this.array,this.firstIndex,contents,0,size);
5411 if(size<contents.length){
5412 contents[size]=null;
5413 }return contents;
5414 },"~O");
5415 Clazz_defineMethod(c$,"trimToSize",
5416 function(){
5417 var size=this.size();
5418 var newArray=this.newElementArray(size);
5419 System.arraycopy(this.array,this.firstIndex,newArray,0,size);
5420 this.array=newArray;
5421 this.firstIndex=0;
5422 this.lastIndex=this.array.length;
5423 });
5424 });
5425 // BH 8/25/2014 1:10:59 AM  - removed indirect access/inner class business.
5426
5427 Clazz_load(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess","$.NoSuchElementException"],"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){
5428 c$=Clazz_decorateAsClass(function(){
5429 this.modCount=0;
5430
5431
5432
5433 //if(!Clazz_isClassDefined("java.util.AbstractList.SimpleListIterator")){
5434 //java.util.AbstractList.$AbstractList$SimpleListIterator$();
5435 //}
5436 //if(!Clazz_isClassDefined("java.util.AbstractList.FullListIterator")){
5437 //java.util.AbstractList.$AbstractList$FullListIterator$();
5438 //}
5439
5440
5441
5442 Clazz_instantialize(this,arguments);
5443 },java.util,"AbstractList",java.util.AbstractCollection,java.util.List);
5444 Clazz_defineMethod(c$,"add",
5445 function(location,object){
5446 throw new UnsupportedOperationException();
5447 },"~N,~O");
5448 Clazz_defineMethod(c$,"add",
5449 function(object){
5450 this.add(this.size(),object);
5451 return true;
5452 },"~O");
5453 Clazz_defineMethod(c$,"addAll",
5454 function(location,collection){
5455 var it=collection.iterator();
5456 while(it.hasNext()){
5457 this.add(location++,it.next());
5458 }
5459 return!collection.isEmpty();
5460 },"~N,java.util.Collection");
5461 Clazz_overrideMethod(c$,"clear",
5462 function(){
5463 this.removeRange(0,this.size());
5464 });
5465 Clazz_overrideMethod(c$,"equals",
5466 function(object){
5467 if(this===object){
5468 return true;
5469 }if(Clazz_instanceOf(object,java.util.List)){
5470 var list=object;
5471 if(list.size()!=this.size()){
5472 return false;
5473 }var it1=this.iterator();
5474 var it2=list.iterator();
5475 while(it1.hasNext()){
5476 var e1=it1.next();
5477 var e2=it2.next();
5478 if(!(e1==null?e2==null:e1.equals(e2))){
5479 return false;
5480 }}
5481 return true;
5482 }return false;
5483 },"~O");
5484 Clazz_overrideMethod(c$,"hashCode",
5485 function(){
5486 var result=1;
5487 var it=this.iterator();
5488 while(it.hasNext()){
5489 var object=it.next();
5490 result=(31*result)+(object==null?0:object.hashCode());
5491 }
5492 return result;
5493 });
5494 Clazz_overrideMethod(c$,"indexOf",
5495 function(object){
5496 var it=this.listIterator();
5497 if(object!=null){
5498 while(it.hasNext()){
5499 if(object.equals(it.next())){
5500 return it.previousIndex();
5501 }}
5502 }else{
5503 while(it.hasNext()){
5504 if(it.next()==null){
5505 return it.previousIndex();
5506 }}
5507 }return-1;
5508 },"~O");
5509 Clazz_overrideMethod(c$,"iterator",
5510 function(){
5511 return new java.util.AbstractListSimpleListIterator(this); // Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null);
5512 });
5513 Clazz_overrideMethod(c$,"lastIndexOf",
5514 function(object){
5515 var it=this.listIterator(this.size());
5516 if(object!=null){
5517 while(it.hasPrevious()){
5518 if(object.equals(it.previous())){
5519 return it.nextIndex();
5520 }}
5521 }else{
5522 while(it.hasPrevious()){
5523 if(it.previous()==null){
5524 return it.nextIndex();
5525 }}
5526 }return-1;
5527 },"~O");
5528 //Clazz_defineMethod(c$,"listIterator",
5529 //function(){
5530 //return this.listIterator(0);
5531 //});
5532 Clazz_defineMethod(c$,"listIterator",
5533 function(location){
5534 location || (location = 0);
5535 return new java.util.AbstractListFullListIterator(this, location);//Clazz_innerTypeInstance(java.util.AbstractList.FullListIterator,this,null,location);
5536 },"~N");
5537 Clazz_defineMethod(c$,"remove",
5538 function(location){
5539 throw new UnsupportedOperationException();
5540 },"~N");
5541 Clazz_defineMethod(c$,"removeRange",
5542 function(start,end){
5543 var it=this.listIterator(start);
5544 for(var i=start;i<end;i++){
5545 it.next();
5546 it.remove();
5547 }
5548 },"~N,~N");
5549 Clazz_overrideMethod(c$,"set",
5550 function(location,object){
5551 throw new UnsupportedOperationException();
5552 },"~N,~O");
5553 Clazz_overrideMethod(c$,"subList",
5554 function(start,end){
5555 if(0<=start&&end<=this.size()){
5556 if(start<=end){
5557 if(Clazz_instanceOf(this,java.util.RandomAccess)){
5558 return new java.util.AbstractList.SubAbstractListRandomAccess(this,start,end);
5559 }return new java.util.AbstractList.SubAbstractList(this,start,end);
5560 }throw new IllegalArgumentException();
5561 }throw new IndexOutOfBoundsException();
5562 },"~N,~N");
5563
5564
5565
5566 //c$.$AbstractList$SimpleListIterator$=function(){
5567
5568 Clazz_pu$h(self.c$);
5569
5570 c$=Clazz_decorateAsClass(function(){
5571 //Clazz_prepareCallback(this,arguments);
5572 this.pos=-1;
5573 this.expectedModCount=0;
5574 this.lastPosition=-1;
5575 Clazz_instantialize(this,arguments);
5576 },java.util,"AbstractListSimpleListIterator",null,java.util.Iterator);
5577
5578
5579 Clazz_makeConstructor(c$,
5580 function(a){
5581 this._list = a;
5582 this.expectedModCount=a.modCount;
5583 }, "java.util.AbstractList");
5584
5585 Clazz_overrideMethod(c$,"hasNext",
5586 function(){
5587 return this.pos+1<this._list.size();
5588 });
5589 Clazz_overrideMethod(c$,"next",
5590 function(){
5591 if(this.expectedModCount==this._list.modCount){
5592 try{
5593 var a=this._list.get(this.pos+1);
5594 this.lastPosition=++this.pos;
5595 return a;
5596 }catch(e){
5597 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5598 throw new java.util.NoSuchElementException();
5599 }else{
5600 throw e;
5601 }
5602 }
5603 }throw new java.util.ConcurrentModificationException();
5604 });
5605 Clazz_overrideMethod(c$,"remove",
5606 function(){
5607 if(this.expectedModCount==this._list.modCount){
5608 try{
5609 this._list.remove(this.lastPosition);
5610 }catch(e){
5611 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5612 throw new IllegalStateException();
5613 }else{
5614 throw e;
5615 }
5616 }
5617 if(this._list.modCount!=this.expectedModCount){
5618 this.expectedModCount++;
5619 }if(this.pos==this.lastPosition){
5620 this.pos--;
5621 }this.lastPosition=-1;
5622 }else{
5623 throw new java.util.ConcurrentModificationException();
5624 }});
5625
5626 c$=Clazz_p0p();
5627 //};
5628
5629
5630 //c$.$AbstractList$FullListIterator$=function(){
5631 Clazz_pu$h(self.c$);
5632 c$=Clazz_decorateAsClass(function(){
5633 //Clazz_prepareCallback(this,arguments);
5634 Clazz_instantialize(this,arguments);
5635 },java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);
5636
5637 //,Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null,Clazz_inheritArgs));
5638
5639 Clazz_makeConstructor(c$,
5640 function(a,b){
5641 Clazz_superConstructor(this,java.util.AbstractListFullListIterator,[a]);
5642 if(0<=b&&b<=this._list.size()){
5643 this.pos=b-1;
5644 }else{
5645 throw new IndexOutOfBoundsException();
5646 }},"java.util.AbstractList,~N");
5647 Clazz_overrideMethod(c$,"add",
5648 function(a){
5649 if(this.expectedModCount==this._list.modCount){
5650 try{
5651 this._list.add(this.pos+1,a);
5652 }catch(e){
5653 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5654 throw new java.util.NoSuchElementException();
5655 }else{
5656 throw e;
5657 }
5658 }
5659 this.pos++;
5660 this.lastPosition=-1;
5661 if(this._list.modCount!=this.expectedModCount){
5662 this.expectedModCount++;
5663 }}else{
5664 throw new java.util.ConcurrentModificationException();
5665 }},"~O");
5666 Clazz_overrideMethod(c$,"hasPrevious",
5667 function(){
5668 return this.pos>=0;
5669 });
5670 Clazz_overrideMethod(c$,"nextIndex",
5671 function(){
5672 return this.pos+1;
5673 });
5674 Clazz_overrideMethod(c$,"previous",
5675 function(){
5676 if(this.expectedModCount==this._list.modCount){
5677 try{
5678 var a=this._list.get(this.pos);
5679 this.lastPosition=this.pos;
5680 this.pos--;
5681 return a;
5682 }catch(e){
5683 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5684 throw new java.util.NoSuchElementException();
5685 }else{
5686 throw e;
5687 }
5688 }
5689 }throw new java.util.ConcurrentModificationException();
5690 });
5691 Clazz_overrideMethod(c$,"previousIndex",
5692 function(){
5693 return this.pos;
5694 });
5695 Clazz_overrideMethod(c$,"set",
5696 function(a){
5697 if(this.expectedModCount==this._list.modCount){
5698 try{
5699 this._list.set(this.lastPosition,a);
5700 }catch(e){
5701 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5702 throw new IllegalStateException();
5703 }else{
5704 throw e;
5705 }
5706 }
5707 }else{
5708 throw new java.util.ConcurrentModificationException();
5709 }},"~O");
5710 c$=Clazz_p0p();
5711 //};
5712
5713
5714
5715
5716 Clazz_pu$h(self.c$);
5717 c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);
5718 c$=Clazz_p0p();
5719
5720
5721
5722
5723 Clazz_pu$h(self.c$);
5724 c$=Clazz_decorateAsClass(function(){
5725 this.fullList=null;
5726 this.offset=0;
5727 this.$size=0;
5728 Clazz_instantialize(this,arguments);
5729 },java.util.AbstractList,"SubAbstractList",java.util.AbstractList);
5730 Clazz_makeConstructor(c$,
5731 function(a,b,c){
5732 Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList);
5733 this.fullList=a;
5734 this.modCount=this.fullList.modCount;
5735 this.offset=b;
5736 this.$size=c-b;
5737 },"java.util.AbstractList,~N,~N");
5738 Clazz_defineMethod(c$,"add",
5739 function(a,b){
5740 if(this.modCount==this.fullList.modCount){
5741 if(0<=a&&a<=this.$size){
5742 this.fullList.add(a+this.offset,b);
5743 this.$size++;
5744 this.modCount=this.fullList.modCount;
5745 }else{
5746 throw new IndexOutOfBoundsException();
5747 }}else{
5748 throw new java.util.ConcurrentModificationException();
5749 }},"~N,~O");
5750 Clazz_defineMethod(c$,"addAll",
5751 function(a,b){
5752 if(this.modCount==this.fullList.modCount){
5753 if(0<=a&&a<=this.$size){
5754 var c=this.fullList.addAll(a+this.offset,b);
5755 if(c){
5756 this.$size+=b.size();
5757 this.modCount=this.fullList.modCount;
5758 }return c;
5759 }throw new IndexOutOfBoundsException();
5760 }throw new java.util.ConcurrentModificationException();
5761 },"~N,java.util.Collection");
5762 Clazz_defineMethod(c$,"addAll",
5763 function(a){
5764 if(this.modCount==this.fullList.modCount){
5765 var b=this.fullList.addAll(this.offset+this.$size,a);
5766 if(b){
5767 this.$size+=a.size();
5768 this.modCount=this.fullList.modCount;
5769 }return b;
5770 }throw new java.util.ConcurrentModificationException();
5771 },"java.util.Collection");
5772 Clazz_defineMethod(c$,"get",
5773 function(a){
5774 if(this.modCount==this.fullList.modCount){
5775 if(0<=a&&a<this.$size){
5776 return this.fullList.get(a+this.offset);
5777 }throw new IndexOutOfBoundsException();
5778 }throw new java.util.ConcurrentModificationException();
5779 },"~N");
5780 Clazz_overrideMethod(c$,"iterator",
5781 function(){
5782 return this.listIterator(0);
5783 });
5784 Clazz_defineMethod(c$,"listIterator",
5785 function(a){
5786 if(this.modCount==this.fullList.modCount){
5787 if(0<=a&&a<=this.$size){
5788 return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);
5789 }throw new IndexOutOfBoundsException();
5790 }throw new java.util.ConcurrentModificationException();
5791 },"~N");
5792 Clazz_defineMethod(c$,"remove",
5793 function(a){
5794 if(this.modCount==this.fullList.modCount){
5795 if(0<=a&&a<this.$size){
5796 var b=this.fullList.remove(a+this.offset);
5797 this.$size--;
5798 this.modCount=this.fullList.modCount;
5799 return b;
5800 }throw new IndexOutOfBoundsException();
5801 }throw new java.util.ConcurrentModificationException();
5802 },"~N");
5803 Clazz_defineMethod(c$,"removeRange",
5804 function(a,b){
5805 if(a!=b){
5806 if(this.modCount==this.fullList.modCount){
5807 this.fullList.removeRange(a+this.offset,b+this.offset);
5808 this.$size-=b-a;
5809 this.modCount=this.fullList.modCount;
5810 }else{
5811 throw new java.util.ConcurrentModificationException();
5812 }}},"~N,~N");
5813 Clazz_defineMethod(c$,"set",
5814 function(a,b){
5815 if(this.modCount==this.fullList.modCount){
5816 if(0<=a&&a<this.$size){
5817 return this.fullList.set(a+this.offset,b);
5818 }throw new IndexOutOfBoundsException();
5819 }throw new java.util.ConcurrentModificationException();
5820 },"~N,~O");
5821 Clazz_overrideMethod(c$,"size",
5822 function(){
5823 return this.$size;
5824 });
5825 Clazz_defineMethod(c$,"sizeChanged",
5826 function(a){
5827 if(a){
5828 this.$size++;
5829 }else{
5830 this.$size--;
5831 }this.modCount=this.fullList.modCount;
5832 },"~B");
5833 Clazz_pu$h(self.c$);
5834 c$=Clazz_decorateAsClass(function(){
5835 this.subList=null;
5836 this.iterator=null;
5837 this.start=0;
5838 this.end=0;
5839 Clazz_instantialize(this,arguments);
5840 },java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);
5841 Clazz_makeConstructor(c$,
5842 function(a,b,c,d){
5843 this.iterator=a;
5844 this.subList=b;
5845 this.start=c;
5846 this.end=this.start+d;
5847 },"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");
5848 Clazz_defineMethod(c$,"add",
5849 function(a){
5850 this.iterator.add(a);
5851 this.subList.sizeChanged(true);
5852 this.end++;
5853 },"~O");
5854 Clazz_overrideMethod(c$,"hasNext",
5855 function(){
5856 return this.iterator.nextIndex()<this.end;
5857 });
5858 Clazz_overrideMethod(c$,"hasPrevious",
5859 function(){
5860 return this.iterator.previousIndex()>=this.start;
5861 });
5862 Clazz_defineMethod(c$,"next",
5863 function(){
5864 if(this.iterator.nextIndex()<this.end){
5865 return this.iterator.next();
5866 }throw new java.util.NoSuchElementException();
5867 });
5868 Clazz_defineMethod(c$,"nextIndex",
5869 function(){
5870 return this.iterator.nextIndex()-this.start;
5871 });
5872 Clazz_defineMethod(c$,"previous",
5873 function(){
5874 if(this.iterator.previousIndex()>=this.start){
5875 return this.iterator.previous();
5876 }throw new java.util.NoSuchElementException();
5877 });
5878 Clazz_defineMethod(c$,"previousIndex",
5879 function(){
5880 var a=this.iterator.previousIndex();
5881 if(a>=this.start){
5882 return a-this.start;
5883 }return-1;
5884 });
5885 Clazz_defineMethod(c$,"remove",
5886 function(){
5887 this.iterator.remove();
5888 this.subList.sizeChanged(false);
5889 this.end--;
5890 });
5891 Clazz_defineMethod(c$,"set",
5892 function(a){
5893 this.iterator.set(a);
5894 },"~O");
5895 c$=Clazz_p0p();
5896 c$=Clazz_p0p();
5897 });
5898 // 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType()
5899
5900 Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){
5901 c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection);
5902 Clazz_makeConstructor(c$,
5903 function(){
5904 });
5905 Clazz_overrideMethod(c$,"add",
5906 function(object){
5907 throw new UnsupportedOperationException();
5908 },"~O");
5909 Clazz_overrideMethod(c$,"addAll",
5910 function(collection){
5911 var result=false;
5912 var it=collection.iterator();
5913 while(it.hasNext()){
5914 if(this.add(it.next())){
5915 result=true;
5916 }}
5917 return result;
5918 },"java.util.Collection");
5919 Clazz_overrideMethod(c$,"clear",
5920 function(){
5921 var it=this.iterator();
5922 while(it.hasNext()){
5923 it.next();
5924 it.remove();
5925 }
5926 });
5927 Clazz_overrideMethod(c$,"contains",
5928 function(object){
5929 var it=this.iterator();
5930 if(object!=null){
5931 while(it.hasNext()){
5932 if(object.equals(it.next())){
5933 return true;
5934 }}
5935 }else{
5936 while(it.hasNext()){
5937 if(it.next()==null){
5938 return true;
5939 }}
5940 }return false;
5941 },"~O");
5942 Clazz_overrideMethod(c$,"containsAll",
5943 function(collection){
5944 var it=collection.iterator();
5945 while(it.hasNext()){
5946 if(!this.contains(it.next())){
5947 return false;
5948 }}
5949 return true;
5950 },"java.util.Collection");
5951 Clazz_overrideMethod(c$,"isEmpty",
5952 function(){
5953 return this.size()==0;
5954 });
5955 Clazz_overrideMethod(c$,"remove",
5956 function(object){
5957 var it=this.iterator();
5958 if(object!=null){
5959 while(it.hasNext()){
5960 if(object.equals(it.next())){
5961 it.remove();
5962 return true;
5963 }}
5964 }else{
5965 while(it.hasNext()){
5966 if(it.next()==null){
5967 it.remove();
5968 return true;
5969 }}
5970 }return false;
5971 },"~O");
5972 Clazz_overrideMethod(c$,"removeAll",
5973 function(collection){
5974 var result=false;
5975 var it=this.iterator();
5976 while(it.hasNext()){
5977 if(collection.contains(it.next())){
5978 it.remove();
5979 result=true;
5980 }}
5981 return result;
5982 },"java.util.Collection");
5983 Clazz_overrideMethod(c$,"retainAll",
5984 function(collection){
5985 var result=false;
5986 var it=this.iterator();
5987 while(it.hasNext()){
5988 if(!collection.contains(it.next())){
5989 it.remove();
5990 result=true;
5991 }}
5992 return result;
5993 },"java.util.Collection");
5994 Clazz_defineMethod(c$,"toArray",
5995 function(){
5996 var size=this.size();
5997 var index=0;
5998 var it=this.iterator();
5999 var array=new Array(size);
6000 while(index<size){
6001 array[index++]=it.next();
6002 }
6003 return array;
6004 });
6005 Clazz_defineMethod(c$,"toArray",
6006 function(contents){
6007 var size=this.size();
6008 var index=0;
6009 // if(size>contents.length){  // BH unnec
6010 //var ct=contents.getClass().getComponentType();
6011 //contents=java.lang.reflect.Array.newInstance(ct,size);
6012 //}
6013 for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6014 contents[index++]=entry;
6015 }
6016 if(index<contents.length){
6017 contents[index]=null;
6018 }return contents;
6019 },"~A");
6020 Clazz_overrideMethod(c$,"toString",
6021 function(){
6022 if(this.isEmpty()){
6023 return"[]";
6024 }var buffer=new StringBuilder(this.size()*16);
6025 buffer.append('[');
6026 var it=this.iterator();
6027 while(it.hasNext()){
6028 var next=it.next();
6029 if(next!==this){
6030 buffer.append(next);
6031 }else{
6032 buffer.append("(this Collection)");
6033 }if(it.hasNext()){
6034 buffer.append(", ");
6035 }}
6036 buffer.append(']');
6037 return buffer.toString();
6038 });
6039 });
6040 Clazz_declarePackage ("java.awt");
6041 Clazz_load (null, "java.awt.ComponentOrientation", ["java.util.Locale"], function () {
6042 c$ = Clazz_decorateAsClass (function () {
6043 this.orientation = 0;
6044 Clazz_instantialize (this, arguments);
6045 }, java.awt, "ComponentOrientation");
6046 Clazz_defineMethod (c$, "isHorizontal", 
6047 function () {
6048 return (this.orientation & 2) != 0;
6049 });
6050 Clazz_defineMethod (c$, "isLeftToRight", 
6051 function () {
6052 return (this.orientation & 4) != 0;
6053 });
6054 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
6055 function (locale) {
6056 var lang = locale.getLanguage ();
6057 if ("iw".equals (lang) || "ar".equals (lang) || "fa".equals (lang) || "ur".equals (lang)) {
6058 return java.awt.ComponentOrientation.RIGHT_TO_LEFT;
6059 } else {
6060 return java.awt.ComponentOrientation.LEFT_TO_RIGHT;
6061 }}, "java.util.Locale");
6062 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
6063 function (bdl) {
6064 var result = null;
6065 try {
6066 result = bdl.getObject ("Orientation");
6067 } catch (e) {
6068 if (Clazz_exceptionOf (e, Exception)) {
6069 } else {
6070 throw e;
6071 }
6072 }
6073 if (result == null) {
6074 result = java.awt.ComponentOrientation.getOrientation (bdl.getLocale ());
6075 }if (result == null) {
6076 result = java.awt.ComponentOrientation.getOrientation (java.util.Locale.getDefault ());
6077 }return result;
6078 }, "java.util.ResourceBundle");
6079 Clazz_makeConstructor (c$, 
6080  function (value) {
6081 this.orientation = value;
6082 }, "~N");
6083 Clazz_defineStatics (c$,
6084 "UNK_BIT", 1,
6085 "HORIZ_BIT", 2,
6086 "LTR_BIT", 4);
6087 c$.LEFT_TO_RIGHT = c$.prototype.LEFT_TO_RIGHT =  new java.awt.ComponentOrientation (6);
6088 c$.RIGHT_TO_LEFT = c$.prototype.RIGHT_TO_LEFT =  new java.awt.ComponentOrientation (2);
6089 c$.UNKNOWN = c$.prototype.UNKNOWN =  new java.awt.ComponentOrientation (7);
6090 });
6091 Clazz_declarePackage ("java.security");
6092 Clazz_load (["java.security.AccessControlContext"], "java.security.AccessController", null, function () {
6093 c$ = Clazz_declareType (java.security, "AccessController", null, java.security.AccessControlContext);
6094 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6095 function (action) {
6096 return action.run ();
6097 }, "java.security.PrivilegedAction");
6098 c$.getContext = Clazz_defineMethod (c$, "getContext", 
6099 function () {
6100 return  new java.security.AccessController ();
6101 });
6102 Clazz_overrideMethod (c$, "checkPermission", 
6103 function (perm) {
6104 return true;
6105 }, "~O");
6106 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6107 function (action, context) {
6108 return action.run ();
6109 }, "java.security.PrivilegedAction,java.security.AccessControlContext");
6110 });
6111 Clazz_declarePackage ("java.security");
6112 Clazz_declareInterface (java.security, "AccessControlContext");
6113 // BH minor efficiencies only
6114
6115 Clazz_load(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.HashMap",["java.lang.IllegalArgumentException","$.IllegalStateException","java.util.AbstractCollection","$.Arrays","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.NoSuchElementException"],function(){
6116 c$=Clazz_decorateAsClass(function(){
6117 this.elementCount=0;
6118 this.elementData=null;
6119 this.loadFactor=0;
6120 this.threshold=0;
6121 this.modCount=0;
6122 Clazz_instantialize(this,arguments);
6123 },java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);
6124 Clazz_defineMethod(c$,"newElementArray",
6125 function(s){
6126 return new Array(s);
6127 },"~N");
6128 //Clazz_makeConstructor(c$,
6129 //function(){
6130 //this.construct(16);
6131 //});
6132 //Clazz_makeConstructor(c$,
6133 //function(capacity){
6134 //Clazz_superConstructor(this,java.util.HashMap,[]);
6135 //if(capacity>=0){
6136 //this.elementCount=0;
6137 //this.elementData=this.newElementArray(capacity==0?1:capacity);
6138 //this.loadFactor=0.75;
6139 //this.computeMaxSize();
6140 //}else{
6141 //throw new IllegalArgumentException();
6142 //}},"~N");
6143 Clazz_makeConstructor(c$,
6144 function(){
6145 this.construct(16);
6146 });
6147 Clazz_makeConstructor(c$,
6148 function(capacity){
6149 Clazz_superConstructor(this,java.util.HashMap,[]);
6150 if(capacity>=0){
6151 this.elementCount=0;
6152 this.elementData=this.newElementArray(capacity==0?1:capacity);
6153 this.loadFactor=0.75;
6154 this.computeMaxSize();
6155 }else{
6156 throw new IllegalArgumentException();
6157 }},"~N");
6158 Clazz_makeConstructor(c$,
6159 function(capacity,loadFactor){
6160 Clazz_superConstructor(this,java.util.HashMap,[]);
6161 if(capacity>=0&&loadFactor>0){
6162 this.elementCount=0;
6163 this.elementData=this.newElementArray(capacity==0?1:capacity);
6164 this.loadFactor=loadFactor;
6165 this.computeMaxSize();
6166 }else{
6167 throw new IllegalArgumentException();
6168 }},"~N,~N");
6169 Clazz_makeConstructor(c$,
6170 function(map){
6171 this.construct(map.size()<6?11:map.size()*2);
6172 Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6173 },"java.util.Map");
6174
6175
6176 /*
6177 Clazz_makeConstructor(c$,
6178 function(capacity,loadFactor){
6179 this.doConstruct(capacity,loadFactor);
6180 },"~N,~N");
6181
6182 Clazz_defineMethod(c$, "doConstruct",
6183 function(capacity,loadFactor) {
6184 capacity || (capacity = 16);
6185 loadFactor || (loadFactor = 0.75);
6186 if (typeof capacity != "number") {
6187  var map = capacity;
6188  this.loadFactor=loadFactor;
6189  this.elementData=this.newElementArray(map.size()<6?11:map.size()*2);
6190  this.computeMaxSize();
6191  this.putAllHM(map);
6192  return;
6193 }
6194
6195 //Clazz_superConstructor(this,java.util.HashMap,[]);
6196 if(capacity>=0&&loadFactor>0){
6197 this.elementData=this.newElementArray(capacity==0?1:capacity);
6198 this.loadFactor=loadFactor;
6199 this.computeMaxSize();
6200 }else{
6201 throw new IllegalArgumentException();
6202 }
6203 },"~N,~N");
6204
6205 //Clazz_makeConstructor(c$,
6206 //function(map){
6207 //this.construct(map.size()<6?11:map.size()*2);
6208 //Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6209 //},"java.util.Map");
6210
6211 */
6212 Clazz_overrideMethod(c$,"clear",
6213 function(){
6214 if(this.elementCount>0){
6215 this.elementCount=0;
6216 java.util.Arrays.fill(this.elementData,null);
6217 this.modCount++;
6218 }});
6219 Clazz_defineMethod(c$,"clone",
6220 function(){
6221   return this.cloneHM();
6222 });
6223
6224 Clazz_defineMethod(c$,"cloneHM",
6225 function(){
6226 try{
6227 var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]);
6228 map.elementData=this.newElementArray(this.elementData.length);
6229 var entry;
6230 for(var i=0;i<this.elementData.length;i++){
6231 if((entry=this.elementData[i])!=null){
6232 map.elementData[i]=entry.clone();
6233 }}
6234 return map;
6235 }catch(e){
6236 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6237 return null;
6238 }else{
6239 throw e;
6240 }
6241 }
6242 });
6243
6244 Clazz_defineMethod(c$,"computeMaxSize",
6245 ($fz=function(){
6246 this.threshold=Math.round((this.elementData.length*this.loadFactor));
6247 },$fz.isPrivate=true,$fz));
6248 Clazz_overrideMethod(c$,"containsKey",
6249 function(key){
6250 return this.getEntry(key)!=null;
6251 },"~O");
6252 Clazz_defineMethod(c$,"keysEqual",
6253 function(k1,entry){
6254 var k1Hash=k1==null?0:k1.hashCode();
6255 if(k1Hash!=entry.origKeyHash){
6256 return false;
6257 }if(k1==null&&entry.key==null){
6258 return true;
6259 }return k1.equals(entry.key);
6260 },"~O,java.util.HashMap.Entry");
6261 Clazz_overrideMethod(c$,"containsValue",
6262 function(value){
6263 if(value!=null){
6264 for(var i=this.elementData.length;--i>=0;){
6265 var entry=this.elementData[i];
6266 while(entry!=null){
6267 if(value.equals(entry.value)){
6268 return true;
6269 }entry=entry.next;
6270 }
6271 }
6272 }else{
6273 for(var i=this.elementData.length;--i>=0;){
6274 var entry=this.elementData[i];
6275 while(entry!=null){
6276 if(entry.value==null){
6277 return true;
6278 }entry=entry.next;
6279 }
6280 }
6281 }return false;
6282 },"~O");
6283 Clazz_overrideMethod(c$,"entrySet",
6284 function(){
6285 return new java.util.HashMap.HashMapEntrySet(this);
6286 });
6287 Clazz_overrideMethod(c$,"get",
6288 function(key){
6289 var m=this.getEntry(key);
6290 if(m!=null){
6291 return m.value;
6292 }return null;
6293 },"~O");
6294 Clazz_defineMethod(c$,"getEntry",
6295 function(key){
6296 var index=this.getModuloHash(key);
6297 return this.findEntry(key,index);
6298 },"~O");
6299 Clazz_defineMethod(c$,"getModuloHash",
6300 function(key){
6301 if(key==null){
6302 return 0;
6303 }return(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6304 },"~O");
6305 Clazz_defineMethod(c$,"findEntry",
6306 function(key,index){
6307 var m;
6308 m=this.elementData[index];
6309 if(key!=null){
6310 while(m!=null&&!this.keysEqual(key,m)){
6311 m=m.next;
6312 }
6313 }else{
6314 while(m!=null&&m.key!=null){
6315 m=m.next;
6316 }
6317 }return m;
6318 },"~O,~N");
6319 Clazz_overrideMethod(c$,"isEmpty",
6320 function(){
6321 return this.elementCount==0;
6322 });
6323 Clazz_overrideMethod(c$,"keySet",
6324 function(){
6325 if(this.$keySet==null){
6326 this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null));
6327 }return this.$keySet;
6328 });
6329 Clazz_overrideMethod(c$,"put",
6330 function(key,value){
6331 var index=this.getModuloHash(key);
6332 var entry=this.findEntry(key,index);
6333 if(entry==null){
6334 this.modCount++;
6335 if(++this.elementCount>this.threshold){
6336 this.rehash();
6337 index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6338 }entry=this.createEntry(key,index,value);
6339 return null;
6340 }var result=entry.value;
6341 entry.value=value;
6342 return result;
6343 },"~O,~O");
6344 Clazz_defineMethod(c$,"createEntry",
6345 function(key,index,value){
6346 var entry=new java.util.HashMap.Entry(key,value);
6347 entry.next=this.elementData[index];
6348 this.elementData[index]=entry;
6349 return entry;
6350 },"~O,~N,~O");
6351 Clazz_defineMethod(c$,"putAll",
6352 function(map){
6353 if(!map.isEmpty()){
6354 var capacity=this.elementCount+map.size();
6355 if(capacity>this.threshold){
6356 this.rehash(capacity);
6357 }
6358 this.putAllHM(map);
6359
6360 }},"java.util.Map");
6361 Clazz_defineMethod(c$,"rehash",
6362 function(capacity){
6363 var length=(capacity==0?1:capacity<<1);
6364 var newData=this.newElementArray(length);
6365 for(var i=0;i<this.elementData.length;i++){
6366 var entry=this.elementData[i];
6367 while(entry!=null){
6368 var key=entry.key;
6369 var index=key==null?0:(key.hashCode()&0x7FFFFFFF)%length;
6370 var next=entry.next;
6371 entry.next=newData[index];
6372 newData[index]=entry;
6373 entry=next;
6374 }
6375 }
6376 this.elementData=newData;
6377 this.computeMaxSize();
6378 },"~N");
6379 Clazz_defineMethod(c$,"rehash",
6380 function(){
6381 this.rehash(this.elementData.length);
6382 });
6383 Clazz_overrideMethod(c$,"remove",
6384 function(key){
6385 var entry=this.removeEntry(key);
6386 if(entry!=null){
6387 return entry.value;
6388 }return null;
6389 },"~O");
6390 Clazz_defineMethod(c$,"removeEntry",
6391 function(key){
6392 var index=0;
6393 var entry;
6394 var last=null;
6395 if(key!=null){
6396 index=(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6397 entry=this.elementData[index];
6398 while(entry!=null&&!this.keysEqual(key,entry)){
6399 last=entry;
6400 entry=entry.next;
6401 }
6402 }else{
6403 entry=this.elementData[0];
6404 while(entry!=null&&entry.key!=null){
6405 last=entry;
6406 entry=entry.next;
6407 }
6408 }if(entry==null){
6409 return null;
6410 }if(last==null){
6411 this.elementData[index]=entry.next;
6412 }else{
6413 last.next=entry.next;
6414 }this.modCount++;
6415 this.elementCount--;
6416 return entry;
6417 },"~O");
6418 Clazz_overrideMethod(c$,"size",
6419 function(){
6420 return this.elementCount;
6421 });
6422 Clazz_overrideMethod(c$,"values",
6423 function(){
6424 if(this.valuesCollection==null){
6425 this.valuesCollection=((Clazz_isClassDefined("java.util.HashMap$2")?0:java.util.HashMap.$HashMap$2$()),Clazz_innerTypeInstance(java.util.HashMap$2,this,null));
6426 }return this.valuesCollection;
6427 });
6428 c$.$HashMap$1$=function(){
6429 Clazz_pu$h(self.c$);
6430 c$=Clazz_declareAnonymous(java.util,"HashMap$1",java.util.AbstractSet);
6431 Clazz_overrideMethod(c$,"contains",
6432 function(object){
6433 return this.b$["java.util.HashMap"].containsKey(object);
6434 },"~O");
6435 Clazz_overrideMethod(c$,"size",
6436 function(){
6437 return this.b$["java.util.HashMap"].size();
6438 });
6439 Clazz_overrideMethod(c$,"clear",
6440 function(){
6441 this.b$["java.util.HashMap"].clear();
6442 });
6443 Clazz_overrideMethod(c$,"remove",
6444 function(key){
6445 if(this.b$["java.util.HashMap"].containsKey(key)){
6446 this.b$["java.util.HashMap"].remove(key);
6447 return true;
6448 }return false;
6449 },"~O");
6450 Clazz_overrideMethod(c$,"iterator",
6451 function(){
6452 return new java.util.HashMap.HashMapIterator(((Clazz_isClassDefined("java.util.HashMap$1$1")?0:java.util.HashMap.$HashMap$1$1$()),Clazz_innerTypeInstance(java.util.HashMap$1$1,this,null)),this.b$["java.util.HashMap"]);
6453 });
6454 c$=Clazz_p0p();
6455 };
6456 c$.$HashMap$1$1$=function(){
6457 Clazz_pu$h(self.c$);
6458 c$=Clazz_declareAnonymous(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);
6459 Clazz_overrideMethod(c$,"get",
6460 function(entry){
6461 return entry.key;
6462 },"java.util.MapEntry");
6463 c$=Clazz_p0p();
6464 };
6465 c$.$HashMap$2$=function(){
6466 Clazz_pu$h(self.c$);
6467 c$=Clazz_declareAnonymous(java.util,"HashMap$2",java.util.AbstractCollection);
6468 Clazz_overrideMethod(c$,"contains",
6469 function(object){
6470 return this.b$["java.util.HashMap"].containsValue(object);
6471 },"~O");
6472 Clazz_overrideMethod(c$,"size",
6473 function(){
6474 return this.b$["java.util.HashMap"].size();
6475 });
6476 Clazz_overrideMethod(c$,"clear",
6477 function(){
6478 this.b$["java.util.HashMap"].clear();
6479 });
6480 Clazz_overrideMethod(c$,"iterator",
6481 function(){
6482 return new java.util.HashMap.HashMapIterator(((Clazz_isClassDefined("java.util.HashMap$2$1")?0:java.util.HashMap.$HashMap$2$1$()),Clazz_innerTypeInstance(java.util.HashMap$2$1,this,null)),this.b$["java.util.HashMap"]);
6483 });
6484 c$=Clazz_p0p();
6485 };
6486 c$.$HashMap$2$1$=function(){
6487 Clazz_pu$h(self.c$);
6488 c$=Clazz_declareAnonymous(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);
6489 Clazz_overrideMethod(c$,"get",
6490 function(entry){
6491 return entry.value;
6492 },"java.util.MapEntry");
6493 c$=Clazz_p0p();
6494 };
6495 Clazz_pu$h(self.c$);
6496 c$=Clazz_decorateAsClass(function(){
6497 this.origKeyHash=0;
6498 this.next=null;
6499 Clazz_instantialize(this,arguments);
6500 },java.util.HashMap,"Entry",java.util.MapEntry);
6501 Clazz_makeConstructor(c$,
6502 function(a,b){
6503 Clazz_superConstructor(this,java.util.HashMap.Entry,[a,b]);
6504 this.origKeyHash=(a==null?0:a.hashCode());
6505 },"~O,~O");
6506 Clazz_defineMethod(c$,"clone",
6507 function(){
6508 var a=Clazz_superCall(this,java.util.HashMap.Entry,"clone",[]);
6509 if(this.next!=null){
6510 a.next=this.next.clone();
6511 }return a;
6512 });
6513 c$=Clazz_p0p();
6514 Clazz_pu$h(self.c$);
6515 c$=Clazz_decorateAsClass(function(){
6516 this.position=0;
6517 this.expectedModCount=0;
6518 this.type=null;
6519 this.canRemove=false;
6520 this.entry=null;
6521 this.lastEntry=null;
6522 this.associatedMap=null;
6523 Clazz_instantialize(this,arguments);
6524 },java.util.HashMap,"HashMapIterator",null,java.util.Iterator);
6525 Clazz_makeConstructor(c$,
6526 function(a,b){
6527 this.associatedMap=b;
6528 this.type=a;
6529 this.expectedModCount=b.modCount;
6530 },"java.util.MapEntry.Type,java.util.HashMap");
6531 Clazz_overrideMethod(c$,"hasNext",
6532 function(){
6533 if(this.entry!=null){
6534 return true;
6535 }while(this.position<this.associatedMap.elementData.length){
6536 if(this.associatedMap.elementData[this.position]==null){
6537 this.position++;
6538 }else{
6539 return true;
6540 }}
6541 return false;
6542 });
6543 Clazz_defineMethod(c$,"checkConcurrentMod",
6544 function(){
6545 if(this.expectedModCount!=this.associatedMap.modCount){
6546 throw new java.util.ConcurrentModificationException();
6547 }});
6548 Clazz_overrideMethod(c$,"next",
6549 function(){
6550 this.checkConcurrentMod();
6551 if(!this.hasNext()){
6552 throw new java.util.NoSuchElementException();
6553 }var a;
6554 if(this.entry==null){
6555 a=this.lastEntry=this.associatedMap.elementData[this.position++];
6556 this.entry=this.lastEntry.next;
6557 }else{
6558 if(this.lastEntry.next!==this.entry){
6559 this.lastEntry=this.lastEntry.next;
6560 }a=this.entry;
6561 this.entry=this.entry.next;
6562 }this.canRemove=true;
6563 return this.type.get(a);
6564 });
6565 Clazz_overrideMethod(c$,"remove",
6566 function(){
6567 this.checkConcurrentMod();
6568 if(!this.canRemove){
6569 throw new IllegalStateException();
6570 }this.canRemove=false;
6571 this.associatedMap.modCount++;
6572 if(this.lastEntry.next===this.entry){
6573 while(this.associatedMap.elementData[--this.position]==null){
6574 ;}
6575 this.associatedMap.elementData[this.position]=this.associatedMap.elementData[this.position].next;
6576 this.entry=null;
6577 }else{
6578 this.lastEntry.next=this.entry;
6579 }this.associatedMap.elementCount--;
6580 this.expectedModCount++;
6581 });
6582 c$=Clazz_p0p();
6583 Clazz_pu$h(self.c$);
6584 c$=Clazz_decorateAsClass(function(){
6585 this.associatedMap=null;
6586 Clazz_instantialize(this,arguments);
6587 },java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);
6588 Clazz_makeConstructor(c$,
6589 function(a){
6590 Clazz_superConstructor(this,java.util.HashMap.HashMapEntrySet,[]);
6591 this.associatedMap=a;
6592 },"java.util.HashMap");
6593 Clazz_defineMethod(c$,"hashMap",
6594 function(){
6595 return this.associatedMap;
6596 });
6597 Clazz_overrideMethod(c$,"size",
6598 function(){
6599 return this.associatedMap.elementCount;
6600 });
6601 Clazz_overrideMethod(c$,"clear",
6602 function(){
6603 this.associatedMap.clear();
6604 });
6605 Clazz_overrideMethod(c$,"remove",
6606 function(a){
6607 if(this.contains(a)){
6608 this.associatedMap.remove((a).getKey());
6609 return true;
6610 }return false;
6611 },"~O");
6612 Clazz_overrideMethod(c$,"contains",
6613 function(a){
6614 if(Clazz_instanceOf(a,java.util.Map.Entry)){
6615 var b=this.associatedMap.getEntry((a).getKey());
6616 return a.equals(b);
6617 }return false;
6618 },"~O");
6619 Clazz_overrideMethod(c$,"iterator",
6620 function(){
6621 return new java.util.HashMap.HashMapIterator(((Clazz_isClassDefined("java.util.HashMap$HashMapEntrySet$1")?0:java.util.HashMap.HashMapEntrySet.$HashMap$HashMapEntrySet$1$()),Clazz_innerTypeInstance(java.util.HashMap$HashMapEntrySet$1,this,null)),this.associatedMap);
6622 });
6623 c$.$HashMap$HashMapEntrySet$1$=function(){
6624 Clazz_pu$h(self.c$);
6625 c$=Clazz_declareAnonymous(java.util,"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);
6626 Clazz_overrideMethod(c$,"get",
6627 function(a){
6628 return a;
6629 },"java.util.MapEntry");
6630 c$=Clazz_p0p();
6631 };
6632 c$=Clazz_p0p();
6633 Clazz_defineStatics(c$,
6634 "DEFAULT_SIZE",16);
6635 });
6636 Clazz_load(["java.util.Map"],"java.util.MapEntry",null,function(){
6637 c$=Clazz_decorateAsClass(function(){
6638 this.key=null;
6639 this.value=null;
6640 Clazz_instantialize(this,arguments);
6641 },java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);
6642 Clazz_makeConstructor(c$,
6643 function(theKey){
6644 this.key=theKey;
6645 },"~O");
6646 Clazz_makeConstructor(c$,
6647 function(theKey,theValue){
6648 this.key=theKey;
6649 this.value=theValue;
6650 },"~O,~O");
6651 Clazz_defineMethod(c$,"clone",
6652 function(){
6653 try{
6654 return Clazz_superCall(this,java.util.MapEntry,"clone",[]);
6655 }catch(e){
6656 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6657 return null;
6658 }else{
6659 throw e;
6660 }
6661 }
6662 });
6663 Clazz_overrideMethod(c$,"equals",
6664 function(object){
6665 if(this===object){
6666 return true;
6667 }if(Clazz_instanceOf(object,java.util.Map.Entry)){
6668 var entry=object;
6669 return(this.key==null?entry.getKey()==null:this.key.equals(entry.getKey()))&&(this.value==null?entry.getValue()==null:this.value.equals(entry.getValue()));
6670 }return false;
6671 },"~O");
6672 Clazz_overrideMethod(c$,"getKey",
6673 function(){
6674 return this.key;
6675 });
6676 Clazz_overrideMethod(c$,"getValue",
6677 function(){
6678 return this.value;
6679 });
6680 Clazz_overrideMethod(c$,"hashCode",
6681 function(){
6682 return(this.key==null?0:this.key.hashCode())^(this.value==null?0:this.value.hashCode());
6683 });
6684 Clazz_overrideMethod(c$,"setValue",
6685 function(object){
6686 var result=this.value;
6687 this.value=object;
6688 return result;
6689 },"~O");
6690 Clazz_overrideMethod(c$,"toString",
6691 function(){
6692 return this.key+"="+this.value;
6693 });
6694 Clazz_declareInterface(java.util.MapEntry,"Type");
6695 });
6696 Clazz_load(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){
6697 c$=Clazz_declareType(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);
6698 Clazz_overrideMethod(c$,"equals",
6699 function(object){
6700 if(this===object){
6701 return true;
6702 }if(Clazz_instanceOf(object,java.util.Set)){
6703 var s=object;
6704 return this.size()==s.size()&&this.containsAll(s);
6705 }return false;
6706 },"~O");
6707 Clazz_overrideMethod(c$,"hashCode",
6708 function(){
6709 var result=0;
6710 var it=this.iterator();
6711 while(it.hasNext()){
6712 var next=it.next();
6713 result+=next==null?0:next.hashCode();
6714 }
6715 return result;
6716 });
6717 Clazz_overrideMethod(c$,"removeAll",
6718 function(collection){
6719 var result=false;
6720 if(this.size()<=collection.size()){
6721 var it=this.iterator();
6722 while(it.hasNext()){
6723 if(collection.contains(it.next())){
6724 it.remove();
6725 result=true;
6726 }}
6727 }else{
6728 var it=collection.iterator();
6729 while(it.hasNext()){
6730 result=this.remove(it.next())||result;
6731 }
6732 }return result;
6733 },"java.util.Collection");
6734 });
6735 Clazz_load(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){
6736 c$=Clazz_decorateAsClass(function(){
6737 this.$keySet=null;
6738 this.valuesCollection=null;
6739 Clazz_instantialize(this,arguments);
6740 },java.util,"AbstractMap",null,java.util.Map);
6741 Clazz_makeConstructor(c$,
6742 function(){
6743 });
6744 Clazz_overrideMethod(c$,"clear",
6745 function(){
6746 this.entrySet().clear();
6747 });
6748 Clazz_overrideMethod(c$,"containsKey",
6749 function(key){
6750 var it=this.entrySet().iterator();
6751 if(key!=null){
6752 while(it.hasNext()){
6753 if(key.equals(it.next().getKey())){
6754 return true;
6755 }}
6756 }else{
6757 while(it.hasNext()){
6758 if(it.next().getKey()==null){
6759 return true;
6760 }}
6761 }return false;
6762 },"~O");
6763 Clazz_overrideMethod(c$,"containsValue",
6764 function(value){
6765 var it=this.entrySet().iterator();
6766 if(value!=null){
6767 while(it.hasNext()){
6768 if(value.equals(it.next().getValue())){
6769 return true;
6770 }}
6771 }else{
6772 while(it.hasNext()){
6773 if(it.next().getValue()==null){
6774 return true;
6775 }}
6776 }return false;
6777 },"~O");
6778 Clazz_overrideMethod(c$,"equals",
6779 function(object){
6780 if(this===object){
6781 return true;
6782 }if(Clazz_instanceOf(object,java.util.Map)){
6783 var map=object;
6784 if(this.size()!=map.size()){
6785 return false;
6786 }var objectSet=map.entrySet();
6787 var it=this.entrySet().iterator();
6788 while(it.hasNext()){
6789 if(!objectSet.contains(it.next())){
6790 return false;
6791 }}
6792 return true;
6793 }return false;
6794 },"~O");
6795 Clazz_overrideMethod(c$,"get",
6796 function(key){
6797 var it=this.entrySet().iterator();
6798 if(key!=null){
6799 while(it.hasNext()){
6800 var entry=it.next();
6801 if(key.equals(entry.getKey())){
6802 return entry.getValue();
6803 }}
6804 }else{
6805 while(it.hasNext()){
6806 var entry=it.next();
6807 if(entry.getKey()==null){
6808 return entry.getValue();
6809 }}
6810 }return null;
6811 },"~O");
6812 Clazz_overrideMethod(c$,"hashCode",
6813 function(){
6814 var result=0;
6815 var it=this.entrySet().iterator();
6816 while(it.hasNext()){
6817 result+=it.next().hashCode();
6818 }
6819 return result;
6820 });
6821 Clazz_overrideMethod(c$,"isEmpty",
6822 function(){
6823 return this.size()==0;
6824 });
6825 Clazz_overrideMethod(c$,"keySet",
6826 function(){
6827 if(this.$keySet==null){
6828 this.$keySet=((Clazz_isClassDefined("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1,this,null));
6829 }return this.$keySet;
6830 });
6831 Clazz_overrideMethod(c$,"put",
6832 function(key,value){
6833 throw new UnsupportedOperationException();
6834 },"~O,~O");
6835 Clazz_overrideMethod(c$,"putAll",
6836 function(map){
6837   this.putAllAM(map);
6838 },"java.util.Map");
6839
6840 Clazz_overrideMethod(c$,"putAllAM",
6841 function(map){
6842 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6843 this.put(entry.getKey(),entry.getValue());
6844 }
6845 },"java.util.Map");
6846
6847 Clazz_overrideMethod(c$,"remove",
6848 function(key){
6849 var it=this.entrySet().iterator();
6850 if(key!=null){
6851 while(it.hasNext()){
6852 var entry=it.next();
6853 if(key.equals(entry.getKey())){
6854 it.remove();
6855 return entry.getValue();
6856 }}
6857 }else{
6858 while(it.hasNext()){
6859 var entry=it.next();
6860 if(entry.getKey()==null){
6861 it.remove();
6862 return entry.getValue();
6863 }}
6864 }return null;
6865 },"~O");
6866 Clazz_overrideMethod(c$,"size",
6867 function(){
6868 return this.entrySet().size();
6869 });
6870 Clazz_overrideMethod(c$,"toString",
6871 function(){
6872 if(this.isEmpty()){
6873 return"{}";
6874 }var buffer=new StringBuilder(this.size()*28);
6875 buffer.append('{');
6876 var it=this.entrySet().iterator();
6877 while(it.hasNext()){
6878 var entry=it.next();
6879 var key=entry.getKey();
6880 if(key!==this){
6881 buffer.append(key);
6882 }else{
6883 buffer.append("(this Map)");
6884 }buffer.append('=');
6885 var value=entry.getValue();
6886 if(value!==this){
6887 buffer.append(value);
6888 }else{
6889 buffer.append("(this Map)");
6890 }if(it.hasNext()){
6891 buffer.append(", ");
6892 }}
6893 buffer.append('}');
6894 return buffer.toString();
6895 });
6896 Clazz_overrideMethod(c$,"values",
6897 function(){
6898 if(this.valuesCollection==null){
6899 this.valuesCollection=((Clazz_isClassDefined("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$()),Clazz_innerTypeInstance(java.util.AbstractMap$2,this,null));
6900 }return this.valuesCollection;
6901 });
6902 Clazz_defineMethod(c$,"clone",
6903 function(){
6904 return  this.cloneAM();
6905 });
6906
6907 Clazz_defineMethod(c$,"cloneAM",
6908 function(){
6909 var result = Clazz_clone(this);
6910 //var result=Clazz_superCall(this,java.util.AbstractMap,"clone",[]);
6911 result.$keySet=null;
6912 result.valuesCollection=null;
6913 return result;
6914 });
6915
6916 c$.$AbstractMap$1$=function(){
6917 Clazz_pu$h(self.c$);
6918 c$=Clazz_declareAnonymous(java.util,"AbstractMap$1",java.util.AbstractSet);
6919 Clazz_overrideMethod(c$,"contains",
6920 function(object){
6921 return this.b$["java.util.AbstractMap"].containsKey(object);
6922 },"~O");
6923 Clazz_overrideMethod(c$,"size",
6924 function(){
6925 return this.b$["java.util.AbstractMap"].size();
6926 });
6927 Clazz_overrideMethod(c$,"iterator",
6928 function(){
6929 return((Clazz_isClassDefined("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1$1,this,null));
6930 });
6931 c$=Clazz_p0p();
6932 };
6933 c$.$AbstractMap$1$1$=function(){
6934 Clazz_pu$h(self.c$);
6935 c$=Clazz_decorateAsClass(function(){
6936 Clazz_prepareCallback(this,arguments);
6937 this.setIterator=null;
6938 Clazz_instantialize(this,arguments);
6939 },java.util,"AbstractMap$1$1",null,java.util.Iterator);
6940 Clazz_prepareFields(c$,function(){
6941 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6942 });
6943 Clazz_overrideMethod(c$,"hasNext",
6944 function(){
6945 return this.setIterator.hasNext();
6946 });
6947 Clazz_overrideMethod(c$,"next",
6948 function(){
6949 return this.setIterator.next().getKey();
6950 });
6951 Clazz_overrideMethod(c$,"remove",
6952 function(){
6953 this.setIterator.remove();
6954 });
6955 c$=Clazz_p0p();
6956 };
6957 c$.$AbstractMap$2$=function(){
6958 Clazz_pu$h(self.c$);
6959 c$=Clazz_declareAnonymous(java.util,"AbstractMap$2",java.util.AbstractCollection);
6960 Clazz_overrideMethod(c$,"size",
6961 function(){
6962 return this.b$["java.util.AbstractMap"].size();
6963 });
6964 Clazz_overrideMethod(c$,"contains",
6965 function(object){
6966 return this.b$["java.util.AbstractMap"].containsValue(object);
6967 },"~O");
6968 Clazz_overrideMethod(c$,"iterator",
6969 function(){
6970 return((Clazz_isClassDefined("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$2$1,this,null));
6971 });
6972 c$=Clazz_p0p();
6973 };
6974 c$.$AbstractMap$2$1$=function(){
6975 Clazz_pu$h(self.c$);
6976 c$=Clazz_decorateAsClass(function(){
6977 Clazz_prepareCallback(this,arguments);
6978 this.setIterator=null;
6979 Clazz_instantialize(this,arguments);
6980 },java.util,"AbstractMap$2$1",null,java.util.Iterator);
6981 Clazz_prepareFields(c$,function(){
6982 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6983 });
6984 Clazz_overrideMethod(c$,"hasNext",
6985 function(){
6986 return this.setIterator.hasNext();
6987 });
6988 Clazz_overrideMethod(c$,"next",
6989 function(){
6990 return this.setIterator.next().getValue();
6991 });
6992 Clazz_overrideMethod(c$,"remove",
6993 function(){
6994 this.setIterator.remove();
6995 });
6996 c$=Clazz_p0p();
6997 };
6998 });
6999 Clazz_declarePackage ("java.awt.image");
7000 c$ = Clazz_declareInterface (java.awt.image, "ImageObserver");
7001 Clazz_defineStatics (c$,
7002 "WIDTH", 1,
7003 "HEIGHT", 2,
7004 "PROPERTIES", 4,
7005 "SOMEBITS", 8,
7006 "FRAMEBITS", 16,
7007 "ALLBITS", 32,
7008 "ERROR", 64,
7009 "ABORT", 128);
7010 // BH removed inner class 
7011 Clazz_load(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){
7012 c$=Clazz_decorateAsClass(function(){
7013 this.$name=null;
7014 this.$ordinal=0;
7015 Clazz_instantialize(this,arguments);
7016 },java.lang,"Enum",null,[java.io.Serializable,Comparable]);
7017 Clazz_makeConstructor(c$,
7018 function(name,ordinal){
7019 this.$name=name;
7020 this.$ordinal=ordinal;
7021 },"~S,~N");
7022 Clazz_defineMethod(c$,"name",
7023 function(){
7024 return this.$name;
7025 });
7026 Clazz_defineMethod(c$,"ordinal",
7027 function(){
7028 return this.$ordinal;
7029 });
7030 Clazz_overrideMethod(c$,"toString",
7031 function(){
7032 return this.$name;
7033 });
7034 Clazz_overrideMethod(c$,"equals",
7035 function(other){
7036 return this===other;
7037 },"~O");
7038 Clazz_overrideMethod(c$,"hashCode",
7039 function(){
7040 return this.$ordinal+(this.$name==null?0:this.$name.hashCode());
7041 });
7042 Clazz_overrideMethod(c$,"clone",
7043 function(){
7044 throw new CloneNotSupportedException(("KA004"));
7045 });
7046 Clazz_overrideMethod(c$,"compareTo",
7047 function(o){
7048 return this.$ordinal-o.$ordinal;
7049 },"~O");
7050 Clazz_defineMethod(c$,"getDeclaringClass",
7051 function(){
7052 var myClass=this.getClass();
7053 var mySuperClass=myClass.getSuperclass();
7054 if(Enum===mySuperClass){
7055 return myClass;
7056 }return mySuperClass;
7057 });
7058 c$.$valueOf=Clazz_defineMethod(c$,"$valueOf",
7059 function(enumType,name){
7060 if((enumType==null)||(name==null)){
7061 throw new NullPointerException(("KA001"));
7062 }var values=Enum.getValues(enumType);
7063 if(values==null){
7064 throw new IllegalArgumentException(("KA005"));
7065 }for(var enumConst,$enumConst=0,$$enumConst=values;$enumConst<$$enumConst.length&&((enumConst=$$enumConst[$enumConst])||true);$enumConst++){
7066 if(enumConst.$name.equals(name)){
7067 return enumConst;
7068 }}
7069 throw new IllegalArgumentException(("KA006"));
7070 },"Class,~S");
7071 c$.getValues=Clazz_defineMethod(c$,"getValues",
7072 function(enumType){
7073 return enumType.values();
7074 },"Class");
7075
7076 //c$.$Enum$1$=function(){
7077 //Clazz_pu$h(self.c$);
7078
7079 //c$=Clazz_declareAnonymous(null,"Enum$1",null,java.security.PrivilegedExceptionAction);
7080 //Clazz_overrideMethod(c$,"run",
7081 //function(){
7082 //var valsMethod=this.f$.enumType.getMethod("values",null);
7083 //valsMethod.setAccessible(true);
7084 //return valsMethod;
7085 //});
7086 //c$=Clazz_p0p();
7087 //};
7088
7089
7090 });
7091 Clazz_declarePackage ("java.applet");
7092 Clazz_declareInterface (java.applet, "AppletStub");
7093 Clazz_declarePackage ("java.applet");
7094 Clazz_declareInterface (java.applet, "AppletContext");
7095 Clazz_declarePackage ("javajs.api");
7096 Clazz_declareInterface (javajs.api, "JSInterface");
7097 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){
7098 c$=Clazz_declareType(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);
7099 Clazz_makeConstructor(c$,
7100 function(seq){
7101 Clazz_superConstructor(this,StringBuilder,[seq.toString()]);
7102 },"CharSequence");
7103 Clazz_defineMethod(c$,"append",
7104 function(b){
7105 this.append0(b?"true":"false");
7106 return this;
7107 },"~B");
7108 Clazz_defineMethod(c$,"append",
7109 function(c){
7110 this.append0(c);
7111 return this;
7112 },"~N");
7113 Clazz_defineMethod(c$,"append",
7114 function(i){
7115 this.append0(Integer.toString(i));
7116 return this;
7117 },"~N");
7118 Clazz_defineMethod(c$,"append",
7119 function(lng){
7120 this.append0(Long.toString(lng));
7121 return this;
7122 },"~N");
7123 Clazz_defineMethod(c$,"append",
7124 function(f){
7125 this.append0(Float.toString(f));
7126 return this;
7127 },"~N");
7128 Clazz_defineMethod(c$,"append",
7129 function(d){
7130 this.append0(Double.toString(d));
7131 return this;
7132 },"~N");
7133 Clazz_defineMethod(c$,"append",
7134 function(obj){
7135 if(obj==null){
7136 this.appendNull();
7137 }else{
7138 this.append0(obj.toString());
7139 }return this;
7140 },"~O");
7141 Clazz_defineMethod(c$,"append",
7142 function(str){
7143 this.append0(str);
7144 return this;
7145 },"~S");
7146 Clazz_defineMethod(c$,"append",
7147 function(sb){
7148 if(sb==null){
7149 this.appendNull();
7150 }else{
7151 this.append0(sb.getValue(),0,sb.length());
7152 }return this;
7153 },"StringBuffer");
7154 Clazz_defineMethod(c$,"append",
7155 function(ch){
7156 this.append0(ch);
7157 return this;
7158 },"~A");
7159 Clazz_defineMethod(c$,"append",
7160 function(str,offset,len){
7161 this.append0(str,offset,len);
7162 return this;
7163 },"~A,~N,~N");
7164 Clazz_defineMethod(c$,"append",
7165 function(csq){
7166 if(csq==null){
7167 this.appendNull();
7168 }else{
7169 this.append0(csq.toString());
7170 }return this;
7171 },"CharSequence");
7172 Clazz_defineMethod(c$,"append",
7173 function(csq,start,end){
7174 this.append0(csq,start,end);
7175 return this;
7176 },"CharSequence,~N,~N");
7177 Clazz_defineMethod(c$,"$delete",
7178 function(start,end){
7179 this.delete0(start,end);
7180 return this;
7181 },"~N,~N");
7182 Clazz_defineMethod(c$,"deleteCharAt",
7183 function(index){
7184 this.deleteCharAt0(index);
7185 return this;
7186 },"~N");
7187 Clazz_defineMethod(c$,"insert",
7188 function(offset,b){
7189 this.insert0(offset,b?"true":"false");
7190 return this;
7191 },"~N,~B");
7192 Clazz_defineMethod(c$,"insert",
7193 function(offset,c){
7194 this.insert0(offset,c);
7195 return this;
7196 },"~N,~N");
7197 Clazz_defineMethod(c$,"insert",
7198 function(offset,i){
7199 this.insert0(offset,Integer.toString(i));
7200 return this;
7201 },"~N,~N");
7202 Clazz_defineMethod(c$,"insert",
7203 function(offset,l){
7204 this.insert0(offset,Long.toString(l));
7205 return this;
7206 },"~N,~N");
7207 Clazz_defineMethod(c$,"insert",
7208 function(offset,f){
7209 this.insert0(offset,Float.toString(f));
7210 return this;
7211 },"~N,~N");
7212 Clazz_defineMethod(c$,"insert",
7213 function(offset,d){
7214 this.insert0(offset,Double.toString(d));
7215 return this;
7216 },"~N,~N");
7217 Clazz_defineMethod(c$,"insert",
7218 function(offset,obj){
7219 this.insert0(offset,obj==null?"null":obj.toString());
7220 return this;
7221 },"~N,~O");
7222 Clazz_defineMethod(c$,"insert",
7223 function(offset,str){
7224 this.insert0(offset,str);
7225 return this;
7226 },"~N,~S");
7227 Clazz_defineMethod(c$,"insert",
7228 function(offset,ch){
7229 this.insert0(offset,ch);
7230 return this;
7231 },"~N,~A");
7232 Clazz_defineMethod(c$,"insert",
7233 function(offset,str,strOffset,strLen){
7234 this.insert0(offset,str,strOffset,strLen);
7235 return this;
7236 },"~N,~A,~N,~N");
7237 Clazz_defineMethod(c$,"insert",
7238 function(offset,s){
7239 this.insert0(offset,s==null?"null":s.toString());
7240 return this;
7241 },"~N,CharSequence");
7242 Clazz_defineMethod(c$,"insert",
7243 function(offset,s,start,end){
7244 this.insert0(offset,s,start,end);
7245 return this;
7246 },"~N,CharSequence,~N,~N");
7247 Clazz_defineMethod(c$,"replace",
7248 function(start,end,str){
7249 this.replace0(start,end,str);
7250 return this;
7251 },"~N,~N,~S");
7252 Clazz_defineMethod(c$,"reverse",
7253 function(){
7254 this.reverse0();
7255 return this;
7256 });
7257 });
7258 Clazz_load(null,"java.lang.AbstractStringBuilder",["java.io.InvalidObjectException","java.lang.ArrayIndexOutOfBoundsException","$.IndexOutOfBoundsException","$.NegativeArraySizeException","$.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
7259 c$=Clazz_decorateAsClass(function(){
7260 this.value=null;
7261 this.count=0;
7262 this.shared=false;
7263 Clazz_instantialize(this,arguments);
7264 },java.lang,"AbstractStringBuilder");
7265 Clazz_defineMethod(c$,"getValue",
7266 function(){
7267 return this.value;
7268 });
7269 Clazz_defineMethod(c$,"shareValue",
7270 function(){
7271 this.shared=true;
7272 return this.value;
7273 });
7274 Clazz_defineMethod(c$,"set",
7275 function(val,len){
7276 if(val==null)val=Clazz_newArray(0,'\0');
7277 if(val.length<len)throw new java.io.InvalidObjectException(("K0199"));
7278 this.shared=false;
7279 this.value=val;
7280 this.count=len;
7281 },"~A,~N");
7282 Clazz_makeConstructor(c$,
7283 function(){
7284 this.value=Clazz_newArray(16,'\0');
7285 });
7286 Clazz_makeConstructor(c$,
7287 function(capacity){
7288 if(capacity<0)throw new NegativeArraySizeException();
7289 this.value=Clazz_newArray(capacity,'\0');
7290 },"~N");
7291 Clazz_makeConstructor(c$,
7292 function(string){
7293 this.count=string.length;
7294 this.shared=false;
7295 this.value=Clazz_newArray(this.count+16,'\0');
7296 string.getChars(0,this.count,this.value,0);
7297 },"~S");
7298 Clazz_defineMethod(c$,"enlargeBuffer",
7299 ($fz=function(min){
7300 var twice=(this.value.length<<1)+2;
7301 var newData=Clazz_newArray(min>twice?min:twice,'\0');
7302 System.arraycopy(this.value,0,newData,0,this.count);
7303 this.value=newData;
7304 this.shared=false;
7305 },$fz.isPrivate=true,$fz),"~N");
7306 Clazz_defineMethod(c$,"appendNull",
7307 function(){
7308 var newSize=this.count+4;
7309 if(newSize>this.value.length){
7310 this.enlargeBuffer(newSize);
7311 }else if(this.shared){
7312 this.value=this.value.clone();
7313 this.shared=false;
7314 }this.value[this.count++]='n';
7315 this.value[this.count++]='u';
7316 this.value[this.count++]='l';
7317 this.value[this.count++]='l';
7318 });
7319 Clazz_defineMethod(c$,"append0",
7320 function(chars){
7321 var newSize=this.count+chars.length;
7322 if(newSize>this.value.length){
7323 this.enlargeBuffer(newSize);
7324 }else if(this.shared){
7325 this.value=this.value.clone();
7326 this.shared=false;
7327 }System.arraycopy(chars,0,this.value,this.count,chars.length);
7328 this.count=newSize;
7329 },"~A");
7330 Clazz_defineMethod(c$,"append0",
7331 function(chars,start,length){
7332 if(chars==null){
7333 throw new NullPointerException();
7334 }if(start>=0&&0<=length&&length<=chars.length-start){
7335 var newSize=this.count+length;
7336 if(newSize>this.value.length){
7337 this.enlargeBuffer(newSize);
7338 }else if(this.shared){
7339 this.value=this.value.clone();
7340 this.shared=false;
7341 }System.arraycopy(chars,start,this.value,this.count,length);
7342 this.count=newSize;
7343 }else{
7344 throw new ArrayIndexOutOfBoundsException();
7345 }},"~A,~N,~N");
7346 Clazz_defineMethod(c$,"append0",
7347 function(ch){
7348 if(this.count==this.value.length){
7349 this.enlargeBuffer(this.count+1);
7350 }if(this.shared){
7351 this.value=this.value.clone();
7352 this.shared=false;
7353 }this.value[this.count++]=ch;
7354 },"~N");
7355 Clazz_defineMethod(c$,"append0",
7356 function(string){
7357 if(string==null){
7358 this.appendNull();
7359 return;
7360 }var adding=string.length;
7361 var newSize=this.count+adding;
7362 if(newSize>this.value.length){
7363 this.enlargeBuffer(newSize);
7364 }else if(this.shared){
7365 this.value=this.value.clone();
7366 this.shared=false;
7367 }string.getChars(0,adding,this.value,this.count);
7368 this.count=newSize;
7369 },"~S");
7370 Clazz_defineMethod(c$,"append0",
7371 function(s,start,end){
7372 if(s==null)s="null";
7373 if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7374 this.append0(s.subSequence(start,end).toString());
7375 },"CharSequence,~N,~N");
7376 Clazz_defineMethod(c$,"capacity",
7377 function(){
7378 return this.value.length;
7379 });
7380 Clazz_defineMethod(c$,"charAt",
7381 function(index){
7382 if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index);
7383 return this.value[index];
7384 },"~N");
7385 Clazz_defineMethod(c$,"delete0",
7386 function(start,end){
7387 if(start>=0){
7388 if(end>this.count){
7389 end=this.count;
7390 }if(end==start){
7391 return;
7392 }if(end>start){
7393 var length=this.count-end;
7394 if(length>0){
7395 if(!this.shared){
7396 System.arraycopy(this.value,end,this.value,start,length);
7397 }else{
7398 var newData=Clazz_newArray(this.value.length,'\0');
7399 System.arraycopy(this.value,0,newData,0,start);
7400 System.arraycopy(this.value,end,newData,start,length);
7401 this.value=newData;
7402 this.shared=false;
7403 }}this.count-=end-start;
7404 return;
7405 }}throw new StringIndexOutOfBoundsException();
7406 },"~N,~N");
7407 Clazz_defineMethod(c$,"deleteCharAt0",
7408 function(location){
7409 if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location);
7410 var length=this.count-location-1;
7411 if(length>0){
7412 if(!this.shared){
7413 System.arraycopy(this.value,location+1,this.value,location,length);
7414 }else{
7415 var newData=Clazz_newArray(this.value.length,'\0');
7416 System.arraycopy(this.value,0,newData,0,location);
7417 System.arraycopy(this.value,location+1,newData,location,length);
7418 this.value=newData;
7419 this.shared=false;
7420 }}this.count--;
7421 },"~N");
7422 Clazz_defineMethod(c$,"ensureCapacity",
7423 function(min){
7424 if(min>this.value.length){
7425 this.enlargeBuffer(min);
7426 }},"~N");
7427 Clazz_defineMethod(c$,"getChars",
7428 function(start,end,dest,destStart){
7429 if(start>this.count||end>this.count||start>end){
7430 throw new StringIndexOutOfBoundsException();
7431 }System.arraycopy(this.value,start,dest,destStart,end-start);
7432 },"~N,~N,~A,~N");
7433 Clazz_defineMethod(c$,"insert0",
7434 function(index,chars){
7435 if(0>index||index>this.count){
7436 throw new StringIndexOutOfBoundsException(index);
7437 }if(chars.length!=0){
7438 this.move(chars.length,index);
7439 System.arraycopy(chars,0,this.value,index,chars.length);
7440 this.count+=chars.length;
7441 }},"~N,~A");
7442 Clazz_defineMethod(c$,"insert0",
7443 function(index,chars,start,length){
7444 if(0<=index&&index<=this.count){
7445 if(start>=0&&0<=length&&length<=chars.length-start){
7446 if(length!=0){
7447 this.move(length,index);
7448 System.arraycopy(chars,start,this.value,index,length);
7449 this.count+=length;
7450 }return;
7451 }throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length);
7452 }throw new StringIndexOutOfBoundsException(index);
7453 },"~N,~A,~N,~N");
7454 Clazz_defineMethod(c$,"insert0",
7455 function(index,ch){
7456 if(0>index||index>this.count){
7457 throw new ArrayIndexOutOfBoundsException(index);
7458 }this.move(1,index);
7459 this.value[index]=ch;
7460 this.count++;
7461 },"~N,~N");
7462 Clazz_defineMethod(c$,"insert0",
7463 function(index,string){
7464 if(0<=index&&index<=this.count){
7465 if(string==null)string="null";
7466 var min=string.length;
7467 if(min!=0){
7468 this.move(min,index);
7469 string.getChars(0,min,this.value,index);
7470 this.count+=min;
7471 }}else{
7472 throw new StringIndexOutOfBoundsException(index);
7473 }},"~N,~S");
7474 Clazz_defineMethod(c$,"insert0",
7475 function(index,s,start,end){
7476 if(s==null)s="null";
7477 if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7478 this.insert0(index,s.subSequence(start,end).toString());
7479 },"~N,CharSequence,~N,~N");
7480 Clazz_defineMethod(c$,"length",
7481 function(){
7482 return this.count;
7483 });
7484 Clazz_defineMethod(c$,"move",
7485 ($fz=function(size,index){
7486 var newSize;
7487 if(this.value.length-this.count>=size){
7488 if(!this.shared){
7489 System.arraycopy(this.value,index,this.value,index+size,this.count-index);
7490 return;
7491 }newSize=this.value.length;
7492 }else{
7493 var a=this.count+size;
7494 var b=(this.value.length<<1)+2;
7495 newSize=a>b?a:b;
7496 }var newData=Clazz_newArray(newSize,'\0');
7497 System.arraycopy(this.value,0,newData,0,index);
7498 System.arraycopy(this.value,index,newData,index+size,this.count-index);
7499 this.value=newData;
7500 this.shared=false;
7501 },$fz.isPrivate=true,$fz),"~N,~N");
7502 Clazz_defineMethod(c$,"replace0",
7503 function(start,end,string){
7504 if(start>=0){
7505 if(end>this.count)end=this.count;
7506 if(end>start){
7507 var stringLength=string.length;
7508 var diff=end-start-stringLength;
7509 if(diff>0){
7510 if(!this.shared){
7511 System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end);
7512 }else{
7513 var newData=Clazz_newArray(this.value.length,'\0');
7514 System.arraycopy(this.value,0,newData,0,start);
7515 System.arraycopy(this.value,end,newData,start+stringLength,this.count-end);
7516 this.value=newData;
7517 this.shared=false;
7518 }}else if(diff<0){
7519 this.move(-diff,end);
7520 }else if(this.shared){
7521 this.value=this.value.clone();
7522 this.shared=false;
7523 }string.getChars(0,stringLength,this.value,start);
7524 this.count-=diff;
7525 return;
7526 }if(start==end){
7527 if(string==null)throw new NullPointerException();
7528 this.insert0(start,string);
7529 return;
7530 }}throw new StringIndexOutOfBoundsException();
7531 },"~N,~N,~S");
7532 Clazz_defineMethod(c$,"reverse0",
7533 function(){
7534 if(this.count<2){
7535 return;
7536 }if(!this.shared){
7537 for(var i=0,end=this.count,mid=Math.floor(this.count/2);i<mid;i++){
7538 var temp=this.value[--end];
7539 this.value[end]=this.value[i];
7540 this.value[i]=temp;
7541 }
7542 }else{
7543 var newData=Clazz_newArray(this.value.length,'\0');
7544 for(var i=0,end=this.count;i<this.count;i++){
7545 newData[--end]=this.value[i];
7546 }
7547 this.value=newData;
7548 this.shared=false;
7549 }});
7550 Clazz_defineMethod(c$,"setCharAt",
7551 function(index,ch){
7552 if(0>index||index>=this.count){
7553 throw new StringIndexOutOfBoundsException(index);
7554 }if(this.shared){
7555 this.value=this.value.clone();
7556 this.shared=false;
7557 }this.value[index]=ch;
7558 },"~N,~N");
7559 Clazz_defineMethod(c$,"setLength",
7560 function(length){
7561 if(length<0)throw new StringIndexOutOfBoundsException(length);
7562 if(this.count<length){
7563 if(length>this.value.length){
7564 this.enlargeBuffer(length);
7565 }else{
7566 if(this.shared){
7567 var newData=Clazz_newArray(this.value.length,'\0');
7568 System.arraycopy(this.value,0,newData,0,this.count);
7569 this.value=newData;
7570 this.shared=false;
7571 }else{
7572 for(var i=this.count;i<length;i++){
7573 this.value[i]=String.fromCharCode(0);
7574 }
7575 }}}this.count=length;
7576 },"~N");
7577 Clazz_defineMethod(c$,"substring",
7578 function(start){
7579 if(0<=start&&start<=this.count){
7580 if(start==this.count)return"";
7581 this.shared=true;
7582 return String.instantialize(start,this.count-start,this.value);
7583 }throw new StringIndexOutOfBoundsException(start);
7584 },"~N");
7585 Clazz_defineMethod(c$,"substring",
7586 function(start,end){
7587 if(0<=start&&start<=end&&end<=this.count){
7588 if(start==end)return"";
7589 this.shared=true;
7590 return String.instantialize(this.value,start,end-start);
7591 }throw new StringIndexOutOfBoundsException();
7592 },"~N,~N");
7593 Clazz_overrideMethod(c$,"toString",
7594 function(){
7595 if(this.count==0)return"";
7596 if(this.count>=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count);
7597 this.shared=true;
7598 return String.instantialize(0,this.count,this.value);
7599 });
7600 Clazz_defineMethod(c$,"subSequence",
7601 function(start,end){
7602 return this.substring(start,end);
7603 },"~N,~N");
7604 Clazz_defineMethod(c$,"indexOf",
7605 function(string){
7606 return this.indexOf(string,0);
7607 },"~S");
7608 Clazz_defineMethod(c$,"indexOf",
7609 function(subString,start){
7610 if(start<0)start=0;
7611 var subCount=subString.length;
7612 if(subCount>0){
7613 if(subCount+start>this.count)return-1;
7614 var firstChar=subString.charAt(0);
7615 while(true){
7616 var i=start;
7617 var found=false;
7618 for(;i<this.count;i++)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7619 found=true;
7620 break;
7621 }
7622 if(!found||subCount+i>this.count)return-1;
7623 var o1=i;
7624 var o2=0;
7625 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7626 }
7627 if(o2==subCount)return i;
7628 start=i+1;
7629 }
7630 }return(start<this.count||start==0)?start:this.count;
7631 },"~S,~N");
7632 Clazz_defineMethod(c$,"lastIndexOf",
7633 function(string){
7634 return this.lastIndexOf(string,this.count);
7635 },"~S");
7636 Clazz_defineMethod(c$,"lastIndexOf",
7637 function(subString,start){
7638 var subCount=subString.length;
7639 if(subCount<=this.count&&start>=0){
7640 if(subCount>0){
7641 if(start>this.count-subCount)start=this.count-subCount;
7642 var firstChar=subString.charAt(0);
7643 while(true){
7644 var i=start;
7645 var found=false;
7646 for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7647 found=true;
7648 break;
7649 }
7650 if(!found)return-1;
7651 var o1=i;
7652 var o2=0;
7653 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7654 }
7655 if(o2==subCount)return i;
7656 start=i-1;
7657 }
7658 }return start<this.count?start:this.count;
7659 }return-1;
7660 },"~S,~N");
7661 Clazz_defineMethod(c$,"trimToSize",
7662 function(){
7663 if(this.count<this.value.length){
7664 var newValue=Clazz_newArray(this.count,'\0');
7665 System.arraycopy(this.value,0,newValue,0,this.count);
7666 this.value=newValue;
7667 this.shared=false;
7668 }});
7669 Clazz_defineStatics(c$,
7670 "INITIAL_CAPACITY",16);
7671 });
7672 // BH adjusted to have only one sort method.
7673 // BH -- added Java 6  copyOfRange
7674
7675 Clazz_load(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){
7676 c$=Clazz_declareType(java.util,"Arrays");
7677
7678 c$.copyOfRange = Clazz_defineMethod (c$, "copyOfRange", 
7679 function (original, from, to) {
7680 to = Math.min(original.length, to);
7681 var newLength = to - from;
7682 if (newLength < 0) throw  new IllegalArgumentException (from + " > " + to);
7683 if (original.slice)
7684   return original.slice(from, to);
7685   // MSIE and Chrome do not have Int32Array.slice()
7686 var c = Clazz_newIntArray(newLength, 0);
7687 for (var i = 0; i < newLength; i++)
7688   c[i] = original[from++];
7689 return c;  
7690 }, "~A,~N,~N");
7691
7692 c$.sort=Clazz_overrideMethod(c$,"sort",
7693 function(a,c,d,e){
7694   switch (arguments.length) {
7695   case 1:
7696     var aux=a.sort(function(o1,o2){
7697       if(typeof o1=="string"||o1 instanceof Comparable){
7698         return o1.compareTo(o2);
7699       }
7700       return o1-o2;
7701       });
7702     for(var i=0;i<a.length;i++){
7703       a[i]=aux[i];
7704     }
7705     return;
7706   case 2:
7707     var aux=a.sort(function(o1,o2){
7708       if(c!=null){
7709         return c.compare(o1,o2);
7710       }else if(typeof o1=="string"||o1 instanceof Comparable){
7711         return o1.compareTo(o2);
7712       }
7713       return o1-o2;
7714       });
7715     for(var i=0;i<a.length;i++){
7716       a[i]=aux[i];
7717     }
7718     return;
7719   case 3:
7720     var fromIndex = c;
7721     var toIndex = d;
7722     this.rangeCheck(a.length,fromIndex,toIndex);
7723     var aux=new Array();
7724     for(var i=fromIndex;i<toIndex;i++){
7725       aux[i-fromIndex]=a[i];
7726     }
7727     aux=aux.sort(function(o1,o2){
7728       if(typeof o1=="string"||o1 instanceof Comparable){
7729         return o1.compareTo(o2);
7730       }
7731       return o1-o2;
7732       });
7733     for(var i=fromIndex;i<toIndex;i++){
7734       a[i]=aux[i-fromIndex];
7735     }
7736     return;
7737   case 4:  
7738     var fromIndex = c;
7739     var toIndex = d;
7740     c = e;
7741     this.rangeCheck(a.length,fromIndex,toIndex);
7742     var aux=new Array();
7743     for(var i=fromIndex;i<toIndex;i++){
7744       aux[i-fromIndex]=a[i];
7745     }
7746     aux=aux.sort(function(o1,o2){
7747       if(c!=null){
7748         return c.compare(o1,o2);
7749       }else if(typeof o1=="string"||o1 instanceof Comparable){
7750         return o1.compareTo(o2);
7751       }
7752       return o1-o2;
7753       });
7754     for(var i=fromIndex;i<toIndex;i++){
7755       a[i]=aux[i-fromIndex];
7756     }
7757   }
7758 });
7759
7760 c$.rangeCheck=Clazz_defineMethod(c$,"rangeCheck",
7761 ($fz=function(arrayLen,fromIndex,toIndex){
7762 if(fromIndex>toIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")");
7763 if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex);
7764 if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex);
7765 },$fz.isPrivate=true,$fz),"~N,~N,~N");
7766 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7767 function(a,key){
7768 var low=0;
7769 var high=a.length-1;
7770 while(low<=high){
7771 var mid=(low+high)>>1;
7772 var midVal=a[mid];
7773 if(midVal<key)low=mid+1;
7774 else if(midVal>key)high=mid-1;
7775 else return mid;
7776 }
7777 return-(low+1);
7778 },"~A,~N");
7779 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7780 function(a,key){
7781 var low=0;
7782 var high=a.length-1;
7783 while(low<=high){
7784 var mid=(low+high)>>1;
7785 var midVal=a[mid];
7786 var cmp=(midVal).compareTo(key);
7787 if(cmp<0)low=mid+1;
7788 else if(cmp>0)high=mid-1;
7789 else return mid;
7790 }
7791 return-(low+1);
7792 },"~A,~O");
7793 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7794 function(a,key,c){
7795 if(c==null)return java.util.Arrays.binarySearch(a,key);
7796 var low=0;
7797 var high=a.length-1;
7798 while(low<=high){
7799 var mid=(low+high)>>1;
7800 var midVal=a[mid];
7801 var cmp=c.compare(midVal,key);
7802 if(cmp<0)low=mid+1;
7803 else if(cmp>0)high=mid-1;
7804 else return mid;
7805 }
7806 return-(low+1);
7807 },"~A,~O,java.util.Comparator");
7808 c$.equals=Clazz_defineMethod(c$,"equals",
7809 function(a,a2){
7810 if(a===a2)return true;
7811 if(a==null||a2==null)return false;
7812 var length=a.length;
7813 if(a2.length!=length)return false;
7814 for(var i=0;i<length;i++){
7815 var o1=a[i];
7816 var o2=a2[i];
7817 {
7818 if(!(o1==null?o2==null:(o1.equals==null?o1==o2:o1.equals(o2))))return false;
7819 }}
7820 return true;
7821 },"~A,~A");
7822
7823 c$.fill=Clazz_overrideMethod(c$,"fill",
7824 function(a,fromIndex,toIndex,val){
7825 if (arguments.length == 2) {
7826                 val = fromIndex;
7827                 fromIndex = 0;
7828                 toIndex = a.length;
7829         }       
7830         java.util.Arrays.rangeCheck(a.length,fromIndex,toIndex);
7831         for(var i=fromIndex;i<toIndex;i++)a[i]=val;
7832 });
7833
7834 c$.asList=Clazz_defineMethod(c$,"asList",
7835 function(a){
7836 return new java.util.Arrays.ArrayList(arguments.length == 1 && Clazz_getClassName(a) == "Array" ? a : arguments); // BH must be T...
7837 },"~A");
7838 Clazz_pu$h(self.c$);
7839 c$=Clazz_decorateAsClass(function(){
7840 this.a=null;
7841 Clazz_instantialize(this,arguments);
7842 },java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);
7843 Clazz_makeConstructor(c$,
7844 function(a){
7845 Clazz_superConstructor(this,java.util.Arrays.ArrayList,[]);
7846 if(a==null)throw new NullPointerException();
7847 this.a=a;
7848 },"~A");
7849 Clazz_overrideMethod(c$,"size",
7850 function(){
7851 return this.a.length;
7852 });
7853 Clazz_defineMethod(c$,"toArray",
7854 function(){
7855 return this.a.clone();
7856 });
7857 Clazz_overrideMethod(c$,"get",
7858 function(a){
7859 return this.a[a];
7860 },"~N");
7861 Clazz_overrideMethod(c$,"set",
7862 function(a,b){
7863 var c=this.a[a];
7864 this.a[a]=b;
7865 return c;
7866 },"~N,~O");
7867 Clazz_overrideMethod(c$,"indexOf",
7868 function(a){
7869 if(a==null){
7870 for(var b=0;b<this.a.length;b++)if(this.a[b]==null)return b;
7871
7872 }else{
7873 for(var b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
7874
7875 }return-1;
7876 },"~O");
7877 Clazz_overrideMethod(c$,"contains",
7878 function(a){
7879 return this.indexOf(a)!=-1;
7880 },"~O");
7881 c$=Clazz_p0p();
7882 Clazz_defineStatics(c$,
7883 "INSERTIONSORT_THRESHOLD",7);
7884 });
7885 Clazz_declarePackage ("java.util");
7886 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
7887 c$ = Clazz_decorateAsClass (function () {
7888 this.language = null;
7889 this.country = null;
7890 this.variant = null;
7891 this.hashCodeValue = 0;
7892 Clazz_instantialize (this, arguments);
7893 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
7894 Clazz_makeConstructor (c$, 
7895 function (language, country, variant) {
7896 this.language = language.intern ();
7897 this.country = country.intern ();
7898 this.variant = variant.intern ();
7899 }, "~S,~S,~S");
7900 Clazz_makeConstructor (c$, 
7901 function (language, country) {
7902 this.construct (language, country, "");
7903 }, "~S,~S");
7904 Clazz_makeConstructor (c$, 
7905 function (language) {
7906 this.construct (language, "", "");
7907 }, "~S");
7908 Clazz_makeConstructor (c$, 
7909  function (language, country, flag) {
7910 this.language = language;
7911 this.country = country;
7912 this.variant = "";
7913 }, "~S,~S,~B");
7914 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
7915  function (key, language, country) {
7916 var locale =  new java.util.Locale (language, country, false);
7917 java.util.Locale.cache.put (key, locale);
7918 return locale;
7919 }, "~S,~S,~S");
7920 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
7921 function (language, country, variant) {
7922 if (language == null || country == null || variant == null) {
7923 throw  new NullPointerException ();
7924 }var sb =  new StringBuilder ();
7925 sb.append (language).append ('_').append (country).append ('_').append (variant);
7926 var key = sb.toString ();
7927 var locale = java.util.Locale.cache.get (key);
7928 if (locale == null) {
7929 locale =  new java.util.Locale (language, country, variant);
7930 var l = java.util.Locale.cache.put (key, locale);
7931 if (l != null) {
7932 locale = l;
7933 }}return locale;
7934 }, "~S,~S,~S");
7935 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
7936 function () {
7937 if (java.util.Locale.defaultLocale == null) {
7938 var language;
7939 var country;
7940 var variant;
7941 language = "en";
7942 country = "";
7943 variant = "";
7944 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
7945 }return java.util.Locale.defaultLocale;
7946 });
7947 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
7948 function (newLocale) {
7949 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
7950 java.util.Locale.defaultLocale = newLocale;
7951 }, "java.util.Locale");
7952 Clazz_defineMethod (c$, "getLanguage", 
7953 function () {
7954 return this.language;
7955 });
7956 Clazz_defineMethod (c$, "getCountry", 
7957 function () {
7958 return this.country;
7959 });
7960 Clazz_defineMethod (c$, "getVariant", 
7961 function () {
7962 return this.variant;
7963 });
7964 Clazz_overrideMethod (c$, "toString", 
7965 function () {
7966 var l = this.language.length != 0;
7967 var c = this.country.length != 0;
7968 var v = this.variant.length != 0;
7969 var result =  new StringBuilder (this.language);
7970 if (c || (l && v)) {
7971 result.append ('_').append (this.country);
7972 }if (v && (l || c)) {
7973 result.append ('_').append (this.variant);
7974 }return result.toString ();
7975 });
7976 Clazz_defineMethod (c$, "getDisplayLanguage", 
7977 function () {
7978 return this.getDisplayLanguage (java.util.Locale.getDefault ());
7979 });
7980 Clazz_defineMethod (c$, "getDisplayLanguage", 
7981 function (inLocale) {
7982 return this.getDisplayString (this.language, inLocale, 0);
7983 }, "java.util.Locale");
7984 Clazz_defineMethod (c$, "getDisplayCountry", 
7985 function () {
7986 return this.getDisplayCountry (java.util.Locale.getDefault ());
7987 });
7988 Clazz_defineMethod (c$, "getDisplayCountry", 
7989 function (inLocale) {
7990 return this.getDisplayString (this.country, inLocale, 1);
7991 }, "java.util.Locale");
7992 Clazz_defineMethod (c$, "getDisplayString", 
7993  function (code, inLocale, type) {
7994 if (code.length == 0) {
7995 return "";
7996 }if (inLocale == null) {
7997 throw  new NullPointerException ();
7998 }return inLocale.toString ();
7999 }, "~S,java.util.Locale,~N");
8000 Clazz_defineMethod (c$, "getDisplayVariant", 
8001 function () {
8002 return this.getDisplayVariant (java.util.Locale.getDefault ());
8003 });
8004 Clazz_defineMethod (c$, "getDisplayVariant", 
8005 function (inLocale) {
8006 if (this.variant.length == 0) return "";
8007 return this.variant;
8008 }, "java.util.Locale");
8009 Clazz_defineMethod (c$, "getDisplayName", 
8010 function () {
8011 return this.getDisplayName (java.util.Locale.getDefault ());
8012 });
8013 Clazz_defineMethod (c$, "getDisplayName", 
8014 function (inLocale) {
8015 return inLocale.toString ();
8016 }, "java.util.Locale");
8017 Clazz_defineMethod (c$, "clone", 
8018 function () {
8019 try {
8020 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
8021 return that;
8022 } catch (e) {
8023 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8024 throw  new InternalError ();
8025 } else {
8026 throw e;
8027 }
8028 }
8029 });
8030 Clazz_overrideMethod (c$, "hashCode", 
8031 function () {
8032 var hc = this.hashCodeValue;
8033 if (hc == 0) {
8034 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
8035 this.hashCodeValue = hc;
8036 }return hc;
8037 });
8038 Clazz_overrideMethod (c$, "equals", 
8039 function (obj) {
8040 if (this === obj) return true;
8041 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
8042 var other = obj;
8043 return this.language === other.language && this.country === other.country && this.variant === other.variant;
8044 }, "~O");
8045 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
8046 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
8047 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
8048 Clazz_defineStatics (c$,
8049 "DISPLAY_LANGUAGE", 0,
8050 "DISPLAY_COUNTRY", 1,
8051 "defaultLocale", null);
8052 });
8053 Clazz_declarePackage ("java.awt.event");
8054 Clazz_load (["java.util.EventListener"], "java.awt.event.ActionListener", null, function () {
8055 Clazz_declareInterface (java.awt.event, "ActionListener", java.util.EventListener);
8056 });
8057 Clazz_declarePackage ("java.awt.event");
8058 Clazz_load (["java.util.EventListener"], "java.awt.event.AdjustmentListener", null, function () {
8059 Clazz_declareInterface (java.awt.event, "AdjustmentListener", java.util.EventListener);
8060 });
8061 Clazz_declarePackage ("java.awt.event");
8062 Clazz_load (["java.util.EventListener"], "java.awt.event.ComponentListener", null, function () {
8063 Clazz_declareInterface (java.awt.event, "ComponentListener", java.util.EventListener);
8064 });
8065 Clazz_declarePackage ("java.awt.event");
8066 Clazz_load (["java.util.EventListener"], "java.awt.event.ContainerListener", null, function () {
8067 Clazz_declareInterface (java.awt.event, "ContainerListener", java.util.EventListener);
8068 });
8069 Clazz_declarePackage ("java.awt.event");
8070 Clazz_load (["java.util.EventListener"], "java.awt.event.FocusListener", null, function () {
8071 Clazz_declareInterface (java.awt.event, "FocusListener", java.util.EventListener);
8072 });
8073 Clazz_declarePackage ("java.awt.event");
8074 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyBoundsListener", null, function () {
8075 Clazz_declareInterface (java.awt.event, "HierarchyBoundsListener", java.util.EventListener);
8076 });
8077 Clazz_declarePackage ("java.awt.event");
8078 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyListener", null, function () {
8079 Clazz_declareInterface (java.awt.event, "HierarchyListener", java.util.EventListener);
8080 });
8081 Clazz_declarePackage ("java.awt.event");
8082 Clazz_load (["java.util.EventListener"], "java.awt.event.InputMethodListener", null, function () {
8083 Clazz_declareInterface (java.awt.event, "InputMethodListener", java.util.EventListener);
8084 });
8085 Clazz_declarePackage ("java.awt.event");
8086 Clazz_load (["java.util.EventListener"], "java.awt.event.ItemListener", null, function () {
8087 Clazz_declareInterface (java.awt.event, "ItemListener", java.util.EventListener);
8088 });
8089 Clazz_declarePackage ("java.awt.event");
8090 Clazz_load (["java.util.EventListener"], "java.awt.event.KeyListener", null, function () {
8091 Clazz_declareInterface (java.awt.event, "KeyListener", java.util.EventListener);
8092 });
8093 Clazz_declarePackage ("java.awt.event");
8094 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseListener", null, function () {
8095 Clazz_declareInterface (java.awt.event, "MouseListener", java.util.EventListener);
8096 });
8097 Clazz_declarePackage ("java.awt.event");
8098 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseMotionListener", null, function () {
8099 Clazz_declareInterface (java.awt.event, "MouseMotionListener", java.util.EventListener);
8100 });
8101 Clazz_declarePackage ("java.awt.event");
8102 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseWheelListener", null, function () {
8103 Clazz_declareInterface (java.awt.event, "MouseWheelListener", java.util.EventListener);
8104 });
8105 Clazz_declarePackage ("java.awt.event");
8106 Clazz_load (["java.util.EventListener"], "java.awt.event.TextListener", null, function () {
8107 Clazz_declareInterface (java.awt.event, "TextListener", java.util.EventListener);
8108 });
8109 Clazz_declarePackage ("java.awt.event");
8110 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowFocusListener", null, function () {
8111 Clazz_declareInterface (java.awt.event, "WindowFocusListener", java.util.EventListener);
8112 });
8113 Clazz_declarePackage ("java.awt.event");
8114 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowListener", null, function () {
8115 Clazz_declareInterface (java.awt.event, "WindowListener", java.util.EventListener);
8116 });
8117 Clazz_declarePackage ("java.awt.event");
8118 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowStateListener", null, function () {
8119 Clazz_declareInterface (java.awt.event, "WindowStateListener", java.util.EventListener);
8120 });
8121 Clazz_declarePackage ("java.awt");
8122 Clazz_load (null, "java.awt.Cursor", ["java.lang.IllegalArgumentException"], function () {
8123 c$ = Clazz_decorateAsClass (function () {
8124 this.type = 0;
8125 this.name = null;
8126 Clazz_instantialize (this, arguments);
8127 }, java.awt, "Cursor");
8128 c$.getPredefinedCursor = Clazz_defineMethod (c$, "getPredefinedCursor", 
8129 function (type) {
8130 if (type < 0 || type > 13) {
8131 throw  new IllegalArgumentException ("illegal cursor type");
8132 }var c = java.awt.Cursor.predefinedPrivate[type];
8133 if (c == null) {
8134 java.awt.Cursor.predefinedPrivate[type] = c =  new java.awt.Cursor (type);
8135 }if (java.awt.Cursor.predefined[type] == null) {
8136 java.awt.Cursor.predefined[type] = c;
8137 }return c;
8138 }, "~N");
8139 c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", 
8140 function (name) {
8141 return null;
8142 }, "~S");
8143 c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", 
8144 function () {
8145 return java.awt.Cursor.getPredefinedCursor (0);
8146 });
8147 Clazz_makeConstructor (c$, 
8148 function (type) {
8149 if (type < 0 || type > 13) {
8150 throw  new IllegalArgumentException ("illegal cursor type");
8151 }this.type = type;
8152 this.name = "TODO_CURSOR";
8153 }, "~N");
8154 Clazz_makeConstructor (c$, 
8155 function (name) {
8156 this.type = -1;
8157 this.name = name;
8158 }, "~S");
8159 Clazz_defineMethod (c$, "getType", 
8160 function () {
8161 return this.type;
8162 });
8163 Clazz_defineMethod (c$, "getName", 
8164 function () {
8165 return this.name;
8166 });
8167 Clazz_overrideMethod (c$, "toString", 
8168 function () {
8169 return this.getClass ().getName () + "[" + this.getName () + "]";
8170 });
8171 Clazz_defineStatics (c$,
8172 "DEFAULT_CURSOR", 0,
8173 "CROSSHAIR_CURSOR", 1,
8174 "TEXT_CURSOR", 2,
8175 "WAIT_CURSOR", 3,
8176 "SW_RESIZE_CURSOR", 4,
8177 "SE_RESIZE_CURSOR", 5,
8178 "NW_RESIZE_CURSOR", 6,
8179 "NE_RESIZE_CURSOR", 7,
8180 "N_RESIZE_CURSOR", 8,
8181 "S_RESIZE_CURSOR", 9,
8182 "W_RESIZE_CURSOR", 10,
8183 "E_RESIZE_CURSOR", 11,
8184 "HAND_CURSOR", 12,
8185 "MOVE_CURSOR", 13);
8186 c$.predefined = c$.prototype.predefined =  new Array (14);
8187 c$.predefinedPrivate = c$.prototype.predefinedPrivate =  new Array (14);
8188 Clazz_defineStatics (c$,
8189 "cursorProperties",  Clazz_newArray (-1, [ Clazz_newArray (-1, ["AWT.DefaultCursor", "Default Cursor"]),  Clazz_newArray (-1, ["AWT.CrosshairCursor", "Crosshair Cursor"]),  Clazz_newArray (-1, ["AWT.TextCursor", "Text Cursor"]),  Clazz_newArray (-1, ["AWT.WaitCursor", "Wait Cursor"]),  Clazz_newArray (-1, ["AWT.SWResizeCursor", "Southwest Resize Cursor"]),  Clazz_newArray (-1, ["AWT.SEResizeCursor", "Southeast Resize Cursor"]),  Clazz_newArray (-1, ["AWT.NWResizeCursor", "Northwest Resize Cursor"]),  Clazz_newArray (-1, ["AWT.NEResizeCursor", "Northeast Resize Cursor"]),  Clazz_newArray (-1, ["AWT.NResizeCursor", "North Resize Cursor"]),  Clazz_newArray (-1, ["AWT.SResizeCursor", "South Resize Cursor"]),  Clazz_newArray (-1, ["AWT.WResizeCursor", "West Resize Cursor"]),  Clazz_newArray (-1, ["AWT.EResizeCursor", "East Resize Cursor"]),  Clazz_newArray (-1, ["AWT.HandCursor", "Hand Cursor"]),  Clazz_newArray (-1, ["AWT.MoveCursor", "Move Cursor"])]),
8190 "CUSTOM_CURSOR", -1);
8191 });
8192 Clazz_declarePackage ("java.awt");
8193 Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () {
8194 c$ = Clazz_declareType (java.awt, "AWTError", Error);
8195 });
8196 Clazz_declarePackage ("java.awt");
8197 Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () {
8198 c$ = Clazz_decorateAsClass (function () {
8199 this.top = 0;
8200 this.left = 0;
8201 this.bottom = 0;
8202 this.right = 0;
8203 Clazz_instantialize (this, arguments);
8204 }, java.awt, "Insets", null, [Cloneable, java.io.Serializable]);
8205 Clazz_makeConstructor (c$, 
8206 function (top, left, bottom, right) {
8207 this.top = top;
8208 this.left = left;
8209 this.bottom = bottom;
8210 this.right = right;
8211 }, "~N,~N,~N,~N");
8212 Clazz_defineMethod (c$, "set", 
8213 function (top, left, bottom, right) {
8214 this.top = top;
8215 this.left = left;
8216 this.bottom = bottom;
8217 this.right = right;
8218 }, "~N,~N,~N,~N");
8219 Clazz_overrideMethod (c$, "equals", 
8220 function (obj) {
8221 if (Clazz_instanceOf (obj, java.awt.Insets)) {
8222 var insets = obj;
8223 return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right));
8224 }return false;
8225 }, "~O");
8226 Clazz_overrideMethod (c$, "hashCode", 
8227 function () {
8228 var sum1 = this.left + this.bottom;
8229 var sum2 = this.right + this.top;
8230 var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left;
8231 var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top;
8232 var sum3 = val1 + val2;
8233 return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2;
8234 });
8235 Clazz_overrideMethod (c$, "toString", 
8236 function () {
8237 return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
8238 });
8239 Clazz_defineMethod (c$, "clone", 
8240 function () {
8241 try {
8242 return Clazz_superCall (this, java.awt.Insets, "clone", []);
8243 } catch (e) {
8244 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8245 throw  new InternalError ();
8246 } else {
8247 throw e;
8248 }
8249 }
8250 });
8251 });
8252 Clazz_declarePackage ("java.awt");
8253 Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () {
8254 c$ = Clazz_decorateAsClass (function () {
8255 this.hintmap = null;
8256 Clazz_instantialize (this, arguments);
8257 }, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]);
8258 Clazz_prepareFields (c$, function () {
8259 this.hintmap =  new java.util.HashMap (7);
8260 });
8261 Clazz_overrideMethod (c$, "size", 
8262 function () {
8263 return this.hintmap.size ();
8264 });
8265 Clazz_overrideMethod (c$, "isEmpty", 
8266 function () {
8267 return this.hintmap.isEmpty ();
8268 });
8269 Clazz_overrideMethod (c$, "containsKey", 
8270 function (key) {
8271 return this.hintmap.containsKey (key);
8272 }, "~O");
8273 Clazz_overrideMethod (c$, "containsValue", 
8274 function (value) {
8275 return this.hintmap.containsValue (value);
8276 }, "~O");
8277 Clazz_overrideMethod (c$, "get", 
8278 function (key) {
8279 return this.hintmap.get (key);
8280 }, "~O");
8281 Clazz_overrideMethod (c$, "put", 
8282 function (key, value) {
8283 if (!(key).isCompatibleValue (value)) {
8284 throw  new IllegalArgumentException (value + " incompatible with " + key);
8285 }return this.hintmap.put (key, value);
8286 }, "~O,~O");
8287 Clazz_defineMethod (c$, "add", 
8288 function (hints) {
8289 this.hintmap.putAll (hints.hintmap);
8290 }, "java.awt.RenderingHints");
8291 Clazz_overrideMethod (c$, "clear", 
8292 function () {
8293 this.hintmap.clear ();
8294 });
8295 Clazz_overrideMethod (c$, "remove", 
8296 function (key) {
8297 return this.hintmap.remove (key);
8298 }, "~O");
8299 Clazz_overrideMethod (c$, "putAll", 
8300 function (m) {
8301 if (java.awt.RenderingHints.isInstance (m)) {
8302 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ());
8303
8304 } else {
8305 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ());
8306
8307 }}, "java.util.Map");
8308 Clazz_overrideMethod (c$, "keySet", 
8309 function () {
8310 return this.hintmap.keySet ();
8311 });
8312 Clazz_overrideMethod (c$, "values", 
8313 function () {
8314 return this.hintmap.values ();
8315 });
8316 Clazz_overrideMethod (c$, "entrySet", 
8317 function () {
8318 return java.util.Collections.unmodifiableMap (this.hintmap).entrySet ();
8319 });
8320 Clazz_overrideMethod (c$, "equals", 
8321 function (o) {
8322 if (Clazz_instanceOf (o, java.awt.RenderingHints)) {
8323 return this.hintmap.equals ((o).hintmap);
8324 } else if (Clazz_instanceOf (o, java.util.Map)) {
8325 return this.hintmap.equals (o);
8326 }return false;
8327 }, "~O");
8328 Clazz_overrideMethod (c$, "hashCode", 
8329 function () {
8330 return this.hintmap.hashCode ();
8331 });
8332 Clazz_overrideMethod (c$, "clone", 
8333 function () {
8334 var rh;
8335 try {
8336 {
8337 rh = Clazz_clone(this);
8338 if (this.hintmap != null) { rh.hintmap =
8339 this.hintmap.cloneHM(); }
8340 }} catch (e) {
8341 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8342 throw  new InternalError ();
8343 } else {
8344 throw e;
8345 }
8346 }
8347 return rh;
8348 });
8349 Clazz_overrideMethod (c$, "toString", 
8350 function () {
8351 if (this.hintmap == null) {
8352 return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)";
8353 }return this.hintmap.toString ();
8354 });
8355 Clazz_pu$h(self.c$);
8356 c$ = Clazz_decorateAsClass (function () {
8357 this.privatekey = 0;
8358 Clazz_instantialize (this, arguments);
8359 }, java.awt.RenderingHints, "Key");
8360 Clazz_defineMethod (c$, "getIdentity", 
8361  function () {
8362 return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey);
8363 });
8364 Clazz_defineMethod (c$, "recordIdentity", 
8365  function (a) {
8366 var b = a.getIdentity ();
8367 var c = java.awt.RenderingHints.Key.identitymap.get (b);
8368 if (c != null) {
8369 var d = c;
8370 if (d != null && d.getClass () === a.getClass ()) {
8371 throw  new IllegalArgumentException (b + " already registered");
8372 }}java.awt.RenderingHints.Key.identitymap.put (b, a);
8373 }, "java.awt.RenderingHints.Key");
8374 Clazz_makeConstructor (c$, 
8375 function (a) {
8376 this.privatekey = a;
8377 this.recordIdentity (this);
8378 }, "~N");
8379 Clazz_defineMethod (c$, "intKey", 
8380 function () {
8381 return this.privatekey;
8382 });
8383 Clazz_overrideMethod (c$, "equals", 
8384 function (a) {
8385 return this === a;
8386 }, "~O");
8387 c$.identitymap = c$.prototype.identitymap =  new java.util.HashMap (17);
8388 c$ = Clazz_p0p ();
8389 Clazz_pu$h(self.c$);
8390 c$ = Clazz_decorateAsClass (function () {
8391 this.description = null;
8392 Clazz_instantialize (this, arguments);
8393 }, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key);
8394 Clazz_makeConstructor (c$, 
8395 function (a, b) {
8396 Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]);
8397 this.description = b;
8398 }, "~N,~S");
8399 Clazz_defineMethod (c$, "getIndex", 
8400 function () {
8401 return this.privatekey;
8402 });
8403 Clazz_overrideMethod (c$, "toString", 
8404 function () {
8405 return this.description;
8406 });
8407 Clazz_overrideMethod (c$, "isCompatibleValue", 
8408 function (a) {
8409 if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) {
8410 return (a).isCompatibleKey (this);
8411 }return false;
8412 }, "~O");
8413 c$ = Clazz_p0p ();
8414 Clazz_pu$h(self.c$);
8415 c$ = Clazz_decorateAsClass (function () {
8416 this.myKey = null;
8417 this.index = 0;
8418 this.description = null;
8419 Clazz_instantialize (this, arguments);
8420 }, java.awt.RenderingHints, "Value");
8421 c$.register = Clazz_defineMethod (c$, "register", 
8422  function (a, b) {
8423 var c = a.getIndex ();
8424 var d = b.getIndex ();
8425 if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) {
8426 throw  new InternalError ("duplicate index: " + d);
8427 }java.awt.RenderingHints.Value.ValueObjects[c][d] = b;
8428 }, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value");
8429 c$.get = Clazz_defineMethod (c$, "get", 
8430 function (a, b) {
8431 return java.awt.RenderingHints.Value.ValueObjects[a][b];
8432 }, "~N,~N");
8433 Clazz_makeConstructor (c$, 
8434 function (a, b, c) {
8435 this.myKey = a;
8436 this.index = b;
8437 this.description = c;
8438 java.awt.RenderingHints.Value.register (a, this);
8439 }, "java.awt.RenderingHints.SunKey,~N,~S");
8440 Clazz_defineMethod (c$, "getIndex", 
8441 function () {
8442 return this.index;
8443 });
8444 Clazz_overrideMethod (c$, "toString", 
8445 function () {
8446 return this.description;
8447 });
8448 Clazz_defineMethod (c$, "isCompatibleKey", 
8449 function (a) {
8450 return this.myKey === a;
8451 }, "java.awt.RenderingHints.SunKey");
8452 Clazz_overrideMethod (c$, "hashCode", 
8453 function () {
8454 return this.description.hashCode ();
8455 });
8456 Clazz_overrideMethod (c$, "equals", 
8457 function (a) {
8458 return this === a;
8459 }, "~O");
8460 c$.ValueObjects = c$.prototype.ValueObjects =  Clazz_newArray (9, 8, null);
8461 c$ = Clazz_p0p ();
8462 Clazz_pu$h(self.c$);
8463 c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey);
8464 Clazz_overrideMethod (c$, "isCompatibleValue", 
8465 function (a) {
8466 if (Clazz_instanceOf (a, Integer)) {
8467 var b = (a).intValue ();
8468 return b >= 100 && b <= 250;
8469 }return false;
8470 }, "~O");
8471 c$ = Clazz_p0p ();
8472 Clazz_defineStatics (c$,
8473 "NUM_KEYS", 9,
8474 "VALS_PER_KEY", 8,
8475 "INTKEY_RENDERING", 0,
8476 "INTVAL_RENDER_DEFAULT", 0,
8477 "INTVAL_RENDER_SPEED", 1,
8478 "INTVAL_RENDER_QUALITY", 2,
8479 "INTKEY_ANTIALIASING", 1,
8480 "INTVAL_ANTIALIAS_DEFAULT", 0,
8481 "INTVAL_ANTIALIAS_OFF", 1,
8482 "INTVAL_ANTIALIAS_ON", 2,
8483 "INTKEY_TEXT_ANTIALIASING", 2,
8484 "INTVAL_TEXT_ANTIALIAS_DEFAULT", 0,
8485 "INTVAL_TEXT_ANTIALIAS_OFF", 1,
8486 "INTVAL_TEXT_ANTIALIAS_ON", 2,
8487 "INTVAL_TEXT_ANTIALIAS_GASP", 3,
8488 "INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4,
8489 "INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5,
8490 "INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6,
8491 "INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7,
8492 "INTKEY_FRACTIONALMETRICS", 3,
8493 "INTVAL_FRACTIONALMETRICS_DEFAULT", 0,
8494 "INTVAL_FRACTIONALMETRICS_OFF", 1,
8495 "INTVAL_FRACTIONALMETRICS_ON", 2,
8496 "INTKEY_DITHERING", 4,
8497 "INTVAL_DITHER_DEFAULT", 0,
8498 "INTVAL_DITHER_DISABLE", 1,
8499 "INTVAL_DITHER_ENABLE", 2,
8500 "INTKEY_INTERPOLATION", 5,
8501 "INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0,
8502 "INTVAL_INTERPOLATION_BILINEAR", 1,
8503 "INTVAL_INTERPOLATION_BICUBIC", 2,
8504 "INTKEY_ALPHA_INTERPOLATION", 6,
8505 "INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0,
8506 "INTVAL_ALPHA_INTERPOLATION_SPEED", 1,
8507 "INTVAL_ALPHA_INTERPOLATION_QUALITY", 2,
8508 "INTKEY_COLOR_RENDERING", 7,
8509 "INTVAL_COLOR_RENDER_DEFAULT", 0,
8510 "INTVAL_COLOR_RENDER_SPEED", 1,
8511 "INTVAL_COLOR_RENDER_QUALITY", 2,
8512 "INTKEY_STROKE_CONTROL", 8,
8513 "INTVAL_STROKE_DEFAULT", 0,
8514 "INTVAL_STROKE_NORMALIZE", 1,
8515 "INTVAL_STROKE_PURE", 2,
8516 "INTKEY_AATEXT_LCD_CONTRAST", 100);
8517 c$.KEY_RENDERING = c$.prototype.KEY_RENDERING =  new java.awt.RenderingHints.SunKey (0, "Global rendering quality key");
8518 c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods");
8519 c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods");
8520 c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods");
8521 c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING =  new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key");
8522 c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode");
8523 c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode");
8524 c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode");
8525 c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS =  new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key");
8526 c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode");
8527 c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode");
8528 c$.VALUE_FRACTIONALMETRICS_DEFAULT = c$.prototype.VALUE_FRACTIONALMETRICS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 0, "Default fractional text metrics mode");
8529 c$.KEY_DITHERING = c$.prototype.KEY_DITHERING =  new java.awt.RenderingHints.SunKey (4, "Dithering quality key");
8530 c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode");
8531 c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode");
8532 c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode");
8533 c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION =  new java.awt.RenderingHints.SunKey (5, "Image interpolation method key");
8534 c$.VALUE_INTERPOLATION_NEAREST_NEIGHBOR = c$.prototype.VALUE_INTERPOLATION_NEAREST_NEIGHBOR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 0, "Nearest Neighbor image interpolation mode");
8535 c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode");
8536 c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode");
8537 c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION =  new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key");
8538 c$.VALUE_ALPHA_INTERPOLATION_SPEED = c$.prototype.VALUE_ALPHA_INTERPOLATION_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 1, "Fastest alpha blending methods");
8539 c$.VALUE_ALPHA_INTERPOLATION_QUALITY = c$.prototype.VALUE_ALPHA_INTERPOLATION_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 2, "Highest quality alpha blending methods");
8540 c$.VALUE_ALPHA_INTERPOLATION_DEFAULT = c$.prototype.VALUE_ALPHA_INTERPOLATION_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ALPHA_INTERPOLATION, 0, "Default alpha blending methods");
8541 c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING =  new java.awt.RenderingHints.SunKey (7, "Color rendering quality key");
8542 c$.VALUE_COLOR_RENDER_SPEED = c$.prototype.VALUE_COLOR_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 1, "Fastest color rendering mode");
8543 c$.VALUE_COLOR_RENDER_QUALITY = c$.prototype.VALUE_COLOR_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 2, "Highest quality color rendering mode");
8544 c$.VALUE_COLOR_RENDER_DEFAULT = c$.prototype.VALUE_COLOR_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_COLOR_RENDERING, 0, "Default color rendering mode");
8545 c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL =  new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key");
8546 c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization");
8547 c$.VALUE_STROKE_NORMALIZE = c$.prototype.VALUE_STROKE_NORMALIZE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 1, "Normalize strokes for consistent rendering");
8548 c$.VALUE_STROKE_PURE = c$.prototype.VALUE_STROKE_PURE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 2, "Pure stroke conversion for accurate paths");
8549 c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING =  new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key");
8550 c$.VALUE_TEXT_ANTIALIAS_ON = c$.prototype.VALUE_TEXT_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 2, "Antialiased text mode");
8551 c$.VALUE_TEXT_ANTIALIAS_OFF = c$.prototype.VALUE_TEXT_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 1, "Nonantialiased text mode");
8552 c$.VALUE_TEXT_ANTIALIAS_DEFAULT = c$.prototype.VALUE_TEXT_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 0, "Default antialiasing text mode");
8553 c$.VALUE_TEXT_ANTIALIAS_GASP = c$.prototype.VALUE_TEXT_ANTIALIAS_GASP =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 3, "gasp antialiasing text mode");
8554 c$.VALUE_TEXT_ANTIALIAS_LCD_HRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HRGB =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 4, "LCD HRGB antialiasing text mode");
8555 c$.VALUE_TEXT_ANTIALIAS_LCD_HBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_HBGR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 5, "LCD HBGR antialiasing text mode");
8556 c$.VALUE_TEXT_ANTIALIAS_LCD_VRGB = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VRGB =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 6, "LCD VRGB antialiasing text mode");
8557 c$.VALUE_TEXT_ANTIALIAS_LCD_VBGR = c$.prototype.VALUE_TEXT_ANTIALIAS_LCD_VBGR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_TEXT_ANTIALIASING, 7, "LCD VBGR antialiasing text mode");
8558 c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST =  new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key");
8559 c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST;
8560 });
8561 //BH note: a declared static superclass must come before a static class referencing it
8562
8563 Clazz_load(["java.util.AbstractList","$.AbstractMap","$.AbstractSet","$.Collection","$.Iterator","$.List","$.ListIterator","$.Map","$.RandomAccess","$.Set","$.SortedMap","$.SortedSet","java.lang.NullPointerException","$.UnsupportedOperationException","java.lang.reflect.Array"],"java.util.Collections",["java.lang.ArrayIndexOutOfBoundsException","$.ClassCastException","$.IllegalArgumentException","$.IndexOutOfBoundsException","java.util.ArrayList","$.Arrays","$.Enumeration","java.util.Map.Entry","java.util.NoSuchElementException","$.Random"],function(){
8564 c$=Clazz_declareType(java.util,"Collections");
8565 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8566 function(list,object){
8567 if(list==null){
8568 throw new NullPointerException();
8569 }if(list.isEmpty()){
8570 return-1;
8571 }var key=object;
8572 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8573 var it=list.listIterator();
8574 while(it.hasNext()){
8575 var result;
8576 if((result=key.compareTo(it.next()))<=0){
8577 if(result==0){
8578 return it.previousIndex();
8579 }return-it.previousIndex()-1;
8580 }}
8581 return-list.size()-1;
8582 }var low=0;
8583 var mid=list.size();
8584 var high=mid-1;
8585 var result=-1;
8586 while(low<=high){
8587 mid=(low+high)>>1;
8588 if((result=key.compareTo(list.get(mid)))>0){
8589 low=mid+1;
8590 }else if(result==0){
8591 return mid;
8592 }else{
8593 high=mid-1;
8594 }}
8595 return-mid-(result<0?1:2);
8596 },"java.util.List,~O");
8597 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8598 function(list,object,comparator){
8599 if(comparator==null){
8600 return java.util.Collections.binarySearch(list,object);
8601 }if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8602 var it=list.listIterator();
8603 while(it.hasNext()){
8604 var result;
8605 if((result=comparator.compare(object,it.next()))<=0){
8606 if(result==0){
8607 return it.previousIndex();
8608 }return-it.previousIndex()-1;
8609 }}
8610 return-list.size()-1;
8611 }var low=0;
8612 var mid=list.size();
8613 var high=mid-1;
8614 var result=-1;
8615 while(low<=high){
8616 mid=(low+high)>>1;
8617 if((result=comparator.compare(object,list.get(mid)))>0){
8618 low=mid+1;
8619 }else if(result==0){
8620 return mid;
8621 }else{
8622 high=mid-1;
8623 }}
8624 return-mid-(result<0?1:2);
8625 },"java.util.List,~O,java.util.Comparator");
8626 c$.copy=Clazz_defineMethod(c$,"copy",
8627 function(destination,source){
8628 if(destination.size()<source.size()){
8629 throw new ArrayIndexOutOfBoundsException();
8630 }var srcIt=source.iterator();
8631 var destIt=destination.listIterator();
8632 while(srcIt.hasNext()){
8633 try{
8634 destIt.next();
8635 }catch(e){
8636 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
8637 throw new ArrayIndexOutOfBoundsException();
8638 }else{
8639 throw e;
8640 }
8641 }
8642 destIt.set(srcIt.next());
8643 }
8644 },"java.util.List,java.util.List");
8645 c$.enumeration=Clazz_defineMethod(c$,"enumeration",
8646 function(collection){
8647 var c=collection;
8648
8649 if (!Clazz_isClassDefined("java.util.Collections$1"))
8650         java.util.Collections.$Collections$1$(c);
8651
8652 var x = Clazz_innerTypeInstance(java.util.Collections$1,this,null);
8653
8654 return x;
8655 },"java.util.Collection");
8656
8657 c$.fill=Clazz_defineMethod(c$,"fill",
8658 function(list,object){
8659 var it=list.listIterator();
8660 while(it.hasNext()){
8661 it.next();
8662 it.set(object);
8663 }
8664 },"java.util.List,~O");
8665 c$.max=Clazz_defineMethod(c$,"max",
8666 function(collection){
8667 var it=collection.iterator();
8668 var max=it.next();
8669 while(it.hasNext()){
8670 var next=it.next();
8671 if(max.compareTo(next)<0){
8672 max=next;
8673 }}
8674 return max;
8675 },"java.util.Collection");
8676 c$.max=Clazz_defineMethod(c$,"max",
8677 function(collection,comparator){
8678 var it=collection.iterator();
8679 var max=it.next();
8680 while(it.hasNext()){
8681 var next=it.next();
8682 if(comparator.compare(max,next)<0){
8683 max=next;
8684 }}
8685 return max;
8686 },"java.util.Collection,java.util.Comparator");
8687 c$.min=Clazz_defineMethod(c$,"min",
8688 function(collection){
8689 var it=collection.iterator();
8690 var min=it.next();
8691 while(it.hasNext()){
8692 var next=it.next();
8693 if(min.compareTo(next)>0){
8694 min=next;
8695 }}
8696 return min;
8697 },"java.util.Collection");
8698 c$.min=Clazz_defineMethod(c$,"min",
8699 function(collection,comparator){
8700 var it=collection.iterator();
8701 var min=it.next();
8702 while(it.hasNext()){
8703 var next=it.next();
8704 if(comparator.compare(min,next)>0){
8705 min=next;
8706 }}
8707 return min;
8708 },"java.util.Collection,java.util.Comparator");
8709 c$.nCopies=Clazz_defineMethod(c$,"nCopies",
8710 function(length,object){
8711 return new java.util.Collections.CopiesList(length,object);
8712 },"~N,~O");
8713 c$.reverse=Clazz_defineMethod(c$,"reverse",
8714 function(list){
8715 var size=list.size();
8716 var front=list.listIterator();
8717 var back=list.listIterator(size);
8718 for(var i=0;i<Math.floor(size/2);i++){
8719 var frontNext=front.next();
8720 var backPrev=back.previous();
8721 front.set(backPrev);
8722 back.set(frontNext);
8723 }
8724 },"java.util.List");
8725 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8726 function(){
8727 return new java.util.Collections.ReverseComparator();
8728 });
8729 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8730 function(c){
8731 if(c==null){
8732 return java.util.Collections.reverseOrder();
8733 }return new java.util.Collections.ReverseComparatorWithComparator(c);
8734 },"java.util.Comparator");
8735 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8736 function(list){
8737 java.util.Collections.shuffle(list,new java.util.Random());
8738 },"java.util.List");
8739 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8740 function(list,random){
8741 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8742 var array=list.toArray();
8743 for(var i=array.length-1;i>0;i--){
8744 var index=random.nextInt()%(i+1);
8745 if(index<0){
8746 index=-index;
8747 }var temp=array[i];
8748 array[i]=array[index];
8749 array[index]=temp;
8750 }
8751 var i=0;
8752 var it=list.listIterator();
8753 while(it.hasNext()){
8754 it.next();
8755 it.set(array[i++]);
8756 }
8757 }else{
8758 var rawList=list;
8759 for(var i=rawList.size()-1;i>0;i--){
8760 var index=random.nextInt()%(i+1);
8761 if(index<0){
8762 index=-index;
8763 }rawList.set(index,rawList.set(i,rawList.get(index)));
8764 }
8765 }},"java.util.List,java.util.Random");
8766 c$.singleton=Clazz_defineMethod(c$,"singleton",
8767 function(object){
8768 return new java.util.Collections.SingletonSet(object);
8769 },"~O");
8770 c$.singletonList=Clazz_defineMethod(c$,"singletonList",
8771 function(object){
8772 return new java.util.Collections.SingletonList(object);
8773 },"~O");
8774 c$.singletonMap=Clazz_defineMethod(c$,"singletonMap",
8775 function(key,value){
8776 return new java.util.Collections.SingletonMap(key,value);
8777 },"~O,~O");
8778 c$.sort=Clazz_defineMethod(c$,"sort",
8779 function(list){
8780 var array=list.toArray();
8781 java.util.Arrays.sort(array);
8782 var i=0;
8783 var it=list.listIterator();
8784 while(it.hasNext()){
8785 it.next();
8786 it.set(array[i++]);
8787 }
8788 },"java.util.List");
8789 c$.sort=Clazz_defineMethod(c$,"sort",
8790 function(list,comparator){
8791 var array=list.toArray(new Array(list.size()));
8792 java.util.Arrays.sort(array,comparator);
8793 var i=0;
8794 var it=list.listIterator();
8795 while(it.hasNext()){
8796 it.next();
8797 it.set(array[i++]);
8798 }
8799 },"java.util.List,java.util.Comparator");
8800 c$.swap=Clazz_defineMethod(c$,"swap",
8801 function(list,index1,index2){
8802 if(list==null){
8803 throw new NullPointerException();
8804 }if(index1==index2){
8805 return;
8806 }var rawList=list;
8807 rawList.set(index2,rawList.set(index1,rawList.get(index2)));
8808 },"java.util.List,~N,~N");
8809 c$.replaceAll=Clazz_defineMethod(c$,"replaceAll",
8810 function(list,obj,obj2){
8811 var index;
8812 var found=false;
8813 while((index=list.indexOf(obj))>-1){
8814 found=true;
8815 list.set(index,obj2);
8816 }
8817 return found;
8818 },"java.util.List,~O,~O");
8819 c$.rotate=Clazz_defineMethod(c$,"rotate",
8820 function(lst,dist){
8821 var list=lst;
8822 var size=list.size();
8823 if(size==0){
8824 return;
8825 }var normdist;
8826 if(dist>0){
8827 normdist=dist%size;
8828 }else{
8829 normdist=size-((dist%size)*(-1));
8830 }if(normdist==0||normdist==size){
8831 return;
8832 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8833 var temp=list.get(0);
8834 var index=0;
8835 var beginIndex=0;
8836 for(var i=0;i<size;i++){
8837 index=(index+normdist)%size;
8838 temp=list.set(index,temp);
8839 if(index==beginIndex){
8840 index=++beginIndex;
8841 temp=list.get(beginIndex);
8842 }}
8843 }else{
8844 var divideIndex=(size-normdist)%size;
8845 var sublist1=list.subList(0,divideIndex);
8846 var sublist2=list.subList(divideIndex,size);
8847 java.util.Collections.reverse(sublist1);
8848 java.util.Collections.reverse(sublist2);
8849 java.util.Collections.reverse(list);
8850 }},"java.util.List,~N");
8851 c$.indexOfSubList=Clazz_defineMethod(c$,"indexOfSubList",
8852 function(list,sublist){
8853 var size=list.size();
8854 var sublistSize=sublist.size();
8855 if(sublistSize>size){
8856 return-1;
8857 }if(sublistSize==0){
8858 return 0;
8859 }var firstObj=sublist.get(0);
8860 var index=list.indexOf(firstObj);
8861 if(index==-1){
8862 return-1;
8863 }while(index<size&&(size-index>=sublistSize)){
8864 var listIt=list.listIterator(index);
8865 if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){
8866 var sublistIt=sublist.listIterator(1);
8867 var difFound=false;
8868 while(sublistIt.hasNext()){
8869 var element=sublistIt.next();
8870 if(!listIt.hasNext()){
8871 return-1;
8872 }if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){
8873 difFound=true;
8874 break;
8875 }}
8876 if(!difFound){
8877 return index;
8878 }}index++;
8879 }
8880 return-1;
8881 },"java.util.List,java.util.List");
8882 c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList",
8883 function(list,sublist){
8884 var sublistSize=sublist.size();
8885 var size=list.size();
8886 if(sublistSize>size){
8887 return-1;
8888 }if(sublistSize==0){
8889 return size;
8890 }var lastObj=sublist.get(sublistSize-1);
8891 var index=list.lastIndexOf(lastObj);
8892 while((index>-1)&&(index+1>=sublistSize)){
8893 var listIt=list.listIterator(index+1);
8894 if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){
8895 var sublistIt=sublist.listIterator(sublistSize-1);
8896 var difFound=false;
8897 while(sublistIt.hasPrevious()){
8898 var element=sublistIt.previous();
8899 if(!listIt.hasPrevious()){
8900 return-1;
8901 }if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){
8902 difFound=true;
8903 break;
8904 }}
8905 if(!difFound){
8906 return listIt.nextIndex();
8907 }}index--;
8908 }
8909 return-1;
8910 },"java.util.List,java.util.List");
8911 c$.list=Clazz_defineMethod(c$,"list",
8912 function(enumeration){
8913 var list=new java.util.ArrayList();
8914 while(enumeration.hasMoreElements()){
8915 list.add(enumeration.nextElement());
8916 }
8917 return list;
8918 },"java.util.Enumeration");
8919 c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection",
8920 function(collection){
8921 if(collection==null){
8922 throw new NullPointerException();
8923 }return new java.util.Collections.SynchronizedCollection(collection);
8924 },"java.util.Collection");
8925 c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList",
8926 function(list){
8927 if(list==null){
8928 throw new NullPointerException();
8929 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8930 return new java.util.Collections.SynchronizedRandomAccessList(list);
8931 }return new java.util.Collections.SynchronizedList(list);
8932 },"java.util.List");
8933 c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap",
8934 function(map){
8935 if(map==null){
8936 throw new NullPointerException();
8937 }return new java.util.Collections.SynchronizedMap(map);
8938 },"java.util.Map");
8939 c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet",
8940 function(set){
8941 if(set==null){
8942 throw new NullPointerException();
8943 }return new java.util.Collections.SynchronizedSet(set);
8944 },"java.util.Set");
8945 c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap",
8946 function(map){
8947 if(map==null){
8948 throw new NullPointerException();
8949 }return new java.util.Collections.SynchronizedSortedMap(map);
8950 },"java.util.SortedMap");
8951 c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet",
8952 function(set){
8953 if(set==null){
8954 throw new NullPointerException();
8955 }return new java.util.Collections.SynchronizedSortedSet(set);
8956 },"java.util.SortedSet");
8957 c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection",
8958 function(collection){
8959 if(collection==null){
8960 throw new NullPointerException();
8961 }return new java.util.Collections.UnmodifiableCollection(collection);
8962 },"java.util.Collection");
8963 c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList",
8964 function(list){
8965 if(list==null){
8966 throw new NullPointerException();
8967 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8968 return new java.util.Collections.UnmodifiableRandomAccessList(list);
8969 }return new java.util.Collections.UnmodifiableList(list);
8970 },"java.util.List");
8971 c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap",
8972 function(map){
8973 if(map==null){
8974 throw new NullPointerException();
8975 }return new java.util.Collections.UnmodifiableMap(map);
8976 },"java.util.Map");
8977 c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet",
8978 function(set){
8979 if(set==null){
8980 throw new NullPointerException();
8981 }return new java.util.Collections.UnmodifiableSet(set);
8982 },"java.util.Set");
8983 c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap",
8984 function(map){
8985 if(map==null){
8986 throw new NullPointerException();
8987 }return new java.util.Collections.UnmodifiableSortedMap(map);
8988 },"java.util.SortedMap");
8989 c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet",
8990 function(set){
8991 if(set==null){
8992 throw new NullPointerException();
8993 }return new java.util.Collections.UnmodifiableSortedSet(set);
8994 },"java.util.SortedSet");
8995 c$.frequency=Clazz_defineMethod(c$,"frequency",
8996 function(c,o){
8997 if(c==null){
8998 throw new NullPointerException();
8999 }if(c.isEmpty()){
9000 return 0;
9001 }
9002 var result=0;
9003 var itr=c.iterator();
9004 while(itr.hasNext()){
9005 var e=itr.next();
9006 if(o==null?e==null:o.equals(e)){
9007 result++;
9008 }}
9009 return result;
9010 },"java.util.Collection,~O");
9011
9012 c$.emptyList=Clazz_defineMethod(c$,"emptyList",
9013 function(){
9014 return java.util.Collections.EMPTY_LIST;
9015 });
9016 c$.emptySet=Clazz_defineMethod(c$,"emptySet",
9017 function(){
9018 return java.util.Collections.EMPTY_SET;
9019 });
9020 c$.emptyMap=Clazz_defineMethod(c$,"emptyMap",
9021 function(){
9022 return java.util.Collections.EMPTY_MAP;
9023 });
9024 c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection",
9025 function(c,type){
9026 return new java.util.Collections.CheckedCollection(c,type);
9027 },"java.util.Collection,Class");
9028 c$.checkedMap=Clazz_defineMethod(c$,"checkedMap",
9029 function(m,keyType,valueType){
9030 return new java.util.Collections.CheckedMap(m,keyType,valueType);
9031 },"java.util.Map,Class,Class");
9032 c$.checkedList=Clazz_defineMethod(c$,"checkedList",
9033 function(list,type){
9034 if(Clazz_instanceOf(list,java.util.RandomAccess)){
9035 return new java.util.Collections.CheckedRandomAccessList(list,type);
9036 }return new java.util.Collections.CheckedList(list,type);
9037 },"java.util.List,Class");
9038 c$.checkedSet=Clazz_defineMethod(c$,"checkedSet",
9039 function(s,type){
9040 return new java.util.Collections.CheckedSet(s,type);
9041 },"java.util.Set,Class");
9042 c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap",
9043 function(m,keyType,valueType){
9044 return new java.util.Collections.CheckedSortedMap(m,keyType,valueType);
9045 },"java.util.SortedMap,Class,Class");
9046 c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet",
9047 function(s,type){
9048 return new java.util.Collections.CheckedSortedSet(s,type);
9049 },"java.util.SortedSet,Class");
9050 c$.addAll=Clazz_defineMethod(c$,"addAll",
9051 function(c,a){
9052 var modified=false;
9053 for(var i=0;i<a.length;i++){
9054 modified=new Boolean(modified|c.add(a[i])).valueOf();
9055 }
9056 return modified;
9057 },"java.util.Collection,~A");
9058 c$.disjoint=Clazz_defineMethod(c$,"disjoint",
9059 function(c1,c2){
9060 if((Clazz_instanceOf(c1,java.util.Set))&&!(Clazz_instanceOf(c2,java.util.Set))||(c2.size())>c1.size()){
9061 var tmp=c1;
9062 c1=c2;
9063 c2=tmp;
9064 }var it=c1.iterator();
9065 while(it.hasNext()){
9066 if(c2.contains(it.next())){
9067 return false;
9068 }}
9069 return true;
9070 },"java.util.Collection,java.util.Collection");
9071 c$.checkType=Clazz_defineMethod(c$,"checkType",
9072 function(obj,type){
9073 if(!type.isInstance(obj)){
9074 throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type);
9075 }return obj;
9076 },"~O,Class");
9077
9078 c$.$Collections$1$=function(c){
9079 Clazz_pu$h(self.c$);
9080 c$=Clazz_decorateAsClass(function(){
9081 Clazz_prepareCallback(this,arguments);
9082 this.it=null;
9083 Clazz_instantialize(this,arguments);
9084 },java.util,"Collections$1",null,java.util.Enumeration);
9085
9086 Clazz_prepareFields(c$,function(){
9087 this.it=c.iterator();
9088 });
9089
9090 Clazz_defineMethod(c$,"hasMoreElements",
9091 function(){
9092 return this.it.hasNext();
9093 });
9094 Clazz_defineMethod(c$,"nextElement",
9095 function(){
9096 return this.it.next();
9097 });
9098 c$=Clazz_p0p();
9099 };
9100
9101 Clazz_pu$h(self.c$);
9102 c$=Clazz_decorateAsClass(function(){
9103 this.n=0;
9104 this.element=null;
9105 Clazz_instantialize(this,arguments);
9106 },java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);
9107 Clazz_makeConstructor(c$,
9108 function(a,b){
9109 Clazz_superConstructor(this,java.util.Collections.CopiesList,[]);
9110 if(a<0){
9111 throw new IllegalArgumentException();
9112 }this.n=a;
9113 this.element=b;
9114 },"~N,~O");
9115 Clazz_overrideMethod(c$,"contains",
9116 function(a){
9117 return this.element==null?a==null:this.element.equals(a);
9118 },"~O");
9119 Clazz_overrideMethod(c$,"size",
9120 function(){
9121 return this.n;
9122 });
9123 Clazz_overrideMethod(c$,"get",
9124 function(a){
9125 if(0<=a&&a<this.n){
9126 return this.element;
9127 }throw new IndexOutOfBoundsException();
9128 },"~N");
9129 c$=Clazz_p0p();
9130 Clazz_pu$h(self.c$);
9131 c$=Clazz_declareType(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);
9132 Clazz_overrideMethod(c$,"contains",
9133 function(a){
9134 return false;
9135 },"~O");
9136 Clazz_overrideMethod(c$,"size",
9137 function(){
9138 return 0;
9139 });
9140 Clazz_overrideMethod(c$,"get",
9141 function(a){
9142 throw new IndexOutOfBoundsException();
9143 },"~N");
9144 c$=Clazz_p0p();
9145 Clazz_pu$h(self.c$);
9146 c$=Clazz_declareType(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);
9147 Clazz_overrideMethod(c$,"contains",
9148 function(a){
9149 return false;
9150 },"~O");
9151 Clazz_overrideMethod(c$,"size",
9152 function(){
9153 return 0;
9154 });
9155 Clazz_overrideMethod(c$,"iterator",
9156 function(){
9157 return((Clazz_isClassDefined("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$()),Clazz_innerTypeInstance(java.util.Collections$EmptySet$1,this,null));
9158 });
9159 c$.$Collections$EmptySet$1$=function(){
9160 Clazz_pu$h(self.c$);
9161 c$=Clazz_declareAnonymous(java.util,"Collections$EmptySet$1",null,java.util.Iterator);
9162 Clazz_overrideMethod(c$,"hasNext",
9163 function(){
9164 return false;
9165 });
9166 Clazz_overrideMethod(c$,"next",
9167 function(){
9168 throw new java.util.NoSuchElementException();
9169 });
9170 Clazz_overrideMethod(c$,"remove",
9171 function(){
9172 throw new UnsupportedOperationException();
9173 });
9174 c$=Clazz_p0p();
9175 };
9176 c$=Clazz_p0p();
9177 Clazz_pu$h(self.c$);
9178 c$=Clazz_declareType(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
9179 Clazz_overrideMethod(c$,"containsKey",
9180 function(a){
9181 return false;
9182 },"~O");
9183 Clazz_overrideMethod(c$,"containsValue",
9184 function(a){
9185 return false;
9186 },"~O");
9187 Clazz_overrideMethod(c$,"entrySet",
9188 function(){
9189 return java.util.Collections.EMPTY_SET;
9190 });
9191 Clazz_overrideMethod(c$,"get",
9192 function(a){
9193 return null;
9194 },"~O");
9195 Clazz_overrideMethod(c$,"keySet",
9196 function(){
9197 return java.util.Collections.EMPTY_SET;
9198 });
9199 Clazz_overrideMethod(c$,"values",
9200 function(){
9201 return java.util.Collections.EMPTY_LIST;
9202 });
9203 c$=Clazz_p0p();
9204 Clazz_pu$h(self.c$);
9205 c$=Clazz_declareType(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);
9206 Clazz_overrideMethod(c$,"compare",
9207 function(a,b){
9208 var c=b;
9209 return c.compareTo(a);
9210 },"~O,~O");
9211 c$=Clazz_p0p();
9212 Clazz_pu$h(self.c$);
9213 c$=Clazz_decorateAsClass(function(){
9214 this.comparator=null;
9215 Clazz_instantialize(this,arguments);
9216 },java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);
9217 Clazz_makeConstructor(c$,
9218 function(a){
9219 this.comparator=a;
9220 },"java.util.Comparator");
9221 Clazz_defineMethod(c$,"compare",
9222 function(a,b){
9223 return this.comparator.compare(b,a);
9224 },"~O,~O");
9225 c$=Clazz_p0p();
9226 Clazz_pu$h(self.c$);
9227 c$=Clazz_decorateAsClass(function(){
9228 this.element=null;
9229 Clazz_instantialize(this,arguments);
9230 },java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);
9231 Clazz_makeConstructor(c$,
9232 function(a){
9233 Clazz_superConstructor(this,java.util.Collections.SingletonSet,[]);
9234 this.element=a;
9235 },"~O");
9236 Clazz_overrideMethod(c$,"contains",
9237 function(a){
9238 return this.element==null?a==null:this.element.equals(a);
9239 },"~O");
9240 Clazz_overrideMethod(c$,"size",
9241 function(){
9242 return 1;
9243 });
9244 Clazz_overrideMethod(c$,"iterator",
9245 function(){
9246 return((Clazz_isClassDefined("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonSet$1,this,null));
9247 });
9248 c$.$Collections$SingletonSet$1$=function(){
9249 Clazz_pu$h(self.c$);
9250 c$=Clazz_decorateAsClass(function(){
9251 Clazz_prepareCallback(this,arguments);
9252 this.$hasNext=true;
9253 Clazz_instantialize(this,arguments);
9254 },java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
9255 Clazz_overrideMethod(c$,"hasNext",
9256 function(){
9257 return this.$hasNext;
9258 });
9259 Clazz_overrideMethod(c$,"next",
9260 function(){
9261 if(this.$hasNext){
9262 this.$hasNext=false;
9263 return this.b$["java.util.Collections.SingletonSet"].element;
9264 }throw new java.util.NoSuchElementException();
9265 });
9266 Clazz_overrideMethod(c$,"remove",
9267 function(){
9268 throw new UnsupportedOperationException();
9269 });
9270 c$=Clazz_p0p();
9271 };
9272 c$=Clazz_p0p();
9273 Clazz_pu$h(self.c$);
9274 c$=Clazz_decorateAsClass(function(){
9275 this.element=null;
9276 Clazz_instantialize(this,arguments);
9277 },java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);
9278 Clazz_makeConstructor(c$,
9279 function(a){
9280 Clazz_superConstructor(this,java.util.Collections.SingletonList,[]);
9281 this.element=a;
9282 },"~O");
9283 Clazz_overrideMethod(c$,"contains",
9284 function(a){
9285 return this.element==null?a==null:this.element.equals(a);
9286 },"~O");
9287 Clazz_overrideMethod(c$,"get",
9288 function(a){
9289 if(a==0){
9290 return this.element;
9291 }throw new IndexOutOfBoundsException();
9292 },"~N");
9293 Clazz_overrideMethod(c$,"size",
9294 function(){
9295 return 1;
9296 });
9297 c$=Clazz_p0p();
9298 Clazz_pu$h(self.c$);
9299 c$=Clazz_decorateAsClass(function(){
9300 this.k=null;
9301 this.v=null;
9302 Clazz_instantialize(this,arguments);
9303 },java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);
9304 Clazz_makeConstructor(c$,
9305 function(a,b){
9306 Clazz_superConstructor(this,java.util.Collections.SingletonMap,[]);
9307 this.k=a;
9308 this.v=b;
9309 },"~O,~O");
9310 Clazz_overrideMethod(c$,"containsKey",
9311 function(a){
9312 return this.k==null?a==null:this.k.equals(a);
9313 },"~O");
9314 Clazz_overrideMethod(c$,"containsValue",
9315 function(a){
9316 return this.v==null?a==null:this.v.equals(a);
9317 },"~O");
9318 Clazz_overrideMethod(c$,"get",
9319 function(a){
9320 if(this.containsKey(a)){
9321 return this.v;
9322 }return null;
9323 },"~O");
9324 Clazz_overrideMethod(c$,"size",
9325 function(){
9326 return 1;
9327 });
9328 Clazz_overrideMethod(c$,"entrySet",
9329 function(){
9330 return((Clazz_isClassDefined("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonMap$1,this,null));
9331 });
9332 c$.$Collections$SingletonMap$1$=function(){
9333 Clazz_pu$h(self.c$);
9334 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);
9335 Clazz_overrideMethod(c$,"contains",
9336 function(a){
9337 if(Clazz_instanceOf(a,java.util.Map.Entry)){
9338 var b=a;
9339 return this.b$["java.util.Collections.SingletonMap"].containsKey(b.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(b.getValue());
9340 }return false;
9341 },"~O");
9342 Clazz_overrideMethod(c$,"size",
9343 function(){
9344 return 1;
9345 });
9346 Clazz_overrideMethod(c$,"iterator",
9347 function(){
9348 return((Clazz_isClassDefined("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonMap$1$1,this,null));
9349 });
9350 c$=Clazz_p0p();
9351 };
9352 c$.$Collections$SingletonMap$1$1$=function(){
9353 Clazz_pu$h(self.c$);
9354 c$=Clazz_decorateAsClass(function(){
9355 Clazz_prepareCallback(this,arguments);
9356 this.$hasNext=true;
9357 Clazz_instantialize(this,arguments);
9358 },java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);
9359 Clazz_overrideMethod(c$,"hasNext",
9360 function(){
9361 return this.$hasNext;
9362 });
9363 Clazz_overrideMethod(c$,"next",
9364 function(){
9365 if(this.$hasNext){
9366 this.$hasNext=false;
9367 return((Clazz_isClassDefined("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$()),Clazz_innerTypeInstance(java.util.Collections$SingletonMap$1$1$1,this,null));
9368 }throw new java.util.NoSuchElementException();
9369 });
9370 Clazz_overrideMethod(c$,"remove",
9371 function(){
9372 throw new UnsupportedOperationException();
9373 });
9374 c$=Clazz_p0p();
9375 };
9376 c$.$Collections$SingletonMap$1$1$1$=function(){
9377 Clazz_pu$h(self.c$);
9378 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);
9379 Clazz_overrideMethod(c$,"equals",
9380 function(a){
9381 return this.b$["java.util.Collections$SingletonMap$1"].contains(a);
9382 },"~O");
9383 Clazz_overrideMethod(c$,"getKey",
9384 function(){
9385 return this.b$["java.util.Collections.SingletonMap"].k;
9386 });
9387 Clazz_overrideMethod(c$,"getValue",
9388 function(){
9389 return this.b$["java.util.Collections.SingletonMap"].v;
9390 });
9391 Clazz_overrideMethod(c$,"hashCode",
9392 function(){
9393 return(this.b$["java.util.Collections.SingletonMap"].k==null?0:this.b$["java.util.Collections.SingletonMap"].k.hashCode())^(this.b$["java.util.Collections.SingletonMap"].v==null?0:this.b$["java.util.Collections.SingletonMap"].v.hashCode());
9394 });
9395 Clazz_overrideMethod(c$,"setValue",
9396 function(a){
9397 throw new UnsupportedOperationException();
9398 },"~O");
9399 c$=Clazz_p0p();
9400 };
9401 c$=Clazz_p0p();
9402 Clazz_pu$h(self.c$);
9403 c$=Clazz_decorateAsClass(function(){
9404 this.c=null;
9405 this.mutex=null;
9406 Clazz_instantialize(this,arguments);
9407 },java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
9408 Clazz_makeConstructor(c$,
9409 function(a){
9410 this.c=a;
9411 this.mutex=this;
9412 },"java.util.Collection");
9413 Clazz_makeConstructor(c$,
9414 function(a,b){
9415 this.c=a;
9416 this.mutex=b;
9417 },"java.util.Collection,~O");
9418 Clazz_defineMethod(c$,"add",
9419 function(a){
9420 {
9421 return this.c.add(a);
9422 }},"~O");
9423 Clazz_defineMethod(c$,"addAll",
9424 function(a){
9425 {
9426 return this.c.addAll(a);
9427 }},"java.util.Collection");
9428 Clazz_defineMethod(c$,"clear",
9429 function(){
9430 {
9431 this.c.clear();
9432 }});
9433 Clazz_defineMethod(c$,"contains",
9434 function(a){
9435 {
9436 return this.c.contains(a);
9437 }},"~O");
9438 Clazz_defineMethod(c$,"containsAll",
9439 function(a){
9440 {
9441 return this.c.containsAll(a);
9442 }},"java.util.Collection");
9443 Clazz_defineMethod(c$,"isEmpty",
9444 function(){
9445 {
9446 return this.c.isEmpty();
9447 }});
9448 Clazz_defineMethod(c$,"iterator",
9449 function(){
9450 {
9451 return this.c.iterator();
9452 }});
9453 Clazz_defineMethod(c$,"remove",
9454 function(a){
9455 {
9456 return this.c.remove(a);
9457 }},"~O");
9458 Clazz_defineMethod(c$,"removeAll",
9459 function(a){
9460 {
9461 return this.c.removeAll(a);
9462 }},"java.util.Collection");
9463 Clazz_defineMethod(c$,"retainAll",
9464 function(a){
9465 {
9466 return this.c.retainAll(a);
9467 }},"java.util.Collection");
9468 Clazz_defineMethod(c$,"size",
9469 function(){
9470 {
9471 return this.c.size();
9472 }});
9473 Clazz_defineMethod(c$,"toArray",
9474 function(){
9475 {
9476 return this.c.toArray();
9477 }});
9478 Clazz_defineMethod(c$,"toString",
9479 function(){
9480 {
9481 return this.c.toString();
9482 }});
9483 Clazz_defineMethod(c$,"toArray",
9484 function(a){
9485 {
9486 return this.c.toArray(a);
9487 }},"~A");
9488 c$=Clazz_p0p();
9489
9490
9491 Clazz_pu$h(self.c$);
9492 c$=Clazz_decorateAsClass(function(){
9493 this.list=null;
9494 Clazz_instantialize(this,arguments);
9495 },java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);
9496 Clazz_makeConstructor(c$,
9497 function(a){
9498 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a]);
9499 this.list=a;
9500 },"java.util.List");
9501 Clazz_makeConstructor(c$,
9502 function(a,b){
9503 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a,b]);
9504 this.list=a;
9505 },"java.util.List,~O");
9506 Clazz_defineMethod(c$,"add",
9507 function(a,b){
9508 {
9509 this.list.add(a,b);
9510 }},"~N,~O");
9511 Clazz_defineMethod(c$,"addAll",
9512 function(a,b){
9513 {
9514 return this.list.addAll(a,b);
9515 }},"~N,java.util.Collection");
9516 Clazz_overrideMethod(c$,"equals",
9517 function(a){
9518 {
9519 return this.list.equals(a);
9520 }},"~O");
9521 Clazz_defineMethod(c$,"get",
9522 function(a){
9523 {
9524 return this.list.get(a);
9525 }},"~N");
9526 Clazz_overrideMethod(c$,"hashCode",
9527 function(){
9528 {
9529 return this.list.hashCode();
9530 }});
9531 Clazz_defineMethod(c$,"indexOf",
9532 function(a){
9533 {
9534 return this.list.indexOf(a);
9535 }},"~O");
9536 Clazz_defineMethod(c$,"lastIndexOf",
9537 function(a){
9538 {
9539 return this.list.lastIndexOf(a);
9540 }},"~O");
9541 //Clazz_defineMethod(c$,"listIterator",
9542 //function(){
9543 //{
9544 //return this.list.listIterator();
9545 //}});
9546 Clazz_defineMethod(c$,"listIterator",
9547 function(a){
9548 {
9549 a || (a = 0);
9550 return this.list.listIterator(a);
9551 }},"~N");
9552 Clazz_defineMethod(c$,"remove",
9553 function(a){
9554 {
9555 return this.list.remove(a);
9556 }},"~N");
9557 Clazz_defineMethod(c$,"set",
9558 function(a,b){
9559 {
9560 return this.list.set(a,b);
9561 }},"~N,~O");
9562 Clazz_defineMethod(c$,"subList",
9563 function(a,b){
9564 {
9565 return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex);
9566 }},"~N,~N");
9567 c$=Clazz_p0p();
9568
9569
9570
9571 Clazz_pu$h(self.c$);
9572 c$=Clazz_declareType(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);
9573 Clazz_overrideMethod(c$,"subList",
9574 function(a,b){
9575 {
9576 return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex);
9577 }},"~N,~N");
9578 c$=Clazz_p0p();
9579
9580
9581
9582
9583 Clazz_pu$h(self.c$);
9584 c$=Clazz_decorateAsClass(function(){
9585 this.m=null;
9586 this.mutex=null;
9587 Clazz_instantialize(this,arguments);
9588 },java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
9589 Clazz_makeConstructor(c$,
9590 function(a){
9591 this.m=a;
9592 this.mutex=this;
9593 },"java.util.Map");
9594 Clazz_makeConstructor(c$,
9595 function(a,b){
9596 this.m=a;
9597 this.mutex=b;
9598 },"java.util.Map,~O");
9599 Clazz_defineMethod(c$,"clear",
9600 function(){
9601 {
9602 this.m.clear();
9603 }});
9604 Clazz_defineMethod(c$,"containsKey",
9605 function(a){
9606 {
9607 return this.m.containsKey(a);
9608 }},"~O");
9609 Clazz_defineMethod(c$,"containsValue",
9610 function(a){
9611 {
9612 return this.m.containsValue(a);
9613 }},"~O");
9614 Clazz_defineMethod(c$,"entrySet",
9615 function(){
9616 {
9617 return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex);
9618 }});
9619 Clazz_overrideMethod(c$,"equals",
9620 function(a){
9621 {
9622 return this.m.equals(a);
9623 }},"~O");
9624 Clazz_defineMethod(c$,"get",
9625 function(a){
9626 {
9627 return this.m.get(a);
9628 }},"~O");
9629 Clazz_overrideMethod(c$,"hashCode",
9630 function(){
9631 {
9632 return this.m.hashCode();
9633 }});
9634 Clazz_defineMethod(c$,"isEmpty",
9635 function(){
9636 {
9637 return this.m.isEmpty();
9638 }});
9639 Clazz_defineMethod(c$,"keySet",
9640 function(){
9641 {
9642 return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex);
9643 }});
9644 Clazz_defineMethod(c$,"put",
9645 function(a,b){
9646 {
9647 return this.m.put(a,b);
9648 }},"~O,~O");
9649 Clazz_defineMethod(c$,"putAll",
9650 function(a){
9651 {
9652 this.m.putAll(a);
9653 }},"java.util.Map");
9654 Clazz_defineMethod(c$,"remove",
9655 function(a){
9656 {
9657 return this.m.remove(a);
9658 }},"~O");
9659 Clazz_defineMethod(c$,"size",
9660 function(){
9661 {
9662 return this.m.size();
9663 }});
9664 Clazz_defineMethod(c$,"values",
9665 function(){
9666 {
9667 return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex);
9668 }});
9669 Clazz_defineMethod(c$,"toString",
9670 function(){
9671 {
9672 return this.m.toString();
9673 }});
9674 c$=Clazz_p0p();
9675 Clazz_pu$h(self.c$);
9676 c$=Clazz_declareType(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);
9677 Clazz_overrideMethod(c$,"equals",
9678 function(a){
9679 {
9680 return this.c.equals(a);
9681 }},"~O");
9682 Clazz_overrideMethod(c$,"hashCode",
9683 function(){
9684 {
9685 return this.c.hashCode();
9686 }});
9687 c$=Clazz_p0p();
9688 Clazz_pu$h(self.c$);
9689 c$=Clazz_decorateAsClass(function(){
9690 this.sm=null;
9691 Clazz_instantialize(this,arguments);
9692 },java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);
9693 Clazz_makeConstructor(c$,
9694 function(a){
9695 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a]);
9696 this.sm=a;
9697 },"java.util.SortedMap");
9698 Clazz_makeConstructor(c$,
9699 function(a,b){
9700 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
9701 this.sm=a;
9702 },"java.util.SortedMap,~O");
9703 Clazz_defineMethod(c$,"comparator",
9704 function(){
9705 {
9706 return this.sm.comparator();
9707 }});
9708 Clazz_defineMethod(c$,"firstKey",
9709 function(){
9710 {
9711 return this.sm.firstKey();
9712 }});
9713 Clazz_defineMethod(c$,"headMap",
9714 function(a){
9715 {
9716 return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex);
9717 }},"~O");
9718 Clazz_defineMethod(c$,"lastKey",
9719 function(){
9720 {
9721 return this.sm.lastKey();
9722 }});
9723 Clazz_defineMethod(c$,"subMap",
9724 function(a,b){
9725 {
9726 return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex);
9727 }},"~O,~O");
9728 Clazz_defineMethod(c$,"tailMap",
9729 function(a){
9730 {
9731 return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex);
9732 }},"~O");
9733 c$=Clazz_p0p();
9734 Clazz_pu$h(self.c$);
9735 c$=Clazz_decorateAsClass(function(){
9736 this.ss=null;
9737 Clazz_instantialize(this,arguments);
9738 },java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);
9739 Clazz_makeConstructor(c$,
9740 function(a){
9741 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a]);
9742 this.ss=a;
9743 },"java.util.SortedSet");
9744 Clazz_makeConstructor(c$,
9745 function(a,b){
9746 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a,b]);
9747 this.ss=a;
9748 },"java.util.SortedSet,~O");
9749 Clazz_defineMethod(c$,"comparator",
9750 function(){
9751 {
9752 return this.ss.comparator();
9753 }});
9754 Clazz_defineMethod(c$,"first",
9755 function(){
9756 {
9757 return this.ss.first();
9758 }});
9759 Clazz_defineMethod(c$,"headSet",
9760 function(a){
9761 {
9762 return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex);
9763 }},"~O");
9764 Clazz_defineMethod(c$,"last",
9765 function(){
9766 {
9767 return this.ss.last();
9768 }});
9769 Clazz_defineMethod(c$,"subSet",
9770 function(a,b){
9771 {
9772 return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex);
9773 }},"~O,~O");
9774 Clazz_defineMethod(c$,"tailSet",
9775 function(a){
9776 {
9777 return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex);
9778 }},"~O");
9779 c$=Clazz_p0p();
9780 Clazz_pu$h(self.c$);
9781 c$=Clazz_decorateAsClass(function(){
9782 this.c=null;
9783 Clazz_instantialize(this,arguments);
9784 },java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);
9785 Clazz_makeConstructor(c$,
9786 function(a){
9787 this.c=a;
9788 },"java.util.Collection");
9789 Clazz_overrideMethod(c$,"add",
9790 function(a){
9791 throw new UnsupportedOperationException();
9792 },"~O");
9793 Clazz_overrideMethod(c$,"addAll",
9794 function(a){
9795 throw new UnsupportedOperationException();
9796 },"java.util.Collection");
9797 Clazz_overrideMethod(c$,"clear",
9798 function(){
9799 throw new UnsupportedOperationException();
9800 });
9801 Clazz_defineMethod(c$,"contains",
9802 function(a){
9803 return this.c.contains(a);
9804 },"~O");
9805 Clazz_defineMethod(c$,"containsAll",
9806 function(a){
9807 return this.c.containsAll(a);
9808 },"java.util.Collection");
9809 Clazz_defineMethod(c$,"isEmpty",
9810 function(){
9811 return this.c.isEmpty();
9812 });
9813 Clazz_defineMethod(c$,"iterator",
9814 function(){
9815 return((Clazz_isClassDefined("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$()),Clazz_innerTypeInstance(java.util.Collections$UnmodifiableCollection$1,this,null));
9816 });
9817 Clazz_overrideMethod(c$,"remove",
9818 function(a){
9819 throw new UnsupportedOperationException();
9820 },"~O");
9821 Clazz_overrideMethod(c$,"removeAll",
9822 function(a){
9823 throw new UnsupportedOperationException();
9824 },"java.util.Collection");
9825 Clazz_overrideMethod(c$,"retainAll",
9826 function(a){
9827 throw new UnsupportedOperationException();
9828 },"java.util.Collection");
9829 Clazz_defineMethod(c$,"size",
9830 function(){
9831 return this.c.size();
9832 });
9833 Clazz_defineMethod(c$,"toArray",
9834 function(){
9835 return this.c.toArray();
9836 });
9837 Clazz_defineMethod(c$,"toArray",
9838 function(a){
9839 return this.c.toArray(a);
9840 },"~A");
9841 Clazz_defineMethod(c$,"toString",
9842 function(){
9843 return this.c.toString();
9844 });
9845 c$.$Collections$UnmodifiableCollection$1$=function(){
9846 Clazz_pu$h(self.c$);
9847 c$=Clazz_decorateAsClass(function(){
9848 Clazz_prepareCallback(this,arguments);
9849 this.iterator=null;
9850 Clazz_instantialize(this,arguments);
9851 },java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);
9852 Clazz_prepareFields(c$,function(){
9853 this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator();
9854 });
9855 Clazz_defineMethod(c$,"hasNext",
9856 function(){
9857 return this.iterator.hasNext();
9858 });
9859 Clazz_defineMethod(c$,"next",
9860 function(){
9861 return this.iterator.next();
9862 });
9863 Clazz_overrideMethod(c$,"remove",
9864 function(){
9865 throw new UnsupportedOperationException();
9866 });
9867 c$=Clazz_p0p();
9868 };
9869 c$=Clazz_p0p();
9870
9871 //BH note: a declared static superclass must come before a static class referencing it
9872
9873 Clazz_pu$h(self.c$);
9874 c$=Clazz_decorateAsClass(function(){
9875 this.list=null;
9876 Clazz_instantialize(this,arguments);
9877 },java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
9878 Clazz_makeConstructor(c$,
9879 function(a){
9880 Clazz_superConstructor(this,java.util.Collections.UnmodifiableList,[a]);
9881 this.list=a;
9882 },"java.util.List");
9883 Clazz_defineMethod(c$,"add",
9884 function(a,b){
9885 throw new UnsupportedOperationException();
9886 },"~N,~O");
9887 Clazz_defineMethod(c$,"addAll",
9888 function(a,b){
9889 throw new UnsupportedOperationException();
9890 },"~N,java.util.Collection");
9891 Clazz_overrideMethod(c$,"equals",
9892 function(a){
9893 return this.list.equals(a);
9894 },"~O");
9895 Clazz_defineMethod(c$,"get",
9896 function(a){
9897 return this.list.get(a);
9898 },"~N");
9899 Clazz_overrideMethod(c$,"hashcode",
9900 function(){
9901 return this.list.hashCode();
9902 });
9903 Clazz_defineMethod(c$,"indexOf",
9904 function(a){
9905 return this.list.indexOf(a);
9906 },"~O");
9907 Clazz_defineMethod(c$,"lastIndexOf",
9908 function(a){
9909 return this.list.lastIndexOf(a);
9910 },"~O");
9911 //Clazz_defineMethod(c$,"listIterator",
9912 //function(){
9913 //return this.listIterator(0);
9914 //});
9915 Clazz_defineMethod(c$,"listIterator",
9916 function(a){
9917 a || (a = 0);
9918 return((Clazz_isClassDefined("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$()),Clazz_innerTypeInstance(java.util.Collections$UnmodifiableList$1,this,null));
9919 },"~N");
9920 Clazz_defineMethod(c$,"remove",
9921 function(a){
9922 throw new UnsupportedOperationException();
9923 },"~N");
9924 Clazz_overrideMethod(c$,"set",
9925 function(a,b){
9926 throw new UnsupportedOperationException();
9927 },"~N,~O");
9928 Clazz_defineMethod(c$,"subList",
9929 function(a,b){
9930 return new java.util.Collections.UnmodifiableList(this.list.subList(a,b));
9931 },"~N,~N");
9932 c$.$Collections$UnmodifiableList$1$=function(){
9933 Clazz_pu$h(self.c$);
9934 c$=Clazz_decorateAsClass(function(){
9935 Clazz_prepareCallback(this,arguments);
9936 this.iterator=null;
9937 Clazz_instantialize(this,arguments);
9938 },java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
9939 Clazz_prepareFields(c$,function(){
9940 this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location);
9941 });
9942 Clazz_overrideMethod(c$,"add",
9943 function(b){
9944 throw new UnsupportedOperationException();
9945 },"~O");
9946 Clazz_defineMethod(c$,"hasNext",
9947 function(){
9948 return this.iterator.hasNext();
9949 });
9950 Clazz_defineMethod(c$,"hasPrevious",
9951 function(){
9952 return this.iterator.hasPrevious();
9953 });
9954 Clazz_defineMethod(c$,"next",
9955 function(){
9956 return this.iterator.next();
9957 });
9958 Clazz_defineMethod(c$,"nextIndex",
9959 function(){
9960 return this.iterator.nextIndex();
9961 });
9962 Clazz_defineMethod(c$,"previous",
9963 function(){
9964 return this.iterator.previous();
9965 });
9966 Clazz_defineMethod(c$,"previousIndex",
9967 function(){
9968 return this.iterator.previousIndex();
9969 });
9970 Clazz_overrideMethod(c$,"remove",
9971 function(){
9972 throw new UnsupportedOperationException();
9973 });
9974 Clazz_overrideMethod(c$,"set",
9975 function(b){
9976 throw new UnsupportedOperationException();
9977 },"~O");
9978 c$=Clazz_p0p();
9979 };
9980 c$=Clazz_p0p();
9981
9982
9983
9984
9985 Clazz_pu$h(self.c$);
9986 c$=Clazz_declareType(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);
9987 Clazz_overrideMethod(c$,"subList",
9988 function(a,b){
9989 return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b));
9990 },"~N,~N");
9991 c$=Clazz_p0p();
9992
9993
9994 Clazz_pu$h(self.c$);
9995 c$=Clazz_declareType(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);
9996 Clazz_overrideMethod(c$,"equals",
9997 function(a){
9998 return this.c.equals(a);
9999 },"~O");
10000 Clazz_overrideMethod(c$,"hashCode",
10001 function(){
10002 return this.c.hashCode();
10003 });
10004 c$=Clazz_p0p();
10005
10006
10007 Clazz_pu$h(self.c$);
10008 c$=Clazz_decorateAsClass(function(){
10009 this.m=null;
10010 Clazz_instantialize(this,arguments);
10011 },java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);
10012 Clazz_makeConstructor(c$,
10013 function(a){
10014 this.m=a;
10015 },"java.util.Map");
10016 Clazz_overrideMethod(c$,"clear",
10017 function(){
10018 throw new UnsupportedOperationException();
10019 });
10020 Clazz_defineMethod(c$,"containsKey",
10021 function(a){
10022 return this.m.containsKey(a);
10023 },"~O");
10024 Clazz_defineMethod(c$,"containsValue",
10025 function(a){
10026 return this.m.containsValue(a);
10027 },"~O");
10028 Clazz_defineMethod(c$,"entrySet",
10029 function(){
10030 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet());
10031 });
10032 Clazz_overrideMethod(c$,"equals",
10033 function(a){
10034 return this.m.equals(a);
10035 },"~O");
10036 Clazz_defineMethod(c$,"get",
10037 function(a){
10038 return this.m.get(a);
10039 },"~O");
10040 Clazz_overrideMethod(c$,"hashcode",
10041 function(){
10042 return this.m.hashCode();
10043 });
10044 Clazz_defineMethod(c$,"isEmpty",
10045 function(){
10046 return this.m.isEmpty();
10047 });
10048 Clazz_defineMethod(c$,"keySet",
10049 function(){
10050 return new java.util.Collections.UnmodifiableSet(this.m.keySet());
10051 });
10052 Clazz_overrideMethod(c$,"put",
10053 function(a,b){
10054 throw new UnsupportedOperationException();
10055 },"~O,~O");
10056 Clazz_overrideMethod(c$,"putAll",
10057 function(a){
10058 throw new UnsupportedOperationException();
10059 },"java.util.Map");
10060 Clazz_overrideMethod(c$,"remove",
10061 function(a){
10062 throw new UnsupportedOperationException();
10063 },"~O");
10064 Clazz_defineMethod(c$,"size",
10065 function(){
10066 return this.m.size();
10067 });
10068 Clazz_defineMethod(c$,"values",
10069 function(){
10070 return new java.util.Collections.UnmodifiableCollection(this.m.values());
10071 });
10072 Clazz_defineMethod(c$,"toString",
10073 function(){
10074 return this.m.toString();
10075 });
10076
10077
10078
10079
10080
10081
10082
10083 Clazz_pu$h(self.c$);
10084 c$=Clazz_declareType(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);
10085 Clazz_overrideMethod(c$,"iterator",
10086 function(){
10087 return((Clazz_isClassDefined("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$()),Clazz_innerTypeInstance(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null));
10088 });
10089 Clazz_defineMethod(c$,"toArray",
10090 function(){
10091 var a=this.c.size();
10092 var b=new Array(a);
10093 var c=this.iterator();
10094 for(var d=a;--d>=0;){
10095 b[d]=c.next();
10096 }
10097 return b;
10098 });
10099 Clazz_defineMethod(c$,"toArray",
10100 function(a){
10101 var b=this.c.size();
10102 var c=0;
10103 var d=this.iterator();
10104 if(b>a.length){
10105 var e=a.getClass().getComponentType();
10106 a=java.lang.reflect.Array.newInstance(e,b);
10107 }while(c<b){
10108 a[c++]=d.next();
10109 }
10110 if(c<a.length){
10111 a[c]=null;
10112 }return a;
10113 },"~A");
10114 c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){
10115 Clazz_pu$h(self.c$);
10116 c$=Clazz_decorateAsClass(function(){
10117 Clazz_prepareCallback(this,arguments);
10118 this.iterator=null;
10119 Clazz_instantialize(this,arguments);
10120 },java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
10121 Clazz_prepareFields(c$,function(){
10122 this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator();
10123 });
10124 Clazz_defineMethod(c$,"hasNext",
10125 function(){
10126 return this.iterator.hasNext();
10127 });
10128 Clazz_defineMethod(c$,"next",
10129 function(){
10130 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next());
10131 });
10132 Clazz_overrideMethod(c$,"remove",
10133 function(){
10134 throw new UnsupportedOperationException();
10135 });
10136 c$=Clazz_p0p();
10137 };
10138 Clazz_pu$h(self.c$);
10139 c$=Clazz_decorateAsClass(function(){
10140 this.mapEntry=null;
10141 Clazz_instantialize(this,arguments);
10142 },java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);
10143 Clazz_makeConstructor(c$,
10144 function(a){
10145 this.mapEntry=a;
10146 },"java.util.Map.Entry");
10147 Clazz_overrideMethod(c$,"equals",
10148 function(a){
10149 return this.mapEntry.equals(a);
10150 },"~O");
10151 Clazz_defineMethod(c$,"getKey",
10152 function(){
10153 return this.mapEntry.getKey();
10154 });
10155 Clazz_defineMethod(c$,"getValue",
10156 function(){
10157 return this.mapEntry.getValue();
10158 });
10159 Clazz_overrideMethod(c$,"hashcode",
10160 function(){
10161 return this.mapEntry.hashCode();
10162 });
10163 Clazz_overrideMethod(c$,"setValue",
10164 function(a){
10165 throw new UnsupportedOperationException();
10166 },"~O");
10167 Clazz_defineMethod(c$,"toString",
10168 function(){
10169 return this.mapEntry.toString();
10170 });
10171 c$=Clazz_p0p();
10172 c$=Clazz_p0p();
10173 c$=Clazz_p0p();
10174
10175
10176
10177 Clazz_pu$h(self.c$);
10178 c$=Clazz_decorateAsClass(function(){
10179 this.sm=null;
10180 Clazz_instantialize(this,arguments);
10181 },java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);
10182 Clazz_makeConstructor(c$,
10183 function(a){
10184 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedMap,[a]);
10185 this.sm=a;
10186 },"java.util.SortedMap");
10187 Clazz_defineMethod(c$,"comparator",
10188 function(){
10189 return this.sm.comparator();
10190 });
10191 Clazz_defineMethod(c$,"firstKey",
10192 function(){
10193 return this.sm.firstKey();
10194 });
10195 Clazz_defineMethod(c$,"headMap",
10196 function(a){
10197 return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a));
10198 },"~O");
10199 Clazz_defineMethod(c$,"lastKey",
10200 function(){
10201 return this.sm.lastKey();
10202 });
10203 Clazz_defineMethod(c$,"subMap",
10204 function(a,b){
10205 return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b));
10206 },"~O,~O");
10207 Clazz_defineMethod(c$,"tailMap",
10208 function(a){
10209 return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a));
10210 },"~O");
10211 c$=Clazz_p0p();
10212 Clazz_pu$h(self.c$);
10213 c$=Clazz_decorateAsClass(function(){
10214 this.ss=null;
10215 Clazz_instantialize(this,arguments);
10216 },java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
10217 Clazz_makeConstructor(c$,
10218 function(a){
10219 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedSet,[a]);
10220 this.ss=a;
10221 },"java.util.SortedSet");
10222 Clazz_defineMethod(c$,"comparator",
10223 function(){
10224 return this.ss.comparator();
10225 });
10226 Clazz_defineMethod(c$,"first",
10227 function(){
10228 return this.ss.first();
10229 });
10230 Clazz_defineMethod(c$,"headSet",
10231 function(a){
10232 return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a));
10233 },"~O");
10234 Clazz_defineMethod(c$,"last",
10235 function(){
10236 return this.ss.last();
10237 });
10238 Clazz_defineMethod(c$,"subSet",
10239 function(a,b){
10240 return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b));
10241 },"~O,~O");
10242 Clazz_defineMethod(c$,"tailSet",
10243 function(a){
10244 return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a));
10245 },"~O");
10246 c$=Clazz_p0p();
10247 Clazz_pu$h(self.c$);
10248 c$=Clazz_decorateAsClass(function(){
10249 this.c=null;
10250 this.type=null;
10251 Clazz_instantialize(this,arguments);
10252 },java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);
10253 Clazz_makeConstructor(c$,
10254 function(a,b){
10255 if(a==null||b==null){
10256 throw new NullPointerException();
10257 }this.c=a;
10258 this.type=b;
10259 },"java.util.Collection,Class");
10260 Clazz_defineMethod(c$,"size",
10261 function(){
10262 return this.c.size();
10263 });
10264 Clazz_defineMethod(c$,"isEmpty",
10265 function(){
10266 return this.c.isEmpty();
10267 });
10268 Clazz_defineMethod(c$,"contains",
10269 function(a){
10270 return this.c.contains(a);
10271 },"~O");
10272 Clazz_defineMethod(c$,"iterator",
10273 function(){
10274 var a=this.c.iterator();
10275 if(Clazz_instanceOf(a,java.util.ListIterator)){
10276 a=new java.util.Collections.CheckedListIterator(a,this.type);
10277 }return a;
10278 });
10279 Clazz_defineMethod(c$,"toArray",
10280 function(){
10281 return this.c.toArray();
10282 });
10283 Clazz_defineMethod(c$,"toArray",
10284 function(a){
10285 return this.c.toArray(a);
10286 },"~A");
10287 Clazz_defineMethod(c$,"add",
10288 function(a){
10289 return this.c.add(java.util.Collections.checkType(a,this.type));
10290 },"~O");
10291 Clazz_defineMethod(c$,"remove",
10292 function(a){
10293 return this.c.remove(a);
10294 },"~O");
10295 Clazz_defineMethod(c$,"containsAll",
10296 function(a){
10297 return this.c.containsAll(a);
10298 },"java.util.Collection");
10299 Clazz_overrideMethod(c$,"addAll",
10300 function(a){
10301 var b=a.size();
10302 if(b==0){
10303 return false;
10304 }var c=new Array(b);
10305 var d=a.iterator();
10306 for(var e=0;e<b;e++){
10307 c[e]=java.util.Collections.checkType(d.next(),this.type);
10308 }
10309 var f=false;
10310 for(var g=0;g<b;g++){
10311 f=new Boolean(f|this.c.add(c[g])).valueOf();
10312 }
10313 return f;
10314 },"java.util.Collection");
10315 Clazz_defineMethod(c$,"removeAll",
10316 function(a){
10317 return this.c.removeAll(a);
10318 },"java.util.Collection");
10319 Clazz_defineMethod(c$,"retainAll",
10320 function(a){
10321 return this.c.retainAll(a);
10322 },"java.util.Collection");
10323 Clazz_defineMethod(c$,"clear",
10324 function(){
10325 this.c.clear();
10326 });
10327 Clazz_defineMethod(c$,"toString",
10328 function(){
10329 return this.c.toString();
10330 });
10331 c$=Clazz_p0p();
10332 Clazz_pu$h(self.c$);
10333 c$=Clazz_decorateAsClass(function(){
10334 this.i=null;
10335 this.type=null;
10336 Clazz_instantialize(this,arguments);
10337 },java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);
10338 Clazz_makeConstructor(c$,
10339 function(a,b){
10340 this.i=a;
10341 this.type=b;
10342 },"java.util.ListIterator,Class");
10343 Clazz_defineMethod(c$,"hasNext",
10344 function(){
10345 return this.i.hasNext();
10346 });
10347 Clazz_defineMethod(c$,"next",
10348 function(){
10349 return this.i.next();
10350 });
10351 Clazz_defineMethod(c$,"remove",
10352 function(){
10353 this.i.remove();
10354 });
10355 Clazz_defineMethod(c$,"hasPrevious",
10356 function(){
10357 return this.i.hasPrevious();
10358 });
10359 Clazz_defineMethod(c$,"previous",
10360 function(){
10361 return this.i.previous();
10362 });
10363 Clazz_defineMethod(c$,"nextIndex",
10364 function(){
10365 return this.i.nextIndex();
10366 });
10367 Clazz_defineMethod(c$,"previousIndex",
10368 function(){
10369 return this.i.previousIndex();
10370 });
10371 Clazz_defineMethod(c$,"set",
10372 function(a){
10373 this.i.set(java.util.Collections.checkType(a,this.type));
10374 },"~O");
10375 Clazz_defineMethod(c$,"add",
10376 function(a){
10377 this.i.add(java.util.Collections.checkType(a,this.type));
10378 },"~O");
10379 c$=Clazz_p0p();
10380 Clazz_pu$h(self.c$);
10381 c$=Clazz_decorateAsClass(function(){
10382 this.l=null;
10383 Clazz_instantialize(this,arguments);
10384 },java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);
10385 Clazz_makeConstructor(c$,
10386 function(a,b){
10387 Clazz_superConstructor(this,java.util.Collections.CheckedList,[a,b]);
10388 this.l=a;
10389 },"java.util.List,Class");
10390 Clazz_defineMethod(c$,"addAll",
10391 function(a,b){
10392 var c=b.size();
10393 if(c==0){
10394 return false;
10395 }var d=new Array(c);
10396 var e=b.iterator();
10397 for(var f=0;f<c;f++){
10398 d[f]=java.util.Collections.checkType(e.next(),this.type);
10399 }
10400 return this.l.addAll(a,java.util.Arrays.asList(d));
10401 },"~N,java.util.Collection");
10402 Clazz_defineMethod(c$,"get",
10403 function(a){
10404 return this.l.get(a);
10405 },"~N");
10406 Clazz_defineMethod(c$,"set",
10407 function(a,b){
10408 return this.l.set(a,java.util.Collections.checkType(b,this.type));
10409 },"~N,~O");
10410 Clazz_defineMethod(c$,"add",
10411 function(a,b){
10412 this.l.add(a,java.util.Collections.checkType(b,this.type));
10413 },"~N,~O");
10414 Clazz_defineMethod(c$,"remove",
10415 function(a){
10416 return this.l.remove(a);
10417 },"~N");
10418 Clazz_defineMethod(c$,"indexOf",
10419 function(a){
10420 return this.l.indexOf(a);
10421 },"~O");
10422 Clazz_defineMethod(c$,"lastIndexOf",
10423 function(a){
10424 return this.l.lastIndexOf(a);
10425 },"~O");
10426 //Clazz_defineMethod(c$,"listIterator",
10427 //function(){
10428 //return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type);
10429 //});
10430 Clazz_defineMethod(c$,"listIterator",
10431 function(a){
10432 a || (a = 0);
10433 return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type);
10434 },"~N");
10435 Clazz_defineMethod(c$,"subList",
10436 function(a,b){
10437 return java.util.Collections.checkedList(this.l.subList(a,b),this.type);
10438 },"~N,~N");
10439 Clazz_overrideMethod(c$,"equals",
10440 function(a){
10441 return this.l.equals(a);
10442 },"~O");
10443 Clazz_overrideMethod(c$,"hashcode",
10444 function(){
10445 return this.l.hashCode();
10446 });
10447 c$=Clazz_p0p();
10448 Clazz_pu$h(self.c$);
10449 c$=Clazz_declareType(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);
10450 c$=Clazz_p0p();
10451 Clazz_pu$h(self.c$);
10452 c$=Clazz_declareType(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);
10453 Clazz_overrideMethod(c$,"equals",
10454 function(a){
10455 return this.c.equals(a);
10456 },"~O");
10457 Clazz_overrideMethod(c$,"hashCode",
10458 function(){
10459 return this.c.hashCode();
10460 });
10461 c$=Clazz_p0p();
10462 Clazz_pu$h(self.c$);
10463 c$=Clazz_decorateAsClass(function(){
10464 this.m=null;
10465 this.keyType=null;
10466 this.valueType=null;
10467 Clazz_instantialize(this,arguments);
10468 },java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
10469 Clazz_makeConstructor(c$,
10470 ($fz=function(a,b,c){
10471 if(a==null||b==null||c==null){
10472 throw new NullPointerException();
10473 }this.m=a;
10474 this.keyType=b;
10475 this.valueType=c;
10476 },$fz.isPrivate=true,$fz),"java.util.Map,Class,Class");
10477 Clazz_defineMethod(c$,"size",
10478 function(){
10479 return this.m.size();
10480 });
10481 Clazz_defineMethod(c$,"isEmpty",
10482 function(){
10483 return this.m.isEmpty();
10484 });
10485 Clazz_defineMethod(c$,"containsKey",
10486 function(a){
10487 return this.m.containsKey(a);
10488 },"~O");
10489 Clazz_defineMethod(c$,"containsValue",
10490 function(a){
10491 return this.m.containsValue(a);
10492 },"~O");
10493 Clazz_defineMethod(c$,"get",
10494 function(a){
10495 return this.m.get(a);
10496 },"~O");
10497 Clazz_defineMethod(c$,"put",
10498 function(a,b){
10499 return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType));
10500 },"~O,~O");
10501 Clazz_defineMethod(c$,"remove",
10502 function(a){
10503 return this.m.remove(a);
10504 },"~O");
10505 Clazz_overrideMethod(c$,"putAll",
10506 function(a){
10507 var b=a.size();
10508 if(b==0){
10509 return;
10510 }var c=new Array(b);
10511 var d=a.entrySet().iterator();
10512 for(var e=0;e<b;e++){
10513 var f=d.next();
10514 java.util.Collections.checkType(f.getKey(),this.keyType);
10515 java.util.Collections.checkType(f.getValue(),this.valueType);
10516 c[e]=f;
10517 }
10518 for(var f=0;f<b;f++){
10519 this.m.put(c[f].getKey(),c[f].getValue());
10520 }
10521 },"java.util.Map");
10522 Clazz_defineMethod(c$,"clear",
10523 function(){
10524 this.m.clear();
10525 });
10526 Clazz_defineMethod(c$,"keySet",
10527 function(){
10528 return this.m.keySet();
10529 });
10530 Clazz_defineMethod(c$,"values",
10531 function(){
10532 return this.m.values();
10533 });
10534 Clazz_defineMethod(c$,"entrySet",
10535 function(){
10536 return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType);
10537 });
10538 Clazz_overrideMethod(c$,"equals",
10539 function(a){
10540 return this.m.equals(a);
10541 },"~O");
10542 Clazz_overrideMethod(c$,"hashcode",
10543 function(){
10544 return this.m.hashCode();
10545 });
10546 Clazz_defineMethod(c$,"toString",
10547 function(){
10548 return this.m.toString();
10549 });
10550 Clazz_pu$h(self.c$);
10551 c$=Clazz_decorateAsClass(function(){
10552 this.e=null;
10553 this.valueType=null;
10554 Clazz_instantialize(this,arguments);
10555 },java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);
10556 Clazz_makeConstructor(c$,
10557 function(a,b){
10558 if(a==null){
10559 throw new NullPointerException();
10560 }this.e=a;
10561 this.valueType=b;
10562 },"java.util.Map.Entry,Class");
10563 Clazz_defineMethod(c$,"getKey",
10564 function(){
10565 return this.e.getKey();
10566 });
10567 Clazz_defineMethod(c$,"getValue",
10568 function(){
10569 return this.e.getValue();
10570 });
10571 Clazz_defineMethod(c$,"setValue",
10572 function(a){
10573 return this.e.setValue(java.util.Collections.checkType(a,this.valueType));
10574 },"~O");
10575 Clazz_overrideMethod(c$,"equals",
10576 function(a){
10577 return this.e.equals(a);
10578 },"~O");
10579 Clazz_overrideMethod(c$,"hashcode",
10580 function(){
10581 return this.e.hashCode();
10582 });
10583 c$=Clazz_p0p();
10584 Clazz_pu$h(self.c$);
10585 c$=Clazz_decorateAsClass(function(){
10586 this.s=null;
10587 this.valueType=null;
10588 Clazz_instantialize(this,arguments);
10589 },java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
10590 Clazz_makeConstructor(c$,
10591 function(a,b){
10592 this.s=a;
10593 this.valueType=b;
10594 },"java.util.Set,Class");
10595 Clazz_defineMethod(c$,"iterator",
10596 function(){
10597 return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType);
10598 });
10599 Clazz_defineMethod(c$,"toArray",
10600 function(){
10601 var a=this.size();
10602 var b=new Array(a);
10603 var c=this.iterator();
10604 for(var d=0;d<a;d++){
10605 b[d]=c.next();
10606 }
10607 return b;
10608 });
10609 Clazz_defineMethod(c$,"toArray",
10610 function(a){
10611 var b=this.size();
10612 if(a.length<b){
10613 var c=a.getClass().getComponentType();
10614 a=java.lang.reflect.Array.newInstance(c,b);
10615 }var c=this.iterator();
10616 for(var d=0;d<b;d++){
10617 a[d]=c.next();
10618 }
10619 if(b<a.length){
10620 a[b]=null;
10621 }return a;
10622 },"~A");
10623 Clazz_defineMethod(c$,"retainAll",
10624 function(a){
10625 return this.s.retainAll(a);
10626 },"java.util.Collection");
10627 Clazz_defineMethod(c$,"removeAll",
10628 function(a){
10629 return this.s.removeAll(a);
10630 },"java.util.Collection");
10631 Clazz_defineMethod(c$,"containsAll",
10632 function(a){
10633 return this.s.containsAll(a);
10634 },"java.util.Collection");
10635 Clazz_overrideMethod(c$,"addAll",
10636 function(a){
10637 throw new UnsupportedOperationException();
10638 },"java.util.Collection");
10639 Clazz_defineMethod(c$,"remove",
10640 function(a){
10641 return this.s.remove(a);
10642 },"~O");
10643 Clazz_defineMethod(c$,"contains",
10644 function(a){
10645 return this.s.contains(a);
10646 },"~O");
10647 Clazz_overrideMethod(c$,"add",
10648 function(a){
10649 throw new UnsupportedOperationException();
10650 },"java.util.Map.Entry");
10651 Clazz_defineMethod(c$,"isEmpty",
10652 function(){
10653 return this.s.isEmpty();
10654 });
10655 Clazz_defineMethod(c$,"clear",
10656 function(){
10657 this.s.clear();
10658 });
10659 Clazz_defineMethod(c$,"size",
10660 function(){
10661 return this.s.size();
10662 });
10663 Clazz_overrideMethod(c$,"hashcode",
10664 function(){
10665 return this.s.hashCode();
10666 });
10667 Clazz_overrideMethod(c$,"equals",
10668 function(a){
10669 return this.s.equals(a);
10670 },"~O");
10671 Clazz_pu$h(self.c$);
10672 c$=Clazz_decorateAsClass(function(){
10673 this.i=null;
10674 this.valueType=null;
10675 Clazz_instantialize(this,arguments);
10676 },java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
10677 Clazz_makeConstructor(c$,
10678 function(a,b){
10679 this.i=a;
10680 this.valueType=b;
10681 },"java.util.Iterator,Class");
10682 Clazz_defineMethod(c$,"hasNext",
10683 function(){
10684 return this.i.hasNext();
10685 });
10686 Clazz_defineMethod(c$,"remove",
10687 function(){
10688 this.i.remove();
10689 });
10690 Clazz_defineMethod(c$,"next",
10691 function(){
10692 return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType);
10693 });
10694 c$=Clazz_p0p();
10695 c$=Clazz_p0p();
10696 c$=Clazz_p0p();
10697 Clazz_pu$h(self.c$);
10698 c$=Clazz_decorateAsClass(function(){
10699 this.ss=null;
10700 Clazz_instantialize(this,arguments);
10701 },java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
10702 Clazz_makeConstructor(c$,
10703 function(a,b){
10704 Clazz_superConstructor(this,java.util.Collections.CheckedSortedSet,[a,b]);
10705 this.ss=a;
10706 },"java.util.SortedSet,Class");
10707 Clazz_defineMethod(c$,"comparator",
10708 function(){
10709 return this.ss.comparator();
10710 });
10711 Clazz_defineMethod(c$,"subSet",
10712 function(a,b){
10713 return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type);
10714 },"~O,~O");
10715 Clazz_defineMethod(c$,"headSet",
10716 function(a){
10717 return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type);
10718 },"~O");
10719 Clazz_defineMethod(c$,"tailSet",
10720 function(a){
10721 return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type);
10722 },"~O");
10723 Clazz_defineMethod(c$,"first",
10724 function(){
10725 return this.ss.first();
10726 });
10727 Clazz_defineMethod(c$,"last",
10728 function(){
10729 return this.ss.last();
10730 });
10731 c$=Clazz_p0p();
10732 Clazz_pu$h(self.c$);
10733 c$=Clazz_decorateAsClass(function(){
10734 this.sm=null;
10735 Clazz_instantialize(this,arguments);
10736 },java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
10737 Clazz_makeConstructor(c$,
10738 function(a,b,c){
10739 Clazz_superConstructor(this,java.util.Collections.CheckedSortedMap,[a,b,c]);
10740 this.sm=a;
10741 },"java.util.SortedMap,Class,Class");
10742 Clazz_defineMethod(c$,"comparator",
10743 function(){
10744 return this.sm.comparator();
10745 });
10746 Clazz_defineMethod(c$,"subMap",
10747 function(a,b){
10748 return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType);
10749 },"~O,~O");
10750 Clazz_defineMethod(c$,"headMap",
10751 function(a){
10752 return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType);
10753 },"~O");
10754 Clazz_defineMethod(c$,"tailMap",
10755 function(a){
10756 return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType);
10757 },"~O");
10758 Clazz_defineMethod(c$,"firstKey",
10759 function(){
10760 return this.sm.firstKey();
10761 });
10762 Clazz_defineMethod(c$,"lastKey",
10763 function(){
10764 return this.sm.lastKey();
10765 });
10766 c$=Clazz_p0p();
10767 c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList();
10768 c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet();
10769 c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap();
10770 });
10771 Clazz_load(["java.util.Map"],"java.util.SortedMap",null,function(){
10772 Clazz_declareInterface(java.util,"SortedMap",java.util.Map);
10773 });
10774 Clazz_load(["java.util.Set"],"java.util.SortedSet",null,function(){
10775 Clazz_declareInterface(java.util,"SortedSet",java.util.Set);
10776 });
10777 Clazz_load(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){
10778 c$=Clazz_decorateAsClass(function(){
10779 this.haveNextNextGaussian=false;
10780 this.seed=0;
10781 this.nextNextGaussian=0;
10782 Clazz_instantialize(this,arguments);
10783 },java.util,"Random",null,java.io.Serializable);
10784 Clazz_makeConstructor(c$,
10785 function(){
10786 this.setSeed(System.currentTimeMillis());
10787 });
10788 Clazz_makeConstructor(c$,
10789 function(seed){
10790 this.setSeed(seed);
10791 },"~N");
10792 Clazz_defineMethod(c$,"next",
10793 function(bits){
10794 this.seed=(this.seed*25214903917+0xb)&(281474976710655);
10795 return(this.seed>>>(48-bits));
10796 },"~N");
10797 Clazz_defineMethod(c$,"nextBoolean",
10798 function(){
10799 return Math.random()>0.5;
10800 });
10801 Clazz_defineMethod(c$,"nextBytes",
10802 function(buf){
10803 for(var i=0;i<bytes.length;i++){
10804 bytes[i]=Math.round(0x100*Math.random());
10805 }
10806 },"~A");
10807 Clazz_defineMethod(c$,"nextDouble",
10808 function(){
10809 return Math.random();
10810 });
10811 Clazz_defineMethod(c$,"nextFloat",
10812 function(){
10813 return Math.random();
10814 });
10815 Clazz_defineMethod(c$,"nextGaussian",
10816 function(){
10817 if(this.haveNextNextGaussian){
10818 this.haveNextNextGaussian=false;
10819 return this.nextNextGaussian;
10820 }var v1;
10821 var v2;
10822 var s;
10823 do{
10824 v1=2*this.nextDouble()-1;
10825 v2=2*this.nextDouble()-1;
10826 s=v1*v1+v2*v2;
10827 }while(s>=1);
10828 var norm=Math.sqrt(-2*Math.log(s)/s);
10829 this.nextNextGaussian=v2*norm;
10830 this.haveNextNextGaussian=true;
10831 return v1*norm;
10832 });
10833 Clazz_defineMethod(c$,"nextInt",
10834 function(){
10835 return Math.ceil(0xffff*Math.random())-0x8000;
10836 });
10837 Clazz_defineMethod(c$,"nextInt",
10838 function(n){
10839 if(n>0){
10840 n = Math.min(n, 31);
10841 return Math.floor((2 << (n - 1)) * Math.random())
10842
10843 /*
10844 if((n&-n)==n){
10845 return((n*this.next(31))>>31);
10846 }var bits;
10847 var val;
10848 do{
10849 bits=this.next(31);
10850 val=bits%n;
10851 }while(bits-val+(n-1)<0);
10852
10853
10854 return val;
10855
10856 */
10857 }
10858 throw new IllegalArgumentException();
10859 },"~N");
10860 Clazz_defineMethod(c$,"nextLong",
10861 function(){
10862 return Math.ceil(0xffffffff*Math.random())-0x80000000;
10863 });
10864 Clazz_defineMethod(c$,"setSeed",
10865 function(seed){
10866 Math.seedrandom(seed);
10867 //this.seed=(seed^25214903917)&(281474976710655);
10868 //this.haveNextNextGaussian=false;
10869 },"~N");
10870 Clazz_defineStatics(c$,
10871 "multiplier",0x5deece66d);
10872 });
10873
10874 // seedrandom.js
10875 // Author: David Bau 3/11/2010
10876 //
10877 // Defines a method Math.seedrandom() that, when called, substitutes
10878 // an explicitly seeded RC4-based algorithm for Math.random().  Also
10879 // supports automatic seeding from local or network sources of entropy.
10880 //
10881 // Usage:
10882 //
10883 //   <script src=http://davidbau.com/encode/seedrandom-min.js></script>
10884 //
10885 //   Math.seedrandom('yipee'); Sets Math.random to a function that is
10886 //                             initialized using the given explicit seed.
10887 //
10888 //   Math.seedrandom();        Sets Math.random to a function that is
10889 //                             seeded using the current time, dom state,
10890 //                             and other accumulated local entropy.
10891 //                             The generated seed string is returned.
10892 //
10893 //   Math.seedrandom('yowza', true);
10894 //                             Seeds using the given explicit seed mixed
10895 //                             together with accumulated entropy.
10896 //
10897 //   <script src="http://bit.ly/srandom-512"></script>
10898 //                             Seeds using physical random bits downloaded
10899 //                             from random.org.
10900 //
10901 // Examples:
10902 //
10903 //   Math.seedrandom("hello");            // Use "hello" as the seed.
10904 //   document.write(Math.random());       // Always 0.5463663768140734
10905 //   document.write(Math.random());       // Always 0.43973793770592234
10906 //   var rng1 = Math.random;              // Remember the current prng.
10907 //
10908 //   var autoseed = Math.seedrandom();    // New prng with an automatic seed.
10909 //   document.write(Math.random());       // Pretty much unpredictable.
10910 //
10911 //   Math.random = rng1;                  // Continue "hello" prng sequence.
10912 //   document.write(Math.random());       // Always 0.554769432473455
10913 //
10914 //   Math.seedrandom(autoseed);           // Restart at the previous seed.
10915 //   document.write(Math.random());       // Repeat the 'unpredictable' value.
10916 //
10917 // Notes:
10918 //
10919 // Each time seedrandom('arg') is called, entropy from the passed seed
10920 // is accumulated in a pool to help generate future seeds for the
10921 // zero-argument form of Math.seedrandom, so entropy can be injected over
10922 // time by calling seedrandom with explicit data repeatedly.
10923 //
10924 // On speed - This javascript implementation of Math.random() is about
10925 // 3-10x slower than the built-in Math.random() because it is not native
10926 // code, but this is typically fast enough anyway.  Seeding is more expensive,
10927 // especially if you use auto-seeding.  Some details (timings on Chrome 4):
10928 //
10929 // Our Math.random()            - avg less than 0.002 milliseconds per call
10930 // seedrandom('explicit')       - avg less than 0.5 milliseconds per call
10931 // seedrandom('explicit', true) - avg less than 2 milliseconds per call
10932 // seedrandom()                 - avg about 38 milliseconds per call
10933 //
10934 // LICENSE (BSD):
10935 //
10936 // Copyright 2010 David Bau, all rights reserved.
10937 //
10938 // Redistribution and use in source and binary forms, with or without
10939 // modification, are permitted provided that the following conditions are met:
10940 //
10941 //   1. Redistributions of source code must retain the above copyright
10942 //      notice, this list of conditions and the following disclaimer.
10943 //
10944 //   2. Redistributions in binary form must reproduce the above copyright
10945 //      notice, this list of conditions and the following disclaimer in the
10946 //      documentation and/or other materials provided with the distribution.
10947 //
10948 //   3. Neither the name of this module nor the names of its contributors may
10949 //      be used to endorse or promote products derived from this software
10950 //      without specific prior written permission.
10951 //
10952 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10953 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10954 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10955 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10956 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10957 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10958 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10959 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10960 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10961 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10962 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10963 //
10964 /**
10965  * All code is in an anonymous closure to keep the global namespace clean.
10966  *
10967  * @param {number=} overflow
10968  * @param {number=} startdenom
10969  */
10970 (function (pool, math, width, chunks, significance, overflow, startdenom) {
10971
10972 var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)"
10973 //
10974 // seedrandom()
10975 // This is the seedrandom function described above.
10976 //
10977 math['seedrandom'] = function seedrandom(seed, use_entropy) {
10978   var key = [];
10979   var arc4;
10980
10981   // Flatten the seed string or build one from local entropy if needed.
10982   seed = mixkey(flatten(
10983     use_entropy ? [seed, pool] :
10984     arguments.length ? seed :
10985     [new Date().getTime(), pool, window], 3), key);
10986
10987   // Use the seed to initialize an ARC4 generator.
10988   arc4 = new ARC4(key);
10989
10990   // Mix the randomness into accumulated entropy.
10991   mixkey(arc4.S, pool);
10992
10993   // Override Math.random
10994
10995   // This function returns a random double in [0, 1) that contains
10996   // randomness in every bit of the mantissa of the IEEE 754 value.
10997
10998   math['random'] = function random() {  // Closure to return a random double:
10999     var n = arc4.g(chunks);             // Start with a numerator n < 2 ^ 48
11000     var d = startdenom;                 //   and denominator d = 2 ^ 48.
11001     var x = 0;                          //   and no 'extra last byte'.
11002     while (n < significance) {          // Fill up all significant digits by
11003       n = (n + x) * width;              //   shifting numerator and
11004       d *= width;                       //   denominator and generating a
11005       x = arc4.g(1);                    //   new least-significant-byte.
11006     }
11007     while (n >= overflow) {             // To avoid rounding up, before adding
11008       n /= 2;                           //   last byte, shift everything
11009       d /= 2;                           //   right using integer math until
11010       x >>>= 1;                         //   we have exactly the desired bits.
11011     }
11012     return (n + x) / d;                 // Form the number within [0, 1).
11013   };
11014
11015   // Return the seed that was used
11016   return seed;
11017 };
11018
11019 //
11020 // ARC4
11021 //
11022 // An ARC4 implementation.  The constructor takes a key in the form of
11023 // an array of at most (width) integers that should be 0 <= x < (width).
11024 //
11025 // The g(count) method returns a pseudorandom integer that concatenates
11026 // the next (count) outputs from ARC4.  Its return value is a number x
11027 // that is in the range 0 <= x < (width ^ count).
11028 //
11029 /** @constructor */
11030 function ARC4(key) {
11031   var t, u, me = this, keylen = key.length;
11032   var i = 0, j = me.i = me.j = me.m = 0;
11033   me.S = [];
11034   me.c = [];
11035
11036   // The empty key [] is treated as [0].
11037   if (!keylen) { key = [keylen++]; }
11038
11039   // Set up S using the standard key scheduling algorithm.
11040   while (i < width) { me.S[i] = i++; }
11041   for (i = 0; i < width; i++) {
11042     t = me.S[i];
11043     j = lowbits(j + t + key[i % keylen]);
11044     u = me.S[j];
11045     me.S[i] = u;
11046     me.S[j] = t;
11047   }
11048
11049   // The "g" method returns the next (count) outputs as one number.
11050   me.g = function getnext(count) {
11051     var s = me.S;
11052     var i = lowbits(me.i + 1); var t = s[i];
11053     var j = lowbits(me.j + t); var u = s[j];
11054     s[i] = u;
11055     s[j] = t;
11056     var r = s[lowbits(t + u)];
11057     while (--count) {
11058       i = lowbits(i + 1); t = s[i];
11059       j = lowbits(j + t); u = s[j];
11060       s[i] = u;
11061       s[j] = t;
11062       r = r * width + s[lowbits(t + u)];
11063     }
11064     me.i = i;
11065     me.j = j;
11066     return r;
11067   };
11068   // For robust unpredictability discard an initial batch of values.
11069   // See http://www.rsa.com/rsalabs/node.asp?id=2009
11070   me.g(width);
11071 }
11072
11073 //
11074 // flatten()
11075 // Converts an object tree to nested arrays of strings.
11076 //
11077 /** @param {Object=} result
11078   * @param {string=} prop */
11079 function flatten(obj, depth, result, prop) {
11080   result = [];
11081   if (depth && typeof(obj) == 'object') {
11082     for (prop in obj) {
11083       if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
11084         try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
11085       }
11086     }
11087   }
11088   return result.length ? result : '' + obj;
11089 }
11090
11091 //
11092 // mixkey()
11093 // Mixes a string seed into a key that is an array of integers, and
11094 // returns a shortened string seed that is equivalent to the result key.
11095 //
11096 /** @param {number=} smear
11097   * @param {number=} j */
11098 function mixkey(seed, key, smear, j) {
11099   seed += '';                         // Ensure the seed is a string
11100   smear = 0;
11101   for (j = 0; j < seed.length; j++) {
11102     key[lowbits(j)] =
11103       lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j));
11104   }
11105   seed = '';
11106   for (j in key) { seed += String.fromCharCode(key[j]); }
11107   return seed;
11108 }
11109
11110 //
11111 // lowbits()
11112 // A quick "n mod width" for width a power of 2.
11113 //
11114 function lowbits(n) { return n & (width - 1); }
11115
11116 //
11117 // The following constants are related to IEEE 754 limits.
11118 //
11119 startdenom = math.pow(width, chunks);
11120 significance = math.pow(2, significance);
11121 overflow = significance * 2;
11122
11123 //
11124 // When seedrandom.js is loaded, we immediately mix a few bits
11125 // from the built-in RNG into the entropy pool.  Because we do
11126 // not want to intefere with determinstic PRNG state later,
11127 // seedrandom will not call math.random on its own again after
11128 // initialization.
11129 //
11130 mixkey(math.random(), pool);
11131
11132 // End anonymous scope, and pass initial values.
11133 })(
11134   [],   // pool: entropy pool starts empty
11135   Math, // math: package containing random, pow, and seedrandom
11136   256,  // width: each RC4 output is 0 <= x < 256
11137   6,    // chunks: at least six RC4 outputs for each double
11138   52    // significance: there are 52 significant digits in a double
11139 );
11140
11141 Clazz_declarePackage ("java.awt.event");
11142 Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () {
11143 c$ = Clazz_decorateAsClass (function () {
11144 this.eventMask = 0;
11145 Clazz_instantialize (this, arguments);
11146 }, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener);
11147 Clazz_makeConstructor (c$, 
11148 function (eventMask, listener) {
11149 Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]);
11150 this.eventMask = eventMask;
11151 }, "~N,java.awt.event.AWTEventListener");
11152 Clazz_defineMethod (c$, "eventDispatched", 
11153 function (evt) {
11154 (this.getListener ()).eventDispatched (evt);
11155 }, "java.awt.AWTEvent");
11156 Clazz_defineMethod (c$, "getEventMask", 
11157 function () {
11158 return this.eventMask;
11159 });
11160 });
11161 Clazz_declarePackage ("java.beans");
11162 Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () {
11163 c$ = Clazz_decorateAsClass (function () {
11164 this.map = null;
11165 this.source = null;
11166 Clazz_instantialize (this, arguments);
11167 }, java.beans, "PropertyChangeSupport");
11168 Clazz_prepareFields (c$, function () {
11169 this.map =  new java.beans.PropertyChangeSupport.PropertyChangeListenerMap ();
11170 });
11171 Clazz_makeConstructor (c$, 
11172 function (sourceBean) {
11173 if (sourceBean == null) {
11174 throw  new NullPointerException ();
11175 }this.source = sourceBean;
11176 }, "~O");
11177 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11178 function (listener) {
11179 this.addPropertyChangeListener1 (listener);
11180 }, "java.beans.PropertyChangeListener");
11181 Clazz_defineMethod (c$, "addPropertyChangeListener1", 
11182 function (listener) {
11183 if (listener == null) {
11184 return;
11185 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11186 var proxy = listener;
11187 this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11188 } else {
11189 this.map.add (null, listener);
11190 }}, "java.beans.PropertyChangeListener");
11191 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11192 function (listener) {
11193 if (listener == null) {
11194 return;
11195 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11196 var proxy = listener;
11197 this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11198 } else {
11199 this.map.remove (null, listener);
11200 }}, "java.beans.PropertyChangeListener");
11201 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11202 function () {
11203 return this.map.getListeners ();
11204 });
11205 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11206 function (propertyName, listener) {
11207 {
11208 if (arguments.length == 1) {
11209 this.addPropertyChangeListener1(propertyName);
11210 return;
11211 }
11212 }this.addPropertyChangeListener2 (propertyName, listener);
11213 }, "~S,java.beans.PropertyChangeListener");
11214 Clazz_defineMethod (c$, "addPropertyChangeListener2", 
11215 function (propertyName, listener) {
11216 if (listener == null || propertyName == null) {
11217 return;
11218 }listener = this.map.extract (listener);
11219 if (listener != null) {
11220 this.map.add (propertyName, listener);
11221 }}, "~S,java.beans.PropertyChangeListener");
11222 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11223 function (propertyName, listener) {
11224 if (listener == null || propertyName == null) {
11225 return;
11226 }listener = this.map.extract (listener);
11227 if (listener != null) {
11228 this.map.remove (propertyName, listener);
11229 }}, "~S,java.beans.PropertyChangeListener");
11230 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11231 function (propertyName) {
11232 return this.map.getListeners (propertyName);
11233 }, "~S");
11234 Clazz_defineMethod (c$, "firePropertyChange", 
11235 function (propertyName, oldValue, newValue) {
11236 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11237 return;
11238 }this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue));
11239 }, "~S,~O,~O");
11240 Clazz_defineMethod (c$, "firePropertyChange", 
11241 function (propertyName, oldValue, newValue) {
11242 if (oldValue == newValue) {
11243 return;
11244 }this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11245 }, "~S,~N,~N");
11246 Clazz_defineMethod (c$, "firePropertyChange", 
11247 function (propertyName, oldValue, newValue) {
11248 if (oldValue == newValue) {
11249 return;
11250 }this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11251 }, "~S,~B,~B");
11252 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
11253 function (evt) {
11254 var oldValue = evt.getOldValue ();
11255 var newValue = evt.getNewValue ();
11256 var propertyName = evt.getPropertyName ();
11257 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11258 return;
11259 }var common = this.map.get (null);
11260 var named = (propertyName != null) ? this.map.get (propertyName) : null;
11261 this.fire (common, evt);
11262 this.fire (named, evt);
11263 }, "java.beans.PropertyChangeEvent");
11264 Clazz_defineMethod (c$, "fire", 
11265  function (listeners, event) {
11266 if (listeners != null) {
11267 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11268 listener.propertyChange (event);
11269 }
11270 }}, "~A,java.beans.PropertyChangeEvent");
11271 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11272 function (propertyName, index, oldValue, newValue) {
11273 this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index));
11274 }, "~S,~N,~O,~O");
11275 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11276 function (propertyName, index, oldValue, newValue) {
11277 if (oldValue == newValue) {
11278 return;
11279 }this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11280 }, "~S,~N,~N,~N");
11281 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11282 function (propertyName, index, oldValue, newValue) {
11283 if (oldValue == newValue) {
11284 return;
11285 }this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11286 }, "~S,~N,~B,~B");
11287 Clazz_defineMethod (c$, "hasListeners", 
11288 function (propertyName) {
11289 return this.map.hasListeners (propertyName);
11290 }, "~S");
11291 Clazz_pu$h(self.c$);
11292 c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap);
11293 Clazz_overrideMethod (c$, "newArray", 
11294 function (a) {
11295 return (0 < a) ?  new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY;
11296 }, "~N");
11297 Clazz_overrideMethod (c$, "newProxy", 
11298 function (a, b) {
11299 return  new java.beans.PropertyChangeListenerProxy (a, b);
11300 }, "~S,java.beans.PropertyChangeListener");
11301 Clazz_defineStatics (c$,
11302 "EMPTY",  Clazz_newArray (-1, []));
11303 c$ = Clazz_p0p ();
11304 });
11305 Clazz_declarePackage ("java.beans");
11306 Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () {
11307 c$ = Clazz_decorateAsClass (function () {
11308 this.map = null;
11309 Clazz_instantialize (this, arguments);
11310 }, java.beans, "ChangeListenerMap");
11311 Clazz_defineMethod (c$, "add", 
11312 function (name, listener) {
11313 if (this.map == null) {
11314 this.map =  new java.util.HashMap ();
11315 }var array = this.map.get (name);
11316 var size = (array != null) ? array.length : 0;
11317 var clone = this.newArray (size + 1);
11318 clone[size] = listener;
11319 if (array != null) {
11320 System.arraycopy (array, 0, clone, 0, size);
11321 }this.map.put (name, clone);
11322 }, "~S,~O");
11323 Clazz_defineMethod (c$, "remove", 
11324 function (name, listener) {
11325 if (this.map != null) {
11326 var array = this.map.get (name);
11327 if (array != null) {
11328 for (var i = 0; i < array.length; i++) {
11329 if (listener.equals (array[i])) {
11330 var size = array.length - 1;
11331 if (size > 0) {
11332 var clone = this.newArray (size);
11333 System.arraycopy (array, 0, clone, 0, i);
11334 System.arraycopy (array, i + 1, clone, i, size - i);
11335 this.map.put (name, clone);
11336 } else {
11337 this.map.remove (name);
11338 if (this.map.isEmpty ()) {
11339 this.map = null;
11340 }}break;
11341 }}
11342 }}}, "~S,~O");
11343 Clazz_defineMethod (c$, "get", 
11344 function (name) {
11345 return (this.map != null) ? this.map.get (name) : null;
11346 }, "~S");
11347 Clazz_defineMethod (c$, "set", 
11348 function (name, listeners) {
11349 if (listeners != null) {
11350 if (this.map == null) {
11351 this.map =  new java.util.HashMap ();
11352 }this.map.put (name, listeners);
11353 } else if (this.map != null) {
11354 this.map.remove (name);
11355 if (this.map.isEmpty ()) {
11356 this.map = null;
11357 }}}, "~S,~A");
11358 Clazz_defineMethod (c$, "getListeners", 
11359 function () {
11360 if (this.map == null) {
11361 return this.newArray (0);
11362 }var list =  new java.util.ArrayList ();
11363 var listeners = this.map.get (null);
11364 if (listeners != null) {
11365 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11366 list.add (listener);
11367 }
11368 }for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
11369 var name = entry.getKey ();
11370 if (name != null) {
11371 for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11372 list.add (this.newProxy (name, listener));
11373 }
11374 }}
11375 return list.toArray (this.newArray (list.size ()));
11376 });
11377 Clazz_defineMethod (c$, "getListeners", 
11378 function (name) {
11379 if (name != null) {
11380 var listeners = this.get (name);
11381 if (listeners != null) {
11382 return listeners.clone ();
11383 }}return this.newArray (0);
11384 }, "~S");
11385 Clazz_defineMethod (c$, "hasListeners", 
11386 function (name) {
11387 if (this.map == null) {
11388 return false;
11389 }var array = this.map.get (null);
11390 return (array != null) || ((name != null) && (null != this.map.get (name)));
11391 }, "~S");
11392 Clazz_defineMethod (c$, "getEntries", 
11393 function () {
11394 return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet ();
11395 });
11396 Clazz_defineMethod (c$, "extract", 
11397 function (listener) {
11398 while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) {
11399 var proxy = listener;
11400 listener = proxy.getListener ();
11401 }
11402 return listener;
11403 }, "~O");
11404 });
11405 Clazz_declarePackage ("java.beans");
11406 Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () {
11407 c$ = Clazz_decorateAsClass (function () {
11408 this.index = 0;
11409 Clazz_instantialize (this, arguments);
11410 }, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent);
11411 Clazz_makeConstructor (c$, 
11412 function (source, propertyName, oldValue, newValue, index) {
11413 Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]);
11414 this.index = index;
11415 }, "~O,~S,~O,~O,~N");
11416 Clazz_defineMethod (c$, "getIndex", 
11417 function () {
11418 return this.index;
11419 });
11420 });
11421 Clazz_declarePackage ("java.beans");
11422 Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () {
11423 c$ = Clazz_decorateAsClass (function () {
11424 this.propertyName = null;
11425 this.newValue = null;
11426 this.oldValue = null;
11427 this.propagationId = null;
11428 Clazz_instantialize (this, arguments);
11429 }, java.beans, "PropertyChangeEvent", java.util.EventObject);
11430 Clazz_makeConstructor (c$, 
11431 function (source, propertyName, oldValue, newValue) {
11432 Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]);
11433 this.propertyName = propertyName;
11434 this.newValue = newValue;
11435 this.oldValue = oldValue;
11436 }, "~O,~S,~O,~O");
11437 Clazz_defineMethod (c$, "getPropertyName", 
11438 function () {
11439 return this.propertyName;
11440 });
11441 Clazz_defineMethod (c$, "getNewValue", 
11442 function () {
11443 return this.newValue;
11444 });
11445 Clazz_defineMethod (c$, "getOldValue", 
11446 function () {
11447 return this.oldValue;
11448 });
11449 Clazz_defineMethod (c$, "setPropagationId", 
11450 function (propagationId) {
11451 this.propagationId = propagationId;
11452 }, "~O");
11453 Clazz_defineMethod (c$, "getPropagationId", 
11454 function () {
11455 return this.propagationId;
11456 });
11457 });
11458 Clazz_declarePackage ("java.beans");
11459 Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () {
11460 c$ = Clazz_decorateAsClass (function () {
11461 this.propertyName = null;
11462 Clazz_instantialize (this, arguments);
11463 }, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener);
11464 Clazz_makeConstructor (c$, 
11465 function (propertyName, listener) {
11466 Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]);
11467 this.propertyName = propertyName;
11468 }, "~S,java.beans.PropertyChangeListener");
11469 Clazz_defineMethod (c$, "propertyChange", 
11470 function (evt) {
11471 (this.getListener ()).propertyChange (evt);
11472 }, "java.beans.PropertyChangeEvent");
11473 Clazz_defineMethod (c$, "getPropertyName", 
11474 function () {
11475 return this.propertyName;
11476 });
11477 });
11478 Clazz_declarePackage ("java.beans");
11479 Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () {
11480 Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener);
11481 });
11482 Clazz_declarePackage ("java.security");
11483 Clazz_declareInterface (java.security, "PrivilegedAction");
11484 Clazz_declarePackage ("java.awt");
11485 Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () {
11486 c$ = Clazz_decorateAsClass (function () {
11487 this.x = 0;
11488 this.y = 0;
11489 Clazz_instantialize (this, arguments);
11490 }, java.awt, "Point", java.awt.geom.Point2D);
11491 Clazz_makeConstructor (c$, 
11492 function () {
11493 this.construct (0, 0);
11494 });
11495 Clazz_makeConstructor (c$, 
11496 function (p) {
11497 this.construct (p.x, p.y);
11498 }, "java.awt.Point");
11499 Clazz_makeConstructor (c$, 
11500 function (x, y) {
11501 Clazz_superConstructor (this, java.awt.Point, []);
11502 this.x = x;
11503 this.y = y;
11504 }, "~N,~N");
11505 Clazz_overrideMethod (c$, "getX", 
11506 function () {
11507 return this.x;
11508 });
11509 Clazz_overrideMethod (c$, "getY", 
11510 function () {
11511 return this.y;
11512 });
11513 Clazz_defineMethod (c$, "getLocation", 
11514 function () {
11515 return  new java.awt.Point (this.x, this.y);
11516 });
11517 Clazz_defineMethod (c$, "setLocation", 
11518 function (p) {
11519 this.setLocation (p.x, p.y);
11520 }, "java.awt.Point");
11521 Clazz_defineMethod (c$, "setLocation", 
11522 function (x, y) {
11523 this.x = Clazz_doubleToInt (Math.floor (x + 0.5));
11524 this.y = Clazz_doubleToInt (Math.floor (y + 0.5));
11525 }, "~N,~N");
11526 Clazz_defineMethod (c$, "move", 
11527 function (x, y) {
11528 this.x = x;
11529 this.y = y;
11530 }, "~N,~N");
11531 Clazz_defineMethod (c$, "translate", 
11532 function (dx, dy) {
11533 this.x += dx;
11534 this.y += dy;
11535 }, "~N,~N");
11536 Clazz_defineMethod (c$, "equals", 
11537 function (obj) {
11538 if (Clazz_instanceOf (obj, java.awt.Point)) {
11539 var pt = obj;
11540 return (this.x == pt.x) && (this.y == pt.y);
11541 }return Clazz_superCall (this, java.awt.Point, "equals", [obj]);
11542 }, "~O");
11543 Clazz_overrideMethod (c$, "toString", 
11544 function () {
11545 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]";
11546 });
11547 });
11548 Clazz_declarePackage ("jssun.awt");
11549 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 () {
11550 c$ = Clazz_decorateAsClass (function () {
11551 this.table = null;
11552 this.threadGroup = null;
11553 this.changeSupport = null;
11554 this.$isDisposed = false;
11555 this.mostRecentKeyValue = null;
11556 this.shadowMostRecentKeyValue = null;
11557 Clazz_instantialize (this, arguments);
11558 }, jssun.awt, "AppContext");
11559 Clazz_prepareFields (c$, function () {
11560 this.table =  new java.util.HashMap ();
11561 });
11562 c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", 
11563 function () {
11564 return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());
11565 });
11566 Clazz_defineMethod (c$, "isDisposed", 
11567 function () {
11568 return this.$isDisposed;
11569 });
11570 Clazz_makeConstructor (c$, 
11571 function (threadGroup) {
11572 jssun.awt.AppContext.numAppContexts++;
11573 this.threadGroup = threadGroup;
11574 jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);
11575 }, "ThreadGroup");
11576 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
11577 function () {
11578 var currentThread = Thread.currentThread ();
11579 var appContext = null;
11580 var recent = jssun.awt.AppContext.mostRecentThreadAppContext;
11581 if ((recent != null) && (recent.thread === currentThread)) {
11582 appContext = recent.appContext;
11583 } else {
11584 var currentThreadGroup = currentThread.getThreadGroup ();
11585 var threadGroup = currentThreadGroup;
11586 appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11587 while (appContext == null) {
11588 threadGroup = threadGroup.getParent ();
11589 if (threadGroup == null) {
11590 return null;
11591 }appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11592 }
11593 for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {
11594 jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);
11595 }
11596 jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);
11597 }return appContext;
11598 });
11599 c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", 
11600 function (ctx) {
11601 return false;
11602 }, "jssun.awt.AppContext");
11603 Clazz_defineMethod (c$, "dispose", 
11604 function () {
11605 });
11606 Clazz_defineMethod (c$, "get", 
11607 function (key) {
11608 {
11609 var recent = this.mostRecentKeyValue;
11610 if ((recent != null) && (recent.key === key)) {
11611 return recent.value;
11612 }var value = this.table.get (key);
11613 if (this.mostRecentKeyValue == null) {
11614 this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11615 this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11616 } else {
11617 var auxKeyValue = this.mostRecentKeyValue;
11618 this.shadowMostRecentKeyValue.setPair (key, value);
11619 this.mostRecentKeyValue = this.shadowMostRecentKeyValue;
11620 this.shadowMostRecentKeyValue = auxKeyValue;
11621 }return value;
11622 }}, "~O");
11623 Clazz_defineMethod (c$, "put", 
11624 function (key, value) {
11625 {
11626 var recent = this.mostRecentKeyValue;
11627 if ((recent != null) && (recent.key === key)) recent.value = value;
11628 return this.table.put (key, value);
11629 }}, "~O,~O");
11630 Clazz_defineMethod (c$, "remove", 
11631 function (key) {
11632 {
11633 var recent = this.mostRecentKeyValue;
11634 if ((recent != null) && (recent.key === key)) recent.value = null;
11635 return this.table.remove (key);
11636 }}, "~O");
11637 Clazz_defineMethod (c$, "getThreadGroup", 
11638 function () {
11639 return this.threadGroup;
11640 });
11641 Clazz_overrideMethod (c$, "toString", 
11642 function () {
11643 return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";
11644 });
11645 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11646 function () {
11647 if (this.changeSupport == null) {
11648 return  new Array (0);
11649 }return this.changeSupport.getPropertyChangeListeners ();
11650 });
11651 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11652 function (propertyName, listener) {
11653 if (listener == null) {
11654 return;
11655 }if (this.changeSupport == null) {
11656 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
11657 }this.changeSupport.addPropertyChangeListener (propertyName, listener);
11658 }, "~S,java.beans.PropertyChangeListener");
11659 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11660 function (propertyName, listener) {
11661 if (listener == null || this.changeSupport == null) {
11662 return;
11663 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
11664 }, "~S,java.beans.PropertyChangeListener");
11665 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11666 function (propertyName) {
11667 if (this.changeSupport == null) {
11668 return  new Array (0);
11669 }return this.changeSupport.getPropertyChangeListeners (propertyName);
11670 }, "~S");
11671 c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");
11672 c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());
11673 Clazz_defineStatics (c$,
11674 "DISPOSED_PROPERTY_NAME", "disposed",
11675 "GUI_DISPOSED", "guidisposed",
11676 "numAppContexts", 0,
11677 "mostRecentThreadAppContext", null);
11678 c$ = Clazz_decorateAsClass (function () {
11679 this.thread = null;
11680 this.appContext = null;
11681 Clazz_instantialize (this, arguments);
11682 }, jssun.awt, "MostRecentThreadAppContext");
11683 Clazz_makeConstructor (c$, 
11684 function (key, value) {
11685 this.thread = key;
11686 this.appContext = value;
11687 }, "Thread,jssun.awt.AppContext");
11688 c$ = Clazz_decorateAsClass (function () {
11689 this.key = null;
11690 this.value = null;
11691 Clazz_instantialize (this, arguments);
11692 }, jssun.awt, "MostRecentKeyValue");
11693 Clazz_makeConstructor (c$, 
11694 function (k, v) {
11695 this.key = k;
11696 this.value = v;
11697 }, "~O,~O");
11698 Clazz_defineMethod (c$, "setPair", 
11699 function (k, v) {
11700 this.key = k;
11701 this.value = v;
11702 }, "~O,~O");
11703 });
11704 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){
11705 c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
11706 Clazz_makeConstructor(c$,
11707 function(cs){
11708 if(cs==null){
11709 throw new NullPointerException();
11710 }
11711 Clazz_superConstructor(this,StringBuffer,[cs.toString()]);
11712 },"CharSequence");
11713 Clazz_defineMethod(c$,"append",
11714 function(b){
11715 return this.append(b?"true":"false");
11716 },"~B");
11717 Clazz_defineMethod(c$,"append",
11718 function(ch){
11719 this.append0(ch);
11720 return this;
11721 },"~N");
11722 Clazz_defineMethod(c$,"append",
11723 function(d){
11724 return this.append(Double.toString(d));
11725 },"~N");
11726 Clazz_defineMethod(c$,"append",
11727 function(obj){
11728 if(obj==null){
11729 this.appendNull();
11730 }else{
11731 this.append0(obj.toString());
11732 }return this;
11733 },"~O");
11734 Clazz_defineMethod(c$,"append",
11735 function(string){
11736 this.append0(string);
11737 return this;
11738 },"~S");
11739 Clazz_defineMethod(c$,"append",
11740 function(sb){
11741 if(sb==null){
11742 this.appendNull();
11743 }else{
11744 {
11745 this.append0(sb.getValue(),0,sb.length());
11746 }}return this;
11747 },"StringBuffer");
11748 Clazz_defineMethod(c$,"append",
11749 function(chars){
11750 this.append0(chars);
11751 return this;
11752 },"~A");
11753 Clazz_defineMethod(c$,"append",
11754 function(chars,start,length){
11755 this.append0(chars,start,length);
11756 return this;
11757 },"~A,~N,~N");
11758 Clazz_defineMethod(c$,"append",
11759 function(s){
11760 if(s==null){
11761 this.appendNull();
11762 }else{
11763 this.append0(s.toString());
11764 }return this;
11765 },"CharSequence");
11766 Clazz_defineMethod(c$,"append",
11767 function(s,start,end){
11768 this.append0(s,start,end);
11769 return this;
11770 },"CharSequence,~N,~N");
11771 Clazz_defineMethod(c$,"appendCodePoint",
11772 function(codePoint){
11773 return this.append(Character.toChars(codePoint));
11774 },"~N");
11775 Clazz_defineMethod(c$,"$delete",
11776 function(start,end){
11777 this.delete0(start,end);
11778 return this;
11779 },"~N,~N");
11780 Clazz_defineMethod(c$,"deleteCharAt",
11781 function(location){
11782 this.deleteCharAt0(location);
11783 return this;
11784 },"~N");
11785 Clazz_defineMethod(c$,"insert",
11786 function(index,ch){
11787 this.insert0(index,ch);
11788 return this;
11789 },"~N,~N");
11790 Clazz_defineMethod(c$,"insert",
11791 function(index,b){
11792 return this.insert(index,b?"true":"false");
11793 },"~N,~B");
11794 Clazz_defineMethod(c$,"insert",
11795 function(index,i){
11796 return this.insert(index,Integer.toString(i));
11797 },"~N,~N");
11798 Clazz_defineMethod(c$,"insert",
11799 function(index,l){
11800 return this.insert(index,Long.toString(l));
11801 },"~N,~N");
11802 Clazz_defineMethod(c$,"insert",
11803 function(index,d){
11804 return this.insert(index,Double.toString(d));
11805 },"~N,~N");
11806 Clazz_defineMethod(c$,"insert",
11807 function(index,f){
11808 return this.insert(index,Float.toString(f));
11809 },"~N,~N");
11810 Clazz_defineMethod(c$,"insert",
11811 function(index,obj){
11812 return this.insert(index,obj==null?"null":obj.toString());
11813 },"~N,~O");
11814 Clazz_defineMethod(c$,"insert",
11815 function(index,string){
11816 this.insert0(index,string);
11817 return this;
11818 },"~N,~S");
11819 Clazz_defineMethod(c$,"insert",
11820 function(index,chars){
11821 this.insert0(index,chars);
11822 return this;
11823 },"~N,~A");
11824 Clazz_defineMethod(c$,"insert",
11825 function(index,chars,start,length){
11826 this.insert0(index,chars,start,length);
11827 return this;
11828 },"~N,~A,~N,~N");
11829 Clazz_defineMethod(c$,"insert",
11830 function(index,s){
11831 this.insert0(index,s==null?"null":s.toString());
11832 return this;
11833 },"~N,CharSequence");
11834 Clazz_defineMethod(c$,"insert",
11835 function(index,s,start,end){
11836 this.insert0(index,s,start,end);
11837 return this;
11838 },"~N,CharSequence,~N,~N");
11839 Clazz_defineMethod(c$,"replace",
11840 function(start,end,string){
11841 this.replace0(start,end,string);
11842 return this;
11843 },"~N,~N,~S");
11844 Clazz_defineMethod(c$,"reverse",
11845 function(){
11846 this.reverse0();
11847 return this;
11848 });
11849 Clazz_overrideMethod(c$,"subSequence",
11850 function(start,end){
11851 return Clazz_superCall(this,StringBuffer,"substring",[start,end]);
11852 },"~N,~N");
11853 });
11854 Clazz_load(["java.util.AbstractMap","$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.IdentityHashMap",["java.lang.IllegalArgumentException","$.IllegalStateException","java.util.AbstractCollection","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.NoSuchElementException"],function(){
11855 c$=Clazz_decorateAsClass(function(){
11856 this.elementData=null;
11857 this.$size=0;
11858 this.threshold=0;
11859 this.modCount=0;
11860 Clazz_instantialize(this,arguments);
11861 },java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]);
11862 Clazz_makeConstructor(c$,
11863 function(){
11864 this.construct(21);
11865 });
11866 Clazz_makeConstructor(c$,
11867 function(maxSize){
11868 Clazz_superConstructor(this,java.util.IdentityHashMap,[]);
11869 if(maxSize>=0){
11870 this.$size=0;
11871 this.threshold=this.getThreshold(maxSize);
11872 this.elementData=this.newElementArray(this.computeElementArraySize());
11873 }else{
11874 throw new IllegalArgumentException();
11875 }},"~N");
11876 Clazz_defineMethod(c$,"getThreshold",
11877 ($fz=function(maxSize){
11878 return maxSize>3?maxSize:3;
11879 },$fz.isPrivate=true,$fz),"~N");
11880 Clazz_defineMethod(c$,"computeElementArraySize",
11881 ($fz=function(){
11882 return(Math.floor((this.threshold*10000)/7500))*2;
11883 },$fz.isPrivate=true,$fz));
11884 Clazz_defineMethod(c$,"newElementArray",
11885 ($fz=function(s){
11886 return new Array(s);
11887 },$fz.isPrivate=true,$fz),"~N");
11888 Clazz_makeConstructor(c$,
11889 function(map){
11890 this.construct(map.size()<6?11:map.size()*2);
11891 this.putAllImpl(map);
11892 },"java.util.Map");
11893 Clazz_defineMethod(c$,"massageValue",
11894 ($fz=function(value){
11895 return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value);
11896 },$fz.isPrivate=true,$fz),"~O");
11897 Clazz_overrideMethod(c$,"clear",
11898 function(){
11899 this.$size=0;
11900 for(var i=0;i<this.elementData.length;i++){
11901 this.elementData[i]=null;
11902 }
11903 this.modCount++;
11904 });
11905 Clazz_overrideMethod(c$,"containsKey",
11906 function(key){
11907 if(key==null){
11908 key=java.util.IdentityHashMap.NULL_OBJECT;
11909 }var index=this.findIndex(key,this.elementData);
11910 return this.elementData[index]===key;
11911 },"~O");
11912 Clazz_overrideMethod(c$,"containsValue",
11913 function(value){
11914 if(value==null){
11915 value=java.util.IdentityHashMap.NULL_OBJECT;
11916 }for(var i=1;i<this.elementData.length;i=i+2){
11917 if(this.elementData[i]===value){
11918 return true;
11919 }}
11920 return false;
11921 },"~O");
11922 Clazz_overrideMethod(c$,"get",
11923 function(key){
11924 if(key==null){
11925 key=java.util.IdentityHashMap.NULL_OBJECT;
11926 }var index=this.findIndex(key,this.elementData);
11927 if(this.elementData[index]===key){
11928 var result=this.elementData[index+1];
11929 return this.massageValue(result);
11930 }return null;
11931 },"~O");
11932 Clazz_defineMethod(c$,"getEntry",
11933 ($fz=function(key){
11934 if(key==null){
11935 key=java.util.IdentityHashMap.NULL_OBJECT;
11936 }var index=this.findIndex(key,this.elementData);
11937 if(this.elementData[index]===key){
11938 return this.getEntry(index);
11939 }return null;
11940 },$fz.isPrivate=true,$fz),"~O");
11941 Clazz_defineMethod(c$,"getEntry",
11942 ($fz=function(index){
11943 var key=this.elementData[index];
11944 var value=this.elementData[index+1];
11945 if(key===java.util.IdentityHashMap.NULL_OBJECT){
11946 key=null;
11947 }if(value===java.util.IdentityHashMap.NULL_OBJECT){
11948 value=null;
11949 }return new java.util.IdentityHashMap.IdentityHashMapEntry(key,value);
11950 },$fz.isPrivate=true,$fz),"~N");
11951 Clazz_defineMethod(c$,"findIndex",
11952 ($fz=function(key,array){
11953 var length=array.length;
11954 var index=this.getModuloHash(key,length);
11955 var last=(index+length-2)%length;
11956 while(index!=last){
11957 if(array[index]===key||(array[index]==null)){
11958 break;
11959 }index=(index+2)%length;
11960 }
11961 return index;
11962 },$fz.isPrivate=true,$fz),"~O,~A");
11963 Clazz_defineMethod(c$,"getModuloHash",
11964 ($fz=function(key,length){
11965 return((System.identityHashCode(key)&0x7FFFFFFF)%(Math.floor(length/2)))*2;
11966 },$fz.isPrivate=true,$fz),"~O,~N");
11967 Clazz_overrideMethod(c$,"put",
11968 function(key,value){
11969 var _key=key;
11970 var _value=value;
11971 if(_key==null){
11972 _key=java.util.IdentityHashMap.NULL_OBJECT;
11973 }if(_value==null){
11974 _value=java.util.IdentityHashMap.NULL_OBJECT;
11975 }var index=this.findIndex(_key,this.elementData);
11976 if(this.elementData[index]!==_key){
11977 this.modCount++;
11978 if(++this.$size>this.threshold){
11979 this.rehash();
11980 index=this.findIndex(_key,this.elementData);
11981 }this.elementData[index]=_key;
11982 this.elementData[index+1]=null;
11983 }var result=this.elementData[index+1];
11984 this.elementData[index+1]=_value;
11985 return this.massageValue(result);
11986 },"~O,~O");
11987 Clazz_overrideMethod(c$,"putAll",
11988 function(map){
11989 this.putAllImpl(map);
11990 },"java.util.Map");
11991 Clazz_defineMethod(c$,"rehash",
11992 ($fz=function(){
11993 var newlength=this.elementData.length<<1;
11994 if(newlength==0){
11995 newlength=1;
11996 }var newData=this.newElementArray(newlength);
11997 for(var i=0;i<this.elementData.length;i=i+2){
11998 var key=this.elementData[i];
11999 if(key!=null){
12000 var index=this.findIndex(key,newData);
12001 newData[index]=key;
12002 newData[index+1]=this.elementData[i+1];
12003 }}
12004 this.elementData=newData;
12005 this.computeMaxSize();
12006 },$fz.isPrivate=true,$fz));
12007 Clazz_defineMethod(c$,"computeMaxSize",
12008 ($fz=function(){
12009 this.threshold=(Math.floor((Math.floor(this.elementData.length/ 2)) * 7500 /10000));
12010 },$fz.isPrivate=true,$fz));
12011 Clazz_overrideMethod(c$,"remove",
12012 function(key){
12013 if(key==null){
12014 key=java.util.IdentityHashMap.NULL_OBJECT;
12015 }var hashedOk;
12016 var index;
12017 var next;
12018 var hash;
12019 var result;
12020 var object;
12021 index=next=this.findIndex(key,this.elementData);
12022 if(this.elementData[index]!==key){
12023 return null;
12024 }result=this.elementData[index+1];
12025 var length=this.elementData.length;
12026 while(true){
12027 next=(next+2)%length;
12028 object=this.elementData[next];
12029 if(object==null){
12030 break;
12031 }hash=this.getModuloHash(object,length);
12032 hashedOk=hash>index;
12033 if(next<index){
12034 hashedOk=hashedOk||(hash<=next);
12035 }else{
12036 hashedOk=hashedOk&&(hash<=next);
12037 }if(!hashedOk){
12038 this.elementData[index]=object;
12039 this.elementData[index+1]=this.elementData[next+1];
12040 index=next;
12041 }}
12042 this.$size--;
12043 this.modCount++;
12044 this.elementData[index]=null;
12045 this.elementData[index+1]=null;
12046 return this.massageValue(result);
12047 },"~O");
12048 Clazz_overrideMethod(c$,"entrySet",
12049 function(){
12050 return new java.util.IdentityHashMap.IdentityHashMapEntrySet(this);
12051 });
12052 Clazz_overrideMethod(c$,"keySet",
12053 function(){
12054 if(this.$keySet==null){
12055 this.$keySet=((Clazz_isClassDefined("java.util.IdentityHashMap$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1,this,null));
12056 }return this.$keySet;
12057 });
12058 Clazz_overrideMethod(c$,"values",
12059 function(){
12060 if(this.valuesCollection==null){
12061 this.valuesCollection=((Clazz_isClassDefined("java.util.IdentityHashMap$2")?0:java.util.IdentityHashMap.$IdentityHashMap$2$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2,this,null));
12062 }return this.valuesCollection;
12063 });
12064 Clazz_overrideMethod(c$,"equals",
12065 function(object){
12066 if(this===object){
12067 return true;
12068 }if(Clazz_instanceOf(object,java.util.Map)){
12069 var map=object;
12070 if(this.size()!=map.size()){
12071 return false;
12072 }var set=this.entrySet();
12073 return set.equals(map.entrySet());
12074 }return false;
12075 },"~O");
12076 Clazz_defineMethod(c$,"clone",
12077 function(){
12078 try{
12079 return Clazz_superCall(this,java.util.IdentityHashMap,"clone",[]);
12080 }catch(e){
12081 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12082 return null;
12083 }else{
12084 throw e;
12085 }
12086 }
12087 });
12088 Clazz_overrideMethod(c$,"isEmpty",
12089 function(){
12090 return this.$size==0;
12091 });
12092 Clazz_overrideMethod(c$,"size",
12093 function(){
12094 return this.$size;
12095 });
12096 Clazz_defineMethod(c$,"putAllImpl",
12097 ($fz=function(map){
12098 if(map.entrySet()!=null){
12099 Clazz_superCall(this,java.util.IdentityHashMap,"putAll",[map]);
12100 }},$fz.isPrivate=true,$fz),"java.util.Map");
12101 c$.$IdentityHashMap$1$=function(){
12102 Clazz_pu$h(self.c$);
12103 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1",java.util.AbstractSet);
12104 Clazz_overrideMethod(c$,"contains",
12105 function(object){
12106 return this.b$["java.util.IdentityHashMap"].containsKey(object);
12107 },"~O");
12108 Clazz_overrideMethod(c$,"size",
12109 function(){
12110 return this.b$["java.util.IdentityHashMap"].size();
12111 });
12112 Clazz_overrideMethod(c$,"clear",
12113 function(){
12114 this.b$["java.util.IdentityHashMap"].clear();
12115 });
12116 Clazz_overrideMethod(c$,"remove",
12117 function(key){
12118 if(this.b$["java.util.IdentityHashMap"].containsKey(key)){
12119 this.b$["java.util.IdentityHashMap"].remove(key);
12120 return true;
12121 }return false;
12122 },"~O");
12123 Clazz_overrideMethod(c$,"iterator",
12124 function(){
12125 return new java.util.IdentityHashMap.IdentityHashMapIterator(((Clazz_isClassDefined("java.util.IdentityHashMap$1$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1$1,this,null)),this.b$["java.util.IdentityHashMap"]);
12126 });
12127 c$=Clazz_p0p();
12128 };
12129 c$.$IdentityHashMap$1$1$=function(){
12130 Clazz_pu$h(self.c$);
12131 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1$1",null,java.util.MapEntry.Type);
12132 Clazz_overrideMethod(c$,"get",
12133 function(entry){
12134 return entry.key;
12135 },"java.util.MapEntry");
12136 c$=Clazz_p0p();
12137 };
12138 c$.$IdentityHashMap$2$=function(){
12139 Clazz_pu$h(self.c$);
12140 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2",java.util.AbstractCollection);
12141 Clazz_overrideMethod(c$,"contains",
12142 function(object){
12143 return this.b$["java.util.IdentityHashMap"].containsValue(object);
12144 },"~O");
12145 Clazz_overrideMethod(c$,"size",
12146 function(){
12147 return this.b$["java.util.IdentityHashMap"].size();
12148 });
12149 Clazz_overrideMethod(c$,"clear",
12150 function(){
12151 this.b$["java.util.IdentityHashMap"].clear();
12152 });
12153 Clazz_overrideMethod(c$,"iterator",
12154 function(){
12155 return new java.util.IdentityHashMap.IdentityHashMapIterator(((Clazz_isClassDefined("java.util.IdentityHashMap$2$1")?0:java.util.IdentityHashMap.$IdentityHashMap$2$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2$1,this,null)),this.b$["java.util.IdentityHashMap"]);
12156 });
12157 Clazz_overrideMethod(c$,"remove",
12158 function(object){
12159 var it=this.iterator();
12160 while(it.hasNext()){
12161 if(object===it.next()){
12162 it.remove();
12163 return true;
12164 }}
12165 return false;
12166 },"~O");
12167 c$=Clazz_p0p();
12168 };
12169 c$.$IdentityHashMap$2$1$=function(){
12170 Clazz_pu$h(self.c$);
12171 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2$1",null,java.util.MapEntry.Type);
12172 Clazz_overrideMethod(c$,"get",
12173 function(entry){
12174 return entry.value;
12175 },"java.util.MapEntry");
12176 c$=Clazz_p0p();
12177 };
12178 Clazz_pu$h(self.c$);
12179 c$=Clazz_declareType(java.util.IdentityHashMap,"IdentityHashMapEntry",java.util.MapEntry);
12180 Clazz_overrideMethod(c$,"equals",
12181 function(a){
12182 if(this===a){
12183 return true;
12184 }if(Clazz_instanceOf(a,java.util.Map.Entry)){
12185 var b=a;
12186 return(this.key===b.getKey())&&(this.value===b.getValue());
12187 }return false;
12188 },"~O");
12189 Clazz_overrideMethod(c$,"hashCode",
12190 function(){
12191 return System.identityHashCode(this.key)^System.identityHashCode(this.value);
12192 });
12193 Clazz_overrideMethod(c$,"toString",
12194 function(){
12195 return this.key+"="+this.value;
12196 });
12197 c$=Clazz_p0p();
12198 Clazz_pu$h(self.c$);
12199 c$=Clazz_decorateAsClass(function(){
12200 this.position=0;
12201 this.lastPosition=0;
12202 this.associatedMap=null;
12203 this.expectedModCount=0;
12204 this.type=null;
12205 this.canRemove=false;
12206 Clazz_instantialize(this,arguments);
12207 },java.util.IdentityHashMap,"IdentityHashMapIterator",null,java.util.Iterator);
12208 Clazz_makeConstructor(c$,
12209 function(a,b){
12210 this.associatedMap=b;
12211 this.type=a;
12212 this.expectedModCount=b.modCount;
12213 },"java.util.MapEntry.Type,java.util.IdentityHashMap");
12214 Clazz_overrideMethod(c$,"hasNext",
12215 function(){
12216 while(this.position<this.associatedMap.elementData.length){
12217 if(this.associatedMap.elementData[this.position]==null){
12218 this.position+=2;
12219 }else{
12220 return true;
12221 }}
12222 return false;
12223 });
12224 Clazz_defineMethod(c$,"checkConcurrentMod",
12225 function(){
12226 if(this.expectedModCount!=this.associatedMap.modCount){
12227 throw new java.util.ConcurrentModificationException();
12228 }});
12229 Clazz_overrideMethod(c$,"next",
12230 function(){
12231 this.checkConcurrentMod();
12232 if(!this.hasNext()){
12233 throw new java.util.NoSuchElementException();
12234 }var a=this.associatedMap.getEntry(this.position);
12235 this.lastPosition=this.position;
12236 this.position+=2;
12237 this.canRemove=true;
12238 return this.type.get(a);
12239 });
12240 Clazz_overrideMethod(c$,"remove",
12241 function(){
12242 this.checkConcurrentMod();
12243 if(!this.canRemove){
12244 throw new IllegalStateException();
12245 }this.canRemove=false;
12246 this.associatedMap.remove(this.associatedMap.elementData[this.lastPosition]);
12247 this.position=this.lastPosition;
12248 this.expectedModCount++;
12249 });
12250 c$=Clazz_p0p();
12251 Clazz_pu$h(self.c$);
12252 c$=Clazz_decorateAsClass(function(){
12253 this.associatedMap=null;
12254 Clazz_instantialize(this,arguments);
12255 },java.util.IdentityHashMap,"IdentityHashMapEntrySet",java.util.AbstractSet);
12256 Clazz_makeConstructor(c$,
12257 function(a){
12258 Clazz_superConstructor(this,java.util.IdentityHashMap.IdentityHashMapEntrySet,[]);
12259 this.associatedMap=a;
12260 },"java.util.IdentityHashMap");
12261 Clazz_defineMethod(c$,"hashMap",
12262 function(){
12263 return this.associatedMap;
12264 });
12265 Clazz_overrideMethod(c$,"size",
12266 function(){
12267 return this.associatedMap.$size;
12268 });
12269 Clazz_overrideMethod(c$,"clear",
12270 function(){
12271 this.associatedMap.clear();
12272 });
12273 Clazz_overrideMethod(c$,"remove",
12274 function(a){
12275 if(this.contains(a)){
12276 this.associatedMap.remove((a).getKey());
12277 return true;
12278 }return false;
12279 },"~O");
12280 Clazz_overrideMethod(c$,"contains",
12281 function(a){
12282 if(Clazz_instanceOf(a,java.util.Map.Entry)){
12283 var b=this.associatedMap.getEntry((a).getKey());
12284 return b!=null&&b.equals(a);
12285 }return false;
12286 },"~O");
12287 Clazz_overrideMethod(c$,"iterator",
12288 function(){
12289 return new java.util.IdentityHashMap.IdentityHashMapIterator(((Clazz_isClassDefined("java.util.IdentityHashMap$IdentityHashMapEntrySet$1")?0:java.util.IdentityHashMap.IdentityHashMapEntrySet.$IdentityHashMap$IdentityHashMapEntrySet$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$IdentityHashMapEntrySet$1,this,null)),this.associatedMap);
12290 });
12291 c$.$IdentityHashMap$IdentityHashMapEntrySet$1$=function(){
12292 Clazz_pu$h(self.c$);
12293 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$IdentityHashMapEntrySet$1",null,java.util.MapEntry.Type);
12294 Clazz_overrideMethod(c$,"get",
12295 function(a){
12296 return a;
12297 },"java.util.MapEntry");
12298 c$=Clazz_p0p();
12299 };
12300 c$=Clazz_p0p();
12301 Clazz_defineStatics(c$,
12302 "DEFAULT_MAX_SIZE",21,
12303 "loadFactor",7500);
12304 c$.NULL_OBJECT=c$.prototype.NULL_OBJECT=new Clazz._O();
12305 });
12306 Clazz_load(["java.util.AbstractSet","$.Set"],"java.util.HashSet",["java.util.HashMap"],function(){
12307 c$=Clazz_decorateAsClass(function(){
12308 this.backingMap=null;
12309 Clazz_instantialize(this,arguments);
12310 },java.util,"HashSet",java.util.AbstractSet,[java.util.Set,Cloneable,java.io.Serializable]);
12311
12312
12313 Clazz_makeConstructor(c$,
12314 function(){
12315 this.construct(new java.util.HashMap());
12316 });
12317 Clazz_makeConstructor(c$,
12318 function(capacity){
12319 this.construct(new java.util.HashMap(capacity));
12320 },"~N");
12321 Clazz_makeConstructor(c$,
12322 function(capacity,loadFactor){
12323 this.construct(new java.util.HashMap(capacity,loadFactor));
12324 },"~N,~N");
12325 Clazz_makeConstructor(c$,
12326 function(collection){
12327 this.construct(new java.util.HashMap(collection.size()<6?11:collection.size()*2));
12328 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
12329 this.add(e);
12330 }
12331 },"java.util.Collection");
12332 Clazz_makeConstructor(c$,
12333 function(backingMap){
12334 Clazz_superConstructor(this,java.util.HashSet,[]);
12335 this.backingMap=backingMap;
12336 },"java.util.HashMap");
12337
12338 Clazz_overrideMethod(c$,"add",
12339 function(object){
12340 return this.backingMap.put(object,this)==null;
12341 },"~O");
12342 Clazz_overrideMethod(c$,"clear",
12343 function(){
12344 this.backingMap.clear();
12345 });
12346 Clazz_defineMethod(c$,"clone",
12347 function(){
12348 try{
12349 var clone=this.cloneHM();
12350 clone.backingMap=this.backingMap.clone();
12351 return clone;
12352 }catch(e){
12353 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12354 return null;
12355 }else{
12356 throw e;
12357 }
12358 }
12359 });
12360 Clazz_overrideMethod(c$,"contains",
12361 function(object){
12362 return this.backingMap.containsKey(object);
12363 },"~O");
12364 Clazz_overrideMethod(c$,"isEmpty",
12365 function(){
12366 return this.backingMap.isEmpty();
12367 });
12368 Clazz_defineMethod(c$,"iterator",
12369 function(){
12370 return this.backingMap.keySet().iterator();
12371 });
12372 Clazz_overrideMethod(c$,"remove",
12373 function(object){
12374 return this.backingMap.remove(object)!=null;
12375 },"~O");
12376 Clazz_overrideMethod(c$,"size",
12377 function(){
12378 return this.backingMap.size();
12379 });
12380 Clazz_defineMethod(c$,"createBackingMap",
12381 function(capacity,loadFactor){
12382 return new java.util.HashMap(capacity,loadFactor);
12383 },"~N,~N");
12384 });
12385 Clazz_declarePackage ("jssun.awt");
12386 Clazz_declareInterface (jssun.awt, "ComponentFactory");
12387 Clazz_declarePackage ("jssun.awt");
12388 Clazz_declareInterface (jssun.awt, "WindowClosingListener");
12389 Clazz_declarePackage ("jssun.awt");
12390 Clazz_declareInterface (jssun.awt, "WindowClosingSupport");
12391 Clazz_declarePackage ("java.awt");
12392 Clazz_load (["java.awt.Container", "java.util.ArrayList", "$.Vector", "java.awt.Color"], ["java.awt.Window", "$.FocusManager"], ["java.lang.IllegalArgumentException", "java.util.Arrays", "java.applet.Applet", "java.awt.AWTEventMulticaster", "$.BorderLayout", "$.ComponentOrientation", "$.Cursor", "$.GraphicsEnvironment", "$.Point", "$.Toolkit", "java.awt.event.WindowEvent", "$.WindowFocusListener", "$.WindowListener", "$.WindowStateListener", "java.util.Locale", "$.ResourceBundle", "javax.swing.JComponent", "$.RootPaneContainer", "jssun.awt.AppContext", "swingjs.JSToolkit"], function () {
12393 c$ = Clazz_decorateAsClass (function () {
12394 this.warningString = null;
12395 this.icons = null;
12396 this.temporaryLostComponent = null;
12397 this.syncLWRequests = false;
12398 this.beforeFirstShow = true;
12399 this.state = 0;
12400 this.alwaysOnTop = false;
12401 this.ownedWindowList = null;
12402 this.showWithParent = false;
12403 this.modalBlocker = null;
12404 this.modalExclusionType = null;
12405 this.windowListener = null;
12406 this.windowStateListener = null;
12407 this.windowFocusListener = null;
12408 this.focusableWindowState = true;
12409 this.isInShow = false;
12410 this.opacity = 1.0;
12411 this.shape = null;
12412 this.isTrayIconWindow = false;
12413 this.opaque = true;
12414 Clazz_instantialize (this, arguments);
12415 }, java.awt, "Window", java.awt.Container);
12416 Clazz_prepareFields (c$, function () {
12417 this.ownedWindowList =  new java.util.Vector ();
12418 });
12419 Clazz_makeConstructor (c$, 
12420 function (gc) {
12421 Clazz_superConstructor (this, java.awt.Window, []);
12422 this.init (gc);
12423 }, "java.awt.GraphicsConfiguration");
12424 Clazz_defineMethod (c$, "init", 
12425  function (gc) {
12426 this.syncLWRequests = java.awt.Window.systemSyncLWRequests;
12427 this.addToWindowList ();
12428 this.cursor = java.awt.Cursor.getPredefinedCursor (0);
12429 this.visible = false;
12430 this.setLayout ( new java.awt.BorderLayout ());
12431 this.modalExclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12432 }, "java.awt.GraphicsConfiguration");
12433 Clazz_makeConstructor (c$, 
12434 function () {
12435 Clazz_superConstructor (this, java.awt.Window, []);
12436 this.init (null);
12437 });
12438 Clazz_makeConstructor (c$, 
12439 function (owner) {
12440 Clazz_superConstructor (this, java.awt.Window, []);
12441 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12442 this.ownedInit (owner);
12443 }, "java.awt.Frame");
12444 Clazz_makeConstructor (c$, 
12445 function (owner) {
12446 Clazz_superConstructor (this, java.awt.Window, []);
12447 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12448 this.ownedInit (owner);
12449 }, "java.awt.Window");
12450 Clazz_makeConstructor (c$, 
12451 function (owner, gc) {
12452 this.construct (gc);
12453 this.ownedInit (owner);
12454 }, "java.awt.Window,java.awt.GraphicsConfiguration");
12455 Clazz_defineMethod (c$, "ownedInit", 
12456  function (owner) {
12457 this.parent = owner;
12458 if (owner != null) {
12459 owner.addOwnedWindow (this);
12460 }}, "java.awt.Window");
12461 Clazz_overrideMethod (c$, "constructComponentName", 
12462 function () {
12463 {
12464 return "win" + java.awt.Window.nameCounter++;
12465 }});
12466 Clazz_defineMethod (c$, "getIconImages", 
12467 function () {
12468 var icons = this.icons;
12469 if (icons == null || icons.size () == 0) {
12470 return  new java.util.ArrayList ();
12471 }return  new java.util.ArrayList (icons);
12472 });
12473 Clazz_defineMethod (c$, "setIconImages", 
12474 function (icons) {
12475 this.icons = (icons == null) ?  new java.util.ArrayList () :  new java.util.ArrayList (icons);
12476 this.firePropertyChangeObject ("iconImage", null, null);
12477 }, "java.util.List");
12478 Clazz_defineMethod (c$, "setIconImage", 
12479 function (image) {
12480 var imageList =  new java.util.ArrayList ();
12481 if (image != null) {
12482 imageList.add (image);
12483 }this.setIconImages (imageList);
12484 }, "java.awt.Image");
12485 Clazz_defineMethod (c$, "addNotify", 
12486 function () {
12487 var parent = this.parent;
12488 if (parent != null && parent.getPeer () == null) {
12489 parent.addNotify ();
12490 }if (this.peer == null) {
12491 this.peer = this.getToolkit ().createWindow (this);
12492 }{
12493 java.awt.Window.allWindows.add (this);
12494 }Clazz_superCall (this, java.awt.Window, "addNotify", []);
12495 });
12496 Clazz_defineMethod (c$, "removeNotify", 
12497 function () {
12498 {
12499 java.awt.Window.allWindows.remove (this);
12500 }Clazz_superCall (this, java.awt.Window, "removeNotify", []);
12501 });
12502 Clazz_defineMethod (c$, "pack", 
12503 function () {
12504 var parent = this.parent;
12505 if (parent != null && parent.getPeer () == null) {
12506 parent.addNotify ();
12507 }if (this.peer == null) {
12508 this.addNotify ();
12509 }var newSize = this.getPreferredSize ();
12510 if (this.peer != null) {
12511 this.setClientSize (newSize.width, newSize.height);
12512 }if (this.beforeFirstShow) {
12513 this.isPacked = true;
12514 }this.validate ();
12515 });
12516 Clazz_defineMethod (c$, "setMinimumSize", 
12517 function (minimumSize) {
12518 {
12519 Clazz_superCall (this, java.awt.Window, "setMinimumSize", [minimumSize]);
12520 var size = this.getSize ();
12521 if (this.isMinimumSizeSet ()) {
12522 if (size.width < minimumSize.width || size.height < minimumSize.height) {
12523 var nw = Math.max (this.width, minimumSize.width);
12524 var nh = Math.max (this.height, minimumSize.height);
12525 this.setSize (nw, nh);
12526 }}}}, "java.awt.Dimension");
12527 Clazz_defineMethod (c$, "reshape", 
12528 function (x, y, width, height) {
12529 if (this.isMinimumSizeSet ()) {
12530 var minSize = this.getMinimumSize ();
12531 if (width < minSize.width) {
12532 width = minSize.width;
12533 }if (height < minSize.height) {
12534 height = minSize.height;
12535 }}Clazz_superCall (this, java.awt.Window, "reshape", [x, y, width, height]);
12536 }, "~N,~N,~N,~N");
12537 Clazz_defineMethod (c$, "setClientSize", 
12538 function (w, h) {
12539 {
12540 this.setBounds (this.x, this.y, w, h);
12541 }}, "~N,~N");
12542 c$.closeSplashScreen = Clazz_defineMethod (c$, "closeSplashScreen", 
12543 function () {
12544 });
12545 Clazz_defineMethod (c$, "show", 
12546 function () {
12547 this.validate ();
12548 this.isInShow = true;
12549 if (this.visible) {
12550 this.toFront ();
12551 } else {
12552 this.beforeFirstShow = false;
12553 java.awt.Window.closeSplashScreen ();
12554 Clazz_superCall (this, java.awt.Window, "show", []);
12555 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12556 var child = this.ownedWindowList.elementAt (i);
12557 if ((child != null) && child.showWithParent) {
12558 child.show ();
12559 child.showWithParent = false;
12560 }}
12561 if (!this.isModalBlocked ()) {
12562 this.updateChildrenBlocking ();
12563 } else {
12564 this.modalBlocker.toFront_NoClientCode ();
12565 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12566 java.awt.Window.updateChildFocusableWindowState (this);
12567 }}this.isInShow = false;
12568 if ((this.state & 1) == 0) {
12569 this.postWindowEvent (200);
12570 this.state |= 1;
12571 }});
12572 c$.updateChildFocusableWindowState = Clazz_defineMethod (c$, "updateChildFocusableWindowState", 
12573 function (w) {
12574 for (var i = 0; i < w.ownedWindowList.size (); i++) {
12575 var child = w.ownedWindowList.elementAt (i);
12576 if (child != null) {
12577 java.awt.Window.updateChildFocusableWindowState (child);
12578 }}
12579 }, "java.awt.Window");
12580 Clazz_defineMethod (c$, "postWindowEvent", 
12581 function (id) {
12582 if (this.windowListener != null || (this.eventMask & 64) != 0 || java.awt.Toolkit.enabledOnToolkit (64)) {
12583 var e =  new java.awt.event.WindowEvent (this, id);
12584 java.awt.Toolkit.getEventQueue ().postEvent (e);
12585 }}, "~N");
12586 Clazz_defineMethod (c$, "hide", 
12587 function () {
12588 {
12589 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12590 var child = this.ownedWindowList.elementAt (i);
12591 if ((child != null) && child.visible) {
12592 child.hide ();
12593 child.showWithParent = true;
12594 }}
12595 }Clazz_superCall (this, java.awt.Window, "hide", []);
12596 });
12597 Clazz_overrideMethod (c$, "clearMostRecentFocusOwnerOnHide", 
12598 function () {
12599 });
12600 Clazz_defineMethod (c$, "dispose", 
12601 function () {
12602 this.doDispose ();
12603 });
12604 Clazz_defineMethod (c$, "disposeImpl", 
12605 function () {
12606 this.dispose ();
12607 });
12608 Clazz_defineMethod (c$, "doDispose", 
12609 function () {
12610 if (!Clazz_isClassDefined ("java.awt.Window$1DisposeAction")) {
12611 java.awt.Window.$Window$1DisposeAction$ ();
12612 }
12613 var action = Clazz_innerTypeInstance (java.awt.Window$1DisposeAction, this, null);
12614 action.run ();
12615 this.postWindowEvent (202);
12616 });
12617 Clazz_overrideMethod (c$, "adjustListeningChildrenOnParent", 
12618 function (mask, num) {
12619 }, "~N,~N");
12620 Clazz_overrideMethod (c$, "adjustDecendantsOnParent", 
12621 function (num) {
12622 }, "~N");
12623 Clazz_defineMethod (c$, "toFront", 
12624 function () {
12625 this.toFront_NoClientCode ();
12626 });
12627 Clazz_defineMethod (c$, "toFront_NoClientCode", 
12628 function () {
12629 if (this.visible) {
12630 }});
12631 Clazz_defineMethod (c$, "toBack", 
12632 function () {
12633 this.toBack_NoClientCode ();
12634 });
12635 Clazz_defineMethod (c$, "toBack_NoClientCode", 
12636 function () {
12637 if (this.isAlwaysOnTop ()) {
12638 try {
12639 this.setAlwaysOnTop (false);
12640 } catch (e) {
12641 if (Clazz_exceptionOf (e, SecurityException)) {
12642 } else {
12643 throw e;
12644 }
12645 }
12646 }if (this.visible) {
12647 }});
12648 Clazz_overrideMethod (c$, "getToolkit", 
12649 function () {
12650 return java.awt.Toolkit.getDefaultToolkit ();
12651 });
12652 Clazz_defineMethod (c$, "getWarningString", 
12653 function () {
12654 return this.warningString;
12655 });
12656 Clazz_overrideMethod (c$, "getLocale", 
12657 function () {
12658 if (this.locale == null) {
12659 return java.util.Locale.getDefault ();
12660 }return this.locale;
12661 });
12662 Clazz_defineMethod (c$, "setCursor", 
12663 function (cursor) {
12664 if (cursor == null) {
12665 cursor = java.awt.Cursor.getPredefinedCursor (0);
12666 }Clazz_superCall (this, java.awt.Window, "setCursor", [cursor]);
12667 }, "java.awt.Cursor");
12668 Clazz_defineMethod (c$, "getOwner", 
12669 function () {
12670 return this.getOwner_NoClientCode ();
12671 });
12672 Clazz_defineMethod (c$, "getOwner_NoClientCode", 
12673 function () {
12674 return this.parent;
12675 });
12676 Clazz_defineMethod (c$, "getOwnedWindows", 
12677 function () {
12678 return this.getOwnedWindows_NoClientCode ();
12679 });
12680 Clazz_defineMethod (c$, "getOwnedWindows_NoClientCode", 
12681 function () {
12682 var realCopy;
12683 {
12684 var fullSize = this.ownedWindowList.size ();
12685 var realSize = 0;
12686 var fullCopy =  new Array (fullSize);
12687 for (var i = 0; i < fullSize; i++) {
12688 fullCopy[realSize] = this.ownedWindowList.elementAt (i);
12689 if (fullCopy[realSize] != null) {
12690 realSize++;
12691 }}
12692 if (fullSize != realSize) {
12693 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12694 } else {
12695 realCopy = fullCopy;
12696 }}return realCopy;
12697 });
12698 Clazz_defineMethod (c$, "isModalBlocked", 
12699 function () {
12700 return this.modalBlocker != null;
12701 });
12702 Clazz_defineMethod (c$, "setModalBlocked", 
12703 function (blocker, blocked, peerCall) {
12704 }, "java.awt.Dialog,~B,~B");
12705 Clazz_defineMethod (c$, "getModalBlocker", 
12706 function () {
12707 return this.modalBlocker;
12708 });
12709 c$.getAllWindows = Clazz_defineMethod (c$, "getAllWindows", 
12710 function () {
12711 {
12712 var v =  new java.util.ArrayList ();
12713 v.addAll (java.awt.Window.allWindows);
12714 return v;
12715 }});
12716 c$.getAllUnblockedWindows = Clazz_defineMethod (c$, "getAllUnblockedWindows", 
12717 function () {
12718 {
12719 var unblocked =  new java.util.ArrayList ();
12720 for (var i = 0; i < java.awt.Window.allWindows.size (); i++) {
12721 var w = java.awt.Window.allWindows.get (i);
12722 if (!w.isModalBlocked ()) {
12723 unblocked.add (w);
12724 }}
12725 return unblocked;
12726 }});
12727 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12728  function (appContext) {
12729 {
12730 var realCopy;
12731 var windowList = appContext.get (java.awt.Window);
12732 if (windowList != null) {
12733 var fullSize = windowList.size ();
12734 var realSize = 0;
12735 var fullCopy =  new Array (fullSize);
12736 for (var i = 0; i < fullSize; i++) {
12737 var w = windowList.get (i);
12738 if (w != null) {
12739 fullCopy[realSize++] = w;
12740 }}
12741 if (fullSize != realSize) {
12742 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12743 } else {
12744 realCopy = fullCopy;
12745 }} else {
12746 realCopy =  new Array (0);
12747 }return realCopy;
12748 }}, "jssun.awt.AppContext");
12749 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12750 function () {
12751 return java.awt.Window.getWindows (jssun.awt.AppContext.getAppContext ());
12752 });
12753 c$.getOwnerlessWindows = Clazz_defineMethod (c$, "getOwnerlessWindows", 
12754 function () {
12755 var allWindows = java.awt.Window.getWindows ();
12756 var ownerlessCount = 0;
12757 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12758 if (w.getOwner () == null) {
12759 ownerlessCount++;
12760 }}
12761 var ownerless =  new Array (ownerlessCount);
12762 var c = 0;
12763 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12764 if (w.getOwner () == null) {
12765 ownerless[c++] = w;
12766 }}
12767 return ownerless;
12768 });
12769 Clazz_defineMethod (c$, "getDocumentRoot", 
12770 function () {
12771 {
12772 var w = this;
12773 while (w.getOwner () != null) {
12774 w = w.getOwner ();
12775 }
12776 return w;
12777 }});
12778 Clazz_defineMethod (c$, "setModalExclusionType", 
12779 function (exclusionType) {
12780 if (exclusionType == null) {
12781 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12782 }if (!java.awt.Toolkit.getDefaultToolkit ().isModalExclusionTypeSupported (exclusionType)) {
12783 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12784 }if (this.modalExclusionType === exclusionType) {
12785 return;
12786 }this.modalExclusionType = exclusionType;
12787 }, "java.awt.Dialog.ModalExclusionType");
12788 Clazz_defineMethod (c$, "getModalExclusionType", 
12789 function () {
12790 return this.modalExclusionType;
12791 });
12792 Clazz_defineMethod (c$, "isModalExcluded", 
12793 function (exclusionType) {
12794 if ((this.modalExclusionType != null) && this.modalExclusionType.compareTo (exclusionType) >= 0) {
12795 return true;
12796 }var owner = this.getOwner_NoClientCode ();
12797 return (owner != null) && owner.isModalExcluded (exclusionType);
12798 }, "java.awt.Dialog.ModalExclusionType");
12799 Clazz_defineMethod (c$, "updateChildrenBlocking", 
12800 function () {
12801 });
12802 Clazz_defineMethod (c$, "addWindowListener", 
12803 function (l) {
12804 if (l == null) {
12805 return;
12806 }this.newEventsOnly = true;
12807 this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l);
12808 }, "java.awt.event.WindowListener");
12809 Clazz_defineMethod (c$, "addWindowStateListener", 
12810 function (l) {
12811 if (l == null) {
12812 return;
12813 }this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l);
12814 this.newEventsOnly = true;
12815 }, "java.awt.event.WindowStateListener");
12816 Clazz_defineMethod (c$, "addWindowFocusListener", 
12817 function (l) {
12818 if (l == null) {
12819 return;
12820 }this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l);
12821 this.newEventsOnly = true;
12822 }, "java.awt.event.WindowFocusListener");
12823 Clazz_defineMethod (c$, "removeWindowListener", 
12824 function (l) {
12825 if (l == null) {
12826 return;
12827 }this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l);
12828 }, "java.awt.event.WindowListener");
12829 Clazz_defineMethod (c$, "removeWindowStateListener", 
12830 function (l) {
12831 if (l == null) {
12832 return;
12833 }this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l);
12834 }, "java.awt.event.WindowStateListener");
12835 Clazz_defineMethod (c$, "removeWindowFocusListener", 
12836 function (l) {
12837 if (l == null) {
12838 return;
12839 }this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l);
12840 }, "java.awt.event.WindowFocusListener");
12841 Clazz_defineMethod (c$, "getWindowListeners", 
12842 function () {
12843 return (this.getListeners (java.awt.event.WindowListener));
12844 });
12845 Clazz_defineMethod (c$, "getWindowFocusListeners", 
12846 function () {
12847 return (this.getListeners (java.awt.event.WindowFocusListener));
12848 });
12849 Clazz_defineMethod (c$, "getWindowStateListeners", 
12850 function () {
12851 return (this.getListeners (java.awt.event.WindowStateListener));
12852 });
12853 Clazz_defineMethod (c$, "getListeners", 
12854 function (listenerType) {
12855 var l = null;
12856 if (listenerType === java.awt.event.WindowFocusListener) {
12857 l = this.windowFocusListener;
12858 } else if (listenerType === java.awt.event.WindowStateListener) {
12859 l = this.windowStateListener;
12860 } else if (listenerType === java.awt.event.WindowListener) {
12861 l = this.windowListener;
12862 } else {
12863 return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]);
12864 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
12865 }, "Class");
12866 Clazz_defineMethod (c$, "eventEnabled", 
12867 function (e) {
12868 switch (e.id) {
12869 case 200:
12870 case 201:
12871 case 202:
12872 case 203:
12873 case 204:
12874 case 205:
12875 case 206:
12876 if ((this.eventMask & 64) != 0 || this.windowListener != null) {
12877 return true;
12878 }return false;
12879 case 207:
12880 case 208:
12881 if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) {
12882 return true;
12883 }return false;
12884 case 209:
12885 if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) {
12886 return true;
12887 }return false;
12888 default:
12889 break;
12890 }
12891 return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]);
12892 }, "java.awt.AWTEvent");
12893 Clazz_overrideMethod (c$, "processEvent", 
12894 function (e) {
12895 if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) {
12896 switch (e.getID ()) {
12897 case 200:
12898 case 201:
12899 case 202:
12900 case 203:
12901 case 204:
12902 case 205:
12903 case 206:
12904 this.processWindowEvent (e);
12905 break;
12906 case 207:
12907 case 208:
12908 this.processWindowFocusEvent (e);
12909 break;
12910 case 209:
12911 this.processWindowStateEvent (e);
12912 default:
12913 break;
12914 }
12915 return;
12916 }this.processEventCont (e);
12917 }, "java.awt.AWTEvent");
12918 Clazz_defineMethod (c$, "processWindowEvent", 
12919 function (e) {
12920 var listener = this.windowListener;
12921 if (listener != null) {
12922 switch (e.getID ()) {
12923 case 200:
12924 listener.windowOpened (e);
12925 break;
12926 case 201:
12927 listener.windowClosing (e);
12928 break;
12929 case 202:
12930 listener.windowClosed (e);
12931 break;
12932 case 203:
12933 listener.windowIconified (e);
12934 break;
12935 case 204:
12936 listener.windowDeiconified (e);
12937 break;
12938 case 205:
12939 listener.windowActivated (e);
12940 break;
12941 case 206:
12942 listener.windowDeactivated (e);
12943 break;
12944 default:
12945 break;
12946 }
12947 }}, "java.awt.event.WindowEvent");
12948 Clazz_defineMethod (c$, "processWindowFocusEvent", 
12949 function (e) {
12950 var listener = this.windowFocusListener;
12951 if (listener != null) {
12952 switch (e.getID ()) {
12953 case 207:
12954 listener.windowGainedFocus (e);
12955 break;
12956 case 208:
12957 listener.windowLostFocus (e);
12958 break;
12959 default:
12960 break;
12961 }
12962 }}, "java.awt.event.WindowEvent");
12963 Clazz_defineMethod (c$, "processWindowStateEvent", 
12964 function (e) {
12965 var listener = this.windowStateListener;
12966 if (listener != null) {
12967 switch (e.getID ()) {
12968 case 209:
12969 listener.windowStateChanged (e);
12970 break;
12971 default:
12972 break;
12973 }
12974 }}, "java.awt.event.WindowEvent");
12975 Clazz_overrideMethod (c$, "preProcessKeyEvent", 
12976 function (e) {
12977 }, "java.awt.event.KeyEvent");
12978 Clazz_overrideMethod (c$, "postProcessKeyEvent", 
12979 function (e) {
12980 }, "java.awt.event.KeyEvent");
12981 Clazz_defineMethod (c$, "setAlwaysOnTop", 
12982 function (alwaysOnTop) {
12983 var oldAlwaysOnTop;
12984 {
12985 oldAlwaysOnTop = this.alwaysOnTop;
12986 this.alwaysOnTop = alwaysOnTop;
12987 }if (oldAlwaysOnTop != alwaysOnTop) {
12988 if (this.isAlwaysOnTopSupported ()) {
12989 }this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
12990 }}, "~B");
12991 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
12992 function () {
12993 return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported ();
12994 });
12995 Clazz_defineMethod (c$, "isAlwaysOnTop", 
12996 function () {
12997 return this.alwaysOnTop;
12998 });
12999 Clazz_defineMethod (c$, "isActive", 
13000 function () {
13001 return false;
13002 });
13003 Clazz_defineMethod (c$, "isFocused", 
13004 function () {
13005 return swingjs.JSToolkit.isFocused (this);
13006 });
13007 Clazz_overrideMethod (c$, "getFocusTraversalKeys", 
13008 function (id) {
13009 return null;
13010 }, "~N");
13011 Clazz_defineMethod (c$, "setFocusCycleRoot", 
13012 function (focusCycleRoot) {
13013 }, "~B");
13014 Clazz_defineMethod (c$, "isFocusCycleRoot", 
13015 function () {
13016 return true;
13017 });
13018 Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", 
13019 function () {
13020 return null;
13021 });
13022 Clazz_defineMethod (c$, "isFocusableWindow", 
13023 function () {
13024 if (!this.getFocusableWindowState ()) {
13025 return false;
13026 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
13027 return true;
13028 }for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
13029 if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) {
13030 return owner.isShowing ();
13031 }}
13032 return false;
13033 });
13034 Clazz_defineMethod (c$, "getFocusableWindowState", 
13035 function () {
13036 return this.focusableWindowState;
13037 });
13038 Clazz_defineMethod (c$, "setFocusableWindowState", 
13039 function (focusableWindowState) {
13040 var oldFocusableWindowState;
13041 {
13042 oldFocusableWindowState = this.focusableWindowState;
13043 this.focusableWindowState = focusableWindowState;
13044 }this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState);
13045 if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) {
13046 for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
13047 }
13048 }}, "~B");
13049 Clazz_defineMethod (c$, "dispatchEventImpl", 
13050 function (e) {
13051 if (e.getID () == 101) {
13052 this.invalidate ();
13053 this.validate ();
13054 }Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]);
13055 }, "java.awt.AWTEvent");
13056 Clazz_overrideMethod (c$, "postEvent", 
13057 function (e) {
13058 if (this.handleEvent (e)) {
13059 e.consume ();
13060 return true;
13061 }return false;
13062 }, "java.awt.Event");
13063 Clazz_defineMethod (c$, "isShowing", 
13064 function () {
13065 return this.visible;
13066 });
13067 Clazz_defineMethod (c$, "applyResourceBundle", 
13068 function (rb) {
13069 this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb));
13070 }, "java.util.ResourceBundle");
13071 Clazz_defineMethod (c$, "applyResourceBundle", 
13072 function (rbName) {
13073 this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName));
13074 }, "~S");
13075 Clazz_defineMethod (c$, "addOwnedWindow", 
13076 function (weakWindow) {
13077 if (weakWindow != null) {
13078 {
13079 if (!this.ownedWindowList.contains (weakWindow)) {
13080 this.ownedWindowList.addElement (weakWindow);
13081 }}}}, "java.awt.Window");
13082 Clazz_defineMethod (c$, "removeOwnedWindow", 
13083 function (weakWindow) {
13084 if (weakWindow != null) {
13085 this.ownedWindowList.removeElement (weakWindow);
13086 }}, "java.awt.Window");
13087 Clazz_defineMethod (c$, "connectOwnedWindow", 
13088 function (child) {
13089 child.parent = this;
13090 this.addOwnedWindow (child);
13091 }, "java.awt.Window");
13092 Clazz_defineMethod (c$, "addToWindowList", 
13093  function () {
13094 var windowList = this.appContext.get (java.awt.Window);
13095 if (windowList == null) {
13096 windowList =  new java.util.Vector ();
13097 this.appContext.put (java.awt.Window, windowList);
13098 }windowList.add (this);
13099 });
13100 c$.removeFromWindowList = Clazz_defineMethod (c$, "removeFromWindowList", 
13101  function (context, w) {
13102 {
13103 var windowList = context.get (java.awt.Window);
13104 if (windowList != null) {
13105 windowList.remove (w);
13106 }}}, "jssun.awt.AppContext,java.awt.Window");
13107 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
13108 function () {
13109 if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration ();
13110 return this.graphicsConfig;
13111 });
13112 Clazz_overrideMethod (c$, "resetGC", 
13113 function () {
13114 });
13115 Clazz_defineMethod (c$, "setLocationRelativeTo", 
13116 function (c) {
13117 var root = null;
13118 if (c != null) {
13119 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) {
13120 root = c;
13121 } else {
13122 var parent;
13123 for (parent = c.getParent (); parent != null; parent = parent.getParent ()) {
13124 if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
13125 root = parent;
13126 break;
13127 }}
13128 }}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) {
13129 var paneSize = this.getSize ();
13130 var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint ();
13131 this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2));
13132 } else {
13133 var invokerSize = c.getSize ();
13134 var invokerScreenLocation = c.getLocationOnScreen ();
13135 var windowBounds = this.getBounds ();
13136 var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1);
13137 var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1);
13138 var ss = root.getGraphicsConfiguration ().getBounds ();
13139 if (dy + windowBounds.height > ss.y + ss.height) {
13140 dy = ss.y + ss.height - windowBounds.height;
13141 if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) {
13142 dx = invokerScreenLocation.x + invokerSize.width;
13143 } else {
13144 dx = invokerScreenLocation.x - windowBounds.width;
13145 }}if (dx + windowBounds.width > ss.x + ss.width) {
13146 dx = ss.x + ss.width - windowBounds.width;
13147 }if (dx < ss.x) dx = ss.x;
13148 if (dy < ss.y) dy = ss.y;
13149 this.setLocation (dx, dy);
13150 }}, "java.awt.Component");
13151 Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", 
13152 function (e) {
13153 }, "java.awt.event.MouseWheelEvent");
13154 Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", 
13155 function (e) {
13156 return false;
13157 }, "java.awt.event.MouseWheelEvent");
13158 Clazz_defineMethod (c$, "getTemporaryLostComponent", 
13159 function () {
13160 return this.temporaryLostComponent;
13161 });
13162 Clazz_defineMethod (c$, "setTemporaryLostComponent", 
13163 function (component) {
13164 var previousComp = this.temporaryLostComponent;
13165 if (component == null || component.canBeFocusOwner ()) {
13166 this.temporaryLostComponent = component;
13167 } else {
13168 this.temporaryLostComponent = null;
13169 }return previousComp;
13170 }, "java.awt.Component");
13171 Clazz_defineMethod (c$, "canContainFocusOwner", 
13172 function (focusOwnerCandidate) {
13173 return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow ();
13174 }, "java.awt.Component");
13175 Clazz_defineMethod (c$, "setBounds", 
13176 function (r) {
13177 this.setBounds (r.x, r.y, r.width, r.height);
13178 }, "java.awt.Rectangle");
13179 Clazz_overrideMethod (c$, "isRecursivelyVisible", 
13180 function () {
13181 return this.visible;
13182 });
13183 Clazz_defineMethod (c$, "getOpacity", 
13184 function () {
13185 {
13186 return this.opacity;
13187 }});
13188 Clazz_defineMethod (c$, "setOpacity", 
13189 function (opacity) {
13190 {
13191 if (opacity < 0.0 || opacity > 1.0) {
13192 throw  new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f].");
13193 }this.opacity = opacity;
13194 }}, "~N");
13195 Clazz_defineMethod (c$, "getShape", 
13196 function () {
13197 {
13198 return this.shape;
13199 }});
13200 Clazz_defineMethod (c$, "setShape", 
13201 function (shape) {
13202 {
13203 this.shape = shape;
13204 }}, "java.awt.Shape");
13205 Clazz_defineMethod (c$, "setOpaque", 
13206 function (opaque) {
13207 {
13208 java.awt.Window.setLayersOpaque (this, opaque);
13209 this.opaque = opaque;
13210 var peer = this.getPeer ();
13211 if (peer != null) {
13212 peer.setOpaque (opaque);
13213 }}}, "~B");
13214 c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", 
13215  function (component, isOpaque) {
13216 if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) {
13217 var rpc = component;
13218 var root = rpc.getRootPane ();
13219 var lp = root.getLayeredPane ();
13220 var c = root.getContentPane ();
13221 var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
13222 lp.setOpaque (isOpaque);
13223 root.setOpaque (isOpaque);
13224 root.setDoubleBuffered (isOpaque);
13225 if (content != null) {
13226 content.setOpaque (isOpaque);
13227 content.setDoubleBuffered (isOpaque);
13228 var numChildren = content.getComponentCount ();
13229 if (numChildren > 0) {
13230 var child = content.getComponent (0);
13231 if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) {
13232 java.awt.Window.setLayersOpaque (child, isOpaque);
13233 }}}}var bg = component.getBackground ();
13234 var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg);
13235 var container = null;
13236 if (Clazz_instanceOf (component, java.awt.Container)) {
13237 container = component;
13238 }if (isOpaque) {
13239 if (hasTransparentBg) {
13240 var newColor = null;
13241 if (container != null && container.preserveBackgroundColor != null) {
13242 newColor = container.preserveBackgroundColor;
13243 } else {
13244 newColor =  new java.awt.Color (255, 255, 255);
13245 }component.setBackground (newColor);
13246 }} else {
13247 if (!hasTransparentBg && container != null) {
13248 container.preserveBackgroundColor = bg;
13249 }component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR);
13250 }}, "java.awt.Component,~B");
13251 Clazz_overrideMethod (c$, "getContainer", 
13252 function () {
13253 return null;
13254 });
13255 Clazz_overrideMethod (c$, "mixOnReshaping", 
13256 function () {
13257 });
13258 Clazz_overrideMethod (c$, "getLocationOnWindow", 
13259 function () {
13260 return  new java.awt.Point (0, 0);
13261 });
13262 c$.$Window$1DisposeAction$ = function () {
13263 Clazz_pu$h(self.c$);
13264 c$ = Clazz_decorateAsClass (function () {
13265 Clazz_prepareCallback (this, arguments);
13266 Clazz_instantialize (this, arguments);
13267 }, java.awt, "Window$1DisposeAction", null, Runnable);
13268 Clazz_overrideMethod (c$, "run", 
13269 function () {
13270 var a;
13271 {
13272 a =  new Array (this.b$["java.awt.Window"].ownedWindowList.size ());
13273 this.b$["java.awt.Window"].ownedWindowList.copyInto (a);
13274 }for (var b = 0; b < a.length; b++) {
13275 var c = (((a[b])));
13276 if (c != null) {
13277 c.disposeImpl ();
13278 }}
13279 this.b$["java.awt.Window"].hide ();
13280 this.b$["java.awt.Window"].beforeFirstShow = true;
13281 this.b$["java.awt.Window"].removeNotify ();
13282 this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide ();
13283 });
13284 c$ = Clazz_p0p ();
13285 };
13286 Clazz_defineStatics (c$,
13287 "systemSyncLWRequests", false,
13288 "OPENED", 0x01,
13289 "base", "win",
13290 "nameCounter", 0);
13291 c$.allWindows = c$.prototype.allWindows =  new java.util.ArrayList ();
13292 c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR =  new java.awt.Color (0, 0, 0, 0);
13293 c$ = Clazz_decorateAsClass (function () {
13294 this.focusRoot = null;
13295 this.focusOwner = null;
13296 Clazz_instantialize (this, arguments);
13297 }, java.awt, "FocusManager");
13298 });
13299 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.Vector",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringBuffer","java.lang.reflect.Array","java.util.Arrays","$.Collections","$.Enumeration","$.NoSuchElementException"],function(){
13300 c$=Clazz_decorateAsClass(function(){
13301 this.elementCount=0;
13302 this.elementData=null;
13303 this.capacityIncrement=0;
13304 Clazz_instantialize(this,arguments);
13305 },java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);
13306 Clazz_makeConstructor(c$,
13307 function(){
13308 this.construct(10,0);
13309 });
13310 Clazz_makeConstructor(c$,
13311 function(capacity){
13312 this.construct(capacity,0);
13313 },"~N");
13314 Clazz_makeConstructor(c$,
13315 function(capacity,capacityIncrement){
13316 Clazz_superConstructor(this,java.util.Vector,[]);
13317 this.elementCount=0;
13318 try{
13319 this.elementData=this.newElementArray(capacity);
13320 }catch(e){
13321 if(Clazz_instanceOf(e,NegativeArraySizeException)){
13322 throw new IllegalArgumentException();
13323 }else{
13324 throw e;
13325 }
13326 }
13327 this.capacityIncrement=capacityIncrement;
13328 },"~N,~N");
13329 Clazz_makeConstructor(c$,
13330 function(collection){
13331 this.construct(collection.size(),0);
13332 var it=collection.iterator();
13333 while(it.hasNext()){
13334 this.elementData[this.elementCount++]=it.next();
13335 }
13336 },"java.util.Collection");
13337 Clazz_defineMethod(c$,"newElementArray",
13338 ($fz=function(size){
13339 return new Array(size);
13340 },$fz.isPrivate=true,$fz),"~N");
13341 Clazz_defineMethod(c$,"add",
13342 function(location,object){
13343 this.insertElementAt(object,location);
13344 },"~N,~O");
13345 Clazz_defineMethod(c$,"add",
13346 function(object){
13347 this.addElement(object);
13348 return true;
13349 },"~O");
13350 Clazz_defineMethod(c$,"addAll",
13351 function(location,collection){
13352 if(0<=location&&location<=this.elementCount){
13353 var size=collection.size();
13354 if(size==0){
13355 return false;
13356 }var required=size-(this.elementData.length-this.elementCount);
13357 if(required>0){
13358 this.growBy(required);
13359 }var count=this.elementCount-location;
13360 if(count>0){
13361 System.arraycopy(this.elementData,location,this.elementData,location+size,count);
13362 }var it=collection.iterator();
13363 while(it.hasNext()){
13364 this.elementData[location++]=it.next();
13365 }
13366 this.elementCount+=size;
13367 this.modCount++;
13368 return true;
13369 }throw new ArrayIndexOutOfBoundsException(location);
13370 },"~N,java.util.Collection");
13371 Clazz_defineMethod(c$,"addAll",
13372 function(collection){
13373 return this.addAll(this.elementCount,collection);
13374 },"java.util.Collection");
13375 Clazz_defineMethod(c$,"addElement",
13376 function(object){
13377 if(this.elementCount==this.elementData.length){
13378 this.growByOne();
13379 }this.elementData[this.elementCount++]=object;
13380 this.modCount++;
13381 },"~O");
13382 Clazz_defineMethod(c$,"capacity",
13383 function(){
13384 return this.elementData.length;
13385 });
13386 Clazz_overrideMethod(c$,"clear",
13387 function(){
13388 this.removeAllElements();
13389 });
13390 Clazz_defineMethod(c$,"clone",
13391 function(){
13392 try{
13393 var vector=Clazz_superCall(this,java.util.Vector,"clone",[]);
13394 vector.elementData=this.elementData.clone();
13395 return vector;
13396 }catch(e){
13397 if(Clazz_instanceOf(e,CloneNotSupportedException)){
13398 return null;
13399 }else{
13400 throw e;
13401 }
13402 }
13403 });
13404 Clazz_overrideMethod(c$,"contains",
13405 function(object){
13406 return this.indexOf(object,0)!=-1;
13407 },"~O");
13408 Clazz_defineMethod(c$,"copyInto",
13409 function(elements){
13410 System.arraycopy(this.elementData,0,elements,0,this.elementCount);
13411 },"~A");
13412 Clazz_defineMethod(c$,"elementAt",
13413 function(location){
13414 if(location<this.elementCount){
13415 return this.elementData[location];
13416 }throw new ArrayIndexOutOfBoundsException(location);
13417 },"~N");
13418 Clazz_defineMethod(c$,"elements",
13419 function(){
13420 return((Clazz_isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz_innerTypeInstance(java.util.Vector$1,this,null));
13421 });
13422 Clazz_defineMethod(c$,"ensureCapacity",
13423 function(minimumCapacity){
13424 if(this.elementData.length<minimumCapacity){
13425 var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;
13426 this.grow(minimumCapacity>next?minimumCapacity:next);
13427 }},"~N");
13428 Clazz_overrideMethod(c$,"equals",
13429 function(object){
13430 if(this===object){
13431 return true;
13432 }if(Clazz_instanceOf(object,java.util.List)){
13433 var list=object;
13434 if(list.size()!=this.size()){
13435 return false;
13436 }var index=0;
13437 var it=list.iterator();
13438 while(it.hasNext()){
13439 var e1=this.elementData[index++];
13440 var e2=it.next();
13441 if(!(e1==null?e2==null:e1.equals(e2))){
13442 return false;
13443 }}
13444 return true;
13445 }return false;
13446 },"~O");
13447 Clazz_defineMethod(c$,"firstElement",
13448 function(){
13449 if(this.elementCount>0){
13450 return this.elementData[0];
13451 }throw new java.util.NoSuchElementException();
13452 });
13453 Clazz_overrideMethod(c$,"get",
13454 function(location){
13455 return this.elementAt(location);
13456 },"~N");
13457 Clazz_defineMethod(c$,"grow",
13458 ($fz=function(newCapacity){
13459 var newData=this.newElementArray(newCapacity);
13460 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13461 this.elementData=newData;
13462 },$fz.isPrivate=true,$fz),"~N");
13463 Clazz_defineMethod(c$,"growByOne",
13464 ($fz=function(){
13465 var adding=0;
13466 if(this.capacityIncrement<=0){
13467 if((adding=this.elementData.length)==0){
13468 adding=1;
13469 }}else{
13470 adding=this.capacityIncrement;
13471 }var newData=this.newElementArray(this.elementData.length+adding);
13472 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13473 this.elementData=newData;
13474 },$fz.isPrivate=true,$fz));
13475 Clazz_defineMethod(c$,"growBy",
13476 ($fz=function(required){
13477 var adding=0;
13478 if(this.capacityIncrement<=0){
13479 if((adding=this.elementData.length)==0){
13480 adding=required;
13481 }while(adding<required){
13482 adding+=adding;
13483 }
13484 }else{
13485 adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;
13486 if(adding<required){
13487 adding+=this.capacityIncrement;
13488 }}var newData=this.newElementArray(this.elementData.length+adding);
13489 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13490 this.elementData=newData;
13491 },$fz.isPrivate=true,$fz),"~N");
13492 Clazz_overrideMethod(c$,"hashCode",
13493 function(){
13494 var result=1;
13495 for(var i=0;i<this.elementCount;i++){
13496 result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());
13497 }
13498 return result;
13499 });
13500 Clazz_defineMethod(c$,"indexOf",
13501 function(object){
13502 return this.indexOf(object,0);
13503 },"~O");
13504 Clazz_defineMethod(c$,"indexOf",
13505 function(object,location){
13506 if(object!=null){
13507 for(var i=location;i<this.elementCount;i++){
13508 if(object.equals(this.elementData[i])){
13509 return i;
13510 }}
13511 }else{
13512 for(var i=location;i<this.elementCount;i++){
13513 if(this.elementData[i]==null){
13514 return i;
13515 }}
13516 }return-1;
13517 },"~O,~N");
13518 Clazz_defineMethod(c$,"insertElementAt",
13519 function(object,location){
13520 if(0<=location&&location<=this.elementCount){
13521 if(this.elementCount==this.elementData.length){
13522 this.growByOne();
13523 }var count=this.elementCount-location;
13524 if(count>0){
13525 System.arraycopy(this.elementData,location,this.elementData,location+1,count);
13526 }this.elementData[location]=object;
13527 this.elementCount++;
13528 this.modCount++;
13529 }else{
13530 throw new ArrayIndexOutOfBoundsException(location);
13531 }},"~O,~N");
13532 Clazz_overrideMethod(c$,"isEmpty",
13533 function(){
13534 return this.elementCount==0;
13535 });
13536 Clazz_defineMethod(c$,"lastElement",
13537 function(){
13538 try{
13539 return this.elementData[this.elementCount-1];
13540 }catch(e){
13541 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
13542 throw new java.util.NoSuchElementException();
13543 }else{
13544 throw e;
13545 }
13546 }
13547 });
13548 Clazz_defineMethod(c$,"lastIndexOf",
13549 function(object){
13550 return this.lastIndexOf(object,this.elementCount-1);
13551 },"~O");
13552 Clazz_defineMethod(c$,"lastIndexOf",
13553 function(object,location){
13554 if(location<this.elementCount){
13555 if(object!=null){
13556 for(var i=location;i>=0;i--){
13557 if(object.equals(this.elementData[i])){
13558 return i;
13559 }}
13560 }else{
13561 for(var i=location;i>=0;i--){
13562 if(this.elementData[i]==null){
13563 return i;
13564 }}
13565 }return-1;
13566 }throw new ArrayIndexOutOfBoundsException(location);
13567 },"~O,~N");
13568 Clazz_defineMethod(c$,"remove",
13569 function(location){
13570 if(location<this.elementCount){
13571 var result=this.elementData[location];
13572 this.elementCount--;
13573 var size=this.elementCount-location;
13574 if(size>0){
13575 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13576 }this.elementData[this.elementCount]=null;
13577 this.modCount++;
13578 return result;
13579 }throw new ArrayIndexOutOfBoundsException(location);
13580 },"~N");
13581 Clazz_defineMethod(c$,"remove",
13582 function(object){
13583 return this.removeElement(object);
13584 },"~O");
13585 Clazz_defineMethod(c$,"removeAllElements",
13586 function(){
13587 java.util.Arrays.fill(this.elementData,0,this.elementCount,null);
13588 this.modCount++;
13589 this.elementCount=0;
13590 });
13591 Clazz_defineMethod(c$,"removeElement",
13592 function(object){
13593 var index;
13594 if((index=this.indexOf(object,0))==-1){
13595 return false;
13596 }this.removeElementAt(index);
13597 return true;
13598 },"~O");
13599 Clazz_defineMethod(c$,"removeElementAt",
13600 function(location){
13601 if(0<=location&&location<this.elementCount){
13602 this.elementCount--;
13603 var size=this.elementCount-location;
13604 if(size>0){
13605 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13606 }this.elementData[this.elementCount]=null;
13607 this.modCount++;
13608 }else{
13609 throw new ArrayIndexOutOfBoundsException(location);
13610 }},"~N");
13611 Clazz_overrideMethod(c$,"removeRange",
13612 function(start,end){
13613 if(start>=0&&start<=end&&end<=this.size()){
13614 if(start==end){
13615 return;
13616 }if(end!=this.elementCount){
13617 System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);
13618 var newCount=this.elementCount-(end-start);
13619 java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);
13620 this.elementCount=newCount;
13621 }else{
13622 java.util.Arrays.fill(this.elementData,start,this.elementCount,null);
13623 this.elementCount=start;
13624 }this.modCount++;
13625 }else{
13626 throw new IndexOutOfBoundsException();
13627 }},"~N,~N");
13628 Clazz_overrideMethod(c$,"set",
13629 function(location,object){
13630 if(location<this.elementCount){
13631 var result=this.elementData[location];
13632 this.elementData[location]=object;
13633 return result;
13634 }throw new ArrayIndexOutOfBoundsException(location);
13635 },"~N,~O");
13636 Clazz_defineMethod(c$,"setElementAt",
13637 function(object,location){
13638 if(location<this.elementCount){
13639 this.elementData[location]=object;
13640 }else{
13641 throw new ArrayIndexOutOfBoundsException(location);
13642 }},"~O,~N");
13643 Clazz_defineMethod(c$,"setSize",
13644 function(length){
13645 if(length==this.elementCount){
13646 return;
13647 }this.ensureCapacity(length);
13648 if(this.elementCount>length){
13649 java.util.Arrays.fill(this.elementData,length,this.elementCount,null);
13650 }this.elementCount=length;
13651 this.modCount++;
13652 },"~N");
13653 Clazz_overrideMethod(c$,"size",
13654 function(){
13655 return this.elementCount;
13656 });
13657 Clazz_overrideMethod(c$,"subList",
13658 function(start,end){
13659 return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this);
13660 },"~N,~N");
13661 Clazz_defineMethod(c$,"toArray",
13662 function(){
13663 var result=new Array(this.elementCount);
13664 System.arraycopy(this.elementData,0,result,0,this.elementCount);
13665 return result;
13666 });
13667 Clazz_defineMethod(c$,"toArray",
13668 function(contents){
13669 if(this.elementCount>contents.length){
13670 var ct=contents.getClass().getComponentType();
13671 contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);
13672 }System.arraycopy(this.elementData,0,contents,0,this.elementCount);
13673 if(this.elementCount<contents.length){
13674 contents[this.elementCount]=null;
13675 }return contents;
13676 },"~A");
13677 Clazz_overrideMethod(c$,"toString",
13678 function(){
13679 if(this.elementCount==0){
13680 return"[]";
13681 }var length=this.elementCount-1;
13682 var buffer=new StringBuffer(this.size()*16);
13683 buffer.append('[');
13684 for(var i=0;i<length;i++){
13685 if(this.elementData[i]===this){
13686 buffer.append("(this Collection)");
13687 }else{
13688 buffer.append(this.elementData[i]);
13689 }buffer.append(", ");
13690 }
13691 if(this.elementData[length]===this){
13692 buffer.append("(this Collection)");
13693 }else{
13694 buffer.append(this.elementData[length]);
13695 }buffer.append(']');
13696 return buffer.toString();
13697 });
13698 Clazz_defineMethod(c$,"trimToSize",
13699 function(){
13700 if(this.elementData.length!=this.elementCount){
13701 this.grow(this.elementCount);
13702 }});
13703 c$.$Vector$1$=function(){
13704 Clazz_pu$h(self.c$);
13705 c$=Clazz_decorateAsClass(function(){
13706 Clazz_prepareCallback(this,arguments);
13707 this.pos=0;
13708 Clazz_instantialize(this,arguments);
13709 },java.util,"Vector$1",null,java.util.Enumeration);
13710 Clazz_overrideMethod(c$,"hasMoreElements",
13711 function(){
13712 return this.pos<this.b$["java.util.Vector"].elementCount;
13713 });
13714 Clazz_overrideMethod(c$,"nextElement",
13715 function(){
13716 {
13717 if(this.pos<this.b$["java.util.Vector"].elementCount){
13718 return this.b$["java.util.Vector"].elementData[this.pos++];
13719 }}throw new java.util.NoSuchElementException();
13720 });
13721 c$=Clazz_p0p();
13722 };
13723 Clazz_defineStatics(c$,
13724 "DEFAULT_SIZE",10);
13725 });
13726 Clazz_declarePackage ("java.awt");
13727 Clazz_load (["java.awt.Paint"], "java.awt.Color", ["java.lang.IllegalArgumentException", "java.awt.ColorPaintContext"], function () {
13728 c$ = Clazz_decorateAsClass (function () {
13729 this.value = 0;
13730 this.frgbvalue = null;
13731 this.falpha = 0.0;
13732 this.context = null;
13733 Clazz_instantialize (this, arguments);
13734 }, java.awt, "Color", null, java.awt.Paint);
13735 c$.testColorValueRange = Clazz_defineMethod (c$, "testColorValueRange", 
13736  function (r, g, b, a) {
13737 var rangeError = false;
13738 var badComponentString = "";
13739 if (a < 0 || a > 255) {
13740 rangeError = true;
13741 badComponentString = badComponentString + " Alpha";
13742 }if (r < 0 || r > 255) {
13743 rangeError = true;
13744 badComponentString = badComponentString + " Red";
13745 }if (g < 0 || g > 255) {
13746 rangeError = true;
13747 badComponentString = badComponentString + " Green";
13748 }if (b < 0 || b > 255) {
13749 rangeError = true;
13750 badComponentString = badComponentString + " Blue";
13751 }if (rangeError == true) {
13752 throw  new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString);
13753 }}, "~N,~N,~N,~N");
13754 Clazz_makeConstructor (c$, 
13755 function () {
13756 {
13757 var a = arguments;
13758 switch(a.length) {
13759 case 0:
13760 break;
13761 case 1:
13762 this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]);
13763 break;
13764 case 2:
13765 this.value = (a[1] ? a[0] : 0xff000000 | a[0]);
13766 break;
13767 case 3:
13768 var n = a[0] + a[1] + a[2];
13769 if (n > 0 && n < 3.001)
13770 this.setFloat(a[0], a[1], a[2], 1);
13771 else
13772 this.setColor4(a[0], a[1], a[2], 255);
13773 break;
13774 case 4:
13775 var n = a[0] + a[1] + a[2] + a[3];
13776 if (n > 0 && n < 4.001)
13777 this.setFloat(a[0], a[1], a[2], a[3]);
13778 else
13779 this.setColor4(a[0], a[1], a[2], a[3]);
13780 break;
13781 }
13782 return this;
13783 }});
13784 Clazz_defineMethod (c$, "setColor4", 
13785  function (r, g, b, a) {
13786 this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0);
13787 java.awt.Color.testColorValueRange (r, g, b, a);
13788 }, "~N,~N,~N,~N");
13789 Clazz_defineMethod (c$, "setFloat", 
13790  function (r, g, b, f) {
13791 this.setColor4 (Clazz_doubleToInt (r * 255 + 0.5), Clazz_doubleToInt (g * 255 + 0.5), Clazz_doubleToInt (b * 255 + 0.5), Clazz_doubleToInt (f * 255 + 0.5));
13792 this.frgbvalue =  Clazz_newFloatArray (3, 0);
13793 this.frgbvalue[0] = r;
13794 this.frgbvalue[1] = g;
13795 this.frgbvalue[2] = b;
13796 this.falpha = f;
13797 }, "~N,~N,~N,~N");
13798 c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", 
13799 function (r, g, b, a) {
13800 var c =  new java.awt.Color ();
13801 c.setFloat (r, g, b, a);
13802 return c;
13803 }, "~N,~N,~N,~N");
13804 Clazz_defineMethod (c$, "getRed", 
13805 function () {
13806 return (this.getRGB () >> 16) & 0xFF;
13807 });
13808 Clazz_defineMethod (c$, "getGreen", 
13809 function () {
13810 return (this.getRGB () >> 8) & 0xFF;
13811 });
13812 Clazz_defineMethod (c$, "getBlue", 
13813 function () {
13814 return (this.getRGB () >> 0) & 0xFF;
13815 });
13816 Clazz_defineMethod (c$, "getAlpha", 
13817 function () {
13818 return (this.getRGB () >> 24) & 0xff;
13819 });
13820 Clazz_defineMethod (c$, "getRGB", 
13821 function () {
13822 return this.value;
13823 });
13824 Clazz_defineMethod (c$, "brighter", 
13825 function () {
13826 var r = this.getRed ();
13827 var g = this.getGreen ();
13828 var b = this.getBlue ();
13829 var i = Clazz_doubleToInt (3.333333333333333);
13830 if (r == 0 && g == 0 && b == 0) {
13831 return  new java.awt.Color (i, i, i);
13832 }if (r > 0 && r < i) r = i;
13833 if (g > 0 && g < i) g = i;
13834 if (b > 0 && b < i) b = i;
13835 return  new java.awt.Color (Math.min (Clazz_doubleToInt (r / 0.7), 255), Math.min (Clazz_doubleToInt (g / 0.7), 255), Math.min (Clazz_doubleToInt (b / 0.7), 255));
13836 });
13837 Clazz_defineMethod (c$, "darker", 
13838 function () {
13839 return  new java.awt.Color (Math.max (Clazz_doubleToInt (this.getRed () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getGreen () * 0.7), 0), Math.max (Clazz_doubleToInt (this.getBlue () * 0.7), 0));
13840 });
13841 Clazz_overrideMethod (c$, "hashCode", 
13842 function () {
13843 return this.value;
13844 });
13845 Clazz_overrideMethod (c$, "equals", 
13846 function (obj) {
13847 return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB ();
13848 }, "~O");
13849 Clazz_overrideMethod (c$, "toString", 
13850 function () {
13851 return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]";
13852 });
13853 c$.decode = Clazz_defineMethod (c$, "decode", 
13854 function (nm) {
13855 var intval = Integer.decode (nm);
13856 var i = intval.intValue ();
13857 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13858 }, "~S");
13859 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13860 function (nm) {
13861 return java.awt.Color.getColor (nm, null);
13862 }, "~S");
13863 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13864 function (nm, v) {
13865 var intval = Integer.getInteger (nm);
13866 if (intval == null) {
13867 return v;
13868 }var i = intval.intValue ();
13869 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13870 }, "~S,java.awt.Color");
13871 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13872 function (nm, v) {
13873 var intval = Integer.getInteger (nm);
13874 var i = (intval != null) ? intval.intValue () : v;
13875 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF);
13876 }, "~S,~N");
13877 c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", 
13878 function (hue, saturation, brightness) {
13879 var r = 0;
13880 var g = 0;
13881 var b = 0;
13882 if (saturation == 0) {
13883 r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13884 } else {
13885 var h = (hue - Math.floor (hue)) * 6.0;
13886 var f = h - java.lang.Math.floor (h);
13887 var p = brightness * (1.0 - saturation);
13888 var q = brightness * (1.0 - saturation * f);
13889 var t = brightness * (1.0 - (saturation * (1.0 - f)));
13890 switch (Clazz_floatToInt (h)) {
13891 case 0:
13892 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13893 g = Clazz_floatToInt (t * 255.0 + 0.5);
13894 b = Clazz_floatToInt (p * 255.0 + 0.5);
13895 break;
13896 case 1:
13897 r = Clazz_floatToInt (q * 255.0 + 0.5);
13898 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13899 b = Clazz_floatToInt (p * 255.0 + 0.5);
13900 break;
13901 case 2:
13902 r = Clazz_floatToInt (p * 255.0 + 0.5);
13903 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13904 b = Clazz_floatToInt (t * 255.0 + 0.5);
13905 break;
13906 case 3:
13907 r = Clazz_floatToInt (p * 255.0 + 0.5);
13908 g = Clazz_floatToInt (q * 255.0 + 0.5);
13909 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13910 break;
13911 case 4:
13912 r = Clazz_floatToInt (t * 255.0 + 0.5);
13913 g = Clazz_floatToInt (p * 255.0 + 0.5);
13914 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13915 break;
13916 case 5:
13917 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13918 g = Clazz_floatToInt (p * 255.0 + 0.5);
13919 b = Clazz_floatToInt (q * 255.0 + 0.5);
13920 break;
13921 }
13922 }return 0xff000000 | (r << 16) | (g << 8) | (b << 0);
13923 }, "~N,~N,~N");
13924 c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", 
13925 function (r, g, b, hsbvals) {
13926 var hue;
13927 var saturation;
13928 var brightness;
13929 if (hsbvals == null) {
13930 hsbvals =  Clazz_newFloatArray (3, 0);
13931 }var cmax = (r > g) ? r : g;
13932 if (b > cmax) cmax = b;
13933 var cmin = (r < g) ? r : g;
13934 if (b < cmin) cmin = b;
13935 brightness = (cmax) / 255.0;
13936 if (cmax != 0) saturation = ((cmax - cmin)) / (cmax);
13937  else saturation = 0;
13938 if (saturation == 0) hue = 0;
13939  else {
13940 var redc = ((cmax - r)) / ((cmax - cmin));
13941 var greenc = ((cmax - g)) / ((cmax - cmin));
13942 var bluec = ((cmax - b)) / ((cmax - cmin));
13943 if (r == cmax) hue = bluec - greenc;
13944  else if (g == cmax) hue = 2.0 + redc - bluec;
13945  else hue = 4.0 + greenc - redc;
13946 hue = hue / 6.0;
13947 if (hue < 0) hue = hue + 1.0;
13948 }hsbvals[0] = hue;
13949 hsbvals[1] = saturation;
13950 hsbvals[2] = brightness;
13951 return hsbvals;
13952 }, "~N,~N,~N,~A");
13953 c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", 
13954 function (h, s, b) {
13955 return  new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b));
13956 }, "~N,~N,~N");
13957 Clazz_defineMethod (c$, "getRGBComponents", 
13958 function (compArray) {
13959 var f;
13960 if (compArray == null) {
13961 f =  Clazz_newFloatArray (4, 0);
13962 } else {
13963 f = compArray;
13964 }if (this.frgbvalue == null) {
13965 f[0] = (this.getRed ()) / 255;
13966 f[1] = (this.getGreen ()) / 255;
13967 f[2] = (this.getBlue ()) / 255;
13968 f[3] = (this.getAlpha ()) / 255;
13969 } else {
13970 f[0] = this.frgbvalue[0];
13971 f[1] = this.frgbvalue[1];
13972 f[2] = this.frgbvalue[2];
13973 f[3] = this.falpha;
13974 }return f;
13975 }, "~A");
13976 Clazz_defineMethod (c$, "getRGBColorComponents", 
13977 function (compArray) {
13978 var f;
13979 if (compArray == null) {
13980 f =  Clazz_newFloatArray (3, 0);
13981 } else {
13982 f = compArray;
13983 }if (this.frgbvalue == null) {
13984 f[0] = (this.getRed ()) / 255;
13985 f[1] = (this.getGreen ()) / 255;
13986 f[2] = (this.getBlue ()) / 255;
13987 } else {
13988 f[0] = this.frgbvalue[0];
13989 f[1] = this.frgbvalue[1];
13990 f[2] = this.frgbvalue[2];
13991 }return f;
13992 }, "~A");
13993 Clazz_overrideMethod (c$, "createContext", 
13994 function (cm, r, r2d, xform, hints) {
13995 if (this.context == null || this.context.getRGB () != this.getRGB ()) {
13996 this.context =  new java.awt.ColorPaintContext (this.getRGB (), cm);
13997 }return this.context;
13998 }, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints");
13999 Clazz_overrideMethod (c$, "getTransparency", 
14000 function () {
14001 var alpha = this.getAlpha ();
14002 if (alpha == 0xff) {
14003 return 1;
14004 } else if (alpha == 0) {
14005 return 2;
14006 } else {
14007 return 3;
14008 }});
14009 c$.white = c$.prototype.white =  new java.awt.Color (255, 255, 255);
14010 c$.WHITE = c$.prototype.WHITE = java.awt.Color.white;
14011 c$.lightGray = c$.prototype.lightGray =  new java.awt.Color (192, 192, 192);
14012 c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray;
14013 c$.gray = c$.prototype.gray =  new java.awt.Color (128, 128, 128);
14014 c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray;
14015 c$.darkGray = c$.prototype.darkGray =  new java.awt.Color (64, 64, 64);
14016 c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray;
14017 c$.black = c$.prototype.black =  new java.awt.Color (0, 0, 0);
14018 c$.BLACK = c$.prototype.BLACK = java.awt.Color.black;
14019 c$.red = c$.prototype.red =  new java.awt.Color (255, 0, 0);
14020 c$.RED = c$.prototype.RED = java.awt.Color.red;
14021 c$.pink = c$.prototype.pink =  new java.awt.Color (255, 175, 175);
14022 c$.PINK = c$.prototype.PINK = java.awt.Color.pink;
14023 c$.orange = c$.prototype.orange =  new java.awt.Color (255, 200, 0);
14024 c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange;
14025 c$.yellow = c$.prototype.yellow =  new java.awt.Color (255, 255, 0);
14026 c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow;
14027 c$.green = c$.prototype.green =  new java.awt.Color (0, 255, 0);
14028 c$.GREEN = c$.prototype.GREEN = java.awt.Color.green;
14029 c$.magenta = c$.prototype.magenta =  new java.awt.Color (255, 0, 255);
14030 c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta;
14031 c$.cyan = c$.prototype.cyan =  new java.awt.Color (0, 255, 255);
14032 c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan;
14033 c$.blue = c$.prototype.blue =  new java.awt.Color (0, 0, 255);
14034 c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue;
14035 Clazz_defineStatics (c$,
14036 "FACTOR", 0.7);
14037 });
14038 Clazz_declarePackage ("java.awt");
14039 Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () {
14040 Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency);
14041 });
14042 Clazz_declarePackage ("java.awt");
14043 c$ = Clazz_declareInterface (java.awt, "Transparency");
14044 Clazz_defineStatics (c$,
14045 "OPAQUE", 1,
14046 "BITMASK", 2,
14047 "TRANSLUCENT", 3);
14048 Clazz_declarePackage ("java.awt");
14049 Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () {
14050 c$ = Clazz_decorateAsClass (function () {
14051 this.color = 0;
14052 Clazz_instantialize (this, arguments);
14053 }, java.awt, "ColorPaintContext", null, java.awt.PaintContext);
14054 Clazz_makeConstructor (c$, 
14055 function (color, cm) {
14056 this.color = color;
14057 }, "~N,java.awt.image.ColorModel");
14058 Clazz_overrideMethod (c$, "dispose", 
14059 function () {
14060 });
14061 Clazz_defineMethod (c$, "getRGB", 
14062 function () {
14063 return this.color;
14064 });
14065 Clazz_overrideMethod (c$, "getColorModel", 
14066 function () {
14067 return java.awt.image.ColorModel.getRGBdefault ();
14068 });
14069 });
14070 Clazz_declarePackage ("java.awt");
14071 Clazz_declareInterface (java.awt, "PaintContext");
14072 Clazz_declarePackage ("java.awt.image");
14073 Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () {
14074 c$ = Clazz_decorateAsClass (function () {
14075 this.pixel_bits = 0;
14076 this.nBits = null;
14077 this.transparency = 3;
14078 this.supportsAlpha = true;
14079 this.$isAlphaPremultiplied = false;
14080 this.numComponents = -1;
14081 this.numColorComponents = -1;
14082 this.colorSpace = null;
14083 this.colorSpaceType = 5;
14084 this.maxBits = 0;
14085 this.is_sRGB = true;
14086 this.transferType = 0;
14087 Clazz_instantialize (this, arguments);
14088 }, java.awt.image, "ColorModel", null, java.awt.Transparency);
14089 Clazz_prepareFields (c$, function () {
14090 this.colorSpace = java.awt.color.ColorSpace.getInstance (1000);
14091 });
14092 c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", 
14093 function () {
14094 if (java.awt.image.ColorModel.RGBdefault == null) {
14095 java.awt.image.ColorModel.RGBdefault =  new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
14096 }return java.awt.image.ColorModel.RGBdefault;
14097 });
14098 Clazz_makeConstructor (c$, 
14099 function (bits) {
14100 this.pixel_bits = bits;
14101 if (bits < 1) {
14102 throw  new IllegalArgumentException ("Number of bits must be > 0");
14103 }this.numComponents = 4;
14104 this.numColorComponents = 3;
14105 this.maxBits = bits;
14106 this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits);
14107 }, "~N");
14108 Clazz_makeConstructor (c$, 
14109 function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) {
14110 this.colorSpace = cspace;
14111 this.colorSpaceType = cspace.getType ();
14112 this.numColorComponents = cspace.getNumComponents ();
14113 this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0);
14114 this.supportsAlpha = hasAlpha;
14115 if (bits.length < this.numComponents) {
14116 throw  new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length);
14117 }if (transparency < 1 || transparency > 3) {
14118 throw  new IllegalArgumentException ("Unknown transparency: " + transparency);
14119 }if (this.supportsAlpha == false) {
14120 this.$isAlphaPremultiplied = false;
14121 this.transparency = 1;
14122 } else {
14123 this.$isAlphaPremultiplied = isAlphaPremultiplied;
14124 this.transparency = transparency;
14125 }this.nBits = bits.clone ();
14126 this.pixel_bits = pixel_bits;
14127 if (pixel_bits <= 0) {
14128 throw  new IllegalArgumentException ("Number of pixel bits must be > 0");
14129 }this.maxBits = 0;
14130 for (var i = 0; i < bits.length; i++) {
14131 if (bits[i] < 0) {
14132 throw  new IllegalArgumentException ("Number of bits must be >= 0");
14133 }if (this.maxBits < bits[i]) {
14134 this.maxBits = bits[i];
14135 }}
14136 if (this.maxBits == 0) {
14137 throw  new IllegalArgumentException ("There must be at least one component with > 0 pixel bits.");
14138 }if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) {
14139 this.is_sRGB = false;
14140 }this.transferType = transferType;
14141 }, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N");
14142 Clazz_defineMethod (c$, "hasAlpha", 
14143 function () {
14144 return this.supportsAlpha;
14145 });
14146 Clazz_defineMethod (c$, "isAlphaPremultiplied", 
14147 function () {
14148 return this.$isAlphaPremultiplied;
14149 });
14150 Clazz_defineMethod (c$, "getTransferType", 
14151 function () {
14152 return this.transferType;
14153 });
14154 Clazz_defineMethod (c$, "getPixelSize", 
14155 function () {
14156 return this.pixel_bits;
14157 });
14158 Clazz_defineMethod (c$, "getComponentSize", 
14159 function (componentIdx) {
14160 if (this.nBits == null) {
14161 throw  new NullPointerException ("Number of bits array is null.");
14162 }return this.nBits[componentIdx];
14163 }, "~N");
14164 Clazz_defineMethod (c$, "getComponentSize", 
14165 function () {
14166 if (this.nBits != null) {
14167 return this.nBits.clone ();
14168 }return null;
14169 });
14170 Clazz_overrideMethod (c$, "getTransparency", 
14171 function () {
14172 return this.transparency;
14173 });
14174 Clazz_defineMethod (c$, "getNumComponents", 
14175 function () {
14176 return this.numComponents;
14177 });
14178 Clazz_defineMethod (c$, "getNumColorComponents", 
14179 function () {
14180 return this.numColorComponents;
14181 });
14182 Clazz_defineMethod (c$, "getRGB", 
14183 function (pixel) {
14184 return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0);
14185 }, "~N");
14186 Clazz_defineMethod (c$, "getRed", 
14187 function (inData) {
14188 var pixel = 0;
14189 var length = 0;
14190 var idata = inData;
14191 pixel = idata[0];
14192 length = idata.length;
14193 if (length == 1) {
14194 return this.getRed (pixel);
14195 } else {
14196 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14197 }}, "~O");
14198 Clazz_defineMethod (c$, "getGreen", 
14199 function (inData) {
14200 var pixel = 0;
14201 var length = 0;
14202 var idata = inData;
14203 pixel = idata[0];
14204 length = idata.length;
14205 if (length == 1) {
14206 return this.getGreen (pixel);
14207 } else {
14208 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14209 }}, "~O");
14210 Clazz_defineMethod (c$, "getBlue", 
14211 function (inData) {
14212 var pixel = 0;
14213 var length = 0;
14214 var idata = inData;
14215 pixel = idata[0];
14216 length = idata.length;
14217 if (length == 1) {
14218 return this.getBlue (pixel);
14219 } else {
14220 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14221 }}, "~O");
14222 Clazz_defineMethod (c$, "getAlpha", 
14223 function (inData) {
14224 var pixel = 0;
14225 var length = 0;
14226 var idata = inData;
14227 pixel = idata[0];
14228 length = idata.length;
14229 if (length == 1) {
14230 return this.getAlpha (pixel);
14231 } else {
14232 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14233 }}, "~O");
14234 Clazz_defineMethod (c$, "getRGB", 
14235 function (inData) {
14236 return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0);
14237 }, "~O");
14238 Clazz_defineMethod (c$, "getDataElements", 
14239 function (rgb, pixel) {
14240 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14241 }, "~N,~O");
14242 Clazz_defineMethod (c$, "getComponents", 
14243 function (pixel, components, offset) {
14244 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14245 }, "~N,~A,~N");
14246 Clazz_defineMethod (c$, "getComponents", 
14247 function (pixel, components, offset) {
14248 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14249 }, "~O,~A,~N");
14250 Clazz_defineMethod (c$, "getUnnormalizedComponents", 
14251 function (normComponents, normOffset, components, offset) {
14252 if (this.colorSpace == null) {
14253 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14254 }if (this.nBits == null) {
14255 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14256 }if ((normComponents.length - normOffset) < this.numComponents) {
14257 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14258 }if (components == null) {
14259 components =  Clazz_newIntArray (offset + this.numComponents, 0);
14260 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14261 var normAlpha = normComponents[normOffset + this.numColorComponents];
14262 for (var i = 0; i < this.numColorComponents; i++) {
14263 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5);
14264 }
14265 components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5);
14266 } else {
14267 for (var i = 0; i < this.numComponents; i++) {
14268 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5);
14269 }
14270 }return components;
14271 }, "~A,~N,~A,~N");
14272 Clazz_defineMethod (c$, "getNormalizedComponents", 
14273 function (components, offset, normComponents, normOffset) {
14274 if (this.colorSpace == null) {
14275 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14276 }if (this.nBits == null) {
14277 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14278 }if ((components.length - offset) < this.numComponents) {
14279 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14280 }if (normComponents == null) {
14281 normComponents =  Clazz_newFloatArray (this.numComponents + normOffset, 0);
14282 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14283 var normAlpha = components[offset + this.numColorComponents];
14284 normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1);
14285 if (normAlpha != 0.0) {
14286 for (var i = 0; i < this.numColorComponents; i++) {
14287 normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1)));
14288 }
14289 } else {
14290 for (var i = 0; i < this.numColorComponents; i++) {
14291 normComponents[normOffset + i] = 0.0;
14292 }
14293 }normComponents[normOffset + this.numColorComponents] = normAlpha;
14294 } else {
14295 for (var i = 0; i < this.numComponents; i++) {
14296 normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1));
14297 }
14298 }return normComponents;
14299 }, "~A,~N,~A,~N");
14300 Clazz_defineMethod (c$, "getDataElement", 
14301 function (components, offset) {
14302 return this.getDataElementInt (components, offset);
14303 }, "~A,~N");
14304 Clazz_defineMethod (c$, "getDataElementInt", 
14305 function (components, offset) {
14306 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14307 }, "~A,~N");
14308 Clazz_defineMethod (c$, "getDataElement", 
14309 function (normComponents, normOffset) {
14310 if (JU.AU.isAI (normComponents)) {
14311 var ints = normComponents;
14312 return this.getDataElementInt (ints, normOffset);
14313 }var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14314 return this.getDataElement (components, 0);
14315 }, "~A,~N");
14316 Clazz_defineMethod (c$, "getDataElements", 
14317 function (normComponents, normOffset, obj) {
14318 var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14319 return this.getDataElements (components, 0, obj);
14320 }, "~A,~N,~O");
14321 Clazz_defineMethod (c$, "getNormalizedComponents", 
14322 function (pixel, normComponents, normOffset) {
14323 var components = this.getComponents (pixel, null, 0);
14324 return this.getNormalizedComponents (components, 0, normComponents, normOffset);
14325 }, "~O,~A,~N");
14326 Clazz_overrideMethod (c$, "equals", 
14327 function (obj) {
14328 if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) {
14329 return false;
14330 }var cm = obj;
14331 if (this === cm) {
14332 return true;
14333 }if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) {
14334 return false;
14335 }var nb = cm.getComponentSize ();
14336 if ((this.nBits != null) && (nb != null)) {
14337 for (var i = 0; i < this.numComponents; i++) {
14338 if (this.nBits[i] != nb[i]) {
14339 return false;
14340 }}
14341 } else {
14342 return ((this.nBits == null) && (nb == null));
14343 }return true;
14344 }, "~O");
14345 Clazz_overrideMethod (c$, "hashCode", 
14346 function () {
14347 var result = 0;
14348 result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8;
14349 if (this.nBits != null) {
14350 for (var i = 0; i < this.numComponents; i++) {
14351 result = result + this.nBits[i] * (i + 9);
14352 }
14353 }return result;
14354 });
14355 Clazz_defineMethod (c$, "getColorSpace", 
14356 function () {
14357 return this.colorSpace;
14358 });
14359 Clazz_defineMethod (c$, "isCompatibleRaster", 
14360 function (raster) {
14361 throw  new UnsupportedOperationException ("This method has not been implemented for this ColorModel.");
14362 }, "java.awt.image.Raster");
14363 Clazz_defineMethod (c$, "createCompatibleWritableRaster", 
14364 function (w, h) {
14365 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14366 }, "~N,~N");
14367 Clazz_defineMethod (c$, "createCompatibleSampleModel", 
14368 function (w, h) {
14369 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14370 }, "~N,~N");
14371 Clazz_defineMethod (c$, "isCompatibleSampleModel", 
14372 function (sm) {
14373 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14374 }, "java.awt.image.SampleModel");
14375 Clazz_overrideMethod (c$, "finalize", 
14376 function () {
14377 });
14378 Clazz_defineMethod (c$, "getAlphaRaster", 
14379 function (raster) {
14380 return null;
14381 }, "java.awt.image.WritableRaster");
14382 Clazz_overrideMethod (c$, "toString", 
14383 function () {
14384 return  String.instantialize ("ColorModel: #pixelBits = " + this.pixel_bits + " numComponents = " + this.numComponents + " color space = " + this.colorSpace + " transparency = " + this.transparency + " has alpha = " + this.supportsAlpha + " isAlphaPre = " + this.$isAlphaPremultiplied);
14385 });
14386 c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", 
14387 function (pixel_bits) {
14388 if (pixel_bits <= 8) {
14389 return 0;
14390 }return 3;
14391 }, "~N");
14392 c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", 
14393 function (cs) {
14394 return false;
14395 }, "java.awt.color.ColorSpace");
14396 c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", 
14397 function (cs) {
14398 return false;
14399 }, "java.awt.color.ColorSpace");
14400 Clazz_defineStatics (c$,
14401 "RGBdefault", null,
14402 "l8Tos8", null,
14403 "s8Tol8", null,
14404 "l16Tos8", null,
14405 "s8Tol16", null,
14406 "g8Tos8Map", null,
14407 "lg16Toog8Map", null,
14408 "g16Tos8Map", null,
14409 "lg16Toog16Map", null);
14410 });
14411 Clazz_declarePackage ("java.awt.color");
14412 Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {
14413 c$ = Clazz_decorateAsClass (function () {
14414 this.type = 0;
14415 this.numComponents = 0;
14416 this.compName = null;
14417 Clazz_instantialize (this, arguments);
14418 }, java.awt.color, "ColorSpace");
14419 Clazz_makeConstructor (c$, 
14420 function (type, numcomponents) {
14421 this.type = type;
14422 this.numComponents = numcomponents;
14423 }, "~N,~N");
14424 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
14425 function (colorspace) {
14426 var theColorSpace;
14427 switch (colorspace) {
14428 default:
14429 case 1000:
14430 if (java.awt.color.ColorSpace.sRGBspace == null) {
14431 java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);
14432 }theColorSpace = java.awt.color.ColorSpace.sRGBspace;
14433 break;
14434 }
14435 return theColorSpace;
14436 }, "~N");
14437 Clazz_defineMethod (c$, "isCS_sRGB", 
14438 function () {
14439 return (this === java.awt.color.ColorSpace.sRGBspace);
14440 });
14441 Clazz_defineMethod (c$, "toRGB", 
14442 function (colorvalue) {
14443 return colorvalue;
14444 }, "~A");
14445 Clazz_defineMethod (c$, "fromRGB", 
14446 function (rgbvalue) {
14447 return rgbvalue;
14448 }, "~A");
14449 Clazz_defineMethod (c$, "getType", 
14450 function () {
14451 return this.type;
14452 });
14453 Clazz_defineMethod (c$, "getNumComponents", 
14454 function () {
14455 return this.numComponents;
14456 });
14457 Clazz_defineMethod (c$, "getName", 
14458 function (idx) {
14459 if ((idx < 0) || (idx > this.numComponents - 1)) {
14460 throw  new IllegalArgumentException ("Component index out of range: " + idx);
14461 }if (this.compName == null) {
14462 switch (this.type) {
14463 case 0:
14464 this.compName =  Clazz_newArray (-1, ["X", "Y", "Z"]);
14465 break;
14466 case 1:
14467 this.compName =  Clazz_newArray (-1, ["L", "a", "b"]);
14468 break;
14469 case 2:
14470 this.compName =  Clazz_newArray (-1, ["L", "u", "v"]);
14471 break;
14472 case 3:
14473 this.compName =  Clazz_newArray (-1, ["Y", "Cb", "Cr"]);
14474 break;
14475 case 4:
14476 this.compName =  Clazz_newArray (-1, ["Y", "x", "y"]);
14477 break;
14478 case 5:
14479 this.compName =  Clazz_newArray (-1, ["Red", "Green", "Blue"]);
14480 break;
14481 case 6:
14482 this.compName =  Clazz_newArray (-1, ["Gray"]);
14483 break;
14484 case 7:
14485 this.compName =  Clazz_newArray (-1, ["Hue", "Saturation", "Value"]);
14486 break;
14487 case 8:
14488 this.compName =  Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]);
14489 break;
14490 case 9:
14491 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);
14492 break;
14493 case 11:
14494 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]);
14495 break;
14496 default:
14497 var tmp =  new Array (this.numComponents);
14498 for (var i = 0; i < tmp.length; i++) {
14499 tmp[i] = "Unnamed color component(" + i + ")";
14500 }
14501 this.compName = tmp;
14502 }
14503 }return this.compName[idx];
14504 }, "~N");
14505 Clazz_defineMethod (c$, "getMinValue", 
14506 function (component) {
14507 if ((component < 0) || (component > this.numComponents - 1)) {
14508 throw  new IllegalArgumentException ("Component index out of range: " + component);
14509 }return 0.0;
14510 }, "~N");
14511 Clazz_defineMethod (c$, "getMaxValue", 
14512 function (component) {
14513 if ((component < 0) || (component > this.numComponents - 1)) {
14514 throw  new IllegalArgumentException ("Component index out of range: " + component);
14515 }return 1.0;
14516 }, "~N");
14517 Clazz_defineStatics (c$,
14518 "sRGBspace", null,
14519 "TYPE_XYZ", 0,
14520 "TYPE_Lab", 1,
14521 "TYPE_Luv", 2,
14522 "TYPE_YCbCr", 3,
14523 "TYPE_Yxy", 4,
14524 "TYPE_RGB", 5,
14525 "TYPE_GRAY", 6,
14526 "TYPE_HSV", 7,
14527 "TYPE_HLS", 8,
14528 "TYPE_CMYK", 9,
14529 "TYPE_CMY", 11,
14530 "TYPE_2CLR", 12,
14531 "TYPE_3CLR", 13,
14532 "TYPE_4CLR", 14,
14533 "TYPE_5CLR", 15,
14534 "TYPE_6CLR", 16,
14535 "TYPE_7CLR", 17,
14536 "TYPE_8CLR", 18,
14537 "TYPE_9CLR", 19,
14538 "TYPE_ACLR", 20,
14539 "TYPE_BCLR", 21,
14540 "TYPE_CCLR", 22,
14541 "TYPE_DCLR", 23,
14542 "TYPE_ECLR", 24,
14543 "TYPE_FCLR", 25,
14544 "CS_sRGB", 1000,
14545 "CS_LINEAR_RGB", 1004,
14546 "CS_CIEXYZ", 1001,
14547 "CS_PYCC", 1002,
14548 "CS_GRAY", 1003);
14549 });
14550 Clazz_declarePackage ("java.util");
14551 Clazz_load (["java.util.Arrays", "$.Collections", "$.HashMap"], "java.util.ResourceBundle", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "java.lang.ClassNotFoundException", "$.IllegalArgumentException", "$.InternalError", "$.InterruptedException", "$.NullPointerException", "$.StringBuilder", "$.Thread", "java.util.ArrayList", "$.HashSet", "java.util.Locale", "$.MissingResourceException", "swingjs.JSToolkit", "swingjs.api.Interface"], function () {
14552 c$ = Clazz_decorateAsClass (function () {
14553 this.parent = null;
14554 this.locale = null;
14555 this.expired = false;
14556 this.$keySet = null;
14557 Clazz_instantialize (this, arguments);
14558 }, java.util, "ResourceBundle");
14559 Clazz_makeConstructor (c$, 
14560 function () {
14561 });
14562 Clazz_defineMethod (c$, "getString", 
14563 function (key) {
14564 return this.getObject (key);
14565 }, "~S");
14566 Clazz_defineMethod (c$, "getStringArray", 
14567 function (key) {
14568 return this.getObject (key);
14569 }, "~S");
14570 Clazz_defineMethod (c$, "getObject", 
14571 function (key) {
14572 var obj = this.handleGetObject (key);
14573 if (obj == null) {
14574 if (this.parent != null) {
14575 obj = this.parent.getObject (key);
14576 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
14577 }return obj;
14578 }, "~S");
14579 Clazz_defineMethod (c$, "getLocale", 
14580 function () {
14581 return this.locale;
14582 });
14583 Clazz_defineMethod (c$, "setParent", 
14584 function (parent) {
14585 this.parent = parent;
14586 }, "java.util.ResourceBundle");
14587 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
14588 function (baseName, targetLocale, loader, control) {
14589 var n = 4;
14590 {
14591 n = arguments.length;
14592 }switch (n) {
14593 case 2:
14594 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
14595 control = targetLocale;
14596 targetLocale = null;
14597 }break;
14598 case 3:
14599 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
14600 control = loader;
14601 loader = null;
14602 }break;
14603 }
14604 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
14605 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14606 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
14607 }, "~S,~O,~O,java.util.ResourceBundle.Control");
14608 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
14609  function (baseName, locale, loader, control) {
14610 if (control == null) {
14611 throw  new NullPointerException ("ResourceBundle locale or control is null");
14612 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
14613 var bundle = null;
14614 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14615 if (bundleRef != null) {
14616 bundle = bundleRef;
14617 bundleRef = null;
14618 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
14619 return bundle;
14620 }var formats = control.getFormats (baseName);
14621 var baseBundle = null;
14622 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
14623 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
14624 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
14625 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14626 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
14627 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
14628 break;
14629 }if (isBaseBundle && baseBundle == null) {
14630 baseBundle = bundle;
14631 }}}
14632 if (bundle == null) {
14633 if (baseBundle == null) {
14634 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
14635 }bundle = baseBundle;
14636 }return bundle;
14637 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
14638 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
14639  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
14640 var targetLocale = candidateLocales.get (index);
14641 var parent = null;
14642 if (index != candidateLocales.size () - 1) {
14643 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
14644 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
14645 return baseBundle;
14646 }var expiredBundle = false;
14647 cacheKey.setLocale (targetLocale);
14648 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
14649 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14650 expiredBundle = bundle.expired;
14651 if (!expiredBundle) {
14652 if (bundle.parent === parent) {
14653 return bundle;
14654 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14655 if (bundleRef != null && bundleRef === bundle) {
14656 java.util.ResourceBundle.cacheList.remove (cacheKey);
14657 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
14658 var constKey = cacheKey.clone ();
14659 try {
14660 try {
14661 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
14662 if (bundle != null) {
14663 if (bundle.parent == null) {
14664 bundle.setParent (parent);
14665 }bundle.locale = targetLocale;
14666 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
14667 return bundle;
14668 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
14669 } finally {
14670 }
14671 } finally {
14672 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
14673 Thread.currentThread ().interrupt ();
14674 }}
14675 }return parent;
14676 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
14677 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
14678  function (cacheKey, formats, control, reload) {
14679 var targetLocale = cacheKey.getLocale ();
14680 var bundle = null;
14681 var size = formats.size ();
14682 for (var i = 0; i < size; i++) {
14683 var format = formats.get (i);
14684 try {
14685 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
14686 } catch (e$$) {
14687 if (Clazz_exceptionOf (e$$, LinkageError)) {
14688 var error = e$$;
14689 {
14690 cacheKey.setCause (error);
14691 }
14692 } else if (Clazz_exceptionOf (e$$, Exception)) {
14693 var cause = e$$;
14694 {
14695 cacheKey.setCause (cause);
14696 }
14697 } else {
14698 throw e$$;
14699 }
14700 }
14701 if (bundle != null) {
14702 cacheKey.setFormat (format);
14703 bundle.locale = targetLocale;
14704 bundle.expired = false;
14705 break;
14706 }}
14707 return bundle;
14708 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
14709 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
14710  function (bundle) {
14711 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
14712 }, "java.util.ResourceBundle");
14713 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
14714  function (baseName, locale, cause) {
14715 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
14716 cause = null;
14717 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
14718 }, "~S,java.util.Locale,Throwable");
14719 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
14720  function (cacheKey, control) {
14721 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14722 if (bundleRef == null) {
14723 return null;
14724 }var bundle = bundleRef;
14725 return bundle;
14726 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
14727 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
14728  function (cacheKey, bundle, control) {
14729 var key = cacheKey.clone ();
14730 java.util.ResourceBundle.cacheList.put (key, bundle);
14731 return bundle;
14732 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
14733 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
14734 function () {
14735 java.util.ResourceBundle.cacheList.clear ();
14736 });
14737 Clazz_defineMethod (c$, "containsKey", 
14738 function (key) {
14739 if (key == null) {
14740 throw  new NullPointerException ();
14741 }for (var rb = this; rb != null; rb = rb.parent) {
14742 if (rb.handleKeySet ().contains (key)) {
14743 return true;
14744 }}
14745 return false;
14746 }, "~S");
14747 Clazz_defineMethod (c$, "keySet", 
14748 function () {
14749 var keys =  new java.util.HashSet ();
14750 for (var rb = this; rb != null; rb = rb.parent) {
14751 keys.addAll (rb.handleKeySet ());
14752 }
14753 return keys;
14754 });
14755 Clazz_defineMethod (c$, "handleKeySet", 
14756 function () {
14757 if (this.$keySet == null) {
14758 {
14759 if (this.$keySet == null) {
14760 var keys =  new java.util.HashSet ();
14761 var enumKeys = this.getKeys ();
14762 while (enumKeys.hasMoreElements ()) {
14763 var key = enumKeys.nextElement ();
14764 if (this.handleGetObject (key) != null) {
14765 keys.add (key);
14766 }}
14767 this.$keySet = keys;
14768 }}}return this.$keySet;
14769 });
14770 c$.$ResourceBundle$1$ = function () {
14771 Clazz_pu$h(self.c$);
14772 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
14773 Clazz_defineMethod (c$, "getKeys", 
14774 function () {
14775 return null;
14776 });
14777 Clazz_defineMethod (c$, "handleGetObject", 
14778 function (key) {
14779 return null;
14780 }, "~S");
14781 Clazz_overrideMethod (c$, "toString", 
14782 function () {
14783 return "NONEXISTENT_BUNDLE";
14784 });
14785 c$ = Clazz_p0p ();
14786 };
14787 Clazz_pu$h(self.c$);
14788 c$ = Clazz_decorateAsClass (function () {
14789 this.name = null;
14790 this.locale = null;
14791 this.format = null;
14792 this.cause = null;
14793 this.hashCodeCache = 0;
14794 Clazz_instantialize (this, arguments);
14795 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
14796 Clazz_makeConstructor (c$, 
14797 function (a, b, c) {
14798 this.name = a;
14799 this.locale = b;
14800 if (this.name != null) this.calculateHashCode ();
14801 }, "~S,java.util.Locale,~O");
14802 Clazz_defineMethod (c$, "getName", 
14803 function () {
14804 return this.name;
14805 });
14806 Clazz_defineMethod (c$, "getLocale", 
14807 function () {
14808 return this.locale;
14809 });
14810 Clazz_defineMethod (c$, "setLocale", 
14811 function (a) {
14812 if (!this.locale.equals (a)) {
14813 this.locale = a;
14814 this.calculateHashCode ();
14815 }return this;
14816 }, "java.util.Locale");
14817 Clazz_overrideMethod (c$, "equals", 
14818 function (a) {
14819 if (this === a) {
14820 return true;
14821 }try {
14822 var b = a;
14823 if (this.hashCodeCache != b.hashCodeCache) {
14824 return false;
14825 }if (!this.name.equals (b.name)) {
14826 return false;
14827 }if (!this.locale.equals (b.locale)) {
14828 return false;
14829 }return true;
14830 } catch (e$$) {
14831 if (Clazz_exceptionOf (e$$, NullPointerException)) {
14832 var e = e$$;
14833 {
14834 }
14835 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
14836 var e = e$$;
14837 {
14838 }
14839 } else {
14840 throw e$$;
14841 }
14842 }
14843 return false;
14844 }, "~O");
14845 Clazz_overrideMethod (c$, "hashCode", 
14846 function () {
14847 return this.hashCodeCache;
14848 });
14849 Clazz_defineMethod (c$, "calculateHashCode", 
14850  function () {
14851 this.hashCodeCache = this.name.hashCode () << 3;
14852 this.hashCodeCache ^= this.locale.hashCode ();
14853 });
14854 Clazz_defineMethod (c$, "clone", 
14855 function () {
14856 try {
14857 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
14858 a.cause = null;
14859 return a;
14860 } catch (e) {
14861 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
14862 throw  new InternalError ();
14863 } else {
14864 throw e;
14865 }
14866 }
14867 });
14868 Clazz_defineMethod (c$, "setFormat", 
14869 function (a) {
14870 this.format = a;
14871 }, "~S");
14872 Clazz_defineMethod (c$, "setCause", 
14873  function (a) {
14874 if (this.cause == null) {
14875 this.cause = a;
14876 } else {
14877 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
14878 this.cause = a;
14879 }}}, "Throwable");
14880 Clazz_defineMethod (c$, "getCause", 
14881  function () {
14882 return this.cause;
14883 });
14884 Clazz_overrideMethod (c$, "toString", 
14885 function () {
14886 var a = this.locale.toString ();
14887 if (a.length == 0) {
14888 if (this.locale.getVariant ().length != 0) {
14889 a = "__" + this.locale.getVariant ();
14890 } else {
14891 a = "\"\"";
14892 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
14893 });
14894 c$ = Clazz_p0p ();
14895 Clazz_pu$h(self.c$);
14896 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
14897 Clazz_makeConstructor (c$, 
14898 function () {
14899 });
14900 c$.getControl = Clazz_defineMethod (c$, "getControl", 
14901 function (a) {
14902 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14903 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
14904 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14905 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
14906 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14907 return java.util.ResourceBundle.Control.INSTANCE;
14908 }throw  new IllegalArgumentException ();
14909 }, "java.util.List");
14910 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
14911 function (a) {
14912 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14913 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
14914 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14915 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
14916 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14917 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
14918 }throw  new IllegalArgumentException ();
14919 }, "java.util.List");
14920 Clazz_defineMethod (c$, "getFormats", 
14921 function (a) {
14922 if (a == null) {
14923 throw  new NullPointerException ();
14924 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
14925 }, "~S");
14926 Clazz_defineMethod (c$, "getCandidateLocales", 
14927 function (a, b) {
14928 if (a == null) {
14929 throw  new NullPointerException ();
14930 }var c = b.getLanguage ();
14931 var d = b.getCountry ();
14932 var e = b.getVariant ();
14933 var f =  new java.util.ArrayList (4);
14934 if (e.length > 0) {
14935 f.add (b);
14936 }if (d.length > 0) {
14937 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
14938 }if (c.length > 0) {
14939 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
14940 }f.add (java.util.Locale.ROOT);
14941 return f;
14942 }, "~S,java.util.Locale");
14943 Clazz_defineMethod (c$, "getFallbackLocale", 
14944 function (a, b) {
14945 if (a == null) {
14946 throw  new NullPointerException ();
14947 }var c = java.util.Locale.getDefault ();
14948 return b.equals (c) ? null : c;
14949 }, "~S,java.util.Locale");
14950 Clazz_defineMethod (c$, "newBundle", 
14951 function (a, b, c, d, e) {
14952 var f = this.toBundleName (a, b);
14953 var g = null;
14954 if (c.equals ("java.class")) {
14955 g = swingjs.api.Interface.getInstance (f, false);
14956 } else if (c.equals ("java.properties")) {
14957 var h = this.toResourceName0 (f, "properties");
14958 if (h == null) {
14959 return null;
14960 }var i = swingjs.JSToolkit.getJavaResource (h, false);
14961 var j = null;
14962 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
14963 if (j != null) {
14964 try {
14965 g = this.newPropertyBundle (j);
14966 } finally {
14967 j.close ();
14968 }
14969 }} else {
14970 throw  new IllegalArgumentException ("unknown format: " + c);
14971 }return g;
14972 }, "~S,java.util.Locale,~S,~O,~B");
14973 Clazz_defineMethod (c$, "newPropertyBundle", 
14974  function (a) {
14975 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
14976 }, "java.io.InputStream");
14977 Clazz_defineMethod (c$, "getTimeToLive", 
14978 function (a, b) {
14979 if (a == null || b == null) {
14980 throw  new NullPointerException ();
14981 }return -2;
14982 }, "~S,java.util.Locale");
14983 Clazz_defineMethod (c$, "toBundleName", 
14984 function (a, b) {
14985 if (b === java.util.Locale.ROOT) {
14986 return a;
14987 }var c = b.getLanguage ();
14988 var d = b.getCountry ();
14989 var e = b.getVariant ();
14990 if (c === "" && d === "" && e === "") {
14991 return a;
14992 }var f =  new StringBuilder (a);
14993 f.append ('_');
14994 if (e !== "") {
14995 f.append (c).append ('_').append (d).append ('_').append (e);
14996 } else if (d !== "") {
14997 f.append (c).append ('_').append (d);
14998 } else {
14999 f.append (c);
15000 }return f.toString ();
15001 }, "~S,java.util.Locale");
15002 Clazz_defineMethod (c$, "toResourceName", 
15003 function (a, b) {
15004 var c =  new StringBuilder (a.length + 1 + b.length);
15005 c.append (a.$replace ('.', '/')).append ('.').append (b);
15006 return c.toString ();
15007 }, "~S,~S");
15008 Clazz_defineMethod (c$, "toResourceName0", 
15009  function (a, b) {
15010 if (a.contains ("://")) {
15011 return null;
15012 } else {
15013 return this.toResourceName (a, b);
15014 }}, "~S,~S");
15015 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
15016 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
15017 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
15018 Clazz_defineStatics (c$,
15019 "TTL_DONT_CACHE", -1,
15020 "TTL_NO_EXPIRATION_CONTROL", -2);
15021 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
15022 c$ = Clazz_p0p ();
15023 Clazz_pu$h(self.c$);
15024 c$ = Clazz_decorateAsClass (function () {
15025 this.formats = null;
15026 Clazz_instantialize (this, arguments);
15027 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
15028 Clazz_makeConstructor (c$, 
15029 function (a) {
15030 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
15031 this.formats = a;
15032 }, "java.util.List");
15033 Clazz_overrideMethod (c$, "getFormats", 
15034 function (a) {
15035 if (a == null) {
15036 throw  new NullPointerException ();
15037 }return this.formats;
15038 }, "~S");
15039 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
15040 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
15041 c$ = Clazz_p0p ();
15042 Clazz_pu$h(self.c$);
15043 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
15044 Clazz_overrideMethod (c$, "getFallbackLocale", 
15045 function (a, b) {
15046 if (a == null || b == null) {
15047 throw  new NullPointerException ();
15048 }return null;
15049 }, "~S,java.util.Locale");
15050 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
15051 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
15052 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
15053 c$ = Clazz_p0p ();
15054 Clazz_defineStatics (c$,
15055 "INITIAL_CACHE_SIZE", 32);
15056 c$.NONEXISTENT_BUNDLE = c$.prototype.NONEXISTENT_BUNDLE = ((Clazz_isClassDefined ("java.util.ResourceBundle$1") ? 0 : java.util.ResourceBundle.$ResourceBundle$1$ ()), Clazz_innerTypeInstance (java.util.ResourceBundle$1, this, null));
15057 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
15058 });
15059 Clazz_declarePackage ("java.applet");
15060 Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () {
15061 c$ = Clazz_decorateAsClass (function () {
15062 this.stub = null;
15063 Clazz_instantialize (this, arguments);
15064 }, java.applet, "Applet", java.awt.Panel);
15065 Clazz_makeConstructor (c$, 
15066 function () {
15067 Clazz_superConstructor (this, java.applet.Applet, []);
15068 this.setPanel ();
15069 });
15070 Clazz_defineMethod (c$, "setStub", 
15071 function (stub) {
15072 this.stub = stub;
15073 }, "java.applet.AppletStub");
15074 Clazz_defineMethod (c$, "isActive", 
15075 function () {
15076 if (this.stub != null) {
15077 return this.stub.isActive ();
15078 } else {
15079 return false;
15080 }});
15081 Clazz_defineMethod (c$, "getDocumentBase", 
15082 function () {
15083 return this.stub.getDocumentBase ();
15084 });
15085 Clazz_defineMethod (c$, "getCodeBase", 
15086 function () {
15087 return this.stub.getCodeBase ();
15088 });
15089 Clazz_defineMethod (c$, "getParameter", 
15090 function (name) {
15091 return this.stub.getParameter (name);
15092 }, "~S");
15093 Clazz_defineMethod (c$, "getAppletContext", 
15094 function () {
15095 return this.stub.getAppletContext ();
15096 });
15097 Clazz_defineMethod (c$, "resize", 
15098 function (width, height) {
15099 var d = this.size ();
15100 if ((d.width != width) || (d.height != height)) {
15101 Clazz_superCall (this, java.applet.Applet, "resize", [width, height]);
15102 if (this.stub != null) {
15103 this.stub.appletResize (width, height);
15104 }}}, "~N,~N");
15105 Clazz_defineMethod (c$, "resize", 
15106 function (d) {
15107 this.resize (d.width, d.height);
15108 }, "java.awt.Dimension");
15109 Clazz_defineMethod (c$, "showStatus", 
15110 function (msg) {
15111 this.getAppletContext ().showStatus (msg);
15112 }, "~S");
15113 Clazz_defineMethod (c$, "getImage", 
15114 function (url) {
15115 return this.getAppletContext ().getImage (url);
15116 }, "java.net.URL");
15117 Clazz_defineMethod (c$, "getImage", 
15118 function (url, name) {
15119 try {
15120 return this.getImage ( new java.net.URL (url, name));
15121 } catch (e) {
15122 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
15123 return null;
15124 } else {
15125 throw e;
15126 }
15127 }
15128 }, "java.net.URL,~S");
15129 Clazz_defineMethod (c$, "getAppletInfo", 
15130 function () {
15131 return null;
15132 });
15133 Clazz_defineMethod (c$, "getLocale", 
15134 function () {
15135 var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []);
15136 if (locale == null) {
15137 return java.util.Locale.getDefault ();
15138 }return locale;
15139 });
15140 Clazz_defineMethod (c$, "getParameterInfo", 
15141 function () {
15142 return null;
15143 });
15144 Clazz_defineMethod (c$, "init", 
15145 function () {
15146 });
15147 Clazz_defineMethod (c$, "start", 
15148 function () {
15149 });
15150 Clazz_defineMethod (c$, "stop", 
15151 function () {
15152 });
15153 Clazz_defineMethod (c$, "destroy", 
15154 function () {
15155 });
15156 });
15157 Clazz_declarePackage ("java.net");
15158 Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () {
15159 c$ = Clazz_decorateAsClass (function () {
15160 this.protocol = null;
15161 this.host = null;
15162 this.port = -1;
15163 this.file = null;
15164 this.query = null;
15165 this.authority = null;
15166 this.path = null;
15167 this.userInfo = null;
15168 this.ref = null;
15169 this.handler = null;
15170 this.$hashCode = -1;
15171 Clazz_instantialize (this, arguments);
15172 }, java.net, "URL", null, java.io.Serializable);
15173 Clazz_makeConstructor (c$, 
15174 function (context, spec, handler) {
15175 {
15176 switch (arguments.length) {
15177 case 1:
15178 spec = context;context = handler = null;
15179 break;
15180 case 2:
15181 handler = null;
15182 break;
15183 case 3:
15184 if (context == null || Clazz_instanceOf(context, java.net.URL))
15185 break;
15186 default:
15187 alert("java.net.URL constructor format not supported");
15188 break;
15189 }
15190 context && context.valueOf && context.valueOf() == null && (context = null);
15191 }var original = spec;
15192 var i;
15193 var limit;
15194 var c;
15195 var start = 0;
15196 var newProtocol = null;
15197 var aRef = false;
15198 var isRelative = false;
15199 try {
15200 limit = spec.length;
15201 while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) {
15202 limit--;
15203 }
15204 while ((start < limit) && (spec.charAt (start) <= ' ')) {
15205 start++;
15206 }
15207 if (spec.regionMatches (true, start, "url:", 0, 4)) {
15208 start += 4;
15209 }if (start < spec.length && spec.charAt (start) == '#') {
15210 aRef = true;
15211 }for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) {
15212 if (c == 58) {
15213 var s = spec.substring (start, i).toLowerCase ();
15214 if (this.isValidProtocol (s)) {
15215 newProtocol = s;
15216 start = i + 1;
15217 }break;
15218 }}
15219 this.protocol = newProtocol;
15220 if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) {
15221 if (handler == null) {
15222 handler = context.handler;
15223 }if (context.path != null && context.path.startsWith ("/")) newProtocol = null;
15224 if (newProtocol == null) {
15225 this.protocol = context.protocol;
15226 this.authority = context.authority;
15227 this.userInfo = context.userInfo;
15228 this.host = context.host;
15229 this.port = context.port;
15230 this.file = context.file;
15231 this.path = context.path;
15232 isRelative = true;
15233 }}if (this.protocol == null) {
15234 throw  new java.net.MalformedURLException ("no protocol: " + original);
15235 }if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) {
15236 throw  new java.net.MalformedURLException ("unknown protocol: " + this.protocol);
15237 }this.handler = handler;
15238 i = spec.indexOf ('#', start);
15239 if (i >= 0) {
15240 this.ref = spec.substring (i + 1, limit);
15241 limit = i;
15242 }if (isRelative && start == limit) {
15243 this.query = context.query;
15244 if (this.ref == null) {
15245 this.ref = context.ref;
15246 }}handler.parseURL (this, spec, start, limit);
15247 } catch (e$$) {
15248 if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) {
15249 var e = e$$;
15250 {
15251 throw e;
15252 }
15253 } else if (Clazz_exceptionOf (e$$, Exception)) {
15254 var e = e$$;
15255 {
15256 var exception =  new java.net.MalformedURLException (e.getMessage ());
15257 exception.initCause (e);
15258 throw exception;
15259 }
15260 } else {
15261 throw e$$;
15262 }
15263 }
15264 }, "java.net.URL,~S,java.net.URLStreamHandler");
15265 Clazz_defineMethod (c$, "isValidProtocol", 
15266  function (protocol) {
15267 var len = protocol.length;
15268 if (len < 1) return false;
15269 var c = protocol.charAt (0);
15270 if (!Character.isLetter (c)) return false;
15271 for (var i = 1; i < len; i++) {
15272 c = protocol.charAt (i);
15273 if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') {
15274 return false;
15275 }}
15276 return true;
15277 }, "~S");
15278 Clazz_defineMethod (c$, "set5", 
15279 function (protocol, host, port, file, ref) {
15280 {
15281 this.protocol = protocol;
15282 this.host = host;
15283 this.authority = port == -1 ? host : host + ":" + port;
15284 this.port = port;
15285 this.file = file;
15286 this.ref = ref;
15287 this.$hashCode = -1;
15288 var q = file.lastIndexOf ('?');
15289 if (q != -1) {
15290 this.query = file.substring (q + 1);
15291 this.path = file.substring (0, q);
15292 } else this.path = file;
15293 }}, "~S,~S,~N,~S,~S");
15294 Clazz_defineMethod (c$, "set", 
15295 function (protocol, host, port, authority, userInfo, path, query, ref) {
15296 {
15297 this.protocol = protocol;
15298 this.host = host;
15299 this.port = port;
15300 this.file = query == null ? path : path + "?" + query;
15301 this.userInfo = userInfo;
15302 this.path = path;
15303 this.ref = ref;
15304 this.$hashCode = -1;
15305 this.query = query;
15306 this.authority = authority;
15307 }}, "~S,~S,~N,~S,~S,~S,~S,~S");
15308 Clazz_defineMethod (c$, "getQuery", 
15309 function () {
15310 return this.query;
15311 });
15312 Clazz_defineMethod (c$, "getPath", 
15313 function () {
15314 return this.path;
15315 });
15316 Clazz_defineMethod (c$, "getUserInfo", 
15317 function () {
15318 return this.userInfo;
15319 });
15320 Clazz_defineMethod (c$, "getAuthority", 
15321 function () {
15322 return this.authority;
15323 });
15324 Clazz_defineMethod (c$, "getPort", 
15325 function () {
15326 return this.port;
15327 });
15328 Clazz_defineMethod (c$, "getDefaultPort", 
15329 function () {
15330 return this.handler.getDefaultPort ();
15331 });
15332 Clazz_defineMethod (c$, "getProtocol", 
15333 function () {
15334 return this.protocol;
15335 });
15336 Clazz_defineMethod (c$, "getHost", 
15337 function () {
15338 return this.host;
15339 });
15340 Clazz_defineMethod (c$, "getFile", 
15341 function () {
15342 return this.file;
15343 });
15344 Clazz_defineMethod (c$, "getRef", 
15345 function () {
15346 return this.ref;
15347 });
15348 Clazz_overrideMethod (c$, "equals", 
15349 function (obj) {
15350 if (!(Clazz_instanceOf (obj, java.net.URL))) return false;
15351 var u2 = obj;
15352 return this.handler.equals2 (this, u2);
15353 }, "~O");
15354 Clazz_overrideMethod (c$, "hashCode", 
15355 function () {
15356 if (this.$hashCode != -1) return this.$hashCode;
15357 this.$hashCode = this.handler.hashCode (this);
15358 return this.$hashCode;
15359 });
15360 Clazz_defineMethod (c$, "sameFile", 
15361 function (other) {
15362 return this.handler.sameFile (this, other);
15363 }, "java.net.URL");
15364 Clazz_overrideMethod (c$, "toString", 
15365 function () {
15366 return this.toExternalForm ();
15367 });
15368 Clazz_defineMethod (c$, "toExternalForm", 
15369 function () {
15370 return this.handler.toExternalForm (this);
15371 });
15372 Clazz_defineMethod (c$, "openConnection", 
15373 function () {
15374 return this.handler.openConnection (this);
15375 });
15376 Clazz_defineMethod (c$, "openStream", 
15377 function () {
15378 return this.openConnection ().getInputStream ();
15379 });
15380 Clazz_defineMethod (c$, "getContent", 
15381 function () {
15382 return this.openConnection ().getInputStream ();
15383 });
15384 c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", 
15385 function (fac) {
15386 {
15387 if (java.net.URL.factory != null) {
15388 throw  new Error ("factory already defined");
15389 }var security = System.getSecurityManager ();
15390 if (security != null) {
15391 security.checkSetFactory ();
15392 }java.net.URL.handlers.clear ();
15393 java.net.URL.factory = fac;
15394 }}, "java.net.URLStreamHandlerFactory");
15395 c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", 
15396 function (protocol) {
15397 var handler = java.net.URL.handlers.get (protocol);
15398 if (handler == null) {
15399 if (java.net.URL.factory != null) {
15400 handler = java.net.URL.factory.createURLStreamHandler (protocol);
15401 }}return handler;
15402 }, "~S");
15403 Clazz_defineStatics (c$,
15404 "factory", null);
15405 c$.handlers = c$.prototype.handlers =  new java.util.Hashtable ();
15406 c$.streamHandlerLock = c$.prototype.streamHandlerLock =  new Clazz._O ();
15407 });
15408
15409 // modified by Bob Hanson 3/21/2014 6:44:21 AM  to reduce this.b$[....] phrases to simply this.h$
15410 // BH added ability to use a non-Java key for HTML elements, for example.
15411 // BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed
15412
15413
15414 Clazz_load([],"java.util.HashtableIterator",[],function(){
15415 c$=Clazz_decorateAsClass(function(){
15416 this.position=0;
15417 this.expectedModCount=0;
15418 this.type=null;
15419 this.lastEntry=null;
15420 this.lastPosition=0;
15421 this.canRemove=false;
15422 Clazz_instantialize(this,arguments);
15423 },java.util,"HashtableIterator",null,java.util.Iterator);
15424 Clazz_makeConstructor(c$,
15425 function(a){
15426 this.type=a;
15427 this.h$ = a.h$;
15428 this.position=this.h$.lastSlot;
15429 this.expectedModCount=this.h$.modCount;
15430 },"java.util.AbstractSet");
15431 Clazz_overrideMethod(c$,"hasNext",
15432 function(){
15433 if(this.lastEntry&&this.lastEntry.next){
15434 return true;
15435 }while(this.position>=this.h$.firstSlot){
15436 if(this.h$.elementData[this.position]==null){
15437 this.position--;
15438 }else{
15439 return true;
15440 }}
15441 return false;
15442 });
15443 Clazz_overrideMethod(c$,"next",
15444 function(){
15445 if(this.expectedModCount==this.h$.modCount){
15446 if(this.lastEntry){
15447 this.lastEntry=this.lastEntry.next;
15448 }if(this.lastEntry==null){
15449 while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){
15450 this.position--;
15451 }
15452 if(this.lastEntry){
15453 this.lastPosition=this.position;
15454 this.position--;
15455 }}if(this.lastEntry){
15456 this.canRemove=true;
15457 return this.type.get(this.lastEntry);
15458 }throw new java.util.NoSuchElementException();
15459 }throw new java.util.ConcurrentModificationException();
15460 });
15461 Clazz_overrideMethod(c$,"remove",
15462 function(){
15463 if(this.expectedModCount==this.h$.modCount){
15464 if(this.canRemove){
15465 this.canRemove=false;
15466 {
15467 var a=false;
15468 var b=this.h$.elementData[this.lastPosition];
15469 if(b===this.lastEntry){
15470 this.h$.elementData[this.lastPosition]=b.next;
15471 a=true;
15472 }else{
15473 while(b&&b.next!==this.lastEntry){
15474 b=b.next;
15475 }
15476 if(b){
15477 b.next=this.lastEntry.next;
15478 a=true;
15479 }}if(a){
15480 this.h$.modCount++;
15481 this.h$.elementCount--;
15482 this.expectedModCount++;
15483 return;
15484 }}}else{
15485 throw new IllegalStateException();
15486 }}throw new java.util.ConcurrentModificationException();
15487 });
15488 });
15489
15490
15491
15492 ////////////////////////////
15493
15494
15495 Clazz_load([],"java.util.HashtableEnumerator",[],function(){
15496 c$=Clazz_decorateAsClass(function(){
15497 this.key=false;
15498 this.start=0;
15499 this.entry=null;
15500 Clazz_instantialize(this,arguments);
15501 },java.util,"HashtableEnumerator",null,java.util.Enumeration);
15502
15503 Clazz_makeConstructor(c$,
15504 function(a, b){
15505 this.key = a;
15506 this.h$ = b;
15507 if (this.h$)this.start=this.h$.lastSlot+1;
15508 },"~B,java.util.Hashtable");
15509 Clazz_overrideMethod(c$,"hasMoreElements",
15510 function(){
15511 if (!this.h$)return false;
15512 if(this.entry)return true;
15513
15514 while(--this.start>=this.h$.firstSlot){
15515 if(this.h$.elementData[this.start]){
15516 this.entry=this.h$.elementData[this.start];
15517 return true;
15518 }}
15519 return false;
15520 });
15521 Clazz_overrideMethod(c$,"nextElement",
15522 function(){
15523 if(this.hasMoreElements()){
15524 var a=this.key?this.entry.key:this.entry.value;
15525 this.entry=this.entry.next;
15526 return a;
15527 }
15528 throw new java.util.NoSuchElementException();
15529 });
15530 });
15531
15532 ////////////////////////////
15533
15534 Clazz_load([],"java.util.HashtableEntrySet",[],function(){
15535 c$=Clazz_decorateAsClass(function(){
15536 Clazz_instantialize(this,arguments);
15537 },java.util,"HashtableEntrySet",java.util.AbstractSet);
15538
15539 Clazz_makeConstructor(c$,
15540 function(a){
15541 this.h$ = a;
15542 },"java.util.Hashtable");
15543 Clazz_overrideMethod(c$,"size",
15544 function(){
15545 return this.h$.elementCount;
15546 });
15547 Clazz_overrideMethod(c$,"clear",
15548 function(){
15549 this.h$.clear();
15550 });
15551 Clazz_overrideMethod(c$,"remove",
15552 function(object){
15553 if(this.contains(object)){
15554 this.h$.remove((object).getKey());
15555 return true;
15556 }return false;
15557 },"~O");
15558 Clazz_defineMethod(c$,"contains",
15559 function(object){
15560 var entry=this.h$.getEntry((object).getKey());
15561 return object.equals(entry);
15562 },"~O");
15563
15564 Clazz_overrideMethod(c$,"get",
15565 function(entry){
15566 return entry;
15567 },"java.util.MapEntry");
15568
15569 Clazz_defineMethod(c$,"iterator",
15570 function(){
15571 return new java.util.HashtableIterator(this);
15572 });
15573 });
15574
15575
15576 ////////////////////////////
15577
15578 Clazz_load([],"java.util.HashtableKeySet",[],function(){
15579 c$=Clazz_decorateAsClass(function(){
15580 Clazz_instantialize(this,arguments);
15581 },java.util,"HashtableKeySet",java.util.AbstractSet);
15582
15583 Clazz_makeConstructor(c$,
15584 function(a){
15585 this.h$ = a;
15586 },"java.util.Hashtable");
15587
15588 Clazz_overrideMethod(c$,"contains",
15589 function(object){
15590 return this.h$.containsKey(object);
15591 },"~O");
15592 Clazz_overrideMethod(c$,"size",
15593 function(){
15594 return this.h$.elementCount;
15595 });
15596 Clazz_overrideMethod(c$,"clear",
15597 function(){
15598 this.h$.clear();
15599 });
15600 Clazz_overrideMethod(c$,"remove",
15601 function(key){
15602 if(this.h$.containsKey(key)){
15603 this.h$.remove(key);
15604 return true;
15605 }return false;
15606 },"~O");
15607
15608 Clazz_overrideMethod(c$,"get",
15609 function(entry){
15610 return entry.key;
15611 },"java.util.MapEntry");
15612
15613 Clazz_overrideMethod(c$,"iterator",
15614 function(){
15615 return new java.util.HashtableIterator(this);
15616 });
15617 });
15618
15619 ////////////////////////////
15620
15621 Clazz_load([],"java.util.HashtableValueCollection",[],function(){
15622 c$=Clazz_decorateAsClass(function(){
15623 Clazz_instantialize(this,arguments);
15624 },java.util,"HashtableValueCollection",null,java.util.AbstractCollection);
15625
15626 Clazz_makeConstructor(c$,
15627 function(a){
15628 this.h$ = a;
15629 },"java.util.Hashtable");
15630 Clazz_overrideMethod(c$,"contains",
15631 function(object){
15632 return this.h$.contains(object);
15633 },"~O");
15634 Clazz_overrideMethod(c$,"size",
15635 function(){
15636 return this.h$.elementCount;
15637 });
15638 Clazz_overrideMethod(c$,"clear",
15639 function(){
15640 this.h$.clear();
15641 });
15642
15643 Clazz_overrideMethod(c$,"get",
15644 function(entry){
15645 return entry.value;
15646 },"java.util.MapEntry");
15647
15648 Clazz_overrideMethod(c$,"iterator",
15649 function(){
15650 return new java.util.HashtableIterator(this);
15651 });
15652 });
15653 ////////////////////////////
15654
15655
15656 Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){
15657 c$=Clazz_decorateAsClass(function(){
15658 this.next=null;
15659 this.hashcode=0;
15660 Clazz_instantialize(this,arguments);
15661 },java.util,"HashtableEntry",java.util.MapEntry);
15662 Clazz_overrideConstructor(c$,
15663 function(a,b){
15664 this.key = a;
15665 this.value = b;
15666 this.hashcode=a.hashCode();
15667 });
15668 Clazz_defineMethod(c$,"clone",
15669 function(){
15670 var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]);
15671 if(this.next!=null){
15672 a.next=this.next.clone();
15673 }
15674 return a;
15675 });
15676 Clazz_overrideMethod(c$,"setValue",
15677 function(a){
15678 if(a==null){
15679 throw new NullPointerException();
15680 }var b=this.value;
15681 this.value=a;
15682 return b;
15683 },"~O");
15684 Clazz_defineMethod(c$,"getKeyHash",
15685 function(){
15686 return this.key.hashCode();
15687 });
15688 Clazz_defineMethod(c$,"equalsKey",
15689 function(a,b){
15690 return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a);
15691 },"~O,~N");
15692 Clazz_overrideMethod(c$,"toString",
15693 function(){
15694 return this.key+"="+this.value;
15695 });
15696 });
15697
15698
15699
15700 ////////////////////////////
15701
15702
15703 Clazz_load(["java.util.Dictionary","$.Enumeration","$.HashtableEnumerator","$.Iterator","$.Map","$.MapEntry","$.NoSuchElementException"],"java.util.Hashtable",["java.lang.IllegalArgumentException","$.IllegalStateException","$.NullPointerException","$.StringBuilder","java.util.AbstractCollection","$.AbstractSet","$.Arrays","$.Collections","$.ConcurrentModificationException","java.util.MapEntry.Type","java.util.HashtableEntry"],function(){
15704 c$=Clazz_decorateAsClass(function(){
15705 this.elementCount=0;
15706 this.elementData=null;
15707 this.loadFactor=0;
15708 this.threshold=0;
15709 this.firstSlot=0;
15710 this.lastSlot=-1;
15711 this.modCount=0;
15712 Clazz_instantialize(this,arguments);
15713 },java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);   
15714 c$.newEntry=Clazz_defineMethod(c$,"newEntry",
15715 ($fz=function(key,value,hash){
15716 return new java.util.HashtableEntry(key,value);
15717 },$fz.isPrivate=true,$fz),"~O,~O,~N");
15718 Clazz_overrideConstructor(c$,
15719 function(){
15720 this.elementCount=0;
15721 this.elementData=this.newElementArray(11);
15722 this.firstSlot=this.elementData.length;
15723 this.loadFactor=0.75;
15724 this.computeMaxSize();
15725 });
15726 Clazz_defineMethod(c$,"newElementArray",
15727 ($fz=function(size){
15728 return new Array(size);
15729 },$fz.isPrivate=true,$fz),"~N");
15730 Clazz_overrideMethod(c$,"clear",
15731 function(){
15732 this.elementCount=0;
15733 for (var i = this.elementData.length; --i >= 0;)
15734           this.elementData[i] = null;
15735 this.modCount++;
15736 });
15737 Clazz_defineMethod(c$,"clone",
15738 function(){
15739 try{
15740 var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]);
15741 hashtable.elementData=this.elementData.clone();
15742 var entry;
15743 for(var i=this.elementData.length;--i>=0;){
15744 if((entry=this.elementData[i])){
15745 hashtable.elementData[i]=entry.clone();
15746 }}
15747 return hashtable;
15748 }catch(e){
15749 if(Clazz_instanceOf(e,CloneNotSupportedException)){
15750 return null;
15751 }else{
15752 throw e;
15753 }
15754 }
15755 });
15756 Clazz_defineMethod(c$,"computeMaxSize",
15757 ($fz=function(){
15758 this.threshold=Math.round((this.elementData.length*this.loadFactor));
15759 },$fz.isPrivate=true,$fz));
15760 Clazz_defineMethod(c$,"contains",
15761 function(value){
15762 if(value==null){
15763 throw new NullPointerException();
15764 }for(var i=this.elementData.length;--i>=0;){
15765 var entry=this.elementData[i];
15766 while(entry){
15767 if(value.equals(entry.value)){
15768 return true;
15769 }entry=entry.next;
15770 }
15771 }
15772 return false;
15773 },"~O");
15774 Clazz_overrideMethod(c$,"containsKey",
15775 function(key){
15776         if(!key.hashCode)  {
15777           key.hashCode = function(){return 1};
15778           if (!key.equals)
15779                 key.equals = function(a) {return this == a};
15780         }
15781 return this.getEntry(key)!=null ;
15782 },"~O");
15783 Clazz_overrideMethod(c$,"containsValue",
15784 function(value){
15785 return this.contains(value);
15786 },"~O");
15787 Clazz_overrideMethod(c$,"elements",
15788 function(){
15789 if(this.elementCount==0){
15790 return java.util.Hashtable.EMPTY_ENUMERATION;
15791 }
15792 return new java.util.HashtableEnumerator(false, this);
15793 });
15794 Clazz_overrideMethod(c$,"entrySet",
15795 function(){
15796 return new java.util.HashtableEntrySet(this);
15797 });
15798 Clazz_overrideMethod(c$,"equals",
15799 function(object){
15800 if(this===object){
15801 return true;
15802 }if(Clazz_instanceOf(object,java.util.Map)){
15803 var map=object;
15804 if(this.size()!=map.size()){
15805 return false;
15806 }var entries=this.entrySet();
15807 for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){
15808 if(!entries.contains(e)){
15809 return false;
15810 }}
15811 return true;
15812 }return false;
15813 },"~O");
15814 Clazz_overrideMethod(c$,"get",
15815 function(key){
15816         if(!key.hashCode) { 
15817           key.hashCode = function(){return 1};
15818         if (!key.equals)
15819                 key.equals = function(a) {return this == a};
15820         }
15821 var hash=key.hashCode();
15822 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15823 var entry=this.elementData[index];
15824 while(entry){
15825 if(entry.equalsKey(key,hash)){
15826 return entry.value;
15827 }entry=entry.next;
15828 }
15829 return null;
15830 },"~O");
15831 Clazz_defineMethod(c$,"getEntry",
15832 function(key){
15833 var hash=key.hashCode();
15834 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15835 var entry=this.elementData[index];
15836 while(entry){
15837 if(entry.equalsKey(key,hash)){
15838 return entry;
15839 }entry=entry.next;
15840 }
15841 return null;
15842 },"~O");
15843 Clazz_overrideMethod(c$,"hashCode",
15844 function(){
15845 var result=0;
15846 var it=this.entrySet().iterator();
15847 while(it.hasNext()){
15848 var entry=it.next();
15849 var key=entry.getKey();
15850 var value=entry.getValue();
15851 var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0);
15852 result+=hash;
15853 }
15854 return result;
15855 });
15856 Clazz_overrideMethod(c$,"isEmpty",
15857 function(){
15858 return this.elementCount==0;
15859 });
15860 Clazz_overrideMethod(c$,"keys",
15861 function(){
15862 if(this.elementCount==0){
15863 return java.util.Hashtable.EMPTY_ENUMERATION;
15864 }
15865 return new java.util.HashtableEnumerator(true, this); 
15866 });
15867 Clazz_overrideMethod(c$,"keySet",
15868 function(){
15869 return new java.util.HashtableKeySet(this);
15870 });
15871 Clazz_overrideMethod(c$,"put",
15872 function(key,value){
15873 if(key!=null&&value!=null){
15874         if(!key.hashCode)  {
15875           key.hashCode = function(){return 1};
15876           if (!key.equals)
15877                 key.equals = function(a) {return this == a};
15878         }
15879         var hash=key.hashCode();
15880         var index=(hash&0x7FFFFFFF)%this.elementData.length;
15881         var entry=this.elementData[index];
15882         while(entry!=null&&!entry.equalsKey(key,hash)){
15883         entry=entry.next;
15884 }
15885 if(entry==null){
15886 this.modCount++;
15887 if(++this.elementCount>this.threshold){
15888 this.rehash();
15889 index=(hash&0x7FFFFFFF)%this.elementData.length;
15890 }if(index<this.firstSlot){
15891 this.firstSlot=index;
15892 }if(index>this.lastSlot){
15893 this.lastSlot=index;
15894 }
15895
15896 entry=java.util.Hashtable.newEntry(key,value,hash);
15897 entry.next=this.elementData[index];
15898 this.elementData[index]=entry;
15899 return null;
15900 }var result=entry.value;
15901 entry.value=value;
15902 return result;
15903 }throw new NullPointerException();
15904 },"~O,~O");
15905 Clazz_overrideMethod(c$,"putAll",
15906 function(map){
15907 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
15908 this.put(entry.getKey(),entry.getValue());
15909 }
15910 },"java.util.Map");
15911
15912 Clazz_defineMethod(c$,"rehash",
15913 function(){
15914 var length=(this.elementData.length<<1)+1;
15915 if(length==0){
15916 length=1;
15917 }var newFirst=length;
15918 var newLast=-1;
15919 var newData=this.newElementArray(length);
15920 for(var i=this.lastSlot+1;--i>=this.firstSlot;){
15921 var entry=this.elementData[i];
15922 while(entry!=null){
15923 var index=(entry.getKeyHash()&0x7FFFFFFF)%length;
15924 if(index<newFirst){
15925 newFirst=index;
15926 }if(index>newLast){
15927 newLast=index;
15928 }var next=entry.next;
15929 entry.next=newData[index];
15930 newData[index]=entry;
15931 entry=next;
15932 }
15933 }
15934 this.firstSlot=newFirst;
15935 this.lastSlot=newLast;
15936 this.elementData=newData;
15937 this.computeMaxSize();
15938 });
15939 Clazz_overrideMethod(c$,"remove",
15940 function(key){
15941 var hash=key.hashCode();
15942 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15943 var last=null;
15944 var entry=this.elementData[index];
15945 while(entry!=null&&!entry.equalsKey(key,hash)){
15946 last=entry;
15947 entry=entry.next;
15948 }
15949 if(entry!=null){
15950 this.modCount++;
15951 if(last==null){
15952 this.elementData[index]=entry.next;
15953 }else{
15954 last.next=entry.next;
15955 }this.elementCount--;
15956 var result=entry.value;
15957 entry.value=null;
15958 return result;
15959 }return null;
15960 },"~O");
15961 Clazz_overrideMethod(c$,"size",
15962 function(){
15963 return this.elementCount;
15964 });
15965 Clazz_overrideMethod(c$,"toString",
15966 function(){
15967 if(this.isEmpty()){
15968 return"{}";
15969 }var buffer=new StringBuilder(this.size()*28);
15970 buffer.append('{');
15971 for(var i=this.lastSlot;i>=this.firstSlot;i--){
15972 var entry=this.elementData[i];
15973 while(entry!=null){
15974 if(entry.key!==this){
15975 buffer.append(entry.key);
15976 }else{
15977 buffer.append("(this Map)");
15978 }buffer.append('=');
15979 if(entry.value!==this){
15980 buffer.append(entry.value);
15981 }else{
15982 buffer.append("(this Map)");
15983 }buffer.append(", ");
15984 entry=entry.next;
15985 }
15986 }
15987 if(this.elementCount>0){
15988 buffer.setLength(buffer.length()-2);
15989 }buffer.append('}');
15990 return buffer.toString();
15991 });
15992 Clazz_overrideMethod(c$,"values",
15993 function(){
15994 return new java.util.HashtableValueCollection(this);
15995 });
15996 java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator();
15997 });
15998 c$=Clazz_declareType(java.util,"Dictionary");
15999 Clazz_makeConstructor(c$,
16000 function(){
16001 });
16002 Clazz_declarePackage ("java.net");
16003 Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () {
16004 c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException);
16005 Clazz_makeConstructor (c$, 
16006 function () {
16007 Clazz_superConstructor (this, java.net.MalformedURLException, []);
16008 });
16009 });
16010 Clazz_declarePackage ("java.awt");
16011 Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () {
16012 c$ = Clazz_declareType (java.awt, "GraphicsEnvironment");
16013 Clazz_makeConstructor (c$, 
16014 function () {
16015 });
16016 c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", 
16017 function () {
16018 if (java.awt.GraphicsEnvironment.localEnv == null) {
16019 java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment");
16020 }return java.awt.GraphicsEnvironment.localEnv;
16021 });
16022 c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", 
16023 function () {
16024 return false;
16025 });
16026 c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", 
16027  function () {
16028 return false;
16029 });
16030 c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", 
16031 function () {
16032 });
16033 Clazz_defineMethod (c$, "isHeadlessInstance", 
16034 function () {
16035 return java.awt.GraphicsEnvironment.getHeadlessProperty ();
16036 });
16037 Clazz_defineMethod (c$, "registerFont", 
16038 function (font) {
16039 return true;
16040 }, "java.awt.Font");
16041 Clazz_defineMethod (c$, "preferLocaleFonts", 
16042 function () {
16043 });
16044 Clazz_defineMethod (c$, "preferProportionalFonts", 
16045 function () {
16046 });
16047 Clazz_defineMethod (c$, "getCenterPoint", 
16048 function () {
16049 return null;
16050 });
16051 Clazz_defineStatics (c$,
16052 "localEnv", null);
16053 });
16054 Clazz_declarePackage ("java.awt.event");
16055 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () {
16056 c$ = Clazz_decorateAsClass (function () {
16057 this.opposite = null;
16058 this.oldState = 0;
16059 this.newState = 0;
16060 Clazz_instantialize (this, arguments);
16061 }, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent);
16062 Clazz_makeConstructor (c$, 
16063 function (source, id, opposite, oldState, newState) {
16064 Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]);
16065 this.opposite = opposite;
16066 this.oldState = oldState;
16067 this.newState = newState;
16068 }, "java.awt.Window,~N,java.awt.Window,~N,~N");
16069 Clazz_makeConstructor (c$, 
16070 function (source, id, opposite) {
16071 this.construct (source, id, opposite, 0, 0);
16072 }, "java.awt.Window,~N,java.awt.Window");
16073 Clazz_makeConstructor (c$, 
16074 function (source, id, oldState, newState) {
16075 this.construct (source, id, null, oldState, newState);
16076 }, "java.awt.Window,~N,~N,~N");
16077 Clazz_makeConstructor (c$, 
16078 function (source, id) {
16079 this.construct (source, id, null, 0, 0);
16080 }, "java.awt.Window,~N");
16081 Clazz_defineMethod (c$, "getWindow", 
16082 function () {
16083 return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null;
16084 });
16085 Clazz_defineMethod (c$, "getOppositeWindow", 
16086 function () {
16087 if (this.opposite == null) {
16088 return null;
16089 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
16090 });
16091 Clazz_defineMethod (c$, "getOldState", 
16092 function () {
16093 return this.oldState;
16094 });
16095 Clazz_defineMethod (c$, "getNewState", 
16096 function () {
16097 return this.newState;
16098 });
16099 Clazz_overrideMethod (c$, "paramString", 
16100 function () {
16101 var typeStr;
16102 switch (this.id) {
16103 case 200:
16104 typeStr = "WINDOW_OPENED";
16105 break;
16106 case 201:
16107 typeStr = "WINDOW_CLOSING";
16108 break;
16109 case 202:
16110 typeStr = "WINDOW_CLOSED";
16111 break;
16112 case 203:
16113 typeStr = "WINDOW_ICONIFIED";
16114 break;
16115 case 204:
16116 typeStr = "WINDOW_DEICONIFIED";
16117 break;
16118 case 205:
16119 typeStr = "WINDOW_ACTIVATED";
16120 break;
16121 case 206:
16122 typeStr = "WINDOW_DEACTIVATED";
16123 break;
16124 case 207:
16125 typeStr = "WINDOW_GAINED_FOCUS";
16126 break;
16127 case 208:
16128 typeStr = "WINDOW_LOST_FOCUS";
16129 break;
16130 case 209:
16131 typeStr = "WINDOW_STATE_CHANGED";
16132 break;
16133 default:
16134 typeStr = "unknown type";
16135 }
16136 typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState;
16137 return typeStr;
16138 });
16139 Clazz_defineStatics (c$,
16140 "WINDOW_FIRST", 200,
16141 "WINDOW_OPENED", 200,
16142 "WINDOW_CLOSING", 201,
16143 "WINDOW_CLOSED", 202,
16144 "WINDOW_ICONIFIED", 203,
16145 "WINDOW_DEICONIFIED", 204,
16146 "WINDOW_ACTIVATED", 205,
16147 "WINDOW_DEACTIVATED", 206,
16148 "WINDOW_GAINED_FOCUS", 207,
16149 "WINDOW_LOST_FOCUS", 208,
16150 "WINDOW_STATE_CHANGED", 209,
16151 "WINDOW_LAST", 209);
16152 });
16153 Clazz_declarePackage ("javax.swing");
16154 Clazz_load (["java.awt.Container", "javax.swing.Action", "java.util.ArrayList", "javax.swing.SwingUtilities", "javax.swing.event.EventListenerList", "jssun.awt.RequestFocusController"], "javax.swing.JComponent", ["java.lang.IllegalArgumentException", "java.util.HashSet", "$.Hashtable", "java.applet.Applet", "java.awt.Component", "$.Insets", "$.Rectangle", "$.Window", "java.beans.PropertyChangeListener", "java.util.Locale", "javax.swing.ActionMap", "$.AncestorNotifier", "$.ArrayTable", "$.CellRendererPane", "$.ClientPropertyKey", "$.ComponentInputMap", "$.InputMap", "$.JApplet", "$.JDialog", "$.JFrame", "$.JWindow", "$.KeyStroke", "$.KeyboardManager", "javax.swing.Popup.HeavyWeightWindow", "javax.swing.RepaintManager", "javax.swing.border.AbstractBorder", "javax.swing.event.AncestorListener", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () {
16155 c$ = Clazz_decorateAsClass (function () {
16156 this.isAlignmentXSet = false;
16157 this.alignmentX = 0;
16158 this.isAlignmentYSet = false;
16159 this.alignmentY = 0;
16160 this.ui = null;
16161 this.listenerList = null;
16162 this.clientProperties = null;
16163 this.autoscrolls = false;
16164 this.border = null;
16165 this.flags = 0;
16166 this.verifyInputWhenFocusTarget = true;
16167 this.paintingChild = null;
16168 this.popupMenu = null;
16169 this.focusInputMap = null;
16170 this.ancestorInputMap = null;
16171 this.windowInputMap = null;
16172 this.actionMap = null;
16173 if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) {
16174 javax.swing.JComponent.$JComponent$ActionStandin$ ();
16175 }
16176 Clazz_instantialize (this, arguments);
16177 }, javax.swing, "JComponent", java.awt.Container);
16178 Clazz_prepareFields (c$, function () {
16179 this.listenerList =  new javax.swing.event.EventListenerList ();
16180 });
16181 c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", 
16182 function (c, root) {
16183 {
16184 javax.swing.JComponent.componentObtainingGraphicsFrom = root;
16185 var g = c.getGraphics ();
16186 javax.swing.JComponent.componentObtainingGraphicsFrom = null;
16187 return g;
16188 }}, "java.awt.Component,java.awt.Component");
16189 c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", 
16190 function (root) {
16191 if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) {
16192 var rootPane = (root).getRootPane ();
16193 if (rootPane != null) {
16194 rootPane.disableTrueDoubleBuffering ();
16195 }}}, "java.awt.Component");
16196 c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", 
16197  function (c) {
16198 {
16199 return (javax.swing.JComponent.componentObtainingGraphicsFrom === c);
16200 }}, "java.awt.Component");
16201 c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", 
16202 function () {
16203 {
16204 if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) {
16205 javax.swing.JComponent.managingFocusForwardTraversalKeys =  new java.util.HashSet (1);
16206 javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2));
16207 }}return javax.swing.JComponent.managingFocusForwardTraversalKeys;
16208 });
16209 c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", 
16210 function () {
16211 {
16212 if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) {
16213 javax.swing.JComponent.managingFocusBackwardTraversalKeys =  new java.util.HashSet (1);
16214 javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3));
16215 }}return javax.swing.JComponent.managingFocusBackwardTraversalKeys;
16216 });
16217 c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", 
16218  function () {
16219 {
16220 var rect;
16221 var size = javax.swing.JComponent.tempRectangles.size ();
16222 if (size > 0) {
16223 rect = javax.swing.JComponent.tempRectangles.remove (size - 1);
16224 } else {
16225 rect =  new java.awt.Rectangle (0, 0, 0, 0);
16226 }return rect;
16227 }});
16228 c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", 
16229  function (rect) {
16230 {
16231 javax.swing.JComponent.tempRectangles.add (rect);
16232 }}, "java.awt.Rectangle");
16233 Clazz_defineMethod (c$, "setInheritsPopupMenu", 
16234 function (value) {
16235 var oldValue = this.getFlag (23);
16236 this.setFlag (23, value);
16237 this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value);
16238 }, "~B");
16239 Clazz_defineMethod (c$, "getInheritsPopupMenu", 
16240 function () {
16241 return this.getFlag (23);
16242 });
16243 Clazz_defineMethod (c$, "setComponentPopupMenu", 
16244 function (popup) {
16245 if (popup != null) {
16246 this.enableEvents (16);
16247 }var oldPopup = this.popupMenu;
16248 this.popupMenu = popup;
16249 this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup);
16250 }, "javax.swing.JPopupMenu");
16251 Clazz_defineMethod (c$, "getComponentPopupMenu", 
16252 function () {
16253 if (!this.getInheritsPopupMenu ()) {
16254 return this.popupMenu;
16255 }if (this.popupMenu == null) {
16256 var parent = this.getParent ();
16257 while (parent != null) {
16258 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16259 return (parent).getComponentPopupMenu ();
16260 }if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
16261 break;
16262 }parent = parent.getParent ();
16263 }
16264 return null;
16265 }return this.popupMenu;
16266 });
16267 Clazz_makeConstructor (c$, 
16268 function () {
16269 Clazz_superConstructor (this, javax.swing.JComponent);
16270 this.enableEvents (8);
16271 Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]);
16272 });
16273 Clazz_defineMethod (c$, "updateUI", 
16274 function () {
16275 });
16276 Clazz_defineMethod (c$, "setUI", 
16277 function (newUI) {
16278 this.uninstallUIAndProperties ();
16279 this.ui = newUI;
16280 if (this.ui != null) {
16281 this.ui.installUI (this);
16282 }this.revalidate ();
16283 this.repaint ();
16284 }, "javax.swing.plaf.ComponentUI");
16285 Clazz_defineMethod (c$, "getUI", 
16286 function () {
16287 return this.ui;
16288 });
16289 Clazz_defineMethod (c$, "uninstallUIAndProperties", 
16290  function () {
16291 if (this.ui != null) {
16292 this.ui.uninstallUI (this);
16293 }});
16294 Clazz_defineMethod (c$, "getUIClassID", 
16295 function () {
16296 return "ComponentUI";
16297 });
16298 Clazz_defineMethod (c$, "getComponentGraphics", 
16299 function (g) {
16300 var componentGraphics = g;
16301 componentGraphics.setColor (this.getForeground ());
16302 componentGraphics.setFont (this.getFont ());
16303 return componentGraphics;
16304 }, "java.awt.Graphics");
16305 Clazz_defineMethod (c$, "paintComponent", 
16306 function (g) {
16307 if (this.ui != null) {
16308 var scratchGraphics = (g == null) ? null : g.createSwingJS ();
16309 try {
16310 this.ui.update (scratchGraphics, this);
16311 } finally {
16312 scratchGraphics.dispose ();
16313 }
16314 }}, "java.awt.Graphics");
16315 Clazz_defineMethod (c$, "paintChildren", 
16316 function (g) {
16317 var isJComponent;
16318 var sg = g;
16319 {
16320 var i = this.getComponentCount () - 1;
16321 if (i < 0) {
16322 return;
16323 }if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) {
16324 for (; i >= 0; i--) {
16325 if (this.getComponent (i) === this.paintingChild) {
16326 break;
16327 }}
16328 }var tmpRect = javax.swing.JComponent.fetchRectangle ();
16329 for (; i >= 0; i--) {
16330 var comp = this.getComponent (i);
16331 isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent));
16332 if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) {
16333 var cr = comp.getBounds (tmpRect);
16334 var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height);
16335 cg.setColor (comp.getForeground ());
16336 cg.setFont (comp.getFont ());
16337 var shouldSetFlagBack = false;
16338 try {
16339 if (isJComponent) {
16340 (comp).paint (cg);
16341 } else {
16342 comp.paint (cg);
16343 }} finally {
16344 cg.dispose ();
16345 if (shouldSetFlagBack) {
16346 (comp).setFlag (1, false);
16347 (comp).setFlag (2, false);
16348 }}
16349 }}
16350 javax.swing.JComponent.recycleRectangle (tmpRect);
16351 }}, "java.awt.Graphics");
16352 Clazz_defineMethod (c$, "paintBorder", 
16353 function (g) {
16354 var border = this.getBorder ();
16355 if (border != null) {
16356 border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ());
16357 }}, "java.awt.Graphics");
16358 Clazz_overrideMethod (c$, "update", 
16359 function (g) {
16360 this.paint (g);
16361 }, "java.awt.Graphics");
16362 Clazz_overrideMethod (c$, "paint", 
16363 function (g) {
16364 var shouldClearPaintFlags = false;
16365 if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) {
16366 return;
16367 }var componentGraphics = this.getComponentGraphics (g);
16368 var co = componentGraphics.createSwingJS ();
16369 try {
16370 if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) {
16371 this.adjustPaintFlags ();
16372 shouldClearPaintFlags = true;
16373 }this.paintComponent (co);
16374 this.paintBorder (co);
16375 this.paintChildren (co);
16376 } finally {
16377 co.dispose ();
16378 if (shouldClearPaintFlags) {
16379 this.setFlag (1, false);
16380 this.setFlag (2, false);
16381 this.setFlag (11, false);
16382 this.setFlag (12, false);
16383 }}
16384 }, "java.awt.Graphics");
16385 Clazz_defineMethod (c$, "paintForceDoubleBuffered", 
16386 function (g) {
16387 var rm = javax.swing.RepaintManager.currentManager (this);
16388 var clip = g.getClipBounds ();
16389 rm.beginPaint ();
16390 this.setFlag (13, true);
16391 try {
16392 rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height);
16393 } finally {
16394 rm.endPaint ();
16395 this.setFlag (13, false);
16396 }
16397 }, "java.awt.Graphics");
16398 Clazz_defineMethod (c$, "isPainting", 
16399 function () {
16400 var component = this;
16401 while (component != null) {
16402 if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) {
16403 return true;
16404 }component = component.getParent ();
16405 }
16406 return false;
16407 });
16408 Clazz_defineMethod (c$, "adjustPaintFlags", 
16409  function () {
16410 var jparent = null;
16411 var parent;
16412 for (parent = this.getParent (); parent != null; parent = parent.getParent ()) {
16413 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16414 jparent = parent;
16415 if (jparent.getFlag (1)) this.setFlag (1, true);
16416 if (jparent.getFlag (2)) this.setFlag (2, true);
16417 if (jparent.getFlag (11)) this.setFlag (11, true);
16418 if (jparent.getFlag (12)) this.setFlag (12, true);
16419 break;
16420 }}
16421 });
16422 Clazz_overrideMethod (c$, "printAll", 
16423 function (g) {
16424 this.setFlag (12, true);
16425 try {
16426 this.print (g);
16427 } finally {
16428 this.setFlag (12, false);
16429 }
16430 }, "java.awt.Graphics");
16431 Clazz_overrideMethod (c$, "print", 
16432 function (g) {
16433 this.setFlag (11, true);
16434 this.firePropertyChangeBool ("paintingForPrint", false, true);
16435 try {
16436 this.paint (g);
16437 } finally {
16438 this.setFlag (11, false);
16439 this.firePropertyChangeBool ("paintingForPrint", true, false);
16440 }
16441 }, "java.awt.Graphics");
16442 Clazz_defineMethod (c$, "printComponent", 
16443 function (g) {
16444 this.paintComponent (g);
16445 }, "java.awt.Graphics");
16446 Clazz_defineMethod (c$, "printChildren", 
16447 function (g) {
16448 this.paintChildren (g);
16449 }, "java.awt.Graphics");
16450 Clazz_defineMethod (c$, "printBorder", 
16451 function (g) {
16452 this.paintBorder (g);
16453 }, "java.awt.Graphics");
16454 Clazz_defineMethod (c$, "isPaintingTile", 
16455 function () {
16456 return this.getFlag (2);
16457 });
16458 Clazz_defineMethod (c$, "isPaintingForPrint", 
16459 function () {
16460 return this.getFlag (11);
16461 });
16462 Clazz_defineMethod (c$, "isManagingFocus", 
16463 function () {
16464 return false;
16465 });
16466 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16467  function () {
16468 this.registerNextFocusableComponent (this.getNextFocusableComponent ());
16469 });
16470 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16471  function (nextFocusableComponent) {
16472 if (nextFocusableComponent == null) {
16473 return;
16474 }}, "java.awt.Component");
16475 Clazz_defineMethod (c$, "deregisterNextFocusableComponent", 
16476  function () {
16477 var nextFocusableComponent = this.getNextFocusableComponent ();
16478 if (nextFocusableComponent == null) {
16479 return;
16480 }var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16481 if (nearestRoot == null) {
16482 return;
16483 }});
16484 Clazz_defineMethod (c$, "setNextFocusableComponent", 
16485 function (aComponent) {
16486 var displayable = this.isDisplayable ();
16487 if (displayable) {
16488 this.deregisterNextFocusableComponent ();
16489 }this.putClientProperty ("nextFocus", aComponent);
16490 if (displayable) {
16491 this.registerNextFocusableComponent (aComponent);
16492 }}, "java.awt.Component");
16493 Clazz_defineMethod (c$, "getNextFocusableComponent", 
16494 function () {
16495 return this.getClientProperty ("nextFocus");
16496 });
16497 Clazz_defineMethod (c$, "setRequestFocusEnabled", 
16498 function (requestFocusEnabled) {
16499 this.setFlag (22, !requestFocusEnabled);
16500 }, "~B");
16501 Clazz_defineMethod (c$, "isRequestFocusEnabled", 
16502 function () {
16503 return !this.getFlag (22);
16504 });
16505 Clazz_defineMethod (c$, "requestFocus", 
16506 function (temporary) {
16507 Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []);
16508 return true;
16509 }, "~B");
16510 Clazz_defineMethod (c$, "requestFocusInWindow", 
16511 function (temporary) {
16512 return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []);
16513 }, "~B");
16514 Clazz_defineMethod (c$, "grabFocus", 
16515 function () {
16516 this.requestFocus ();
16517 });
16518 Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", 
16519 function (verifyInputWhenFocusTarget) {
16520 var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget;
16521 this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget;
16522 this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget);
16523 }, "~B");
16524 Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", 
16525 function () {
16526 return this.verifyInputWhenFocusTarget;
16527 });
16528 Clazz_overrideMethod (c$, "getFontMetrics", 
16529 function (font) {
16530 return jssun.font.FontDesignMetrics.getMetrics (font);
16531 }, "java.awt.Font");
16532 Clazz_overrideMethod (c$, "getPreferredSize", 
16533 function () {
16534 return this.getPrefSizeJComp ();
16535 });
16536 Clazz_defineMethod (c$, "getPrefSizeJComp", 
16537 function () {
16538 var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this));
16539 return (size == null ? this.preferredSize () : size);
16540 });
16541 Clazz_defineMethod (c$, "getMaximumSize", 
16542 function () {
16543 if (this.isMaximumSizeSet ()) {
16544 return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16545 }var size = null;
16546 if (this.ui != null) {
16547 size = this.ui.getMaximumSize (this);
16548 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16549 });
16550 Clazz_defineMethod (c$, "getMinimumSize", 
16551 function () {
16552 if (this.isMinimumSizeSet ()) {
16553 return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16554 }var size = null;
16555 if (this.ui != null) {
16556 size = this.ui.getMinimumSize (this);
16557 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16558 });
16559 Clazz_overrideMethod (c$, "contains", 
16560 function (x, y) {
16561 return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y);
16562 }, "~N,~N");
16563 Clazz_defineMethod (c$, "setBorder", 
16564 function (border) {
16565 var oldBorder = this.border;
16566 this.border = border;
16567 this.firePropertyChangeObject ("border", oldBorder, border);
16568 if (border !== oldBorder) {
16569 if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) {
16570 this.revalidate ();
16571 }this.repaint ();
16572 }}, "javax.swing.border.Border");
16573 Clazz_defineMethod (c$, "getBorder", 
16574 function () {
16575 return this.border;
16576 });
16577 Clazz_defineMethod (c$, "getInsets", 
16578 function () {
16579 if (this.border != null) {
16580 return this.border.getBorderInsets (this);
16581 }return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []);
16582 });
16583 Clazz_defineMethod (c$, "getInsets", 
16584 function (insets) {
16585 if (insets == null) {
16586 insets =  new java.awt.Insets (0, 0, 0, 0);
16587 }if (this.border != null) {
16588 if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) {
16589 return (this.border).getBorderInsets (this, insets);
16590 } else {
16591 return this.border.getBorderInsets (this);
16592 }} else {
16593 insets.left = insets.top = insets.right = insets.bottom = 0;
16594 return insets;
16595 }}, "java.awt.Insets");
16596 Clazz_defineMethod (c$, "getAlignmentY", 
16597 function () {
16598 if (this.isAlignmentYSet) {
16599 return this.alignmentY;
16600 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []);
16601 });
16602 Clazz_defineMethod (c$, "setAlignmentY", 
16603 function (alignmentY) {
16604 this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY;
16605 this.isAlignmentYSet = true;
16606 }, "~N");
16607 Clazz_defineMethod (c$, "getAlignmentX", 
16608 function () {
16609 if (this.isAlignmentXSet) {
16610 return this.alignmentX;
16611 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []);
16612 });
16613 Clazz_defineMethod (c$, "setAlignmentX", 
16614 function (alignmentX) {
16615 this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX;
16616 this.isAlignmentXSet = true;
16617 }, "~N");
16618 Clazz_defineMethod (c$, "setInputVerifier", 
16619 function (inputVerifier) {
16620 var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16621 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier);
16622 this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier);
16623 }, "javax.swing.InputVerifier");
16624 Clazz_defineMethod (c$, "getInputVerifier", 
16625 function () {
16626 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16627 });
16628 Clazz_defineMethod (c$, "registerKeyboardAction", 
16629 function (anAction, aCommand, aKeyStroke, aCondition) {
16630 var inputMap = this.getInputMap (aCondition, true);
16631 if (inputMap != null) {
16632 var actionMap = this.getActionMap (true);
16633 var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand);
16634 inputMap.put (aKeyStroke, action);
16635 if (actionMap != null) {
16636 actionMap.put (action, action);
16637 }}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");
16638 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16639  function (onlyIfNew) {
16640 var inputMap = this.getInputMap (2, false);
16641 var strokes;
16642 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16643 if (inputMap != null) {
16644 strokes = inputMap.allKeys ();
16645 if (strokes != null) {
16646 for (var counter = strokes.length - 1; counter >= 0; counter--) {
16647 if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) {
16648 this.registerWithKeyboardManager (strokes[counter]);
16649 }if (registered != null) {
16650 registered.remove (strokes[counter]);
16651 }}
16652 }} else {
16653 strokes = null;
16654 }if (registered != null && registered.size () > 0) {
16655 var keys = registered.keys ();
16656 while (keys.hasMoreElements ()) {
16657 var ks = keys.nextElement ();
16658 this.unregisterWithKeyboardManager (ks);
16659 }
16660 registered.clear ();
16661 }if (strokes != null && strokes.length > 0) {
16662 if (registered == null) {
16663 registered =  new java.util.Hashtable (strokes.length);
16664 this.putClientProperty ("_WhenInFocusedWindow", registered);
16665 }for (var counter = strokes.length - 1; counter >= 0; counter--) {
16666 registered.put (strokes[counter], strokes[counter]);
16667 }
16668 } else {
16669 this.putClientProperty ("_WhenInFocusedWindow", null);
16670 }}, "~B");
16671 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16672  function () {
16673 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16674 if (registered != null && registered.size () > 0) {
16675 var keys = registered.keys ();
16676 while (keys.hasMoreElements ()) {
16677 var ks = keys.nextElement ();
16678 this.unregisterWithKeyboardManager (ks);
16679 }
16680 }this.putClientProperty ("_WhenInFocusedWindow", null);
16681 });
16682 Clazz_defineMethod (c$, "componentInputMapChanged", 
16683 function (inputMap) {
16684 var km = this.getInputMap (2, false);
16685 while (km !== inputMap && km != null) {
16686 km = km.getParent ();
16687 }
16688 if (km != null) {
16689 this.registerWithKeyboardManager (false);
16690 }}, "javax.swing.ComponentInputMap");
16691 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16692  function (aKeyStroke) {
16693 javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this);
16694 }, "javax.swing.KeyStroke");
16695 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16696  function (aKeyStroke) {
16697 javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this);
16698 }, "javax.swing.KeyStroke");
16699 Clazz_defineMethod (c$, "registerKeyboardAction", 
16700 function (anAction, aKeyStroke, aCondition) {
16701 this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition);
16702 }, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N");
16703 Clazz_defineMethod (c$, "unregisterKeyboardAction", 
16704 function (aKeyStroke) {
16705 var am = this.getActionMap (false);
16706 for (var counter = 0; counter < 3; counter++) {
16707 var km = this.getInputMap (counter, false);
16708 if (km != null) {
16709 var actionID = km.get (aKeyStroke);
16710 if (am != null && actionID != null) {
16711 am.remove (actionID);
16712 }km.remove (aKeyStroke);
16713 }}
16714 }, "javax.swing.KeyStroke");
16715 Clazz_defineMethod (c$, "getRegisteredKeyStrokes", 
16716 function () {
16717 var counts =  Clazz_newIntArray (3, 0);
16718 var strokes =  new Array (3);
16719 for (var counter = 0; counter < 3; counter++) {
16720 var km = this.getInputMap (counter, false);
16721 strokes[counter] = (km != null) ? km.allKeys () : null;
16722 counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0;
16723 }
16724 var retValue =  new Array (counts[0] + counts[1] + counts[2]);
16725 for (var counter = 0, last = 0; counter < 3; counter++) {
16726 if (counts[counter] > 0) {
16727 System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]);
16728 last += counts[counter];
16729 }}
16730 return retValue;
16731 });
16732 Clazz_defineMethod (c$, "getConditionForKeyStroke", 
16733 function (aKeyStroke) {
16734 for (var counter = 0; counter < 3; counter++) {
16735 var inputMap = this.getInputMap (counter, false);
16736 if (inputMap != null && inputMap.get (aKeyStroke) != null) {
16737 return counter;
16738 }}
16739 return -1;
16740 }, "javax.swing.KeyStroke");
16741 Clazz_defineMethod (c$, "getActionForKeyStroke", 
16742 function (aKeyStroke) {
16743 var am = this.getActionMap (false);
16744 if (am == null) {
16745 return null;
16746 }for (var counter = 0; counter < 3; counter++) {
16747 var inputMap = this.getInputMap (counter, false);
16748 if (inputMap != null) {
16749 var actionBinding = inputMap.get (aKeyStroke);
16750 if (actionBinding != null) {
16751 var action = am.get (actionBinding);
16752 if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) {
16753 return (action).actionListener;
16754 }return action;
16755 }}}
16756 return null;
16757 }, "javax.swing.KeyStroke");
16758 Clazz_defineMethod (c$, "resetKeyboardActions", 
16759 function () {
16760 for (var counter = 0; counter < 3; counter++) {
16761 var inputMap = this.getInputMap (counter, false);
16762 if (inputMap != null) {
16763 inputMap.clear ();
16764 }}
16765 var am = this.getActionMap (false);
16766 if (am != null) {
16767 am.clear ();
16768 }});
16769 Clazz_defineMethod (c$, "setInputMap", 
16770 function (condition, map) {
16771 switch (condition) {
16772 case 2:
16773 if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) {
16774 throw  new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");
16775 }this.windowInputMap = map;
16776 this.setFlag (7, true);
16777 this.registerWithKeyboardManager (false);
16778 break;
16779 case 1:
16780 this.ancestorInputMap = map;
16781 this.setFlag (6, true);
16782 break;
16783 case 0:
16784 this.focusInputMap = map;
16785 this.setFlag (5, true);
16786 break;
16787 default:
16788 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16789 }
16790 }, "~N,javax.swing.InputMap");
16791 Clazz_defineMethod (c$, "getInputMap", 
16792 function (condition) {
16793 return this.getInputMap (condition, true);
16794 }, "~N");
16795 Clazz_defineMethod (c$, "getInputMap", 
16796 function () {
16797 return this.getInputMap (0, true);
16798 });
16799 Clazz_defineMethod (c$, "setActionMap", 
16800 function (am) {
16801 this.actionMap = am;
16802 this.setFlag (8, true);
16803 }, "javax.swing.ActionMap");
16804 Clazz_defineMethod (c$, "getActionMap", 
16805 function () {
16806 return this.getActionMap (true);
16807 });
16808 Clazz_defineMethod (c$, "getInputMap", 
16809 function (condition, create) {
16810 switch (condition) {
16811 case 0:
16812 if (this.getFlag (5)) {
16813 return this.focusInputMap;
16814 }if (create) {
16815 var km =  new javax.swing.InputMap ();
16816 this.setInputMap (condition, km);
16817 return km;
16818 }break;
16819 case 1:
16820 if (this.getFlag (6)) {
16821 return this.ancestorInputMap;
16822 }if (create) {
16823 var km =  new javax.swing.InputMap ();
16824 this.setInputMap (condition, km);
16825 return km;
16826 }break;
16827 case 2:
16828 if (this.getFlag (7)) {
16829 return this.windowInputMap;
16830 }if (create) {
16831 var km =  new javax.swing.ComponentInputMap (this);
16832 this.setInputMap (condition, km);
16833 return km;
16834 }break;
16835 default:
16836 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16837 }
16838 return null;
16839 }, "~N,~B");
16840 Clazz_defineMethod (c$, "getActionMap", 
16841 function (create) {
16842 {
16843 (arguments.length == 0) && (create = true);
16844 }if (this.getFlag (8)) {
16845 return this.actionMap;
16846 }if (create) {
16847 var am =  new javax.swing.ActionMap ();
16848 this.setActionMap (am);
16849 return am;
16850 }return null;
16851 }, "~B");
16852 Clazz_defineMethod (c$, "getBaseline", 
16853 function (width, height) {
16854 Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]);
16855 if (this.ui != null) {
16856 return this.ui.getBaseline (this, width, height);
16857 }return -1;
16858 }, "~N,~N");
16859 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
16860 function () {
16861 if (this.ui != null) {
16862 return this.ui.getBaselineResizeBehavior (this);
16863 }return java.awt.Component.BaselineResizeBehavior.OTHER;
16864 });
16865 Clazz_defineMethod (c$, "requestDefaultFocus", 
16866 function () {
16867 var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16868 if (nearestRoot == null) {
16869 return false;
16870 }return false;
16871 });
16872 Clazz_defineMethod (c$, "setVisible", 
16873 function (aFlag) {
16874 if (aFlag != this.isVisible ()) {
16875 Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]);
16876 var parent = this.getParent ();
16877 if (parent != null) {
16878 var r = this.getBounds ();
16879 parent.repaint (r.x, r.y, r.width, r.height);
16880 }this.revalidate ();
16881 }}, "~B");
16882 Clazz_defineMethod (c$, "setEnabled", 
16883 function (enabled) {
16884 var oldEnabled = this.isEnabled ();
16885 Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]);
16886 this.firePropertyChangeBool ("enabled", oldEnabled, enabled);
16887 if (enabled != oldEnabled) {
16888 this.repaint ();
16889 }}, "~B");
16890 Clazz_defineMethod (c$, "setForeground", 
16891 function (fg) {
16892 var oldFg = this.getForeground ();
16893 Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]);
16894 if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) {
16895 this.repaint ();
16896 }}, "java.awt.Color");
16897 Clazz_defineMethod (c$, "setBackground", 
16898 function (bg) {
16899 var oldBg = this.getBackground ();
16900 Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]);
16901 if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) {
16902 this.repaint ();
16903 }}, "java.awt.Color");
16904 Clazz_defineMethod (c$, "setFont", 
16905 function (font) {
16906 var oldFont = this.getFont ();
16907 Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]);
16908 if (font !== oldFont) {
16909 this.revalidate ();
16910 this.repaint ();
16911 }}, "java.awt.Font");
16912 c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", 
16913 function () {
16914 var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale");
16915 if (l == null) {
16916 l = java.util.Locale.getDefault ();
16917 javax.swing.JComponent.setDefaultLocale (l);
16918 }return l;
16919 });
16920 c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", 
16921 function (l) {
16922 javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l);
16923 }, "java.util.Locale");
16924 Clazz_defineMethod (c$, "processComponentKeyEvent", 
16925 function (e) {
16926 }, "java.awt.event.KeyEvent");
16927 Clazz_defineMethod (c$, "processKeyEvent", 
16928 function (e) {
16929 var shouldProcessKey;
16930 Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]);
16931 if (!e.isConsumed ()) {
16932 this.processComponentKeyEvent (e);
16933 }shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e);
16934 if (e.isConsumed ()) {
16935 return;
16936 }if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) {
16937 e.consume ();
16938 }}, "java.awt.event.KeyEvent");
16939 Clazz_defineMethod (c$, "processKeyBinding", 
16940 function (ks, e, condition, pressed) {
16941 var map = this.getInputMap (condition, false);
16942 var am = this.getActionMap (false);
16943 if (map != null && am != null && this.isEnabled ()) {
16944 var binding = map.get (ks);
16945 var action = (binding == null) ? null : am.get (binding);
16946 if (action != null) {
16947 return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ());
16948 }}return false;
16949 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
16950 Clazz_defineMethod (c$, "processKeyBindings", 
16951 function (e, pressed) {
16952 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) {
16953 return false;
16954 }var ks;
16955 if (e.getID () == 400) {
16956 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
16957 } else {
16958 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true));
16959 }if (this.processKeyBinding (ks, e, 0, pressed)) return true;
16960 var parent = this;
16961 while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) {
16962 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16963 if ((parent).processKeyBinding (ks, e, 1, pressed)) return true;
16964 }parent = parent.getParent ();
16965 }
16966 if (parent != null) {
16967 return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed);
16968 }return false;
16969 }, "java.awt.event.KeyEvent,~B");
16970 c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", 
16971 function (e, container, pressed) {
16972 while (true) {
16973 if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) {
16974 return true;
16975 }if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) {
16976 container = (container).getOwner ();
16977 } else {
16978 return false;
16979 }}
16980 }, "java.awt.event.KeyEvent,java.awt.Container,~B");
16981 Clazz_defineMethod (c$, "setToolTipText", 
16982 function (text) {
16983 this.putClientProperty ("ToolTipText", text);
16984 }, "~S");
16985 Clazz_defineMethod (c$, "getToolTipText", 
16986 function () {
16987 return this.getClientProperty ("ToolTipText");
16988 });
16989 Clazz_defineMethod (c$, "getToolTipText", 
16990 function (event) {
16991 return this.getToolTipText ();
16992 }, "java.awt.event.MouseEvent");
16993 Clazz_defineMethod (c$, "getToolTipLocation", 
16994 function (event) {
16995 return null;
16996 }, "java.awt.event.MouseEvent");
16997 Clazz_defineMethod (c$, "getPopupLocation", 
16998 function (event) {
16999 return null;
17000 }, "java.awt.event.MouseEvent");
17001 Clazz_defineMethod (c$, "createToolTip", 
17002 function () {
17003 var tip =  new javax.swing.JToolTip ();
17004 tip.setComponent (this);
17005 return tip;
17006 });
17007 Clazz_defineMethod (c$, "scrollRectToVisible", 
17008 function (aRect) {
17009 var parent;
17010 var dx = this.getX ();
17011 var dy = this.getY ();
17012 for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) {
17013 var bounds = parent.getBounds ();
17014 dx += bounds.x;
17015 dy += bounds.y;
17016 }
17017 if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) {
17018 aRect.x += dx;
17019 aRect.y += dy;
17020 (parent).scrollRectToVisible (aRect);
17021 aRect.x -= dx;
17022 aRect.y -= dy;
17023 }}, "java.awt.Rectangle");
17024 Clazz_defineMethod (c$, "setAutoscrolls", 
17025 function (autoscrolls) {
17026 }, "~B");
17027 Clazz_defineMethod (c$, "getAutoscrolls", 
17028 function () {
17029 return this.autoscrolls;
17030 });
17031 Clazz_defineMethod (c$, "superProcessMouseMotionEvent", 
17032 function (e) {
17033 Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]);
17034 }, "java.awt.event.MouseEvent");
17035 Clazz_defineMethod (c$, "setCreatedDoubleBuffer", 
17036 function (newValue) {
17037 this.setFlag (9, newValue);
17038 }, "~B");
17039 Clazz_defineMethod (c$, "getCreatedDoubleBuffer", 
17040 function () {
17041 return this.getFlag (9);
17042 });
17043 Clazz_defineMethod (c$, "getClientProperties", 
17044  function () {
17045 if (this.clientProperties == null) {
17046 this.clientProperties =  new javax.swing.ArrayTable ();
17047 }return this.clientProperties;
17048 });
17049 Clazz_defineMethod (c$, "getClientProperty", 
17050 function (key) {
17051 if (this.clientProperties == null) {
17052 return null;
17053 } else {
17054 {
17055 return this.clientProperties.get (key);
17056 }}}, "~O");
17057 Clazz_defineMethod (c$, "putClientProperty", 
17058 function (key, value) {
17059 if (value == null && this.clientProperties == null) {
17060 return;
17061 }var clientProperties = this.getClientProperties ();
17062 var oldValue;
17063 {
17064 oldValue = clientProperties.get (key);
17065 if (value != null) {
17066 clientProperties.put (key, value);
17067 } else if (oldValue != null) {
17068 clientProperties.remove (key);
17069 } else {
17070 return;
17071 }}this.clientPropertyChanged (key, oldValue, value);
17072 this.firePropertyChangeObject (key.toString (), oldValue, value);
17073 }, "~O,~O");
17074 Clazz_defineMethod (c$, "clientPropertyChanged", 
17075 function (key, oldValue, newValue) {
17076 }, "~O,~O,~O");
17077 Clazz_defineMethod (c$, "setUIProperty", 
17078 function (propertyName, value) {
17079 if (propertyName === "opaque") {
17080 if (!this.getFlag (24)) {
17081 this.setOpaque ((value).booleanValue ());
17082 this.setFlag (24, false);
17083 }} else if (propertyName === "autoscrolls") {
17084 if (!this.getFlag (25)) {
17085 this.setAutoscrolls ((value).booleanValue ());
17086 this.setFlag (25, false);
17087 }} else if (propertyName === "focusTraversalKeysForward") {
17088 } else if (propertyName === "focusTraversalKeysBackward") {
17089 } else {
17090 System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5));
17091 }}, "~S,~O");
17092 c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", 
17093 function (c) {
17094 return !(Clazz_instanceOf (c, javax.swing.JApplet) || Clazz_instanceOf (c, javax.swing.JFrame) || Clazz_instanceOf (c, javax.swing.JWindow) || Clazz_instanceOf (c, javax.swing.JDialog));
17095 }, "java.awt.Component");
17096 Clazz_overrideMethod (c$, "isOpaque", 
17097 function () {
17098 return this.getFlag (3);
17099 });
17100 Clazz_defineMethod (c$, "setOpaque", 
17101 function (isOpaque) {
17102 var oldValue = this.getFlag (3);
17103 this.setFlag (3, isOpaque);
17104 this.setFlag (24, true);
17105 this.firePropertyChangeBool ("opaque", oldValue, isOpaque);
17106 }, "~B");
17107 Clazz_defineMethod (c$, "rectangleIsObscured", 
17108 function (x, y, width, height) {
17109 var numChildren = this.getComponentCount ();
17110 for (var i = 0; i < numChildren; i++) {
17111 var child = this.getComponent (i);
17112 var cx;
17113 var cy;
17114 var cw;
17115 var ch;
17116 cx = child.getX ();
17117 cy = child.getY ();
17118 cw = child.getWidth ();
17119 ch = child.getHeight ();
17120 if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) {
17121 if (Clazz_instanceOf (child, javax.swing.JComponent)) {
17122 return (child).isOpaque ();
17123 } else {
17124 return false;
17125 }}}
17126 return false;
17127 }, "~N,~N,~N,~N");
17128 c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", 
17129 function (c, visibleRect) {
17130 var p = c.getParent ();
17131 var bounds = c.getBounds ();
17132 if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17133 visibleRect.reshape (0, 0, bounds.width, bounds.height);
17134 } else {
17135 javax.swing.JComponent.computeVisibleRect (p, visibleRect);
17136 visibleRect.x -= bounds.x;
17137 visibleRect.y -= bounds.y;
17138 javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect);
17139 }}, "java.awt.Component,java.awt.Rectangle");
17140 Clazz_defineMethod (c$, "computeVisibleRect", 
17141 function (visibleRect) {
17142 javax.swing.JComponent.computeVisibleRect (this, visibleRect);
17143 }, "java.awt.Rectangle");
17144 Clazz_defineMethod (c$, "getVisibleRect", 
17145 function () {
17146 var visibleRect =  new java.awt.Rectangle ();
17147 this.computeVisibleRect (visibleRect);
17148 return visibleRect;
17149 });
17150 Clazz_defineMethod (c$, "getTopLevelAncestor", 
17151 function () {
17152 for (var p = this; p != null; p = p.getParent ()) {
17153 if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17154 return p;
17155 }}
17156 return null;
17157 });
17158 Clazz_defineMethod (c$, "getAncestorNotifier", 
17159  function () {
17160 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER);
17161 });
17162 Clazz_defineMethod (c$, "addAncestorListener", 
17163 function (listener) {
17164 var ancestorNotifier = this.getAncestorNotifier ();
17165 if (ancestorNotifier == null) {
17166 ancestorNotifier =  new javax.swing.AncestorNotifier (this);
17167 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier);
17168 }ancestorNotifier.addAncestorListener (listener);
17169 }, "javax.swing.event.AncestorListener");
17170 Clazz_defineMethod (c$, "removeAncestorListener", 
17171 function (listener) {
17172 var ancestorNotifier = this.getAncestorNotifier ();
17173 if (ancestorNotifier == null) {
17174 return;
17175 }ancestorNotifier.removeAncestorListener (listener);
17176 if (ancestorNotifier.listenerList.getListenerList ().length == 0) {
17177 ancestorNotifier.removeAllListeners ();
17178 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null);
17179 }}, "javax.swing.event.AncestorListener");
17180 Clazz_defineMethod (c$, "getAncestorListeners", 
17181 function () {
17182 var ancestorNotifier = this.getAncestorNotifier ();
17183 if (ancestorNotifier == null) {
17184 return  new Array (0);
17185 }return ancestorNotifier.getAncestorListeners ();
17186 });
17187 Clazz_defineMethod (c$, "getListeners", 
17188 function (listenerType) {
17189 var result;
17190 if (listenerType === javax.swing.event.AncestorListener) {
17191 result = this.getAncestorListeners ();
17192 } else if (listenerType === java.beans.PropertyChangeListener) {
17193 result = this.getPropertyChangeListeners ();
17194 } else {
17195 result = this.listenerList.getListeners (listenerType);
17196 }if (result.length == 0) {
17197 return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]);
17198 }return result;
17199 }, "Class");
17200 Clazz_defineMethod (c$, "addNotify", 
17201 function () {
17202 Clazz_superCall (this, javax.swing.JComponent, "addNotify", []);
17203 this.firePropertyChangeObject ("ancestor", null, this.getParent ());
17204 this.registerWithKeyboardManager (false);
17205 this.registerNextFocusableComponent ();
17206 });
17207 Clazz_defineMethod (c$, "removeNotify", 
17208 function () {
17209 Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []);
17210 this.firePropertyChangeObject ("ancestor", this.getParent (), null);
17211 this.unregisterWithKeyboardManager ();
17212 this.deregisterNextFocusableComponent ();
17213 if (this.getCreatedDoubleBuffer ()) {
17214 javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer ();
17215 this.setCreatedDoubleBuffer (false);
17216 }});
17217 Clazz_defineMethod (c$, "repaint", 
17218 function (tm, x, y, width, height) {
17219 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
17220 }, "~N,~N,~N,~N,~N");
17221 Clazz_defineMethod (c$, "repaint", 
17222 function (r) {
17223 this.repaint (0, r.x, r.y, r.width, r.height);
17224 }, "java.awt.Rectangle");
17225 Clazz_defineMethod (c$, "revalidate", 
17226 function () {
17227 if (this.getParent () == null) {
17228 return;
17229 }if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
17230 this.invalidate ();
17231 javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this);
17232 } else {
17233 {
17234 if (this.getFlag (28)) {
17235 return;
17236 }this.setFlag (28, true);
17237 }var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null));
17238 javax.swing.SwingUtilities.invokeLater (callRevalidate);
17239 }});
17240 Clazz_defineMethod (c$, "isValidateRoot", 
17241 function () {
17242 return false;
17243 });
17244 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
17245 function () {
17246 return true;
17247 });
17248 Clazz_defineMethod (c$, "isPaintingOrigin", 
17249 function () {
17250 return false;
17251 });
17252 Clazz_defineMethod (c$, "paintImmediately", 
17253 function (x, y, w, h) {
17254 {
17255 if (arguments.length == 1) {
17256 var r = x;
17257 x = r.x;
17258 y = r.y;
17259 w = r.width;
17260 h = r.height;
17261 }
17262 }var c = this;
17263 var parent;
17264 if (!this.isShowing ()) {
17265 return;
17266 }while (!(c).isOpaque ()) {
17267 parent = c.getParent ();
17268 if (parent != null) {
17269 x += c.getX ();
17270 y += c.getY ();
17271 c = parent;
17272 } else {
17273 break;
17274 }if (!(Clazz_instanceOf (c, javax.swing.JComponent))) {
17275 break;
17276 }}
17277 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17278 (c)._paintImmediately (x, y, w, h);
17279 } else {
17280 c.repaint (x, y, w, h);
17281 }}, "~N,~N,~N,~N");
17282 Clazz_defineMethod (c$, "paintImmediately", 
17283 function (r) {
17284 this.paintImmediately (r.x, r.y, r.width, r.height);
17285 }, "java.awt.Rectangle");
17286 Clazz_defineMethod (c$, "alwaysOnTop", 
17287 function () {
17288 return false;
17289 });
17290 Clazz_defineMethod (c$, "setPaintingChild", 
17291 function (paintingChild) {
17292 this.paintingChild = paintingChild;
17293 }, "java.awt.Component");
17294 Clazz_defineMethod (c$, "_paintImmediately", 
17295 function (x, y, w, h) {
17296 var g;
17297 var c;
17298 var tmpX;
17299 var tmpY;
17300 var tmpWidth;
17301 var tmpHeight;
17302 var offsetX = 0;
17303 var offsetY = 0;
17304 var hasBuffer = false;
17305 var bufferedComponent = null;
17306 var paintingComponent = this;
17307 var path =  new java.util.ArrayList (7);
17308 var pIndex = -1;
17309 var pCount = 0;
17310 tmpX = tmpY = tmpWidth = tmpHeight = 0;
17311 var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle ();
17312 paintImmediatelyClip.x = x;
17313 paintImmediatelyClip.y = y;
17314 paintImmediatelyClip.width = w;
17315 paintImmediatelyClip.height = h;
17316 var ontop = this.alwaysOnTop () && this.isOpaque ();
17317 if (ontop) {
17318 javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip);
17319 if (paintImmediatelyClip.width == 0) {
17320 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17321 return;
17322 }}var child;
17323 for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) {
17324 var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
17325 path.add (c);
17326 if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) {
17327 var resetPC;
17328 if (c !== this) {
17329 if (jc.isPaintingOrigin ()) {
17330 resetPC = true;
17331 } else {
17332 var children = c.getComponents ();
17333 var i = 0;
17334 for (; i < children.length; i++) {
17335 if (children[i] === child) break;
17336 }
17337 switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) {
17338 case 0:
17339 resetPC = false;
17340 break;
17341 case 2:
17342 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17343 return;
17344 default:
17345 resetPC = true;
17346 break;
17347 }
17348 }} else {
17349 resetPC = false;
17350 }if (resetPC) {
17351 paintingComponent = jc;
17352 pIndex = pCount;
17353 offsetX = offsetY = 0;
17354 hasBuffer = false;
17355 }}pCount++;
17356 if (!ontop) {
17357 var bx = c.getX ();
17358 var by = c.getY ();
17359 tmpWidth = c.getWidth ();
17360 tmpHeight = c.getHeight ();
17361 javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip);
17362 paintImmediatelyClip.x += bx;
17363 paintImmediatelyClip.y += by;
17364 offsetX += bx;
17365 offsetY += by;
17366 }}
17367 if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) {
17368 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17369 return;
17370 }paintingComponent.setFlag (13, true);
17371 paintImmediatelyClip.x -= offsetX;
17372 paintImmediatelyClip.y -= offsetY;
17373 if (paintingComponent !== this) {
17374 var comp;
17375 var i = pIndex;
17376 for (; i > 0; i--) {
17377 comp = path.get (i);
17378 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17379 (comp).setPaintingChild (path.get (i - 1));
17380 }}
17381 }try {
17382 g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS ();
17383 try {
17384 if (hasBuffer) {
17385 var rm = javax.swing.RepaintManager.currentManager (bufferedComponent);
17386 rm.beginPaint ();
17387 try {
17388 rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height);
17389 } finally {
17390 rm.endPaint ();
17391 }
17392 } else {
17393 paintingComponent.paint (g);
17394 }} finally {
17395 g.dispose ();
17396 }
17397 } finally {
17398 if (paintingComponent !== this) {
17399 var comp;
17400 var i = pIndex;
17401 for (; i > 0; i--) {
17402 comp = path.get (i);
17403 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17404 (comp).setPaintingChild (null);
17405 }}
17406 }paintingComponent.setFlag (13, false);
17407 }
17408 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17409 }, "~N,~N,~N,~N");
17410 Clazz_defineMethod (c$, "paintToOffscreen", 
17411 function (g, x, y, w, h, maxX, maxY) {
17412 try {
17413 this.setFlag (1, true);
17414 if ((y + h) < maxY || (x + w) < maxX) {
17415 this.setFlag (2, true);
17416 }if (this.getFlag (13)) {
17417 this.paint (g);
17418 } else {
17419 if (!this.rectangleIsObscured (x, y, w, h)) {
17420 this.paintComponent (g);
17421 this.paintBorder (g);
17422 }this.paintChildren (g);
17423 }} finally {
17424 this.setFlag (1, false);
17425 this.setFlag (2, false);
17426 }
17427 }, "java.awt.Graphics,~N,~N,~N,~N,~N,~N");
17428 Clazz_defineMethod (c$, "getObscuredState", 
17429  function (compIndex, x, y, width, height) {
17430 var retValue = 0;
17431 var tmpRect = javax.swing.JComponent.fetchRectangle ();
17432 for (var i = compIndex - 1; i >= 0; i--) {
17433 var sibling = this.getComponent (i);
17434 if (!sibling.isVisible ()) {
17435 continue;
17436 }var siblingRect;
17437 var opaque;
17438 if (Clazz_instanceOf (sibling, javax.swing.JComponent)) {
17439 opaque = (sibling).isOpaque ();
17440 if (!opaque) {
17441 if (retValue == 1) {
17442 continue;
17443 }}} else {
17444 opaque = true;
17445 }siblingRect = sibling.getBounds (tmpRect);
17446 if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) {
17447 javax.swing.JComponent.recycleRectangle (tmpRect);
17448 return 2;
17449 } else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) {
17450 retValue = 1;
17451 }}
17452 javax.swing.JComponent.recycleRectangle (tmpRect);
17453 return retValue;
17454 }, "~N,~N,~N,~N,~N");
17455 Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", 
17456 function () {
17457 return true;
17458 });
17459 Clazz_defineMethod (c$, "setFlag", 
17460  function (aFlag, aValue) {
17461 if (aValue) {
17462 this.flags |= (1 << aFlag);
17463 } else {
17464 this.flags &= ~(1 << aFlag);
17465 }}, "~N,~B");
17466 Clazz_defineMethod (c$, "getFlag", 
17467  function (aFlag) {
17468 var mask = (1 << aFlag);
17469 return ((this.flags & mask) == mask);
17470 }, "~N");
17471 Clazz_defineMethod (c$, "setDoubleBuffered", 
17472 function (aFlag) {
17473 }, "~B");
17474 Clazz_overrideMethod (c$, "isDoubleBuffered", 
17475 function () {
17476 return this.getFlag (0);
17477 });
17478 Clazz_defineMethod (c$, "getRootPane", 
17479 function () {
17480 return javax.swing.SwingUtilities.getRootPane (this);
17481 });
17482 Clazz_defineMethod (c$, "paramString", 
17483 function () {
17484 var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : "");
17485 var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : "");
17486 var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : "");
17487 var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ()));
17488 return Clazz_superCall (this, javax.swing.JComponent, "paramString", []) + ",alignmentX=" + this.alignmentX + ",alignmentY=" + this.alignmentY + ",border=" + borderString + ",flags=" + this.flags + ",maximumSize=" + maximumSizeString + ",minimumSize=" + minimumSizeString + ",preferredSize=" + preferredSizeString;
17489 });
17490 c$.$JComponent$ActionStandin$ = function () {
17491 Clazz_pu$h(self.c$);
17492 c$ = Clazz_decorateAsClass (function () {
17493 Clazz_prepareCallback (this, arguments);
17494 this.actionListener = null;
17495 this.command = null;
17496 this.action = null;
17497 Clazz_instantialize (this, arguments);
17498 }, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action);
17499 Clazz_makeConstructor (c$, 
17500 function (a, b) {
17501 this.actionListener = a;
17502 if (Clazz_instanceOf (a, javax.swing.Action)) {
17503 this.action = a;
17504 } else {
17505 this.action = null;
17506 }this.command = b;
17507 }, "java.awt.event.ActionListener,~S");
17508 Clazz_defineMethod (c$, "getValue", 
17509 function (a) {
17510 if (a != null) {
17511 if (a.equals ("ActionCommandKey")) {
17512 return this.command;
17513 }if (this.action != null) {
17514 return this.action.getValue (a);
17515 }if (a.equals ("Name")) {
17516 return "ActionStandin";
17517 }}return null;
17518 }, "~S");
17519 Clazz_defineMethod (c$, "isEnabled", 
17520 function () {
17521 if (this.actionListener == null) {
17522 return false;
17523 }if (this.action == null) {
17524 return true;
17525 }return this.action.isEnabled ();
17526 });
17527 Clazz_defineMethod (c$, "actionPerformed", 
17528 function (a) {
17529 if (this.actionListener != null) {
17530 this.actionListener.actionPerformed (a);
17531 }}, "java.awt.event.ActionEvent");
17532 Clazz_overrideMethod (c$, "putValue", 
17533 function (a, b) {
17534 }, "~S,~O");
17535 Clazz_overrideMethod (c$, "setEnabled", 
17536 function (a) {
17537 }, "~B");
17538 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
17539 function (a) {
17540 }, "java.beans.PropertyChangeListener");
17541 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
17542 function (a) {
17543 }, "java.beans.PropertyChangeListener");
17544 c$ = Clazz_p0p ();
17545 };
17546 c$.$JComponent$2$ = function () {
17547 Clazz_pu$h(self.c$);
17548 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable);
17549 Clazz_overrideMethod (c$, "run", 
17550 function () {
17551 {
17552 this.b$["javax.swing.JComponent"].setFlag (28, false);
17553 }this.b$["javax.swing.JComponent"].revalidate ();
17554 });
17555 c$ = Clazz_p0p ();
17556 };
17557 c$.$JComponent$1$ = function () {
17558 Clazz_pu$h(self.c$);
17559 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController);
17560 Clazz_overrideMethod (c$, "acceptRequestFocus", 
17561 function (from, to, temporary, focusedWindowChangeAllowed, cause) {
17562 if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) {
17563 return true;
17564 }if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) {
17565 return true;
17566 }var target = to;
17567 if (!target.getVerifyInputWhenFocusTarget ()) {
17568 return true;
17569 }var jFocusOwner = from;
17570 var iv = jFocusOwner.getInputVerifier ();
17571 if (iv == null) {
17572 return true;
17573 } else {
17574 var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17575 if (currentSource === jFocusOwner) {
17576 return true;
17577 }javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner);
17578 try {
17579 return iv.shouldYieldFocus (jFocusOwner);
17580 } finally {
17581 if (currentSource != null) {
17582 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource);
17583 } else {
17584 javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17585 }}
17586 }}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause");
17587 c$ = Clazz_p0p ();
17588 };
17589 Clazz_pu$h(self.c$);
17590 c$ = Clazz_decorateAsClass (function () {
17591 this.array = null;
17592 this.count = 0;
17593 this.capacity = 0;
17594 Clazz_instantialize (this, arguments);
17595 }, javax.swing.JComponent, "IntVector");
17596 Clazz_defineMethod (c$, "size", 
17597 function () {
17598 return this.count;
17599 });
17600 Clazz_defineMethod (c$, "elementAt", 
17601 function (a) {
17602 return this.array[a];
17603 }, "~N");
17604 Clazz_defineMethod (c$, "addElement", 
17605 function (a) {
17606 if (this.count == this.capacity) {
17607 this.capacity = (this.capacity + 2) * 2;
17608 var b =  Clazz_newIntArray (this.capacity, 0);
17609 if (this.count > 0) {
17610 System.arraycopy (this.array, 0, b, 0, this.count);
17611 }this.array = b;
17612 }this.array[this.count++] = a;
17613 }, "~N");
17614 Clazz_defineMethod (c$, "setElementAt", 
17615 function (a, b) {
17616 this.array[b] = a;
17617 }, "~N,~N");
17618 c$ = Clazz_p0p ();
17619 Clazz_pu$h(self.c$);
17620 c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState");
17621 c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", 
17622 function () {
17623 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey);
17624 if (a == null) {
17625 a =  new javax.swing.JComponent.IntVector ();
17626 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a);
17627 }return a;
17628 });
17629 c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", 
17630 function (a) {
17631 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17632 var c = b.size ();
17633 var d;
17634 for (d = 0; d < c; d++) {
17635 if (b.elementAt (d) == -1) {
17636 b.setElementAt (a, d);
17637 return;
17638 }}
17639 b.addElement (a);
17640 }, "~N");
17641 c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", 
17642 function (a) {
17643 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17644 var c = b.size ();
17645 var d;
17646 for (d = 0; d < c; d++) {
17647 if (b.elementAt (d) == a) {
17648 b.setElementAt (-1, d);
17649 return;
17650 }}
17651 }, "~N");
17652 c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", 
17653 function (a) {
17654 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17655 var c = b.size ();
17656 var d;
17657 for (d = 0; d < c; d++) {
17658 if (b.elementAt (d) == a) {
17659 return true;
17660 }}
17661 return false;
17662 }, "~N");
17663 c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", 
17664 function (a) {
17665 switch (a.getID ()) {
17666 case 401:
17667 if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) {
17668 javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ());
17669 }return true;
17670 case 402:
17671 if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) {
17672 javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ());
17673 return true;
17674 }return false;
17675 case 400:
17676 return true;
17677 default:
17678 return false;
17679 }
17680 }, "java.awt.event.KeyEvent");
17681 c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState;
17682 c$ = Clazz_p0p ();
17683 Clazz_defineStatics (c$,
17684 "uiClassID", "ComponentUI",
17685 "managingFocusForwardTraversalKeys", null,
17686 "managingFocusBackwardTraversalKeys", null,
17687 "NOT_OBSCURED", 0,
17688 "PARTIALLY_OBSCURED", 1,
17689 "COMPLETELY_OBSCURED", 2,
17690 "DEBUG_GRAPHICS_LOADED", false);
17691 c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY =  new Clazz._O ();
17692 Clazz_defineStatics (c$,
17693 "WHEN_FOCUSED", 0,
17694 "WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1,
17695 "WHEN_IN_FOCUSED_WINDOW", 2,
17696 "UNDEFINED_CONDITION", -1,
17697 "WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow",
17698 "TOOL_TIP_TEXT_KEY", "ToolTipText",
17699 "NEXT_FOCUS", "nextFocus",
17700 "IS_DOUBLE_BUFFERED", 0,
17701 "ANCESTOR_USING_BUFFER", 1,
17702 "IS_PAINTING_TILE", 2,
17703 "IS_OPAQUE", 3,
17704 "FOCUS_INPUTMAP_CREATED", 5,
17705 "ANCESTOR_INPUTMAP_CREATED", 6,
17706 "WIF_INPUTMAP_CREATED", 7,
17707 "ACTIONMAP_CREATED", 8,
17708 "CREATED_DOUBLE_BUFFER", 9,
17709 "IS_PRINTING", 11,
17710 "IS_PRINTING_ALL", 12,
17711 "IS_REPAINTING", 13,
17712 "REQUEST_FOCUS_DISABLED", 22,
17713 "INHERITS_POPUP_MENU", 23,
17714 "OPAQUE_SET", 24,
17715 "AUTOSCROLLS_SET", 25,
17716 "REVALIDATE_RUNNABLE_SCHEDULED", 28);
17717 c$.tempRectangles = c$.prototype.tempRectangles =  new java.util.ArrayList (11);
17718 Clazz_defineStatics (c$,
17719 "defaultLocale", "JComponent.defaultLocale",
17720 "componentObtainingGraphicsFrom", null);
17721 c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock =  new Clazz._O ();
17722 c$.focusController = c$.prototype.focusController = ((Clazz_isClassDefined ("javax.swing.JComponent$1") ? 0 : javax.swing.JComponent.$JComponent$1$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$1, this, null));
17723 });
17724 Clazz_declarePackage ("javax.swing");
17725 Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () {
17726 c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener);
17727 Clazz_defineStatics (c$,
17728 "DEFAULT", "Default",
17729 "NAME", "Name",
17730 "SHORT_DESCRIPTION", "ShortDescription",
17731 "LONG_DESCRIPTION", "LongDescription",
17732 "SMALL_ICON", "SmallIcon",
17733 "ACTION_COMMAND_KEY", "ActionCommandKey",
17734 "ACCELERATOR_KEY", "AcceleratorKey",
17735 "MNEMONIC_KEY", "MnemonicKey",
17736 "SELECTED_KEY", "SwingSelectedKey",
17737 "DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey",
17738 "LARGE_ICON_KEY", "SwingLargeIconKey");
17739 });
17740 Clazz_declarePackage ("javax.swing");
17741 Clazz_load (["java.awt.Frame", "java.awt.event.WindowListener", "javax.swing.SwingConstants"], "javax.swing.SwingUtilities", ["java.lang.Character", "$.Error", "$.Thread", "java.applet.Applet", "java.awt.Component", "$.Container", "$.EventQueue", "$.Point", "$.Rectangle", "$.Window", "java.awt.event.ActionEvent", "$.MouseEvent", "$.MouseWheelEvent", "javax.swing.JComponent", "javax.swing.JComponent.ActionStandin", "javax.swing.JRootPane", "$.RootPaneContainer", "javax.swing.event.MenuDragMouseEvent", "javax.swing.plaf.UIResource", "jssun.awt.AppContext", "jssun.swing.UIAction", "swingjs.api.Interface"], function () {
17742 c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants);
17743 c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", 
17744 function (c, t) {
17745 }, "java.awt.Component,javax.swing.TransferHandler");
17746 c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", 
17747 function (a, b) {
17748 if (b.x >= a.x && (b.x + b.width) <= (a.x + a.width) && b.y >= a.y && (b.y + b.height) <= (a.y + a.height)) {
17749 return true;
17750 }return false;
17751 }, "java.awt.Rectangle,java.awt.Rectangle");
17752 c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", 
17753 function (aComponent) {
17754 var b =  new java.awt.Rectangle (aComponent.getBounds ());
17755 b.x = b.y = 0;
17756 return b;
17757 }, "java.awt.Component");
17758 c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", 
17759 function (c) {
17760 for (var p = c.getParent (); p != null; p = p.getParent ()) {
17761 if (Clazz_instanceOf (p, java.awt.Window)) {
17762 return p;
17763 }}
17764 return null;
17765 }, "java.awt.Component");
17766 c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", 
17767 function (parent, x, y) {
17768 for (var p = parent; p != null; p = p.getParent ()) {
17769 if (Clazz_instanceOf (p, java.awt.Window)) {
17770 var point =  new java.awt.Point (x, y);
17771 javax.swing.SwingUtilities.convertPointFromScreen (point, parent);
17772 return point;
17773 }}
17774 throw  new Error ("convertScreenLocationToParent: no window ancestor");
17775 }, "java.awt.Container,~N,~N");
17776 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17777 function (source, aPoint, destination) {
17778 var p;
17779 if (source == null && destination == null) return aPoint;
17780 if (source == null) {
17781 source = javax.swing.SwingUtilities.getWindowAncestor (destination);
17782 if (source == null) throw  new Error ("Source component not connected to component tree hierarchy");
17783 }p =  new java.awt.Point (aPoint);
17784 javax.swing.SwingUtilities.convertPointToScreen (p, source);
17785 if (destination == null) {
17786 destination = javax.swing.SwingUtilities.getWindowAncestor (source);
17787 if (destination == null) throw  new Error ("Destination component not connected to component tree hierarchy");
17788 }javax.swing.SwingUtilities.convertPointFromScreen (p, destination);
17789 return p;
17790 }, "java.awt.Component,java.awt.Point,java.awt.Component");
17791 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17792 function (source, x, y, destination) {
17793 var point =  new java.awt.Point (x, y);
17794 return javax.swing.SwingUtilities.convertPoint (source, point, destination);
17795 }, "java.awt.Component,~N,~N,java.awt.Component");
17796 c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", 
17797 function (source, aRectangle, destination) {
17798 var point =  new java.awt.Point (aRectangle.x, aRectangle.y);
17799 point = javax.swing.SwingUtilities.convertPoint (source, point, destination);
17800 return  new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height);
17801 }, "java.awt.Component,java.awt.Rectangle,java.awt.Component");
17802 c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", 
17803 function (c, comp) {
17804 if (comp == null || c == null) return null;
17805 var parent = comp.getParent ();
17806 while (parent != null && !(c.isInstance (parent))) parent = parent.getParent ();
17807
17808 return parent;
17809 }, "Class,java.awt.Component");
17810 c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", 
17811 function (name, comp) {
17812 if (comp == null || name == null) return null;
17813 var parent = comp.getParent ();
17814 while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent ();
17815
17816 return parent;
17817 }, "~S,java.awt.Component");
17818 c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", 
17819 function (parent, x, y) {
17820 if (!parent.contains (x, y)) {
17821 return null;
17822 }if (Clazz_instanceOf (parent, java.awt.Container)) {
17823 var components = (parent).getComponents ();
17824 for (var i = 0; i < components.length; i++) {
17825 var comp = components[i];
17826 if (comp != null && comp.isVisible ()) {
17827 var loc = comp.getLocation ();
17828 if (Clazz_instanceOf (comp, java.awt.Container)) {
17829 comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y);
17830 } else {
17831 comp = comp.getComponentAt (x - loc.x, y - loc.y);
17832 }if (comp != null && comp.isVisible ()) {
17833 return comp;
17834 }}}
17835 }return parent;
17836 }, "java.awt.Component,~N,~N");
17837 c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", 
17838 function (source, sourceEvent, destination) {
17839 var p = javax.swing.SwingUtilities.convertPoint (source,  new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination);
17840 var newSource;
17841 if (destination != null) newSource = destination;
17842  else newSource = source;
17843 var newEvent;
17844 if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) {
17845 var sourceWheelEvent = sourceEvent;
17846 newEvent =  new java.awt.event.MouseWheelEvent (newSource, sourceWheelEvent.getID (), sourceWheelEvent.getWhen (), sourceWheelEvent.getModifiers (), p.x, p.y, sourceWheelEvent.getXOnScreen (), sourceWheelEvent.getYOnScreen (), sourceWheelEvent.getClickCount (), sourceWheelEvent.isPopupTrigger (), sourceWheelEvent.getScrollType (), sourceWheelEvent.getScrollAmount (), sourceWheelEvent.getWheelRotation ());
17847 } else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) {
17848 var sourceMenuDragEvent = sourceEvent;
17849 newEvent =  new javax.swing.event.MenuDragMouseEvent (newSource, sourceMenuDragEvent.getID (), sourceMenuDragEvent.getWhen (), sourceMenuDragEvent.getModifiers (), p.x, p.y, sourceMenuDragEvent.getXOnScreen (), sourceMenuDragEvent.getYOnScreen (), sourceMenuDragEvent.getClickCount (), sourceMenuDragEvent.isPopupTrigger (), sourceMenuDragEvent.getPath (), sourceMenuDragEvent.getMenuSelectionManager ());
17850 } else {
17851 newEvent =  new java.awt.event.MouseEvent (newSource, sourceEvent.getID (), sourceEvent.getWhen (), sourceEvent.getModifiers (), p.x, p.y, sourceEvent.getXOnScreen (), sourceEvent.getYOnScreen (), sourceEvent.getClickCount (), sourceEvent.isPopupTrigger (), 0);
17852 }return newEvent;
17853 }, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component");
17854 c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", 
17855 function (p, c) {
17856 var x;
17857 var y;
17858 do {
17859 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17860 x = (c).getX ();
17861 y = (c).getY ();
17862 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17863 try {
17864 var pp = c.getLocationOnScreen ();
17865 x = pp.x;
17866 y = pp.y;
17867 } catch (icse) {
17868 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17869 x = c.getX ();
17870 y = c.getY ();
17871 } else {
17872 throw icse;
17873 }
17874 }
17875 } else {
17876 x = c.getX ();
17877 y = c.getY ();
17878 }p.x += x;
17879 p.y += y;
17880 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17881 c = c.getParent ();
17882 } while (c != null);
17883 }, "java.awt.Point,java.awt.Component");
17884 c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", 
17885 function (p, c) {
17886 var x;
17887 var y;
17888 do {
17889 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17890 x = (c).getX ();
17891 y = (c).getY ();
17892 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17893 try {
17894 var pp = c.getLocationOnScreen ();
17895 x = pp.x;
17896 y = pp.y;
17897 } catch (icse) {
17898 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17899 x = c.getX ();
17900 y = c.getY ();
17901 } else {
17902 throw icse;
17903 }
17904 }
17905 } else {
17906 x = c.getX ();
17907 y = c.getY ();
17908 }p.x -= x;
17909 p.y -= y;
17910 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17911 c = c.getParent ();
17912 } while (c != null);
17913 }, "java.awt.Point,java.awt.Component");
17914 c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", 
17915 function (c) {
17916 return javax.swing.SwingUtilities.getWindowAncestor (c);
17917 }, "java.awt.Component");
17918 c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", 
17919 function (a, b) {
17920 if (a === b) return true;
17921 for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true;
17922
17923 return false;
17924 }, "java.awt.Component,java.awt.Component");
17925 c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", 
17926 function (x, y, width, height, dest) {
17927 var x1 = (x > dest.x) ? x : dest.x;
17928 var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17929 var y1 = (y > dest.y) ? y : dest.y;
17930 var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height));
17931 dest.x = x1;
17932 dest.y = y1;
17933 dest.width = x2 - x1;
17934 dest.height = y2 - y1;
17935 if (dest.width < 0 || dest.height < 0) {
17936 dest.x = dest.y = dest.width = dest.height = 0;
17937 }return dest;
17938 }, "~N,~N,~N,~N,java.awt.Rectangle");
17939 c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", 
17940 function (x, y, width, height, dest) {
17941 var x1 = (x < dest.x) ? x : dest.x;
17942 var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17943 var y1 = (y < dest.y) ? y : dest.y;
17944 var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height);
17945 dest.x = x1;
17946 dest.y = y1;
17947 dest.width = (x2 - x1);
17948 dest.height = (y2 - y1);
17949 return dest;
17950 }, "~N,~N,~N,~N,java.awt.Rectangle");
17951 c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", 
17952 function (rectA, rectB) {
17953 if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) {
17954 return  new Array (0);
17955 }var t =  new java.awt.Rectangle ();
17956 var a = null;
17957 var b = null;
17958 var c = null;
17959 var d = null;
17960 var result;
17961 var rectCount = 0;
17962 if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) {
17963 t.x = rectA.x;
17964 t.y = rectA.y;
17965 t.width = rectB.x - rectA.x;
17966 t.height = rectA.height;
17967 if (t.width > 0 && t.height > 0) {
17968 a =  new java.awt.Rectangle (t);
17969 rectCount++;
17970 }t.x = rectB.x;
17971 t.y = rectA.y;
17972 t.width = rectB.width;
17973 t.height = rectB.y - rectA.y;
17974 if (t.width > 0 && t.height > 0) {
17975 b =  new java.awt.Rectangle (t);
17976 rectCount++;
17977 }t.x = rectB.x;
17978 t.y = rectB.y + rectB.height;
17979 t.width = rectB.width;
17980 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17981 if (t.width > 0 && t.height > 0) {
17982 c =  new java.awt.Rectangle (t);
17983 rectCount++;
17984 }t.x = rectB.x + rectB.width;
17985 t.y = rectA.y;
17986 t.width = rectA.x + rectA.width - (rectB.x + rectB.width);
17987 t.height = rectA.height;
17988 if (t.width > 0 && t.height > 0) {
17989 d =  new java.awt.Rectangle (t);
17990 rectCount++;
17991 }} else {
17992 if (rectB.x <= rectA.x && rectB.y <= rectA.y) {
17993 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17994 t.x = rectA.x;
17995 t.y = rectB.y + rectB.height;
17996 t.width = rectA.width;
17997 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17998 if (t.width > 0 && t.height > 0) {
17999 a = t;
18000 rectCount++;
18001 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18002 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18003 if (t.width > 0 && t.height > 0) {
18004 a = t;
18005 rectCount++;
18006 }} else {
18007 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y);
18008 if (t.width > 0 && t.height > 0) {
18009 a =  new java.awt.Rectangle (t);
18010 rectCount++;
18011 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18012 if (t.width > 0 && t.height > 0) {
18013 b =  new java.awt.Rectangle (t);
18014 rectCount++;
18015 }}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) {
18016 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
18017 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18018 if (t.width > 0 && t.height > 0) {
18019 a = t;
18020 rectCount++;
18021 }} else {
18022 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18023 if (t.width > 0 && t.height > 0) {
18024 a =  new java.awt.Rectangle (t);
18025 rectCount++;
18026 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y);
18027 if (t.width > 0 && t.height > 0) {
18028 b =  new java.awt.Rectangle (t);
18029 rectCount++;
18030 }}} else if (rectB.x <= rectA.x) {
18031 if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) {
18032 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18033 if (t.width > 0 && t.height > 0) {
18034 a =  new java.awt.Rectangle (t);
18035 rectCount++;
18036 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18037 if (t.width > 0 && t.height > 0) {
18038 b =  new java.awt.Rectangle (t);
18039 rectCount++;
18040 }} else {
18041 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18042 if (t.width > 0 && t.height > 0) {
18043 a =  new java.awt.Rectangle (t);
18044 rectCount++;
18045 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height);
18046 if (t.width > 0 && t.height > 0) {
18047 b =  new java.awt.Rectangle (t);
18048 rectCount++;
18049 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18050 if (t.width > 0 && t.height > 0) {
18051 c =  new java.awt.Rectangle (t);
18052 rectCount++;
18053 }}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) {
18054 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18055 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18056 if (t.width > 0 && t.height > 0) {
18057 a = t;
18058 rectCount++;
18059 }} else if (rectB.y <= rectA.y) {
18060 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y);
18061 if (t.width > 0 && t.height > 0) {
18062 a =  new java.awt.Rectangle (t);
18063 rectCount++;
18064 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18065 if (t.width > 0 && t.height > 0) {
18066 b =  new java.awt.Rectangle (t);
18067 rectCount++;
18068 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18069 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18070 if (t.width > 0 && t.height > 0) {
18071 a =  new java.awt.Rectangle (t);
18072 rectCount++;
18073 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y);
18074 if (t.width > 0 && t.height > 0) {
18075 b =  new java.awt.Rectangle (t);
18076 rectCount++;
18077 }} else {
18078 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
18079 if (t.width > 0 && t.height > 0) {
18080 a =  new java.awt.Rectangle (t);
18081 rectCount++;
18082 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height);
18083 if (t.width > 0 && t.height > 0) {
18084 b =  new java.awt.Rectangle (t);
18085 rectCount++;
18086 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18087 if (t.width > 0 && t.height > 0) {
18088 c =  new java.awt.Rectangle (t);
18089 rectCount++;
18090 }}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) {
18091 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18092 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18093 if (t.width > 0 && t.height > 0) {
18094 a =  new java.awt.Rectangle (t);
18095 rectCount++;
18096 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18097 if (t.width > 0 && t.height > 0) {
18098 b =  new java.awt.Rectangle (t);
18099 rectCount++;
18100 }} else if (rectB.y <= rectA.y) {
18101 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18102 if (t.width > 0 && t.height > 0) {
18103 a =  new java.awt.Rectangle (t);
18104 rectCount++;
18105 }t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18106 if (t.width > 0 && t.height > 0) {
18107 b =  new java.awt.Rectangle (t);
18108 rectCount++;
18109 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18110 if (t.width > 0 && t.height > 0) {
18111 c =  new java.awt.Rectangle (t);
18112 rectCount++;
18113 }} else {
18114 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18115 if (t.width > 0 && t.height > 0) {
18116 a =  new java.awt.Rectangle (t);
18117 rectCount++;
18118 }t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y);
18119 if (t.width > 0 && t.height > 0) {
18120 b =  new java.awt.Rectangle (t);
18121 rectCount++;
18122 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18123 if (t.width > 0 && t.height > 0) {
18124 c =  new java.awt.Rectangle (t);
18125 rectCount++;
18126 }}}}result =  new Array (rectCount);
18127 rectCount = 0;
18128 if (a != null) result[rectCount++] = a;
18129 if (b != null) result[rectCount++] = b;
18130 if (c != null) result[rectCount++] = c;
18131 if (d != null) result[rectCount++] = d;
18132 return result;
18133 }, "java.awt.Rectangle,java.awt.Rectangle");
18134 c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", 
18135 function (anEvent) {
18136 return ((anEvent.getModifiers () & 16) != 0);
18137 }, "java.awt.event.MouseEvent");
18138 c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", 
18139 function (anEvent) {
18140 return ((anEvent.getModifiers () & 8) == 8);
18141 }, "java.awt.event.MouseEvent");
18142 c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", 
18143 function (anEvent) {
18144 return ((anEvent.getModifiers () & 4) == 4);
18145 }, "java.awt.event.MouseEvent");
18146 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18147 function (g, c, p, x, y, w, h) {
18148 javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false);
18149 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
18150 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18151 function (g, c, p, r) {
18152 javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
18153 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
18154 c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", 
18155  function (c, p) {
18156 var shell = c.getParent ();
18157 if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) {
18158 if (shell.getParent () !== p) {
18159 p.add (shell);
18160 }} else {
18161 shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false);
18162 shell.add (c);
18163 p.add (shell);
18164 }return shell;
18165 }, "java.awt.Component,java.awt.Container");
18166 c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", 
18167 function (c) {
18168 javax.swing.SwingUtilities.updateComponentTreeUI0 (c);
18169 c.invalidate ();
18170 c.validate ();
18171 c.repaint ();
18172 }, "java.awt.Component");
18173 c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", 
18174  function (c) {
18175 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
18176 var jc = c;
18177 jc.updateUI ();
18178 var jpm = jc.getComponentPopupMenu ();
18179 if (jpm != null) {
18180 javax.swing.SwingUtilities.updateComponentTreeUI (jpm);
18181 }}var children = null;
18182 if (Clazz_instanceOf (c, javax.swing.JMenu)) {
18183 children = (c).getMenuComponents ();
18184 } else if (Clazz_instanceOf (c, java.awt.Container)) {
18185 children = (c).getComponents ();
18186 }if (children != null) {
18187 for (var i = 0; i < children.length; i++) {
18188 javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]);
18189 }
18190 }}, "java.awt.Component");
18191 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
18192 function (doRun) {
18193 java.awt.EventQueue.invokeLater (doRun);
18194 }, "Runnable");
18195 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
18196 function (doRun) {
18197 java.awt.EventQueue.invokeAndWait (doRun);
18198 }, "Runnable");
18199 c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", 
18200 function () {
18201 return java.awt.EventQueue.isDispatchThread ();
18202 });
18203 c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", 
18204 function (c) {
18205 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
18206 return (c).getRootPane ();
18207 }for (; c != null; c = c.getParent ()) {
18208 if (Clazz_instanceOf (c, javax.swing.JRootPane)) {
18209 return c;
18210 }}
18211 return null;
18212 }, "java.awt.Component");
18213 c$.getRoot = Clazz_defineMethod (c$, "getRoot", 
18214 function (c) {
18215 var applet = null;
18216 for (var p = c; p != null; p = p.getParent ()) {
18217 if (Clazz_instanceOf (p, java.awt.Window)) {
18218 return p;
18219 }if (Clazz_instanceOf (p, java.applet.Applet)) {
18220 applet = p;
18221 }}
18222 return applet;
18223 }, "java.awt.Component");
18224 c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", 
18225 function (event) {
18226 if (event != null) {
18227 if (event.isConsumed ()) {
18228 return false;
18229 }var component = event.getComponent ();
18230 var pressed = (event.getID () == 401);
18231 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) {
18232 return false;
18233 }while (component != null) {
18234 if (Clazz_instanceOf (component, javax.swing.JComponent)) {
18235 return (component).processKeyBindings (event, pressed);
18236 }if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) {
18237 return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed);
18238 }component = component.getParent ();
18239 }
18240 }return false;
18241 }, "java.awt.event.KeyEvent");
18242 c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", 
18243 function (e) {
18244 if (e.getID () == 400) {
18245 var mod = e.getModifiers ();
18246 if (((mod & 8) != 0) && ((mod & 2) == 0)) {
18247 return false;
18248 }}return true;
18249 }, "java.awt.event.KeyEvent");
18250 c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", 
18251 function (action, ks, event, sender, modifiers) {
18252 if (action == null) {
18253 return false;
18254 }if (Clazz_instanceOf (action, jssun.swing.UIAction)) {
18255 if (!(action).isEnabled (sender)) {
18256 return false;
18257 }} else if (!action.isEnabled ()) {
18258 return false;
18259 }var commandO;
18260 var stayNull;
18261 commandO = action.getValue ("ActionCommandKey");
18262 if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) {
18263 stayNull = true;
18264 } else {
18265 stayNull = false;
18266 }var command;
18267 if (commandO != null) {
18268 command = commandO.toString ();
18269 } else if (!stayNull && event.getKeyChar () != '\uffff') {
18270 command = String.valueOf (event.getKeyChar ());
18271 } else {
18272 command = null;
18273 }action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers));
18274 return true;
18275 }, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N");
18276 c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", 
18277 function (component, type, uiInputMap) {
18278 var map = component.getInputMap (type, (uiInputMap != null));
18279 while (map != null) {
18280 var parent = map.getParent ();
18281 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18282 map.setParent (uiInputMap);
18283 return;
18284 }map = parent;
18285 }
18286 }, "javax.swing.JComponent,~N,javax.swing.InputMap");
18287 c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", 
18288 function (component, uiActionMap) {
18289 var map = component.getActionMap ((uiActionMap != null));
18290 ;while (map != null) {
18291 var parent = map.getParent ();
18292 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18293 map.setParent (uiActionMap);
18294 return;
18295 }map = parent;
18296 }
18297 }, "javax.swing.JComponent,javax.swing.ActionMap");
18298 c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", 
18299 function (component, condition) {
18300 var map = component.getInputMap (condition, false);
18301 while (map != null) {
18302 var parent = map.getParent ();
18303 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18304 return parent;
18305 }map = parent;
18306 }
18307 return null;
18308 }, "javax.swing.JComponent,~N");
18309 c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", 
18310 function (component) {
18311 var map = component.getActionMap (false);
18312 while (map != null) {
18313 var parent = map.getParent ();
18314 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18315 return parent;
18316 }map = parent;
18317 }
18318 return null;
18319 }, "javax.swing.JComponent");
18320 c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", 
18321 function () {
18322 var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey);
18323 if (sharedOwnerFrame == null) {
18324 sharedOwnerFrame =  new javax.swing.SwingUtilities.SharedOwnerFrame ();
18325 javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame);
18326 }return sharedOwnerFrame;
18327 });
18328 c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", 
18329 function () {
18330 var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame ();
18331 return sharedOwnerFrame;
18332 });
18333 c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", 
18334 function (key) {
18335 return jssun.awt.AppContext.getAppContext ().get (key);
18336 }, "~O");
18337 c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", 
18338 function (key, value) {
18339 jssun.awt.AppContext.getAppContext ().put (key, value);
18340 }, "~O,~O");
18341 c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", 
18342 function (key) {
18343 jssun.awt.AppContext.getAppContext ().remove (key);
18344 }, "~O");
18345 c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", 
18346 function (className) {
18347 return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ());
18348 }, "~S");
18349 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
18350 function (c) {
18351 return c.getComponentOrientation ().isLeftToRight ();
18352 }, "java.awt.Component");
18353 c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", 
18354 function (icon, image) {
18355 var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null;
18356 return (iconImage === image);
18357 }, "javax.swing.Icon,java.awt.Image");
18358 c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", 
18359 function (text, mnemonic) {
18360 if (text == null || mnemonic == 0) {
18361 return -1;
18362 }var uc = Character.toUpperCase (String.fromCharCode (mnemonic));
18363 var lc = Character.toLowerCase (String.fromCharCode (mnemonic));
18364 var uci = text.indexOf (uc);
18365 var lci = text.indexOf (lc);
18366 if (uci == -1) {
18367 return lci;
18368 } else if (lci == -1) {
18369 return uci;
18370 } else {
18371 return (lci < uci) ? lci : uci;
18372 }}, "~S,~N");
18373 c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", 
18374 function (c, r) {
18375 if (c == null) {
18376 return null;
18377 }var rect = r;
18378 var insets = c.getInsets ();
18379 if (rect == null) {
18380 rect =  new java.awt.Rectangle ();
18381 }rect.x = insets.left;
18382 rect.y = insets.top;
18383 rect.width = c.getWidth () - insets.left - insets.right;
18384 rect.height = c.getHeight () - insets.top - insets.bottom;
18385 return rect;
18386 }, "javax.swing.JComponent,java.awt.Rectangle");
18387 c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", 
18388 function (rendererOrEditor) {
18389 if (rendererOrEditor == null) {
18390 return;
18391 }var component = null;
18392 if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) {
18393 component = rendererOrEditor;
18394 }if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) {
18395 component = (rendererOrEditor).getComponent ();
18396 }if (component != null) {
18397 javax.swing.SwingUtilities.updateComponentTreeUI (component);
18398 }}, "~O");
18399 Clazz_pu$h(self.c$);
18400 c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener);
18401 Clazz_defineMethod (c$, "addNotify", 
18402 function () {
18403 Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []);
18404 this.installListeners ();
18405 });
18406 Clazz_defineMethod (c$, "installListeners", 
18407 function () {
18408 var a = this.getOwnedWindows ();
18409 for (var b = 0; b < a.length; b++) {
18410 var c = a[b];
18411 if (c != null) {
18412 c.removeWindowListener (this);
18413 c.addWindowListener (this);
18414 }}
18415 });
18416 Clazz_overrideMethod (c$, "windowClosed", 
18417 function (a) {
18418 var b = this.getOwnedWindows ();
18419 for (var c = 0; c < b.length; c++) {
18420 var d = b[c];
18421 if (d != null) {
18422 if (d.isDisplayable ()) {
18423 return;
18424 }d.removeWindowListener (this);
18425 }this.dispose ();
18426 }
18427 }, "java.awt.event.WindowEvent");
18428 Clazz_overrideMethod (c$, "windowOpened", 
18429 function (a) {
18430 }, "java.awt.event.WindowEvent");
18431 Clazz_overrideMethod (c$, "windowClosing", 
18432 function (a) {
18433 }, "java.awt.event.WindowEvent");
18434 Clazz_overrideMethod (c$, "windowIconified", 
18435 function (a) {
18436 }, "java.awt.event.WindowEvent");
18437 Clazz_overrideMethod (c$, "windowDeiconified", 
18438 function (a) {
18439 }, "java.awt.event.WindowEvent");
18440 Clazz_overrideMethod (c$, "windowActivated", 
18441 function (a) {
18442 }, "java.awt.event.WindowEvent");
18443 Clazz_overrideMethod (c$, "windowDeactivated", 
18444 function (a) {
18445 }, "java.awt.event.WindowEvent");
18446 Clazz_defineMethod (c$, "show", 
18447 function () {
18448 });
18449 Clazz_overrideMethod (c$, "dispose", 
18450 function () {
18451 });
18452 c$ = Clazz_p0p ();
18453 c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey =  new Clazz._O ();
18454 });
18455 Clazz_declarePackage ("java.awt");
18456 Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () {
18457 c$ = Clazz_decorateAsClass (function () {
18458 this.maximizedBounds = null;
18459 this.title = "Untitled";
18460 this.resizable = true;
18461 this.undecorated = false;
18462 this.mbManagement = false;
18463 this.$state = 0;
18464 this.ownedWindows = null;
18465 this.menuBar = null;
18466 Clazz_instantialize (this, arguments);
18467 }, java.awt, "Frame", java.awt.Window);
18468 Clazz_makeConstructor (c$, 
18469 function () {
18470 this.construct ("");
18471 });
18472 Clazz_makeConstructor (c$, 
18473 function (gc) {
18474 this.construct ("", gc);
18475 }, "java.awt.GraphicsConfiguration");
18476 Clazz_makeConstructor (c$, 
18477 function (title) {
18478 Clazz_superConstructor (this, java.awt.Frame, []);
18479 this.initFrame (title, null);
18480 }, "~S");
18481 Clazz_makeConstructor (c$, 
18482 function (title, gc) {
18483 Clazz_superConstructor (this, java.awt.Frame, [gc]);
18484 this.initFrame (title, gc);
18485 }, "~S,java.awt.GraphicsConfiguration");
18486 Clazz_defineMethod (c$, "initFrame", 
18487  function (title, gc) {
18488 this.title = title;
18489 }, "~S,java.awt.GraphicsConfiguration");
18490 Clazz_overrideMethod (c$, "constructComponentName", 
18491 function () {
18492 {
18493 return "frame" + java.awt.Frame.$nameCounter++;
18494 }});
18495 Clazz_defineMethod (c$, "addNotify", 
18496 function () {
18497 if (this.peer == null) {
18498 this.peer = this.getToolkit ().createFrame (this);
18499 }var p = this.peer;
18500 p.setMaximizedBounds (this.maximizedBounds);
18501 Clazz_superCall (this, java.awt.Frame, "addNotify", []);
18502 });
18503 Clazz_defineMethod (c$, "getTitle", 
18504 function () {
18505 return this.title;
18506 });
18507 Clazz_defineMethod (c$, "setTitle", 
18508 function (title) {
18509 var oldTitle = this.title;
18510 if (title == null) {
18511 title = "";
18512 }{
18513 this.title = title;
18514 }this.firePropertyChangeObject ("title", oldTitle, title);
18515 }, "~S");
18516 Clazz_defineMethod (c$, "getIconImage", 
18517 function () {
18518 var icons = this.icons;
18519 if (icons != null) {
18520 if (icons.size () > 0) {
18521 return icons.get (0);
18522 }}return null;
18523 });
18524 Clazz_defineMethod (c$, "isResizable", 
18525 function () {
18526 return this.resizable;
18527 });
18528 Clazz_defineMethod (c$, "setResizable", 
18529 function (resizable) {
18530 var oldResizable = this.resizable;
18531 {
18532 this.resizable = resizable;
18533 }this.firePropertyChangeBool ("resizable", oldResizable, resizable);
18534 }, "~B");
18535 Clazz_defineMethod (c$, "setState", 
18536 function (state) {
18537 var current = this.getExtendedState ();
18538 if (state == 1 && (current & 1) == 0) {
18539 this.setExtendedState (current | 1);
18540 } else if (state == 0 && (current & 1) != 0) {
18541 this.setExtendedState (current & -2);
18542 }}, "~N");
18543 Clazz_defineMethod (c$, "setExtendedState", 
18544 function (state) {
18545 if (!this.isFrameStateSupported (state)) {
18546 return;
18547 }this.$state = state;
18548 }, "~N");
18549 Clazz_defineMethod (c$, "isFrameStateSupported", 
18550  function (state) {
18551 if (!this.getToolkit ().isFrameStateSupported (state)) {
18552 if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) {
18553 return false;
18554 } else {
18555 state &= -2;
18556 }return this.getToolkit ().isFrameStateSupported (state);
18557 }return true;
18558 }, "~N");
18559 Clazz_defineMethod (c$, "getState", 
18560 function () {
18561 return (this.getExtendedState () & 1) != 0 ? 1 : 0;
18562 });
18563 Clazz_defineMethod (c$, "getExtendedState", 
18564 function () {
18565 return this.$state;
18566 });
18567 Clazz_defineMethod (c$, "setMaximizedBounds", 
18568 function (bounds) {
18569 this.maximizedBounds = bounds;
18570 }, "java.awt.Rectangle");
18571 Clazz_defineMethod (c$, "getMaximizedBounds", 
18572 function () {
18573 return this.maximizedBounds;
18574 });
18575 Clazz_defineMethod (c$, "setUndecorated", 
18576 function (undecorated) {
18577 {
18578 if (this.isDisplayable ()) {
18579 throw  new java.awt.IllegalComponentStateException ("The frame is displayable.");
18580 }this.undecorated = undecorated;
18581 }}, "~B");
18582 Clazz_defineMethod (c$, "isUndecorated", 
18583 function () {
18584 return this.undecorated;
18585 });
18586 Clazz_overrideMethod (c$, "removeNotify", 
18587 function () {
18588 });
18589 Clazz_defineMethod (c$, "paramString", 
18590 function () {
18591 var str = Clazz_superCall (this, java.awt.Frame, "paramString", []);
18592 if (this.title != null) {
18593 str += ",title=" + this.title;
18594 }if (this.resizable) {
18595 str += ",resizable";
18596 }this.getExtendedState ();
18597 if (this.$state == 0) {
18598 str += ",normal";
18599 } else {
18600 if ((this.$state & 1) != 0) {
18601 str += ",iconified";
18602 }if ((this.$state & 6) == 6) {
18603 str += ",maximized";
18604 } else if ((this.$state & 2) != 0) {
18605 str += ",maximized_horiz";
18606 } else if ((this.$state & 4) != 0) {
18607 str += ",maximized_vert";
18608 }}return str;
18609 });
18610 Clazz_defineMethod (c$, "setCursor", 
18611 function (cursorType) {
18612 if (cursorType < 0 || cursorType > 13) {
18613 throw  new IllegalArgumentException ("illegal cursor type");
18614 }this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType));
18615 }, "~N");
18616 Clazz_defineMethod (c$, "getCursorType", 
18617 function () {
18618 return (this.getCursor ().getType ());
18619 });
18620 c$.getFrames = Clazz_defineMethod (c$, "getFrames", 
18621 function () {
18622 var allWindows = java.awt.Window.getWindows ();
18623 var frameCount = 0;
18624 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18625 if (Clazz_instanceOf (w, java.awt.Frame)) {
18626 frameCount++;
18627 }}
18628 var frames =  new Array (frameCount);
18629 var c = 0;
18630 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18631 if (Clazz_instanceOf (w, java.awt.Frame)) {
18632 frames[c++] = w;
18633 }}
18634 return frames;
18635 });
18636 Clazz_defineStatics (c$,
18637 "DEFAULT_CURSOR", 0,
18638 "CROSSHAIR_CURSOR", 1,
18639 "TEXT_CURSOR", 2,
18640 "WAIT_CURSOR", 3,
18641 "SW_RESIZE_CURSOR", 4,
18642 "SE_RESIZE_CURSOR", 5,
18643 "NW_RESIZE_CURSOR", 6,
18644 "NE_RESIZE_CURSOR", 7,
18645 "N_RESIZE_CURSOR", 8,
18646 "S_RESIZE_CURSOR", 9,
18647 "W_RESIZE_CURSOR", 10,
18648 "E_RESIZE_CURSOR", 11,
18649 "HAND_CURSOR", 12,
18650 "MOVE_CURSOR", 13,
18651 "NORMAL", 0,
18652 "ICONIFIED", 1,
18653 "MAXIMIZED_HORIZ", 2,
18654 "MAXIMIZED_VERT", 4,
18655 "MAXIMIZED_BOTH", 6,
18656 "$base", "frame",
18657 "$nameCounter", 0);
18658 });
18659 Clazz_declarePackage ("java.awt");
18660 Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () {
18661 c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException);
18662 });
18663 Clazz_declarePackage ("javax.swing");
18664 c$ = Clazz_declareInterface (javax.swing, "SwingConstants");
18665 Clazz_defineStatics (c$,
18666 "CENTER", 0,
18667 "TOP", 1,
18668 "LEFT", 2,
18669 "BOTTOM", 3,
18670 "RIGHT", 4,
18671 "NORTH", 1,
18672 "NORTH_EAST", 2,
18673 "EAST", 3,
18674 "SOUTH_EAST", 4,
18675 "SOUTH", 5,
18676 "SOUTH_WEST", 6,
18677 "WEST", 7,
18678 "NORTH_WEST", 8,
18679 "HORIZONTAL", 0,
18680 "VERTICAL", 1,
18681 "LEADING", 10,
18682 "TRAILING", 11,
18683 "NEXT", 12,
18684 "PREVIOUS", 13);
18685 Clazz_declarePackage ("java.awt");
18686 Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () {
18687 c$ = Clazz_decorateAsClass (function () {
18688 this.x = 0;
18689 this.y = 0;
18690 this.width = 0;
18691 this.height = 0;
18692 Clazz_instantialize (this, arguments);
18693 }, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape);
18694 Clazz_makeConstructor (c$, 
18695 function () {
18696 this.construct (0, 0, 0, 0);
18697 });
18698 Clazz_makeConstructor (c$, 
18699 function (r) {
18700 this.construct (r.x, r.y, r.width, r.height);
18701 }, "java.awt.Rectangle");
18702 Clazz_makeConstructor (c$, 
18703 function (x, y, width, height) {
18704 Clazz_superConstructor (this, java.awt.Rectangle, []);
18705 this.x = x;
18706 this.y = y;
18707 this.width = width;
18708 this.height = height;
18709 }, "~N,~N,~N,~N");
18710 Clazz_makeConstructor (c$, 
18711 function (width, height) {
18712 this.construct (0, 0, width, height);
18713 }, "~N,~N");
18714 Clazz_makeConstructor (c$, 
18715 function (p, d) {
18716 this.construct (p.x, p.y, d.width, d.height);
18717 }, "java.awt.Point,java.awt.Dimension");
18718 Clazz_makeConstructor (c$, 
18719 function (p) {
18720 this.construct (p.x, p.y, 0, 0);
18721 }, "java.awt.Point");
18722 Clazz_makeConstructor (c$, 
18723 function (d) {
18724 this.construct (0, 0, d.width, d.height);
18725 }, "java.awt.Dimension");
18726 Clazz_overrideMethod (c$, "getX", 
18727 function () {
18728 return this.x;
18729 });
18730 Clazz_overrideMethod (c$, "getY", 
18731 function () {
18732 return this.y;
18733 });
18734 Clazz_overrideMethod (c$, "getWidth", 
18735 function () {
18736 return this.width;
18737 });
18738 Clazz_overrideMethod (c$, "getHeight", 
18739 function () {
18740 return this.height;
18741 });
18742 Clazz_overrideMethod (c$, "getBounds", 
18743 function () {
18744 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18745 });
18746 Clazz_overrideMethod (c$, "getBounds2D", 
18747 function () {
18748 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18749 });
18750 Clazz_defineMethod (c$, "setBounds", 
18751 function (r) {
18752 this.reshape (r.x, r.y, r.width, r.height);
18753 }, "java.awt.Rectangle");
18754 Clazz_defineMethod (c$, "setBounds", 
18755 function (x, y, width, height) {
18756 this.reshape (x, y, width, height);
18757 }, "~N,~N,~N,~N");
18758 Clazz_defineMethod (c$, "setRect", 
18759 function (x, y, width, height) {
18760 var newx;
18761 var newy;
18762 var neww;
18763 var newh;
18764 if (x > 4.294967294E9) {
18765 newx = 2147483647;
18766 neww = -1;
18767 } else {
18768 newx = java.awt.Rectangle.clip (x, false);
18769 if (width >= 0) width += x - newx;
18770 neww = java.awt.Rectangle.clip (width, width >= 0);
18771 }if (y > 4.294967294E9) {
18772 newy = 2147483647;
18773 newh = -1;
18774 } else {
18775 newy = java.awt.Rectangle.clip (y, false);
18776 if (height >= 0) height += y - newy;
18777 newh = java.awt.Rectangle.clip (height, height >= 0);
18778 }this.reshape (newx, newy, neww, newh);
18779 }, "~N,~N,~N,~N");
18780 c$.clip = Clazz_defineMethod (c$, "clip", 
18781  function (v, doceil) {
18782 if (v <= -2147483648) {
18783 return -2147483648;
18784 }if (v >= 2147483647) {
18785 return 2147483647;
18786 }return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v));
18787 }, "~N,~B");
18788 Clazz_defineMethod (c$, "reshape", 
18789 function (x, y, width, height) {
18790 this.x = x;
18791 this.y = y;
18792 this.width = width;
18793 this.height = height;
18794 }, "~N,~N,~N,~N");
18795 Clazz_defineMethod (c$, "getLocation", 
18796 function () {
18797 return  new java.awt.Point (this.x, this.y);
18798 });
18799 Clazz_defineMethod (c$, "setLocation", 
18800 function (p) {
18801 this.setLocation (p.x, p.y);
18802 }, "java.awt.Point");
18803 Clazz_defineMethod (c$, "setLocation", 
18804 function (x, y) {
18805 this.move (x, y);
18806 }, "~N,~N");
18807 Clazz_defineMethod (c$, "move", 
18808 function (x, y) {
18809 this.x = x;
18810 this.y = y;
18811 }, "~N,~N");
18812 Clazz_defineMethod (c$, "translate", 
18813 function (dx, dy) {
18814 var oldv = this.x;
18815 var newv = oldv + dx;
18816 if (dx < 0) {
18817 if (newv > oldv) {
18818 if (this.width >= 0) {
18819 this.width += newv - -2147483648;
18820 }newv = -2147483648;
18821 }} else {
18822 if (newv < oldv) {
18823 if (this.width >= 0) {
18824 this.width += newv - 2147483647;
18825 if (this.width < 0) this.width = 2147483647;
18826 }newv = 2147483647;
18827 }}this.x = newv;
18828 oldv = this.y;
18829 newv = oldv + dy;
18830 if (dy < 0) {
18831 if (newv > oldv) {
18832 if (this.height >= 0) {
18833 this.height += newv - -2147483648;
18834 }newv = -2147483648;
18835 }} else {
18836 if (newv < oldv) {
18837 if (this.height >= 0) {
18838 this.height += newv - 2147483647;
18839 if (this.height < 0) this.height = 2147483647;
18840 }newv = 2147483647;
18841 }}this.y = newv;
18842 }, "~N,~N");
18843 Clazz_defineMethod (c$, "getSize", 
18844 function () {
18845 return  new java.awt.Dimension (this.width, this.height);
18846 });
18847 Clazz_defineMethod (c$, "setSize", 
18848 function (d) {
18849 this.setSize (d.width, d.height);
18850 }, "java.awt.Dimension");
18851 Clazz_defineMethod (c$, "setSize", 
18852 function (width, height) {
18853 this.resize (width, height);
18854 }, "~N,~N");
18855 Clazz_defineMethod (c$, "resize", 
18856 function (width, height) {
18857 this.width = width;
18858 this.height = height;
18859 }, "~N,~N");
18860 Clazz_defineMethod (c$, "contains", 
18861 function (p) {
18862 return this.contains (p.x, p.y);
18863 }, "java.awt.Point");
18864 Clazz_defineMethod (c$, "contains", 
18865 function (x, y) {
18866 return this.inside (x, y);
18867 }, "~N,~N");
18868 Clazz_defineMethod (c$, "contains", 
18869 function (r) {
18870 return this.contains (r.x, r.y, r.width, r.height);
18871 }, "java.awt.Rectangle");
18872 Clazz_defineMethod (c$, "contains", 
18873 function (X, Y, W, H) {
18874 var w = this.width;
18875 var h = this.height;
18876 if ((w | h | W | H) < 0) {
18877 return false;
18878 }var x = this.x;
18879 var y = this.y;
18880 if (X < x || Y < y) {
18881 return false;
18882 }w += x;
18883 W += X;
18884 if (W <= X) {
18885 if (w >= x || W > w) return false;
18886 } else {
18887 if (w >= x && W > w) return false;
18888 }h += y;
18889 H += Y;
18890 if (H <= Y) {
18891 if (h >= y || H > h) return false;
18892 } else {
18893 if (h >= y && H > h) return false;
18894 }return true;
18895 }, "~N,~N,~N,~N");
18896 Clazz_defineMethod (c$, "inside", 
18897 function (X, Y) {
18898 var w = this.width;
18899 var h = this.height;
18900 if ((w | h) < 0) {
18901 return false;
18902 }var x = this.x;
18903 var y = this.y;
18904 if (X < x || Y < y) {
18905 return false;
18906 }w += x;
18907 h += y;
18908 return ((w < x || w > X) && (h < y || h > Y));
18909 }, "~N,~N");
18910 Clazz_defineMethod (c$, "intersects", 
18911 function (r) {
18912 var tw = this.width;
18913 var th = this.height;
18914 var rw = r.width;
18915 var rh = r.height;
18916 if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
18917 return false;
18918 }var tx = this.x;
18919 var ty = this.y;
18920 var rx = r.x;
18921 var ry = r.y;
18922 rw += rx;
18923 rh += ry;
18924 tw += tx;
18925 th += ty;
18926 return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry));
18927 }, "java.awt.Rectangle");
18928 Clazz_defineMethod (c$, "intersection", 
18929 function (r) {
18930 var tx1 = this.x;
18931 var ty1 = this.y;
18932 var rx1 = r.x;
18933 var ry1 = r.y;
18934 var tx2 = tx1;
18935 tx2 += this.width;
18936 var ty2 = ty1;
18937 ty2 += this.height;
18938 var rx2 = rx1;
18939 rx2 += r.width;
18940 var ry2 = ry1;
18941 ry2 += r.height;
18942 if (tx1 < rx1) tx1 = rx1;
18943 if (ty1 < ry1) ty1 = ry1;
18944 if (tx2 > rx2) tx2 = rx2;
18945 if (ty2 > ry2) ty2 = ry2;
18946 tx2 -= tx1;
18947 ty2 -= ty1;
18948 if (tx2 < -2147483648) tx2 = -2147483648;
18949 if (ty2 < -2147483648) ty2 = -2147483648;
18950 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18951 }, "java.awt.Rectangle");
18952 Clazz_defineMethod (c$, "union", 
18953 function (r) {
18954 var tx2 = this.width;
18955 var ty2 = this.height;
18956 if ((tx2 | ty2) < 0) {
18957 return  new java.awt.Rectangle (r);
18958 }var rx2 = r.width;
18959 var ry2 = r.height;
18960 if ((rx2 | ry2) < 0) {
18961 return  new java.awt.Rectangle (this);
18962 }var tx1 = this.x;
18963 var ty1 = this.y;
18964 tx2 += tx1;
18965 ty2 += ty1;
18966 var rx1 = r.x;
18967 var ry1 = r.y;
18968 rx2 += rx1;
18969 ry2 += ry1;
18970 if (tx1 > rx1) tx1 = rx1;
18971 if (ty1 > ry1) ty1 = ry1;
18972 if (tx2 < rx2) tx2 = rx2;
18973 if (ty2 < ry2) ty2 = ry2;
18974 tx2 -= tx1;
18975 ty2 -= ty1;
18976 if (tx2 > 2147483647) tx2 = 2147483647;
18977 if (ty2 > 2147483647) ty2 = 2147483647;
18978 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18979 }, "java.awt.Rectangle");
18980 Clazz_defineMethod (c$, "add", 
18981 function (newx, newy) {
18982 if ((this.width | this.height) < 0) {
18983 this.x = newx;
18984 this.y = newy;
18985 this.width = this.height = 0;
18986 return;
18987 }var x1 = this.x;
18988 var y1 = this.y;
18989 var x2 = this.width;
18990 var y2 = this.height;
18991 x2 += x1;
18992 y2 += y1;
18993 if (x1 > newx) x1 = newx;
18994 if (y1 > newy) y1 = newy;
18995 if (x2 < newx) x2 = newx;
18996 if (y2 < newy) y2 = newy;
18997 x2 -= x1;
18998 y2 -= y1;
18999 if (x2 > 2147483647) x2 = 2147483647;
19000 if (y2 > 2147483647) y2 = 2147483647;
19001 this.reshape (x1, y1, x2, y2);
19002 }, "~N,~N");
19003 Clazz_defineMethod (c$, "add", 
19004 function (pt) {
19005 this.add (pt.x, pt.y);
19006 }, "java.awt.Point");
19007 Clazz_defineMethod (c$, "add", 
19008 function (r) {
19009 var tx2 = this.width;
19010 var ty2 = this.height;
19011 if ((tx2 | ty2) < 0) {
19012 this.reshape (r.x, r.y, r.width, r.height);
19013 }var rx2 = r.width;
19014 var ry2 = r.height;
19015 if ((rx2 | ry2) < 0) {
19016 return;
19017 }var tx1 = this.x;
19018 var ty1 = this.y;
19019 tx2 += tx1;
19020 ty2 += ty1;
19021 var rx1 = r.x;
19022 var ry1 = r.y;
19023 rx2 += rx1;
19024 ry2 += ry1;
19025 if (tx1 > rx1) tx1 = rx1;
19026 if (ty1 > ry1) ty1 = ry1;
19027 if (tx2 < rx2) tx2 = rx2;
19028 if (ty2 < ry2) ty2 = ry2;
19029 tx2 -= tx1;
19030 ty2 -= ty1;
19031 if (tx2 > 2147483647) tx2 = 2147483647;
19032 if (ty2 > 2147483647) ty2 = 2147483647;
19033 this.reshape (tx1, ty1, tx2, ty2);
19034 }, "java.awt.Rectangle");
19035 Clazz_defineMethod (c$, "grow", 
19036 function (h, v) {
19037 var x0 = this.x;
19038 var y0 = this.y;
19039 var x1 = this.width;
19040 var y1 = this.height;
19041 x1 += x0;
19042 y1 += y0;
19043 x0 -= h;
19044 y0 -= v;
19045 x1 += h;
19046 y1 += v;
19047 if (x1 < x0) {
19048 x1 -= x0;
19049 if (x1 < -2147483648) x1 = -2147483648;
19050 if (x0 < -2147483648) x0 = -2147483648;
19051  else if (x0 > 2147483647) x0 = 2147483647;
19052 } else {
19053 if (x0 < -2147483648) x0 = -2147483648;
19054  else if (x0 > 2147483647) x0 = 2147483647;
19055 x1 -= x0;
19056 if (x1 < -2147483648) x1 = -2147483648;
19057  else if (x1 > 2147483647) x1 = 2147483647;
19058 }if (y1 < y0) {
19059 y1 -= y0;
19060 if (y1 < -2147483648) y1 = -2147483648;
19061 if (y0 < -2147483648) y0 = -2147483648;
19062  else if (y0 > 2147483647) y0 = 2147483647;
19063 } else {
19064 if (y0 < -2147483648) y0 = -2147483648;
19065  else if (y0 > 2147483647) y0 = 2147483647;
19066 y1 -= y0;
19067 if (y1 < -2147483648) y1 = -2147483648;
19068  else if (y1 > 2147483647) y1 = 2147483647;
19069 }this.reshape (x0, y0, x1, y1);
19070 }, "~N,~N");
19071 Clazz_overrideMethod (c$, "isEmpty", 
19072 function () {
19073 return (this.width <= 0) || (this.height <= 0);
19074 });
19075 Clazz_defineMethod (c$, "outcode", 
19076 function (x, y) {
19077 var out = 0;
19078 if (this.width <= 0) {
19079 out |= 5;
19080 } else if (x < this.x) {
19081 out |= 1;
19082 } else if (x > this.x + this.width) {
19083 out |= 4;
19084 }if (this.height <= 0) {
19085 out |= 10;
19086 } else if (y < this.y) {
19087 out |= 2;
19088 } else if (y > this.y + this.height) {
19089 out |= 8;
19090 }return out;
19091 }, "~N,~N");
19092 Clazz_overrideMethod (c$, "createIntersection", 
19093 function (r) {
19094 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19095 return this.intersection (r);
19096 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19097 java.awt.geom.Rectangle2D.intersect (this, r, dest);
19098 return dest;
19099 }, "java.awt.geom.Rectangle2D");
19100 Clazz_overrideMethod (c$, "createUnion", 
19101 function (r) {
19102 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19103 return this.union (r);
19104 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19105 java.awt.geom.Rectangle2D.union (this, r, dest);
19106 return dest;
19107 }, "java.awt.geom.Rectangle2D");
19108 Clazz_defineMethod (c$, "equals", 
19109 function (obj) {
19110 if (Clazz_instanceOf (obj, java.awt.Rectangle)) {
19111 var r = obj;
19112 return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height));
19113 }return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]);
19114 }, "~O");
19115 Clazz_overrideMethod (c$, "toString", 
19116 function () {
19117 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]";
19118 });
19119 });
19120 Clazz_declarePackage ("java.awt");
19121 Clazz_declareInterface (java.awt, "Shape");
19122 Clazz_declarePackage ("java.awt.geom");
19123 Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {
19124 c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);
19125 Clazz_makeConstructor (c$, 
19126 function () {
19127 Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []);
19128 });
19129 Clazz_defineMethod (c$, "setRect", 
19130 function (r) {
19131 this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19132 }, "java.awt.geom.Rectangle2D");
19133 Clazz_defineMethod (c$, "intersectsLine", 
19134 function (x1, y1, x2, y2) {
19135 var out1;
19136 var out2;
19137 if ((out2 = this.outcode (x2, y2)) == 0) {
19138 return true;
19139 }while ((out1 = this.outcode (x1, y1)) != 0) {
19140 if ((out1 & out2) != 0) {
19141 return false;
19142 }if ((out1 & (5)) != 0) {
19143 var x = this.getX ();
19144 if ((out1 & 4) != 0) {
19145 x += this.getWidth ();
19146 }y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);
19147 x1 = x;
19148 } else {
19149 var y = this.getY ();
19150 if ((out1 & 8) != 0) {
19151 y += this.getHeight ();
19152 }x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);
19153 y1 = y;
19154 }}
19155 return true;
19156 }, "~N,~N,~N,~N");
19157 Clazz_defineMethod (c$, "intersectsLine", 
19158 function (l) {
19159 return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
19160 }, "java.awt.geom.Line2D");
19161 Clazz_defineMethod (c$, "outcode", 
19162 function (p) {
19163 return this.outcode (p.getX (), p.getY ());
19164 }, "java.awt.geom.Point2D");
19165 Clazz_defineMethod (c$, "setFrame", 
19166 function (x, y, w, h) {
19167 this.setRect (x, y, w, h);
19168 }, "~N,~N,~N,~N");
19169 Clazz_overrideMethod (c$, "getBounds2D", 
19170 function () {
19171 return this.clone ();
19172 });
19173 Clazz_defineMethod (c$, "contains", 
19174 function (x, y) {
19175 var x0 = this.getX ();
19176 var y0 = this.getY ();
19177 return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19178 }, "~N,~N");
19179 Clazz_defineMethod (c$, "intersects", 
19180 function (x, y, w, h) {
19181 if (this.isEmpty () || w <= 0 || h <= 0) {
19182 return false;
19183 }var x0 = this.getX ();
19184 var y0 = this.getY ();
19185 return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19186 }, "~N,~N,~N,~N");
19187 Clazz_defineMethod (c$, "contains", 
19188 function (x, y, w, h) {
19189 if (this.isEmpty () || w <= 0 || h <= 0) {
19190 return false;
19191 }var x0 = this.getX ();
19192 var y0 = this.getY ();
19193 return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());
19194 }, "~N,~N,~N,~N");
19195 c$.intersect = Clazz_defineMethod (c$, "intersect", 
19196 function (src1, src2, dest) {
19197 var x1 = Math.max (src1.getMinX (), src2.getMinX ());
19198 var y1 = Math.max (src1.getMinY (), src2.getMinY ());
19199 var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());
19200 var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());
19201 dest.setFrame (x1, y1, x2 - x1, y2 - y1);
19202 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19203 c$.union = Clazz_defineMethod (c$, "union", 
19204 function (src1, src2, dest) {
19205 var x1 = Math.min (src1.getMinX (), src2.getMinX ());
19206 var y1 = Math.min (src1.getMinY (), src2.getMinY ());
19207 var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());
19208 var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());
19209 dest.setFrameFromDiagonal (x1, y1, x2, y2);
19210 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19211 Clazz_defineMethod (c$, "add", 
19212 function (newx, newy) {
19213 var x1 = Math.min (this.getMinX (), newx);
19214 var x2 = Math.max (this.getMaxX (), newx);
19215 var y1 = Math.min (this.getMinY (), newy);
19216 var y2 = Math.max (this.getMaxY (), newy);
19217 this.setRect (x1, y1, x2 - x1, y2 - y1);
19218 }, "~N,~N");
19219 Clazz_defineMethod (c$, "add", 
19220 function (pt) {
19221 this.add (pt.getX (), pt.getY ());
19222 }, "java.awt.geom.Point2D");
19223 Clazz_defineMethod (c$, "add", 
19224 function (r) {
19225 var x1 = Math.min (this.getMinX (), r.getMinX ());
19226 var x2 = Math.max (this.getMaxX (), r.getMaxX ());
19227 var y1 = Math.min (this.getMinY (), r.getMinY ());
19228 var y2 = Math.max (this.getMaxY (), r.getMaxY ());
19229 this.setRect (x1, y1, x2 - x1, y2 - y1);
19230 }, "java.awt.geom.Rectangle2D");
19231 Clazz_defineMethod (c$, "getPathIterator", 
19232 function (at) {
19233 return  new java.awt.geom.RectIterator (this, at);
19234 }, "java.awt.geom.AffineTransform");
19235 Clazz_defineMethod (c$, "getPathIterator", 
19236 function (at, flatness) {
19237 return  new java.awt.geom.RectIterator (this, at);
19238 }, "java.awt.geom.AffineTransform,~N");
19239 Clazz_overrideMethod (c$, "hashCode", 
19240 function () {
19241 var bits = java.lang.Double.doubleToLongBits (this.getX ());
19242 bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
19243 bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
19244 bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
19245 return ((bits) ^ ((bits >> 32)));
19246 });
19247 Clazz_overrideMethod (c$, "equals", 
19248 function (obj) {
19249 if (obj === this) {
19250 return true;
19251 }if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) {
19252 var r2d = obj;
19253 return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));
19254 }return false;
19255 }, "~O");
19256 Clazz_pu$h(self.c$);
19257 c$ = Clazz_decorateAsClass (function () {
19258 this.x = 0;
19259 this.y = 0;
19260 this.width = 0;
19261 this.height = 0;
19262 Clazz_instantialize (this, arguments);
19263 }, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);
19264 Clazz_makeConstructor (c$, 
19265 function (a, b, c, d) {
19266 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []);
19267 {
19268 if (arguments.length == 0)
19269 return;
19270 }this.setRect (a, b, c, d);
19271 }, "~N,~N,~N,~N");
19272 Clazz_defineMethod (c$, "getX", 
19273 function () {
19274 return this.x;
19275 });
19276 Clazz_defineMethod (c$, "getY", 
19277 function () {
19278 return this.y;
19279 });
19280 Clazz_defineMethod (c$, "getWidth", 
19281 function () {
19282 return this.width;
19283 });
19284 Clazz_defineMethod (c$, "getHeight", 
19285 function () {
19286 return this.height;
19287 });
19288 Clazz_overrideMethod (c$, "isEmpty", 
19289 function () {
19290 return (this.width <= 0.0) || (this.height <= 0.0);
19291 });
19292 Clazz_defineMethod (c$, "setRect", 
19293 function (a, b, c, d) {
19294 this.x = a;
19295 this.y = b;
19296 this.width = c;
19297 this.height = d;
19298 }, "~N,~N,~N,~N");
19299 Clazz_defineMethod (c$, "setRect", 
19300 function (a, b, c, d) {
19301 this.x = a;
19302 this.y = b;
19303 this.width = c;
19304 this.height = d;
19305 }, "~N,~N,~N,~N");
19306 Clazz_defineMethod (c$, "setRect", 
19307 function (a) {
19308 this.x = a.getX ();
19309 this.y = a.getY ();
19310 this.width = a.getWidth ();
19311 this.height = a.getHeight ();
19312 }, "java.awt.geom.Rectangle2D");
19313 Clazz_defineMethod (c$, "outcode", 
19314 function (a, b) {
19315 var c = 0;
19316 if (this.width <= 0) {
19317 c |= 5;
19318 } else if (a < this.x) {
19319 c |= 1;
19320 } else if (a > this.x + this.width) {
19321 c |= 4;
19322 }if (this.height <= 0) {
19323 c |= 10;
19324 } else if (b < this.y) {
19325 c |= 2;
19326 } else if (b > this.y + this.height) {
19327 c |= 8;
19328 }return c;
19329 }, "~N,~N");
19330 Clazz_overrideMethod (c$, "getBounds2D", 
19331 function () {
19332 return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
19333 });
19334 Clazz_overrideMethod (c$, "createIntersection", 
19335 function (a) {
19336 var b;
19337 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19338 b =  new java.awt.geom.Rectangle2D.Float ();
19339 } else {
19340 b =  new java.awt.geom.Rectangle2D.Double ();
19341 }java.awt.geom.Rectangle2D.intersect (this, a, b);
19342 return b;
19343 }, "java.awt.geom.Rectangle2D");
19344 Clazz_overrideMethod (c$, "createUnion", 
19345 function (a) {
19346 var b;
19347 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19348 b =  new java.awt.geom.Rectangle2D.Float ();
19349 } else {
19350 b =  new java.awt.geom.Rectangle2D.Double ();
19351 }java.awt.geom.Rectangle2D.union (this, a, b);
19352 return b;
19353 }, "java.awt.geom.Rectangle2D");
19354 Clazz_overrideMethod (c$, "toString", 
19355 function () {
19356 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19357 });
19358 c$ = Clazz_p0p ();
19359 Clazz_pu$h(self.c$);
19360 c$ = Clazz_decorateAsClass (function () {
19361 this.x = 0;
19362 this.y = 0;
19363 this.width = 0;
19364 this.height = 0;
19365 Clazz_instantialize (this, arguments);
19366 }, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);
19367 Clazz_makeConstructor (c$, 
19368 function () {
19369 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19370 });
19371 Clazz_makeConstructor (c$, 
19372 function (a, b, c, d) {
19373 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19374 this.setRect (a, b, c, d);
19375 }, "~N,~N,~N,~N");
19376 Clazz_defineMethod (c$, "getX", 
19377 function () {
19378 return this.x;
19379 });
19380 Clazz_defineMethod (c$, "getY", 
19381 function () {
19382 return this.y;
19383 });
19384 Clazz_defineMethod (c$, "getWidth", 
19385 function () {
19386 return this.width;
19387 });
19388 Clazz_defineMethod (c$, "getHeight", 
19389 function () {
19390 return this.height;
19391 });
19392 Clazz_overrideMethod (c$, "isEmpty", 
19393 function () {
19394 return (this.width <= 0.0) || (this.height <= 0.0);
19395 });
19396 Clazz_defineMethod (c$, "setRect", 
19397 function (a, b, c, d) {
19398 this.x = a;
19399 this.y = b;
19400 this.width = c;
19401 this.height = d;
19402 }, "~N,~N,~N,~N");
19403 Clazz_defineMethod (c$, "setRect", 
19404 function (a) {
19405 this.x = a.getX ();
19406 this.y = a.getY ();
19407 this.width = a.getWidth ();
19408 this.height = a.getHeight ();
19409 }, "java.awt.geom.Rectangle2D");
19410 Clazz_defineMethod (c$, "outcode", 
19411 function (a, b) {
19412 var c = 0;
19413 if (this.width <= 0) {
19414 c |= 5;
19415 } else if (a < this.x) {
19416 c |= 1;
19417 } else if (a > this.x + this.width) {
19418 c |= 4;
19419 }if (this.height <= 0) {
19420 c |= 10;
19421 } else if (b < this.y) {
19422 c |= 2;
19423 } else if (b > this.y + this.height) {
19424 c |= 8;
19425 }return c;
19426 }, "~N,~N");
19427 Clazz_overrideMethod (c$, "getBounds2D", 
19428 function () {
19429 return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
19430 });
19431 Clazz_overrideMethod (c$, "createIntersection", 
19432 function (a) {
19433 var b =  new java.awt.geom.Rectangle2D.Double ();
19434 java.awt.geom.Rectangle2D.intersect (this, a, b);
19435 return b;
19436 }, "java.awt.geom.Rectangle2D");
19437 Clazz_overrideMethod (c$, "createUnion", 
19438 function (a) {
19439 var b =  new java.awt.geom.Rectangle2D.Double ();
19440 java.awt.geom.Rectangle2D.union (this, a, b);
19441 return b;
19442 }, "java.awt.geom.Rectangle2D");
19443 Clazz_overrideMethod (c$, "toString", 
19444 function () {
19445 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19446 });
19447 c$ = Clazz_p0p ();
19448 Clazz_defineStatics (c$,
19449 "OUT_LEFT", 1,
19450 "OUT_TOP", 2,
19451 "OUT_RIGHT", 4,
19452 "OUT_BOTTOM", 8);
19453 });
19454 Clazz_declarePackage ("java.awt.geom");
19455 Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () {
19456 c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]);
19457 Clazz_makeConstructor (c$, 
19458 function () {
19459 });
19460 Clazz_defineMethod (c$, "getMinX", 
19461 function () {
19462 return this.getX ();
19463 });
19464 Clazz_defineMethod (c$, "getMinY", 
19465 function () {
19466 return this.getY ();
19467 });
19468 Clazz_defineMethod (c$, "getMaxX", 
19469 function () {
19470 return this.getX () + this.getWidth ();
19471 });
19472 Clazz_defineMethod (c$, "getMaxY", 
19473 function () {
19474 return this.getY () + this.getHeight ();
19475 });
19476 Clazz_defineMethod (c$, "getCenterX", 
19477 function () {
19478 return this.getX () + this.getWidth () / 2.0;
19479 });
19480 Clazz_defineMethod (c$, "getCenterY", 
19481 function () {
19482 return this.getY () + this.getHeight () / 2.0;
19483 });
19484 Clazz_defineMethod (c$, "getFrame", 
19485 function () {
19486 return  new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
19487 });
19488 Clazz_defineMethod (c$, "setFrame", 
19489 function (loc, size) {
19490 this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ());
19491 }, "java.awt.geom.Point2D,java.awt.geom.Dimension2D");
19492 Clazz_defineMethod (c$, "setFrame", 
19493 function (r) {
19494 this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19495 }, "java.awt.geom.Rectangle2D");
19496 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19497 function (x1, y1, x2, y2) {
19498 if (x2 < x1) {
19499 var t = x1;
19500 x1 = x2;
19501 x2 = t;
19502 }if (y2 < y1) {
19503 var t = y1;
19504 y1 = y2;
19505 y2 = t;
19506 }this.setFrame (x1, y1, x2 - x1, y2 - y1);
19507 }, "~N,~N,~N,~N");
19508 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19509 function (p1, p2) {
19510 this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
19511 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19512 Clazz_defineMethod (c$, "setFrameFromCenter", 
19513 function (centerX, centerY, cornerX, cornerY) {
19514 var halfW = Math.abs (cornerX - centerX);
19515 var halfH = Math.abs (cornerY - centerY);
19516 this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0);
19517 }, "~N,~N,~N,~N");
19518 Clazz_defineMethod (c$, "setFrameFromCenter", 
19519 function (center, corner) {
19520 this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ());
19521 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19522 Clazz_defineMethod (c$, "contains", 
19523 function (p) {
19524 return this.contains (p.getX (), p.getY ());
19525 }, "java.awt.geom.Point2D");
19526 Clazz_overrideMethod (c$, "intersects", 
19527 function (r) {
19528 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19529 }, "java.awt.geom.Rectangle2D");
19530 Clazz_defineMethod (c$, "contains", 
19531 function (r) {
19532 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19533 }, "java.awt.geom.Rectangle2D");
19534 Clazz_overrideMethod (c$, "getBounds", 
19535 function () {
19536 var width = this.getWidth ();
19537 var height = this.getHeight ();
19538 if (width < 0 || height < 0) {
19539 return  new java.awt.Rectangle ();
19540 }var x = this.getX ();
19541 var y = this.getY ();
19542 var x1 = Math.floor (x);
19543 var y1 = Math.floor (y);
19544 var x2 = Math.ceil (x + width);
19545 var y2 = Math.ceil (y + height);
19546 return  new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1));
19547 });
19548 Clazz_overrideMethod (c$, "getPathIterator", 
19549 function (at, flatness) {
19550 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
19551 }, "java.awt.geom.AffineTransform,~N");
19552 Clazz_defineMethod (c$, "clone", 
19553 function () {
19554 try {
19555 return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []);
19556 } catch (e) {
19557 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
19558 throw  new InternalError ();
19559 } else {
19560 throw e;
19561 }
19562 }
19563 });
19564 });
19565 Clazz_declarePackage ("java.awt.geom");
19566 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () {
19567 c$ = Clazz_decorateAsClass (function () {
19568 this.src = null;
19569 this.squareflat = 0;
19570 this.limit = 0;
19571 this.hold = null;
19572 this.curx = 0;
19573 this.cury = 0;
19574 this.movx = 0;
19575 this.movy = 0;
19576 this.holdType = 0;
19577 this.holdEnd = 0;
19578 this.holdIndex = 0;
19579 this.levels = null;
19580 this.levelIndex = 0;
19581 this.done = false;
19582 Clazz_instantialize (this, arguments);
19583 }, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator);
19584 Clazz_prepareFields (c$, function () {
19585 this.hold =  Clazz_newDoubleArray (14, 0);
19586 });
19587 Clazz_makeConstructor (c$, 
19588 function (src, flatness) {
19589 this.construct (src, flatness, 10);
19590 }, "java.awt.geom.PathIterator,~N");
19591 Clazz_makeConstructor (c$, 
19592 function (src, flatness, limit) {
19593 if (flatness < 0.0) {
19594 throw  new IllegalArgumentException ("flatness must be >= 0");
19595 }if (limit < 0) {
19596 throw  new IllegalArgumentException ("limit must be >= 0");
19597 }this.src = src;
19598 this.squareflat = flatness * flatness;
19599 this.limit = limit;
19600 this.levels =  Clazz_newIntArray (limit + 1, 0);
19601 this.next (false);
19602 }, "java.awt.geom.PathIterator,~N,~N");
19603 Clazz_defineMethod (c$, "getFlatness", 
19604 function () {
19605 return Math.sqrt (this.squareflat);
19606 });
19607 Clazz_defineMethod (c$, "getRecursionLimit", 
19608 function () {
19609 return this.limit;
19610 });
19611 Clazz_defineMethod (c$, "getWindingRule", 
19612 function () {
19613 return this.src.getWindingRule ();
19614 });
19615 Clazz_defineMethod (c$, "isDone", 
19616 function () {
19617 return this.done;
19618 });
19619 Clazz_defineMethod (c$, "ensureHoldCapacity", 
19620 function (want) {
19621 if (this.holdIndex - want < 0) {
19622 var have = this.hold.length - this.holdIndex;
19623 var newsize = this.hold.length + 24;
19624 var newhold =  Clazz_newDoubleArray (newsize, 0);
19625 System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have);
19626 this.hold = newhold;
19627 this.holdIndex += 24;
19628 this.holdEnd += 24;
19629 }}, "~N");
19630 Clazz_defineMethod (c$, "next", 
19631 function () {
19632 this.next (true);
19633 });
19634 Clazz_defineMethod (c$, "next", 
19635  function (doNext) {
19636 var level;
19637 if (this.holdIndex >= this.holdEnd) {
19638 if (doNext) {
19639 this.src.next ();
19640 }if (this.src.isDone ()) {
19641 this.done = true;
19642 return;
19643 }this.holdType = this.src.currentSegment (this.hold);
19644 this.levelIndex = 0;
19645 this.levels[0] = 0;
19646 }switch (this.holdType) {
19647 case 0:
19648 case 1:
19649 this.curx = this.hold[0];
19650 this.cury = this.hold[1];
19651 if (this.holdType == 0) {
19652 this.movx = this.curx;
19653 this.movy = this.cury;
19654 }this.holdIndex = 0;
19655 this.holdEnd = 0;
19656 break;
19657 case 4:
19658 this.curx = this.movx;
19659 this.cury = this.movy;
19660 this.holdIndex = 0;
19661 this.holdEnd = 0;
19662 break;
19663 case 2:
19664 if (this.holdIndex >= this.holdEnd) {
19665 this.holdIndex = this.hold.length - 6;
19666 this.holdEnd = this.hold.length - 2;
19667 this.hold[this.holdIndex + 0] = this.curx;
19668 this.hold[this.holdIndex + 1] = this.cury;
19669 this.hold[this.holdIndex + 2] = this.hold[0];
19670 this.hold[this.holdIndex + 3] = this.hold[1];
19671 this.hold[this.holdIndex + 4] = this.curx = this.hold[2];
19672 this.hold[this.holdIndex + 5] = this.cury = this.hold[3];
19673 }level = this.levels[this.levelIndex];
19674 while (level < this.limit) {
19675 if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19676 break;
19677 }this.ensureHoldCapacity (4);
19678 java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex);
19679 this.holdIndex -= 4;
19680 level++;
19681 this.levels[this.levelIndex] = level;
19682 this.levelIndex++;
19683 this.levels[this.levelIndex] = level;
19684 }
19685 this.holdIndex += 4;
19686 this.levelIndex--;
19687 break;
19688 case 3:
19689 if (this.holdIndex >= this.holdEnd) {
19690 this.holdIndex = this.hold.length - 8;
19691 this.holdEnd = this.hold.length - 2;
19692 this.hold[this.holdIndex + 0] = this.curx;
19693 this.hold[this.holdIndex + 1] = this.cury;
19694 this.hold[this.holdIndex + 2] = this.hold[0];
19695 this.hold[this.holdIndex + 3] = this.hold[1];
19696 this.hold[this.holdIndex + 4] = this.hold[2];
19697 this.hold[this.holdIndex + 5] = this.hold[3];
19698 this.hold[this.holdIndex + 6] = this.curx = this.hold[4];
19699 this.hold[this.holdIndex + 7] = this.cury = this.hold[5];
19700 }level = this.levels[this.levelIndex];
19701 while (level < this.limit) {
19702 if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19703 break;
19704 }this.ensureHoldCapacity (6);
19705 java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex);
19706 this.holdIndex -= 6;
19707 level++;
19708 this.levels[this.levelIndex] = level;
19709 this.levelIndex++;
19710 this.levels[this.levelIndex] = level;
19711 }
19712 this.holdIndex += 6;
19713 this.levelIndex--;
19714 break;
19715 }
19716 }, "~B");
19717 Clazz_defineMethod (c$, "currentSegment", 
19718 function (coords) {
19719 if (this.isDone ()) {
19720 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19721 }var type = this.holdType;
19722 if (type != 4) {
19723 coords[0] = this.hold[this.holdIndex + 0];
19724 coords[1] = this.hold[this.holdIndex + 1];
19725 if (type != 0) {
19726 type = 1;
19727 }}return type;
19728 }, "~A");
19729 Clazz_defineMethod (c$, "currentSegment", 
19730 function (coords) {
19731 if (this.isDone ()) {
19732 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19733 }var type = this.holdType;
19734 if (type != 4) {
19735 coords[0] = this.hold[this.holdIndex + 0];
19736 coords[1] = this.hold[this.holdIndex + 1];
19737 if (type != 0) {
19738 type = 1;
19739 }}return type;
19740 }, "~A");
19741 Clazz_defineStatics (c$,
19742 "GROW_SIZE", 24);
19743 });
19744 Clazz_declarePackage ("java.awt.geom");
19745 c$ = Clazz_declareInterface (java.awt.geom, "PathIterator");
19746 Clazz_defineStatics (c$,
19747 "WIND_EVEN_ODD", 0,
19748 "WIND_NON_ZERO", 1,
19749 "SEG_MOVETO", 0,
19750 "SEG_LINETO", 1,
19751 "SEG_QUADTO", 2,
19752 "SEG_CUBICTO", 3,
19753 "SEG_CLOSE", 4);
19754 Clazz_declarePackage ("java.awt.geom");
19755 Clazz_load (["java.awt.Shape"], "java.awt.geom.CubicCurve2D", ["java.lang.InternalError", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadCurve2D", "$.Rectangle2D", "jssun.awt.geom.Curve", "swingjs.api.Interface"], function () {
19756 c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]);
19757 Clazz_makeConstructor (c$, 
19758 function () {
19759 });
19760 Clazz_defineMethod (c$, "setCurve", 
19761 function (coords, offset) {
19762 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
19763 }, "~A,~N");
19764 Clazz_defineMethod (c$, "setCurve", 
19765 function (p1, cp1, cp2, p2) {
19766 this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ());
19767 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
19768 Clazz_defineMethod (c$, "setCurve", 
19769 function (pts, offset) {
19770 this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY (), pts[offset + 3].getX (), pts[offset + 3].getY ());
19771 }, "~A,~N");
19772 Clazz_defineMethod (c$, "setCurve", 
19773 function (c) {
19774 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ());
19775 }, "java.awt.geom.CubicCurve2D");
19776 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19777 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19778 return Math.max (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx1, ctrly1), java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx2, ctrly2));
19779 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19780 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19781 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19782 return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2));
19783 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19784 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19785 function (coords, offset) {
19786 return java.awt.geom.CubicCurve2D.getFlatnessSq (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
19787 }, "~A,~N");
19788 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19789 function (coords, offset) {
19790 return java.awt.geom.CubicCurve2D.getFlatness (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5], coords[offset + 6], coords[offset + 7]);
19791 }, "~A,~N");
19792 Clazz_defineMethod (c$, "getFlatnessSq", 
19793 function () {
19794 return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19795 });
19796 Clazz_defineMethod (c$, "getFlatness", 
19797 function () {
19798 return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19799 });
19800 Clazz_defineMethod (c$, "subdivide", 
19801 function (left, right) {
19802 java.awt.geom.CubicCurve2D.subdivide (this, left, right);
19803 }, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19804 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19805 function (src, left, right) {
19806 var x1 = src.getX1 ();
19807 var y1 = src.getY1 ();
19808 var ctrlx1 = src.getCtrlX1 ();
19809 var ctrly1 = src.getCtrlY1 ();
19810 var ctrlx2 = src.getCtrlX2 ();
19811 var ctrly2 = src.getCtrlY2 ();
19812 var x2 = src.getX2 ();
19813 var y2 = src.getY2 ();
19814 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19815 var centery = (ctrly1 + ctrly2) / 2.0;
19816 ctrlx1 = (x1 + ctrlx1) / 2.0;
19817 ctrly1 = (y1 + ctrly1) / 2.0;
19818 ctrlx2 = (x2 + ctrlx2) / 2.0;
19819 ctrly2 = (y2 + ctrly2) / 2.0;
19820 var ctrlx12 = (ctrlx1 + centerx) / 2.0;
19821 var ctrly12 = (ctrly1 + centery) / 2.0;
19822 var ctrlx21 = (ctrlx2 + centerx) / 2.0;
19823 var ctrly21 = (ctrly2 + centery) / 2.0;
19824 centerx = (ctrlx12 + ctrlx21) / 2.0;
19825 centery = (ctrly12 + ctrly21) / 2.0;
19826 if (left != null) {
19827 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery);
19828 }if (right != null) {
19829 right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2);
19830 }}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19831 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19832 function (src, srcoff, left, leftoff, right, rightoff) {
19833 var x1 = src[srcoff + 0];
19834 var y1 = src[srcoff + 1];
19835 var ctrlx1 = src[srcoff + 2];
19836 var ctrly1 = src[srcoff + 3];
19837 var ctrlx2 = src[srcoff + 4];
19838 var ctrly2 = src[srcoff + 5];
19839 var x2 = src[srcoff + 6];
19840 var y2 = src[srcoff + 7];
19841 if (left != null) {
19842 left[leftoff + 0] = x1;
19843 left[leftoff + 1] = y1;
19844 }if (right != null) {
19845 right[rightoff + 6] = x2;
19846 right[rightoff + 7] = y2;
19847 }x1 = (x1 + ctrlx1) / 2.0;
19848 y1 = (y1 + ctrly1) / 2.0;
19849 x2 = (x2 + ctrlx2) / 2.0;
19850 y2 = (y2 + ctrly2) / 2.0;
19851 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19852 var centery = (ctrly1 + ctrly2) / 2.0;
19853 ctrlx1 = (x1 + centerx) / 2.0;
19854 ctrly1 = (y1 + centery) / 2.0;
19855 ctrlx2 = (x2 + centerx) / 2.0;
19856 ctrly2 = (y2 + centery) / 2.0;
19857 centerx = (ctrlx1 + ctrlx2) / 2.0;
19858 centery = (ctrly1 + ctrly2) / 2.0;
19859 if (left != null) {
19860 left[leftoff + 2] = x1;
19861 left[leftoff + 3] = y1;
19862 left[leftoff + 4] = ctrlx1;
19863 left[leftoff + 5] = ctrly1;
19864 left[leftoff + 6] = centerx;
19865 left[leftoff + 7] = centery;
19866 }if (right != null) {
19867 right[rightoff + 0] = centerx;
19868 right[rightoff + 1] = centery;
19869 right[rightoff + 2] = ctrlx2;
19870 right[rightoff + 3] = ctrly2;
19871 right[rightoff + 4] = x2;
19872 right[rightoff + 5] = y2;
19873 }}, "~A,~N,~A,~N,~A,~N");
19874 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19875 function (eqn) {
19876 return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn);
19877 }, "~A");
19878 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19879 function (eqn, res) {
19880 var d = eqn[3];
19881 if (d == 0.0) {
19882 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
19883 }var a = eqn[2] / d;
19884 var b = eqn[1] / d;
19885 var c = eqn[0] / d;
19886 var roots = 0;
19887 var Q = (a * a - 3.0 * b) / 9.0;
19888 var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0;
19889 var R2 = R * R;
19890 var Q3 = Q * Q * Q;
19891 a = a / 3.0;
19892 if (R2 < Q3) {
19893 var theta = Math.acos (R / Math.sqrt (Q3));
19894 Q = -2.0 * Math.sqrt (Q);
19895 if (res === eqn) {
19896 eqn =  Clazz_newDoubleArray (4, 0);
19897 System.arraycopy (res, 0, eqn, 0, 4);
19898 }res[roots++] = Q * Math.cos (theta / 3.0) - a;
19899 res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a;
19900 res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a;
19901 java.awt.geom.CubicCurve2D.fixRoots (res, eqn);
19902 } else {
19903 var neg = (R < 0.0);
19904 var S = Math.sqrt (R2 - Q3);
19905 if (neg) {
19906 R = -R;
19907 }var A = Math.pow (R + S, 0.3333333333333333);
19908 if (!neg) {
19909 A = -A;
19910 }var B = (A == 0.0) ? 0.0 : (Q / A);
19911 res[roots++] = (A + B) - a;
19912 }return roots;
19913 }, "~A,~A");
19914 c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", 
19915  function (res, eqn) {
19916 var EPSILON = 1E-5;
19917 for (var i = 0; i < 3; i++) {
19918 var t = res[i];
19919 if (Math.abs (t) < 1.0E-5) {
19920 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn);
19921 } else if (Math.abs (t - 1) < 1.0E-5) {
19922 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn);
19923 }}
19924 }, "~A,~A");
19925 c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", 
19926  function (eqn, order, t) {
19927 var v = eqn[order];
19928 while (--order >= 0) {
19929 v = v * t + eqn[order];
19930 }
19931 return v;
19932 }, "~A,~N,~N");
19933 c$.findZero = Clazz_defineMethod (c$, "findZero", 
19934  function (t, target, eqn) {
19935 var slopeqn =  Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]);
19936 var slope;
19937 var origdelta = 0;
19938 var origt = t;
19939 while (true) {
19940 slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t);
19941 if (slope == 0) {
19942 return t;
19943 }var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t);
19944 if (y == 0) {
19945 return t;
19946 }var delta = -(y / slope);
19947 if (origdelta == 0) {
19948 origdelta = delta;
19949 }if (t < target) {
19950 if (delta < 0) return t;
19951 } else if (t > target) {
19952 if (delta > 0) return t;
19953 } else {
19954 return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324));
19955 }var newt = t + delta;
19956 if (t == newt) {
19957 return t;
19958 }if (delta * origdelta < 0) {
19959 var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt));
19960 if (tag != 0) {
19961 return (origt + t) / 2;
19962 }t = target;
19963 } else {
19964 t = newt;
19965 }}
19966 }, "~N,~N,~A");
19967 Clazz_defineMethod (c$, "contains", 
19968 function (x, y) {
19969 if (!(x * 0.0 + y * 0.0 == 0.0)) {
19970 return false;
19971 }var x1 = this.getX1 ();
19972 var y1 = this.getY1 ();
19973 var x2 = this.getX2 ();
19974 var y2 = this.getY2 ();
19975 var crossings = (jssun.awt.geom.Curve.pointCrossingsForLine (x, y, x1, y1, x2, y2) + jssun.awt.geom.Curve.pointCrossingsForCubic (x, y, x1, y1, this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), x2, y2, 0));
19976 return ((crossings & 1) == 1);
19977 }, "~N,~N");
19978 Clazz_defineMethod (c$, "contains", 
19979 function (p) {
19980 return this.contains (p.getX (), p.getY ());
19981 }, "java.awt.geom.Point2D");
19982 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
19983  function (eqn, val, c1, cp1, cp2, c2) {
19984 eqn[0] = c1 - val;
19985 eqn[1] = (cp1 - c1) * 3.0;
19986 eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0;
19987 eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1;
19988 return;
19989 }, "~A,~N,~N,~N,~N,~N");
19990 c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", 
19991  function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) {
19992 var j = 0;
19993 for (var i = 0; i < num; i++) {
19994 var t = vals[i];
19995 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) {
19996 var u = 1 - t;
19997 vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t;
19998 }}
19999 return j;
20000 }, "~A,~N,~B,~B,~A,~N,~N,~N,~N");
20001 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20002  function (coord, low, high) {
20003 if (coord <= low) {
20004 return (coord < low ? -2 : -1);
20005 }if (coord >= high) {
20006 return (coord > high ? 2 : 1);
20007 }return 0;
20008 }, "~N,~N,~N");
20009 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20010  function (pttag, opt1tag, opt2tag) {
20011 switch (pttag) {
20012 case -2:
20013 case 2:
20014 default:
20015 return false;
20016 case -1:
20017 return (opt1tag >= 0 || opt2tag >= 0);
20018 case 0:
20019 return true;
20020 case 1:
20021 return (opt1tag <= 0 || opt2tag <= 0);
20022 }
20023 }, "~N,~N,~N");
20024 Clazz_defineMethod (c$, "intersects", 
20025 function (x, y, w, h) {
20026 if (w <= 0 || h <= 0) {
20027 return false;
20028 }var x1 = this.getX1 ();
20029 var y1 = this.getY1 ();
20030 var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w);
20031 var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h);
20032 if (x1tag == 0 && y1tag == 0) {
20033 return true;
20034 }var x2 = this.getX2 ();
20035 var y2 = this.getY2 ();
20036 var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w);
20037 var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h);
20038 if (x2tag == 0 && y2tag == 0) {
20039 return true;
20040 }var ctrlx1 = this.getCtrlX1 ();
20041 var ctrly1 = this.getCtrlY1 ();
20042 var ctrlx2 = this.getCtrlX2 ();
20043 var ctrly2 = this.getCtrlY2 ();
20044 var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w);
20045 var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h);
20046 var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w);
20047 var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h);
20048 if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) {
20049 return false;
20050 }if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) {
20051 return false;
20052 }if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) {
20053 return false;
20054 }if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) {
20055 return false;
20056 }if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) {
20057 return true;
20058 }if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) {
20059 return true;
20060 }var xoverlap = (x1tag * x2tag <= 0);
20061 var yoverlap = (y1tag * y2tag <= 0);
20062 if (x1tag == 0 && x2tag == 0 && yoverlap) {
20063 return true;
20064 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
20065 return true;
20066 }var eqn =  Clazz_newDoubleArray (4, 0);
20067 var res =  Clazz_newDoubleArray (4, 0);
20068 if (!yoverlap) {
20069 java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2);
20070 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20071 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2);
20072 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0);
20073 }if (!xoverlap) {
20074 java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20075 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20076 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20077 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0);
20078 }var dx = x2 - x1;
20079 var dy = y2 - y1;
20080 var k = y2 * x1 - x2 * y1;
20081 var c1tag;
20082 var c2tag;
20083 if (y1tag == 0) {
20084 c1tag = x1tag;
20085 } else {
20086 c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
20087 }if (y2tag == 0) {
20088 c2tag = x2tag;
20089 } else {
20090 c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
20091 }if (c1tag * c2tag <= 0) {
20092 return true;
20093 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
20094 java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20095 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20096 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20097 var tags =  Clazz_newIntArray (num + 1, 0);
20098 for (var i = 0; i < num; i++) {
20099 tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h);
20100 }
20101 tags[num] = c1tag;
20102 java.util.Arrays.sort (tags);
20103 return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0));
20104 }, "~N,~N,~N,~N");
20105 Clazz_defineMethod (c$, "intersects", 
20106 function (r) {
20107 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20108 }, "java.awt.geom.Rectangle2D");
20109 Clazz_defineMethod (c$, "contains", 
20110 function (x, y, w, h) {
20111 if (w <= 0 || h <= 0) {
20112 return false;
20113 }if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) {
20114 return false;
20115 }var rect =  new java.awt.geom.Rectangle2D.Double (x, y, w, h);
20116 return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20117 }, "~N,~N,~N,~N");
20118 Clazz_defineMethod (c$, "contains", 
20119 function (r) {
20120 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20121 }, "java.awt.geom.Rectangle2D");
20122 Clazz_overrideMethod (c$, "getBounds", 
20123 function () {
20124 return this.getBounds2D ().getBounds ();
20125 });
20126 Clazz_defineMethod (c$, "getPathIterator", 
20127 function (at) {
20128 return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at);
20129 }, "java.awt.geom.AffineTransform");
20130 Clazz_defineMethod (c$, "getPathIterator", 
20131 function (at, flatness) {
20132 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
20133 }, "java.awt.geom.AffineTransform,~N");
20134 Clazz_defineMethod (c$, "clone", 
20135 function () {
20136 try {
20137 return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []);
20138 } catch (e) {
20139 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20140 throw  new InternalError ();
20141 } else {
20142 throw e;
20143 }
20144 }
20145 });
20146 Clazz_pu$h(self.c$);
20147 c$ = Clazz_decorateAsClass (function () {
20148 this.x1 = 0;
20149 this.y1 = 0;
20150 this.ctrlx1 = 0;
20151 this.ctrly1 = 0;
20152 this.ctrlx2 = 0;
20153 this.ctrly2 = 0;
20154 this.x2 = 0;
20155 this.y2 = 0;
20156 Clazz_instantialize (this, arguments);
20157 }, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D);
20158 Clazz_makeConstructor (c$, 
20159 function () {
20160 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20161 });
20162 Clazz_makeConstructor (c$, 
20163 function (a, b, c, d, e, f, g, h) {
20164 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20165 this.setCurve (a, b, c, d, e, f, g, h);
20166 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20167 Clazz_overrideMethod (c$, "getX1", 
20168 function () {
20169 return this.x1;
20170 });
20171 Clazz_overrideMethod (c$, "getY1", 
20172 function () {
20173 return this.y1;
20174 });
20175 Clazz_overrideMethod (c$, "getP1", 
20176 function () {
20177 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20178 });
20179 Clazz_overrideMethod (c$, "getCtrlX1", 
20180 function () {
20181 return this.ctrlx1;
20182 });
20183 Clazz_overrideMethod (c$, "getCtrlY1", 
20184 function () {
20185 return this.ctrly1;
20186 });
20187 Clazz_overrideMethod (c$, "getCtrlP1", 
20188 function () {
20189 return  new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1);
20190 });
20191 Clazz_overrideMethod (c$, "getCtrlX2", 
20192 function () {
20193 return this.ctrlx2;
20194 });
20195 Clazz_overrideMethod (c$, "getCtrlY2", 
20196 function () {
20197 return this.ctrly2;
20198 });
20199 Clazz_overrideMethod (c$, "getCtrlP2", 
20200 function () {
20201 return  new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2);
20202 });
20203 Clazz_overrideMethod (c$, "getX2", 
20204 function () {
20205 return this.x2;
20206 });
20207 Clazz_overrideMethod (c$, "getY2", 
20208 function () {
20209 return this.y2;
20210 });
20211 Clazz_overrideMethod (c$, "getP2", 
20212 function () {
20213 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20214 });
20215 Clazz_defineMethod (c$, "setCurve", 
20216 function (a, b, c, d, e, f, g, h) {
20217 this.x1 = a;
20218 this.y1 = b;
20219 this.ctrlx1 = c;
20220 this.ctrly1 = d;
20221 this.ctrlx2 = e;
20222 this.ctrly2 = f;
20223 this.x2 = g;
20224 this.y2 = h;
20225 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20226 Clazz_defineMethod (c$, "setCurve", 
20227 function (a, b, c, d, e, f, g, h) {
20228 this.x1 = a;
20229 this.y1 = b;
20230 this.ctrlx1 = c;
20231 this.ctrly1 = d;
20232 this.ctrlx2 = e;
20233 this.ctrly2 = f;
20234 this.x2 = g;
20235 this.y2 = h;
20236 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20237 Clazz_overrideMethod (c$, "getBounds2D", 
20238 function () {
20239 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20240 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20241 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20242 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20243 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
20244 });
20245 c$ = Clazz_p0p ();
20246 Clazz_pu$h(self.c$);
20247 c$ = Clazz_decorateAsClass (function () {
20248 this.x1 = 0;
20249 this.y1 = 0;
20250 this.ctrlx1 = 0;
20251 this.ctrly1 = 0;
20252 this.ctrlx2 = 0;
20253 this.ctrly2 = 0;
20254 this.x2 = 0;
20255 this.y2 = 0;
20256 Clazz_instantialize (this, arguments);
20257 }, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D);
20258 Clazz_makeConstructor (c$, 
20259 function () {
20260 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20261 });
20262 Clazz_makeConstructor (c$, 
20263 function (a, b, c, d, e, f, g, h) {
20264 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20265 this.setCurve (a, b, c, d, e, f, g, h);
20266 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20267 Clazz_overrideMethod (c$, "getX1", 
20268 function () {
20269 return this.x1;
20270 });
20271 Clazz_overrideMethod (c$, "getY1", 
20272 function () {
20273 return this.y1;
20274 });
20275 Clazz_overrideMethod (c$, "getP1", 
20276 function () {
20277 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20278 });
20279 Clazz_overrideMethod (c$, "getCtrlX1", 
20280 function () {
20281 return this.ctrlx1;
20282 });
20283 Clazz_overrideMethod (c$, "getCtrlY1", 
20284 function () {
20285 return this.ctrly1;
20286 });
20287 Clazz_overrideMethod (c$, "getCtrlP1", 
20288 function () {
20289 return  new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1);
20290 });
20291 Clazz_overrideMethod (c$, "getCtrlX2", 
20292 function () {
20293 return this.ctrlx2;
20294 });
20295 Clazz_overrideMethod (c$, "getCtrlY2", 
20296 function () {
20297 return this.ctrly2;
20298 });
20299 Clazz_overrideMethod (c$, "getCtrlP2", 
20300 function () {
20301 return  new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2);
20302 });
20303 Clazz_overrideMethod (c$, "getX2", 
20304 function () {
20305 return this.x2;
20306 });
20307 Clazz_overrideMethod (c$, "getY2", 
20308 function () {
20309 return this.y2;
20310 });
20311 Clazz_overrideMethod (c$, "getP2", 
20312 function () {
20313 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20314 });
20315 Clazz_defineMethod (c$, "setCurve", 
20316 function (a, b, c, d, e, f, g, h) {
20317 this.x1 = a;
20318 this.y1 = b;
20319 this.ctrlx1 = c;
20320 this.ctrly1 = d;
20321 this.ctrlx2 = e;
20322 this.ctrly2 = f;
20323 this.x2 = g;
20324 this.y2 = h;
20325 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20326 Clazz_overrideMethod (c$, "getBounds2D", 
20327 function () {
20328 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20329 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20330 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20331 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20332 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
20333 });
20334 c$ = Clazz_p0p ();
20335 Clazz_defineStatics (c$,
20336 "BELOW", -2,
20337 "LOWEDGE", -1,
20338 "INSIDE", 0,
20339 "HIGHEDGE", 1,
20340 "ABOVE", 2);
20341 });
20342 Clazz_declarePackage ("java.awt.geom");
20343 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () {
20344 c$ = Clazz_decorateAsClass (function () {
20345 this.cubic = null;
20346 this.affine = null;
20347 this.index = 0;
20348 Clazz_instantialize (this, arguments);
20349 }, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator);
20350 Clazz_makeConstructor (c$, 
20351 function () {
20352 });
20353 Clazz_makeConstructor (c$, 
20354 function (q, at) {
20355 this.set (q, at);
20356 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20357 Clazz_defineMethod (c$, "set", 
20358 function (q, at) {
20359 this.cubic = q;
20360 this.affine = at;
20361 return this;
20362 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20363 Clazz_overrideMethod (c$, "getWindingRule", 
20364 function () {
20365 return 1;
20366 });
20367 Clazz_overrideMethod (c$, "isDone", 
20368 function () {
20369 return (this.index > 1);
20370 });
20371 Clazz_overrideMethod (c$, "next", 
20372 function () {
20373 this.index++;
20374 });
20375 Clazz_defineMethod (c$, "currentSegment", 
20376 function (coords) {
20377 if (this.isDone ()) {
20378 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20379 }var type;
20380 if (this.index == 0) {
20381 coords[0] = this.cubic.getX1 ();
20382 coords[1] = this.cubic.getY1 ();
20383 type = 0;
20384 } else {
20385 coords[0] = this.cubic.getCtrlX1 ();
20386 coords[1] = this.cubic.getCtrlY1 ();
20387 coords[2] = this.cubic.getCtrlX2 ();
20388 coords[3] = this.cubic.getCtrlY2 ();
20389 coords[4] = this.cubic.getX2 ();
20390 coords[5] = this.cubic.getY2 ();
20391 type = 3;
20392 }if (this.affine != null) {
20393 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20394 }return type;
20395 }, "~A");
20396 Clazz_defineMethod (c$, "currentSegment", 
20397 function (coords) {
20398 if (this.isDone ()) {
20399 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20400 }var type;
20401 if (this.index == 0) {
20402 coords[0] = this.cubic.getX1 ();
20403 coords[1] = this.cubic.getY1 ();
20404 type = 0;
20405 } else {
20406 coords[0] = this.cubic.getCtrlX1 ();
20407 coords[1] = this.cubic.getCtrlY1 ();
20408 coords[2] = this.cubic.getCtrlX2 ();
20409 coords[3] = this.cubic.getCtrlY2 ();
20410 coords[4] = this.cubic.getX2 ();
20411 coords[5] = this.cubic.getY2 ();
20412 type = 3;
20413 }if (this.affine != null) {
20414 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20415 }return type;
20416 }, "~A");
20417 });
20418 Clazz_declarePackage ("java.awt.geom");
20419 Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () {
20420 c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]);
20421 Clazz_makeConstructor (c$, 
20422 function () {
20423 });
20424 Clazz_defineMethod (c$, "setLine", 
20425 function (p1, p2) {
20426 this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
20427 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20428 Clazz_defineMethod (c$, "setLine", 
20429 function (l) {
20430 this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
20431 }, "java.awt.geom.Line2D");
20432 c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", 
20433 function (x1, y1, x2, y2, px, py) {
20434 x2 -= x1;
20435 y2 -= y1;
20436 px -= x1;
20437 py -= y1;
20438 var ccw = px * y2 - py * x2;
20439 if (ccw == 0.0) {
20440 ccw = px * x2 + py * y2;
20441 if (ccw > 0.0) {
20442 px -= x2;
20443 py -= y2;
20444 ccw = px * x2 + py * y2;
20445 if (ccw < 0.0) {
20446 ccw = 0.0;
20447 }}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);
20448 }, "~N,~N,~N,~N,~N,~N");
20449 Clazz_defineMethod (c$, "relativeCCW", 
20450 function (px, py) {
20451 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20452 }, "~N,~N");
20453 Clazz_defineMethod (c$, "relativeCCW", 
20454 function (p) {
20455 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ());
20456 }, "java.awt.geom.Point2D");
20457 c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", 
20458 function (x1, y1, x2, y2, x3, y3, x4, y4) {
20459 return ((java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x3, y3) * java.awt.geom.Line2D.relativeCCW (x1, y1, x2, y2, x4, y4) <= 0) && (java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x1, y1) * java.awt.geom.Line2D.relativeCCW (x3, y3, x4, y4, x2, y2) <= 0));
20460 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20461 Clazz_defineMethod (c$, "intersectsLine", 
20462 function (x1, y1, x2, y2) {
20463 return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20464 }, "~N,~N,~N,~N");
20465 Clazz_defineMethod (c$, "intersectsLine", 
20466 function (l) {
20467 return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20468 }, "java.awt.geom.Line2D");
20469 c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", 
20470 function (x1, y1, x2, y2, px, py) {
20471 x2 -= x1;
20472 y2 -= y1;
20473 px -= x1;
20474 py -= y1;
20475 var dotprod = px * x2 + py * y2;
20476 var projlenSq;
20477 if (dotprod <= 0.0) {
20478 projlenSq = 0.0;
20479 } else {
20480 px = x2 - px;
20481 py = y2 - py;
20482 dotprod = px * x2 + py * y2;
20483 if (dotprod <= 0.0) {
20484 projlenSq = 0.0;
20485 } else {
20486 projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20487 }}var lenSq = px * px + py * py - projlenSq;
20488 if (lenSq < 0) {
20489 lenSq = 0;
20490 }return lenSq;
20491 }, "~N,~N,~N,~N,~N,~N");
20492 c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", 
20493 function (x1, y1, x2, y2, px, py) {
20494 return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py));
20495 }, "~N,~N,~N,~N,~N,~N");
20496 Clazz_defineMethod (c$, "ptSegDistSq", 
20497 function (px, py) {
20498 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20499 }, "~N,~N");
20500 Clazz_defineMethod (c$, "ptSegDistSq", 
20501 function (pt) {
20502 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20503 }, "java.awt.geom.Point2D");
20504 Clazz_defineMethod (c$, "ptSegDist", 
20505 function (px, py) {
20506 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20507 }, "~N,~N");
20508 Clazz_defineMethod (c$, "ptSegDist", 
20509 function (pt) {
20510 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20511 }, "java.awt.geom.Point2D");
20512 c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", 
20513 function (x1, y1, x2, y2, px, py) {
20514 x2 -= x1;
20515 y2 -= y1;
20516 px -= x1;
20517 py -= y1;
20518 var dotprod = px * x2 + py * y2;
20519 var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20520 var lenSq = px * px + py * py - projlenSq;
20521 if (lenSq < 0) {
20522 lenSq = 0;
20523 }return lenSq;
20524 }, "~N,~N,~N,~N,~N,~N");
20525 c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", 
20526 function (x1, y1, x2, y2, px, py) {
20527 return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py));
20528 }, "~N,~N,~N,~N,~N,~N");
20529 Clazz_defineMethod (c$, "ptLineDistSq", 
20530 function (px, py) {
20531 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20532 }, "~N,~N");
20533 Clazz_defineMethod (c$, "ptLineDistSq", 
20534 function (pt) {
20535 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20536 }, "java.awt.geom.Point2D");
20537 Clazz_defineMethod (c$, "ptLineDist", 
20538 function (px, py) {
20539 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20540 }, "~N,~N");
20541 Clazz_defineMethod (c$, "ptLineDist", 
20542 function (pt) {
20543 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20544 }, "java.awt.geom.Point2D");
20545 Clazz_defineMethod (c$, "contains", 
20546 function (x, y) {
20547 return false;
20548 }, "~N,~N");
20549 Clazz_defineMethod (c$, "contains", 
20550 function (p) {
20551 return false;
20552 }, "java.awt.geom.Point2D");
20553 Clazz_defineMethod (c$, "intersects", 
20554 function (x, y, w, h) {
20555 return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h));
20556 }, "~N,~N,~N,~N");
20557 Clazz_defineMethod (c$, "intersects", 
20558 function (r) {
20559 return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20560 }, "java.awt.geom.Rectangle2D");
20561 Clazz_defineMethod (c$, "contains", 
20562 function (x, y, w, h) {
20563 return false;
20564 }, "~N,~N,~N,~N");
20565 Clazz_defineMethod (c$, "contains", 
20566 function (r) {
20567 return false;
20568 }, "java.awt.geom.Rectangle2D");
20569 Clazz_overrideMethod (c$, "getBounds", 
20570 function () {
20571 return this.getBounds2D ().getBounds ();
20572 });
20573 Clazz_defineMethod (c$, "getPathIterator", 
20574 function (at) {
20575 return  new java.awt.geom.LineIterator (this, at);
20576 }, "java.awt.geom.AffineTransform");
20577 Clazz_defineMethod (c$, "getPathIterator", 
20578 function (at, flatness) {
20579 return  new java.awt.geom.LineIterator (this, at);
20580 }, "java.awt.geom.AffineTransform,~N");
20581 Clazz_defineMethod (c$, "clone", 
20582 function () {
20583 try {
20584 return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []);
20585 } catch (e) {
20586 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20587 throw  new InternalError ();
20588 } else {
20589 throw e;
20590 }
20591 }
20592 });
20593 Clazz_pu$h(self.c$);
20594 c$ = Clazz_decorateAsClass (function () {
20595 this.x1 = 0;
20596 this.y1 = 0;
20597 this.x2 = 0;
20598 this.y2 = 0;
20599 Clazz_instantialize (this, arguments);
20600 }, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D);
20601 Clazz_makeConstructor (c$, 
20602 function () {
20603 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20604 });
20605 Clazz_makeConstructor (c$, 
20606 function (a, b, c, d) {
20607 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20608 this.setLine (a, b, c, d);
20609 }, "~N,~N,~N,~N");
20610 Clazz_makeConstructor (c$, 
20611 function (a, b) {
20612 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20613 this.setLine (a, b);
20614 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20615 Clazz_overrideMethod (c$, "getX1", 
20616 function () {
20617 return this.x1;
20618 });
20619 Clazz_overrideMethod (c$, "getY1", 
20620 function () {
20621 return this.y1;
20622 });
20623 Clazz_overrideMethod (c$, "getP1", 
20624 function () {
20625 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20626 });
20627 Clazz_overrideMethod (c$, "getX2", 
20628 function () {
20629 return this.x2;
20630 });
20631 Clazz_overrideMethod (c$, "getY2", 
20632 function () {
20633 return this.y2;
20634 });
20635 Clazz_overrideMethod (c$, "getP2", 
20636 function () {
20637 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20638 });
20639 Clazz_defineMethod (c$, "setLine", 
20640 function (a, b, c, d) {
20641 this.x1 = a;
20642 this.y1 = b;
20643 this.x2 = c;
20644 this.y2 = d;
20645 }, "~N,~N,~N,~N");
20646 Clazz_defineMethod (c$, "setLine", 
20647 function (a, b, c, d) {
20648 this.x1 = a;
20649 this.y1 = b;
20650 this.x2 = c;
20651 this.y2 = d;
20652 }, "~N,~N,~N,~N");
20653 Clazz_overrideMethod (c$, "getBounds2D", 
20654 function () {
20655 var a;
20656 var b;
20657 var c;
20658 var d;
20659 if (this.x1 < this.x2) {
20660 a = this.x1;
20661 c = this.x2 - this.x1;
20662 } else {
20663 a = this.x2;
20664 c = this.x1 - this.x2;
20665 }if (this.y1 < this.y2) {
20666 b = this.y1;
20667 d = this.y2 - this.y1;
20668 } else {
20669 b = this.y2;
20670 d = this.y1 - this.y2;
20671 }return  new java.awt.geom.Rectangle2D.Float (a, b, c, d);
20672 });
20673 c$ = Clazz_p0p ();
20674 Clazz_pu$h(self.c$);
20675 c$ = Clazz_decorateAsClass (function () {
20676 this.x1 = 0;
20677 this.y1 = 0;
20678 this.x2 = 0;
20679 this.y2 = 0;
20680 Clazz_instantialize (this, arguments);
20681 }, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D);
20682 Clazz_makeConstructor (c$, 
20683 function () {
20684 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20685 });
20686 Clazz_makeConstructor (c$, 
20687 function (a, b, c, d) {
20688 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20689 this.setLine (a, b, c, d);
20690 }, "~N,~N,~N,~N");
20691 Clazz_makeConstructor (c$, 
20692 function (a, b) {
20693 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20694 this.setLine (a, b);
20695 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20696 Clazz_overrideMethod (c$, "getX1", 
20697 function () {
20698 return this.x1;
20699 });
20700 Clazz_overrideMethod (c$, "getY1", 
20701 function () {
20702 return this.y1;
20703 });
20704 Clazz_overrideMethod (c$, "getP1", 
20705 function () {
20706 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20707 });
20708 Clazz_overrideMethod (c$, "getX2", 
20709 function () {
20710 return this.x2;
20711 });
20712 Clazz_overrideMethod (c$, "getY2", 
20713 function () {
20714 return this.y2;
20715 });
20716 Clazz_overrideMethod (c$, "getP2", 
20717 function () {
20718 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20719 });
20720 Clazz_defineMethod (c$, "setLine", 
20721 function (a, b, c, d) {
20722 this.x1 = a;
20723 this.y1 = b;
20724 this.x2 = c;
20725 this.y2 = d;
20726 }, "~N,~N,~N,~N");
20727 Clazz_overrideMethod (c$, "getBounds2D", 
20728 function () {
20729 var a;
20730 var b;
20731 var c;
20732 var d;
20733 if (this.x1 < this.x2) {
20734 a = this.x1;
20735 c = this.x2 - this.x1;
20736 } else {
20737 a = this.x2;
20738 c = this.x1 - this.x2;
20739 }if (this.y1 < this.y2) {
20740 b = this.y1;
20741 d = this.y2 - this.y1;
20742 } else {
20743 b = this.y2;
20744 d = this.y1 - this.y2;
20745 }return  new java.awt.geom.Rectangle2D.Double (a, b, c, d);
20746 });
20747 c$ = Clazz_p0p ();
20748 });
20749 Clazz_declarePackage ("java.awt.geom");
20750 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () {
20751 c$ = Clazz_decorateAsClass (function () {
20752 this.line = null;
20753 this.affine = null;
20754 this.index = 0;
20755 Clazz_instantialize (this, arguments);
20756 }, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator);
20757 Clazz_makeConstructor (c$, 
20758 function (l, at) {
20759 this.line = l;
20760 this.affine = at;
20761 }, "java.awt.geom.Line2D,java.awt.geom.AffineTransform");
20762 Clazz_overrideMethod (c$, "getWindingRule", 
20763 function () {
20764 return 1;
20765 });
20766 Clazz_overrideMethod (c$, "isDone", 
20767 function () {
20768 return (this.index > 1);
20769 });
20770 Clazz_overrideMethod (c$, "next", 
20771 function () {
20772 this.index++;
20773 });
20774 Clazz_defineMethod (c$, "currentSegment", 
20775 function (coords) {
20776 if (this.isDone ()) {
20777 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20778 }var type;
20779 if (this.index == 0) {
20780 coords[0] = this.line.getX1 ();
20781 coords[1] = this.line.getY1 ();
20782 type = 0;
20783 } else {
20784 coords[0] = this.line.getX2 ();
20785 coords[1] = this.line.getY2 ();
20786 type = 1;
20787 }if (this.affine != null) {
20788 this.affine.transform (coords, 0, coords, 0, 1);
20789 }return type;
20790 }, "~A");
20791 Clazz_defineMethod (c$, "currentSegment", 
20792 function (coords) {
20793 if (this.isDone ()) {
20794 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20795 }var type;
20796 if (this.index == 0) {
20797 coords[0] = this.line.getX1 ();
20798 coords[1] = this.line.getY1 ();
20799 type = 0;
20800 } else {
20801 coords[0] = this.line.getX2 ();
20802 coords[1] = this.line.getY2 ();
20803 type = 1;
20804 }if (this.affine != null) {
20805 this.affine.transform (coords, 0, coords, 0, 1);
20806 }return type;
20807 }, "~A");
20808 });
20809 Clazz_declarePackage ("java.awt.geom");
20810 Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () {
20811 c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]);
20812 Clazz_makeConstructor (c$, 
20813 function () {
20814 });
20815 Clazz_defineMethod (c$, "setCurve", 
20816 function (coords, offset) {
20817 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]);
20818 }, "~A,~N");
20819 Clazz_defineMethod (c$, "setCurve", 
20820 function (p1, cp, p2) {
20821 this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ());
20822 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
20823 Clazz_defineMethod (c$, "setCurve", 
20824 function (pts, offset) {
20825 this.setCurve (pts[offset + 0].getX (), pts[offset + 0].getY (), pts[offset + 1].getX (), pts[offset + 1].getY (), pts[offset + 2].getX (), pts[offset + 2].getY ());
20826 }, "~A,~N");
20827 Clazz_defineMethod (c$, "setCurve", 
20828 function (c) {
20829 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ());
20830 }, "java.awt.geom.QuadCurve2D");
20831 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20832 function (x1, y1, ctrlx, ctrly, x2, y2) {
20833 return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly);
20834 }, "~N,~N,~N,~N,~N,~N");
20835 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20836 function (x1, y1, ctrlx, ctrly, x2, y2) {
20837 return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly);
20838 }, "~N,~N,~N,~N,~N,~N");
20839 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20840 function (coords, offset) {
20841 return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20842 }, "~A,~N");
20843 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20844 function (coords, offset) {
20845 return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20846 }, "~A,~N");
20847 Clazz_defineMethod (c$, "getFlatnessSq", 
20848 function () {
20849 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20850 });
20851 Clazz_defineMethod (c$, "getFlatness", 
20852 function () {
20853 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20854 });
20855 Clazz_defineMethod (c$, "subdivide", 
20856 function (left, right) {
20857 java.awt.geom.QuadCurve2D.subdivide (this, left, right);
20858 }, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20859 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20860 function (src, left, right) {
20861 var x1 = src.getX1 ();
20862 var y1 = src.getY1 ();
20863 var ctrlx = src.getCtrlX ();
20864 var ctrly = src.getCtrlY ();
20865 var x2 = src.getX2 ();
20866 var y2 = src.getY2 ();
20867 var ctrlx1 = (x1 + ctrlx) / 2.0;
20868 var ctrly1 = (y1 + ctrly) / 2.0;
20869 var ctrlx2 = (x2 + ctrlx) / 2.0;
20870 var ctrly2 = (y2 + ctrly) / 2.0;
20871 ctrlx = (ctrlx1 + ctrlx2) / 2.0;
20872 ctrly = (ctrly1 + ctrly2) / 2.0;
20873 if (left != null) {
20874 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly);
20875 }if (right != null) {
20876 right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2);
20877 }}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20878 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20879 function (src, srcoff, left, leftoff, right, rightoff) {
20880 var x1 = src[srcoff + 0];
20881 var y1 = src[srcoff + 1];
20882 var ctrlx = src[srcoff + 2];
20883 var ctrly = src[srcoff + 3];
20884 var x2 = src[srcoff + 4];
20885 var y2 = src[srcoff + 5];
20886 if (left != null) {
20887 left[leftoff + 0] = x1;
20888 left[leftoff + 1] = y1;
20889 }if (right != null) {
20890 right[rightoff + 4] = x2;
20891 right[rightoff + 5] = y2;
20892 }x1 = (x1 + ctrlx) / 2.0;
20893 y1 = (y1 + ctrly) / 2.0;
20894 x2 = (x2 + ctrlx) / 2.0;
20895 y2 = (y2 + ctrly) / 2.0;
20896 ctrlx = (x1 + x2) / 2.0;
20897 ctrly = (y1 + y2) / 2.0;
20898 if (left != null) {
20899 left[leftoff + 2] = x1;
20900 left[leftoff + 3] = y1;
20901 left[leftoff + 4] = ctrlx;
20902 left[leftoff + 5] = ctrly;
20903 }if (right != null) {
20904 right[rightoff + 0] = ctrlx;
20905 right[rightoff + 1] = ctrly;
20906 right[rightoff + 2] = x2;
20907 right[rightoff + 3] = y2;
20908 }}, "~A,~N,~A,~N,~A,~N");
20909 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20910 function (eqn) {
20911 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn);
20912 }, "~A");
20913 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20914 function (eqn, res) {
20915 var a = eqn[2];
20916 var b = eqn[1];
20917 var c = eqn[0];
20918 var roots = 0;
20919 if (a == 0.0) {
20920 if (b == 0.0) {
20921 return -1;
20922 }res[roots++] = -c / b;
20923 } else {
20924 var d = b * b - 4.0 * a * c;
20925 if (d < 0.0) {
20926 return 0;
20927 }d = Math.sqrt (d);
20928 if (b < 0.0) {
20929 d = -d;
20930 }var q = (b + d) / -2.0;
20931 res[roots++] = q / a;
20932 if (q != 0.0) {
20933 res[roots++] = c / q;
20934 }}return roots;
20935 }, "~A,~A");
20936 Clazz_defineMethod (c$, "contains", 
20937 function (x, y) {
20938 var x1 = this.getX1 ();
20939 var y1 = this.getY1 ();
20940 var xc = this.getCtrlX ();
20941 var yc = this.getCtrlY ();
20942 var x2 = this.getX2 ();
20943 var y2 = this.getY2 ();
20944 var kx = x1 - 2 * xc + x2;
20945 var ky = y1 - 2 * yc + y2;
20946 var dx = x - x1;
20947 var dy = y - y1;
20948 var dxl = x2 - x1;
20949 var dyl = y2 - y1;
20950 var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx);
20951 if (t0 < 0 || t0 > 1 || t0 != t0) {
20952 return false;
20953 }var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1;
20954 var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1;
20955 var xl = dxl * t0 + x1;
20956 var yl = dyl * t0 + y1;
20957 return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb);
20958 }, "~N,~N");
20959 Clazz_defineMethod (c$, "contains", 
20960 function (p) {
20961 return this.contains (p.getX (), p.getY ());
20962 }, "java.awt.geom.Point2D");
20963 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
20964  function (eqn, val, c1, cp, c2) {
20965 eqn[0] = c1 - val;
20966 eqn[1] = cp + cp - c1 - c1;
20967 eqn[2] = c1 - cp - cp + c2;
20968 return;
20969 }, "~A,~N,~N,~N,~N");
20970 c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", 
20971  function (vals, num, include0, include1, inflect, c1, ctrl, c2) {
20972 var j = 0;
20973 for (var i = 0; i < num; i++) {
20974 var t = vals[i];
20975 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) {
20976 var u = 1 - t;
20977 vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t;
20978 }}
20979 return j;
20980 }, "~A,~N,~B,~B,~A,~N,~N,~N");
20981 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20982  function (coord, low, high) {
20983 if (coord <= low) {
20984 return (coord < low ? -2 : -1);
20985 }if (coord >= high) {
20986 return (coord > high ? 2 : 1);
20987 }return 0;
20988 }, "~N,~N,~N");
20989 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20990  function (pttag, opt1tag, opt2tag) {
20991 switch (pttag) {
20992 case -2:
20993 case 2:
20994 default:
20995 return false;
20996 case -1:
20997 return (opt1tag >= 0 || opt2tag >= 0);
20998 case 0:
20999 return true;
21000 case 1:
21001 return (opt1tag <= 0 || opt2tag <= 0);
21002 }
21003 }, "~N,~N,~N");
21004 Clazz_defineMethod (c$, "intersects", 
21005 function (x, y, w, h) {
21006 if (w <= 0 || h <= 0) {
21007 return false;
21008 }var x1 = this.getX1 ();
21009 var y1 = this.getY1 ();
21010 var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w);
21011 var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h);
21012 if (x1tag == 0 && y1tag == 0) {
21013 return true;
21014 }var x2 = this.getX2 ();
21015 var y2 = this.getY2 ();
21016 var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w);
21017 var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h);
21018 if (x2tag == 0 && y2tag == 0) {
21019 return true;
21020 }var ctrlx = this.getCtrlX ();
21021 var ctrly = this.getCtrlY ();
21022 var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w);
21023 var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h);
21024 if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) {
21025 return false;
21026 }if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) {
21027 return false;
21028 }if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) {
21029 return false;
21030 }if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) {
21031 return false;
21032 }if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) {
21033 return true;
21034 }if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) {
21035 return true;
21036 }var xoverlap = (x1tag * x2tag <= 0);
21037 var yoverlap = (y1tag * y2tag <= 0);
21038 if (x1tag == 0 && x2tag == 0 && yoverlap) {
21039 return true;
21040 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
21041 return true;
21042 }var eqn =  Clazz_newDoubleArray (3, 0);
21043 var res =  Clazz_newDoubleArray (3, 0);
21044 if (!yoverlap) {
21045 java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2);
21046 return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, x1, ctrlx, x2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], x, x + w) * java.awt.geom.QuadCurve2D.getTag (res[1], x, x + w) <= 0);
21047 }if (!xoverlap) {
21048 java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2);
21049 return (java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res) == 2 && java.awt.geom.QuadCurve2D.evalQuadratic (res, 2, true, true, null, y1, ctrly, y2) == 2 && java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h) * java.awt.geom.QuadCurve2D.getTag (res[1], y, y + h) <= 0);
21050 }var dx = x2 - x1;
21051 var dy = y2 - y1;
21052 var k = y2 * x1 - x2 * y1;
21053 var c1tag;
21054 var c2tag;
21055 if (y1tag == 0) {
21056 c1tag = x1tag;
21057 } else {
21058 c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
21059 }if (y2tag == 0) {
21060 c2tag = x2tag;
21061 } else {
21062 c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
21063 }if (c1tag * c2tag <= 0) {
21064 return true;
21065 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
21066 java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2);
21067 var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
21068 java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2);
21069 c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h);
21070 return (c1tag * c2tag <= 0);
21071 }, "~N,~N,~N,~N");
21072 Clazz_defineMethod (c$, "intersects", 
21073 function (r) {
21074 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21075 }, "java.awt.geom.Rectangle2D");
21076 Clazz_defineMethod (c$, "contains", 
21077 function (x, y, w, h) {
21078 if (w <= 0 || h <= 0) {
21079 return false;
21080 }return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h));
21081 }, "~N,~N,~N,~N");
21082 Clazz_defineMethod (c$, "contains", 
21083 function (r) {
21084 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21085 }, "java.awt.geom.Rectangle2D");
21086 Clazz_overrideMethod (c$, "getBounds", 
21087 function () {
21088 return this.getBounds2D ().getBounds ();
21089 });
21090 Clazz_defineMethod (c$, "getPathIterator", 
21091 function (at) {
21092 return  new java.awt.geom.QuadIterator (this, at);
21093 }, "java.awt.geom.AffineTransform");
21094 Clazz_defineMethod (c$, "getPathIterator", 
21095 function (at, flatness) {
21096 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
21097 }, "java.awt.geom.AffineTransform,~N");
21098 Clazz_defineMethod (c$, "clone", 
21099 function () {
21100 try {
21101 return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []);
21102 } catch (e) {
21103 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
21104 throw  new InternalError ();
21105 } else {
21106 throw e;
21107 }
21108 }
21109 });
21110 Clazz_pu$h(self.c$);
21111 c$ = Clazz_decorateAsClass (function () {
21112 this.x1 = 0;
21113 this.y1 = 0;
21114 this.ctrlx = 0;
21115 this.ctrly = 0;
21116 this.x2 = 0;
21117 this.y2 = 0;
21118 Clazz_instantialize (this, arguments);
21119 }, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D);
21120 Clazz_makeConstructor (c$, 
21121 function () {
21122 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21123 });
21124 Clazz_makeConstructor (c$, 
21125 function (a, b, c, d, e, f) {
21126 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21127 this.setCurve (a, b, c, d, e, f);
21128 }, "~N,~N,~N,~N,~N,~N");
21129 Clazz_overrideMethod (c$, "getX1", 
21130 function () {
21131 return this.x1;
21132 });
21133 Clazz_overrideMethod (c$, "getY1", 
21134 function () {
21135 return this.y1;
21136 });
21137 Clazz_overrideMethod (c$, "getP1", 
21138 function () {
21139 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
21140 });
21141 Clazz_overrideMethod (c$, "getCtrlX", 
21142 function () {
21143 return this.ctrlx;
21144 });
21145 Clazz_overrideMethod (c$, "getCtrlY", 
21146 function () {
21147 return this.ctrly;
21148 });
21149 Clazz_overrideMethod (c$, "getCtrlPt", 
21150 function () {
21151 return  new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly);
21152 });
21153 Clazz_overrideMethod (c$, "getX2", 
21154 function () {
21155 return this.x2;
21156 });
21157 Clazz_overrideMethod (c$, "getY2", 
21158 function () {
21159 return this.y2;
21160 });
21161 Clazz_overrideMethod (c$, "getP2", 
21162 function () {
21163 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
21164 });
21165 Clazz_defineMethod (c$, "setCurve", 
21166 function (a, b, c, d, e, f) {
21167 this.x1 = a;
21168 this.y1 = b;
21169 this.ctrlx = c;
21170 this.ctrly = d;
21171 this.x2 = e;
21172 this.y2 = f;
21173 }, "~N,~N,~N,~N,~N,~N");
21174 Clazz_defineMethod (c$, "setCurve", 
21175 function (a, b, c, d, e, f) {
21176 this.x1 = a;
21177 this.y1 = b;
21178 this.ctrlx = c;
21179 this.ctrly = d;
21180 this.x2 = e;
21181 this.y2 = f;
21182 }, "~N,~N,~N,~N,~N,~N");
21183 Clazz_overrideMethod (c$, "getBounds2D", 
21184 function () {
21185 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21186 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21187 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21188 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21189 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
21190 });
21191 c$ = Clazz_p0p ();
21192 Clazz_pu$h(self.c$);
21193 c$ = Clazz_decorateAsClass (function () {
21194 this.x1 = 0;
21195 this.y1 = 0;
21196 this.ctrlx = 0;
21197 this.ctrly = 0;
21198 this.x2 = 0;
21199 this.y2 = 0;
21200 Clazz_instantialize (this, arguments);
21201 }, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D);
21202 Clazz_makeConstructor (c$, 
21203 function () {
21204 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21205 });
21206 Clazz_makeConstructor (c$, 
21207 function (a, b, c, d, e, f) {
21208 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21209 this.setCurve (a, b, c, d, e, f);
21210 }, "~N,~N,~N,~N,~N,~N");
21211 Clazz_overrideMethod (c$, "getX1", 
21212 function () {
21213 return this.x1;
21214 });
21215 Clazz_overrideMethod (c$, "getY1", 
21216 function () {
21217 return this.y1;
21218 });
21219 Clazz_overrideMethod (c$, "getP1", 
21220 function () {
21221 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
21222 });
21223 Clazz_overrideMethod (c$, "getCtrlX", 
21224 function () {
21225 return this.ctrlx;
21226 });
21227 Clazz_overrideMethod (c$, "getCtrlY", 
21228 function () {
21229 return this.ctrly;
21230 });
21231 Clazz_overrideMethod (c$, "getCtrlPt", 
21232 function () {
21233 return  new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly);
21234 });
21235 Clazz_overrideMethod (c$, "getX2", 
21236 function () {
21237 return this.x2;
21238 });
21239 Clazz_overrideMethod (c$, "getY2", 
21240 function () {
21241 return this.y2;
21242 });
21243 Clazz_overrideMethod (c$, "getP2", 
21244 function () {
21245 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
21246 });
21247 Clazz_defineMethod (c$, "setCurve", 
21248 function (a, b, c, d, e, f) {
21249 this.x1 = a;
21250 this.y1 = b;
21251 this.ctrlx = c;
21252 this.ctrly = d;
21253 this.x2 = e;
21254 this.y2 = f;
21255 }, "~N,~N,~N,~N,~N,~N");
21256 Clazz_overrideMethod (c$, "getBounds2D", 
21257 function () {
21258 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21259 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21260 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21261 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21262 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
21263 });
21264 c$ = Clazz_p0p ();
21265 Clazz_defineStatics (c$,
21266 "BELOW", -2,
21267 "LOWEDGE", -1,
21268 "INSIDE", 0,
21269 "HIGHEDGE", 1,
21270 "ABOVE", 2);
21271 });
21272 Clazz_declarePackage ("java.awt.geom");
21273 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () {
21274 c$ = Clazz_decorateAsClass (function () {
21275 this.quad = null;
21276 this.affine = null;
21277 this.index = 0;
21278 Clazz_instantialize (this, arguments);
21279 }, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator);
21280 Clazz_makeConstructor (c$, 
21281 function (q, at) {
21282 this.quad = q;
21283 this.affine = at;
21284 }, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform");
21285 Clazz_overrideMethod (c$, "getWindingRule", 
21286 function () {
21287 return 1;
21288 });
21289 Clazz_overrideMethod (c$, "isDone", 
21290 function () {
21291 return (this.index > 1);
21292 });
21293 Clazz_overrideMethod (c$, "next", 
21294 function () {
21295 this.index++;
21296 });
21297 Clazz_defineMethod (c$, "currentSegment", 
21298 function (coords) {
21299 if (this.isDone ()) {
21300 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21301 }var type;
21302 if (this.index == 0) {
21303 coords[0] = this.quad.getX1 ();
21304 coords[1] = this.quad.getY1 ();
21305 type = 0;
21306 } else {
21307 coords[0] = this.quad.getCtrlX ();
21308 coords[1] = this.quad.getCtrlY ();
21309 coords[2] = this.quad.getX2 ();
21310 coords[3] = this.quad.getY2 ();
21311 type = 2;
21312 }if (this.affine != null) {
21313 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21314 }return type;
21315 }, "~A");
21316 Clazz_defineMethod (c$, "currentSegment", 
21317 function (coords) {
21318 if (this.isDone ()) {
21319 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21320 }var type;
21321 if (this.index == 0) {
21322 coords[0] = this.quad.getX1 ();
21323 coords[1] = this.quad.getY1 ();
21324 type = 0;
21325 } else {
21326 coords[0] = this.quad.getCtrlX ();
21327 coords[1] = this.quad.getCtrlY ();
21328 coords[2] = this.quad.getX2 ();
21329 coords[3] = this.quad.getY2 ();
21330 type = 2;
21331 }if (this.affine != null) {
21332 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21333 }return type;
21334 }, "~A");
21335 });
21336 Clazz_declarePackage ("jssun.awt.geom");
21337 Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () {
21338 c$ = Clazz_decorateAsClass (function () {
21339 this.direction = 0;
21340 Clazz_instantialize (this, arguments);
21341 }, jssun.awt.geom, "Curve");
21342 c$.insertMove = Clazz_defineMethod (c$, "insertMove", 
21343 function (curves, x, y) {
21344 curves.add ( new jssun.awt.geom.Order0 (x, y));
21345 }, "java.util.Vector,~N,~N");
21346 c$.insertLine = Clazz_defineMethod (c$, "insertLine", 
21347 function (curves, x0, y0, x1, y1) {
21348 if (y0 < y1) {
21349 curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1));
21350 } else if (y0 > y1) {
21351 curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1));
21352 } else {
21353 }}, "java.util.Vector,~N,~N,~N,~N");
21354 c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", 
21355 function (curves, x0, y0, coords) {
21356 var y1 = coords[3];
21357 if (y0 > y1) {
21358 jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1);
21359 } else if (y0 == y1 && y0 == coords[1]) {
21360 return;
21361 } else {
21362 jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1);
21363 }}, "java.util.Vector,~N,~N,~A");
21364 c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", 
21365 function (curves, x0, y0, coords) {
21366 var y1 = coords[5];
21367 if (y0 > y1) {
21368 jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1);
21369 } else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) {
21370 return;
21371 } else {
21372 jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1);
21373 }}, "java.util.Vector,~N,~N,~A");
21374 c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", 
21375 function (pi, px, py) {
21376 if (pi.isDone ()) {
21377 return 0;
21378 }var coords =  Clazz_newDoubleArray (6, 0);
21379 if (pi.currentSegment (coords) != 0) {
21380 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21381 }pi.next ();
21382 var movx = coords[0];
21383 var movy = coords[1];
21384 var curx = movx;
21385 var cury = movy;
21386 var endx;
21387 var endy;
21388 var crossings = 0;
21389 while (!pi.isDone ()) {
21390 switch (pi.currentSegment (coords)) {
21391 case 0:
21392 if (cury != movy) {
21393 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21394 }movx = curx = coords[0];
21395 movy = cury = coords[1];
21396 break;
21397 case 1:
21398 endx = coords[0];
21399 endy = coords[1];
21400 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy);
21401 curx = endx;
21402 cury = endy;
21403 break;
21404 case 2:
21405 endx = coords[2];
21406 endy = coords[3];
21407 crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0);
21408 curx = endx;
21409 cury = endy;
21410 break;
21411 case 3:
21412 endx = coords[4];
21413 endy = coords[5];
21414 crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21415 curx = endx;
21416 cury = endy;
21417 break;
21418 case 4:
21419 if (cury != movy) {
21420 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21421 }curx = movx;
21422 cury = movy;
21423 break;
21424 }
21425 pi.next ();
21426 }
21427 if (cury != movy) {
21428 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21429 }return crossings;
21430 }, "java.awt.geom.PathIterator,~N,~N");
21431 c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", 
21432 function (px, py, x0, y0, x1, y1) {
21433 if (py < y0 && py < y1) return 0;
21434 if (py >= y0 && py >= y1) return 0;
21435 if (px >= x0 && px >= x1) return 0;
21436 if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1;
21437 var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0);
21438 if (px >= xintercept) return 0;
21439 return (y0 < y1) ? 1 : -1;
21440 }, "~N,~N,~N,~N,~N,~N");
21441 c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", 
21442 function (px, py, x0, y0, xc, yc, x1, y1, level) {
21443 if (py < y0 && py < yc && py < y1) return 0;
21444 if (py >= y0 && py >= yc && py >= y1) return 0;
21445 if (px >= x0 && px >= xc && px >= x1) return 0;
21446 if (px < x0 && px < xc && px < x1) {
21447 if (py >= y0) {
21448 if (py < y1) return 1;
21449 } else {
21450 if (py >= y1) return -1;
21451 }return 0;
21452 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21453 var x0c = (x0 + xc) / 2;
21454 var y0c = (y0 + yc) / 2;
21455 var xc1 = (xc + x1) / 2;
21456 var yc1 = (yc + y1) / 2;
21457 xc = (x0c + xc1) / 2;
21458 yc = (y0c + yc1) / 2;
21459 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21460 return 0;
21461 }return (jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, x0, y0, x0c, y0c, xc, yc, level + 1) + jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, xc, yc, xc1, yc1, x1, y1, level + 1));
21462 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21463 c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", 
21464 function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21465 if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0;
21466 if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0;
21467 if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0;
21468 if (px < x0 && px < xc0 && px < xc1 && px < x1) {
21469 if (py >= y0) {
21470 if (py < y1) return 1;
21471 } else {
21472 if (py >= y1) return -1;
21473 }return 0;
21474 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21475 var xmid = (xc0 + xc1) / 2;
21476 var ymid = (yc0 + yc1) / 2;
21477 xc0 = (x0 + xc0) / 2;
21478 yc0 = (y0 + yc0) / 2;
21479 xc1 = (xc1 + x1) / 2;
21480 yc1 = (yc1 + y1) / 2;
21481 var xc0m = (xc0 + xmid) / 2;
21482 var yc0m = (yc0 + ymid) / 2;
21483 var xmc1 = (xmid + xc1) / 2;
21484 var ymc1 = (ymid + yc1) / 2;
21485 xmid = (xc0m + xmc1) / 2;
21486 ymid = (yc0m + ymc1) / 2;
21487 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21488 return 0;
21489 }return (jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1) + jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1));
21490 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21491 c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", 
21492 function (pi, rxmin, rymin, rxmax, rymax) {
21493 if (rxmax <= rxmin || rymax <= rymin) {
21494 return 0;
21495 }if (pi.isDone ()) {
21496 return 0;
21497 }var coords =  Clazz_newDoubleArray (6, 0);
21498 if (pi.currentSegment (coords) != 0) {
21499 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21500 }pi.next ();
21501 var curx;
21502 var cury;
21503 var movx;
21504 var movy;
21505 var endx;
21506 var endy;
21507 curx = movx = coords[0];
21508 cury = movy = coords[1];
21509 var crossings = 0;
21510 while (crossings != -2147483648 && !pi.isDone ()) {
21511 switch (pi.currentSegment (coords)) {
21512 case 0:
21513 if (curx != movx || cury != movy) {
21514 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21515 }movx = curx = coords[0];
21516 movy = cury = coords[1];
21517 break;
21518 case 1:
21519 endx = coords[0];
21520 endy = coords[1];
21521 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy);
21522 curx = endx;
21523 cury = endy;
21524 break;
21525 case 2:
21526 endx = coords[2];
21527 endy = coords[3];
21528 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0);
21529 curx = endx;
21530 cury = endy;
21531 break;
21532 case 3:
21533 endx = coords[4];
21534 endy = coords[5];
21535 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21536 curx = endx;
21537 cury = endy;
21538 break;
21539 case 4:
21540 if (curx != movx || cury != movy) {
21541 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21542 }curx = movx;
21543 cury = movy;
21544 break;
21545 }
21546 pi.next ();
21547 }
21548 if (crossings != -2147483648 && (curx != movx || cury != movy)) {
21549 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21550 }return crossings;
21551 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
21552 c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", 
21553 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) {
21554 if (y0 >= rymax && y1 >= rymax) return crossings;
21555 if (y0 <= rymin && y1 <= rymin) return crossings;
21556 if (x0 <= rxmin && x1 <= rxmin) return crossings;
21557 if (x0 >= rxmax && x1 >= rxmax) {
21558 if (y0 < y1) {
21559 if (y0 <= rymin) crossings++;
21560 if (y1 >= rymax) crossings++;
21561 } else if (y1 < y0) {
21562 if (y1 <= rymin) crossings--;
21563 if (y0 >= rymax) crossings--;
21564 }return crossings;
21565 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21566 return -2147483648;
21567 }var xi0 = x0;
21568 if (y0 < rymin) {
21569 xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0));
21570 } else if (y0 > rymax) {
21571 xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0));
21572 }var xi1 = x1;
21573 if (y1 < rymin) {
21574 xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1));
21575 } else if (y1 > rymax) {
21576 xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1));
21577 }if (xi0 <= rxmin && xi1 <= rxmin) return crossings;
21578 if (xi0 >= rxmax && xi1 >= rxmax) {
21579 if (y0 < y1) {
21580 if (y0 <= rymin) crossings++;
21581 if (y1 >= rymax) crossings++;
21582 } else if (y1 < y0) {
21583 if (y1 <= rymin) crossings--;
21584 if (y0 >= rymax) crossings--;
21585 }return crossings;
21586 }return -2147483648;
21587 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21588 c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", 
21589 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) {
21590 if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings;
21591 if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings;
21592 if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings;
21593 if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) {
21594 if (y0 < y1) {
21595 if (y0 <= rymin && y1 > rymin) crossings++;
21596 if (y0 < rymax && y1 >= rymax) crossings++;
21597 } else if (y1 < y0) {
21598 if (y1 <= rymin && y0 > rymin) crossings--;
21599 if (y1 < rymax && y0 >= rymax) crossings--;
21600 }return crossings;
21601 }if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) {
21602 return -2147483648;
21603 }if (level > 52) {
21604 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21605 }var x0c = (x0 + xc) / 2;
21606 var y0c = (y0 + yc) / 2;
21607 var xc1 = (xc + x1) / 2;
21608 var yc1 = (yc + y1) / 2;
21609 xc = (x0c + xc1) / 2;
21610 yc = (y0c + yc1) / 2;
21611 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21612 return 0;
21613 }crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1);
21614 if (crossings != -2147483648) {
21615 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1);
21616 }return crossings;
21617 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21618 c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", 
21619 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21620 if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) {
21621 return crossings;
21622 }if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) {
21623 return crossings;
21624 }if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) {
21625 return crossings;
21626 }if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) {
21627 if (y0 < y1) {
21628 if (y0 <= rymin && y1 > rymin) crossings++;
21629 if (y0 < rymax && y1 >= rymax) crossings++;
21630 } else if (y1 < y0) {
21631 if (y1 <= rymin && y0 > rymin) crossings--;
21632 if (y1 < rymax && y0 >= rymax) crossings--;
21633 }return crossings;
21634 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21635 return -2147483648;
21636 }if (level > 52) {
21637 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21638 }var xmid = (xc0 + xc1) / 2;
21639 var ymid = (yc0 + yc1) / 2;
21640 xc0 = (x0 + xc0) / 2;
21641 yc0 = (y0 + yc0) / 2;
21642 xc1 = (xc1 + x1) / 2;
21643 yc1 = (yc1 + y1) / 2;
21644 var xc0m = (xc0 + xmid) / 2;
21645 var yc0m = (yc0 + ymid) / 2;
21646 var xmc1 = (xmid + xc1) / 2;
21647 var ymc1 = (ymid + yc1) / 2;
21648 xmid = (xc0m + xmc1) / 2;
21649 ymid = (yc0m + ymc1) / 2;
21650 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21651 return 0;
21652 }crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1);
21653 if (crossings != -2147483648) {
21654 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1);
21655 }return crossings;
21656 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21657 Clazz_makeConstructor (c$, 
21658 function (direction) {
21659 this.direction = direction;
21660 }, "~N");
21661 Clazz_defineMethod (c$, "getDirection", 
21662 function () {
21663 return this.direction;
21664 });
21665 Clazz_defineMethod (c$, "getWithDirection", 
21666 function (direction) {
21667 return (this.direction == direction ? this : this.getReversedCurve ());
21668 }, "~N");
21669 c$.round = Clazz_defineMethod (c$, "round", 
21670 function (v) {
21671 return v;
21672 }, "~N");
21673 c$.orderof = Clazz_defineMethod (c$, "orderof", 
21674 function (x1, x2) {
21675 if (x1 < x2) {
21676 return -1;
21677 }if (x1 > x2) {
21678 return 1;
21679 }return 0;
21680 }, "~N,~N");
21681 c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", 
21682 function (y1, y2) {
21683 return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21684 }, "~N,~N");
21685 c$.diffbits = Clazz_defineMethod (c$, "diffbits", 
21686 function (y1, y2) {
21687 return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21688 }, "~N,~N");
21689 c$.prev = Clazz_defineMethod (c$, "prev", 
21690 function (v) {
21691 return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1);
21692 }, "~N");
21693 c$.next = Clazz_defineMethod (c$, "next", 
21694 function (v) {
21695 return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1);
21696 }, "~N");
21697 Clazz_overrideMethod (c$, "toString", 
21698 function () {
21699 return ("Curve[" + this.getOrder () + ", " + ("(" + jssun.awt.geom.Curve.round (this.getX0 ()) + ", " + jssun.awt.geom.Curve.round (this.getY0 ()) + "), ") + this.controlPointString () + ("(" + jssun.awt.geom.Curve.round (this.getX1 ()) + ", " + jssun.awt.geom.Curve.round (this.getY1 ()) + "), ") + (this.direction == 1 ? "D" : "U") + "]");
21700 });
21701 Clazz_defineMethod (c$, "controlPointString", 
21702 function () {
21703 return "";
21704 });
21705 Clazz_defineMethod (c$, "crossingsFor", 
21706 function (x, y) {
21707 if (y >= this.getYTop () && y < this.getYBot ()) {
21708 if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) {
21709 return 1;
21710 }}return 0;
21711 }, "~N,~N");
21712 Clazz_defineMethod (c$, "accumulateCrossings", 
21713 function (c) {
21714 var xhi = c.getXHi ();
21715 if (this.getXMin () >= xhi) {
21716 return false;
21717 }var xlo = c.getXLo ();
21718 var ylo = c.getYLo ();
21719 var yhi = c.getYHi ();
21720 var y0 = this.getYTop ();
21721 var y1 = this.getYBot ();
21722 var tstart;
21723 var ystart;
21724 var tend;
21725 var yend;
21726 if (y0 < ylo) {
21727 if (y1 <= ylo) {
21728 return false;
21729 }ystart = ylo;
21730 tstart = this.TforY (ylo);
21731 } else {
21732 if (y0 >= yhi) {
21733 return false;
21734 }ystart = y0;
21735 tstart = 0;
21736 }if (y1 > yhi) {
21737 yend = yhi;
21738 tend = this.TforY (yhi);
21739 } else {
21740 yend = y1;
21741 tend = 1;
21742 }var hitLo = false;
21743 var hitHi = false;
21744 while (true) {
21745 var x = this.XforT (tstart);
21746 if (x < xhi) {
21747 if (hitHi || x > xlo) {
21748 return true;
21749 }hitLo = true;
21750 } else {
21751 if (hitLo) {
21752 return true;
21753 }hitHi = true;
21754 }if (tstart >= tend) {
21755 break;
21756 }tstart = this.nextVertical (tstart, tend);
21757 }
21758 if (hitLo) {
21759 c.record (ystart, yend, this.direction);
21760 }return false;
21761 }, "jssun.awt.geom.Crossings");
21762 Clazz_defineMethod (c$, "getSubCurve", 
21763 function (ystart, yend) {
21764 return this.getSubCurve (ystart, yend, this.direction);
21765 }, "~N,~N");
21766 Clazz_defineMethod (c$, "compareTo", 
21767 function (that, yrange) {
21768 var y0 = yrange[0];
21769 var y1 = yrange[1];
21770 y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ());
21771 if (y1 <= yrange[0]) {
21772 System.err.println ("this == " + this);
21773 System.err.println ("that == " + that);
21774 System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]);
21775 throw  new InternalError ("backstepping from " + yrange[0] + " to " + y1);
21776 }yrange[1] = y1;
21777 if (this.getXMax () <= that.getXMin ()) {
21778 if (this.getXMin () == that.getXMax ()) {
21779 return 0;
21780 }return -1;
21781 }if (this.getXMin () >= that.getXMax ()) {
21782 return 1;
21783 }var s0 = this.TforY (y0);
21784 var ys0 = this.YforT (s0);
21785 if (ys0 < y0) {
21786 s0 = this.refineTforY (s0, ys0, y0);
21787 ys0 = this.YforT (s0);
21788 }var s1 = this.TforY (y1);
21789 if (this.YforT (s1) < y0) {
21790 s1 = this.refineTforY (s1, this.YforT (s1), y0);
21791 }var t0 = that.TforY (y0);
21792 var yt0 = that.YforT (t0);
21793 if (yt0 < y0) {
21794 t0 = that.refineTforY (t0, yt0, y0);
21795 yt0 = that.YforT (t0);
21796 }var t1 = that.TforY (y1);
21797 if (that.YforT (t1) < y0) {
21798 t1 = that.refineTforY (t1, that.YforT (t1), y0);
21799 }var xs0 = this.XforT (s0);
21800 var xt0 = that.XforT (t0);
21801 var scale = Math.max (Math.abs (y0), Math.abs (y1));
21802 var ymin = Math.max (scale * 1E-14, 1E-300);
21803 if (this.fairlyClose (xs0, xt0)) {
21804 var bump = ymin;
21805 var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1);
21806 var y = y0 + bump;
21807 while (y <= y1) {
21808 if (this.fairlyClose (this.XforY (y), that.XforY (y))) {
21809 if ((bump *= 2) > maxbump) {
21810 bump = maxbump;
21811 }} else {
21812 y -= bump;
21813 while (true) {
21814 bump /= 2;
21815 var newy = y + bump;
21816 if (newy <= y) {
21817 break;
21818 }if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) {
21819 y = newy;
21820 }}
21821 break;
21822 }y += bump;
21823 }
21824 if (y > y0) {
21825 if (y < y1) {
21826 yrange[1] = y;
21827 }return 0;
21828 }}if (ymin <= 0) {
21829 System.out.println ("ymin = " + ymin);
21830 }while (s0 < s1 && t0 < t1) {
21831 var sh = this.nextVertical (s0, s1);
21832 var xsh = this.XforT (sh);
21833 var ysh = this.YforT (sh);
21834 var th = that.nextVertical (t0, t1);
21835 var xth = that.XforT (th);
21836 var yth = that.YforT (th);
21837 try {
21838 if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) {
21839 break;
21840 }} catch (t) {
21841 System.err.println ("Error: " + t);
21842 System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]);
21843 System.err.println ("s y range is " + ys0 + "=>" + ysh);
21844 System.err.println ("t y range is " + yt0 + "=>" + yth);
21845 System.err.println ("ymin is " + ymin);
21846 return 0;
21847 }
21848 if (ysh < yth) {
21849 if (ysh > yrange[0]) {
21850 if (ysh < yrange[1]) {
21851 yrange[1] = ysh;
21852 }break;
21853 }s0 = sh;
21854 xs0 = xsh;
21855 ys0 = ysh;
21856 } else {
21857 if (yth > yrange[0]) {
21858 if (yth < yrange[1]) {
21859 yrange[1] = yth;
21860 }break;
21861 }t0 = th;
21862 xt0 = xth;
21863 yt0 = yth;
21864 }}
21865 var ymid = (yrange[0] + yrange[1]) / 2;
21866 return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid));
21867 }, "jssun.awt.geom.Curve,~A");
21868 Clazz_defineMethod (c$, "findIntersect", 
21869 function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) {
21870 if (ys0 > yt1 || yt0 > ys1) {
21871 return false;
21872 }if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) {
21873 return false;
21874 }if (s1 - s0 > 0.001) {
21875 var s = (s0 + s1) / 2;
21876 var xs = this.XforT (s);
21877 var ys = this.YforT (s);
21878 if (s == s0 || s == s1) {
21879 System.out.println ("s0 = " + s0);
21880 System.out.println ("s1 = " + s1);
21881 throw  new InternalError ("no s progress!");
21882 }if (t1 - t0 > 0.001) {
21883 var t = (t0 + t1) / 2;
21884 var xt = that.XforT (t);
21885 var yt = that.YforT (t);
21886 if (t == t0 || t == t1) {
21887 System.out.println ("t0 = " + t0);
21888 System.out.println ("t1 = " + t1);
21889 throw  new InternalError ("no t progress!");
21890 }if (ys >= yt0 && yt >= ys0) {
21891 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) {
21892 return true;
21893 }}if (ys >= yt) {
21894 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) {
21895 return true;
21896 }}if (yt >= ys) {
21897 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21898 return true;
21899 }}if (ys1 >= yt && yt1 >= ys) {
21900 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21901 return true;
21902 }}} else {
21903 if (ys >= yt0) {
21904 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) {
21905 return true;
21906 }}if (yt1 >= ys) {
21907 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) {
21908 return true;
21909 }}}} else if (t1 - t0 > 0.001) {
21910 var t = (t0 + t1) / 2;
21911 var xt = that.XforT (t);
21912 var yt = that.YforT (t);
21913 if (t == t0 || t == t1) {
21914 System.out.println ("t0 = " + t0);
21915 System.out.println ("t1 = " + t1);
21916 throw  new InternalError ("no t progress!");
21917 }if (yt >= ys0) {
21918 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21919 return true;
21920 }}if (ys1 >= yt) {
21921 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21922 return true;
21923 }}} else {
21924 var xlk = xs1 - xs0;
21925 var ylk = ys1 - ys0;
21926 var xnm = xt1 - xt0;
21927 var ynm = yt1 - yt0;
21928 var xmk = xt0 - xs0;
21929 var ymk = yt0 - ys0;
21930 var det = xnm * ylk - ynm * xlk;
21931 if (det != 0) {
21932 var detinv = 1 / det;
21933 var s = (xnm * ymk - ynm * xmk) * detinv;
21934 var t = (xlk * ymk - ylk * xmk) * detinv;
21935 if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {
21936 s = s0 + s * (s1 - s0);
21937 t = t0 + t * (t1 - t0);
21938 if (s < 0 || s > 1 || t < 0 || t > 1) {
21939 System.out.println ("Uh oh!");
21940 }var y = (this.YforT (s) + that.YforT (t)) / 2;
21941 if (y <= yrange[1] && y > yrange[0]) {
21942 yrange[1] = y;
21943 return true;
21944 }}}}return false;
21945 }, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21946 Clazz_defineMethod (c$, "refineTforY", 
21947 function (t0, yt0, y0) {
21948 var t1 = 1;
21949 while (true) {
21950 var th = (t0 + t1) / 2;
21951 if (th == t0 || th == t1) {
21952 return t1;
21953 }var y = this.YforT (th);
21954 if (y < y0) {
21955 t0 = th;
21956 yt0 = y;
21957 } else if (y > y0) {
21958 t1 = th;
21959 } else {
21960 return t1;
21961 }}
21962 }, "~N,~N,~N");
21963 Clazz_defineMethod (c$, "fairlyClose", 
21964 function (v1, v2) {
21965 return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10);
21966 }, "~N,~N");
21967 Clazz_defineStatics (c$,
21968 "INCREASING", 1,
21969 "DECREASING", -1,
21970 "RECT_INTERSECTS", 0x80000000,
21971 "TMIN", 1E-3);
21972 });
21973 Clazz_declarePackage ("java.awt.geom");
21974 Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () {
21975 c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException);
21976 Clazz_makeConstructor (c$, 
21977 function () {
21978 Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []);
21979 });
21980 });
21981 Clazz_declarePackage ("java.awt.geom");
21982 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () {
21983 c$ = Clazz_decorateAsClass (function () {
21984 this.x = 0;
21985 this.y = 0;
21986 this.w = 0;
21987 this.h = 0;
21988 this.affine = null;
21989 this.index = 0;
21990 Clazz_instantialize (this, arguments);
21991 }, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator);
21992 Clazz_makeConstructor (c$, 
21993 function (r, at) {
21994 this.x = r.getX ();
21995 this.y = r.getY ();
21996 this.w = r.getWidth ();
21997 this.h = r.getHeight ();
21998 this.affine = at;
21999 if (this.w < 0 || this.h < 0) {
22000 this.index = 6;
22001 }}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform");
22002 Clazz_overrideMethod (c$, "getWindingRule", 
22003 function () {
22004 return 1;
22005 });
22006 Clazz_overrideMethod (c$, "isDone", 
22007 function () {
22008 return this.index > 5;
22009 });
22010 Clazz_overrideMethod (c$, "next", 
22011 function () {
22012 this.index++;
22013 });
22014 Clazz_defineMethod (c$, "currentSegment", 
22015 function (coords) {
22016 if (this.isDone ()) {
22017 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
22018 }if (this.index == 5) {
22019 return 4;
22020 }coords[0] = this.x;
22021 coords[1] = this.y;
22022 if (this.index == 1 || this.index == 2) {
22023 coords[0] += this.w;
22024 }if (this.index == 2 || this.index == 3) {
22025 coords[1] += this.h;
22026 }if (this.affine != null) {
22027 this.affine.transform (coords, 0, coords, 0, 1);
22028 }return (this.index == 0 ? 0 : 1);
22029 }, "~A");
22030 Clazz_defineMethod (c$, "currentSegment", 
22031 function (coords) {
22032 if (this.isDone ()) {
22033 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
22034 }if (this.index == 5) {
22035 return 4;
22036 }coords[0] = this.x;
22037 coords[1] = this.y;
22038 if (this.index == 1 || this.index == 2) {
22039 coords[0] += this.w;
22040 }if (this.index == 2 || this.index == 3) {
22041 coords[1] += this.h;
22042 }if (this.affine != null) {
22043 this.affine.transform (coords, 0, coords, 0, 1);
22044 }return (this.index == 0 ? 0 : 1);
22045 }, "~A");
22046 });
22047 Clazz_declarePackage ("java.awt.event");
22048 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () {
22049 c$ = Clazz_decorateAsClass (function () {
22050 this.actionCommand = null;
22051 this.when = 0;
22052 this.modifiers = 0;
22053 Clazz_instantialize (this, arguments);
22054 }, java.awt.event, "ActionEvent", java.awt.AWTEvent);
22055 Clazz_makeConstructor (c$, 
22056 function (source, id, command) {
22057 this.construct (source, id, command, 0);
22058 }, "~O,~N,~S");
22059 Clazz_makeConstructor (c$, 
22060 function (source, id, command, modifiers) {
22061 this.construct (source, id, command, 0, modifiers);
22062 }, "~O,~N,~S,~N");
22063 Clazz_makeConstructor (c$, 
22064 function (source, id, command, when, modifiers) {
22065 Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]);
22066 this.actionCommand = command;
22067 this.when = when;
22068 this.modifiers = modifiers;
22069 }, "~O,~N,~S,~N,~N");
22070 Clazz_defineMethod (c$, "getActionCommand", 
22071 function () {
22072 return this.actionCommand;
22073 });
22074 Clazz_defineMethod (c$, "getWhen", 
22075 function () {
22076 return this.when;
22077 });
22078 Clazz_defineMethod (c$, "getModifiers", 
22079 function () {
22080 return this.modifiers;
22081 });
22082 Clazz_overrideMethod (c$, "paramString", 
22083 function () {
22084 var typeStr;
22085 switch (this.id) {
22086 case 1001:
22087 typeStr = "ACTION_PERFORMED";
22088 break;
22089 default:
22090 typeStr = "unknown type";
22091 }
22092 return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers);
22093 });
22094 Clazz_defineStatics (c$,
22095 "SHIFT_MASK", 1,
22096 "CTRL_MASK", 2,
22097 "META_MASK", 4,
22098 "ALT_MASK", 8,
22099 "ACTION_FIRST", 1001,
22100 "ACTION_LAST", 1001,
22101 "ACTION_PERFORMED", 1001);
22102 });
22103 Clazz_declarePackage ("java.awt.event");
22104 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () {
22105 c$ = Clazz_decorateAsClass (function () {
22106 this.isProxyActive = false;
22107 this.keyCode = 0;
22108 this.keyChar = '\0';
22109 this.keyLocation = 0;
22110 Clazz_instantialize (this, arguments);
22111 }, java.awt.event, "KeyEvent", java.awt.event.InputEvent);
22112 Clazz_makeConstructor (c$, 
22113 function (source, id, when, modifiers, keyCode, keyChar, keyLocation) {
22114 Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]);
22115 if (id == 400) {
22116 if (keyChar == '\uffff') {
22117 throw  new IllegalArgumentException ("invalid keyChar");
22118 }if (keyCode != 0) {
22119 throw  new IllegalArgumentException ("invalid keyCode");
22120 }if (keyLocation != 0) {
22121 throw  new IllegalArgumentException ("invalid keyLocation");
22122 }}this.keyCode = keyCode;
22123 this.keyChar = keyChar;
22124 if ((keyLocation < 0) || (keyLocation > 4)) {
22125 throw  new IllegalArgumentException ("invalid keyLocation");
22126 }this.keyLocation = keyLocation;
22127 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22128 this.setNewModifiers ();
22129 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22130 this.setOldModifiers ();
22131 }}, "java.awt.Component,~N,~N,~N,~N,~S,~N");
22132 Clazz_makeConstructor (c$, 
22133 function (source, id, when, modifiers, keyCode, keyChar) {
22134 this.construct (source, id, when, modifiers, keyCode, keyChar, 0);
22135 }, "java.awt.Component,~N,~N,~N,~N,~S");
22136 Clazz_makeConstructor (c$, 
22137 function (source, id, when, modifiers, keyCode) {
22138 this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode));
22139 }, "java.awt.Component,~N,~N,~N,~N");
22140 Clazz_defineMethod (c$, "getKeyCode", 
22141 function () {
22142 return this.keyCode;
22143 });
22144 Clazz_defineMethod (c$, "setKeyCode", 
22145 function (keyCode) {
22146 this.keyCode = keyCode;
22147 }, "~N");
22148 Clazz_defineMethod (c$, "getKeyChar", 
22149 function () {
22150 return this.keyChar;
22151 });
22152 Clazz_defineMethod (c$, "setKeyChar", 
22153 function (keyChar) {
22154 this.keyChar = keyChar;
22155 }, "~S");
22156 Clazz_defineMethod (c$, "setModifiers", 
22157 function (modifiers) {
22158 this.modifiers = modifiers;
22159 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22160 this.setNewModifiers ();
22161 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22162 this.setOldModifiers ();
22163 }}, "~N");
22164 Clazz_defineMethod (c$, "getKeyLocation", 
22165 function () {
22166 return this.keyLocation;
22167 });
22168 c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", 
22169 function (keyCode) {
22170 if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) {
22171 return String.valueOf (String.fromCharCode (keyCode));
22172 }switch (keyCode) {
22173 case 10:
22174 return java.awt.Toolkit.getProperty ("AWT.enter", "Enter");
22175 case 8:
22176 return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace");
22177 case 9:
22178 return java.awt.Toolkit.getProperty ("AWT.tab", "Tab");
22179 case 3:
22180 return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel");
22181 case 12:
22182 return java.awt.Toolkit.getProperty ("AWT.clear", "Clear");
22183 case 65312:
22184 return java.awt.Toolkit.getProperty ("AWT.compose", "Compose");
22185 case 19:
22186 return java.awt.Toolkit.getProperty ("AWT.pause", "Pause");
22187 case 20:
22188 return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock");
22189 case 27:
22190 return java.awt.Toolkit.getProperty ("AWT.escape", "Escape");
22191 case 32:
22192 return java.awt.Toolkit.getProperty ("AWT.space", "Space");
22193 case 33:
22194 return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up");
22195 case 34:
22196 return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down");
22197 case 35:
22198 return java.awt.Toolkit.getProperty ("AWT.end", "End");
22199 case 36:
22200 return java.awt.Toolkit.getProperty ("AWT.home", "Home");
22201 case 37:
22202 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22203 case 38:
22204 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22205 case 39:
22206 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22207 case 40:
22208 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22209 case 65368:
22210 return java.awt.Toolkit.getProperty ("AWT.begin", "Begin");
22211 case 16:
22212 return java.awt.Toolkit.getProperty ("AWT.shift", "Shift");
22213 case 17:
22214 return java.awt.Toolkit.getProperty ("AWT.control", "Control");
22215 case 18:
22216 return java.awt.Toolkit.getProperty ("AWT.alt", "Alt");
22217 case 157:
22218 return java.awt.Toolkit.getProperty ("AWT.meta", "Meta");
22219 case 65406:
22220 return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph");
22221 case 44:
22222 return java.awt.Toolkit.getProperty ("AWT.comma", "Comma");
22223 case 46:
22224 return java.awt.Toolkit.getProperty ("AWT.period", "Period");
22225 case 47:
22226 return java.awt.Toolkit.getProperty ("AWT.slash", "Slash");
22227 case 59:
22228 return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon");
22229 case 61:
22230 return java.awt.Toolkit.getProperty ("AWT.equals", "Equals");
22231 case 91:
22232 return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket");
22233 case 92:
22234 return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash");
22235 case 93:
22236 return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket");
22237 case 106:
22238 return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *");
22239 case 107:
22240 return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +");
22241 case 108:
22242 return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,");
22243 case 109:
22244 return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -");
22245 case 110:
22246 return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad .");
22247 case 111:
22248 return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /");
22249 case 127:
22250 return java.awt.Toolkit.getProperty ("AWT.delete", "Delete");
22251 case 144:
22252 return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock");
22253 case 145:
22254 return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock");
22255 case 524:
22256 return java.awt.Toolkit.getProperty ("AWT.windows", "Windows");
22257 case 525:
22258 return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu");
22259 case 112:
22260 return java.awt.Toolkit.getProperty ("AWT.f1", "F1");
22261 case 113:
22262 return java.awt.Toolkit.getProperty ("AWT.f2", "F2");
22263 case 114:
22264 return java.awt.Toolkit.getProperty ("AWT.f3", "F3");
22265 case 115:
22266 return java.awt.Toolkit.getProperty ("AWT.f4", "F4");
22267 case 116:
22268 return java.awt.Toolkit.getProperty ("AWT.f5", "F5");
22269 case 117:
22270 return java.awt.Toolkit.getProperty ("AWT.f6", "F6");
22271 case 118:
22272 return java.awt.Toolkit.getProperty ("AWT.f7", "F7");
22273 case 119:
22274 return java.awt.Toolkit.getProperty ("AWT.f8", "F8");
22275 case 120:
22276 return java.awt.Toolkit.getProperty ("AWT.f9", "F9");
22277 case 121:
22278 return java.awt.Toolkit.getProperty ("AWT.f10", "F10");
22279 case 122:
22280 return java.awt.Toolkit.getProperty ("AWT.f11", "F11");
22281 case 123:
22282 return java.awt.Toolkit.getProperty ("AWT.f12", "F12");
22283 case 61440:
22284 return java.awt.Toolkit.getProperty ("AWT.f13", "F13");
22285 case 61441:
22286 return java.awt.Toolkit.getProperty ("AWT.f14", "F14");
22287 case 61442:
22288 return java.awt.Toolkit.getProperty ("AWT.f15", "F15");
22289 case 61443:
22290 return java.awt.Toolkit.getProperty ("AWT.f16", "F16");
22291 case 61444:
22292 return java.awt.Toolkit.getProperty ("AWT.f17", "F17");
22293 case 61445:
22294 return java.awt.Toolkit.getProperty ("AWT.f18", "F18");
22295 case 61446:
22296 return java.awt.Toolkit.getProperty ("AWT.f19", "F19");
22297 case 61447:
22298 return java.awt.Toolkit.getProperty ("AWT.f20", "F20");
22299 case 61448:
22300 return java.awt.Toolkit.getProperty ("AWT.f21", "F21");
22301 case 61449:
22302 return java.awt.Toolkit.getProperty ("AWT.f22", "F22");
22303 case 61450:
22304 return java.awt.Toolkit.getProperty ("AWT.f23", "F23");
22305 case 61451:
22306 return java.awt.Toolkit.getProperty ("AWT.f24", "F24");
22307 case 154:
22308 return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen");
22309 case 155:
22310 return java.awt.Toolkit.getProperty ("AWT.insert", "Insert");
22311 case 156:
22312 return java.awt.Toolkit.getProperty ("AWT.help", "Help");
22313 case 192:
22314 return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote");
22315 case 222:
22316 return java.awt.Toolkit.getProperty ("AWT.quote", "Quote");
22317 case 224:
22318 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22319 case 225:
22320 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22321 case 226:
22322 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22323 case 227:
22324 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22325 case 128:
22326 return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave");
22327 case 129:
22328 return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute");
22329 case 130:
22330 return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex");
22331 case 131:
22332 return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde");
22333 case 132:
22334 return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron");
22335 case 133:
22336 return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve");
22337 case 134:
22338 return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot");
22339 case 135:
22340 return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis");
22341 case 136:
22342 return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring");
22343 case 137:
22344 return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute");
22345 case 138:
22346 return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron");
22347 case 139:
22348 return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla");
22349 case 140:
22350 return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek");
22351 case 141:
22352 return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota");
22353 case 142:
22354 return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound");
22355 case 143:
22356 return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound");
22357 case 150:
22358 return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand");
22359 case 151:
22360 return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk");
22361 case 152:
22362 return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote");
22363 case 153:
22364 return java.awt.Toolkit.getProperty ("AWT.Less", "Less");
22365 case 160:
22366 return java.awt.Toolkit.getProperty ("AWT.greater", "Greater");
22367 case 161:
22368 return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace");
22369 case 162:
22370 return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace");
22371 case 512:
22372 return java.awt.Toolkit.getProperty ("AWT.at", "At");
22373 case 513:
22374 return java.awt.Toolkit.getProperty ("AWT.colon", "Colon");
22375 case 514:
22376 return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex");
22377 case 515:
22378 return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar");
22379 case 516:
22380 return java.awt.Toolkit.getProperty ("AWT.euro", "Euro");
22381 case 517:
22382 return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark");
22383 case 518:
22384 return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark");
22385 case 519:
22386 return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis");
22387 case 520:
22388 return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign");
22389 case 45:
22390 return java.awt.Toolkit.getProperty ("AWT.minus", "Minus");
22391 case 521:
22392 return java.awt.Toolkit.getProperty ("AWT.plus", "Plus");
22393 case 522:
22394 return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis");
22395 case 523:
22396 return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore");
22397 case 24:
22398 return java.awt.Toolkit.getProperty ("AWT.final", "Final");
22399 case 28:
22400 return java.awt.Toolkit.getProperty ("AWT.convert", "Convert");
22401 case 29:
22402 return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert");
22403 case 30:
22404 return java.awt.Toolkit.getProperty ("AWT.accept", "Accept");
22405 case 31:
22406 return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change");
22407 case 21:
22408 return java.awt.Toolkit.getProperty ("AWT.kana", "Kana");
22409 case 25:
22410 return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji");
22411 case 240:
22412 return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric");
22413 case 241:
22414 return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana");
22415 case 242:
22416 return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana");
22417 case 243:
22418 return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width");
22419 case 244:
22420 return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width");
22421 case 245:
22422 return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters");
22423 case 256:
22424 return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates");
22425 case 257:
22426 return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate");
22427 case 258:
22428 return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input");
22429 case 259:
22430 return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana");
22431 case 260:
22432 return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana");
22433 case 261:
22434 return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman");
22435 case 262:
22436 return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock");
22437 case 263:
22438 return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off");
22439 case 65481:
22440 return java.awt.Toolkit.getProperty ("AWT.again", "Again");
22441 case 65483:
22442 return java.awt.Toolkit.getProperty ("AWT.undo", "Undo");
22443 case 65485:
22444 return java.awt.Toolkit.getProperty ("AWT.copy", "Copy");
22445 case 65487:
22446 return java.awt.Toolkit.getProperty ("AWT.paste", "Paste");
22447 case 65489:
22448 return java.awt.Toolkit.getProperty ("AWT.cut", "Cut");
22449 case 65488:
22450 return java.awt.Toolkit.getProperty ("AWT.find", "Find");
22451 case 65482:
22452 return java.awt.Toolkit.getProperty ("AWT.props", "Props");
22453 case 65480:
22454 return java.awt.Toolkit.getProperty ("AWT.stop", "Stop");
22455 }
22456 if (keyCode >= 96 && keyCode <= 105) {
22457 var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad");
22458 var c = String.fromCharCode (keyCode - 96 + 48);
22459 return numpad + "-" + c;
22460 }var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown");
22461 return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16);
22462 }, "~N");
22463 c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", 
22464 function (modifiers) {
22465 var buf =  new StringBuilder ();
22466 if ((modifiers & 4) != 0) {
22467 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
22468 buf.append ("+");
22469 }if ((modifiers & 2) != 0) {
22470 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
22471 buf.append ("+");
22472 }if ((modifiers & 8) != 0) {
22473 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
22474 buf.append ("+");
22475 }if ((modifiers & 1) != 0) {
22476 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
22477 buf.append ("+");
22478 }if ((modifiers & 32) != 0) {
22479 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
22480 buf.append ("+");
22481 }if ((modifiers & 16) != 0) {
22482 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
22483 buf.append ("+");
22484 }if (buf.length () > 0) {
22485 buf.setLength (buf.length () - 1);
22486 }return buf.toString ();
22487 }, "~N");
22488 Clazz_defineMethod (c$, "isActionKey", 
22489 function () {
22490 switch (this.keyCode) {
22491 case 36:
22492 case 35:
22493 case 33:
22494 case 34:
22495 case 38:
22496 case 40:
22497 case 37:
22498 case 39:
22499 case 65368:
22500 case 226:
22501 case 224:
22502 case 227:
22503 case 225:
22504 case 112:
22505 case 113:
22506 case 114:
22507 case 115:
22508 case 116:
22509 case 117:
22510 case 118:
22511 case 119:
22512 case 120:
22513 case 121:
22514 case 122:
22515 case 123:
22516 case 61440:
22517 case 61441:
22518 case 61442:
22519 case 61443:
22520 case 61444:
22521 case 61445:
22522 case 61446:
22523 case 61447:
22524 case 61448:
22525 case 61449:
22526 case 61450:
22527 case 61451:
22528 case 154:
22529 case 145:
22530 case 20:
22531 case 144:
22532 case 19:
22533 case 155:
22534 case 24:
22535 case 28:
22536 case 29:
22537 case 30:
22538 case 31:
22539 case 21:
22540 case 25:
22541 case 240:
22542 case 241:
22543 case 242:
22544 case 243:
22545 case 244:
22546 case 245:
22547 case 256:
22548 case 257:
22549 case 258:
22550 case 259:
22551 case 260:
22552 case 261:
22553 case 262:
22554 case 263:
22555 case 65481:
22556 case 65483:
22557 case 65485:
22558 case 65487:
22559 case 65489:
22560 case 65488:
22561 case 65482:
22562 case 65480:
22563 case 156:
22564 case 524:
22565 case 525:
22566 return true;
22567 }
22568 return false;
22569 });
22570 Clazz_overrideMethod (c$, "paramString", 
22571 function () {
22572 var str =  new StringBuilder (100);
22573 switch (this.id) {
22574 case 401:
22575 str.append ("KEY_PRESSED");
22576 break;
22577 case 402:
22578 str.append ("KEY_RELEASED");
22579 break;
22580 case 400:
22581 str.append ("KEY_TYPED");
22582 break;
22583 default:
22584 str.append ("unknown type");
22585 break;
22586 }
22587 str.append (",keyCode=").append ("" + this.keyCode);
22588 str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode));
22589 str.append (",keyChar=");
22590 switch (this.keyChar) {
22591 case '\b':
22592 str.append (java.awt.event.KeyEvent.getKeyText (8));
22593 break;
22594 case '\t':
22595 str.append (java.awt.event.KeyEvent.getKeyText (9));
22596 break;
22597 case '\n':
22598 str.append (java.awt.event.KeyEvent.getKeyText (10));
22599 break;
22600 case '\u0018':
22601 str.append (java.awt.event.KeyEvent.getKeyText (3));
22602 break;
22603 case '\u001b':
22604 str.append (java.awt.event.KeyEvent.getKeyText (27));
22605 break;
22606 case '\u007f':
22607 str.append (java.awt.event.KeyEvent.getKeyText (127));
22608 break;
22609 case '\uffff':
22610 str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined"));
22611 str.append (" keyChar");
22612 break;
22613 default:
22614 str.append ("'").append (this.keyChar).append ("'");
22615 break;
22616 }
22617 if (this.getModifiers () != 0) {
22618 str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers));
22619 }if (this.getModifiersEx () != 0) {
22620 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
22621 }str.append (",keyLocation=");
22622 switch (this.keyLocation) {
22623 case 0:
22624 str.append ("KEY_LOCATION_UNKNOWN");
22625 break;
22626 case 1:
22627 str.append ("KEY_LOCATION_STANDARD");
22628 break;
22629 case 2:
22630 str.append ("KEY_LOCATION_LEFT");
22631 break;
22632 case 3:
22633 str.append ("KEY_LOCATION_RIGHT");
22634 break;
22635 case 4:
22636 str.append ("KEY_LOCATION_NUMPAD");
22637 break;
22638 default:
22639 str.append ("KEY_LOCATION_UNKNOWN");
22640 break;
22641 }
22642 return str.toString ();
22643 });
22644 Clazz_defineMethod (c$, "setNewModifiers", 
22645  function () {
22646 if ((this.modifiers & 1) != 0) {
22647 this.modifiers |= 64;
22648 }if ((this.modifiers & 8) != 0) {
22649 this.modifiers |= 512;
22650 }if ((this.modifiers & 2) != 0) {
22651 this.modifiers |= 128;
22652 }if ((this.modifiers & 4) != 0) {
22653 this.modifiers |= 256;
22654 }if ((this.modifiers & 32) != 0) {
22655 this.modifiers |= 8192;
22656 }if ((this.modifiers & 16) != 0) {
22657 this.modifiers |= 1024;
22658 }});
22659 Clazz_defineMethod (c$, "setOldModifiers", 
22660  function () {
22661 if ((this.modifiers & 64) != 0) {
22662 this.modifiers |= 1;
22663 }if ((this.modifiers & 512) != 0) {
22664 this.modifiers |= 8;
22665 }if ((this.modifiers & 128) != 0) {
22666 this.modifiers |= 2;
22667 }if ((this.modifiers & 256) != 0) {
22668 this.modifiers |= 4;
22669 }if ((this.modifiers & 8192) != 0) {
22670 this.modifiers |= 32;
22671 }if ((this.modifiers & 1024) != 0) {
22672 this.modifiers |= 16;
22673 }});
22674 Clazz_defineStatics (c$,
22675 "KEY_FIRST", 400,
22676 "KEY_LAST", 402,
22677 "KEY_TYPED", 400,
22678 "KEY_PRESSED", 401,
22679 "KEY_RELEASED", 402,
22680 "VK_ENTER", '\n',
22681 "VK_BACK_SPACE", '\b',
22682 "VK_TAB", '\t',
22683 "VK_CANCEL", 0x03,
22684 "VK_CLEAR", 0x0C,
22685 "VK_SHIFT", 0x10,
22686 "VK_CONTROL", 0x11,
22687 "VK_ALT", 0x12,
22688 "VK_PAUSE", 0x13,
22689 "VK_CAPS_LOCK", 0x14,
22690 "VK_ESCAPE", 0x1B,
22691 "VK_SPACE", 0x20,
22692 "VK_PAGE_UP", 0x21,
22693 "VK_PAGE_DOWN", 0x22,
22694 "VK_END", 0x23,
22695 "VK_HOME", 0x24,
22696 "VK_LEFT", 0x25,
22697 "VK_UP", 0x26,
22698 "VK_RIGHT", 0x27,
22699 "VK_DOWN", 0x28,
22700 "VK_COMMA", 0x2C,
22701 "VK_MINUS", 0x2D,
22702 "VK_PERIOD", 0x2E,
22703 "VK_SLASH", 0x2F,
22704 "VK_0", 0x30,
22705 "VK_1", 0x31,
22706 "VK_2", 0x32,
22707 "VK_3", 0x33,
22708 "VK_4", 0x34,
22709 "VK_5", 0x35,
22710 "VK_6", 0x36,
22711 "VK_7", 0x37,
22712 "VK_8", 0x38,
22713 "VK_9", 0x39,
22714 "VK_SEMICOLON", 0x3B,
22715 "VK_EQUALS", 0x3D,
22716 "VK_A", 0x41,
22717 "VK_B", 0x42,
22718 "VK_C", 0x43,
22719 "VK_D", 0x44,
22720 "VK_E", 0x45,
22721 "VK_F", 0x46,
22722 "VK_G", 0x47,
22723 "VK_H", 0x48,
22724 "VK_I", 0x49,
22725 "VK_J", 0x4A,
22726 "VK_K", 0x4B,
22727 "VK_L", 0x4C,
22728 "VK_M", 0x4D,
22729 "VK_N", 0x4E,
22730 "VK_O", 0x4F,
22731 "VK_P", 0x50,
22732 "VK_Q", 0x51,
22733 "VK_R", 0x52,
22734 "VK_S", 0x53,
22735 "VK_T", 0x54,
22736 "VK_U", 0x55,
22737 "VK_V", 0x56,
22738 "VK_W", 0x57,
22739 "VK_X", 0x58,
22740 "VK_Y", 0x59,
22741 "VK_Z", 0x5A,
22742 "VK_OPEN_BRACKET", 0x5B,
22743 "VK_BACK_SLASH", 0x5C,
22744 "VK_CLOSE_BRACKET", 0x5D,
22745 "VK_NUMPAD0", 0x60,
22746 "VK_NUMPAD1", 0x61,
22747 "VK_NUMPAD2", 0x62,
22748 "VK_NUMPAD3", 0x63,
22749 "VK_NUMPAD4", 0x64,
22750 "VK_NUMPAD5", 0x65,
22751 "VK_NUMPAD6", 0x66,
22752 "VK_NUMPAD7", 0x67,
22753 "VK_NUMPAD8", 0x68,
22754 "VK_NUMPAD9", 0x69,
22755 "VK_MULTIPLY", 0x6A,
22756 "VK_ADD", 0x6B,
22757 "VK_SEPARATER", 0x6C,
22758 "VK_SEPARATOR", 108,
22759 "VK_SUBTRACT", 0x6D,
22760 "VK_DECIMAL", 0x6E,
22761 "VK_DIVIDE", 0x6F,
22762 "VK_DELETE", 0x7F,
22763 "VK_NUM_LOCK", 0x90,
22764 "VK_SCROLL_LOCK", 0x91,
22765 "VK_F1", 0x70,
22766 "VK_F2", 0x71,
22767 "VK_F3", 0x72,
22768 "VK_F4", 0x73,
22769 "VK_F5", 0x74,
22770 "VK_F6", 0x75,
22771 "VK_F7", 0x76,
22772 "VK_F8", 0x77,
22773 "VK_F9", 0x78,
22774 "VK_F10", 0x79,
22775 "VK_F11", 0x7A,
22776 "VK_F12", 0x7B,
22777 "VK_F13", 0xF000,
22778 "VK_F14", 0xF001,
22779 "VK_F15", 0xF002,
22780 "VK_F16", 0xF003,
22781 "VK_F17", 0xF004,
22782 "VK_F18", 0xF005,
22783 "VK_F19", 0xF006,
22784 "VK_F20", 0xF007,
22785 "VK_F21", 0xF008,
22786 "VK_F22", 0xF009,
22787 "VK_F23", 0xF00A,
22788 "VK_F24", 0xF00B,
22789 "VK_PRINTSCREEN", 0x9A,
22790 "VK_INSERT", 0x9B,
22791 "VK_HELP", 0x9C,
22792 "VK_META", 0x9D,
22793 "VK_BACK_QUOTE", 0xC0,
22794 "VK_QUOTE", 0xDE,
22795 "VK_KP_UP", 0xE0,
22796 "VK_KP_DOWN", 0xE1,
22797 "VK_KP_LEFT", 0xE2,
22798 "VK_KP_RIGHT", 0xE3,
22799 "VK_DEAD_GRAVE", 0x80,
22800 "VK_DEAD_ACUTE", 0x81,
22801 "VK_DEAD_CIRCUMFLEX", 0x82,
22802 "VK_DEAD_TILDE", 0x83,
22803 "VK_DEAD_MACRON", 0x84,
22804 "VK_DEAD_BREVE", 0x85,
22805 "VK_DEAD_ABOVEDOT", 0x86,
22806 "VK_DEAD_DIAERESIS", 0x87,
22807 "VK_DEAD_ABOVERING", 0x88,
22808 "VK_DEAD_DOUBLEACUTE", 0x89,
22809 "VK_DEAD_CARON", 0x8a,
22810 "VK_DEAD_CEDILLA", 0x8b,
22811 "VK_DEAD_OGONEK", 0x8c,
22812 "VK_DEAD_IOTA", 0x8d,
22813 "VK_DEAD_VOICED_SOUND", 0x8e,
22814 "VK_DEAD_SEMIVOICED_SOUND", 0x8f,
22815 "VK_AMPERSAND", 0x96,
22816 "VK_ASTERISK", 0x97,
22817 "VK_QUOTEDBL", 0x98,
22818 "VK_LESS", 0x99,
22819 "VK_GREATER", 0xa0,
22820 "VK_BRACELEFT", 0xa1,
22821 "VK_BRACERIGHT", 0xa2,
22822 "VK_AT", 0x0200,
22823 "VK_COLON", 0x0201,
22824 "VK_CIRCUMFLEX", 0x0202,
22825 "VK_DOLLAR", 0x0203,
22826 "VK_EURO_SIGN", 0x0204,
22827 "VK_EXCLAMATION_MARK", 0x0205,
22828 "VK_INVERTED_EXCLAMATION_MARK", 0x0206,
22829 "VK_LEFT_PARENTHESIS", 0x0207,
22830 "VK_NUMBER_SIGN", 0x0208,
22831 "VK_PLUS", 0x0209,
22832 "VK_RIGHT_PARENTHESIS", 0x020A,
22833 "VK_UNDERSCORE", 0x020B,
22834 "VK_WINDOWS", 0x020C,
22835 "VK_CONTEXT_MENU", 0x020D,
22836 "VK_FINAL", 0x0018,
22837 "VK_CONVERT", 0x001C,
22838 "VK_NONCONVERT", 0x001D,
22839 "VK_ACCEPT", 0x001E,
22840 "VK_MODECHANGE", 0x001F,
22841 "VK_KANA", 0x0015,
22842 "VK_KANJI", 0x0019,
22843 "VK_ALPHANUMERIC", 0x00F0,
22844 "VK_KATAKANA", 0x00F1,
22845 "VK_HIRAGANA", 0x00F2,
22846 "VK_FULL_WIDTH", 0x00F3,
22847 "VK_HALF_WIDTH", 0x00F4,
22848 "VK_ROMAN_CHARACTERS", 0x00F5,
22849 "VK_ALL_CANDIDATES", 0x0100,
22850 "VK_PREVIOUS_CANDIDATE", 0x0101,
22851 "VK_CODE_INPUT", 0x0102,
22852 "VK_JAPANESE_KATAKANA", 0x0103,
22853 "VK_JAPANESE_HIRAGANA", 0x0104,
22854 "VK_JAPANESE_ROMAN", 0x0105,
22855 "VK_KANA_LOCK", 0x0106,
22856 "VK_INPUT_METHOD_ON_OFF", 0x0107,
22857 "VK_CUT", 0xFFD1,
22858 "VK_COPY", 0xFFCD,
22859 "VK_PASTE", 0xFFCF,
22860 "VK_UNDO", 0xFFCB,
22861 "VK_AGAIN", 0xFFC9,
22862 "VK_FIND", 0xFFD0,
22863 "VK_PROPS", 0xFFCA,
22864 "VK_STOP", 0xFFC8,
22865 "VK_COMPOSE", 0xFF20,
22866 "VK_ALT_GRAPH", 0xFF7E,
22867 "VK_BEGIN", 0xFF58,
22868 "VK_UNDEFINED", 0x0,
22869 "CHAR_UNDEFINED", String.fromCharCode (0xFFFF),
22870 "KEY_LOCATION_UNKNOWN", 0,
22871 "KEY_LOCATION_STANDARD", 1,
22872 "KEY_LOCATION_LEFT", 2,
22873 "KEY_LOCATION_RIGHT", 3,
22874 "KEY_LOCATION_NUMPAD", 4);
22875 });
22876 Clazz_declarePackage ("java.awt.event");
22877 Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () {
22878 c$ = Clazz_decorateAsClass (function () {
22879 this.scrollType = 0;
22880 this.scrollAmount = 0;
22881 this.wheelRotation = 0;
22882 Clazz_instantialize (this, arguments);
22883 }, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent);
22884 Clazz_makeConstructor (c$, 
22885 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22886 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation);
22887 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22888 Clazz_makeConstructor (c$, 
22889 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22890 Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
22891 this.scrollType = scrollType;
22892 this.scrollAmount = scrollAmount;
22893 this.wheelRotation = wheelRotation;
22894 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22895 Clazz_defineMethod (c$, "getScrollType", 
22896 function () {
22897 return this.scrollType;
22898 });
22899 Clazz_defineMethod (c$, "getScrollAmount", 
22900 function () {
22901 return this.scrollAmount;
22902 });
22903 Clazz_defineMethod (c$, "getWheelRotation", 
22904 function () {
22905 return this.wheelRotation;
22906 });
22907 Clazz_defineMethod (c$, "getUnitsToScroll", 
22908 function () {
22909 return this.scrollAmount * this.wheelRotation;
22910 });
22911 Clazz_defineMethod (c$, "paramString", 
22912 function () {
22913 var scrollTypeStr = null;
22914 if (this.getScrollType () == 0) {
22915 scrollTypeStr = "WHEEL_UNIT_SCROLL";
22916 } else if (this.getScrollType () == 1) {
22917 scrollTypeStr = "WHEEL_BLOCK_SCROLL";
22918 } else {
22919 scrollTypeStr = "unknown scroll type";
22920 }return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation ();
22921 });
22922 Clazz_defineStatics (c$,
22923 "WHEEL_UNIT_SCROLL", 0,
22924 "WHEEL_BLOCK_SCROLL", 1);
22925 });
22926 Clazz_declarePackage ("javax.swing");
22927 Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {
22928 c$ = Clazz_decorateAsClass (function () {
22929 this.enabled = true;
22930 this.arrayTable = null;
22931 this.changeSupport = null;
22932 Clazz_instantialize (this, arguments);
22933 }, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);
22934 c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", 
22935 function (e) {
22936 if (e.getPropertyName () == null) {
22937 javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);
22938 }return false;
22939 }, "java.beans.PropertyChangeEvent");
22940 c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", 
22941 function (c, a) {
22942 c.setEnabled ((a != null) ? a.isEnabled () : true);
22943 }, "javax.swing.JComponent,javax.swing.Action");
22944 c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", 
22945 function (c, a) {
22946 c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);
22947 }, "javax.swing.JComponent,javax.swing.Action");
22948 c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", 
22949 function (a) {
22950 return (a != null && a.getValue ("SwingSelectedKey") != null);
22951 }, "javax.swing.Action");
22952 c$.isSelected = Clazz_defineMethod (c$, "isSelected", 
22953 function (a) {
22954 return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));
22955 }, "javax.swing.Action");
22956 Clazz_makeConstructor (c$, 
22957 function () {
22958 });
22959 Clazz_makeConstructor (c$, 
22960 function (name) {
22961 this.putValue ("Name", name);
22962 }, "~S");
22963 Clazz_makeConstructor (c$, 
22964 function (name, icon) {
22965 this.construct (name);
22966 this.putValue ("SmallIcon", icon);
22967 }, "~S,javax.swing.Icon");
22968 Clazz_defineMethod (c$, "getValue", 
22969 function (key) {
22970 if (key === "enabled") {
22971 return this.enabled;
22972 }if (this.arrayTable == null) {
22973 return null;
22974 }return this.arrayTable.get (key);
22975 }, "~S");
22976 Clazz_overrideMethod (c$, "putValue", 
22977 function (key, newValue) {
22978 var oldValue = null;
22979 if (key === "enabled") {
22980 if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) {
22981 newValue = new Boolean (false);
22982 }oldValue = new Boolean (this.enabled);
22983 this.enabled = (newValue).booleanValue ();
22984 } else {
22985 if (this.arrayTable == null) {
22986 this.arrayTable =  new javax.swing.ArrayTable ();
22987 }if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);
22988 if (newValue == null) {
22989 this.arrayTable.remove (key);
22990 } else {
22991 this.arrayTable.put (key, newValue);
22992 }}this.firePropertyChange (key, oldValue, newValue);
22993 }, "~S,~O");
22994 Clazz_defineMethod (c$, "isEnabled", 
22995 function () {
22996 return this.enabled;
22997 });
22998 Clazz_overrideMethod (c$, "setEnabled", 
22999 function (newValue) {
23000 var oldValue = this.enabled;
23001 if (oldValue != newValue) {
23002 this.enabled = newValue;
23003 this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
23004 }}, "~B");
23005 Clazz_defineMethod (c$, "getKeys", 
23006 function () {
23007 if (this.arrayTable == null) {
23008 return null;
23009 }var keys =  new Array (this.arrayTable.size ());
23010 this.arrayTable.getKeys (keys);
23011 return keys;
23012 });
23013 Clazz_defineMethod (c$, "firePropertyChange", 
23014 function (propertyName, oldValue, newValue) {
23015 if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
23016 return;
23017 }this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
23018 }, "~S,~O,~O");
23019 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
23020 function (listener) {
23021 if (this.changeSupport == null) {
23022 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
23023 }this.changeSupport.addPropertyChangeListener (listener);
23024 }, "java.beans.PropertyChangeListener");
23025 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
23026 function (listener) {
23027 if (this.changeSupport == null) {
23028 return;
23029 }this.changeSupport.removePropertyChangeListener (listener);
23030 }, "java.beans.PropertyChangeListener");
23031 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
23032 function () {
23033 if (this.changeSupport == null) {
23034 return  new Array (0);
23035 }return this.changeSupport.getPropertyChangeListeners ();
23036 });
23037 Clazz_defineMethod (c$, "clone", 
23038 function () {
23039 var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []);
23040 {
23041 if (this.arrayTable != null) {
23042 newAction.arrayTable = this.arrayTable.clone ();
23043 }}return newAction;
23044 });
23045 Clazz_defineStatics (c$,
23046 "RECONFIGURE_ON_NULL", null);
23047 });
23048 Clazz_declarePackage ("javax.swing");
23049 Clazz_load (["java.awt.ItemSelectable", "java.awt.event.ActionListener", "$.ItemListener", "javax.swing.ActionPropertyChangeListener", "$.JComponent", "$.SwingConstants", "javax.swing.event.ChangeListener"], "javax.swing.AbstractButton", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.event.ActionEvent", "$.ItemEvent", "javax.swing.AbstractAction", "$.DefaultButtonModel", "$.OverlayLayout", "$.SwingUtilities", "$.UIManager", "javax.swing.event.ChangeEvent", "javax.swing.plaf.UIResource"], function () {
23050 c$ = Clazz_decorateAsClass (function () {
23051 this.model = null;
23052 this.text = "";
23053 this.margin = null;
23054 this.defaultMargin = null;
23055 this.defaultIcon = null;
23056 this.pressedIcon = null;
23057 this.disabledIcon = null;
23058 this.selectedIcon = null;
23059 this.disabledSelectedIcon = null;
23060 this.rolloverIcon = null;
23061 this.rolloverSelectedIcon = null;
23062 this.$paintBorder = true;
23063 this.paintFocus = true;
23064 this.rolloverEnabled = false;
23065 this.contentAreaFilled = true;
23066 this.verticalAlignment = 0;
23067 this.horizontalAlignment = 0;
23068 this.verticalTextPosition = 0;
23069 this.horizontalTextPosition = 11;
23070 this.iconTextGap = 4;
23071 this.mnemonic = 0;
23072 this.mnemonicIndex = -1;
23073 this.multiClickThreshhold = 0;
23074 this.borderPaintedSet = false;
23075 this.rolloverEnabledSet = false;
23076 this.iconTextGapSet = false;
23077 this.contentAreaFilledSet = false;
23078 this.$setLayout = false;
23079 this.defaultCapable = true;
23080 this.handler = null;
23081 this.changeListener = null;
23082 this.actionListener = null;
23083 this.itemListener = null;
23084 this.changeEvent = null;
23085 this.hideActionText = false;
23086 this.$action = null;
23087 this.actionPropertyChangeListener = null;
23088 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) {
23089 javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ ();
23090 }
23091 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) {
23092 javax.swing.AbstractButton.$AbstractButton$Handler$ ();
23093 }
23094 Clazz_instantialize (this, arguments);
23095 }, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]);
23096 Clazz_defineMethod (c$, "setHideActionText", 
23097 function (hideActionText) {
23098 if (hideActionText != this.hideActionText) {
23099 this.hideActionText = hideActionText;
23100 if (this.getAction () != null) {
23101 this.setTextFromAction (this.getAction (), false);
23102 }this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText);
23103 }}, "~B");
23104 Clazz_defineMethod (c$, "getHideActionText", 
23105 function () {
23106 return this.hideActionText;
23107 });
23108 Clazz_defineMethod (c$, "getText", 
23109 function () {
23110 return this.text;
23111 });
23112 Clazz_defineMethod (c$, "setText", 
23113 function (text) {
23114 var oldValue = this.text;
23115 this.text = text;
23116 this.firePropertyChangeObject ("text", oldValue, text);
23117 this.updateDisplayedMnemonicIndex (text, this.getMnemonic ());
23118 if (text == null || oldValue == null || !text.equals (oldValue)) {
23119 this.revalidate ();
23120 this.repaint ();
23121 }}, "~S");
23122 Clazz_defineMethod (c$, "isSelected", 
23123 function () {
23124 return this.model.isSelected ();
23125 });
23126 Clazz_defineMethod (c$, "setSelected", 
23127 function (b) {
23128 this.model.setSelected (b);
23129 }, "~B");
23130 Clazz_defineMethod (c$, "doClick", 
23131 function () {
23132 this.doClick (68);
23133 });
23134 Clazz_defineMethod (c$, "doClick", 
23135 function (pressTime) {
23136 }, "~N");
23137 Clazz_defineMethod (c$, "setMargin", 
23138 function (m) {
23139 if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) {
23140 this.defaultMargin = m;
23141 } else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) {
23142 this.defaultMargin = this.margin;
23143 }if (m == null && this.defaultMargin != null) {
23144 m = this.defaultMargin;
23145 }var old = this.margin;
23146 this.margin = m;
23147 this.firePropertyChangeObject ("margin", old, m);
23148 if (old == null || !old.equals (m)) {
23149 this.revalidate ();
23150 this.repaint ();
23151 }}, "java.awt.Insets");
23152 Clazz_defineMethod (c$, "getMargin", 
23153 function () {
23154 return (this.margin == null) ? null : this.margin.clone ();
23155 });
23156 Clazz_defineMethod (c$, "getIcon", 
23157 function () {
23158 return this.defaultIcon;
23159 });
23160 Clazz_defineMethod (c$, "setIcon", 
23161 function (defaultIcon) {
23162 var oldValue = this.defaultIcon;
23163 this.defaultIcon = defaultIcon;
23164 if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) {
23165 this.disabledIcon = null;
23166 }this.firePropertyChangeObject ("icon", oldValue, defaultIcon);
23167 if (defaultIcon !== oldValue) {
23168 if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) {
23169 this.revalidate ();
23170 }this.repaint ();
23171 }}, "javax.swing.Icon");
23172 Clazz_defineMethod (c$, "getPressedIcon", 
23173 function () {
23174 return this.pressedIcon;
23175 });
23176 Clazz_defineMethod (c$, "setPressedIcon", 
23177 function (pressedIcon) {
23178 var oldValue = this.pressedIcon;
23179 this.pressedIcon = pressedIcon;
23180 this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon);
23181 if (pressedIcon !== oldValue) {
23182 if (this.getModel ().isPressed ()) {
23183 this.repaint ();
23184 }}}, "javax.swing.Icon");
23185 Clazz_defineMethod (c$, "getSelectedIcon", 
23186 function () {
23187 return this.selectedIcon;
23188 });
23189 Clazz_defineMethod (c$, "setSelectedIcon", 
23190 function (selectedIcon) {
23191 var oldValue = this.selectedIcon;
23192 this.selectedIcon = selectedIcon;
23193 if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23194 this.disabledSelectedIcon = null;
23195 }this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon);
23196 if (selectedIcon !== oldValue) {
23197 if (this.isSelected ()) {
23198 this.repaint ();
23199 }}}, "javax.swing.Icon");
23200 Clazz_defineMethod (c$, "getRolloverIcon", 
23201 function () {
23202 return this.rolloverIcon;
23203 });
23204 Clazz_defineMethod (c$, "setRolloverIcon", 
23205 function (rolloverIcon) {
23206 var oldValue = this.rolloverIcon;
23207 this.rolloverIcon = rolloverIcon;
23208 this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon);
23209 this.setRolloverEnabled (true);
23210 if (rolloverIcon !== oldValue) {
23211 this.repaint ();
23212 }}, "javax.swing.Icon");
23213 Clazz_defineMethod (c$, "getRolloverSelectedIcon", 
23214 function () {
23215 return this.rolloverSelectedIcon;
23216 });
23217 Clazz_defineMethod (c$, "setRolloverSelectedIcon", 
23218 function (rolloverSelectedIcon) {
23219 var oldValue = this.rolloverSelectedIcon;
23220 this.rolloverSelectedIcon = rolloverSelectedIcon;
23221 this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon);
23222 this.setRolloverEnabled (true);
23223 if (rolloverSelectedIcon !== oldValue) {
23224 if (this.isSelected ()) {
23225 this.repaint ();
23226 }}}, "javax.swing.Icon");
23227 Clazz_defineMethod (c$, "getDisabledIcon", 
23228 function () {
23229 if (this.disabledIcon == null) {
23230 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ());
23231 if (this.disabledIcon != null) {
23232 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
23233 }}return this.disabledIcon;
23234 });
23235 Clazz_defineMethod (c$, "setDisabledIcon", 
23236 function (disabledIcon) {
23237 var oldValue = this.disabledIcon;
23238 this.disabledIcon = disabledIcon;
23239 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
23240 if (disabledIcon !== oldValue) {
23241 if (!this.isEnabled ()) {
23242 this.repaint ();
23243 }}}, "javax.swing.Icon");
23244 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
23245 function () {
23246 if (this.disabledSelectedIcon == null) {
23247 if (this.selectedIcon != null) {
23248 this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ());
23249 } else {
23250 return this.getDisabledIcon ();
23251 }}return this.disabledSelectedIcon;
23252 });
23253 Clazz_defineMethod (c$, "setDisabledSelectedIcon", 
23254 function (disabledSelectedIcon) {
23255 var oldValue = this.disabledSelectedIcon;
23256 this.disabledSelectedIcon = disabledSelectedIcon;
23257 this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon);
23258 if (disabledSelectedIcon !== oldValue) {
23259 if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) {
23260 this.revalidate ();
23261 }if (!this.isEnabled () && this.isSelected ()) {
23262 this.repaint ();
23263 }}}, "javax.swing.Icon");
23264 Clazz_defineMethod (c$, "getVerticalAlignment", 
23265 function () {
23266 return this.verticalAlignment;
23267 });
23268 Clazz_defineMethod (c$, "setVerticalAlignment", 
23269 function (alignment) {
23270 if (alignment == this.verticalAlignment) return;
23271 var oldValue = this.verticalAlignment;
23272 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
23273 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
23274 this.repaint ();
23275 }, "~N");
23276 Clazz_defineMethod (c$, "getHorizontalAlignment", 
23277 function () {
23278 return this.horizontalAlignment;
23279 });
23280 Clazz_defineMethod (c$, "setHorizontalAlignment", 
23281 function (alignment) {
23282 if (alignment == this.horizontalAlignment) return;
23283 var oldValue = this.horizontalAlignment;
23284 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
23285 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
23286 this.repaint ();
23287 }, "~N");
23288 Clazz_defineMethod (c$, "getVerticalTextPosition", 
23289 function () {
23290 return this.verticalTextPosition;
23291 });
23292 Clazz_defineMethod (c$, "setVerticalTextPosition", 
23293 function (textPosition) {
23294 if (textPosition == this.verticalTextPosition) return;
23295 var oldValue = this.verticalTextPosition;
23296 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
23297 this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition);
23298 this.revalidate ();
23299 this.repaint ();
23300 }, "~N");
23301 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
23302 function () {
23303 return this.horizontalTextPosition;
23304 });
23305 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
23306 function (textPosition) {
23307 if (textPosition == this.horizontalTextPosition) return;
23308 var oldValue = this.horizontalTextPosition;
23309 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
23310 this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition);
23311 this.revalidate ();
23312 this.repaint ();
23313 }, "~N");
23314 Clazz_defineMethod (c$, "getIconTextGap", 
23315 function () {
23316 return this.iconTextGap;
23317 });
23318 Clazz_defineMethod (c$, "setIconTextGap", 
23319 function (iconTextGap) {
23320 var oldValue = this.iconTextGap;
23321 this.iconTextGap = iconTextGap;
23322 this.iconTextGapSet = true;
23323 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
23324 if (iconTextGap != oldValue) {
23325 this.revalidate ();
23326 this.repaint ();
23327 }}, "~N");
23328 Clazz_defineMethod (c$, "checkHorizontalKey", 
23329 function (key, exception) {
23330 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
23331 return key;
23332 } else {
23333 throw  new IllegalArgumentException (exception);
23334 }}, "~N,~S");
23335 Clazz_defineMethod (c$, "checkVerticalKey", 
23336 function (key, exception) {
23337 if ((key == 1) || (key == 0) || (key == 3)) {
23338 return key;
23339 } else {
23340 throw  new IllegalArgumentException (exception);
23341 }}, "~N,~S");
23342 Clazz_defineMethod (c$, "removeNotify", 
23343 function () {
23344 Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []);
23345 if (this.isRolloverEnabled ()) {
23346 this.getModel ().setRollover (false);
23347 }});
23348 Clazz_defineMethod (c$, "setActionCommand", 
23349 function (actionCommand) {
23350 this.getModel ().setActionCommand (actionCommand);
23351 }, "~S");
23352 Clazz_defineMethod (c$, "getActionCommand", 
23353 function () {
23354 var ac = this.getModel ().getActionCommand ();
23355 if (ac == null) {
23356 ac = this.getText ();
23357 }return ac;
23358 });
23359 Clazz_defineMethod (c$, "setAction", 
23360 function (a) {
23361 var oldValue = this.getAction ();
23362 if (this.$action == null || !this.$action.equals (a)) {
23363 this.$action = a;
23364 if (oldValue != null) {
23365 this.removeActionListener (oldValue);
23366 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
23367 this.actionPropertyChangeListener = null;
23368 }this.configurePropertiesFromAction (this.$action);
23369 if (this.$action != null) {
23370 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
23371 this.addActionListener (this.$action);
23372 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
23373 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
23374 }this.firePropertyChangeObject ("action", oldValue, this.$action);
23375 }}, "javax.swing.Action");
23376 Clazz_defineMethod (c$, "isListener", 
23377  function (c, a) {
23378 var isListener = false;
23379 var listeners = this.listenerList.getListenerList ();
23380 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23381 if (listeners[i] === c && listeners[i + 1] === a) {
23382 isListener = true;
23383 }}
23384 return isListener;
23385 }, "Class,java.awt.event.ActionListener");
23386 Clazz_defineMethod (c$, "getAction", 
23387 function () {
23388 return this.$action;
23389 });
23390 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
23391 function (a) {
23392 this.setMnemonicFromAction (a);
23393 this.setTextFromAction (a, false);
23394 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
23395 this.setIconFromAction (a);
23396 this.setActionCommandFromAction (a);
23397 javax.swing.AbstractAction.setEnabledFromAction (this, a);
23398 if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) {
23399 this.setSelectedFromAction (a);
23400 }this.setDisplayedMnemonicIndexFromAction (a, false);
23401 }, "javax.swing.Action");
23402 Clazz_overrideMethod (c$, "clientPropertyChanged", 
23403 function (key, oldValue, newValue) {
23404 if (key === "hideActionText") {
23405 var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false;
23406 if (this.getHideActionText () != current) {
23407 this.setHideActionText (current);
23408 }}}, "~O,~O,~O");
23409 Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", 
23410 function () {
23411 return false;
23412 });
23413 Clazz_defineMethod (c$, "actionPropertyChanged", 
23414 function (action, propertyName) {
23415 if (propertyName === "Name") {
23416 this.setTextFromAction (action, true);
23417 } else if (propertyName === "enabled") {
23418 javax.swing.AbstractAction.setEnabledFromAction (this, action);
23419 } else if (propertyName === "ShortDescription") {
23420 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
23421 } else if (propertyName === "SmallIcon") {
23422 this.smallIconChanged (action);
23423 } else if (propertyName === "MnemonicKey") {
23424 this.setMnemonicFromAction (action);
23425 } else if (propertyName === "ActionCommandKey") {
23426 this.setActionCommandFromAction (action);
23427 } else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) {
23428 this.setSelectedFromAction (action);
23429 } else if (propertyName === "SwingDisplayedMnemonicIndexKey") {
23430 this.setDisplayedMnemonicIndexFromAction (action, true);
23431 } else if (propertyName === "SwingLargeIconKey") {
23432 this.largeIconChanged (action);
23433 }}, "javax.swing.Action,~S");
23434 Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", 
23435  function (a, fromPropertyChange) {
23436 var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey");
23437 if (fromPropertyChange || iValue != null) {
23438 var value;
23439 if (iValue == null) {
23440 value = -1;
23441 } else {
23442 value = (iValue).intValue ();
23443 var text = this.getText ();
23444 if (text == null || value >= text.length) {
23445 value = -1;
23446 }}this.setDisplayedMnemonicIndex (value);
23447 }}, "javax.swing.Action,~B");
23448 Clazz_defineMethod (c$, "setMnemonicFromAction", 
23449  function (a) {
23450 var n = (a == null) ? null : a.getValue ("MnemonicKey");
23451 this.setMnemonic ((n == null) ? '\0' : n);
23452 }, "javax.swing.Action");
23453 Clazz_defineMethod (c$, "setTextFromAction", 
23454  function (a, propertyChange) {
23455 var hideText = this.getHideActionText ();
23456 if (!propertyChange) {
23457 this.setText ((a != null && !hideText) ? a.getValue ("Name") : null);
23458 } else if (!hideText) {
23459 this.setText (a.getValue ("Name"));
23460 }}, "javax.swing.Action,~B");
23461 Clazz_defineMethod (c$, "setIconFromAction", 
23462 function (a) {
23463 var icon = null;
23464 if (a != null) {
23465 icon = a.getValue ("SwingLargeIconKey");
23466 if (icon == null) {
23467 icon = a.getValue ("SmallIcon");
23468 }}this.setIcon (icon);
23469 }, "javax.swing.Action");
23470 Clazz_defineMethod (c$, "smallIconChanged", 
23471 function (a) {
23472 if (a.getValue ("SwingLargeIconKey") == null) {
23473 this.setIconFromAction (a);
23474 }}, "javax.swing.Action");
23475 Clazz_defineMethod (c$, "largeIconChanged", 
23476 function (a) {
23477 this.setIconFromAction (a);
23478 }, "javax.swing.Action");
23479 Clazz_defineMethod (c$, "setActionCommandFromAction", 
23480  function (a) {
23481 this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null);
23482 }, "javax.swing.Action");
23483 Clazz_defineMethod (c$, "setSelectedFromAction", 
23484  function (a) {
23485 var selected = false;
23486 if (a != null) {
23487 selected = javax.swing.AbstractAction.isSelected (a);
23488 }if (selected != this.isSelected ()) {
23489 this.setSelected (selected);
23490 if (!selected && this.isSelected ()) {
23491 if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) {
23492 var group = (this.getModel ()).getGroup ();
23493 if (group != null) {
23494 group.clearSelection ();
23495 }}}}}, "javax.swing.Action");
23496 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
23497 function (a) {
23498 return this.createActionPropertyChangeListener0 (a);
23499 }, "javax.swing.Action");
23500 Clazz_defineMethod (c$, "createActionPropertyChangeListener0", 
23501 function (a) {
23502 return  new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a);
23503 }, "javax.swing.Action");
23504 Clazz_defineMethod (c$, "isBorderPainted", 
23505 function () {
23506 return this.$paintBorder;
23507 });
23508 Clazz_defineMethod (c$, "setBorderPainted", 
23509 function (b) {
23510 var oldValue = this.$paintBorder;
23511 this.$paintBorder = b;
23512 this.borderPaintedSet = true;
23513 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
23514 if (b != oldValue) {
23515 this.revalidate ();
23516 this.repaint ();
23517 }}, "~B");
23518 Clazz_defineMethod (c$, "paintBorder", 
23519 function (g) {
23520 if (this.isBorderPainted ()) {
23521 Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]);
23522 }}, "java.awt.Graphics");
23523 Clazz_defineMethod (c$, "isFocusPainted", 
23524 function () {
23525 return this.paintFocus;
23526 });
23527 Clazz_defineMethod (c$, "setFocusPainted", 
23528 function (b) {
23529 var oldValue = this.paintFocus;
23530 this.paintFocus = b;
23531 this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus);
23532 if (b != oldValue && this.isFocusOwner ()) {
23533 this.revalidate ();
23534 this.repaint ();
23535 }}, "~B");
23536 Clazz_defineMethod (c$, "isContentAreaFilled", 
23537 function () {
23538 return this.contentAreaFilled;
23539 });
23540 Clazz_defineMethod (c$, "setContentAreaFilled", 
23541 function (b) {
23542 var oldValue = this.contentAreaFilled;
23543 this.contentAreaFilled = b;
23544 this.contentAreaFilledSet = true;
23545 this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled);
23546 if (b != oldValue) {
23547 this.repaint ();
23548 }}, "~B");
23549 Clazz_defineMethod (c$, "isRolloverEnabled", 
23550 function () {
23551 return this.rolloverEnabled;
23552 });
23553 Clazz_defineMethod (c$, "setRolloverEnabled", 
23554 function (b) {
23555 var oldValue = this.rolloverEnabled;
23556 this.rolloverEnabled = b;
23557 this.rolloverEnabledSet = true;
23558 this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled);
23559 if (b != oldValue) {
23560 this.repaint ();
23561 }}, "~B");
23562 Clazz_defineMethod (c$, "getMnemonic", 
23563 function () {
23564 return this.mnemonic;
23565 });
23566 Clazz_defineMethod (c$, "setMnemonic", 
23567 function (mnemonic) {
23568 this.model.setMnemonic (mnemonic);
23569 this.updateMnemonicProperties ();
23570 }, "~N");
23571 Clazz_defineMethod (c$, "setMnemonic", 
23572 function (mnemonic) {
23573 var vk = (mnemonic).charCodeAt (0);
23574 if (vk >= 97 && vk <= 122) vk -= (32);
23575 this.setMnemonic (vk);
23576 }, "~S");
23577 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
23578 function (index) {
23579 var oldValue = this.mnemonicIndex;
23580 if (index == -1) {
23581 this.mnemonicIndex = -1;
23582 } else {
23583 var text = this.getText ();
23584 var textLength = (text == null) ? 0 : text.length;
23585 if (index < -1 || index >= textLength) {
23586 throw  new IllegalArgumentException ("index == " + index);
23587 }}this.mnemonicIndex = index;
23588 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
23589 if (index != oldValue) {
23590 this.revalidate ();
23591 this.repaint ();
23592 }}, "~N");
23593 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
23594 function () {
23595 return this.mnemonicIndex;
23596 });
23597 Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", 
23598  function (text, mnemonic) {
23599 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic));
23600 }, "~S,~N");
23601 Clazz_defineMethod (c$, "updateMnemonicProperties", 
23602  function () {
23603 var newMnemonic = this.model.getMnemonic ();
23604 if (this.mnemonic != newMnemonic) {
23605 var oldValue = this.mnemonic;
23606 this.mnemonic = newMnemonic;
23607 this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic);
23608 this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23609 this.revalidate ();
23610 this.repaint ();
23611 }});
23612 Clazz_defineMethod (c$, "setMultiClickThreshhold", 
23613 function (threshhold) {
23614 if (threshhold < 0) {
23615 throw  new IllegalArgumentException ("threshhold must be >= 0");
23616 }this.multiClickThreshhold = threshhold;
23617 }, "~N");
23618 Clazz_defineMethod (c$, "getMultiClickThreshhold", 
23619 function () {
23620 return this.multiClickThreshhold;
23621 });
23622 Clazz_defineMethod (c$, "getModel", 
23623 function () {
23624 return this.model;
23625 });
23626 Clazz_defineMethod (c$, "setModel", 
23627 function (newModel) {
23628 var oldModel = this.getModel ();
23629 if (oldModel != null) {
23630 oldModel.removeChangeListener (this.changeListener);
23631 oldModel.removeActionListener (this.actionListener);
23632 oldModel.removeItemListener (this.itemListener);
23633 this.changeListener = null;
23634 this.actionListener = null;
23635 this.itemListener = null;
23636 }this.model = newModel;
23637 if (newModel != null) {
23638 this.changeListener = this.createChangeListener ();
23639 this.actionListener = this.createActionListener ();
23640 this.itemListener = this.createItemListener ();
23641 newModel.addChangeListener (this.changeListener);
23642 newModel.addActionListener (this.actionListener);
23643 newModel.addItemListener (this.itemListener);
23644 this.updateMnemonicProperties ();
23645 Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]);
23646 } else {
23647 this.mnemonic = 0;
23648 }this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23649 this.firePropertyChangeObject ("model", oldModel, newModel);
23650 if (newModel !== oldModel) {
23651 this.revalidate ();
23652 this.repaint ();
23653 }}, "javax.swing.ButtonModel");
23654 Clazz_overrideMethod (c$, "getUI", 
23655 function () {
23656 return this.ui;
23657 });
23658 Clazz_defineMethod (c$, "setUI", 
23659 function (ui) {
23660 Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]);
23661 if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) {
23662 this.setDisabledIcon (null);
23663 }if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23664 this.setDisabledSelectedIcon (null);
23665 }}, "javax.swing.plaf.ButtonUI");
23666 Clazz_overrideMethod (c$, "updateUI", 
23667 function () {
23668 });
23669 Clazz_overrideMethod (c$, "addImpl", 
23670 function (comp, constraints, index) {
23671 if (!this.$setLayout) {
23672 this.setLayout ( new javax.swing.OverlayLayout (this));
23673 }return this.addImplSAEM (comp, constraints, index);
23674 }, "java.awt.Component,~O,~N");
23675 Clazz_defineMethod (c$, "setLayout", 
23676 function (mgr) {
23677 this.$setLayout = true;
23678 Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]);
23679 }, "java.awt.LayoutManager");
23680 Clazz_defineMethod (c$, "addChangeListener", 
23681 function (l) {
23682 this.listenerList.add (javax.swing.event.ChangeListener, l);
23683 }, "javax.swing.event.ChangeListener");
23684 Clazz_defineMethod (c$, "removeChangeListener", 
23685 function (l) {
23686 this.listenerList.remove (javax.swing.event.ChangeListener, l);
23687 }, "javax.swing.event.ChangeListener");
23688 Clazz_defineMethod (c$, "getChangeListeners", 
23689 function () {
23690 return (this.listenerList.getListeners (javax.swing.event.ChangeListener));
23691 });
23692 Clazz_defineMethod (c$, "fireStateChanged", 
23693 function () {
23694 var listeners = this.listenerList.getListenerList ();
23695 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23696 if (listeners[i] === javax.swing.event.ChangeListener) {
23697 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
23698 (listeners[i + 1]).stateChanged (this.changeEvent);
23699 }}
23700 });
23701 Clazz_defineMethod (c$, "addActionListener", 
23702 function (l) {
23703 this.listenerList.add (java.awt.event.ActionListener, l);
23704 }, "java.awt.event.ActionListener");
23705 Clazz_defineMethod (c$, "removeActionListener", 
23706 function (l) {
23707 if ((l != null) && (this.getAction () === l)) {
23708 this.setAction (null);
23709 } else {
23710 this.listenerList.remove (java.awt.event.ActionListener, l);
23711 }}, "java.awt.event.ActionListener");
23712 Clazz_defineMethod (c$, "getActionListeners", 
23713 function () {
23714 return (this.listenerList.getListeners (java.awt.event.ActionListener));
23715 });
23716 Clazz_defineMethod (c$, "createChangeListener", 
23717 function () {
23718 return this.getHandler ();
23719 });
23720 Clazz_defineMethod (c$, "fireActionPerformed", 
23721 function (event) {
23722 var listeners = this.listenerList.getListenerList ();
23723 var e = null;
23724 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23725 if (listeners[i] === java.awt.event.ActionListener) {
23726 if (e == null) {
23727 var actionCommand = event.getActionCommand ();
23728 if (actionCommand == null) {
23729 actionCommand = this.getActionCommand ();
23730 }e =  new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ());
23731 }(listeners[i + 1]).actionPerformed (e);
23732 }}
23733 }, "java.awt.event.ActionEvent");
23734 Clazz_defineMethod (c$, "fireItemStateChanged", 
23735 function (event) {
23736 var listeners = this.listenerList.getListenerList ();
23737 var e = null;
23738 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23739 if (listeners[i] === java.awt.event.ItemListener) {
23740 if (e == null) {
23741 e =  new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ());
23742 }(listeners[i + 1]).itemStateChanged (e);
23743 }}
23744 }, "java.awt.event.ItemEvent");
23745 Clazz_defineMethod (c$, "createActionListener", 
23746 function () {
23747 return this.getHandler ();
23748 });
23749 Clazz_defineMethod (c$, "createItemListener", 
23750 function () {
23751 return this.getHandler ();
23752 });
23753 Clazz_defineMethod (c$, "setEnabled", 
23754 function (b) {
23755 if (!b && this.model.isRollover ()) {
23756 this.model.setRollover (false);
23757 }Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]);
23758 this.model.setEnabled (b);
23759 }, "~B");
23760 Clazz_defineMethod (c$, "getLabel", 
23761 function () {
23762 return this.getText ();
23763 });
23764 Clazz_defineMethod (c$, "setLabel", 
23765 function (label) {
23766 this.setText (label);
23767 }, "~S");
23768 Clazz_overrideMethod (c$, "addItemListener", 
23769 function (l) {
23770 this.listenerList.add (java.awt.event.ItemListener, l);
23771 }, "java.awt.event.ItemListener");
23772 Clazz_overrideMethod (c$, "removeItemListener", 
23773 function (l) {
23774 this.listenerList.remove (java.awt.event.ItemListener, l);
23775 }, "java.awt.event.ItemListener");
23776 Clazz_defineMethod (c$, "getItemListeners", 
23777 function () {
23778 return this.listenerList.getListeners (java.awt.event.ItemListener);
23779 });
23780 Clazz_overrideMethod (c$, "getSelectedObjects", 
23781 function () {
23782 if (this.isSelected () == false) {
23783 return null;
23784 }var selectedObjects =  new Array (1);
23785 selectedObjects[0] = this.getText ();
23786 return selectedObjects;
23787 });
23788 Clazz_defineMethod (c$, "init", 
23789 function (text, icon) {
23790 if (text != null) {
23791 this.setText (text);
23792 }if (icon != null) {
23793 this.setIcon (icon);
23794 }this.updateUI ();
23795 this.setAlignmentX (0.0);
23796 this.setAlignmentY (0.5);
23797 }, "~S,javax.swing.Icon");
23798 Clazz_defineMethod (c$, "imageUpdate", 
23799 function (img, infoflags, x, y, w, h) {
23800 var iconDisplayed = this.getIcon ();
23801 if (iconDisplayed == null) {
23802 return false;
23803 }if (!this.model.isEnabled ()) {
23804 if (this.model.isSelected ()) {
23805 iconDisplayed = this.getDisabledSelectedIcon ();
23806 } else {
23807 iconDisplayed = this.getDisabledIcon ();
23808 }} else if (this.model.isPressed () && this.model.isArmed ()) {
23809 iconDisplayed = this.getPressedIcon ();
23810 } else if (this.isRolloverEnabled () && this.model.isRollover ()) {
23811 if (this.model.isSelected ()) {
23812 iconDisplayed = this.getRolloverSelectedIcon ();
23813 } else {
23814 iconDisplayed = this.getRolloverIcon ();
23815 }} else if (this.model.isSelected ()) {
23816 iconDisplayed = this.getSelectedIcon ();
23817 }if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) {
23818 return false;
23819 }return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]);
23820 }, "java.awt.Image,~N,~N,~N,~N,~N");
23821 Clazz_defineMethod (c$, "setUIProperty", 
23822 function (propertyName, value) {
23823 if (propertyName === "borderPainted") {
23824 if (!this.borderPaintedSet) {
23825 this.setBorderPainted ((value).booleanValue ());
23826 this.borderPaintedSet = false;
23827 }} else if (propertyName === "rolloverEnabled") {
23828 if (!this.rolloverEnabledSet) {
23829 this.setRolloverEnabled ((value).booleanValue ());
23830 this.rolloverEnabledSet = false;
23831 }} else if (propertyName === "iconTextGap") {
23832 if (!this.iconTextGapSet) {
23833 this.setIconTextGap ((value).intValue ());
23834 this.iconTextGapSet = false;
23835 }} else if (propertyName === "contentAreaFilled") {
23836 if (!this.contentAreaFilledSet) {
23837 this.setContentAreaFilled ((value).booleanValue ());
23838 this.contentAreaFilledSet = false;
23839 }} else {
23840 Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]);
23841 }}, "~S,~O");
23842 Clazz_defineMethod (c$, "paramString", 
23843 function () {
23844 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
23845 var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : "");
23846 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
23847 var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : "");
23848 var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : "");
23849 var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : "");
23850 var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : "");
23851 var paintBorderString = (this.$paintBorder ? "true" : "false");
23852 var paintFocusString = (this.paintFocus ? "true" : "false");
23853 var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false");
23854 return Clazz_superCall (this, javax.swing.AbstractButton, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",disabledSelectedIcon=" + disabledSelectedIconString + ",margin=" + this.margin + ",paintBorder=" + paintBorderString + ",paintFocus=" + paintFocusString + ",pressedIcon=" + pressedIconString + ",rolloverEnabled=" + rolloverEnabledString + ",rolloverIcon=" + rolloverIconString + ",rolloverSelectedIcon=" + rolloverSelectedIconString + ",selectedIcon=" + selectedIconString + ",text=" + this.text;
23855 });
23856 Clazz_defineMethod (c$, "getHandler", 
23857  function () {
23858 if (this.handler == null) {
23859 this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null);
23860 }return this.handler;
23861 });
23862 c$.$AbstractButton$ButtonChangeListener$ = function () {
23863 Clazz_pu$h(self.c$);
23864 c$ = Clazz_decorateAsClass (function () {
23865 Clazz_prepareCallback (this, arguments);
23866 Clazz_instantialize (this, arguments);
23867 }, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener);
23868 Clazz_makeConstructor (c$, 
23869 function () {
23870 });
23871 Clazz_overrideMethod (c$, "stateChanged", 
23872 function (a) {
23873 this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a);
23874 }, "javax.swing.event.ChangeEvent");
23875 c$ = Clazz_p0p ();
23876 };
23877 c$.$AbstractButton$Handler$ = function () {
23878 Clazz_pu$h(self.c$);
23879 c$ = Clazz_decorateAsClass (function () {
23880 Clazz_prepareCallback (this, arguments);
23881 Clazz_instantialize (this, arguments);
23882 }, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]);
23883 Clazz_overrideMethod (c$, "stateChanged", 
23884 function (a) {
23885 this.b$["javax.swing.AbstractButton"].updateMnemonicProperties ();
23886 if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) {
23887 this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ());
23888 }this.b$["javax.swing.AbstractButton"].fireStateChanged ();
23889 this.b$["javax.swing.AbstractButton"].repaint ();
23890 }, "javax.swing.event.ChangeEvent");
23891 Clazz_overrideMethod (c$, "actionPerformed", 
23892 function (a) {
23893 this.b$["javax.swing.AbstractButton"].fireActionPerformed (a);
23894 }, "java.awt.event.ActionEvent");
23895 Clazz_overrideMethod (c$, "itemStateChanged", 
23896 function (a) {
23897 this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a);
23898 if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) {
23899 var b = this.b$["javax.swing.AbstractButton"].getAction ();
23900 if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) {
23901 var c = this.b$["javax.swing.AbstractButton"].isSelected ();
23902 var d = javax.swing.AbstractAction.isSelected (b);
23903 if (d != c) {
23904 b.putValue ("SwingSelectedKey", new Boolean (c));
23905 }}}}, "java.awt.event.ItemEvent");
23906 c$ = Clazz_p0p ();
23907 };
23908 Clazz_pu$h(self.c$);
23909 c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
23910 Clazz_overrideMethod (c$, "actionPropertyChanged", 
23911 function (a, b, c) {
23912 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
23913 a.configurePropertiesFromAction (b);
23914 } else {
23915 a.actionPropertyChanged (b, c.getPropertyName ());
23916 }}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent");
23917 c$ = Clazz_p0p ();
23918 Clazz_defineStatics (c$,
23919 "MODEL_CHANGED_PROPERTY", "model",
23920 "TEXT_CHANGED_PROPERTY", "text",
23921 "MNEMONIC_CHANGED_PROPERTY", "mnemonic",
23922 "MARGIN_CHANGED_PROPERTY", "margin",
23923 "VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment",
23924 "HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment",
23925 "VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition",
23926 "HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition",
23927 "BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted",
23928 "FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted",
23929 "ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled",
23930 "CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled",
23931 "ICON_CHANGED_PROPERTY", "icon",
23932 "PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon",
23933 "SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon",
23934 "ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon",
23935 "ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon",
23936 "DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon",
23937 "DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon");
23938 });
23939 Clazz_declarePackage ("javax.swing");
23940 Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () {
23941 c$ = Clazz_decorateAsClass (function () {
23942 this.table = null;
23943 Clazz_instantialize (this, arguments);
23944 }, javax.swing, "ArrayTable", null, Cloneable);
23945 Clazz_makeConstructor (c$, 
23946 function () {
23947 });
23948 Clazz_defineMethod (c$, "put", 
23949 function (key, value) {
23950 if (this.table == null) {
23951 this.table =  Clazz_newArray (-1, [key, value]);
23952 } else {
23953 var size = this.size ();
23954 if (size < 8) {
23955 if (this.containsKey (key)) {
23956 var tmp = this.table;
23957 for (var i = 0; i < tmp.length - 1; i += 2) {
23958 if (tmp[i].equals (key)) {
23959 tmp[i + 1] = value;
23960 break;
23961 }}
23962 } else {
23963 var array = this.table;
23964 var i = array.length;
23965 var tmp =  new Array (i + 2);
23966 System.arraycopy (array, 0, tmp, 0, i);
23967 tmp[i] = key;
23968 tmp[i + 1] = value;
23969 this.table = tmp;
23970 }} else {
23971 if ((size == 8) && this.isArray ()) {
23972 this.grow ();
23973 }(this.table).put (key, value);
23974 }}}, "~O,~O");
23975 Clazz_defineMethod (c$, "get", 
23976 function (key) {
23977 var value = null;
23978 if (this.table != null) {
23979 if (this.isArray ()) {
23980 var array = this.table;
23981 for (var i = 0; i < array.length - 1; i += 2) {
23982 if (array[i].equals (key)) {
23983 value = array[i + 1];
23984 break;
23985 }}
23986 } else {
23987 value = (this.table).get (key);
23988 }}return value;
23989 }, "~O");
23990 Clazz_defineMethod (c$, "size", 
23991 function () {
23992 var size;
23993 if (this.table == null) return 0;
23994 if (this.isArray ()) {
23995 size = Clazz_doubleToInt ((this.table).length / 2);
23996 } else {
23997 size = (this.table).size ();
23998 }return size;
23999 });
24000 Clazz_defineMethod (c$, "containsKey", 
24001 function (key) {
24002 var contains = false;
24003 if (this.table != null) {
24004 if (this.isArray ()) {
24005 var array = this.table;
24006 for (var i = 0; i < array.length - 1; i += 2) {
24007 if (array[i].equals (key)) {
24008 contains = true;
24009 break;
24010 }}
24011 } else {
24012 contains = (this.table).containsKey (key);
24013 }}return contains;
24014 }, "~O");
24015 Clazz_defineMethod (c$, "remove", 
24016 function (key) {
24017 var value = null;
24018 if (key == null) {
24019 return null;
24020 }if (this.table != null) {
24021 if (this.isArray ()) {
24022 var index = -1;
24023 var array = this.table;
24024 for (var i = array.length - 2; i >= 0; i -= 2) {
24025 if (array[i].equals (key)) {
24026 index = i;
24027 value = array[i + 1];
24028 break;
24029 }}
24030 if (index != -1) {
24031 var tmp =  new Array (array.length - 2);
24032 System.arraycopy (array, 0, tmp, 0, index);
24033 if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index);
24034 this.table = (tmp.length == 0) ? null : tmp;
24035 }} else {
24036 value = (this.table).remove (key);
24037 }if (this.size () == 7 && !this.isArray ()) {
24038 this.shrink ();
24039 }}return value;
24040 }, "~O");
24041 Clazz_defineMethod (c$, "clear", 
24042 function () {
24043 this.table = null;
24044 });
24045 Clazz_overrideMethod (c$, "clone", 
24046 function () {
24047 var newArrayTable =  new javax.swing.ArrayTable ();
24048 if (this.isArray ()) {
24049 var array = this.table;
24050 for (var i = 0; i < array.length - 1; i += 2) {
24051 newArrayTable.put (array[i], array[i + 1]);
24052 }
24053 } else {
24054 var tmp = this.table;
24055 var keys = tmp.keys ();
24056 while (keys.hasMoreElements ()) {
24057 var o = keys.nextElement ();
24058 newArrayTable.put (o, tmp.get (o));
24059 }
24060 }return newArrayTable;
24061 });
24062 Clazz_defineMethod (c$, "getKeys", 
24063 function (keys) {
24064 if (this.table == null) {
24065 return null;
24066 }if (this.isArray ()) {
24067 var array = this.table;
24068 if (keys == null) {
24069 keys =  new Array (Clazz_doubleToInt (array.length / 2));
24070 }for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) {
24071 keys[index] = array[i];
24072 }
24073 } else {
24074 var tmp = this.table;
24075 var enum_ = tmp.keys ();
24076 var counter = tmp.size ();
24077 if (keys == null) {
24078 keys =  new Array (counter);
24079 }while (counter > 0) {
24080 keys[--counter] = enum_.nextElement ();
24081 }
24082 }return keys;
24083 }, "~A");
24084 Clazz_defineMethod (c$, "isArray", 
24085  function () {
24086 return (Clazz_instanceOf (this.table, Array));
24087 });
24088 Clazz_defineMethod (c$, "grow", 
24089  function () {
24090 var array = this.table;
24091 var tmp =  new java.util.Hashtable (Clazz_doubleToInt (array.length / 2));
24092 for (var i = 0; i < array.length; i += 2) {
24093 tmp.put (array[i], array[i + 1]);
24094 }
24095 this.table = tmp;
24096 });
24097 Clazz_defineMethod (c$, "shrink", 
24098  function () {
24099 var tmp = this.table;
24100 var array =  new Array (tmp.size () * 2);
24101 var keys = tmp.keys ();
24102 var j = 0;
24103 while (keys.hasMoreElements ()) {
24104 var o = keys.nextElement ();
24105 array[j] = o;
24106 array[j + 1] = tmp.get (o);
24107 j += 2;
24108 }
24109 this.table = array;
24110 });
24111 Clazz_defineStatics (c$,
24112 "ARRAY_BOUNDARY", 8);
24113 });
24114 Clazz_declarePackage ("javax.swing.event");
24115 Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () {
24116 c$ = Clazz_decorateAsClass (function () {
24117 this.notifyOnEDT = false;
24118 Clazz_instantialize (this, arguments);
24119 }, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport);
24120 Clazz_makeConstructor (c$, 
24121 function (sourceBean) {
24122 this.construct (sourceBean, false);
24123 }, "~O");
24124 Clazz_makeConstructor (c$, 
24125 function (sourceBean, notifyOnEDT) {
24126 Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]);
24127 this.notifyOnEDT = notifyOnEDT;
24128 }, "~O,~B");
24129 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
24130 function (evt) {
24131 if (evt == null) {
24132 throw  new NullPointerException ();
24133 }if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) {
24134 Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]);
24135 } else {
24136 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("javax.swing.event.SwingPropertyChangeSupport$1") ? 0 : javax.swing.event.SwingPropertyChangeSupport.$SwingPropertyChangeSupport$1$ ()), Clazz_innerTypeInstance (javax.swing.event.SwingPropertyChangeSupport$1, this, Clazz_cloneFinals ("evt", evt))));
24137 }}, "java.beans.PropertyChangeEvent");
24138 Clazz_defineMethod (c$, "isNotifyOnEDT", 
24139 function () {
24140 return this.notifyOnEDT;
24141 });
24142 c$.$SwingPropertyChangeSupport$1$ = function () {
24143 Clazz_pu$h(self.c$);
24144 c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable);
24145 Clazz_overrideMethod (c$, "run", 
24146 function () {
24147 this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt);
24148 });
24149 c$ = Clazz_p0p ();
24150 };
24151 });
24152 Clazz_declarePackage ("javax.swing");
24153 Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () {
24154 c$ = Clazz_decorateAsClass (function () {
24155 this.componentToLayer = null;
24156 this.optimizedDrawingPossible = true;
24157 Clazz_instantialize (this, arguments);
24158 }, javax.swing, "JLayeredPane", javax.swing.JComponent);
24159 Clazz_makeConstructor (c$, 
24160 function () {
24161 Clazz_superConstructor (this, javax.swing.JLayeredPane, []);
24162 this.setLayout (null);
24163 });
24164 Clazz_defineMethod (c$, "validateOptimizedDrawing", 
24165  function () {
24166 var layeredComponentFound = false;
24167 {
24168 var layer = null;
24169 for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
24170 layer = null;
24171 if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) {
24172 if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue;
24173 layeredComponentFound = true;
24174 break;
24175 }}
24176 }if (layeredComponentFound) this.optimizedDrawingPossible = false;
24177  else this.optimizedDrawingPossible = true;
24178 });
24179 Clazz_overrideMethod (c$, "addImpl", 
24180 function (comp, constraints, index) {
24181 var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24182 var pos;
24183 if (Clazz_instanceOf (constraints, Integer)) {
24184 layer = (constraints).intValue ();
24185 this.setLayer (comp, layer);
24186 } else layer = this.getLayer (comp);
24187 pos = this.insertIndexForLayer (layer, index);
24188 this.addImplSAEM (comp, constraints, pos);
24189 comp.validate ();
24190 comp.repaint ();
24191 this.validateOptimizedDrawing ();
24192 return comp;
24193 }, "java.awt.Component,~O,~N");
24194 Clazz_defineMethod (c$, "remove", 
24195 function (index) {
24196 var c = this.getComponent (index);
24197 Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]);
24198 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24199 this.getComponentToLayer ().remove (c);
24200 }this.validateOptimizedDrawing ();
24201 }, "~N");
24202 Clazz_defineMethod (c$, "removeAll", 
24203 function () {
24204 var children = this.getComponents ();
24205 var cToL = this.getComponentToLayer ();
24206 for (var counter = children.length - 1; counter >= 0; counter--) {
24207 var c = children[counter];
24208 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24209 cToL.remove (c);
24210 }}
24211 Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []);
24212 });
24213 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
24214 function () {
24215 return this.optimizedDrawingPossible;
24216 });
24217 c$.putLayer = Clazz_defineMethod (c$, "putLayer", 
24218 function (c, layer) {
24219 var layerObj;
24220 layerObj =  new Integer (layer);
24221 c.putClientProperty ("layeredContainerLayer", layerObj);
24222 }, "javax.swing.JComponent,~N");
24223 c$.getLayer = Clazz_defineMethod (c$, "getLayer", 
24224 function (c) {
24225 var i;
24226 if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue ();
24227 return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24228 }, "javax.swing.JComponent");
24229 c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", 
24230 function (c) {
24231 if (c == null) return null;
24232 var parent = c.getParent ();
24233 while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent ();
24234
24235 return parent;
24236 }, "java.awt.Component");
24237 Clazz_defineMethod (c$, "setLayer", 
24238 function (c, layer) {
24239 this.setLayer (c, layer, -1);
24240 }, "java.awt.Component,~N");
24241 Clazz_defineMethod (c$, "setLayer", 
24242 function (c, layer, position) {
24243 var layerObj;
24244 layerObj = this.getObjectForLayer (layer);
24245 if (layer == this.getLayer (c) && position == this.getPosition (c)) {
24246 this.repaint (c.getBounds ());
24247 return;
24248 }if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj);
24249  else this.getComponentToLayer ().put (c, layerObj);
24250 if (c.getParent () == null || c.getParent () !== this) {
24251 this.repaint (c.getBounds ());
24252 return;
24253 }var index = this.insertIndexForLayer (c, layer, position);
24254 this.setComponentZOrder (c, index);
24255 this.repaint (c.getBounds ());
24256 }, "java.awt.Component,~N,~N");
24257 Clazz_defineMethod (c$, "getLayer", 
24258 function (c) {
24259 var i;
24260 if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer");
24261  else i = this.getComponentToLayer ().get (c);
24262 if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24263 return i.intValue ();
24264 }, "java.awt.Component");
24265 Clazz_defineMethod (c$, "getIndexOf", 
24266 function (c) {
24267 var i;
24268 var count;
24269 count = this.getComponentCount ();
24270 for (i = 0; i < count; i++) {
24271 if (c === this.getComponent (i)) return i;
24272 }
24273 return -1;
24274 }, "java.awt.Component");
24275 Clazz_defineMethod (c$, "moveToFront", 
24276 function (c) {
24277 this.setPosition (c, 0);
24278 }, "java.awt.Component");
24279 Clazz_defineMethod (c$, "moveToBack", 
24280 function (c) {
24281 this.setPosition (c, -1);
24282 }, "java.awt.Component");
24283 Clazz_defineMethod (c$, "setPosition", 
24284 function (c, position) {
24285 this.setLayer (c, this.getLayer (c), position);
24286 }, "java.awt.Component,~N");
24287 Clazz_defineMethod (c$, "getPosition", 
24288 function (c) {
24289 var i;
24290 var count;
24291 var startLayer;
24292 var curLayer;
24293 var startLocation;
24294 var pos = 0;
24295 count = this.getComponentCount ();
24296 startLocation = this.getIndexOf (c);
24297 if (startLocation == -1) return -1;
24298 startLayer = this.getLayer (c);
24299 for (i = startLocation - 1; i >= 0; i--) {
24300 curLayer = this.getLayer (this.getComponent (i));
24301 if (curLayer == startLayer) pos++;
24302  else return pos;
24303 }
24304 return pos;
24305 }, "java.awt.Component");
24306 Clazz_defineMethod (c$, "highestLayer", 
24307 function () {
24308 if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0));
24309 return 0;
24310 });
24311 Clazz_defineMethod (c$, "lowestLayer", 
24312 function () {
24313 var count = this.getComponentCount ();
24314 if (count > 0) return this.getLayer (this.getComponent (count - 1));
24315 return 0;
24316 });
24317 Clazz_defineMethod (c$, "getComponentCountInLayer", 
24318 function (layer) {
24319 var i;
24320 var count;
24321 var curLayer;
24322 var layerCount = 0;
24323 count = this.getComponentCount ();
24324 for (i = 0; i < count; i++) {
24325 curLayer = this.getLayer (this.getComponent (i));
24326 if (curLayer == layer) {
24327 layerCount++;
24328 } else if (layerCount > 0 || curLayer < layer) {
24329 break;
24330 }}
24331 return layerCount;
24332 }, "~N");
24333 Clazz_defineMethod (c$, "getComponentsInLayer", 
24334 function (layer) {
24335 var i;
24336 var count;
24337 var curLayer;
24338 var layerCount = 0;
24339 var results;
24340 results =  new Array (this.getComponentCountInLayer (layer));
24341 count = this.getComponentCount ();
24342 for (i = 0; i < count; i++) {
24343 curLayer = this.getLayer (this.getComponent (i));
24344 if (curLayer == layer) {
24345 results[layerCount++] = this.getComponent (i);
24346 } else if (layerCount > 0 || curLayer < layer) {
24347 break;
24348 }}
24349 return results;
24350 }, "~N");
24351 Clazz_defineMethod (c$, "paint", 
24352 function (g) {
24353 if (this.isOpaque ()) {
24354 var r = g.getClipBounds ();
24355 var c = this.getBackground ();
24356 if (c == null) c = java.awt.Color.lightGray;
24357 g.setColor (c);
24358 if (r != null) {
24359 g.fillRect (r.x, r.y, r.width, r.height);
24360 } else {
24361 g.fillRect (0, 0, this.getWidth (), this.getHeight ());
24362 }}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]);
24363 }, "java.awt.Graphics");
24364 Clazz_defineMethod (c$, "getComponentToLayer", 
24365 function () {
24366 if (this.componentToLayer == null) this.componentToLayer =  new java.util.Hashtable (4);
24367 return this.componentToLayer;
24368 });
24369 Clazz_defineMethod (c$, "getObjectForLayer", 
24370 function (layer) {
24371 var layerObj;
24372 switch (layer) {
24373 case 0:
24374 layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER;
24375 break;
24376 case 100:
24377 layerObj = javax.swing.JLayeredPane.PALETTE_LAYER;
24378 break;
24379 case 200:
24380 layerObj = javax.swing.JLayeredPane.MODAL_LAYER;
24381 break;
24382 case 300:
24383 layerObj = javax.swing.JLayeredPane.POPUP_LAYER;
24384 break;
24385 case 400:
24386 layerObj = javax.swing.JLayeredPane.DRAG_LAYER;
24387 break;
24388 default:
24389 layerObj =  new Integer (layer);
24390 }
24391 return layerObj;
24392 }, "~N");
24393 Clazz_defineMethod (c$, "insertIndexForLayer", 
24394 function (layer, position) {
24395 return this.insertIndexForLayer (null, layer, position);
24396 }, "~N,~N");
24397 Clazz_defineMethod (c$, "insertIndexForLayer", 
24398  function (comp, layer, position) {
24399 var i;
24400 var count;
24401 var curLayer;
24402 var layerStart = -1;
24403 var layerEnd = -1;
24404 var componentCount = this.getComponentCount ();
24405 var compList =  new java.util.ArrayList (componentCount);
24406 for (var index = 0; index < componentCount; index++) {
24407 if (this.getComponent (index) !== comp) {
24408 compList.add (this.getComponent (index));
24409 }}
24410 count = compList.size ();
24411 for (i = 0; i < count; i++) {
24412 curLayer = this.getLayer (compList.get (i));
24413 if (layerStart == -1 && curLayer == layer) {
24414 layerStart = i;
24415 }if (curLayer < layer) {
24416 if (i == 0) {
24417 layerStart = 0;
24418 layerEnd = 0;
24419 } else {
24420 layerEnd = i;
24421 }break;
24422 }}
24423 if (layerStart == -1 && layerEnd == -1) return count;
24424 if (layerStart != -1 && layerEnd == -1) layerEnd = count;
24425 if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd;
24426 if (position == -1) return layerEnd;
24427 if (position > -1 && layerStart + position <= layerEnd) return layerStart + position;
24428 return layerEnd;
24429 }, "java.awt.Component,~N,~N");
24430 Clazz_defineMethod (c$, "paramString", 
24431 function () {
24432 var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false");
24433 return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString;
24434 });
24435 c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER =  new Integer (0);
24436 c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER =  new Integer (100);
24437 c$.MODAL_LAYER = c$.prototype.MODAL_LAYER =  new Integer (200);
24438 c$.POPUP_LAYER = c$.prototype.POPUP_LAYER =  new Integer (300);
24439 c$.DRAG_LAYER = c$.prototype.DRAG_LAYER =  new Integer (400);
24440 c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER =  new Integer (-30000);
24441 Clazz_defineStatics (c$,
24442 "LAYER_PROPERTY", "layeredContainerLayer");
24443 });
24444 Clazz_declarePackage ("javax.swing");
24445 Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () {
24446 c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent);
24447 Clazz_makeConstructor (c$, 
24448 function (layout, isDoubleBuffered) {
24449 Clazz_superConstructor (this, javax.swing.JPanel, []);
24450 this.setLayout (layout);
24451 this.setUIProperty ("opaque", Boolean.TRUE);
24452 this.updateUI ();
24453 }, "java.awt.LayoutManager,~B");
24454 Clazz_makeConstructor (c$, 
24455 function (layout) {
24456 this.construct (layout, true);
24457 }, "java.awt.LayoutManager");
24458 Clazz_makeConstructor (c$, 
24459 function (isDoubleBuffered) {
24460 this.construct ( new java.awt.FlowLayout (), isDoubleBuffered);
24461 }, "~B");
24462 Clazz_makeConstructor (c$, 
24463 function () {
24464 this.construct (true);
24465 });
24466 Clazz_overrideMethod (c$, "updateUI", 
24467 function () {
24468 this.setUI (javax.swing.UIManager.getUI (this));
24469 });
24470 Clazz_overrideMethod (c$, "getUI", 
24471 function () {
24472 return this.ui;
24473 });
24474 Clazz_overrideMethod (c$, "getUIClassID", 
24475 function () {
24476 return "PanelUI";
24477 });
24478 Clazz_defineStatics (c$,
24479 "$uiClassID", "PanelUI");
24480 });
24481 Clazz_declarePackage ("javax.swing");
24482 Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () {
24483 c$ = Clazz_decorateAsClass (function () {
24484 this.tables = null;
24485 Clazz_instantialize (this, arguments);
24486 }, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults);
24487 Clazz_makeConstructor (c$, 
24488 function (defaults) {
24489 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24490 this.tables = defaults;
24491 }, "~A");
24492 Clazz_makeConstructor (c$, 
24493 function () {
24494 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24495 this.tables =  new Array (0);
24496 });
24497 Clazz_defineMethod (c$, "get", 
24498 function (key) {
24499 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]);
24500 if (value != null) {
24501 return value;
24502 }for (var i = 0; i < this.tables.length; i++) {
24503 var table = this.tables[i];
24504 value = (table != null) ? table.get (key) : null;
24505 if (value != null) {
24506 return value;
24507 }}
24508 return null;
24509 }, "~O");
24510 Clazz_defineMethod (c$, "get", 
24511 function (key, l) {
24512 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]);
24513 if (value != null) {
24514 return value;
24515 }for (var i = 0; i < this.tables.length; i++) {
24516 var table = this.tables[i];
24517 value = (table != null) ? table.get (key, l) : null;
24518 if (value != null) {
24519 return value;
24520 }}
24521 return null;
24522 }, "~O,java.util.Locale");
24523 Clazz_overrideMethod (c$, "size", 
24524 function () {
24525 return this.entrySet ().size ();
24526 });
24527 Clazz_overrideMethod (c$, "isEmpty", 
24528 function () {
24529 return this.size () == 0;
24530 });
24531 Clazz_overrideMethod (c$, "keys", 
24532 function () {
24533 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ());
24534 });
24535 Clazz_overrideMethod (c$, "elements", 
24536 function () {
24537 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ());
24538 });
24539 Clazz_defineMethod (c$, "entrySet", 
24540 function () {
24541 var set =  new java.util.HashSet ();
24542 for (var i = this.tables.length - 1; i >= 0; i--) {
24543 if (this.tables[i] != null) {
24544 set.addAll (this.tables[i].entrySet ());
24545 }}
24546 set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", []));
24547 return set;
24548 });
24549 Clazz_defineMethod (c$, "getUIError", 
24550 function (msg) {
24551 if (this.tables.length > 0) {
24552 this.tables[0].getUIError (msg);
24553 } else {
24554 Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]);
24555 }}, "~S");
24556 Clazz_defineMethod (c$, "remove", 
24557 function (key) {
24558 var value = null;
24559 for (var i = this.tables.length - 1; i >= 0; i--) {
24560 if (this.tables[i] != null) {
24561 var v = this.tables[i].remove (key);
24562 if (v != null) {
24563 value = v;
24564 }}}
24565 var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]);
24566 if (v != null) {
24567 value = v;
24568 }return value;
24569 }, "~O");
24570 Clazz_defineMethod (c$, "clear", 
24571 function () {
24572 Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []);
24573 for (var i = 0; i < this.tables.length; i++) {
24574 var table = this.tables[i];
24575 if (table != null) {
24576 table.clear ();
24577 }}
24578 });
24579 Clazz_overrideMethod (c$, "toString", 
24580 function () {
24581 var buf =  new StringBuffer ();
24582 buf.append ("{");
24583 var keys = this.keys ();
24584 while (keys.hasMoreElements ()) {
24585 var key = keys.nextElement ();
24586 buf.append (key + "=" + this.get (key) + ", ");
24587 }
24588 var length = buf.length ();
24589 if (length > 1) {
24590 buf.$delete (length - 2, length);
24591 }buf.append ("}");
24592 return buf.toString ();
24593 });
24594 Clazz_pu$h(self.c$);
24595 c$ = Clazz_decorateAsClass (function () {
24596 this.iterator = null;
24597 this.type = null;
24598 Clazz_instantialize (this, arguments);
24599 }, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration);
24600 Clazz_makeConstructor (c$, 
24601 function (a, b) {
24602 this.type = a;
24603 this.iterator = b.iterator ();
24604 }, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set");
24605 Clazz_overrideMethod (c$, "hasMoreElements", 
24606 function () {
24607 return this.iterator.hasNext ();
24608 });
24609 Clazz_overrideMethod (c$, "nextElement", 
24610 function () {
24611 switch (this.type) {
24612 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS:
24613 return this.iterator.next ().getKey ();
24614 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS:
24615 return this.iterator.next ().getValue ();
24616 default:
24617 return null;
24618 }
24619 });
24620 Clazz_pu$h(self.c$);
24621 c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum);
24622 Clazz_defineEnumConstant (c$, "KEYS", 0, []);
24623 Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []);
24624 c$ = Clazz_p0p ();
24625 c$ = Clazz_p0p ();
24626 });
24627 Clazz_declarePackage ("java.awt");
24628 Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () {
24629 c$ = Clazz_decorateAsClass (function () {
24630 this.fm = null;
24631 this.family = null;
24632 this.name = null;
24633 this.style = 0;
24634 this.size = 0;
24635 this.pointSize = 0;
24636 this.$hasLayoutAttributes = false;
24637 this.nonIdentityTx = false;
24638 this.hash = 0;
24639 Clazz_instantialize (this, arguments);
24640 }, java.awt, "Font");
24641 Clazz_defineMethod (c$, "getFontMetrics", 
24642 function () {
24643 return this.fm;
24644 });
24645 Clazz_defineMethod (c$, "setFontMetrics", 
24646 function (fm) {
24647 this.fm = fm;
24648 }, "java.awt.FontMetrics");
24649 Clazz_makeConstructor (c$, 
24650 function (name, style, size) {
24651 this.name = (name != null) ? name : "Default";
24652 this.style = (style & -4) == 0 ? style : 0;
24653 this.size = size;
24654 this.pointSize = size;
24655 }, "~S,~N,~N");
24656 Clazz_makeConstructor (c$, 
24657 function (font) {
24658 this.name = font.name;
24659 this.style = font.style;
24660 this.size = font.size;
24661 this.pointSize = font.pointSize;
24662 }, "java.awt.Font");
24663 Clazz_defineMethod (c$, "getTransform", 
24664 function () {
24665 return  new java.awt.geom.AffineTransform ();
24666 });
24667 Clazz_defineMethod (c$, "getFamily", 
24668 function () {
24669 return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family);
24670 });
24671 Clazz_defineMethod (c$, "getName", 
24672 function () {
24673 return this.name;
24674 });
24675 Clazz_defineMethod (c$, "getFontName", 
24676 function () {
24677 return this.name;
24678 });
24679 Clazz_defineMethod (c$, "getStyle", 
24680 function () {
24681 return this.style;
24682 });
24683 Clazz_defineMethod (c$, "getSize", 
24684 function () {
24685 return this.size;
24686 });
24687 Clazz_defineMethod (c$, "getSize2D", 
24688 function () {
24689 return this.pointSize;
24690 });
24691 Clazz_defineMethod (c$, "isPlain", 
24692 function () {
24693 return this.style == 0;
24694 });
24695 Clazz_defineMethod (c$, "isBold", 
24696 function () {
24697 return (this.style & 1) != 0;
24698 });
24699 Clazz_defineMethod (c$, "isItalic", 
24700 function () {
24701 return (this.style & 2) != 0;
24702 });
24703 Clazz_defineMethod (c$, "isTransformed", 
24704 function () {
24705 return this.nonIdentityTx;
24706 });
24707 Clazz_defineMethod (c$, "hasLayoutAttributes", 
24708 function () {
24709 return this.$hasLayoutAttributes;
24710 });
24711 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24712 function (nm) {
24713 return java.awt.Font.getFont (nm, null);
24714 }, "~S");
24715 c$.decode = Clazz_defineMethod (c$, "decode", 
24716 function (str) {
24717 var fontName = str;
24718 var styleName = "";
24719 var fontSize = 12;
24720 var fontStyle = 0;
24721 if (str == null) {
24722 return  new java.awt.Font ("Dialog", fontStyle, fontSize);
24723 }var lastHyphen = str.lastIndexOf ('-');
24724 var lastSpace = str.lastIndexOf (' ');
24725 var sepChar = (lastHyphen > lastSpace) ? '-' : ' ';
24726 var sizeIndex = str.lastIndexOf (sepChar);
24727 var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1);
24728 var strlen = str.length;
24729 if (sizeIndex > 0 && sizeIndex + 1 < strlen) {
24730 try {
24731 fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue ();
24732 if (fontSize <= 0) {
24733 fontSize = 12;
24734 }} catch (e) {
24735 if (Clazz_exceptionOf (e, NumberFormatException)) {
24736 styleIndex = sizeIndex;
24737 sizeIndex = strlen;
24738 if (str.charAt (sizeIndex - 1) == sepChar) {
24739 sizeIndex--;
24740 }} else {
24741 throw e;
24742 }
24743 }
24744 }if (styleIndex >= 0 && styleIndex + 1 < strlen) {
24745 styleName = str.substring (styleIndex + 1, sizeIndex);
24746 styleName = styleName.toLowerCase ();
24747 if (styleName.equals ("bolditalic")) {
24748 fontStyle = 3;
24749 } else if (styleName.equals ("italic")) {
24750 fontStyle = 2;
24751 } else if (styleName.equals ("bold")) {
24752 fontStyle = 1;
24753 } else if (styleName.equals ("plain")) {
24754 fontStyle = 0;
24755 } else {
24756 styleIndex = sizeIndex;
24757 if (str.charAt (styleIndex - 1) == sepChar) {
24758 styleIndex--;
24759 }}fontName = str.substring (0, styleIndex);
24760 } else {
24761 var fontEnd = strlen;
24762 if (styleIndex > 0) {
24763 fontEnd = styleIndex;
24764 } else if (sizeIndex > 0) {
24765 fontEnd = sizeIndex;
24766 }if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) {
24767 fontEnd--;
24768 }fontName = str.substring (0, fontEnd);
24769 }return  new java.awt.Font (fontName, fontStyle, fontSize);
24770 }, "~S");
24771 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24772 function (nm, font) {
24773 var str = null;
24774 try {
24775 str = System.getProperty (nm);
24776 } catch (e) {
24777 if (Clazz_exceptionOf (e, SecurityException)) {
24778 } else {
24779 throw e;
24780 }
24781 }
24782 if (str == null) {
24783 return font;
24784 }return java.awt.Font.decode (str);
24785 }, "~S,java.awt.Font");
24786 Clazz_overrideMethod (c$, "hashCode", 
24787 function () {
24788 if (this.hash == 0) {
24789 this.hash = this.name.hashCode () ^ this.style ^ this.size;
24790 }return this.hash;
24791 });
24792 Clazz_overrideMethod (c$, "equals", 
24793 function (obj) {
24794 if (obj === this) {
24795 return true;
24796 }if (obj != null) {
24797 try {
24798 var font = obj;
24799 if (this.size == font.size && this.style == font.style && this.nonIdentityTx == font.nonIdentityTx && this.$hasLayoutAttributes == font.$hasLayoutAttributes && this.pointSize == font.pointSize && this.name.equals (font.name)) {
24800 return true;
24801 }} catch (e) {
24802 if (Clazz_exceptionOf (e, ClassCastException)) {
24803 } else {
24804 throw e;
24805 }
24806 }
24807 }return false;
24808 }, "~O");
24809 Clazz_overrideMethod (c$, "toString", 
24810 function () {
24811 var strStyle;
24812 if (this.isBold ()) {
24813 strStyle = this.isItalic () ? "bolditalic" : "bold";
24814 } else {
24815 strStyle = this.isItalic () ? "italic" : "plain";
24816 }return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]";
24817 });
24818 Clazz_defineMethod (c$, "getAvailableAttributes", 
24819 function () {
24820 var attributes =  Clazz_newArray (-1, [java.awt.font.TextAttribute.FAMILY, java.awt.font.TextAttribute.WEIGHT, java.awt.font.TextAttribute.WIDTH, java.awt.font.TextAttribute.SIZE, java.awt.font.TextAttribute.UNDERLINE, java.awt.font.TextAttribute.STRIKETHROUGH]);
24821 return attributes;
24822 });
24823 Clazz_defineMethod (c$, "deriveFont", 
24824 function (style, sizePts) {
24825 var f =  new java.awt.Font (this.name, style, Clazz_doubleToInt (sizePts + 0.5));
24826 f.pointSize = sizePts;
24827 return f;
24828 }, "~N,~N");
24829 Clazz_defineMethod (c$, "deriveFont", 
24830 function (sizePts) {
24831 var f =  new java.awt.Font (this.name, this.style, Clazz_doubleToInt (sizePts + 0.5));
24832 f.pointSize = sizePts;
24833 return f;
24834 }, "~N");
24835 Clazz_defineMethod (c$, "deriveFont", 
24836 function (style) {
24837 return  new java.awt.Font (this.name, style, this.size);
24838 }, "~N");
24839 Clazz_defineMethod (c$, "hasUniformLineMetrics", 
24840 function () {
24841 return false;
24842 });
24843 Clazz_overrideMethod (c$, "finalize", 
24844 function () {
24845 });
24846 Clazz_defineStatics (c$,
24847 "DIALOG", "Dialog",
24848 "DIALOG_INPUT", "DialogInput",
24849 "SANS_SERIF", "SansSerif",
24850 "SERIF", "Serif",
24851 "MONOSPACED", "Monospaced",
24852 "PLAIN", 0,
24853 "BOLD", 1,
24854 "ITALIC", 2,
24855 "ROMAN_BASELINE", 0,
24856 "CENTER_BASELINE", 1,
24857 "HANGING_BASELINE", 2,
24858 "TRUETYPE_FONT", 0,
24859 "TYPE1_FONT", 1,
24860 "LAYOUT_LEFT_TO_RIGHT", 0,
24861 "LAYOUT_RIGHT_TO_LEFT", 1,
24862 "LAYOUT_NO_START_CONTEXT", 2,
24863 "LAYOUT_NO_LIMIT_CONTEXT", 4);
24864 });
24865 Clazz_declarePackage ("java.awt.font");
24866 Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () {
24867 c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute);
24868 Clazz_makeConstructor (c$, 
24869 function (name) {
24870 Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]);
24871 if (this.getClass () === java.awt.font.TextAttribute) {
24872 java.awt.font.TextAttribute.$instanceMap.put (name, this);
24873 }}, "~S");
24874 Clazz_overrideMethod (c$, "readResolve", 
24875 function () {
24876 if (this.getClass () !== java.awt.font.TextAttribute) {
24877 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24878 }var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ());
24879 if (instance != null) {
24880 return instance;
24881 } else {
24882 throw  new java.io.InvalidObjectException ("unknown attribute name");
24883 }});
24884 c$.$instanceMap = c$.prototype.$instanceMap =  new java.util.HashMap (29);
24885 c$.FAMILY = c$.prototype.FAMILY =  new java.awt.font.TextAttribute ("family");
24886 c$.WEIGHT = c$.prototype.WEIGHT =  new java.awt.font.TextAttribute ("weight");
24887 c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5);
24888 c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75);
24889 c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875);
24890 c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0);
24891 c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25);
24892 c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5);
24893 c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75);
24894 c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0);
24895 c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25);
24896 c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5);
24897 c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75);
24898 c$.WIDTH = c$.prototype.WIDTH =  new java.awt.font.TextAttribute ("width");
24899 c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75);
24900 c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875);
24901 c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0);
24902 c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25);
24903 c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5);
24904 c$.POSTURE = c$.prototype.POSTURE =  new java.awt.font.TextAttribute ("posture");
24905 c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0);
24906 c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20);
24907 c$.SIZE = c$.prototype.SIZE =  new java.awt.font.TextAttribute ("size");
24908 c$.TRANSFORM = c$.prototype.TRANSFORM =  new java.awt.font.TextAttribute ("transform");
24909 c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT =  new java.awt.font.TextAttribute ("superscript");
24910 c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1);
24911 c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1);
24912 c$.FONT = c$.prototype.FONT =  new java.awt.font.TextAttribute ("font");
24913 c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT =  new java.awt.font.TextAttribute ("char_replacement");
24914 c$.FOREGROUND = c$.prototype.FOREGROUND =  new java.awt.font.TextAttribute ("foreground");
24915 c$.BACKGROUND = c$.prototype.BACKGROUND =  new java.awt.font.TextAttribute ("background");
24916 c$.UNDERLINE = c$.prototype.UNDERLINE =  new java.awt.font.TextAttribute ("underline");
24917 c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0);
24918 c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH =  new java.awt.font.TextAttribute ("strikethrough");
24919 c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE;
24920 c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION =  new java.awt.font.TextAttribute ("run_direction");
24921 c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE;
24922 c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE;
24923 c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING =  new java.awt.font.TextAttribute ("bidi_embedding");
24924 c$.JUSTIFICATION = c$.prototype.JUSTIFICATION =  new java.awt.font.TextAttribute ("justification");
24925 c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0);
24926 c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0);
24927 c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT =  new java.awt.font.TextAttribute ("input method highlight");
24928 c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE =  new java.awt.font.TextAttribute ("input method underline");
24929 c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1);
24930 c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2);
24931 c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3);
24932 c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4);
24933 c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5);
24934 c$.SWAP_COLORS = c$.prototype.SWAP_COLORS =  new java.awt.font.TextAttribute ("swap_colors");
24935 c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE;
24936 c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING =  new java.awt.font.TextAttribute ("numeric_shaping");
24937 c$.KERNING = c$.prototype.KERNING =  new java.awt.font.TextAttribute ("kerning");
24938 c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1);
24939 c$.LIGATURES = c$.prototype.LIGATURES =  new java.awt.font.TextAttribute ("ligatures");
24940 c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1);
24941 c$.TRACKING = c$.prototype.TRACKING =  new java.awt.font.TextAttribute ("tracking");
24942 c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04);
24943 c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04);
24944 });
24945 Clazz_declarePackage ("java.text");
24946 Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () {
24947 Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator);
24948 Clazz_pu$h(self.c$);
24949 c$ = Clazz_decorateAsClass (function () {
24950 this.name = null;
24951 Clazz_instantialize (this, arguments);
24952 }, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable);
24953 Clazz_makeConstructor (c$, 
24954 function (a) {
24955 this.name = a;
24956 if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) {
24957 java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this);
24958 }}, "~S");
24959 Clazz_overrideMethod (c$, "toString", 
24960 function () {
24961 return this.getClass ().getName () + "(" + this.name + ")";
24962 });
24963 Clazz_defineMethod (c$, "getName", 
24964 function () {
24965 return this.name;
24966 });
24967 Clazz_defineMethod (c$, "readResolve", 
24968 function () {
24969 if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) {
24970 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24971 }var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ());
24972 if (a != null) {
24973 return a;
24974 } else {
24975 throw  new java.io.InvalidObjectException ("unknown attribute name");
24976 }});
24977 c$.instanceMap = c$.prototype.instanceMap =  new java.util.HashMap (7);
24978 c$.LANGUAGE = c$.prototype.LANGUAGE =  new java.text.AttributedCharacterIterator.Attribute ("language");
24979 c$.READING = c$.prototype.READING =  new java.text.AttributedCharacterIterator.Attribute ("reading");
24980 c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT =  new java.text.AttributedCharacterIterator.Attribute ("input_method_segment");
24981 c$ = Clazz_p0p ();
24982 });
24983 Clazz_declarePackage ("java.text");
24984 c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable);
24985 Clazz_defineStatics (c$,
24986 "DONE", '\uFFFF');
24987 Clazz_declarePackage ("java.awt.geom");
24988 Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () {
24989 c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable);
24990 Clazz_makeConstructor (c$, 
24991 function () {
24992 });
24993 Clazz_defineMethod (c$, "setLocation", 
24994 function (p) {
24995 this.setLocation (p.getX (), p.getY ());
24996 }, "java.awt.geom.Point2D");
24997 c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", 
24998 function (x1, y1, x2, y2) {
24999 x1 -= x2;
25000 y1 -= y2;
25001 return (x1 * x1 + y1 * y1);
25002 }, "~N,~N,~N,~N");
25003 c$.distance = Clazz_defineMethod (c$, "distance", 
25004 function (x1, y1, x2, y2) {
25005 x1 -= x2;
25006 y1 -= y2;
25007 return Math.sqrt (x1 * x1 + y1 * y1);
25008 }, "~N,~N,~N,~N");
25009 Clazz_defineMethod (c$, "distanceSq", 
25010 function (px, py) {
25011 px -= this.getX ();
25012 py -= this.getY ();
25013 return (px * px + py * py);
25014 }, "~N,~N");
25015 Clazz_defineMethod (c$, "distanceSq", 
25016 function (pt) {
25017 var px = pt.getX () - this.getX ();
25018 var py = pt.getY () - this.getY ();
25019 return (px * px + py * py);
25020 }, "java.awt.geom.Point2D");
25021 Clazz_defineMethod (c$, "distance", 
25022 function (px, py) {
25023 px -= this.getX ();
25024 py -= this.getY ();
25025 return Math.sqrt (px * px + py * py);
25026 }, "~N,~N");
25027 Clazz_defineMethod (c$, "distance", 
25028 function (pt) {
25029 var px = pt.getX () - this.getX ();
25030 var py = pt.getY () - this.getY ();
25031 return Math.sqrt (px * px + py * py);
25032 }, "java.awt.geom.Point2D");
25033 Clazz_defineMethod (c$, "clone", 
25034 function () {
25035 try {
25036 return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []);
25037 } catch (e) {
25038 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
25039 throw  new InternalError ();
25040 } else {
25041 throw e;
25042 }
25043 }
25044 });
25045 Clazz_overrideMethod (c$, "hashCode", 
25046 function () {
25047 var bits = java.lang.Double.doubleToLongBits (this.getX ());
25048 bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31;
25049 return ((bits) ^ ((bits >> 32)));
25050 });
25051 Clazz_defineMethod (c$, "equals", 
25052 function (obj) {
25053 if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) {
25054 var p2d = obj;
25055 return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ());
25056 }return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]);
25057 }, "~O");
25058 Clazz_pu$h(self.c$);
25059 c$ = Clazz_decorateAsClass (function () {
25060 this.x = 0;
25061 this.y = 0;
25062 Clazz_instantialize (this, arguments);
25063 }, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D);
25064 Clazz_makeConstructor (c$, 
25065 function () {
25066 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
25067 });
25068 Clazz_makeConstructor (c$, 
25069 function (a, b) {
25070 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
25071 this.x = a;
25072 this.y = b;
25073 }, "~N,~N");
25074 Clazz_overrideMethod (c$, "getX", 
25075 function () {
25076 return this.x;
25077 });
25078 Clazz_overrideMethod (c$, "getY", 
25079 function () {
25080 return this.y;
25081 });
25082 Clazz_defineMethod (c$, "setLocation", 
25083 function (a, b) {
25084 this.x = a;
25085 this.y = b;
25086 }, "~N,~N");
25087 Clazz_defineMethod (c$, "setLocation", 
25088 function (a, b) {
25089 this.x = a;
25090 this.y = b;
25091 }, "~N,~N");
25092 Clazz_overrideMethod (c$, "toString", 
25093 function () {
25094 return "Point2D.Float[" + this.x + ", " + this.y + "]";
25095 });
25096 c$ = Clazz_p0p ();
25097 Clazz_pu$h(self.c$);
25098 c$ = Clazz_decorateAsClass (function () {
25099 this.x = 0;
25100 this.y = 0;
25101 Clazz_instantialize (this, arguments);
25102 }, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D);
25103 Clazz_makeConstructor (c$, 
25104 function () {
25105 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25106 });
25107 Clazz_makeConstructor (c$, 
25108 function (a, b) {
25109 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25110 this.x = a;
25111 this.y = b;
25112 }, "~N,~N");
25113 Clazz_overrideMethod (c$, "getX", 
25114 function () {
25115 return this.x;
25116 });
25117 Clazz_overrideMethod (c$, "getY", 
25118 function () {
25119 return this.y;
25120 });
25121 Clazz_defineMethod (c$, "setLocation", 
25122 function (a, b) {
25123 this.x = a;
25124 this.y = b;
25125 }, "~N,~N");
25126 Clazz_overrideMethod (c$, "toString", 
25127 function () {
25128 return "Point2D.Double[" + this.x + ", " + this.y + "]";
25129 });
25130 c$ = Clazz_p0p ();
25131 });
25132 Clazz_declarePackage ("java.awt.geom");
25133 Clazz_load (null, "java.awt.geom.AffineTransform", ["java.lang.Double", "$.InternalError", "JU.AU", "java.awt.geom.NoninvertibleTransformException", "$.Path2D", "$.Point2D", "java.awt.geom.Point2D.Double"], function () {
25134 c$ = Clazz_decorateAsClass (function () {
25135 this.m00 = 0;
25136 this.m10 = 0;
25137 this.m01 = 0;
25138 this.m11 = 0;
25139 this.m02 = 0;
25140 this.m12 = 0;
25141 this.state = 0;
25142 this.type = 0;
25143 Clazz_instantialize (this, arguments);
25144 }, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]);
25145 Clazz_makeConstructor (c$, 
25146  function (m00, m10, m01, m11, m02, m12, state) {
25147 {
25148 switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0;
25149 return;
25150 case 1:
25151 if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) {
25152 var Tx = m00; this.m00 =
25153 Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 =
25154 Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state =
25155 Tx.state; this.type = Tx.type;
25156 } else {
25157 var flatmatrix = m00;
25158 this.m00 = flatmatrix[0];
25159 this.m10 = flatmatrix[1];
25160 this.m01 = flatmatrix[2];
25161 this.m11 = flatmatrix[3];
25162 if (flatmatrix.length > 5) {
25163 this.m02 = flatmatrix[4];
25164 this.m12 = flatmatrix[5];
25165 }
25166 this.updateState();
25167 }
25168 return;
25169 case 6:
25170 this.m00 = m00;
25171 this.m10 = m10;
25172 this.m01 = m01;
25173 this.m11 = m11;
25174 this.m02 = m02;
25175 this.m12 = m12;
25176 this.updateState();
25177 return;
25178 }
25179 }this.m00 = m00;
25180 this.m10 = m10;
25181 this.m01 = m01;
25182 this.m11 = m11;
25183 this.m02 = m02;
25184 this.m12 = m12;
25185 this.state = state;
25186 this.type = -1;
25187 }, "~N,~N,~N,~N,~N,~N,~N");
25188 c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", 
25189 function (tx, ty) {
25190 var Tx =  new java.awt.geom.AffineTransform ();
25191 Tx.setToTranslation (tx, ty);
25192 return Tx;
25193 }, "~N,~N");
25194 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25195 function (theta) {
25196 var Tx =  new java.awt.geom.AffineTransform ();
25197 Tx.setToRotation (theta);
25198 return Tx;
25199 }, "~N");
25200 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25201 function (theta, anchorx, anchory) {
25202 var Tx =  new java.awt.geom.AffineTransform ();
25203 Tx.setToRotation (theta, anchorx, anchory);
25204 return Tx;
25205 }, "~N,~N,~N");
25206 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25207 function (vecx, vecy) {
25208 var Tx =  new java.awt.geom.AffineTransform ();
25209 Tx.setToRotation (vecx, vecy);
25210 return Tx;
25211 }, "~N,~N");
25212 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25213 function (vecx, vecy, anchorx, anchory) {
25214 var Tx =  new java.awt.geom.AffineTransform ();
25215 Tx.setToRotation (vecx, vecy, anchorx, anchory);
25216 return Tx;
25217 }, "~N,~N,~N,~N");
25218 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25219 function (numquadrants) {
25220 var Tx =  new java.awt.geom.AffineTransform ();
25221 Tx.setToQuadrantRotation (numquadrants);
25222 return Tx;
25223 }, "~N");
25224 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25225 function (numquadrants, anchorx, anchory) {
25226 var Tx =  new java.awt.geom.AffineTransform ();
25227 Tx.setToQuadrantRotation (numquadrants, anchorx, anchory);
25228 return Tx;
25229 }, "~N,~N,~N");
25230 c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", 
25231 function (sx, sy) {
25232 var Tx =  new java.awt.geom.AffineTransform ();
25233 Tx.setToScale (sx, sy);
25234 return Tx;
25235 }, "~N,~N");
25236 c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", 
25237 function (shx, shy) {
25238 var Tx =  new java.awt.geom.AffineTransform ();
25239 Tx.setToShear (shx, shy);
25240 return Tx;
25241 }, "~N,~N");
25242 Clazz_defineMethod (c$, "getType", 
25243 function () {
25244 if (this.type == -1) {
25245 this.calculateType ();
25246 }return this.type;
25247 });
25248 Clazz_defineMethod (c$, "calculateType", 
25249  function () {
25250 var ret = 0;
25251 var sgn0;
25252 var sgn1;
25253 var M0;
25254 var M1;
25255 var M2;
25256 var M3;
25257 this.updateState ();
25258 switch (this.state) {
25259 default:
25260 this.stateError ();
25261 case (7):
25262 ret = 1;
25263 case (6):
25264 if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) {
25265 this.type = 32;
25266 return;
25267 }sgn0 = (M0 >= 0.0);
25268 sgn1 = (M1 >= 0.0);
25269 if (sgn0 == sgn1) {
25270 if (M0 != M1 || M2 != -M3) {
25271 ret |= (20);
25272 } else if (M0 * M1 - M2 * M3 != 1.0) {
25273 ret |= (18);
25274 } else {
25275 ret |= 16;
25276 }} else {
25277 if (M0 != -M1 || M2 != M3) {
25278 ret |= (84);
25279 } else if (M0 * M1 - M2 * M3 != 1.0) {
25280 ret |= (82);
25281 } else {
25282 ret |= (80);
25283 }}break;
25284 case (5):
25285 ret = 1;
25286 case (4):
25287 sgn0 = ((M0 = this.m01) >= 0.0);
25288 sgn1 = ((M1 = this.m10) >= 0.0);
25289 if (sgn0 != sgn1) {
25290 if (M0 != -M1) {
25291 ret |= (12);
25292 } else if (M0 != 1.0 && M0 != -1.0) {
25293 ret |= (10);
25294 } else {
25295 ret |= 8;
25296 }} else {
25297 if (M0 == M1) {
25298 ret |= (74);
25299 } else {
25300 ret |= (76);
25301 }}break;
25302 case (3):
25303 ret = 1;
25304 case (2):
25305 sgn0 = ((M0 = this.m00) >= 0.0);
25306 sgn1 = ((M1 = this.m11) >= 0.0);
25307 if (sgn0 == sgn1) {
25308 if (sgn0) {
25309 if (M0 == M1) {
25310 ret |= 2;
25311 } else {
25312 ret |= 4;
25313 }} else {
25314 if (M0 != M1) {
25315 ret |= (12);
25316 } else if (M0 != -1.0) {
25317 ret |= (10);
25318 } else {
25319 ret |= 8;
25320 }}} else {
25321 if (M0 == -M1) {
25322 if (M0 == 1.0 || M0 == -1.0) {
25323 ret |= 64;
25324 } else {
25325 ret |= (66);
25326 }} else {
25327 ret |= (68);
25328 }}break;
25329 case (1):
25330 ret = 1;
25331 break;
25332 case (0):
25333 break;
25334 }
25335 this.type = ret;
25336 });
25337 Clazz_defineMethod (c$, "getDeterminant", 
25338 function () {
25339 switch (this.state) {
25340 default:
25341 this.stateError ();
25342 case (7):
25343 case (6):
25344 return this.m00 * this.m11 - this.m01 * this.m10;
25345 case (5):
25346 case (4):
25347 return -(this.m01 * this.m10);
25348 case (3):
25349 case (2):
25350 return this.m00 * this.m11;
25351 case (1):
25352 case (0):
25353 return 1.0;
25354 }
25355 });
25356 Clazz_defineMethod (c$, "updateState", 
25357 function () {
25358 if (this.m01 == 0.0 && this.m10 == 0.0) {
25359 if (this.m00 == 1.0 && this.m11 == 1.0) {
25360 if (this.m02 == 0.0 && this.m12 == 0.0) {
25361 this.state = 0;
25362 this.type = 0;
25363 } else {
25364 this.state = 1;
25365 this.type = 1;
25366 }} else {
25367 if (this.m02 == 0.0 && this.m12 == 0.0) {
25368 this.state = 2;
25369 this.type = -1;
25370 } else {
25371 this.state = (3);
25372 this.type = -1;
25373 }}} else {
25374 if (this.m00 == 0.0 && this.m11 == 0.0) {
25375 if (this.m02 == 0.0 && this.m12 == 0.0) {
25376 this.state = 4;
25377 this.type = -1;
25378 } else {
25379 this.state = (5);
25380 this.type = -1;
25381 }} else {
25382 if (this.m02 == 0.0 && this.m12 == 0.0) {
25383 this.state = (6);
25384 this.type = -1;
25385 } else {
25386 this.state = (7);
25387 this.type = -1;
25388 }}}});
25389 Clazz_defineMethod (c$, "stateError", 
25390  function () {
25391 throw  new InternalError ("missing case in transform state switch");
25392 });
25393 Clazz_defineMethod (c$, "getMatrix", 
25394 function (flatmatrix) {
25395 flatmatrix[0] = this.m00;
25396 flatmatrix[1] = this.m10;
25397 flatmatrix[2] = this.m01;
25398 flatmatrix[3] = this.m11;
25399 if (flatmatrix.length > 5) {
25400 flatmatrix[4] = this.m02;
25401 flatmatrix[5] = this.m12;
25402 }}, "~A");
25403 Clazz_defineMethod (c$, "getScaleX", 
25404 function () {
25405 return this.m00;
25406 });
25407 Clazz_defineMethod (c$, "getScaleY", 
25408 function () {
25409 return this.m11;
25410 });
25411 Clazz_defineMethod (c$, "getShearX", 
25412 function () {
25413 return this.m01;
25414 });
25415 Clazz_defineMethod (c$, "getShearY", 
25416 function () {
25417 return this.m10;
25418 });
25419 Clazz_defineMethod (c$, "getTranslateX", 
25420 function () {
25421 return this.m02;
25422 });
25423 Clazz_defineMethod (c$, "getTranslateY", 
25424 function () {
25425 return this.m12;
25426 });
25427 Clazz_defineMethod (c$, "translate", 
25428 function (tx, ty) {
25429 switch (this.state) {
25430 default:
25431 this.stateError ();
25432 case (7):
25433 this.m02 = tx * this.m00 + ty * this.m01 + this.m02;
25434 this.m12 = tx * this.m10 + ty * this.m11 + this.m12;
25435 if (this.m02 == 0.0 && this.m12 == 0.0) {
25436 this.state = 6;
25437 if (this.type != -1) {
25438 this.type -= 1;
25439 }}return;
25440 case (6):
25441 this.m02 = tx * this.m00 + ty * this.m01;
25442 this.m12 = tx * this.m10 + ty * this.m11;
25443 if (this.m02 != 0.0 || this.m12 != 0.0) {
25444 this.state = 7;
25445 this.type |= 1;
25446 }return;
25447 case (5):
25448 this.m02 = ty * this.m01 + this.m02;
25449 this.m12 = tx * this.m10 + this.m12;
25450 if (this.m02 == 0.0 && this.m12 == 0.0) {
25451 this.state = 4;
25452 if (this.type != -1) {
25453 this.type -= 1;
25454 }}return;
25455 case (4):
25456 this.m02 = ty * this.m01;
25457 this.m12 = tx * this.m10;
25458 if (this.m02 != 0.0 || this.m12 != 0.0) {
25459 this.state = 5;
25460 this.type |= 1;
25461 }return;
25462 case (3):
25463 this.m02 = tx * this.m00 + this.m02;
25464 this.m12 = ty * this.m11 + this.m12;
25465 if (this.m02 == 0.0 && this.m12 == 0.0) {
25466 this.state = 2;
25467 if (this.type != -1) {
25468 this.type -= 1;
25469 }}return;
25470 case (2):
25471 this.m02 = tx * this.m00;
25472 this.m12 = ty * this.m11;
25473 if (this.m02 != 0.0 || this.m12 != 0.0) {
25474 this.state = 3;
25475 this.type |= 1;
25476 }return;
25477 case (1):
25478 this.m02 = tx + this.m02;
25479 this.m12 = ty + this.m12;
25480 if (this.m02 == 0.0 && this.m12 == 0.0) {
25481 this.state = 0;
25482 this.type = 0;
25483 }return;
25484 case (0):
25485 this.m02 = tx;
25486 this.m12 = ty;
25487 if (tx != 0.0 || ty != 0.0) {
25488 this.state = 1;
25489 this.type = 1;
25490 }return;
25491 }
25492 }, "~N,~N");
25493 Clazz_defineMethod (c$, "rotate90", 
25494  function () {
25495 var M0 = this.m00;
25496 this.m00 = this.m01;
25497 this.m01 = -M0;
25498 M0 = this.m10;
25499 this.m10 = this.m11;
25500 this.m11 = -M0;
25501 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25502 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25503 state -= 2;
25504 }this.state = state;
25505 this.type = -1;
25506 });
25507 Clazz_defineMethod (c$, "rotate180", 
25508  function () {
25509 this.m00 = -this.m00;
25510 this.m11 = -this.m11;
25511 var state = this.state;
25512 if ((state & (4)) != 0) {
25513 this.m01 = -this.m01;
25514 this.m10 = -this.m10;
25515 } else {
25516 if (this.m00 == 1.0 && this.m11 == 1.0) {
25517 this.state = state & -3;
25518 } else {
25519 this.state = state | 2;
25520 }}this.type = -1;
25521 });
25522 Clazz_defineMethod (c$, "rotate270", 
25523  function () {
25524 var M0 = this.m00;
25525 this.m00 = -this.m01;
25526 this.m01 = M0;
25527 M0 = this.m10;
25528 this.m10 = -this.m11;
25529 this.m11 = M0;
25530 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25531 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25532 state -= 2;
25533 }this.state = state;
25534 this.type = -1;
25535 });
25536 Clazz_defineMethod (c$, "rotate", 
25537 function (theta) {
25538 var sin = Math.sin (theta);
25539 if (sin == 1.0) {
25540 this.rotate90 ();
25541 } else if (sin == -1.0) {
25542 this.rotate270 ();
25543 } else {
25544 var cos = Math.cos (theta);
25545 if (cos == -1.0) {
25546 this.rotate180 ();
25547 } else if (cos != 1.0) {
25548 var M0;
25549 var M1;
25550 M0 = this.m00;
25551 M1 = this.m01;
25552 this.m00 = cos * M0 + sin * M1;
25553 this.m01 = -sin * M0 + cos * M1;
25554 M0 = this.m10;
25555 M1 = this.m11;
25556 this.m10 = cos * M0 + sin * M1;
25557 this.m11 = -sin * M0 + cos * M1;
25558 this.updateState ();
25559 }}}, "~N");
25560 Clazz_defineMethod (c$, "rotate", 
25561 function (theta, anchorx, anchory) {
25562 this.translate (anchorx, anchory);
25563 this.rotate (theta);
25564 this.translate (-anchorx, -anchory);
25565 }, "~N,~N,~N");
25566 Clazz_defineMethod (c$, "rotate", 
25567 function (vecx, vecy) {
25568 if (vecy == 0.0) {
25569 if (vecx < 0.0) {
25570 this.rotate180 ();
25571 }} else if (vecx == 0.0) {
25572 if (vecy > 0.0) {
25573 this.rotate90 ();
25574 } else {
25575 this.rotate270 ();
25576 }} else {
25577 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25578 var sin = vecy / len;
25579 var cos = vecx / len;
25580 var M0;
25581 var M1;
25582 M0 = this.m00;
25583 M1 = this.m01;
25584 this.m00 = cos * M0 + sin * M1;
25585 this.m01 = -sin * M0 + cos * M1;
25586 M0 = this.m10;
25587 M1 = this.m11;
25588 this.m10 = cos * M0 + sin * M1;
25589 this.m11 = -sin * M0 + cos * M1;
25590 this.updateState ();
25591 }}, "~N,~N");
25592 Clazz_defineMethod (c$, "rotate", 
25593 function (vecx, vecy, anchorx, anchory) {
25594 this.translate (anchorx, anchory);
25595 this.rotate (vecx, vecy);
25596 this.translate (-anchorx, -anchory);
25597 }, "~N,~N,~N,~N");
25598 Clazz_defineMethod (c$, "quadrantRotate", 
25599 function (numquadrants) {
25600 switch (numquadrants & 3) {
25601 case 0:
25602 break;
25603 case 1:
25604 this.rotate90 ();
25605 break;
25606 case 2:
25607 this.rotate180 ();
25608 break;
25609 case 3:
25610 this.rotate270 ();
25611 break;
25612 }
25613 }, "~N");
25614 Clazz_defineMethod (c$, "quadrantRotate", 
25615 function (numquadrants, anchorx, anchory) {
25616 switch (numquadrants & 3) {
25617 case 0:
25618 return;
25619 case 1:
25620 this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00);
25621 this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10);
25622 this.rotate90 ();
25623 break;
25624 case 2:
25625 this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01);
25626 this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11);
25627 this.rotate180 ();
25628 break;
25629 case 3:
25630 this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00);
25631 this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10);
25632 this.rotate270 ();
25633 break;
25634 }
25635 if (this.m02 == 0.0 && this.m12 == 0.0) {
25636 this.state &= -2;
25637 } else {
25638 this.state |= 1;
25639 }}, "~N,~N,~N");
25640 Clazz_defineMethod (c$, "scale", 
25641 function (sx, sy) {
25642 var state = this.state;
25643 switch (state) {
25644 default:
25645 this.stateError ();
25646 case (7):
25647 case (6):
25648 this.m00 *= sx;
25649 this.m11 *= sy;
25650 case (5):
25651 case (4):
25652 this.m01 *= sy;
25653 this.m10 *= sx;
25654 if (this.m01 == 0 && this.m10 == 0) {
25655 state &= 1;
25656 if (this.m00 == 1.0 && this.m11 == 1.0) {
25657 this.type = (state == 0 ? 0 : 1);
25658 } else {
25659 state |= 2;
25660 this.type = -1;
25661 }this.state = state;
25662 }return;
25663 case (3):
25664 case (2):
25665 this.m00 *= sx;
25666 this.m11 *= sy;
25667 if (this.m00 == 1.0 && this.m11 == 1.0) {
25668 this.state = (state &= 1);
25669 this.type = (state == 0 ? 0 : 1);
25670 } else {
25671 this.type = -1;
25672 }return;
25673 case (1):
25674 case (0):
25675 this.m00 = sx;
25676 this.m11 = sy;
25677 if (sx != 1.0 || sy != 1.0) {
25678 this.state = state | 2;
25679 this.type = -1;
25680 }return;
25681 }
25682 }, "~N,~N");
25683 Clazz_defineMethod (c$, "shear", 
25684 function (shx, shy) {
25685 var state = this.state;
25686 switch (state) {
25687 default:
25688 this.stateError ();
25689 case (7):
25690 case (6):
25691 var M0;
25692 var M1;
25693 M0 = this.m00;
25694 M1 = this.m01;
25695 this.m00 = M0 + M1 * shy;
25696 this.m01 = M0 * shx + M1;
25697 M0 = this.m10;
25698 M1 = this.m11;
25699 this.m10 = M0 + M1 * shy;
25700 this.m11 = M0 * shx + M1;
25701 this.updateState ();
25702 return;
25703 case (5):
25704 case (4):
25705 this.m00 = this.m01 * shy;
25706 this.m11 = this.m10 * shx;
25707 if (this.m00 != 0.0 || this.m11 != 0.0) {
25708 this.state = state | 2;
25709 }this.type = -1;
25710 return;
25711 case (3):
25712 case (2):
25713 this.m01 = this.m00 * shx;
25714 this.m10 = this.m11 * shy;
25715 if (this.m01 != 0.0 || this.m10 != 0.0) {
25716 this.state = state | 4;
25717 }this.type = -1;
25718 return;
25719 case (1):
25720 case (0):
25721 this.m01 = shx;
25722 this.m10 = shy;
25723 if (this.m01 != 0.0 || this.m10 != 0.0) {
25724 this.state = state | 2 | 4;
25725 this.type = -1;
25726 }return;
25727 }
25728 }, "~N,~N");
25729 Clazz_defineMethod (c$, "setToIdentity", 
25730 function () {
25731 this.m00 = this.m11 = 1.0;
25732 this.m10 = this.m01 = this.m02 = this.m12 = 0.0;
25733 this.state = 0;
25734 this.type = 0;
25735 });
25736 Clazz_defineMethod (c$, "setToTranslation", 
25737 function (tx, ty) {
25738 this.m00 = 1.0;
25739 this.m10 = 0.0;
25740 this.m01 = 0.0;
25741 this.m11 = 1.0;
25742 this.m02 = tx;
25743 this.m12 = ty;
25744 if (tx != 0.0 || ty != 0.0) {
25745 this.state = 1;
25746 this.type = 1;
25747 } else {
25748 this.state = 0;
25749 this.type = 0;
25750 }}, "~N,~N");
25751 Clazz_defineMethod (c$, "setToRotation", 
25752 function (theta) {
25753 var sin = Math.sin (theta);
25754 var cos;
25755 if (sin == 1.0 || sin == -1.0) {
25756 cos = 0.0;
25757 this.state = 4;
25758 this.type = 8;
25759 } else {
25760 cos = Math.cos (theta);
25761 if (cos == -1.0) {
25762 sin = 0.0;
25763 this.state = 2;
25764 this.type = 8;
25765 } else if (cos == 1.0) {
25766 sin = 0.0;
25767 this.state = 0;
25768 this.type = 0;
25769 } else {
25770 this.state = 6;
25771 this.type = 16;
25772 }}this.m00 = cos;
25773 this.m10 = sin;
25774 this.m01 = -sin;
25775 this.m11 = cos;
25776 this.m02 = 0.0;
25777 this.m12 = 0.0;
25778 }, "~N");
25779 Clazz_defineMethod (c$, "setToRotation", 
25780 function (theta, anchorx, anchory) {
25781 this.setToRotation (theta);
25782 var sin = this.m10;
25783 var oneMinusCos = 1.0 - this.m00;
25784 this.m02 = anchorx * oneMinusCos + anchory * sin;
25785 this.m12 = anchory * oneMinusCos - anchorx * sin;
25786 if (this.m02 != 0.0 || this.m12 != 0.0) {
25787 this.state |= 1;
25788 this.type |= 1;
25789 }}, "~N,~N,~N");
25790 Clazz_defineMethod (c$, "setToRotation", 
25791 function (vecx, vecy) {
25792 var sin;
25793 var cos;
25794 if (vecy == 0) {
25795 sin = 0.0;
25796 if (vecx < 0.0) {
25797 cos = -1.0;
25798 this.state = 2;
25799 this.type = 8;
25800 } else {
25801 cos = 1.0;
25802 this.state = 0;
25803 this.type = 0;
25804 }} else if (vecx == 0) {
25805 cos = 0.0;
25806 sin = (vecy > 0.0) ? 1.0 : -1.0;
25807 this.state = 4;
25808 this.type = 8;
25809 } else {
25810 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25811 cos = vecx / len;
25812 sin = vecy / len;
25813 this.state = 6;
25814 this.type = 16;
25815 }this.m00 = cos;
25816 this.m10 = sin;
25817 this.m01 = -sin;
25818 this.m11 = cos;
25819 this.m02 = 0.0;
25820 this.m12 = 0.0;
25821 }, "~N,~N");
25822 Clazz_defineMethod (c$, "setToRotation", 
25823 function (vecx, vecy, anchorx, anchory) {
25824 this.setToRotation (vecx, vecy);
25825 var sin = this.m10;
25826 var oneMinusCos = 1.0 - this.m00;
25827 this.m02 = anchorx * oneMinusCos + anchory * sin;
25828 this.m12 = anchory * oneMinusCos - anchorx * sin;
25829 if (this.m02 != 0.0 || this.m12 != 0.0) {
25830 this.state |= 1;
25831 this.type |= 1;
25832 }}, "~N,~N,~N,~N");
25833 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25834 function (numquadrants) {
25835 switch (numquadrants & 3) {
25836 case 0:
25837 this.m00 = 1.0;
25838 this.m10 = 0.0;
25839 this.m01 = 0.0;
25840 this.m11 = 1.0;
25841 this.m02 = 0.0;
25842 this.m12 = 0.0;
25843 this.state = 0;
25844 this.type = 0;
25845 break;
25846 case 1:
25847 this.m00 = 0.0;
25848 this.m10 = 1.0;
25849 this.m01 = -1.0;
25850 this.m11 = 0.0;
25851 this.m02 = 0.0;
25852 this.m12 = 0.0;
25853 this.state = 4;
25854 this.type = 8;
25855 break;
25856 case 2:
25857 this.m00 = -1.0;
25858 this.m10 = 0.0;
25859 this.m01 = 0.0;
25860 this.m11 = -1.0;
25861 this.m02 = 0.0;
25862 this.m12 = 0.0;
25863 this.state = 2;
25864 this.type = 8;
25865 break;
25866 case 3:
25867 this.m00 = 0.0;
25868 this.m10 = -1.0;
25869 this.m01 = 1.0;
25870 this.m11 = 0.0;
25871 this.m02 = 0.0;
25872 this.m12 = 0.0;
25873 this.state = 4;
25874 this.type = 8;
25875 break;
25876 }
25877 }, "~N");
25878 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25879 function (numquadrants, anchorx, anchory) {
25880 switch (numquadrants & 3) {
25881 case 0:
25882 this.m00 = 1.0;
25883 this.m10 = 0.0;
25884 this.m01 = 0.0;
25885 this.m11 = 1.0;
25886 this.m02 = 0.0;
25887 this.m12 = 0.0;
25888 this.state = 0;
25889 this.type = 0;
25890 break;
25891 case 1:
25892 this.m00 = 0.0;
25893 this.m10 = 1.0;
25894 this.m01 = -1.0;
25895 this.m11 = 0.0;
25896 this.m02 = anchorx + anchory;
25897 this.m12 = anchory - anchorx;
25898 if (this.m02 == 0.0 && this.m12 == 0.0) {
25899 this.state = 4;
25900 this.type = 8;
25901 } else {
25902 this.state = 5;
25903 this.type = 9;
25904 }break;
25905 case 2:
25906 this.m00 = -1.0;
25907 this.m10 = 0.0;
25908 this.m01 = 0.0;
25909 this.m11 = -1.0;
25910 this.m02 = anchorx + anchorx;
25911 this.m12 = anchory + anchory;
25912 if (this.m02 == 0.0 && this.m12 == 0.0) {
25913 this.state = 2;
25914 this.type = 8;
25915 } else {
25916 this.state = 3;
25917 this.type = 9;
25918 }break;
25919 case 3:
25920 this.m00 = 0.0;
25921 this.m10 = -1.0;
25922 this.m01 = 1.0;
25923 this.m11 = 0.0;
25924 this.m02 = anchorx - anchory;
25925 this.m12 = anchory + anchorx;
25926 if (this.m02 == 0.0 && this.m12 == 0.0) {
25927 this.state = 4;
25928 this.type = 8;
25929 } else {
25930 this.state = 5;
25931 this.type = 9;
25932 }break;
25933 }
25934 }, "~N,~N,~N");
25935 Clazz_defineMethod (c$, "setToScale", 
25936 function (sx, sy) {
25937 this.m00 = sx;
25938 this.m10 = 0.0;
25939 this.m01 = 0.0;
25940 this.m11 = sy;
25941 this.m02 = 0.0;
25942 this.m12 = 0.0;
25943 if (sx != 1.0 || sy != 1.0) {
25944 this.state = 2;
25945 this.type = -1;
25946 } else {
25947 this.state = 0;
25948 this.type = 0;
25949 }}, "~N,~N");
25950 Clazz_defineMethod (c$, "setToShear", 
25951 function (shx, shy) {
25952 this.m00 = 1.0;
25953 this.m01 = shx;
25954 this.m10 = shy;
25955 this.m11 = 1.0;
25956 this.m02 = 0.0;
25957 this.m12 = 0.0;
25958 if (shx != 0.0 || shy != 0.0) {
25959 this.state = (6);
25960 this.type = -1;
25961 } else {
25962 this.state = 0;
25963 this.type = 0;
25964 }}, "~N,~N");
25965 Clazz_defineMethod (c$, "setTransform", 
25966 function (Tx) {
25967 this.m00 = Tx.m00;
25968 this.m10 = Tx.m10;
25969 this.m01 = Tx.m01;
25970 this.m11 = Tx.m11;
25971 this.m02 = Tx.m02;
25972 this.m12 = Tx.m12;
25973 this.state = Tx.state;
25974 this.type = Tx.type;
25975 }, "java.awt.geom.AffineTransform");
25976 Clazz_defineMethod (c$, "setTransform", 
25977 function (m00, m10, m01, m11, m02, m12) {
25978 this.m00 = m00;
25979 this.m10 = m10;
25980 this.m01 = m01;
25981 this.m11 = m11;
25982 this.m02 = m02;
25983 this.m12 = m12;
25984 this.updateState ();
25985 }, "~N,~N,~N,~N,~N,~N");
25986 Clazz_defineMethod (c$, "concatenate", 
25987 function (Tx) {
25988 var M0;
25989 var M1;
25990 var T00;
25991 var T01;
25992 var T10;
25993 var T11;
25994 var T02;
25995 var T12;
25996 var mystate = this.state;
25997 var txstate = Tx.state;
25998 switch ((txstate << 3) | mystate) {
25999 case (0):
26000 case (1):
26001 case (2):
26002 case (3):
26003 case (4):
26004 case (5):
26005 case (6):
26006 case (7):
26007 return;
26008 case (56):
26009 this.m01 = Tx.m01;
26010 this.m10 = Tx.m10;
26011 case (24):
26012 this.m00 = Tx.m00;
26013 this.m11 = Tx.m11;
26014 case (8):
26015 this.m02 = Tx.m02;
26016 this.m12 = Tx.m12;
26017 this.state = txstate;
26018 this.type = Tx.type;
26019 return;
26020 case (48):
26021 this.m01 = Tx.m01;
26022 this.m10 = Tx.m10;
26023 case (16):
26024 this.m00 = Tx.m00;
26025 this.m11 = Tx.m11;
26026 this.state = txstate;
26027 this.type = Tx.type;
26028 return;
26029 case (40):
26030 this.m02 = Tx.m02;
26031 this.m12 = Tx.m12;
26032 case (32):
26033 this.m01 = Tx.m01;
26034 this.m10 = Tx.m10;
26035 this.m00 = this.m11 = 0.0;
26036 this.state = txstate;
26037 this.type = Tx.type;
26038 return;
26039 case (15):
26040 case (14):
26041 case (13):
26042 case (12):
26043 case (11):
26044 case (10):
26045 case (9):
26046 this.translate (Tx.m02, Tx.m12);
26047 return;
26048 case (23):
26049 case (22):
26050 case (21):
26051 case (20):
26052 case (19):
26053 case (18):
26054 case (17):
26055 this.scale (Tx.m00, Tx.m11);
26056 return;
26057 case (39):
26058 case (38):
26059 T01 = Tx.m01;
26060 T10 = Tx.m10;
26061 M0 = this.m00;
26062 this.m00 = this.m01 * T10;
26063 this.m01 = M0 * T01;
26064 M0 = this.m10;
26065 this.m10 = this.m11 * T10;
26066 this.m11 = M0 * T01;
26067 this.type = -1;
26068 return;
26069 case (37):
26070 case (36):
26071 this.m00 = this.m01 * Tx.m10;
26072 this.m01 = 0.0;
26073 this.m11 = this.m10 * Tx.m01;
26074 this.m10 = 0.0;
26075 this.state = mystate ^ (6);
26076 this.type = -1;
26077 return;
26078 case (35):
26079 case (34):
26080 this.m01 = this.m00 * Tx.m01;
26081 this.m00 = 0.0;
26082 this.m10 = this.m11 * Tx.m10;
26083 this.m11 = 0.0;
26084 this.state = mystate ^ (6);
26085 this.type = -1;
26086 return;
26087 case (33):
26088 this.m00 = 0.0;
26089 this.m01 = Tx.m01;
26090 this.m10 = Tx.m10;
26091 this.m11 = 0.0;
26092 this.state = 5;
26093 this.type = -1;
26094 return;
26095 }
26096 T00 = Tx.m00;
26097 T01 = Tx.m01;
26098 T02 = Tx.m02;
26099 T10 = Tx.m10;
26100 T11 = Tx.m11;
26101 T12 = Tx.m12;
26102 switch (mystate) {
26103 default:
26104 this.stateError ();
26105 case (6):
26106 this.state = mystate | txstate;
26107 case (7):
26108 M0 = this.m00;
26109 M1 = this.m01;
26110 this.m00 = T00 * M0 + T10 * M1;
26111 this.m01 = T01 * M0 + T11 * M1;
26112 this.m02 += T02 * M0 + T12 * M1;
26113 M0 = this.m10;
26114 M1 = this.m11;
26115 this.m10 = T00 * M0 + T10 * M1;
26116 this.m11 = T01 * M0 + T11 * M1;
26117 this.m12 += T02 * M0 + T12 * M1;
26118 this.type = -1;
26119 return;
26120 case (5):
26121 case (4):
26122 M0 = this.m01;
26123 this.m00 = T10 * M0;
26124 this.m01 = T11 * M0;
26125 this.m02 += T12 * M0;
26126 M0 = this.m10;
26127 this.m10 = T00 * M0;
26128 this.m11 = T01 * M0;
26129 this.m12 += T02 * M0;
26130 break;
26131 case (3):
26132 case (2):
26133 M0 = this.m00;
26134 this.m00 = T00 * M0;
26135 this.m01 = T01 * M0;
26136 this.m02 += T02 * M0;
26137 M0 = this.m11;
26138 this.m10 = T10 * M0;
26139 this.m11 = T11 * M0;
26140 this.m12 += T12 * M0;
26141 break;
26142 case (1):
26143 this.m00 = T00;
26144 this.m01 = T01;
26145 this.m02 += T02;
26146 this.m10 = T10;
26147 this.m11 = T11;
26148 this.m12 += T12;
26149 this.state = txstate | 1;
26150 this.type = -1;
26151 return;
26152 }
26153 this.updateState ();
26154 }, "java.awt.geom.AffineTransform");
26155 Clazz_defineMethod (c$, "preConcatenate", 
26156 function (Tx) {
26157 var M0;
26158 var M1;
26159 var T00;
26160 var T01;
26161 var T10;
26162 var T11;
26163 var T02;
26164 var T12;
26165 var mystate = this.state;
26166 var txstate = Tx.state;
26167 switch ((txstate << 3) | mystate) {
26168 case (0):
26169 case (1):
26170 case (2):
26171 case (3):
26172 case (4):
26173 case (5):
26174 case (6):
26175 case (7):
26176 return;
26177 case (8):
26178 case (10):
26179 case (12):
26180 case (14):
26181 this.m02 = Tx.m02;
26182 this.m12 = Tx.m12;
26183 this.state = mystate | 1;
26184 this.type |= 1;
26185 return;
26186 case (9):
26187 case (11):
26188 case (13):
26189 case (15):
26190 this.m02 = this.m02 + Tx.m02;
26191 this.m12 = this.m12 + Tx.m12;
26192 return;
26193 case (17):
26194 case (16):
26195 this.state = mystate | 2;
26196 case (23):
26197 case (22):
26198 case (21):
26199 case (20):
26200 case (19):
26201 case (18):
26202 T00 = Tx.m00;
26203 T11 = Tx.m11;
26204 if ((mystate & 4) != 0) {
26205 this.m01 = this.m01 * T00;
26206 this.m10 = this.m10 * T11;
26207 if ((mystate & 2) != 0) {
26208 this.m00 = this.m00 * T00;
26209 this.m11 = this.m11 * T11;
26210 }} else {
26211 this.m00 = this.m00 * T00;
26212 this.m11 = this.m11 * T11;
26213 }if ((mystate & 1) != 0) {
26214 this.m02 = this.m02 * T00;
26215 this.m12 = this.m12 * T11;
26216 }this.type = -1;
26217 return;
26218 case (37):
26219 case (36):
26220 mystate = mystate | 2;
26221 case (33):
26222 case (32):
26223 case (35):
26224 case (34):
26225 this.state = mystate ^ 4;
26226 case (39):
26227 case (38):
26228 T01 = Tx.m01;
26229 T10 = Tx.m10;
26230 M0 = this.m00;
26231 this.m00 = this.m10 * T01;
26232 this.m10 = M0 * T10;
26233 M0 = this.m01;
26234 this.m01 = this.m11 * T01;
26235 this.m11 = M0 * T10;
26236 M0 = this.m02;
26237 this.m02 = this.m12 * T01;
26238 this.m12 = M0 * T10;
26239 this.type = -1;
26240 return;
26241 }
26242 T00 = Tx.m00;
26243 T01 = Tx.m01;
26244 T02 = Tx.m02;
26245 T10 = Tx.m10;
26246 T11 = Tx.m11;
26247 T12 = Tx.m12;
26248 switch (mystate) {
26249 default:
26250 this.stateError ();
26251 case (7):
26252 M0 = this.m02;
26253 M1 = this.m12;
26254 T02 += M0 * T00 + M1 * T01;
26255 T12 += M0 * T10 + M1 * T11;
26256 case (6):
26257 this.m02 = T02;
26258 this.m12 = T12;
26259 M0 = this.m00;
26260 M1 = this.m10;
26261 this.m00 = M0 * T00 + M1 * T01;
26262 this.m10 = M0 * T10 + M1 * T11;
26263 M0 = this.m01;
26264 M1 = this.m11;
26265 this.m01 = M0 * T00 + M1 * T01;
26266 this.m11 = M0 * T10 + M1 * T11;
26267 break;
26268 case (5):
26269 M0 = this.m02;
26270 M1 = this.m12;
26271 T02 += M0 * T00 + M1 * T01;
26272 T12 += M0 * T10 + M1 * T11;
26273 case (4):
26274 this.m02 = T02;
26275 this.m12 = T12;
26276 M0 = this.m10;
26277 this.m00 = M0 * T01;
26278 this.m10 = M0 * T11;
26279 M0 = this.m01;
26280 this.m01 = M0 * T00;
26281 this.m11 = M0 * T10;
26282 break;
26283 case (3):
26284 M0 = this.m02;
26285 M1 = this.m12;
26286 T02 += M0 * T00 + M1 * T01;
26287 T12 += M0 * T10 + M1 * T11;
26288 case (2):
26289 this.m02 = T02;
26290 this.m12 = T12;
26291 M0 = this.m00;
26292 this.m00 = M0 * T00;
26293 this.m10 = M0 * T10;
26294 M0 = this.m11;
26295 this.m01 = M0 * T01;
26296 this.m11 = M0 * T11;
26297 break;
26298 case (1):
26299 M0 = this.m02;
26300 M1 = this.m12;
26301 T02 += M0 * T00 + M1 * T01;
26302 T12 += M0 * T10 + M1 * T11;
26303 case (0):
26304 this.m02 = T02;
26305 this.m12 = T12;
26306 this.m00 = T00;
26307 this.m10 = T10;
26308 this.m01 = T01;
26309 this.m11 = T11;
26310 this.state = mystate | txstate;
26311 this.type = -1;
26312 return;
26313 }
26314 this.updateState ();
26315 }, "java.awt.geom.AffineTransform");
26316 Clazz_defineMethod (c$, "createInverse", 
26317 function () {
26318 var det;
26319 switch (this.state) {
26320 default:
26321 this.stateError ();
26322 case (7):
26323 det = this.m00 * this.m11 - this.m01 * this.m10;
26324 if (Math.abs (det) <= 4.9E-324) {
26325 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26326 }return  new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, (this.m01 * this.m12 - this.m11 * this.m02) / det, (this.m10 * this.m02 - this.m00 * this.m12) / det, (7));
26327 case (6):
26328 det = this.m00 * this.m11 - this.m01 * this.m10;
26329 if (Math.abs (det) <= 4.9E-324) {
26330 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26331 }return  new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6));
26332 case (5):
26333 if (this.m01 == 0.0 || this.m10 == 0.0) {
26334 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26335 }return  new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, -this.m12 / this.m10, -this.m02 / this.m01, (5));
26336 case (4):
26337 if (this.m01 == 0.0 || this.m10 == 0.0) {
26338 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26339 }return  new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4));
26340 case (3):
26341 if (this.m00 == 0.0 || this.m11 == 0.0) {
26342 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26343 }return  new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, -this.m02 / this.m00, -this.m12 / this.m11, (3));
26344 case (2):
26345 if (this.m00 == 0.0 || this.m11 == 0.0) {
26346 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26347 }return  new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2));
26348 case (1):
26349 return  new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1));
26350 case (0):
26351 return  new java.awt.geom.AffineTransform ();
26352 }
26353 });
26354 Clazz_defineMethod (c$, "invert", 
26355 function () {
26356 var M00;
26357 var M01;
26358 var M02;
26359 var M10;
26360 var M11;
26361 var M12;
26362 var det;
26363 switch (this.state) {
26364 default:
26365 this.stateError ();
26366 case (7):
26367 M00 = this.m00;
26368 M01 = this.m01;
26369 M02 = this.m02;
26370 M10 = this.m10;
26371 M11 = this.m11;
26372 M12 = this.m12;
26373 det = M00 * M11 - M01 * M10;
26374 if (Math.abs (det) <= 4.9E-324) {
26375 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26376 }this.m00 = M11 / det;
26377 this.m10 = -M10 / det;
26378 this.m01 = -M01 / det;
26379 this.m11 = M00 / det;
26380 this.m02 = (M01 * M12 - M11 * M02) / det;
26381 this.m12 = (M10 * M02 - M00 * M12) / det;
26382 break;
26383 case (6):
26384 M00 = this.m00;
26385 M01 = this.m01;
26386 M10 = this.m10;
26387 M11 = this.m11;
26388 det = M00 * M11 - M01 * M10;
26389 if (Math.abs (det) <= 4.9E-324) {
26390 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26391 }this.m00 = M11 / det;
26392 this.m10 = -M10 / det;
26393 this.m01 = -M01 / det;
26394 this.m11 = M00 / det;
26395 break;
26396 case (5):
26397 M01 = this.m01;
26398 M02 = this.m02;
26399 M10 = this.m10;
26400 M12 = this.m12;
26401 if (M01 == 0.0 || M10 == 0.0) {
26402 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26403 }this.m10 = 1.0 / M01;
26404 this.m01 = 1.0 / M10;
26405 this.m02 = -M12 / M10;
26406 this.m12 = -M02 / M01;
26407 break;
26408 case (4):
26409 M01 = this.m01;
26410 M10 = this.m10;
26411 if (M01 == 0.0 || M10 == 0.0) {
26412 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26413 }this.m10 = 1.0 / M01;
26414 this.m01 = 1.0 / M10;
26415 break;
26416 case (3):
26417 M00 = this.m00;
26418 M02 = this.m02;
26419 M11 = this.m11;
26420 M12 = this.m12;
26421 if (M00 == 0.0 || M11 == 0.0) {
26422 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26423 }this.m00 = 1.0 / M00;
26424 this.m11 = 1.0 / M11;
26425 this.m02 = -M02 / M00;
26426 this.m12 = -M12 / M11;
26427 break;
26428 case (2):
26429 M00 = this.m00;
26430 M11 = this.m11;
26431 if (M00 == 0.0 || M11 == 0.0) {
26432 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26433 }this.m00 = 1.0 / M00;
26434 this.m11 = 1.0 / M11;
26435 break;
26436 case (1):
26437 this.m02 = -this.m02;
26438 this.m12 = -this.m12;
26439 break;
26440 case (0):
26441 break;
26442 }
26443 });
26444 Clazz_defineMethod (c$, "transform", 
26445 function (ptSrc, ptDst) {
26446 if (ptDst == null) {
26447 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26448 ptDst =  new java.awt.geom.Point2D.Double ();
26449 } else {
26450 ptDst =  new java.awt.geom.Point2D.Float ();
26451 }}var x = ptSrc.getX ();
26452 var y = ptSrc.getY ();
26453 switch (this.state) {
26454 default:
26455 this.stateError ();
26456 case (7):
26457 ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12);
26458 return ptDst;
26459 case (6):
26460 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26461 return ptDst;
26462 case (5):
26463 ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12);
26464 return ptDst;
26465 case (4):
26466 ptDst.setLocation (y * this.m01, x * this.m10);
26467 return ptDst;
26468 case (3):
26469 ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12);
26470 return ptDst;
26471 case (2):
26472 ptDst.setLocation (x * this.m00, y * this.m11);
26473 return ptDst;
26474 case (1):
26475 ptDst.setLocation (x + this.m02, y + this.m12);
26476 return ptDst;
26477 case (0):
26478 ptDst.setLocation (x, y);
26479 return ptDst;
26480 }
26481 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26482 Clazz_defineMethod (c$, "transform", 
26483 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26484 if (numPts == 0) return;
26485 if (!JU.AU.isAD (srcPts)) {
26486 var src = srcPts;
26487 var dst = dstPts;
26488 this.transform (src, srcOff, dst, dstOff, numPts);
26489 return;
26490 }var M00;
26491 var M01;
26492 var M02;
26493 var M10;
26494 var M11;
26495 var M12;
26496 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26497 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26498 srcOff = dstOff;
26499 }switch (this.state) {
26500 default:
26501 this.stateError ();
26502 case (7):
26503 M00 = this.m00;
26504 M01 = this.m01;
26505 M02 = this.m02;
26506 M10 = this.m10;
26507 M11 = this.m11;
26508 M12 = this.m12;
26509 while (--numPts >= 0) {
26510 var x = srcPts[srcOff++];
26511 var y = srcPts[srcOff++];
26512 dstPts[dstOff++] = M00 * x + M01 * y + M02;
26513 dstPts[dstOff++] = M10 * x + M11 * y + M12;
26514 }
26515 return;
26516 case (6):
26517 M00 = this.m00;
26518 M01 = this.m01;
26519 M10 = this.m10;
26520 M11 = this.m11;
26521 while (--numPts >= 0) {
26522 var x = srcPts[srcOff++];
26523 var y = srcPts[srcOff++];
26524 dstPts[dstOff++] = M00 * x + M01 * y;
26525 dstPts[dstOff++] = M10 * x + M11 * y;
26526 }
26527 return;
26528 case (5):
26529 M01 = this.m01;
26530 M02 = this.m02;
26531 M10 = this.m10;
26532 M12 = this.m12;
26533 while (--numPts >= 0) {
26534 var x = srcPts[srcOff++];
26535 dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02;
26536 dstPts[dstOff++] = M10 * x + M12;
26537 }
26538 return;
26539 case (4):
26540 M01 = this.m01;
26541 M10 = this.m10;
26542 while (--numPts >= 0) {
26543 var x = srcPts[srcOff++];
26544 dstPts[dstOff++] = M01 * srcPts[srcOff++];
26545 dstPts[dstOff++] = M10 * x;
26546 }
26547 return;
26548 case (3):
26549 M00 = this.m00;
26550 M02 = this.m02;
26551 M11 = this.m11;
26552 M12 = this.m12;
26553 while (--numPts >= 0) {
26554 dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02;
26555 dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12;
26556 }
26557 return;
26558 case (2):
26559 M00 = this.m00;
26560 M11 = this.m11;
26561 while (--numPts >= 0) {
26562 dstPts[dstOff++] = M00 * srcPts[srcOff++];
26563 dstPts[dstOff++] = M11 * srcPts[srcOff++];
26564 }
26565 return;
26566 case (1):
26567 M02 = this.m02;
26568 M12 = this.m12;
26569 while (--numPts >= 0) {
26570 dstPts[dstOff++] = srcPts[srcOff++] + M02;
26571 dstPts[dstOff++] = srcPts[srcOff++] + M12;
26572 }
26573 return;
26574 case (0):
26575 if (srcPts !== dstPts || srcOff != dstOff) {
26576 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26577 }return;
26578 }
26579 }, "~A,~N,~A,~N,~N");
26580 Clazz_defineMethod (c$, "inverseTransform", 
26581 function (ptSrc, ptDst) {
26582 if (ptDst == null) {
26583 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26584 ptDst =  new java.awt.geom.Point2D.Double ();
26585 } else {
26586 ptDst =  new java.awt.geom.Point2D.Float ();
26587 }}var x = ptSrc.getX ();
26588 var y = ptSrc.getY ();
26589 switch (this.state) {
26590 default:
26591 this.stateError ();
26592 case (7):
26593 x -= this.m02;
26594 y -= this.m12;
26595 case (6):
26596 var det = this.m00 * this.m11 - this.m01 * this.m10;
26597 if (Math.abs (det) <= 4.9E-324) {
26598 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26599 }ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det);
26600 return ptDst;
26601 case (5):
26602 x -= this.m02;
26603 y -= this.m12;
26604 case (4):
26605 if (this.m01 == 0.0 || this.m10 == 0.0) {
26606 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26607 }ptDst.setLocation (y / this.m10, x / this.m01);
26608 return ptDst;
26609 case (3):
26610 x -= this.m02;
26611 y -= this.m12;
26612 case (2):
26613 if (this.m00 == 0.0 || this.m11 == 0.0) {
26614 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26615 }ptDst.setLocation (x / this.m00, y / this.m11);
26616 return ptDst;
26617 case (1):
26618 ptDst.setLocation (x - this.m02, y - this.m12);
26619 return ptDst;
26620 case (0):
26621 ptDst.setLocation (x, y);
26622 return ptDst;
26623 }
26624 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26625 Clazz_defineMethod (c$, "inverseTransform", 
26626 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26627 var M00;
26628 var M01;
26629 var M02;
26630 var M10;
26631 var M11;
26632 var M12;
26633 var det;
26634 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26635 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26636 srcOff = dstOff;
26637 }switch (this.state) {
26638 default:
26639 this.stateError ();
26640 case (7):
26641 M00 = this.m00;
26642 M01 = this.m01;
26643 M02 = this.m02;
26644 M10 = this.m10;
26645 M11 = this.m11;
26646 M12 = this.m12;
26647 det = M00 * M11 - M01 * M10;
26648 if (Math.abs (det) <= 4.9E-324) {
26649 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26650 }while (--numPts >= 0) {
26651 var x = srcPts[srcOff++] - M02;
26652 var y = srcPts[srcOff++] - M12;
26653 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26654 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26655 }
26656 return;
26657 case (6):
26658 M00 = this.m00;
26659 M01 = this.m01;
26660 M10 = this.m10;
26661 M11 = this.m11;
26662 det = M00 * M11 - M01 * M10;
26663 if (Math.abs (det) <= 4.9E-324) {
26664 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26665 }while (--numPts >= 0) {
26666 var x = srcPts[srcOff++];
26667 var y = srcPts[srcOff++];
26668 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26669 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26670 }
26671 return;
26672 case (5):
26673 M01 = this.m01;
26674 M02 = this.m02;
26675 M10 = this.m10;
26676 M12 = this.m12;
26677 if (M01 == 0.0 || M10 == 0.0) {
26678 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26679 }while (--numPts >= 0) {
26680 var x = srcPts[srcOff++] - M02;
26681 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10;
26682 dstPts[dstOff++] = x / M01;
26683 }
26684 return;
26685 case (4):
26686 M01 = this.m01;
26687 M10 = this.m10;
26688 if (M01 == 0.0 || M10 == 0.0) {
26689 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26690 }while (--numPts >= 0) {
26691 var x = srcPts[srcOff++];
26692 dstPts[dstOff++] = srcPts[srcOff++] / M10;
26693 dstPts[dstOff++] = x / M01;
26694 }
26695 return;
26696 case (3):
26697 M00 = this.m00;
26698 M02 = this.m02;
26699 M11 = this.m11;
26700 M12 = this.m12;
26701 if (M00 == 0.0 || M11 == 0.0) {
26702 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26703 }while (--numPts >= 0) {
26704 dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00;
26705 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11;
26706 }
26707 return;
26708 case (2):
26709 M00 = this.m00;
26710 M11 = this.m11;
26711 if (M00 == 0.0 || M11 == 0.0) {
26712 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26713 }while (--numPts >= 0) {
26714 dstPts[dstOff++] = srcPts[srcOff++] / M00;
26715 dstPts[dstOff++] = srcPts[srcOff++] / M11;
26716 }
26717 return;
26718 case (1):
26719 M02 = this.m02;
26720 M12 = this.m12;
26721 while (--numPts >= 0) {
26722 dstPts[dstOff++] = srcPts[srcOff++] - M02;
26723 dstPts[dstOff++] = srcPts[srcOff++] - M12;
26724 }
26725 return;
26726 case (0):
26727 if (srcPts !== dstPts || srcOff != dstOff) {
26728 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26729 }return;
26730 }
26731 }, "~A,~N,~A,~N,~N");
26732 Clazz_defineMethod (c$, "deltaTransform", 
26733 function (ptSrc, ptDst) {
26734 if (ptDst == null) {
26735 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26736 ptDst =  new java.awt.geom.Point2D.Double ();
26737 } else {
26738 ptDst =  new java.awt.geom.Point2D.Float ();
26739 }}var x = ptSrc.getX ();
26740 var y = ptSrc.getY ();
26741 switch (this.state) {
26742 default:
26743 this.stateError ();
26744 case (7):
26745 case (6):
26746 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26747 return ptDst;
26748 case (5):
26749 case (4):
26750 ptDst.setLocation (y * this.m01, x * this.m10);
26751 return ptDst;
26752 case (3):
26753 case (2):
26754 ptDst.setLocation (x * this.m00, y * this.m11);
26755 return ptDst;
26756 case (1):
26757 case (0):
26758 ptDst.setLocation (x, y);
26759 return ptDst;
26760 }
26761 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26762 Clazz_defineMethod (c$, "deltaTransform", 
26763 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26764 var M00;
26765 var M01;
26766 var M10;
26767 var M11;
26768 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26769 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26770 srcOff = dstOff;
26771 }switch (this.state) {
26772 default:
26773 this.stateError ();
26774 case (7):
26775 case (6):
26776 M00 = this.m00;
26777 M01 = this.m01;
26778 M10 = this.m10;
26779 M11 = this.m11;
26780 while (--numPts >= 0) {
26781 var x = srcPts[srcOff++];
26782 var y = srcPts[srcOff++];
26783 dstPts[dstOff++] = x * M00 + y * M01;
26784 dstPts[dstOff++] = x * M10 + y * M11;
26785 }
26786 return;
26787 case (5):
26788 case (4):
26789 M01 = this.m01;
26790 M10 = this.m10;
26791 while (--numPts >= 0) {
26792 var x = srcPts[srcOff++];
26793 dstPts[dstOff++] = srcPts[srcOff++] * M01;
26794 dstPts[dstOff++] = x * M10;
26795 }
26796 return;
26797 case (3):
26798 case (2):
26799 M00 = this.m00;
26800 M11 = this.m11;
26801 while (--numPts >= 0) {
26802 dstPts[dstOff++] = srcPts[srcOff++] * M00;
26803 dstPts[dstOff++] = srcPts[srcOff++] * M11;
26804 }
26805 return;
26806 case (1):
26807 case (0):
26808 if (srcPts !== dstPts || srcOff != dstOff) {
26809 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26810 }return;
26811 }
26812 }, "~A,~N,~A,~N,~N");
26813 Clazz_defineMethod (c$, "createTransformedShape", 
26814 function (pSrc) {
26815 if (pSrc == null) {
26816 return null;
26817 }return  new java.awt.geom.Path2D.Double (pSrc, this);
26818 }, "java.awt.Shape");
26819 c$._matround = Clazz_defineMethod (c$, "_matround", 
26820  function (matval) {
26821 return Math.rint (matval * 1E15) / 1E15;
26822 }, "~N");
26823 Clazz_overrideMethod (c$, "toString", 
26824 function () {
26825 return ("AffineTransform[[" + java.awt.geom.AffineTransform._matround (this.m00) + ", " + java.awt.geom.AffineTransform._matround (this.m01) + ", " + java.awt.geom.AffineTransform._matround (this.m02) + "], [" + java.awt.geom.AffineTransform._matround (this.m10) + ", " + java.awt.geom.AffineTransform._matround (this.m11) + ", " + java.awt.geom.AffineTransform._matround (this.m12) + "]]");
26826 });
26827 Clazz_defineMethod (c$, "isIdentity", 
26828 function () {
26829 return (this.state == 0 || (this.getType () == 0));
26830 });
26831 Clazz_defineMethod (c$, "clone", 
26832 function () {
26833 try {
26834 return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []);
26835 } catch (e) {
26836 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
26837 throw  new InternalError ();
26838 } else {
26839 throw e;
26840 }
26841 }
26842 });
26843 Clazz_overrideMethod (c$, "hashCode", 
26844 function () {
26845 var bits = Double.doubleToLongBits (this.m00);
26846 bits = bits * 31 + Double.doubleToLongBits (this.m01);
26847 bits = bits * 31 + Double.doubleToLongBits (this.m02);
26848 bits = bits * 31 + Double.doubleToLongBits (this.m10);
26849 bits = bits * 31 + Double.doubleToLongBits (this.m11);
26850 bits = bits * 31 + Double.doubleToLongBits (this.m12);
26851 return ((bits) ^ ((bits >> 32)));
26852 });
26853 Clazz_overrideMethod (c$, "equals", 
26854 function (obj) {
26855 if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) {
26856 return false;
26857 }var a = obj;
26858 return ((this.m00 == a.m00) && (this.m01 == a.m01) && (this.m02 == a.m02) && (this.m10 == a.m10) && (this.m11 == a.m11) && (this.m12 == a.m12));
26859 }, "~O");
26860 Clazz_defineStatics (c$,
26861 "TYPE_UNKNOWN", -1,
26862 "TYPE_IDENTITY", 0,
26863 "TYPE_TRANSLATION", 1,
26864 "TYPE_UNIFORM_SCALE", 2,
26865 "TYPE_GENERAL_SCALE", 4,
26866 "TYPE_MASK_SCALE", (6),
26867 "TYPE_FLIP", 64,
26868 "TYPE_QUADRANT_ROTATION", 8,
26869 "TYPE_GENERAL_ROTATION", 16,
26870 "TYPE_MASK_ROTATION", (24),
26871 "TYPE_GENERAL_TRANSFORM", 32,
26872 "APPLY_IDENTITY", 0,
26873 "APPLY_TRANSLATE", 1,
26874 "APPLY_SCALE", 2,
26875 "APPLY_SHEAR", 4,
26876 "HI_SHIFT", 3,
26877 "HI_IDENTITY", 0,
26878 "HI_TRANSLATE", 8,
26879 "HI_SCALE", 16,
26880 "HI_SHEAR", 32,
26881 "rot90conversion",  Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7]));
26882 });
26883 Clazz_declarePackage ("java.awt.geom");
26884 Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () {
26885 c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception);
26886 });
26887 Clazz_declarePackage ("java.awt.geom");
26888 Clazz_load (["java.awt.Shape", "java.awt.geom.PathIterator"], "java.awt.geom.Path2D", ["java.lang.Double", "$.IllegalArgumentException", "java.util.Arrays", "java.awt.geom.FlatteningPathIterator", "$.IllegalPathStateException", "$.Point2D", "$.Rectangle2D", "jssun.awt.geom.Curve"], function () {
26889 c$ = Clazz_decorateAsClass (function () {
26890 this.pointTypes = null;
26891 this.numTypes = 0;
26892 this.numCoords = 0;
26893 this.windingRule = 0;
26894 Clazz_instantialize (this, arguments);
26895 }, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]);
26896 Clazz_makeConstructor (c$, 
26897 function () {
26898 });
26899 Clazz_makeConstructor (c$, 
26900 function (rule, initialTypes) {
26901 this.setWindingRule (rule);
26902 this.pointTypes =  Clazz_newByteArray (initialTypes, 0);
26903 }, "~N,~N");
26904 Clazz_defineMethod (c$, "closePath", 
26905 function () {
26906 if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) {
26907 this.needRoom (true, 0);
26908 this.pointTypes[this.numTypes++] = 4;
26909 }});
26910 Clazz_defineMethod (c$, "append", 
26911 function (s, connect) {
26912 this.append (s.getPathIterator (null), connect);
26913 }, "java.awt.Shape,~B");
26914 Clazz_defineMethod (c$, "getWindingRule", 
26915 function () {
26916 return this.windingRule;
26917 });
26918 Clazz_defineMethod (c$, "setWindingRule", 
26919 function (rule) {
26920 if (rule != 0 && rule != 1) {
26921 throw  new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
26922 }this.windingRule = rule;
26923 }, "~N");
26924 Clazz_defineMethod (c$, "getCurrentPoint", 
26925 function () {
26926 var index = this.numCoords;
26927 if (this.numTypes < 1 || index < 1) {
26928 return null;
26929 }if (this.pointTypes[this.numTypes - 1] == 4) {
26930 loop : for (var i = this.numTypes - 2; i > 0; i--) {
26931 switch (this.pointTypes[i]) {
26932 case 0:
26933 break loop;
26934 case 1:
26935 index -= 2;
26936 break;
26937 case 2:
26938 index -= 4;
26939 break;
26940 case 3:
26941 index -= 6;
26942 break;
26943 case 4:
26944 break;
26945 }
26946 }
26947 }return this.getPoint (index - 2);
26948 });
26949 Clazz_defineMethod (c$, "reset", 
26950 function () {
26951 this.numTypes = this.numCoords = 0;
26952 });
26953 Clazz_defineMethod (c$, "createTransformedShape", 
26954 function (at) {
26955 var p2d = this.clone ();
26956 if (at != null) {
26957 p2d.transform (at);
26958 }return p2d;
26959 }, "java.awt.geom.AffineTransform");
26960 Clazz_overrideMethod (c$, "getBounds", 
26961 function () {
26962 return this.getBounds2D ().getBounds ();
26963 });
26964 c$.contains = Clazz_defineMethod (c$, "contains", 
26965 function (pi, x, y) {
26966 if (x * 0.0 + y * 0.0 == 0.0) {
26967 var mask = (pi.getWindingRule () == 1 ? -1 : 1);
26968 var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y);
26969 return ((cross & mask) != 0);
26970 } else {
26971 return false;
26972 }}, "java.awt.geom.PathIterator,~N,~N");
26973 c$.contains = Clazz_defineMethod (c$, "contains", 
26974 function (pi, p) {
26975 return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ());
26976 }, "java.awt.geom.PathIterator,java.awt.geom.Point2D");
26977 Clazz_defineMethod (c$, "contains", 
26978 function (x, y) {
26979 if (x * 0.0 + y * 0.0 == 0.0) {
26980 if (this.numTypes < 2) {
26981 return false;
26982 }var mask = (this.windingRule == 1 ? -1 : 1);
26983 return ((this.pointCrossings (x, y) & mask) != 0);
26984 } else {
26985 return false;
26986 }}, "~N,~N");
26987 Clazz_defineMethod (c$, "contains", 
26988 function (p) {
26989 return this.contains (p.getX (), p.getY ());
26990 }, "java.awt.geom.Point2D");
26991 c$.contains = Clazz_defineMethod (c$, "contains", 
26992 function (pi, x, y, w, h) {
26993 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26994 return false;
26995 }if (w <= 0 || h <= 0) {
26996 return false;
26997 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26998 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26999 return (crossings != -2147483648 && (crossings & mask) != 0);
27000 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
27001 c$.contains = Clazz_defineMethod (c$, "contains", 
27002 function (pi, r) {
27003 return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27004 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
27005 Clazz_defineMethod (c$, "contains", 
27006 function (x, y, w, h) {
27007 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27008 return false;
27009 }if (w <= 0 || h <= 0) {
27010 return false;
27011 }var mask = (this.windingRule == 1 ? -1 : 2);
27012 var crossings = this.rectCrossings (x, y, x + w, y + h);
27013 return (crossings != -2147483648 && (crossings & mask) != 0);
27014 }, "~N,~N,~N,~N");
27015 Clazz_defineMethod (c$, "contains", 
27016 function (r) {
27017 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27018 }, "java.awt.geom.Rectangle2D");
27019 c$.intersects = Clazz_defineMethod (c$, "intersects", 
27020 function (pi, x, y, w, h) {
27021 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27022 return false;
27023 }if (w <= 0 || h <= 0) {
27024 return false;
27025 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
27026 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
27027 return (crossings == -2147483648 || (crossings & mask) != 0);
27028 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
27029 c$.intersects = Clazz_defineMethod (c$, "intersects", 
27030 function (pi, r) {
27031 return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27032 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
27033 Clazz_defineMethod (c$, "intersects", 
27034 function (x, y, w, h) {
27035 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
27036 return false;
27037 }if (w <= 0 || h <= 0) {
27038 return false;
27039 }var mask = (this.windingRule == 1 ? -1 : 2);
27040 var crossings = this.rectCrossings (x, y, x + w, y + h);
27041 return (crossings == -2147483648 || (crossings & mask) != 0);
27042 }, "~N,~N,~N,~N");
27043 Clazz_defineMethod (c$, "intersects", 
27044 function (r) {
27045 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
27046 }, "java.awt.geom.Rectangle2D");
27047 Clazz_overrideMethod (c$, "getPathIterator", 
27048 function (at, flatness) {
27049 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
27050 }, "java.awt.geom.AffineTransform,~N");
27051 Clazz_pu$h(self.c$);
27052 c$ = Clazz_decorateAsClass (function () {
27053 this.typeIdx = 0;
27054 this.pointIdx = 0;
27055 this.path = null;
27056 Clazz_instantialize (this, arguments);
27057 }, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator);
27058 Clazz_makeConstructor (c$, 
27059 function (a) {
27060 this.path = a;
27061 }, "java.awt.geom.Path2D");
27062 Clazz_overrideMethod (c$, "getWindingRule", 
27063 function () {
27064 return this.path.getWindingRule ();
27065 });
27066 Clazz_overrideMethod (c$, "isDone", 
27067 function () {
27068 return (this.typeIdx >= this.path.numTypes);
27069 });
27070 Clazz_overrideMethod (c$, "next", 
27071 function () {
27072 var a = this.path.pointTypes[this.typeIdx++];
27073 this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a];
27074 });
27075 Clazz_defineStatics (c$,
27076 "curvecoords",  Clazz_newIntArray (-1, [2, 2, 4, 6, 0]));
27077 c$ = Clazz_p0p ();
27078 Clazz_pu$h(self.c$);
27079 c$ = Clazz_decorateAsClass (function () {
27080 this.floatCoords = null;
27081 Clazz_instantialize (this, arguments);
27082 }, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D);
27083 Clazz_makeConstructor (c$, 
27084 function () {
27085 this.construct (1, 20);
27086 });
27087 Clazz_makeConstructor (c$, 
27088 function (a) {
27089 this.construct (a, 20);
27090 }, "~N");
27091 Clazz_makeConstructor (c$, 
27092 function (a, b) {
27093 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27094 this.setWindingRule (a);
27095 this.pointTypes =  Clazz_newByteArray (b, 0);
27096 this.floatCoords =  Clazz_newFloatArray (b * 2, 0);
27097 }, "~N,~N");
27098 Clazz_makeConstructor (c$, 
27099 function (a) {
27100 this.construct (a, null);
27101 }, "java.awt.Shape");
27102 Clazz_makeConstructor (c$, 
27103 function (a, b) {
27104 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27105 this.setPath (a, b);
27106 }, "java.awt.Shape,java.awt.geom.AffineTransform");
27107 Clazz_defineMethod (c$, "setPath", 
27108  function (a, b) {
27109 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27110 var c = a;
27111 this.setWindingRule (c.windingRule);
27112 this.numTypes = c.numTypes;
27113 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27114 this.numCoords = c.numCoords;
27115 this.floatCoords = c.cloneCoordsFloat (b);
27116 } else {
27117 var c = a.getPathIterator (b);
27118 this.setWindingRule (c.getWindingRule ());
27119 this.pointTypes =  Clazz_newByteArray (20, 0);
27120 this.floatCoords =  Clazz_newFloatArray (40, 0);
27121 this.append (c, false);
27122 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27123 Clazz_defineMethod (c$, "cloneCoordsFloat", 
27124 function (a) {
27125 var b;
27126 if (a == null) {
27127 b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length);
27128 } else {
27129 b =  Clazz_newFloatArray (this.floatCoords.length, 0);
27130 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27131 }return b;
27132 }, "java.awt.geom.AffineTransform");
27133 Clazz_overrideMethod (c$, "cloneCoordsDouble", 
27134 function (a) {
27135 var b =  Clazz_newDoubleArray (this.floatCoords.length, 0);
27136 if (a == null) {
27137 for (var c = 0; c < this.numCoords; c++) {
27138 b[c] = this.floatCoords[c];
27139 }
27140 } else {
27141 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27142 }return b;
27143 }, "java.awt.geom.AffineTransform");
27144 Clazz_defineMethod (c$, "append", 
27145 function (a, b) {
27146 {
27147 if (typeof pi == "number") {
27148 this.floatCoords[this.numCoords++] = pi;
27149 this.floatCoords[this.numCoords++] = connect;
27150 return;
27151 }
27152 }var c =  Clazz_newFloatArray (6, 0);
27153 while (!a.isDone ()) {
27154 switch (a.currentSegment (c)) {
27155 case 0:
27156 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27157 this.moveTo (c[0], c[1]);
27158 break;
27159 }if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) {
27160 break;
27161 }case 1:
27162 this.lineTo (c[0], c[1]);
27163 break;
27164 case 2:
27165 this.quadTo (c[0], c[1], c[2], c[3]);
27166 break;
27167 case 3:
27168 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27169 break;
27170 case 4:
27171 this.closePath ();
27172 break;
27173 }
27174 a.next ();
27175 b = false;
27176 }
27177 }, "java.awt.geom.PathIterator,~B");
27178 Clazz_overrideMethod (c$, "getPoint", 
27179 function (a) {
27180 return  new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]);
27181 }, "~N");
27182 Clazz_overrideMethod (c$, "needRoom", 
27183 function (a, b) {
27184 if (a && this.numTypes == 0) {
27185 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27186 }var c = this.pointTypes.length;
27187 if (this.numTypes >= c) {
27188 var d = c;
27189 if (d > 500) {
27190 d = 500;
27191 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27192 }c = this.floatCoords.length;
27193 if (this.numCoords + b > c) {
27194 var d = c;
27195 if (d > 1000) {
27196 d = 1000;
27197 }if (d < b) {
27198 d = b;
27199 }this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d);
27200 }}, "~B,~N");
27201 Clazz_defineMethod (c$, "moveTo", 
27202 function (a, b) {
27203 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27204 this.floatCoords[this.numCoords - 2] = a;
27205 this.floatCoords[this.numCoords - 1] = b;
27206 } else {
27207 this.needRoom (false, 2);
27208 this.pointTypes[this.numTypes++] = 0;
27209 this.floatCoords[this.numCoords++] = a;
27210 this.floatCoords[this.numCoords++] = b;
27211 }}, "~N,~N");
27212 Clazz_defineMethod (c$, "moveTo", 
27213 function (a, b) {
27214 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27215 this.floatCoords[this.numCoords - 2] = a;
27216 this.floatCoords[this.numCoords - 1] = b;
27217 } else {
27218 this.needRoom (false, 2);
27219 this.pointTypes[this.numTypes++] = 0;
27220 this.floatCoords[this.numCoords++] = a;
27221 this.floatCoords[this.numCoords++] = b;
27222 }}, "~N,~N");
27223 Clazz_defineMethod (c$, "lineTo", 
27224 function (a, b) {
27225 this.needRoom (true, 2);
27226 this.pointTypes[this.numTypes++] = 1;
27227 this.floatCoords[this.numCoords++] = a;
27228 this.floatCoords[this.numCoords++] = b;
27229 }, "~N,~N");
27230 Clazz_defineMethod (c$, "lineTo", 
27231 function (a, b) {
27232 this.needRoom (true, 2);
27233 this.pointTypes[this.numTypes++] = 1;
27234 this.floatCoords[this.numCoords++] = a;
27235 this.floatCoords[this.numCoords++] = b;
27236 }, "~N,~N");
27237 Clazz_defineMethod (c$, "quadTo", 
27238 function (a, b, c, d) {
27239 this.needRoom (true, 4);
27240 this.pointTypes[this.numTypes++] = 2;
27241 this.floatCoords[this.numCoords++] = a;
27242 this.floatCoords[this.numCoords++] = b;
27243 this.floatCoords[this.numCoords++] = c;
27244 this.floatCoords[this.numCoords++] = d;
27245 }, "~N,~N,~N,~N");
27246 Clazz_defineMethod (c$, "quadTo", 
27247 function (a, b, c, d) {
27248 this.needRoom (true, 4);
27249 this.pointTypes[this.numTypes++] = 2;
27250 this.floatCoords[this.numCoords++] = a;
27251 this.floatCoords[this.numCoords++] = b;
27252 this.floatCoords[this.numCoords++] = c;
27253 this.floatCoords[this.numCoords++] = d;
27254 }, "~N,~N,~N,~N");
27255 Clazz_defineMethod (c$, "curveTo", 
27256 function (a, b, c, d, e, f) {
27257 this.needRoom (true, 6);
27258 this.pointTypes[this.numTypes++] = 3;
27259 this.floatCoords[this.numCoords++] = a;
27260 this.floatCoords[this.numCoords++] = b;
27261 this.floatCoords[this.numCoords++] = c;
27262 this.floatCoords[this.numCoords++] = d;
27263 this.floatCoords[this.numCoords++] = e;
27264 this.floatCoords[this.numCoords++] = f;
27265 }, "~N,~N,~N,~N,~N,~N");
27266 Clazz_defineMethod (c$, "curveTo", 
27267 function (a, b, c, d, e, f) {
27268 this.needRoom (true, 6);
27269 this.pointTypes[this.numTypes++] = 3;
27270 this.floatCoords[this.numCoords++] = a;
27271 this.floatCoords[this.numCoords++] = b;
27272 this.floatCoords[this.numCoords++] = c;
27273 this.floatCoords[this.numCoords++] = d;
27274 this.floatCoords[this.numCoords++] = e;
27275 this.floatCoords[this.numCoords++] = f;
27276 }, "~N,~N,~N,~N,~N,~N");
27277 Clazz_overrideMethod (c$, "pointCrossings", 
27278 function (a, b) {
27279 var c;
27280 var d;
27281 var e;
27282 var f;
27283 var g;
27284 var h;
27285 var i = this.floatCoords;
27286 e = c = i[0];
27287 f = d = i[1];
27288 var j = 0;
27289 var k = 2;
27290 for (var l = 1; l < this.numTypes; l++) {
27291 switch (this.pointTypes[l]) {
27292 case 0:
27293 if (f != d) {
27294 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27295 }c = e = i[k++];
27296 d = f = i[k++];
27297 break;
27298 case 1:
27299 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27300 e = g;
27301 f = h;
27302 break;
27303 case 2:
27304 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27305 e = g;
27306 f = h;
27307 break;
27308 case 3:
27309 j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0);
27310 e = g;
27311 f = h;
27312 break;
27313 case 4:
27314 if (f != d) {
27315 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27316 }e = c;
27317 f = d;
27318 break;
27319 }
27320 }
27321 if (f != d) {
27322 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27323 }return j;
27324 }, "~N,~N");
27325 Clazz_overrideMethod (c$, "rectCrossings", 
27326 function (a, b, c, d) {
27327 var e = this.floatCoords;
27328 var f;
27329 var g;
27330 var h;
27331 var i;
27332 var j;
27333 var k;
27334 f = h = e[0];
27335 g = i = e[1];
27336 var l = 0;
27337 var m = 2;
27338 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27339 switch (this.pointTypes[n]) {
27340 case 0:
27341 if (f != h || g != i) {
27342 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27343 }h = f = e[m++];
27344 i = g = e[m++];
27345 break;
27346 case 1:
27347 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]);
27348 f = j;
27349 g = k;
27350 break;
27351 case 2:
27352 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27353 f = j;
27354 g = k;
27355 break;
27356 case 3:
27357 l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0);
27358 f = j;
27359 g = k;
27360 break;
27361 case 4:
27362 if (f != h || g != i) {
27363 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27364 }f = h;
27365 g = i;
27366 break;
27367 }
27368 }
27369 if (l != -2147483648 && (f != h || g != i)) {
27370 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27371 }return l;
27372 }, "~N,~N,~N,~N");
27373 Clazz_overrideMethod (c$, "transform", 
27374 function (a) {
27375 a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27376 }, "java.awt.geom.AffineTransform");
27377 Clazz_overrideMethod (c$, "getBounds2D", 
27378 function () {
27379 var a;
27380 var b;
27381 var c;
27382 var d;
27383 var e = this.numCoords;
27384 if (e > 0) {
27385 b = d = this.floatCoords[--e];
27386 a = c = this.floatCoords[--e];
27387 while (e > 0) {
27388 var f = this.floatCoords[--e];
27389 var g = this.floatCoords[--e];
27390 if (g < a) a = g;
27391 if (f < b) b = f;
27392 if (g > c) c = g;
27393 if (f > d) d = f;
27394 }
27395 } else {
27396 a = b = c = d = 0.0;
27397 }return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
27398 });
27399 Clazz_defineMethod (c$, "getPathIterator", 
27400 function (a) {
27401 if (a == null) {
27402 return  new java.awt.geom.Path2D.Float.CopyIterator (this);
27403 } else {
27404 return  new java.awt.geom.Path2D.Float.TxIterator (this, a);
27405 }}, "java.awt.geom.AffineTransform");
27406 Clazz_overrideMethod (c$, "clone", 
27407 function () {
27408 return  new java.awt.geom.Path2D.Float (this);
27409 });
27410 Clazz_pu$h(self.c$);
27411 c$ = Clazz_decorateAsClass (function () {
27412 this.floatCoords = null;
27413 Clazz_instantialize (this, arguments);
27414 }, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator);
27415 Clazz_makeConstructor (c$, 
27416 function (a) {
27417 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]);
27418 this.floatCoords = a.floatCoords;
27419 }, "java.awt.geom.Path2D.Float");
27420 Clazz_defineMethod (c$, "currentSegment", 
27421 function (a) {
27422 var b = this.path.pointTypes[this.typeIdx];
27423 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27424 if (c > 0) {
27425 for (var d = 0; d < c; d++) {
27426 a[d] = this.floatCoords[this.pointIdx + d];
27427 }
27428 }return b;
27429 }, "~A");
27430 c$ = Clazz_p0p ();
27431 Clazz_pu$h(self.c$);
27432 c$ = Clazz_decorateAsClass (function () {
27433 this.floatCoords = null;
27434 this.affine = null;
27435 Clazz_instantialize (this, arguments);
27436 }, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator);
27437 Clazz_makeConstructor (c$, 
27438 function (a, b) {
27439 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]);
27440 this.floatCoords = a.floatCoords;
27441 this.affine = b;
27442 }, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform");
27443 Clazz_defineMethod (c$, "currentSegment", 
27444 function (a) {
27445 var b = this.path.pointTypes[this.typeIdx];
27446 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27447 if (c > 0) {
27448 this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27449 }return b;
27450 }, "~A");
27451 c$ = Clazz_p0p ();
27452 c$ = Clazz_p0p ();
27453 Clazz_pu$h(self.c$);
27454 c$ = Clazz_decorateAsClass (function () {
27455 this.doubleCoords = null;
27456 Clazz_instantialize (this, arguments);
27457 }, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D);
27458 Clazz_makeConstructor (c$, 
27459 function () {
27460 this.construct (1, 20);
27461 });
27462 Clazz_makeConstructor (c$, 
27463 function (a) {
27464 this.construct (a, 20);
27465 }, "~N");
27466 Clazz_makeConstructor (c$, 
27467 function (a, b) {
27468 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]);
27469 this.doubleCoords =  Clazz_newDoubleArray (b * 2, 0);
27470 }, "~N,~N");
27471 Clazz_makeConstructor (c$, 
27472 function (a) {
27473 this.construct (a, null);
27474 }, "java.awt.Shape");
27475 Clazz_makeConstructor (c$, 
27476 function (a, b) {
27477 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []);
27478 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27479 var c = a;
27480 this.setWindingRule (c.windingRule);
27481 this.numTypes = c.numTypes;
27482 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27483 this.numCoords = c.numCoords;
27484 this.doubleCoords = c.cloneCoordsDouble (b);
27485 } else {
27486 var c = a.getPathIterator (b);
27487 this.setWindingRule (c.getWindingRule ());
27488 this.pointTypes =  Clazz_newByteArray (20, 0);
27489 this.doubleCoords =  Clazz_newDoubleArray (40, 0);
27490 this.append (c, false);
27491 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27492 Clazz_overrideMethod (c$, "cloneCoordsFloat", 
27493 function (a) {
27494 var b =  Clazz_newFloatArray (this.doubleCoords.length, 0);
27495 if (a == null) {
27496 for (var c = 0; c < this.numCoords; c++) {
27497 b[c] = this.doubleCoords[c];
27498 }
27499 } else {
27500 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27501 }return b;
27502 }, "java.awt.geom.AffineTransform");
27503 Clazz_defineMethod (c$, "cloneCoordsDouble", 
27504 function (a) {
27505 var b;
27506 if (a == null) {
27507 b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length);
27508 } else {
27509 b =  Clazz_newDoubleArray (this.doubleCoords.length, 0);
27510 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27511 }return b;
27512 }, "java.awt.geom.AffineTransform");
27513 Clazz_defineMethod (c$, "append", 
27514 function (a, b) {
27515 {
27516 if (typeof pi == "number") {
27517 this.floatCoords[this.numCoords++] = pi;
27518 this.floatCoords[this.numCoords++] = connect;
27519 return;
27520 }
27521 }var c =  Clazz_newDoubleArray (6, 0);
27522 while (!a.isDone ()) {
27523 switch (a.currentSegment (c)) {
27524 case 0:
27525 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27526 this.moveTo (c[0], c[1]);
27527 break;
27528 }if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) {
27529 break;
27530 }case 1:
27531 this.lineTo (c[0], c[1]);
27532 break;
27533 case 2:
27534 this.quadTo (c[0], c[1], c[2], c[3]);
27535 break;
27536 case 3:
27537 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27538 break;
27539 case 4:
27540 this.closePath ();
27541 break;
27542 }
27543 a.next ();
27544 b = false;
27545 }
27546 }, "java.awt.geom.PathIterator,~B");
27547 Clazz_overrideMethod (c$, "getPoint", 
27548 function (a) {
27549 return  new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]);
27550 }, "~N");
27551 Clazz_overrideMethod (c$, "needRoom", 
27552 function (a, b) {
27553 if (a && this.numTypes == 0) {
27554 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27555 }var c = this.pointTypes.length;
27556 if (this.numTypes >= c) {
27557 var d = c;
27558 if (d > 500) {
27559 d = 500;
27560 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27561 }c = this.doubleCoords.length;
27562 if (this.numCoords + b > c) {
27563 var d = c;
27564 if (d > 1000) {
27565 d = 1000;
27566 }if (d < b) {
27567 d = b;
27568 }this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d);
27569 }}, "~B,~N");
27570 Clazz_overrideMethod (c$, "moveTo", 
27571 function (a, b) {
27572 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27573 this.doubleCoords[this.numCoords - 2] = a;
27574 this.doubleCoords[this.numCoords - 1] = b;
27575 } else {
27576 this.needRoom (false, 2);
27577 this.pointTypes[this.numTypes++] = 0;
27578 this.doubleCoords[this.numCoords++] = a;
27579 this.doubleCoords[this.numCoords++] = b;
27580 }}, "~N,~N");
27581 Clazz_overrideMethod (c$, "lineTo", 
27582 function (a, b) {
27583 this.needRoom (true, 2);
27584 this.pointTypes[this.numTypes++] = 1;
27585 this.doubleCoords[this.numCoords++] = a;
27586 this.doubleCoords[this.numCoords++] = b;
27587 }, "~N,~N");
27588 Clazz_overrideMethod (c$, "quadTo", 
27589 function (a, b, c, d) {
27590 this.needRoom (true, 4);
27591 this.pointTypes[this.numTypes++] = 2;
27592 this.doubleCoords[this.numCoords++] = a;
27593 this.doubleCoords[this.numCoords++] = b;
27594 this.doubleCoords[this.numCoords++] = c;
27595 this.doubleCoords[this.numCoords++] = d;
27596 }, "~N,~N,~N,~N");
27597 Clazz_overrideMethod (c$, "curveTo", 
27598 function (a, b, c, d, e, f) {
27599 this.needRoom (true, 6);
27600 this.pointTypes[this.numTypes++] = 3;
27601 this.doubleCoords[this.numCoords++] = a;
27602 this.doubleCoords[this.numCoords++] = b;
27603 this.doubleCoords[this.numCoords++] = c;
27604 this.doubleCoords[this.numCoords++] = d;
27605 this.doubleCoords[this.numCoords++] = e;
27606 this.doubleCoords[this.numCoords++] = f;
27607 }, "~N,~N,~N,~N,~N,~N");
27608 Clazz_overrideMethod (c$, "pointCrossings", 
27609 function (a, b) {
27610 var c;
27611 var d;
27612 var e;
27613 var f;
27614 var g;
27615 var h;
27616 var i = this.doubleCoords;
27617 e = c = i[0];
27618 f = d = i[1];
27619 var j = 0;
27620 var k = 2;
27621 for (var l = 1; l < this.numTypes; l++) {
27622 switch (this.pointTypes[l]) {
27623 case 0:
27624 if (f != d) {
27625 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27626 }c = e = i[k++];
27627 d = f = i[k++];
27628 break;
27629 case 1:
27630 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27631 e = g;
27632 f = h;
27633 break;
27634 case 2:
27635 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27636 e = g;
27637 f = h;
27638 break;
27639 case 3:
27640 j += jssun.awt.geom.Curve.pointCrossingsForCubic (a, b, e, f, i[k++], i[k++], i[k++], i[k++], g = i[k++], h = i[k++], 0);
27641 e = g;
27642 f = h;
27643 break;
27644 case 4:
27645 if (f != d) {
27646 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27647 }e = c;
27648 f = d;
27649 break;
27650 }
27651 }
27652 if (f != d) {
27653 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27654 }return j;
27655 }, "~N,~N");
27656 Clazz_overrideMethod (c$, "rectCrossings", 
27657 function (a, b, c, d) {
27658 var e = this.doubleCoords;
27659 var f;
27660 var g;
27661 var h;
27662 var i;
27663 var j;
27664 var k;
27665 f = h = e[0];
27666 g = i = e[1];
27667 var l = 0;
27668 var m = 2;
27669 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27670 switch (this.pointTypes[n]) {
27671 case 0:
27672 if (f != h || g != i) {
27673 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27674 }h = f = e[m++];
27675 i = g = e[m++];
27676 break;
27677 case 1:
27678 j = e[m++];
27679 k = e[m++];
27680 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k);
27681 f = j;
27682 g = k;
27683 break;
27684 case 2:
27685 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27686 f = j;
27687 g = k;
27688 break;
27689 case 3:
27690 l = jssun.awt.geom.Curve.rectCrossingsForCubic (l, a, b, c, d, f, g, e[m++], e[m++], e[m++], e[m++], j = e[m++], k = e[m++], 0);
27691 f = j;
27692 g = k;
27693 break;
27694 case 4:
27695 if (f != h || g != i) {
27696 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27697 }f = h;
27698 g = i;
27699 break;
27700 }
27701 }
27702 if (l != -2147483648 && (f != h || g != i)) {
27703 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27704 }return l;
27705 }, "~N,~N,~N,~N");
27706 Clazz_overrideMethod (c$, "transform", 
27707 function (a) {
27708 a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27709 }, "java.awt.geom.AffineTransform");
27710 Clazz_overrideMethod (c$, "getBounds2D", 
27711 function () {
27712 var a;
27713 var b;
27714 var c;
27715 var d;
27716 var e = this.numCoords;
27717 if (e > 0) {
27718 b = d = this.doubleCoords[--e];
27719 a = c = this.doubleCoords[--e];
27720 while (e > 0) {
27721 var f = this.doubleCoords[--e];
27722 var g = this.doubleCoords[--e];
27723 if (g < a) a = g;
27724 if (f < b) b = f;
27725 if (g > c) c = g;
27726 if (f > d) d = f;
27727 }
27728 } else {
27729 a = b = c = d = 0.0;
27730 }return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
27731 });
27732 Clazz_defineMethod (c$, "getPathIterator", 
27733 function (a) {
27734 if (a == null) {
27735 return  new java.awt.geom.Path2D.Double.CopyIterator (this);
27736 } else {
27737 return  new java.awt.geom.Path2D.Double.TxIterator (this, a);
27738 }}, "java.awt.geom.AffineTransform");
27739 Clazz_overrideMethod (c$, "clone", 
27740 function () {
27741 return  new java.awt.geom.Path2D.Double (this);
27742 });
27743 Clazz_pu$h(self.c$);
27744 c$ = Clazz_decorateAsClass (function () {
27745 this.doubleCoords = null;
27746 Clazz_instantialize (this, arguments);
27747 }, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator);
27748 Clazz_makeConstructor (c$, 
27749 function (a) {
27750 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]);
27751 this.doubleCoords = a.doubleCoords;
27752 }, "java.awt.geom.Path2D.Double");
27753 Clazz_defineMethod (c$, "currentSegment", 
27754 function (a) {
27755 var b = this.path.pointTypes[this.typeIdx];
27756 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27757 if (c > 0) {
27758 for (var d = 0; d < c; d++) {
27759 a[d] = this.doubleCoords[this.pointIdx + d];
27760 }
27761 }return b;
27762 }, "~A");
27763 Clazz_defineMethod (c$, "currentSegment", 
27764 function (a) {
27765 var b = this.path.pointTypes[this.typeIdx];
27766 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27767 if (c > 0) {
27768 System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c);
27769 }return b;
27770 }, "~A");
27771 c$ = Clazz_p0p ();
27772 Clazz_pu$h(self.c$);
27773 c$ = Clazz_decorateAsClass (function () {
27774 this.doubleCoords = null;
27775 this.affine = null;
27776 Clazz_instantialize (this, arguments);
27777 }, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator);
27778 Clazz_makeConstructor (c$, 
27779 function (a, b) {
27780 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]);
27781 this.doubleCoords = a.doubleCoords;
27782 this.affine = b;
27783 }, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform");
27784 Clazz_defineMethod (c$, "currentSegment", 
27785 function (a) {
27786 var b = this.path.pointTypes[this.typeIdx];
27787 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27788 if (c > 0) {
27789 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27790 }return b;
27791 }, "~A");
27792 Clazz_defineMethod (c$, "currentSegment", 
27793 function (a) {
27794 var b = this.path.pointTypes[this.typeIdx];
27795 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27796 if (c > 0) {
27797 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27798 }return b;
27799 }, "~A");
27800 c$ = Clazz_p0p ();
27801 c$ = Clazz_p0p ();
27802 Clazz_defineStatics (c$,
27803 "WIND_EVEN_ODD", 0,
27804 "WIND_NON_ZERO", 1,
27805 "SEG_MOVETO", 0,
27806 "SEG_LINETO", 1,
27807 "SEG_QUADTO", 2,
27808 "SEG_CUBICTO", 3,
27809 "SEG_CLOSE", 4,
27810 "INIT_SIZE", 20,
27811 "EXPAND_MAX", 500);
27812 });
27813 Clazz_declarePackage ("javax.swing");
27814 Clazz_declareInterface (javax.swing, "Icon");
27815 Clazz_declarePackage ("javax.swing");
27816 Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () {
27817 c$ = Clazz_decorateAsClass (function () {
27818 this.echoChar = '\0';
27819 this.echoCharSet = false;
27820 Clazz_instantialize (this, arguments);
27821 }, javax.swing, "JPasswordField", javax.swing.JTextField);
27822 Clazz_makeConstructor (c$, 
27823 function () {
27824 this.construct (null, null, 0);
27825 });
27826 Clazz_makeConstructor (c$, 
27827 function (text) {
27828 this.construct (null, text, 0);
27829 }, "~S");
27830 Clazz_makeConstructor (c$, 
27831 function (columns) {
27832 this.construct (null, null, columns);
27833 }, "~N");
27834 Clazz_makeConstructor (c$, 
27835 function (text, columns) {
27836 this.construct (null, text, columns);
27837 }, "~S,~N");
27838 Clazz_overrideMethod (c$, "getUIClassID", 
27839 function () {
27840 return "PasswordFieldUI";
27841 });
27842 Clazz_defineMethod (c$, "updateUI", 
27843 function () {
27844 if (!this.echoCharSet) {
27845 this.echoChar = '*';
27846 }Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []);
27847 });
27848 Clazz_defineMethod (c$, "getEchoChar", 
27849 function () {
27850 return this.echoChar;
27851 });
27852 Clazz_defineMethod (c$, "setEchoChar", 
27853 function (c) {
27854 this.echoChar = c;
27855 this.echoCharSet = true;
27856 this.repaint ();
27857 this.revalidate ();
27858 }, "~S");
27859 Clazz_defineMethod (c$, "echoCharIsSet", 
27860 function () {
27861 return this.echoChar.charCodeAt (0) != 0;
27862 });
27863 Clazz_overrideMethod (c$, "cut", 
27864 function () {
27865 });
27866 Clazz_overrideMethod (c$, "copy", 
27867 function () {
27868 });
27869 Clazz_defineMethod (c$, "getPassword", 
27870 function () {
27871 var doc = this.getDocument ();
27872 var txt =  new javax.swing.text.Segment ();
27873 try {
27874 doc.getText (0, doc.getLength (), txt);
27875 } catch (e) {
27876 if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) {
27877 return null;
27878 } else {
27879 throw e;
27880 }
27881 }
27882 var retValue =  Clazz_newCharArray (txt.count, '\0');
27883 System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count);
27884 return retValue;
27885 });
27886 Clazz_defineMethod (c$, "paramString", 
27887 function () {
27888 return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar;
27889 });
27890 Clazz_defineMethod (c$, "customSetUIProperty", 
27891 function (propertyName, value) {
27892 if (propertyName === "echoChar") {
27893 if (!this.echoCharSet) {
27894 this.setEchoChar ((value).charValue ());
27895 this.echoCharSet = false;
27896 }return true;
27897 }return false;
27898 }, "~S,~O");
27899 Clazz_defineStatics (c$,
27900 "$$uiClassID", "PasswordFieldUI");
27901 });
27902 Clazz_declarePackage ("javax.swing");
27903 Clazz_load (["javax.swing.ActionPropertyChangeListener", "$.SwingConstants", "javax.swing.event.ChangeListener", "javax.swing.text.JTextComponent", "$.TextAction"], "javax.swing.JTextField", ["java.lang.Boolean", "$.IllegalArgumentException", "java.awt.EventQueue", "java.awt.event.ActionEvent", "$.ActionListener", "$.InputEvent", "javax.swing.AbstractAction", "$.JViewport", "swingjs.JSToolkit"], function () {
27904 c$ = Clazz_decorateAsClass (function () {
27905 this.$action = null;
27906 this.actionPropertyChangeListener = null;
27907 this.horizontalAlignment = 10;
27908 this.columns = 0;
27909 this.columnWidth = 0;
27910 this.command = null;
27911 if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) {
27912 javax.swing.JTextField.$JTextField$ScrollRepainter$ ();
27913 }
27914 Clazz_instantialize (this, arguments);
27915 }, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants);
27916 Clazz_makeConstructor (c$, 
27917 function () {
27918 this.construct (null, null, 0);
27919 });
27920 Clazz_makeConstructor (c$, 
27921 function (text) {
27922 this.construct (null, text, 0);
27923 }, "~S");
27924 Clazz_makeConstructor (c$, 
27925 function (columns) {
27926 this.construct (null, null, columns);
27927 }, "~N");
27928 Clazz_makeConstructor (c$, 
27929 function (text, columns) {
27930 this.construct (null, text, columns);
27931 }, "~S,~N");
27932 Clazz_makeConstructor (c$, 
27933 function (doc, text, columns) {
27934 Clazz_superConstructor (this, javax.swing.JTextField);
27935 if (columns < 0) {
27936 throw  new IllegalArgumentException ("columns less than zero.");
27937 }this.columns = columns;
27938 if (doc == null) {
27939 doc = this.createDefaultModel ();
27940 }this.setDocument (doc);
27941 if (text != null) {
27942 this.setText (text);
27943 }}, "javax.swing.text.Document,~S,~N");
27944 Clazz_overrideMethod (c$, "getUIClassID", 
27945 function () {
27946 return "TextFieldUI";
27947 });
27948 Clazz_defineMethod (c$, "setDocument", 
27949 function (doc) {
27950 if (doc != null) {
27951 doc.putProperty ("filterNewlines", Boolean.TRUE);
27952 }Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]);
27953 }, "javax.swing.text.Document");
27954 Clazz_overrideMethod (c$, "isValidateRoot", 
27955 function () {
27956 var parent = this.getParent ();
27957 if (Clazz_instanceOf (parent, javax.swing.JViewport)) {
27958 return false;
27959 }return true;
27960 });
27961 Clazz_defineMethod (c$, "getHorizontalAlignment", 
27962 function () {
27963 return this.horizontalAlignment;
27964 });
27965 Clazz_defineMethod (c$, "setHorizontalAlignment", 
27966 function (alignment) {
27967 if (alignment == this.horizontalAlignment) return;
27968 var oldValue = this.horizontalAlignment;
27969 if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) {
27970 this.horizontalAlignment = alignment;
27971 } else {
27972 throw  new IllegalArgumentException ("horizontalAlignment");
27973 }this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
27974 this.invalidate ();
27975 this.repaint ();
27976 }, "~N");
27977 Clazz_defineMethod (c$, "createDefaultModel", 
27978 function () {
27979 return swingjs.JSToolkit.getPlainDocument (this);
27980 });
27981 Clazz_defineMethod (c$, "getColumns", 
27982 function () {
27983 return this.columns;
27984 });
27985 Clazz_defineMethod (c$, "setColumns", 
27986 function (columns) {
27987 var oldVal = this.columns;
27988 if (columns < 0) {
27989 throw  new IllegalArgumentException ("columns less than zero.");
27990 }if (columns != oldVal) {
27991 this.columns = columns;
27992 this.invalidate ();
27993 }}, "~N");
27994 Clazz_defineMethod (c$, "getColumnWidth", 
27995 function () {
27996 if (this.columnWidth == 0) {
27997 var metrics = this.getFontMetrics (this.getFont ());
27998 this.columnWidth = metrics.charWidth ('m');
27999 }return this.columnWidth;
28000 });
28001 Clazz_overrideMethod (c$, "getPreferredSize", 
28002 function () {
28003 return this.getPrefSizeJTF ();
28004 });
28005 Clazz_defineMethod (c$, "getPrefSizeJTF", 
28006 function () {
28007 var size = this.getPrefSizeJComp ();
28008 if (this.columns != 0) {
28009 var insets = this.getInsets ();
28010 size.width = this.columns * this.getColumnWidth () + insets.left + insets.right;
28011 }return size;
28012 });
28013 Clazz_defineMethod (c$, "setFont", 
28014 function (f) {
28015 Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]);
28016 this.columnWidth = 0;
28017 }, "java.awt.Font");
28018 Clazz_defineMethod (c$, "addActionListener", 
28019 function (l) {
28020 this.listenerList.add (java.awt.event.ActionListener, l);
28021 }, "java.awt.event.ActionListener");
28022 Clazz_defineMethod (c$, "removeActionListener", 
28023 function (l) {
28024 if ((l != null) && (this.getAction () === l)) {
28025 this.setAction (null);
28026 } else {
28027 this.listenerList.remove (java.awt.event.ActionListener, l);
28028 }}, "java.awt.event.ActionListener");
28029 Clazz_defineMethod (c$, "getActionListeners", 
28030 function () {
28031 return this.listenerList.getListeners (java.awt.event.ActionListener);
28032 });
28033 Clazz_defineMethod (c$, "fireActionPerformed", 
28034 function () {
28035 var listeners = this.listenerList.getListenerList ();
28036 var modifiers = 0;
28037 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
28038 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
28039 modifiers = (currentEvent).getModifiers ();
28040 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
28041 modifiers = (currentEvent).getModifiers ();
28042 }var e =  new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers);
28043 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28044 if (listeners[i] === java.awt.event.ActionListener) {
28045 (listeners[i + 1]).actionPerformed (e);
28046 }}
28047 });
28048 Clazz_defineMethod (c$, "setActionCommand", 
28049 function (command) {
28050 this.command = command;
28051 }, "~S");
28052 Clazz_defineMethod (c$, "setAction", 
28053 function (a) {
28054 var oldValue = this.getAction ();
28055 if (this.$action == null || !this.$action.equals (a)) {
28056 this.$action = a;
28057 if (oldValue != null) {
28058 this.removeActionListener (oldValue);
28059 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
28060 this.actionPropertyChangeListener = null;
28061 }this.configurePropertiesFromAction (this.$action);
28062 if (this.$action != null) {
28063 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
28064 this.addActionListener (this.$action);
28065 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
28066 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
28067 }this.firePropertyChangeObject ("action", oldValue, this.$action);
28068 }}, "javax.swing.Action");
28069 Clazz_defineMethod (c$, "isListener", 
28070  function (c, a) {
28071 var isListener = false;
28072 var listeners = this.listenerList.getListenerList ();
28073 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28074 if (listeners[i] === c && listeners[i + 1] === a) {
28075 isListener = true;
28076 }}
28077 return isListener;
28078 }, "Class,java.awt.event.ActionListener");
28079 Clazz_defineMethod (c$, "getAction", 
28080 function () {
28081 return this.$action;
28082 });
28083 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
28084 function (a) {
28085 javax.swing.AbstractAction.setEnabledFromAction (this, a);
28086 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
28087 this.setActionCommandFromAction (a);
28088 }, "javax.swing.Action");
28089 Clazz_defineMethod (c$, "actionPropertyChanged", 
28090 function (action, propertyName) {
28091 if (propertyName === "ActionCommandKey") {
28092 this.setActionCommandFromAction (action);
28093 } else if (propertyName === "enabled") {
28094 javax.swing.AbstractAction.setEnabledFromAction (this, action);
28095 } else if (propertyName === "ShortDescription") {
28096 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
28097 }}, "javax.swing.Action,~S");
28098 Clazz_defineMethod (c$, "setActionCommandFromAction", 
28099  function (action) {
28100 this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey"));
28101 }, "javax.swing.Action");
28102 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
28103 function (a) {
28104 return  new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a);
28105 }, "javax.swing.Action");
28106 Clazz_defineMethod (c$, "getActions", 
28107 function () {
28108 return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions);
28109 });
28110 Clazz_defineMethod (c$, "postActionEvent", 
28111 function () {
28112 this.fireActionPerformed ();
28113 });
28114 Clazz_defineMethod (c$, "hasActionListener", 
28115 function () {
28116 var listeners = this.listenerList.getListenerList ();
28117 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28118 if (listeners[i] === java.awt.event.ActionListener) {
28119 return true;
28120 }}
28121 return false;
28122 });
28123 Clazz_defineMethod (c$, "paramString", 
28124 function () {
28125 var horizontalAlignmentString;
28126 if (this.horizontalAlignment == 2) {
28127 horizontalAlignmentString = "LEFT";
28128 } else if (this.horizontalAlignment == 0) {
28129 horizontalAlignmentString = "CENTER";
28130 } else if (this.horizontalAlignment == 4) {
28131 horizontalAlignmentString = "RIGHT";
28132 } else if (this.horizontalAlignment == 10) {
28133 horizontalAlignmentString = "LEADING";
28134 } else if (this.horizontalAlignment == 11) {
28135 horizontalAlignmentString = "TRAILING";
28136 } else horizontalAlignmentString = "";
28137 var commandString = (this.command != null ? this.command : "");
28138 return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString;
28139 });
28140 c$.$JTextField$ScrollRepainter$ = function () {
28141 Clazz_pu$h(self.c$);
28142 c$ = Clazz_decorateAsClass (function () {
28143 Clazz_prepareCallback (this, arguments);
28144 Clazz_instantialize (this, arguments);
28145 }, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener);
28146 Clazz_overrideMethod (c$, "stateChanged", 
28147 function (a) {
28148 this.b$["javax.swing.JTextField"].repaint ();
28149 }, "javax.swing.event.ChangeEvent");
28150 c$ = Clazz_p0p ();
28151 };
28152 Clazz_pu$h(self.c$);
28153 c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
28154 Clazz_overrideMethod (c$, "actionPropertyChanged", 
28155 function (a, b, c) {
28156 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
28157 a.configurePropertiesFromAction (b);
28158 } else {
28159 a.actionPropertyChanged (b, c.getPropertyName ());
28160 }}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent");
28161 c$ = Clazz_p0p ();
28162 Clazz_pu$h(self.c$);
28163 c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction);
28164 Clazz_makeConstructor (c$, 
28165 function () {
28166 Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]);
28167 });
28168 Clazz_overrideMethod (c$, "actionPerformed", 
28169 function (a) {
28170 var b = this.getFocusedComponent ();
28171 if (Clazz_instanceOf (b, javax.swing.JTextField)) {
28172 var c = b;
28173 c.postActionEvent ();
28174 }}, "java.awt.event.ActionEvent");
28175 Clazz_overrideMethod (c$, "isEnabled", 
28176 function () {
28177 var a = this.getFocusedComponent ();
28178 if (Clazz_instanceOf (a, javax.swing.JTextField)) {
28179 return (a).hasActionListener ();
28180 }return false;
28181 });
28182 c$ = Clazz_p0p ();
28183 Clazz_defineStatics (c$,
28184 "notifyAction", "notify-field-accept");
28185 c$.defaultActions = c$.prototype.defaultActions =  Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]);
28186 Clazz_defineStatics (c$,
28187 "$uiClassID", "TextFieldUI");
28188 });
28189 Clazz_declarePackage ("javax.swing");
28190 Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () {
28191 c$ = Clazz_decorateAsClass (function () {
28192 this.action = null;
28193 Clazz_instantialize (this, arguments);
28194 }, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener);
28195 Clazz_makeConstructor (c$, 
28196 function (c, a) {
28197 this.setTarget (c);
28198 this.action = a;
28199 }, "~O,javax.swing.Action");
28200 Clazz_overrideMethod (c$, "propertyChange", 
28201 function (e) {
28202 var target = this.getTarget ();
28203 if (target == null) {
28204 this.getAction ().removePropertyChangeListener (this);
28205 } else {
28206 this.actionPropertyChanged (target, this.getAction (), e);
28207 }}, "java.beans.PropertyChangeEvent");
28208 Clazz_defineMethod (c$, "setTarget", 
28209  function (c) {
28210 }, "~O");
28211 Clazz_defineMethod (c$, "getTarget", 
28212 function () {
28213 return null;
28214 });
28215 Clazz_defineMethod (c$, "getAction", 
28216 function () {
28217 return this.action;
28218 });
28219 });
28220 Clazz_declarePackage ("javax.swing.event");
28221 Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () {
28222 Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener);
28223 });
28224 Clazz_declarePackage ("javax.swing");
28225 Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28226 c$ = Clazz_decorateAsClass (function () {
28227 this.arrayTable = null;
28228 this.parent = null;
28229 Clazz_instantialize (this, arguments);
28230 }, javax.swing, "ActionMap");
28231 Clazz_makeConstructor (c$, 
28232 function () {
28233 });
28234 Clazz_defineMethod (c$, "setParent", 
28235 function (map) {
28236 this.parent = map;
28237 }, "javax.swing.ActionMap");
28238 Clazz_defineMethod (c$, "getParent", 
28239 function () {
28240 return this.parent;
28241 });
28242 Clazz_defineMethod (c$, "put", 
28243 function (key, action) {
28244 if (key == null) {
28245 return;
28246 }if (action == null) {
28247 this.remove (key);
28248 } else {
28249 if (this.arrayTable == null) {
28250 this.arrayTable =  new javax.swing.ArrayTable ();
28251 }this.arrayTable.put (key, action);
28252 }}, "~O,javax.swing.Action");
28253 Clazz_defineMethod (c$, "get", 
28254 function (key) {
28255 var value = (this.arrayTable == null) ? null : this.arrayTable.get (key);
28256 if (value == null) {
28257 var parent = this.getParent ();
28258 if (parent != null) {
28259 return parent.get (key);
28260 }}return value;
28261 }, "~O");
28262 Clazz_defineMethod (c$, "remove", 
28263 function (key) {
28264 if (this.arrayTable != null) {
28265 this.arrayTable.remove (key);
28266 }}, "~O");
28267 Clazz_defineMethod (c$, "clear", 
28268 function () {
28269 if (this.arrayTable != null) {
28270 this.arrayTable.clear ();
28271 }});
28272 Clazz_defineMethod (c$, "keys", 
28273 function () {
28274 if (this.arrayTable == null) {
28275 return null;
28276 }return this.arrayTable.getKeys (null);
28277 });
28278 Clazz_defineMethod (c$, "size", 
28279 function () {
28280 if (this.arrayTable == null) {
28281 return 0;
28282 }return this.arrayTable.size ();
28283 });
28284 Clazz_defineMethod (c$, "allKeys", 
28285 function () {
28286 var count = this.size ();
28287 var parent = this.getParent ();
28288 if (count == 0) {
28289 if (parent != null) {
28290 return parent.allKeys ();
28291 }return this.keys ();
28292 }if (parent == null) {
28293 return this.keys ();
28294 }var keys = this.keys ();
28295 var pKeys = parent.allKeys ();
28296 if (pKeys == null) {
28297 return keys;
28298 }if (keys == null) {
28299 return pKeys;
28300 }var keyMap =  new java.util.HashMap ();
28301 var counter;
28302 for (counter = keys.length - 1; counter >= 0; counter--) {
28303 keyMap.put (keys[counter], keys[counter]);
28304 }
28305 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28306 keyMap.put (pKeys[counter], pKeys[counter]);
28307 }
28308 return keyMap.keySet ().toArray ();
28309 });
28310 });
28311 Clazz_declarePackage ("javax.swing");
28312 Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28313 c$ = Clazz_decorateAsClass (function () {
28314 this.arrayTable = null;
28315 this.parent = null;
28316 Clazz_instantialize (this, arguments);
28317 }, javax.swing, "InputMap");
28318 Clazz_makeConstructor (c$, 
28319 function () {
28320 });
28321 Clazz_defineMethod (c$, "setParent", 
28322 function (map) {
28323 this.parent = map;
28324 }, "javax.swing.InputMap");
28325 Clazz_defineMethod (c$, "getParent", 
28326 function () {
28327 return this.parent;
28328 });
28329 Clazz_defineMethod (c$, "put", 
28330 function (keyStroke, actionMapKey) {
28331 if (keyStroke == null) {
28332 return;
28333 }if (actionMapKey == null) {
28334 this.remove (keyStroke);
28335 } else {
28336 if (this.arrayTable == null) {
28337 this.arrayTable =  new javax.swing.ArrayTable ();
28338 }this.arrayTable.put (keyStroke, actionMapKey);
28339 }}, "javax.swing.KeyStroke,~O");
28340 Clazz_defineMethod (c$, "get", 
28341 function (keyStroke) {
28342 if (this.arrayTable == null) {
28343 var parent = this.getParent ();
28344 if (parent != null) {
28345 return parent.get (keyStroke);
28346 }return null;
28347 }var value = this.arrayTable.get (keyStroke);
28348 if (value == null) {
28349 var parent = this.getParent ();
28350 if (parent != null) {
28351 return parent.get (keyStroke);
28352 }}return value;
28353 }, "javax.swing.KeyStroke");
28354 Clazz_defineMethod (c$, "remove", 
28355 function (key) {
28356 if (this.arrayTable != null) {
28357 this.arrayTable.remove (key);
28358 }}, "javax.swing.KeyStroke");
28359 Clazz_defineMethod (c$, "clear", 
28360 function () {
28361 if (this.arrayTable != null) {
28362 this.arrayTable.clear ();
28363 }});
28364 Clazz_defineMethod (c$, "keys", 
28365 function () {
28366 if (this.arrayTable == null) {
28367 return null;
28368 }var keys =  new Array (this.arrayTable.size ());
28369 this.arrayTable.getKeys (keys);
28370 return keys;
28371 });
28372 Clazz_defineMethod (c$, "size", 
28373 function () {
28374 if (this.arrayTable == null) {
28375 return 0;
28376 }return this.arrayTable.size ();
28377 });
28378 Clazz_defineMethod (c$, "allKeys", 
28379 function () {
28380 var count = this.size ();
28381 var parent = this.getParent ();
28382 if (count == 0) {
28383 if (parent != null) {
28384 return parent.allKeys ();
28385 }return this.keys ();
28386 }if (parent == null) {
28387 return this.keys ();
28388 }var keys = this.keys ();
28389 var pKeys = parent.allKeys ();
28390 if (pKeys == null) {
28391 return keys;
28392 }if (keys == null) {
28393 return pKeys;
28394 }var keyMap =  new java.util.HashMap ();
28395 var counter;
28396 for (counter = keys.length - 1; counter >= 0; counter--) {
28397 keyMap.put (keys[counter], keys[counter]);
28398 }
28399 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28400 keyMap.put (pKeys[counter], pKeys[counter]);
28401 }
28402 var allKeys =  new Array (keyMap.size ());
28403 return keyMap.keySet ().toArray (allKeys);
28404 });
28405 });
28406 Clazz_declarePackage ("javax.swing");
28407 Clazz_declareInterface (javax.swing, "Scrollable");
28408 Clazz_declarePackage ("javax.swing.event");
28409 Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () {
28410 c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject);
28411 });
28412 Clazz_declarePackage ("javax.swing.event");
28413 Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () {
28414 Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener);
28415 });
28416 Clazz_declarePackage ("javax.swing.event");
28417 Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () {
28418 c$ = Clazz_decorateAsClass (function () {
28419 this.listenerList = null;
28420 Clazz_instantialize (this, arguments);
28421 }, javax.swing.event, "EventListenerList");
28422 Clazz_prepareFields (c$, function () {
28423 this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY;
28424 });
28425 Clazz_defineMethod (c$, "getListenerList", 
28426 function () {
28427 return this.listenerList;
28428 });
28429 Clazz_defineMethod (c$, "getListeners", 
28430 function (t) {
28431 var lList = this.listenerList;
28432 var n = this.getListenerCount (lList, t);
28433 var result = java.lang.reflect.Array.newInstance (t, n);
28434 var j = 0;
28435 for (var i = lList.length - 2; i >= 0; i -= 2) {
28436 if (lList[i] === t) {
28437 result[j++] = lList[i + 1];
28438 }}
28439 return result;
28440 }, "Class");
28441 Clazz_defineMethod (c$, "getListenerCount", 
28442 function () {
28443 return Clazz_doubleToInt (this.listenerList.length / 2);
28444 });
28445 Clazz_defineMethod (c$, "getListenerCount", 
28446 function (t) {
28447 var lList = this.listenerList;
28448 return this.getListenerCount (lList, t);
28449 }, "Class");
28450 Clazz_defineMethod (c$, "getListenerCount", 
28451  function (list, t) {
28452 var count = 0;
28453 for (var i = 0; i < list.length; i += 2) {
28454 if (t === list[i]) count++;
28455 }
28456 return count;
28457 }, "~A,Class");
28458 Clazz_defineMethod (c$, "add", 
28459 function (t, l) {
28460 if (l == null) {
28461 return;
28462 }if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) {
28463 this.listenerList =  Clazz_newArray (-1, [t, l]);
28464 } else {
28465 var i = this.listenerList.length;
28466 var tmp =  new Array (i + 2);
28467 System.arraycopy (this.listenerList, 0, tmp, 0, i);
28468 tmp[i] = t;
28469 tmp[i + 1] = l;
28470 this.listenerList = tmp;
28471 }}, "Class,~O");
28472 Clazz_defineMethod (c$, "remove", 
28473 function (t, l) {
28474 if (l == null) {
28475 return;
28476 }var index = -1;
28477 for (var i = this.listenerList.length - 2; i >= 0; i -= 2) {
28478 if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) {
28479 index = i;
28480 break;
28481 }}
28482 if (index != -1) {
28483 var tmp =  new Array (this.listenerList.length - 2);
28484 System.arraycopy (this.listenerList, 0, tmp, 0, index);
28485 if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index);
28486 this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp;
28487 }}, "Class,~O");
28488 Clazz_overrideMethod (c$, "toString", 
28489 function () {
28490 var lList = this.listenerList;
28491 var s = "EventListenerList: ";
28492 s += Clazz_doubleToInt (lList.length / 2) + " listeners: ";
28493 for (var i = 0; i <= lList.length - 2; i += 2) {
28494 s += " type " + (lList[i]).getName ();
28495 s += " listener " + lList[i + 1];
28496 }
28497 return s;
28498 });
28499 c$.NULL_ARRAY = c$.prototype.NULL_ARRAY =  new Array (0);
28500 });
28501 Clazz_declarePackage ("javax.swing.event");
28502 Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () {
28503 c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject);
28504 });
28505 Clazz_declarePackage ("jssun.swing");
28506 Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () {
28507 c$ = Clazz_decorateAsClass (function () {
28508 this.key = null;
28509 Clazz_instantialize (this, arguments);
28510 }, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey);
28511 Clazz_makeConstructor (c$, 
28512 function (key) {
28513 this.key = key;
28514 }, "~S");
28515 Clazz_overrideMethod (c$, "toString", 
28516 function () {
28517 return this.key;
28518 });
28519 });
28520 Clazz_declarePackage ("jssun.swing");
28521 Clazz_declareInterface (jssun.swing, "UIClientPropertyKey");
28522 Clazz_declarePackage ("java.awt");
28523 Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () {
28524 c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics);
28525 Clazz_makeConstructor (c$, 
28526 function () {
28527 Clazz_superConstructor (this, java.awt.Graphics2D, []);
28528 });
28529 Clazz_overrideMethod (c$, "draw3DRect", 
28530 function (x, y, width, height, raised) {
28531 var p = this.getPaint ();
28532 var c = this.getColor ();
28533 var brighter = c.brighter ();
28534 var darker = c.darker ();
28535 this.setColor (raised ? brighter : darker);
28536 this.fillRect (x, y, 1, height + 1);
28537 this.fillRect (x + 1, y, width - 1, 1);
28538 this.setColor (raised ? darker : brighter);
28539 this.fillRect (x + 1, y + height, width, 1);
28540 this.fillRect (x + width, y, 1, height);
28541 this.setPaint (p);
28542 }, "~N,~N,~N,~N,~B");
28543 Clazz_overrideMethod (c$, "fill3DRect", 
28544 function (x, y, width, height, raised) {
28545 var p = this.getPaint ();
28546 var c = this.getColor ();
28547 var brighter = c.brighter ();
28548 var darker = c.darker ();
28549 if (!raised) {
28550 this.setColor (darker);
28551 } else if (p !== c) {
28552 this.setColor (c);
28553 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28554 this.setColor (raised ? brighter : darker);
28555 this.fillRect (x, y, 1, height);
28556 this.fillRect (x + 1, y, width - 2, 1);
28557 this.setColor (raised ? darker : brighter);
28558 this.fillRect (x + 1, y + height - 1, width - 1, 1);
28559 this.fillRect (x + width - 1, y, 1, height - 1);
28560 this.setPaint (p);
28561 }, "~N,~N,~N,~N,~B");
28562 });
28563 Clazz_declarePackage ("java.awt");
28564 c$ = Clazz_declareType (java.awt, "Graphics");
28565 Clazz_makeConstructor (c$, 
28566 function () {
28567 });
28568 Clazz_defineMethod (c$, "create", 
28569 function () {
28570 return this.createSwingJS ();
28571 });
28572 Clazz_defineMethod (c$, "create", 
28573 function (x, y, width, height) {
28574 return this.create4 (x, y, width, height);
28575 }, "~N,~N,~N,~N");
28576 Clazz_defineMethod (c$, "create4", 
28577 function (x, y, width, height) {
28578 var g = this.createSwingJS ();
28579 if (g == null) return null;
28580 g.translate (x, y);
28581 g.clipRect (0, 0, width, height);
28582 return g;
28583 }, "~N,~N,~N,~N");
28584 Clazz_defineMethod (c$, "getFontMetrics", 
28585 function () {
28586 return this.getFontMetrics (this.getFont ());
28587 });
28588 Clazz_defineMethod (c$, "drawRect", 
28589 function (x, y, width, height) {
28590 if ((width < 0) || (height < 0)) {
28591 return;
28592 }if (height == 0 || width == 0) {
28593 this.drawLine (x, y, x + width, y + height);
28594 } else {
28595 this.drawLine (x, y, x + width - 1, y);
28596 this.drawLine (x + width, y, x + width, y + height - 1);
28597 this.drawLine (x + width, y + height, x + 1, y + height);
28598 this.drawLine (x, y + height, x, y + 1);
28599 }}, "~N,~N,~N,~N");
28600 Clazz_defineMethod (c$, "draw3DRect", 
28601 function (x, y, width, height, raised) {
28602 var c = this.getColor ();
28603 var brighter = c.brighter ();
28604 var darker = c.darker ();
28605 this.setColor (raised ? brighter : darker);
28606 this.drawLine (x, y, x, y + height);
28607 this.drawLine (x + 1, y, x + width - 1, y);
28608 this.setColor (raised ? darker : brighter);
28609 this.drawLine (x + 1, y + height, x + width, y + height);
28610 this.drawLine (x + width, y, x + width, y + height - 1);
28611 this.setColor (c);
28612 }, "~N,~N,~N,~N,~B");
28613 Clazz_defineMethod (c$, "fill3DRect", 
28614 function (x, y, width, height, raised) {
28615 var c = this.getColor ();
28616 var brighter = c.brighter ();
28617 var darker = c.darker ();
28618 if (!raised) {
28619 this.setColor (darker);
28620 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28621 this.setColor (raised ? brighter : darker);
28622 this.drawLine (x, y, x, y + height - 1);
28623 this.drawLine (x + 1, y, x + width - 2, y);
28624 this.setColor (raised ? darker : brighter);
28625 this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1);
28626 this.drawLine (x + width - 1, y, x + width - 1, y + height - 2);
28627 this.setColor (c);
28628 }, "~N,~N,~N,~N,~B");
28629 Clazz_defineMethod (c$, "drawPolygon", 
28630 function (p) {
28631 this.drawPolygon (p.xpoints, p.ypoints, p.npoints);
28632 }, "java.awt.Polygon");
28633 Clazz_defineMethod (c$, "fillPolygon", 
28634 function (p) {
28635 this.fillPolygon (p.xpoints, p.ypoints, p.npoints);
28636 }, "java.awt.Polygon");
28637 Clazz_defineMethod (c$, "drawChars", 
28638 function (data, offset, length, x, y) {
28639 this.drawString ( String.instantialize (data, offset, length), x, y);
28640 }, "~A,~N,~N,~N,~N");
28641 Clazz_defineMethod (c$, "drawBytes", 
28642 function (data, offset, length, x, y) {
28643 this.drawString ( String.instantialize (data, 0, offset, length), x, y);
28644 }, "~A,~N,~N,~N,~N");
28645 Clazz_overrideMethod (c$, "finalize", 
28646 function () {
28647 this.dispose ();
28648 });
28649 Clazz_overrideMethod (c$, "toString", 
28650 function () {
28651 return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]";
28652 });
28653 Clazz_defineMethod (c$, "getClipRect", 
28654 function () {
28655 return this.getClipBounds ();
28656 });
28657 Clazz_defineMethod (c$, "hitClip", 
28658 function (x, y, width, height) {
28659 var clipRect = this.getClipBounds ();
28660 if (clipRect == null) {
28661 return true;
28662 }return clipRect.intersects (x, y, width, height);
28663 }, "~N,~N,~N,~N");
28664 Clazz_declarePackage ("jssun.font");
28665 Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.Character", "$.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () {
28666 c$ = Clazz_decorateAsClass (function () {
28667 this.ascent = 0;
28668 this.descent = 0;
28669 this.leading = 0;
28670 this.height = -1;
28671 Clazz_instantialize (this, arguments);
28672 }, jssun.font, "FontDesignMetrics", java.awt.FontMetrics);
28673 c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", 
28674 function (font) {
28675 var m = null;
28676 var r;
28677 r = jssun.font.FontDesignMetrics.metricsCache.get (font);
28678 if (r != null) {
28679 m = r.get ();
28680 }if (m == null) {
28681 m =  new jssun.font.FontDesignMetrics (font);
28682 jssun.font.FontDesignMetrics.metricsCache.put (font,  new jssun.font.FontDesignMetrics.KeyReference (font, m));
28683 }for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) {
28684 if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) {
28685 return m;
28686 }}
28687 {
28688 jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m;
28689 if (jssun.font.FontDesignMetrics.recentIndex == 5) {
28690 jssun.font.FontDesignMetrics.recentIndex = 0;
28691 }}return m;
28692 }, "java.awt.Font");
28693 Clazz_makeConstructor (c$, 
28694  function (font) {
28695 Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]);
28696 this.font = font;
28697 this.initMatrixAndMetrics ();
28698 }, "java.awt.Font");
28699 Clazz_defineMethod (c$, "initMatrixAndMetrics", 
28700  function () {
28701 {
28702 //need to calculate ascent, descent, leading, and maxAdvance
28703 }});
28704 Clazz_defineMethod (c$, "charWidth", 
28705 function (ch) {
28706 var s = "";
28707 {
28708 s = "" + ch;
28709 }return this.stringWidth (s);
28710 }, "~S");
28711 Clazz_overrideMethod (c$, "stringWidth", 
28712 function (str) {
28713 return Clazz_doubleToInt (0.5 + this.getWidth (str));
28714 }, "~S");
28715 Clazz_defineMethod (c$, "getWidth", 
28716  function (str) {
28717 return swingjs.JSToolkit.getStringWidth (null, this.font, str);
28718 }, "~S");
28719 Clazz_overrideMethod (c$, "charsWidth", 
28720 function (data, off, len) {
28721 var width = 0;
28722 if (len < 0) {
28723 throw  new IndexOutOfBoundsException ("len=" + len);
28724 }var limit = off + len;
28725 for (var i = off; i < limit; i++) {
28726 var ch = data[i];
28727 width += this.stringWidth ("" + ch);
28728 }
28729 return Clazz_doubleToInt (0.5 + width);
28730 }, "~A,~N,~N");
28731 Clazz_overrideMethod (c$, "getWidths", 
28732 function () {
28733 var widths =  Clazz_newIntArray (256, 0);
28734 return widths;
28735 });
28736 Clazz_defineMethod (c$, "getAscent", 
28737 function () {
28738 if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent ();
28739 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent);
28740 });
28741 Clazz_defineMethod (c$, "getDescent", 
28742 function () {
28743 if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent ();
28744 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28745 });
28746 Clazz_overrideMethod (c$, "getLeading", 
28747 function () {
28748 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28749 });
28750 Clazz_overrideMethod (c$, "getHeight", 
28751 function () {
28752 if (this.height < 0) {
28753 this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading);
28754 }return this.height;
28755 });
28756 Clazz_defineMethod (c$, "charWidth", 
28757 function (codePoint) {
28758 if (!Character.isValidCodePoint (codePoint)) {
28759 codePoint = 0xffff;
28760 }if (codePoint < 256) {
28761 return this.getWidths ()[codePoint];
28762 } else {
28763 var buffer =  Clazz_newCharArray (2, '\0');
28764 var len = Character.toChars (codePoint, buffer, 0);
28765 return this.charsWidth (buffer, 0, len);
28766 }}, "~N");
28767 Clazz_pu$h(self.c$);
28768 c$ = Clazz_decorateAsClass (function () {
28769 this.key = null;
28770 this.val = null;
28771 Clazz_instantialize (this, arguments);
28772 }, jssun.font.FontDesignMetrics, "KeyReference");
28773 Clazz_makeConstructor (c$, 
28774 function (a, b) {
28775 this.key = a;
28776 this.val = b;
28777 }, "~O,~O");
28778 Clazz_defineMethod (c$, "get", 
28779 function () {
28780 return this.val;
28781 });
28782 Clazz_defineMethod (c$, "dispose", 
28783 function () {
28784 if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) {
28785 jssun.font.FontDesignMetrics.metricsCache.remove (this.key);
28786 }});
28787 c$ = Clazz_p0p ();
28788 Clazz_defineStatics (c$,
28789 "roundingUpValue", 0.95);
28790 c$.metricsCache = c$.prototype.metricsCache =  new java.util.Hashtable ();
28791 Clazz_defineStatics (c$,
28792 "MAXRECENT", 5);
28793 c$.recentMetrics = c$.prototype.recentMetrics =  new Array (5);
28794 Clazz_defineStatics (c$,
28795 "recentIndex", 0);
28796 });
28797 Clazz_declarePackage ("java.awt");
28798 Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", null, function () {
28799 c$ = Clazz_decorateAsClass (function () {
28800 this.font = null;
28801 Clazz_instantialize (this, arguments);
28802 }, java.awt, "FontMetrics");
28803 Clazz_makeConstructor (c$, 
28804 function (font) {
28805 this.font = font;
28806 }, "java.awt.Font");
28807 Clazz_defineMethod (c$, "getFont", 
28808 function () {
28809 return this.font;
28810 });
28811 Clazz_defineMethod (c$, "getFontRenderContext", 
28812 function () {
28813 return java.awt.FontMetrics.DEFAULT_FRC;
28814 });
28815 Clazz_defineMethod (c$, "getHeight", 
28816 function () {
28817 return this.getLeading () + this.getAscent () + this.getDescent ();
28818 });
28819 Clazz_defineMethod (c$, "getMaxAscent", 
28820 function () {
28821 return this.getAscent ();
28822 });
28823 Clazz_defineMethod (c$, "getMaxDescent", 
28824 function () {
28825 return this.getDescent ();
28826 });
28827 Clazz_defineMethod (c$, "getMaxAdvance", 
28828 function () {
28829 return this.charWidth ('M');
28830 });
28831 Clazz_defineMethod (c$, "charsWidth", 
28832 function (data, off, len) {
28833 return this.stringWidth ( String.instantialize (data, off, len));
28834 }, "~A,~N,~N");
28835 Clazz_defineMethod (c$, "bytesWidth", 
28836 function (data, off, len) {
28837 return this.stringWidth ( String.instantialize (data, 0, off, len));
28838 }, "~A,~N,~N");
28839 Clazz_overrideMethod (c$, "toString", 
28840 function () {
28841 return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]";
28842 });
28843 c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC =  new java.awt.font.FontRenderContext (null, false, false);
28844 });
28845 Clazz_declarePackage ("JU");
28846 Clazz_load (null, "JU.PT", ["java.lang.Boolean", "$.Double", "$.Float", "$.Number", "java.util.Map", "javajs.api.JSONEncodable", "JU.AU", "$.DF", "$.Lst", "$.M34", "$.M4", "$.SB"], function () {
28847 c$ = Clazz_declareType (JU, "PT");
28848 c$.parseInt = Clazz_defineMethod (c$, "parseInt", 
28849 function (str) {
28850 return JU.PT.parseIntNext (str,  Clazz_newIntArray (-1, [0]));
28851 }, "~S");
28852 c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", 
28853 function (str, next) {
28854 var cch = str.length;
28855 if (next[0] < 0 || next[0] >= cch) return -2147483648;
28856 return JU.PT.parseIntChecked (str, cch, next);
28857 }, "~S,~A");
28858 c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", 
28859 function (str, ichMax, next) {
28860 var digitSeen = false;
28861 var value = 0;
28862 var ich = next[0];
28863 if (ich < 0) return -2147483648;
28864 var ch;
28865 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28866
28867 var negative = false;
28868 if (ich < ichMax && str.charCodeAt (ich) == 45) {
28869 negative = true;
28870 ++ich;
28871 }while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28872 value = value * 10 + (ch - 48);
28873 digitSeen = true;
28874 ++ich;
28875 }
28876 if (!digitSeen) value = -2147483648;
28877  else if (negative) value = -value;
28878 next[0] = ich;
28879 return value;
28880 }, "~S,~N,~A");
28881 c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", 
28882 function (str, ich) {
28883 var ch;
28884 return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n'));
28885 }, "~S,~N");
28886 c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", 
28887 function (str, ichMax, next, isStrict) {
28888 var digitSeen = false;
28889 var ich = next[0];
28890 if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN;
28891 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28892
28893 var negative = false;
28894 if (ich < ichMax && str.charAt (ich) == '-') {
28895 ++ich;
28896 negative = true;
28897 }var ch = 0;
28898 var ival = 0;
28899 var ival2 = 0;
28900 while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28901 ival = (ival * 10) + (ch - 48) * 1;
28902 ++ich;
28903 digitSeen = true;
28904 }
28905 var isDecimal = false;
28906 var iscale = 0;
28907 var nzero = (ival == 0 ? -1 : 0);
28908 if (ch == 46) {
28909 isDecimal = true;
28910 while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28911 digitSeen = true;
28912 if (nzero < 0) {
28913 if (ch == 48) {
28914 nzero--;
28915 continue;
28916 }nzero = -nzero;
28917 }if (iscale < JU.PT.decimalScale.length) {
28918 ival2 = (ival2 * 10) + (ch - 48) * 1;
28919 iscale++;
28920 }}
28921 }var value;
28922 if (!digitSeen) {
28923 value = NaN;
28924 } else if (ival2 > 0) {
28925 value = ival2 * JU.PT.decimalScale[iscale - 1];
28926 if (nzero > 1) {
28927 if (nzero - 2 < JU.PT.decimalScale.length) {
28928 value *= JU.PT.decimalScale[nzero - 2];
28929 } else {
28930 value *= Math.pow (10, 1 - nzero);
28931 }} else {
28932 value += ival;
28933 }} else {
28934 value = ival;
28935 }var isExponent = false;
28936 if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) {
28937 isExponent = true;
28938 if (++ich >= ichMax) return NaN;
28939 ch = str.charCodeAt (ich);
28940 if ((ch == 43) && (++ich >= ichMax)) return NaN;
28941 next[0] = ich;
28942 var exponent = JU.PT.parseIntChecked (str, ichMax, next);
28943 if (exponent == -2147483648) return NaN;
28944 if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1];
28945  else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1];
28946  else if (exponent != 0) value *= Math.pow (10, exponent);
28947 } else {
28948 next[0] = ich;
28949 }if (negative) value = -value;
28950 if (value == Infinity) value = 3.4028235E38;
28951 return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN);
28952 }, "~S,~N,~A,~B");
28953 c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", 
28954 function (str, ich, ichMax) {
28955 var ch;
28956 while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich;
28957
28958 return (ich == ichMax);
28959 }, "~S,~N,~N");
28960 c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", 
28961 function (str) {
28962 return JU.PT.parseFloatArrayNext (str,  Clazz_newIntArray (1, 0), null, null, null);
28963 }, "~S");
28964 c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", 
28965 function (tokens, data) {
28966 var len = data.length;
28967 var nTokens = tokens.length;
28968 var n = 0;
28969 var max = 0;
28970 for (var i = 0; i >= 0 && i < len && n < nTokens; i++) {
28971 var f;
28972 while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) {
28973 }
28974 if (!Float.isNaN (f)) data[(max = i)] = f;
28975 if (n == nTokens) break;
28976 }
28977 return max + 1;
28978 }, "~A,~A");
28979 c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", 
28980 function (str, next, f, strStart, strEnd) {
28981 var n = 0;
28982 var pt = next[0];
28983 if (pt >= 0) {
28984 if (strStart != null) {
28985 var p = str.indexOf (strStart, pt);
28986 if (p >= 0) next[0] = p + strStart.length;
28987 }str = str.substring (next[0]);
28988 pt = (strEnd == null ? -1 : str.indexOf (strEnd));
28989 if (pt < 0) pt = str.length;
28990  else str = str.substring (0, pt);
28991 next[0] += pt + 1;
28992 var tokens = JU.PT.getTokens (str);
28993 if (f == null) f =  Clazz_newFloatArray (tokens.length, 0);
28994 n = JU.PT.parseFloatArrayInfested (tokens, f);
28995 }if (f == null) return  Clazz_newFloatArray (0, 0);
28996 for (var i = n; i < f.length; i++) f[i] = NaN;
28997
28998 return f;
28999 }, "~S,~A,~A,~S,~S");
29000 c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", 
29001 function (str, ichMax, next) {
29002 var cch = str.length;
29003 if (ichMax > cch) ichMax = cch;
29004 if (next[0] < 0 || next[0] >= ichMax) return NaN;
29005 return JU.PT.parseFloatChecked (str, ichMax, next, false);
29006 }, "~S,~N,~A");
29007 c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", 
29008 function (str, next) {
29009 var cch = (str == null ? -1 : str.length);
29010 return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false));
29011 }, "~S,~A");
29012 c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", 
29013 function (str) {
29014 var cch = str.length;
29015 if (cch == 0) return NaN;
29016 return JU.PT.parseFloatChecked (str, cch,  Clazz_newIntArray (-1, [0]), true);
29017 }, "~S");
29018 c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", 
29019 function (str) {
29020 return JU.PT.parseFloatNext (str,  Clazz_newIntArray (-1, [0]));
29021 }, "~S");
29022 c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", 
29023 function (s, i) {
29024 {
29025 return Integer.parseIntRadix(s, i);
29026 }}, "~S,~N");
29027 c$.getTokens = Clazz_defineMethod (c$, "getTokens", 
29028 function (line) {
29029 return JU.PT.getTokensAt (line, 0);
29030 }, "~S");
29031 c$.parseToken = Clazz_defineMethod (c$, "parseToken", 
29032 function (str) {
29033 return JU.PT.parseTokenNext (str,  Clazz_newIntArray (-1, [0]));
29034 }, "~S");
29035 c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", 
29036 function (str) {
29037 return JU.PT.parseTrimmedRange (str, 0, str.length);
29038 }, "~S");
29039 c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", 
29040 function (str, ichStart) {
29041 return JU.PT.parseTrimmedRange (str, ichStart, str.length);
29042 }, "~S,~N");
29043 c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", 
29044 function (str, ichStart, ichMax) {
29045 var cch = str.length;
29046 if (ichMax < cch) cch = ichMax;
29047 if (cch < ichStart) return "";
29048 return JU.PT.parseTrimmedChecked (str, ichStart, cch);
29049 }, "~S,~N,~N");
29050 c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", 
29051 function (line, ich) {
29052 if (line == null) return null;
29053 var cchLine = line.length;
29054 if (ich < 0 || ich > cchLine) return null;
29055 var tokenCount = JU.PT.countTokens (line, ich);
29056 var tokens =  new Array (tokenCount);
29057 var next =  Clazz_newIntArray (1, 0);
29058 next[0] = ich;
29059 for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next);
29060
29061 return tokens;
29062 }, "~S,~N");
29063 c$.countTokens = Clazz_defineMethod (c$, "countTokens", 
29064 function (line, ich) {
29065 var tokenCount = 0;
29066 if (line != null) {
29067 var ichMax = line.length;
29068 while (true) {
29069 while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich;
29070
29071 if (ich == ichMax) break;
29072 ++tokenCount;
29073 do {
29074 ++ich;
29075 } while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich));
29076 }
29077 }return tokenCount;
29078 }, "~S,~N");
29079 c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", 
29080 function (str, next) {
29081 var cch = str.length;
29082 return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next));
29083 }, "~S,~A");
29084 c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", 
29085 function (str, ichMax, next) {
29086 var cch = str.length;
29087 if (ichMax > cch) ichMax = cch;
29088 return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next));
29089 }, "~S,~N,~A");
29090 c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", 
29091 function (str, ichMax, next) {
29092 var ich = next[0];
29093 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29094
29095 var ichNonWhite = ich;
29096 while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich;
29097
29098 next[0] = ich;
29099 return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich));
29100 }, "~S,~N,~A");
29101 c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", 
29102 function (str, ich, ichMax) {
29103 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29104
29105 var ichLast = ichMax - 1;
29106 while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast;
29107
29108 return (ichLast < ich ? "" : str.substring (ich, ichLast + 1));
29109 }, "~S,~N,~N");
29110 c$.dVal = Clazz_defineMethod (c$, "dVal", 
29111 function (s) {
29112 {
29113 if(s==null)
29114 throw new NumberFormatException("null");
29115 var d=parseFloat(s);
29116 if(isNaN(d))
29117 throw new NumberFormatException("Not a Number : "+s);
29118 return d
29119 }}, "~S");
29120 c$.fVal = Clazz_defineMethod (c$, "fVal", 
29121 function (s) {
29122 {
29123 return this.dVal(s);
29124 }}, "~S");
29125 c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", 
29126 function (str, ichMax, next) {
29127 var cch = str.length;
29128 if (ichMax > cch) ichMax = cch;
29129 return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next));
29130 }, "~S,~N,~A");
29131 c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", 
29132 function (tokens, data) {
29133 JU.PT.parseFloatArrayDataN (tokens, data, data.length);
29134 }, "~A,~A");
29135 c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", 
29136 function (tokens, data, nData) {
29137 for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i]));
29138
29139 }, "~A,~A,~N");
29140 c$.split = Clazz_defineMethod (c$, "split", 
29141 function (text, run) {
29142 if (text.length == 0) return  new Array (0);
29143 var n = 1;
29144 var i = text.indexOf (run);
29145 var lines;
29146 var runLen = run.length;
29147 if (i < 0 || runLen == 0) {
29148 lines =  new Array (1);
29149 lines[0] = text;
29150 return lines;
29151 }var len = text.length - runLen;
29152 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
29153
29154 lines =  new Array (n);
29155 i = 0;
29156 var ipt = 0;
29157 var pt = 0;
29158 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
29159 lines[pt++] = text.substring (i, ipt);
29160 i = ipt + runLen;
29161 }
29162 if (text.indexOf (run, len) != len) len += runLen;
29163 lines[pt] = text.substring (i, len);
29164 return lines;
29165 }, "~S,~S");
29166 c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", 
29167 function (line, ipt0) {
29168 var next =  Clazz_newIntArray (-1, [ipt0]);
29169 return JU.PT.getQuotedStringNext (line, next);
29170 }, "~S,~N");
29171 c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", 
29172 function (line, next) {
29173 var i = next[0];
29174 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return "";
29175 var pt = i + 1;
29176 var len = line.length;
29177 while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++;
29178
29179 next[0] = i + 1;
29180 return line.substring (pt, i);
29181 }, "~S,~A");
29182 c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", 
29183 function (line, next) {
29184 var i = next[1];
29185 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null;
29186 var pt = next[0] = i;
29187 var len = line.length;
29188 var escaped = false;
29189 var haveEscape = false;
29190 while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) {
29191 escaped = false;
29192 haveEscape = true;
29193 i++;
29194 }
29195 if (i >= len) {
29196 next[1] = -1;
29197 return null;
29198 }next[1] = i + 1;
29199 var s = line.substring (pt + 1, i);
29200 return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s);
29201 }, "~S,~A");
29202 c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", 
29203 function (key, semiList) {
29204 if (semiList.length == 0) return false;
29205 if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";";
29206 return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0;
29207 }, "~S,~S");
29208 c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", 
29209 function (info, name) {
29210 var i = info.indexOf (name + "=");
29211 return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i));
29212 }, "~S,~S");
29213 c$.approx = Clazz_defineMethod (c$, "approx", 
29214 function (f, n) {
29215 return Math.round (f * n) / n;
29216 }, "~N,~N");
29217 c$.rep = Clazz_defineMethod (c$, "rep", 
29218 function (str, strFrom, strTo) {
29219 if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str;
29220 var isOnce = (strTo.indexOf (strFrom) >= 0);
29221 do {
29222 str = str.$replace (strFrom, strTo);
29223 } while (!isOnce && str.indexOf (strFrom) >= 0);
29224 return str;
29225 }, "~S,~S,~S");
29226 c$.formatF = Clazz_defineMethod (c$, "formatF", 
29227 function (value, width, precision, alignLeft, zeroPad) {
29228 return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad);
29229 }, "~N,~N,~N,~B,~B");
29230 c$.formatD = Clazz_defineMethod (c$, "formatD", 
29231 function (value, width, precision, alignLeft, zeroPad, allowOverflow) {
29232 return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad);
29233 }, "~N,~N,~N,~B,~B,~B");
29234 c$.formatS = Clazz_defineMethod (c$, "formatS", 
29235 function (value, width, precision, alignLeft, zeroPad) {
29236 if (value == null) return "";
29237 var len = value.length;
29238 if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision);
29239  else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1);
29240 var padLength = width - value.length;
29241 if (padLength <= 0) return value;
29242 var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-');
29243 var padChar = (zeroPad ? '0' : ' ');
29244 var padChar0 = (isNeg ? '-' : padChar);
29245 var sb =  new JU.SB ();
29246 if (alignLeft) sb.append (value);
29247 sb.appendC (padChar0);
29248 for (var i = padLength; --i > 0; ) sb.appendC (padChar);
29249
29250 if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value);
29251 return sb.toString ();
29252 }, "~S,~N,~N,~B,~B");
29253 c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", 
29254 function (str, strFrom, chTo) {
29255 if (str == null) return null;
29256 for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo);
29257
29258 return str;
29259 }, "~S,~S,~S");
29260 c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", 
29261 function (str, strFrom, strTo) {
29262 for (var i = strFrom.length; --i >= 0; ) {
29263 var chFrom = strFrom.substring (i, i + 1);
29264 str = JU.PT.rep (str, chFrom, strTo);
29265 }
29266 return str;
29267 }, "~S,~S,~S");
29268 c$.trim = Clazz_defineMethod (c$, "trim", 
29269 function (str, chars) {
29270 if (chars.length == 0) return str.trim ();
29271 var len = str.length;
29272 var k = 0;
29273 while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++;
29274
29275 var m = str.length - 1;
29276 while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--;
29277
29278 return str.substring (k, m + 1);
29279 }, "~S,~S");
29280 c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", 
29281 function (value) {
29282 return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value);
29283 }, "~S");
29284 c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", 
29285 function (info) {
29286 return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean);
29287 }, "~O");
29288 c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", 
29289  function (info, i) {
29290 {
29291 return info[i];
29292 }}, "~O,~N");
29293 c$.toJSON = Clazz_defineMethod (c$, "toJSON", 
29294 function (infoType, info) {
29295 if (info == null) return JU.PT.packageJSON (infoType, null);
29296 if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ());
29297 var s = null;
29298 var sb = null;
29299 while (true) {
29300 if (Clazz_instanceOf (info, String)) {
29301 s = info;
29302 {
29303 if (typeof s == "undefined") s = "null"
29304 }if (s.indexOf ("{\"") != 0) {
29305 s = JU.PT.rep (s, "\"", "\\\"");
29306 s = JU.PT.rep (s, "\n", "\\n");
29307 s = "\"" + s + "\"";
29308 }break;
29309 }if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) {
29310 if ((s = (info).toJSON ()) == null) s = "null";
29311 break;
29312 }sb =  new JU.SB ();
29313 if (Clazz_instanceOf (info, java.util.Map)) {
29314 sb.append ("{ ");
29315 var sep = "";
29316 for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
29317 sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key))));
29318 sep = ",";
29319 }
29320 sb.append (" }");
29321 break;
29322 }if (Clazz_instanceOf (info, JU.Lst)) {
29323 sb.append ("[ ");
29324 var n = (info).size ();
29325 for (var i = 0; i < n; i++) {
29326 if (i > 0) sb.appendC (',');
29327 sb.append (JU.PT.toJSON (null, (info).get (i)));
29328 }
29329 sb.append (" ]");
29330 break;
29331 }if (Clazz_instanceOf (info, JU.M34)) {
29332 var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3);
29333 var x =  Clazz_newFloatArray (len, 0);
29334 var m = info;
29335 sb.appendC ('[');
29336 for (var i = 0; i < len; i++) {
29337 if (i > 0) sb.appendC (',');
29338 m.getRow (i, x);
29339 sb.append (JU.PT.toJSON (null, x));
29340 }
29341 sb.appendC (']');
29342 break;
29343 }s = JU.PT.nonArrayString (info);
29344 if (s == null) {
29345 sb.append ("[");
29346 var n = JU.AU.getLength (info);
29347 for (var i = 0; i < n; i++) {
29348 if (i > 0) sb.appendC (',');
29349 sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i)));
29350 }
29351 sb.append ("]");
29352 break;
29353 }info = info.toString ();
29354 }
29355 return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s));
29356 }, "~S,~O");
29357 c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", 
29358 function (x) {
29359 {
29360 var s = x.toString(); return (s.startsWith("[object") &&
29361 s.endsWith("Array]") ? null : s);
29362 }}, "~O");
29363 c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", 
29364 function (data) {
29365 var sb =  new JU.SB ();
29366 sb.append ("[");
29367 var n = data.length;
29368 for (var i = 0; i < n; i++) {
29369 if (i > 0) sb.appendC (',');
29370 sb.appendI (data[i] & 0xFF);
29371 }
29372 sb.append ("]");
29373 return sb.toString ();
29374 }, "~A");
29375 c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", 
29376 function (infoType, info) {
29377 return (infoType == null ? info : "\"" + infoType + "\": " + info);
29378 }, "~S,~S");
29379 c$.isAS = Clazz_defineMethod (c$, "isAS", 
29380 function (x) {
29381 {
29382 return Clazz_isAS(x);
29383 }}, "~O");
29384 c$.isASS = Clazz_defineMethod (c$, "isASS", 
29385 function (x) {
29386 {
29387 return Clazz_isASS(x);
29388 }}, "~O");
29389 c$.isAP = Clazz_defineMethod (c$, "isAP", 
29390 function (x) {
29391 {
29392 return Clazz_isAP(x);
29393 }}, "~O");
29394 c$.isAF = Clazz_defineMethod (c$, "isAF", 
29395 function (x) {
29396 {
29397 return Clazz_isAF(x);
29398 }}, "~O");
29399 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
29400 function (x) {
29401 {
29402 return Clazz_isAFloat(x);
29403 }}, "~O");
29404 c$.isAD = Clazz_defineMethod (c$, "isAD", 
29405 function (x) {
29406 {
29407 return Clazz_isAF(x);
29408 }}, "~O");
29409 c$.isADD = Clazz_defineMethod (c$, "isADD", 
29410 function (x) {
29411 {
29412 return Clazz_isAFF(x);
29413 }}, "~O");
29414 c$.isAB = Clazz_defineMethod (c$, "isAB", 
29415 function (x) {
29416 {
29417 return Clazz_isAI(x);
29418 }}, "~O");
29419 c$.isAI = Clazz_defineMethod (c$, "isAI", 
29420 function (x) {
29421 {
29422 return Clazz_isAI(x);
29423 }}, "~O");
29424 c$.isAII = Clazz_defineMethod (c$, "isAII", 
29425 function (x) {
29426 {
29427 return Clazz_isAII(x);
29428 }}, "~O");
29429 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
29430 function (x) {
29431 {
29432 return Clazz_isAFF(x);
29433 }}, "~O");
29434 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
29435 function (x) {
29436 {
29437 return Clazz_isAFFF(x);
29438 }}, "~O");
29439 c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", 
29440 function (url) {
29441 url = JU.PT.rep (url, "\n", "");
29442 url = JU.PT.rep (url, "%", "%25");
29443 url = JU.PT.rep (url, "#", "%23");
29444 url = JU.PT.rep (url, "[", "%5B");
29445 url = JU.PT.rep (url, "]", "%5D");
29446 url = JU.PT.rep (url, " ", "%20");
29447 return url;
29448 }, "~S");
29449 c$.esc = Clazz_defineMethod (c$, "esc", 
29450 function (str) {
29451 if (str == null || str.length == 0) return "\"\"";
29452 var haveEscape = false;
29453 var i = 0;
29454 for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) {
29455 haveEscape = true;
29456 break;
29457 }
29458 if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) {
29459 var pt = -1;
29460 var ch = "\\\\\tt\rr\nn\"\"".charAt (i++);
29461 var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++);
29462 var sb =  new JU.SB ();
29463 var pt0 = 0;
29464 while ((pt = str.indexOf (ch, pt + 1)) >= 0) {
29465 sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2);
29466 pt0 = pt + 1;
29467 }
29468 sb.append (str.substring (pt0, str.length));
29469 str = sb.toString ();
29470 }
29471 return "\"" + JU.PT.escUnicode (str) + "\"";
29472 }, "~S");
29473 c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", 
29474 function (str) {
29475 for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) {
29476 var s = "0000" + Integer.toHexString (str.charCodeAt (i));
29477 str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1);
29478 }
29479 return str;
29480 }, "~S");
29481 c$.escF = Clazz_defineMethod (c$, "escF", 
29482 function (f) {
29483 var sf = "" + f;
29484 {
29485 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
29486 sf += ".0";
29487 }return sf;
29488 }, "~N");
29489 c$.join = Clazz_defineMethod (c$, "join", 
29490 function (s, c, i0) {
29491 if (s.length < i0) return null;
29492 var sb =  new JU.SB ();
29493 sb.append (s[i0++]);
29494 for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]);
29495
29496 return sb.toString ();
29497 }, "~A,~S,~N");
29498 c$.isLike = Clazz_defineMethod (c$, "isLike", 
29499 function (a, b) {
29500 var areEqual = a.equals (b);
29501 if (areEqual) return true;
29502 var isStart = b.startsWith ("*");
29503 var isEnd = b.endsWith ("*");
29504 return (!isStart && !isEnd) ? areEqual : isStart && isEnd ? b.length == 1 || a.contains (b.substring (1, b.length - 1)) : isStart ? a.endsWith (b.substring (1)) : a.startsWith (b.substring (0, b.length - 1));
29505 }, "~S,~S");
29506 c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", 
29507 function (h, key) {
29508 if ("this".equals (key)) return h;
29509 var val = h.get (key);
29510 if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue ();
29511
29512 return val;
29513 }, "java.util.Map,~S");
29514 c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", 
29515 function (h, key, h2) {
29516 var val = h.get (key);
29517 if (val != null) {
29518 h2.put (key, val);
29519 return;
29520 }for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) {
29521 var k = e.getKey ();
29522 if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ());
29523 }
29524 }, "java.util.Map,~S,java.util.Map");
29525 c$.clean = Clazz_defineMethod (c$, "clean", 
29526 function (s) {
29527 return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), "  ", " ").trim ();
29528 }, "~S");
29529 c$.fdup = Clazz_defineMethod (c$, "fdup", 
29530 function (f, pt, n) {
29531 var ch;
29532 var count = 0;
29533 for (var i = pt; --i >= 1; ) {
29534 if (JU.PT.isDigit (ch = f.charAt (i))) continue;
29535 switch (ch) {
29536 case '.':
29537 if (count++ != 0) return f;
29538 continue;
29539 case '-':
29540 if (i != 1 && f.charAt (i - 1) != '.') return f;
29541 continue;
29542 default:
29543 return f;
29544 }
29545 }
29546 var s = f.substring (0, pt + 1);
29547 var sb =  new JU.SB ();
29548 for (var i = 0; i < n; i++) sb.append (s);
29549
29550 sb.append (f.substring (pt + 1));
29551 return sb.toString ();
29552 }, "~S,~N,~N");
29553 c$.formatString = Clazz_defineMethod (c$, "formatString", 
29554 function (strFormat, key, strT, floatT, doubleT, doOne) {
29555 if (strFormat == null) return null;
29556 if ("".equals (strFormat)) return "";
29557 var len = key.length;
29558 if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat;
29559 var strLabel = "";
29560 var ich;
29561 var ichPercent;
29562 var ichKey;
29563 for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) {
29564 if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent);
29565 ich = ichPercent + 1;
29566 if (ichKey > ichPercent + 6) {
29567 strLabel += '%';
29568 continue;
29569 }try {
29570 var alignLeft = false;
29571 if (strFormat.charAt (ich) == '-') {
29572 alignLeft = true;
29573 ++ich;
29574 }var zeroPad = false;
29575 if (strFormat.charAt (ich) == '0') {
29576 zeroPad = true;
29577 ++ich;
29578 }var ch;
29579 var width = 0;
29580 while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) {
29581 width = (10 * width) + (ch.charCodeAt (0) - 48);
29582 ++ich;
29583 }
29584 var precision = 2147483647;
29585 var isExponential = false;
29586 if (strFormat.charAt (ich) == '.') {
29587 ++ich;
29588 if ((ch = strFormat.charAt (ich)) == '-') {
29589 isExponential = true;
29590 ++ich;
29591 }if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') {
29592 precision = ch.charCodeAt (0) - 48;
29593 ++ich;
29594 }if (isExponential) precision = -precision - (strT == null ? 1 : 0);
29595 }var st = strFormat.substring (ich, ich + len);
29596 if (!st.equals (key)) {
29597 ich = ichPercent + 1;
29598 strLabel += '%';
29599 continue;
29600 }ich += len;
29601 if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad);
29602  else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad);
29603  else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true);
29604 if (doOne) break;
29605 } catch (ioobe) {
29606 if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) {
29607 ich = ichPercent;
29608 break;
29609 } else {
29610 throw ioobe;
29611 }
29612 }
29613 }
29614 strLabel += strFormat.substring (ich);
29615 return strLabel;
29616 }, "~S,~S,~S,~N,~N,~B");
29617 c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", 
29618 function (strFormat, key, strT) {
29619 return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false);
29620 }, "~S,~S,~S");
29621 c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", 
29622 function (strFormat, key, floatT) {
29623 return JU.PT.formatString (strFormat, key, null, floatT, NaN, false);
29624 }, "~S,~S,~N");
29625 c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", 
29626 function (strFormat, key, intT) {
29627 return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false);
29628 }, "~S,~S,~N");
29629 c$.sprintf = Clazz_defineMethod (c$, "sprintf", 
29630 function (strFormat, list, values) {
29631 if (values == null) return strFormat;
29632 var n = list.length;
29633 if (n == values.length) try {
29634 for (var o = 0; o < n; o++) {
29635 if (values[o] == null) continue;
29636 switch (list.charAt (o)) {
29637 case 's':
29638 strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true);
29639 break;
29640 case 'f':
29641 strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true);
29642 break;
29643 case 'i':
29644 strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true);
29645 strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true);
29646 break;
29647 case 'd':
29648 strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true);
29649 break;
29650 case 'p':
29651 var pVal = values[o];
29652 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true);
29653 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true);
29654 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true);
29655 break;
29656 case 'q':
29657 var qVal = values[o];
29658 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true);
29659 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true);
29660 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true);
29661 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true);
29662 break;
29663 case 'S':
29664 var sVal = values[o];
29665 for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true);
29666
29667 break;
29668 case 'F':
29669 var fVal = values[o];
29670 for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true);
29671
29672 break;
29673 case 'I':
29674 var iVal = values[o];
29675 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true);
29676
29677 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true);
29678
29679 break;
29680 case 'D':
29681 var dVal = values[o];
29682 for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true);
29683
29684 }
29685 }
29686 return JU.PT.rep (strFormat, "%%", "%");
29687 } catch (e) {
29688 if (Clazz_exceptionOf (e, Exception)) {
29689 } else {
29690 throw e;
29691 }
29692 }
29693 System.out.println ("TextFormat.sprintf error " + list + " " + strFormat);
29694 return JU.PT.rep (strFormat, "%", "?");
29695 }, "~S,~S,~A");
29696 c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", 
29697 function (strFormat) {
29698 if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat;
29699 strFormat = JU.PT.rep (strFormat, "%%", "\1");
29700 strFormat = JU.PT.rep (strFormat, "%p", "%6.2p");
29701 strFormat = JU.PT.rep (strFormat, "%q", "%6.2q");
29702 var format = JU.PT.split (strFormat, "%");
29703 var sb =  new JU.SB ();
29704 sb.append (format[0]);
29705 for (var i = 1; i < format.length; i++) {
29706 var f = "%" + format[i];
29707 var pt;
29708 if (f.length >= 3) {
29709 if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3);
29710 if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4);
29711 }sb.append (f);
29712 }
29713 return sb.toString ().$replace ('\1', '%');
29714 }, "~S");
29715 c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", 
29716 function (s, s1, s2) {
29717 s.append (s2);
29718 var n = s1.length - s2.length;
29719 if (n > 0) s.append (s1.substring (0, n));
29720 }, "JU.SB,~S,~S");
29721 c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", 
29722 function (s, s1, s2) {
29723 var n = s1.length - s2.length;
29724 if (n > 0) s.append (s1.substring (0, n));
29725 s.append (s2);
29726 }, "JU.SB,~S,~S");
29727 c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", 
29728 function (f, n) {
29729 if (f > -0.001 && f < 0.001) f = 0;
29730 return (f + "         ").substring (0, n);
29731 }, "~N,~N");
29732 c$.isWild = Clazz_defineMethod (c$, "isWild", 
29733 function (s) {
29734 return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0);
29735 }, "~S");
29736 c$.isMatch = Clazz_defineMethod (c$, "isMatch", 
29737 function (search, match, checkStar, allowInitialStar) {
29738 if (search.equals (match)) return true;
29739 var mLen = match.length;
29740 if (mLen == 0) return false;
29741 var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false);
29742 if (mLen == 1 && isStar0) return true;
29743 var isStar1 = (checkStar && match.endsWith ("*"));
29744 var haveQ = (match.indexOf ('?') >= 0);
29745 if (!haveQ) {
29746 if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1)));
29747  else if (isStar1) return search.startsWith (match.substring (0, mLen - 1));
29748 }var sLen = search.length;
29749 var qqqq = "????";
29750 var nq = 4;
29751 while (nq < sLen) {
29752 qqqq += qqqq;
29753 nq += 4;
29754 }
29755 if (checkStar) {
29756 if (isStar0) {
29757 match = qqqq + match.substring (1);
29758 mLen += nq - 1;
29759 }if (isStar1) {
29760 match = match.substring (0, mLen - 1) + qqqq;
29761 mLen += nq - 1;
29762 }}if (mLen < sLen) return false;
29763 var ich = 0;
29764 while (mLen > sLen) {
29765 if (allowInitialStar && match.charAt (ich) == '?') {
29766 ++ich;
29767 } else if (match.charAt (ich + mLen - 1) != '?') {
29768 return false;
29769 }--mLen;
29770 }
29771 for (var i = sLen; --i >= 0; ) {
29772 var chm = match.charAt (ich + i);
29773 if (chm == '?') continue;
29774 var chs = search.charAt (i);
29775 if (chm != chs && (chm != '\1' || chs != '?')) return false;
29776 }
29777 return true;
29778 }, "~S,~S,~B,~B");
29779 c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", 
29780 function (s, list, newList) {
29781 var n = list.size ();
29782 for (var i = 0; i < n; i++) {
29783 var name = list.get (i);
29784 var newName = newList.get (i);
29785 if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\"");
29786 }
29787 return s;
29788 }, "~S,JU.Lst,JU.Lst");
29789 c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", 
29790 function (s, list, newList) {
29791 var n = list.size ();
29792 for (var i = 0; i < n; i++) {
29793 var name = list.get (i);
29794 var newName = newList.get (i);
29795 if (!newName.equals (name)) s = JU.PT.rep (s, name, newName);
29796 }
29797 return s;
29798 }, "~S,JU.Lst,JU.Lst");
29799 c$.isDigit = Clazz_defineMethod (c$, "isDigit", 
29800 function (ch) {
29801 var c = (ch).charCodeAt (0);
29802 return (48 <= c && c <= 57);
29803 }, "~S");
29804 c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", 
29805 function (ch) {
29806 var c = (ch).charCodeAt (0);
29807 return (65 <= c && c <= 90);
29808 }, "~S");
29809 c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", 
29810 function (ch) {
29811 var c = (ch).charCodeAt (0);
29812 return (97 <= c && c <= 122);
29813 }, "~S");
29814 c$.isLetter = Clazz_defineMethod (c$, "isLetter", 
29815 function (ch) {
29816 var c = (ch).charCodeAt (0);
29817 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
29818 }, "~S");
29819 c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", 
29820 function (ch) {
29821 var c = (ch).charCodeAt (0);
29822 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
29823 }, "~S");
29824 c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", 
29825 function (ch) {
29826 var c = (ch).charCodeAt (0);
29827 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd);
29828 }, "~S");
29829 c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", 
29830 function (pt, f) {
29831 pt.x = Math.round (pt.x * f) / f;
29832 pt.y = Math.round (pt.y * f) / f;
29833 pt.z = Math.round (pt.z * f) / f;
29834 }, "JU.T3,~N");
29835 c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", 
29836 function (d, f) {
29837 return Math.round (d * f) / f;
29838 }, "~N,~N");
29839 c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", 
29840 function (s) {
29841 var pt = s.indexOf ("/");
29842 return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1)));
29843 }, "~S");
29844 Clazz_defineStatics (c$,
29845 "tensScale",  Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]),
29846 "decimalScale",  Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]),
29847 "FLOAT_MIN_SAFE", 2E-45,
29848 "escapable", "\\\\\tt\rr\nn\"\"",
29849 "FRACTIONAL_PRECISION", 100000,
29850 "CARTESIAN_PRECISION", 10000);
29851 });
29852 Clazz_declarePackage ("javajs.api");
29853 Clazz_declareInterface (javajs.api, "JSONEncodable");
29854 Clazz_declarePackage ("JU");
29855 Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () {
29856 c$ = Clazz_declareType (JU, "AU");
29857 c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", 
29858 function (array, minimumLength) {
29859 if (array != null && JU.AU.getLength (array) >= minimumLength) return array;
29860 return JU.AU.arrayCopyObject (array, minimumLength);
29861 }, "~O,~N");
29862 c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", 
29863 function (array, minimumLength) {
29864 if (array != null && array.length >= minimumLength) return array;
29865 return JU.AU.arrayCopyS (array, minimumLength);
29866 }, "~A,~N");
29867 c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", 
29868 function (array, minimumLength) {
29869 if (array != null && array.length >= minimumLength) return array;
29870 return JU.AU.arrayCopyF (array, minimumLength);
29871 }, "~A,~N");
29872 c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", 
29873 function (array, minimumLength) {
29874 if (array != null && array.length >= minimumLength) return array;
29875 return JU.AU.arrayCopyI (array, minimumLength);
29876 }, "~A,~N");
29877 c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", 
29878 function (array, minimumLength) {
29879 if (array != null && array.length >= minimumLength) return array;
29880 return JU.AU.arrayCopyShort (array, minimumLength);
29881 }, "~A,~N");
29882 c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", 
29883 function (array, minimumLength) {
29884 if (array != null && array.length >= minimumLength) return array;
29885 return JU.AU.arrayCopyByte (array, minimumLength);
29886 }, "~A,~N");
29887 c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", 
29888 function (array) {
29889 return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array)));
29890 }, "~O");
29891 c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", 
29892 function (array) {
29893 return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length));
29894 }, "~A");
29895 c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", 
29896 function (array) {
29897 return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length));
29898 }, "~A");
29899 c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", 
29900 function (array) {
29901 return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length));
29902 }, "~A");
29903 c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", 
29904 function (array) {
29905 return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length));
29906 }, "~A");
29907 c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", 
29908 function (array) {
29909 return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length));
29910 }, "~A");
29911 c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", 
29912 function (array) {
29913 return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length));
29914 }, "~A");
29915 c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", 
29916 function (array, firstElement, nElements) {
29917 if (nElements == 0 || array == null) return array;
29918 var oldLength = JU.AU.getLength (array);
29919 if (firstElement >= oldLength) return array;
29920 var n = oldLength - (firstElement + nElements);
29921 if (n < 0) n = 0;
29922 var t = JU.AU.newInstanceO (array, firstElement + n);
29923 if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement);
29924 if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n);
29925 return t;
29926 }, "~O,~N,~N");
29927 c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", 
29928 function (array, newLength) {
29929 if (array == null) {
29930 return null;
29931 }var oldLength = JU.AU.getLength (array);
29932 if (newLength == oldLength) return array;
29933 var t = JU.AU.newInstanceO (array, newLength);
29934 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29935 return t;
29936 }, "~O,~N");
29937 c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", 
29938  function (array, n) {
29939 {
29940 if (!array.getClass().getComponentType)
29941 return new Array(n);
29942 }}, "~O,~N");
29943 c$.getLength = Clazz_defineMethod (c$, "getLength", 
29944 function (array) {
29945 {
29946 return array.length
29947 }}, "~O");
29948 c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", 
29949 function (array, newLength) {
29950 if (newLength < 0) newLength = array.length;
29951 var t =  new Array (newLength);
29952 if (array != null) {
29953 var oldLength = array.length;
29954 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29955 }return t;
29956 }, "~A,~N");
29957 c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", 
29958 function (array, newLength) {
29959 var t = JU.AU.newInt2 (newLength);
29960 if (array != null) {
29961 var oldLength = array.length;
29962 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29963 }return t;
29964 }, "~A,~N");
29965 c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", 
29966 function (array, newLength) {
29967 if (newLength < 0) newLength = array.length;
29968 var t =  new Array (newLength);
29969 if (array != null) {
29970 var oldLength = array.length;
29971 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29972 }return t;
29973 }, "~A,~N");
29974 c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", 
29975 function (array, newLength) {
29976 if (newLength < 0) newLength = array.length;
29977 var t =  Clazz_newFloatArray (newLength, 0);
29978 if (array != null) {
29979 var oldLength = array.length;
29980 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29981 }return t;
29982 }, "~A,~N");
29983 c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", 
29984 function (array, newLength) {
29985 if (newLength < 0) newLength = array.length;
29986 var t =  Clazz_newIntArray (newLength, 0);
29987 if (array != null) {
29988 var oldLength = array.length;
29989 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29990 }return t;
29991 }, "~A,~N");
29992 c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", 
29993 function (array, i0, n) {
29994 if (array == null) return null;
29995 var oldLength = array.length;
29996 if (n == -1) n = oldLength;
29997 if (n == -2) n = Clazz_doubleToInt (oldLength / 2);
29998 n = n - i0;
29999 var t =  Clazz_newIntArray (n, 0);
30000 System.arraycopy (array, i0, t, 0, n);
30001 return t;
30002 }, "~A,~N,~N");
30003 c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", 
30004 function (array, i0, n) {
30005 if (array == null) return null;
30006 var t = JU.AU.arrayCopyRangeI (array, i0, n);
30007 if (n < 0) n = array.length;
30008 for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i);
30009
30010 return t;
30011 }, "~A,~N,~N");
30012 c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", 
30013 function (array, newLength) {
30014 if (newLength < 0) newLength = array.length;
30015 var t =  Clazz_newShortArray (newLength, 0);
30016 if (array != null) {
30017 var oldLength = array.length;
30018 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30019 }return t;
30020 }, "~A,~N");
30021 c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", 
30022 function (array, newLength) {
30023 if (newLength < 0) newLength = array.length;
30024 var t =  Clazz_newByteArray (newLength, 0);
30025 if (array != null) {
30026 var oldLength = array.length;
30027 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30028 }return t;
30029 }, "~A,~N");
30030 c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", 
30031 function (array, newLength) {
30032 if (newLength < 0) newLength = array.length;
30033 var t =  Clazz_newBooleanArray (newLength, false);
30034 if (array != null) {
30035 var oldLength = array.length;
30036 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
30037 }return t;
30038 }, "~A,~N");
30039 c$.swapInt = Clazz_defineMethod (c$, "swapInt", 
30040 function (array, indexA, indexB) {
30041 var t = array[indexA];
30042 array[indexA] = array[indexB];
30043 array[indexB] = t;
30044 }, "~A,~N,~N");
30045 c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", 
30046 function (msg, A, x1, x2, y1, y2) {
30047 var s = "dumpArray: " + msg + "\n";
30048 for (var x = x1; x <= x2; x++) s += "\t*" + x + "*";
30049
30050 for (var y = y2; y >= y1; y--) {
30051 s += "\n*" + y + "*";
30052 for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN);
30053
30054 }
30055 return s;
30056 }, "~S,~A,~N,~N,~N,~N");
30057 c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", 
30058 function (A, n) {
30059 var str = "";
30060 for (var i = 0; i < n; i++) str += " " + A[i];
30061
30062 return str;
30063 }, "~A,~N");
30064 c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", 
30065 function (v, n) {
30066 if (v.size () == 0) return null;
30067 if (v.size () == 1) return v.get (0);
30068 var keys = v.toArray ( new Array (v.size ()));
30069 java.util.Arrays.sort (keys);
30070 return keys[n % keys.length];
30071 }, "JU.Lst,~N");
30072 c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", 
30073 function (size) {
30074 return  new Array (size);
30075 }, "~N");
30076 c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", 
30077 function (size) {
30078 return  new Array (size);
30079 }, "~N");
30080 c$.swap = Clazz_defineMethod (c$, "swap", 
30081 function (o, i, j) {
30082 var oi = o[i];
30083 o[i] = o[j];
30084 o[j] = oi;
30085 }, "~A,~N,~N");
30086 c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", 
30087 function (n) {
30088 {
30089 return Clazz_newArray(n, null);
30090 }}, "~N");
30091 c$.newInt2 = Clazz_defineMethod (c$, "newInt2", 
30092 function (n) {
30093 {
30094 return Clazz_newArray(n, null);
30095 }}, "~N");
30096 c$.newInt3 = Clazz_defineMethod (c$, "newInt3", 
30097 function (nx, ny) {
30098 {
30099 return Clazz_newArray(nx, null);
30100 }}, "~N,~N");
30101 c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", 
30102 function (nx, ny) {
30103 {
30104 return Clazz_newArray(nx, null);
30105 }}, "~N,~N");
30106 c$.newInt4 = Clazz_defineMethod (c$, "newInt4", 
30107 function (n) {
30108 {
30109 return Clazz_newArray(n, null);
30110 }}, "~N");
30111 c$.newShort2 = Clazz_defineMethod (c$, "newShort2", 
30112 function (n) {
30113 {
30114 return Clazz_newArray(n, null);
30115 }}, "~N");
30116 c$.newByte2 = Clazz_defineMethod (c$, "newByte2", 
30117 function (n) {
30118 {
30119 return Clazz_newArray(n, null);
30120 }}, "~N");
30121 c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", 
30122 function (n) {
30123 {
30124 return Clazz_newArray(n, null);
30125 }}, "~N");
30126 c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", 
30127 function (map, root) {
30128 var list =  new JU.Lst ();
30129 for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key);
30130
30131 for (var i = list.size (); --i >= 0; ) map.remove (list.get (i));
30132
30133 return list.size ();
30134 }, "java.util.Map,~S");
30135 c$.isAS = Clazz_defineMethod (c$, "isAS", 
30136 function (x) {
30137 {
30138 return Clazz_isAS(x);
30139 }}, "~O");
30140 c$.isASS = Clazz_defineMethod (c$, "isASS", 
30141 function (x) {
30142 {
30143 return Clazz_isASS(x);
30144 }}, "~O");
30145 c$.isAP = Clazz_defineMethod (c$, "isAP", 
30146 function (x) {
30147 {
30148 return Clazz_isAP(x);
30149 }}, "~O");
30150 c$.isAF = Clazz_defineMethod (c$, "isAF", 
30151 function (x) {
30152 {
30153 return Clazz_isAF(x);
30154 }}, "~O");
30155 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
30156 function (x) {
30157 {
30158 return Clazz_isAFloat(x);
30159 }}, "~O");
30160 c$.isAD = Clazz_defineMethod (c$, "isAD", 
30161 function (x) {
30162 {
30163 return Clazz_isAF(x);
30164 }}, "~O");
30165 c$.isADD = Clazz_defineMethod (c$, "isADD", 
30166 function (x) {
30167 {
30168 return Clazz_isAFF(x);
30169 }}, "~O");
30170 c$.isAB = Clazz_defineMethod (c$, "isAB", 
30171 function (x) {
30172 {
30173 return Clazz_isAI(x);
30174 }}, "~O");
30175 c$.isAI = Clazz_defineMethod (c$, "isAI", 
30176 function (x) {
30177 {
30178 return Clazz_isAI(x);
30179 }}, "~O");
30180 c$.isAII = Clazz_defineMethod (c$, "isAII", 
30181 function (x) {
30182 {
30183 return Clazz_isAII(x);
30184 }}, "~O");
30185 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
30186 function (x) {
30187 {
30188 return Clazz_isAFF(x);
30189 }}, "~O");
30190 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
30191 function (x) {
30192 {
30193 return Clazz_isAFFF(x);
30194 }}, "~O");
30195 c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", 
30196 function (b) {
30197 if (b != null) {
30198 {
30199 for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if
30200 (j >= 0x80) j -= 0x100; b[i] = j; }
30201 }}return b;
30202 }, "~A");
30203 });
30204 Clazz_declarePackage ("JU");
30205 Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () {
30206 c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList);
30207 Clazz_defineMethod (c$, "addLast", 
30208 function (v) {
30209 {
30210 return this.add1(v);
30211 }}, "~O");
30212 Clazz_defineMethod (c$, "removeObj", 
30213 function (v) {
30214 {
30215 return this.removeObject(v);
30216 }}, "~O");
30217 });
30218 Clazz_declarePackage ("JU");
30219 Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () {
30220 c$ = Clazz_declareType (JU, "DF");
30221 c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", 
30222 function (TF) {
30223 JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE);
30224 }, "~B");
30225 c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", 
30226 function (value, decimalDigits) {
30227 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value;
30228 return JU.DF.formatDecimal (value, decimalDigits);
30229 }, "~N,~N");
30230 c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", 
30231 function (value, decimalDigits) {
30232 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value;
30233 var n;
30234 if (decimalDigits < 0) {
30235 decimalDigits = -decimalDigits;
30236 if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length;
30237 if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0";
30238 n = 0;
30239 var d;
30240 if (Math.abs (value) < 1) {
30241 n = 10;
30242 d = value * 1e-10;
30243 } else {
30244 n = -10;
30245 d = value * 1e10;
30246 }var s = ("" + d).toUpperCase ();
30247 var i = s.indexOf ("E");
30248 n = JU.PT.parseInt (s.substring (i + 1)) + n;
30249 return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n);
30250 }if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1;
30251 var s1 = ("" + value).toUpperCase ();
30252 var pt = s1.indexOf (".");
30253 if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1);
30254 var isNeg = s1.startsWith ("-");
30255 if (isNeg) {
30256 s1 = s1.substring (1);
30257 pt--;
30258 }var pt1 = s1.indexOf ("E-");
30259 if (pt1 > 0) {
30260 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30261 s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1);
30262 pt = 1;
30263 }pt1 = s1.indexOf ("E");
30264 if (pt1 > 0) {
30265 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30266 s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000";
30267 s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1);
30268 pt = s1.indexOf (".");
30269 }var len = s1.length;
30270 var pt2 = decimalDigits + pt + 1;
30271 if (pt2 < len && s1.charAt (pt2) >= '5') {
30272 return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits);
30273 }var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt)));
30274 for (var i = 0; i < decimalDigits; i++, pt++) {
30275 if (pt < len) sb.appendC (s1.charAt (pt));
30276  else sb.appendC ('0');
30277 }
30278 s1 = (isNeg ? "-" : "") + sb;
30279 return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.'));
30280 }, "~N,~N");
30281 c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", 
30282 function (x, precision) {
30283 var str = JU.DF.formatDecimalDbl (x, precision);
30284 var m = str.length - 1;
30285 var zero = '0';
30286 while (m >= 0 && str.charAt (m) == zero) m--;
30287
30288 return str.substring (0, m + 1);
30289 }, "~N,~N");
30290 Clazz_defineStatics (c$,
30291 "formattingStrings",  Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]),
30292 "zeros", "0000000000000000000000000000000000000000",
30293 "formatAdds",  Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005]));
30294 c$.useNumberLocalization = c$.prototype.useNumberLocalization =  Clazz_newArray (-1, [Boolean.TRUE]);
30295 });
30296 Clazz_declarePackage ("JU");
30297 c$ = Clazz_decorateAsClass (function () {
30298 this.sb = null;
30299 this.s = null;
30300 Clazz_instantialize (this, arguments);
30301 }, JU, "SB");
30302 Clazz_makeConstructor (c$, 
30303 function () {
30304 {
30305 this.s = "";
30306 }});
30307 c$.newN = Clazz_defineMethod (c$, "newN", 
30308 function (n) {
30309 {
30310 return new JU.SB();
30311 }}, "~N");
30312 c$.newS = Clazz_defineMethod (c$, "newS", 
30313 function (s) {
30314 {
30315 var sb = new JU.SB();
30316 sb.s = s;
30317 return sb;
30318 }}, "~S");
30319 Clazz_defineMethod (c$, "append", 
30320 function (s) {
30321 {
30322 this.s += s
30323 }return this;
30324 }, "~S");
30325 Clazz_defineMethod (c$, "appendC", 
30326 function (c) {
30327 {
30328 this.s += c;
30329 }return this;
30330 }, "~S");
30331 Clazz_defineMethod (c$, "appendI", 
30332 function (i) {
30333 {
30334 this.s += i
30335 }return this;
30336 }, "~N");
30337 Clazz_defineMethod (c$, "appendB", 
30338 function (b) {
30339 {
30340 this.s += b
30341 }return this;
30342 }, "~B");
30343 Clazz_defineMethod (c$, "appendF", 
30344 function (f) {
30345 {
30346 var sf = "" + f;
30347 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30348 sf += ".0" ;
30349 this.s += sf;
30350 }return this;
30351 }, "~N");
30352 Clazz_defineMethod (c$, "appendD", 
30353 function (d) {
30354 {
30355 var sf = "" + d;
30356 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30357 sf += ".0" ;
30358 this.s += sf;
30359 }return this;
30360 }, "~N");
30361 Clazz_defineMethod (c$, "appendSB", 
30362 function (buf) {
30363 {
30364 this.s += buf.s;
30365 }return this;
30366 }, "JU.SB");
30367 Clazz_defineMethod (c$, "appendO", 
30368 function (data) {
30369 if (data != null) {
30370 {
30371 this.s += data.toString();
30372 }}return this;
30373 }, "~O");
30374 Clazz_defineMethod (c$, "appendCB", 
30375 function (cb, off, len) {
30376 {
30377 for (var i = len,j=off; --i >= 0;)
30378 this.s += cb[j++];
30379 }}, "~A,~N,~N");
30380 Clazz_overrideMethod (c$, "toString", 
30381 function () {
30382 {
30383 return this.s;
30384 }});
30385 Clazz_defineMethod (c$, "length", 
30386 function () {
30387 {
30388 return this.s.length;
30389 }});
30390 Clazz_defineMethod (c$, "indexOf", 
30391 function (s) {
30392 {
30393 return this.s.indexOf(s);
30394 }}, "~S");
30395 Clazz_defineMethod (c$, "charAt", 
30396 function (i) {
30397 {
30398 return this.s.charAt(i);
30399 }}, "~N");
30400 Clazz_defineMethod (c$, "charCodeAt", 
30401 function (i) {
30402 {
30403 return this.s.charCodeAt(i);
30404 }}, "~N");
30405 Clazz_defineMethod (c$, "setLength", 
30406 function (n) {
30407 {
30408 this.s = this.s.substring(0, n);
30409 }}, "~N");
30410 Clazz_defineMethod (c$, "lastIndexOf", 
30411 function (s) {
30412 {
30413 return this.s.lastIndexOf(s);
30414 }}, "~S");
30415 Clazz_defineMethod (c$, "indexOf2", 
30416 function (s, i) {
30417 {
30418 return this.s.indexOf(s, i);
30419 }}, "~S,~N");
30420 Clazz_defineMethod (c$, "substring", 
30421 function (i) {
30422 {
30423 return this.s.substring(i);
30424 }}, "~N");
30425 Clazz_defineMethod (c$, "substring2", 
30426 function (i, j) {
30427 {
30428 return this.s.substring(i, j);
30429 }}, "~N,~N");
30430 Clazz_defineMethod (c$, "toBytes", 
30431 function (off, len) {
30432 if (len < 0) len = this.length () - off;
30433 var b =  Clazz_newByteArray (len, 0);
30434 for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
30435
30436 return b;
30437 }, "~N,~N");
30438 Clazz_defineMethod (c$, "replace", 
30439 function (start, end, str) {
30440 {
30441 this.s = this.s.substring(0, start) + str + this.s.substring(end);
30442 }}, "~N,~N,~S");
30443 Clazz_defineMethod (c$, "insert", 
30444 function (offset, str) {
30445 this.replace (offset, offset, str);
30446 }, "~N,~S");
30447 Clazz_declarePackage ("JU");
30448 Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () {
30449 c$ = Clazz_decorateAsClass (function () {
30450 this.m00 = 0;
30451 this.m01 = 0;
30452 this.m02 = 0;
30453 this.m10 = 0;
30454 this.m11 = 0;
30455 this.m12 = 0;
30456 this.m20 = 0;
30457 this.m21 = 0;
30458 this.m22 = 0;
30459 Clazz_instantialize (this, arguments);
30460 }, JU, "M34");
30461 Clazz_defineMethod (c$, "setAA33", 
30462 function (a) {
30463 var x = a.x;
30464 var y = a.y;
30465 var z = a.z;
30466 var angle = a.angle;
30467 var n = Math.sqrt (x * x + y * y + z * z);
30468 n = 1 / n;
30469 x *= n;
30470 y *= n;
30471 z *= n;
30472 var c = Math.cos (angle);
30473 var s = Math.sin (angle);
30474 var omc = 1.0 - c;
30475 this.m00 = (c + x * x * omc);
30476 this.m11 = (c + y * y * omc);
30477 this.m22 = (c + z * z * omc);
30478 var tmp1 = x * y * omc;
30479 var tmp2 = z * s;
30480 this.m01 = (tmp1 - tmp2);
30481 this.m10 = (tmp1 + tmp2);
30482 tmp1 = x * z * omc;
30483 tmp2 = y * s;
30484 this.m02 = (tmp1 + tmp2);
30485 this.m20 = (tmp1 - tmp2);
30486 tmp1 = y * z * omc;
30487 tmp2 = x * s;
30488 this.m12 = (tmp1 - tmp2);
30489 this.m21 = (tmp1 + tmp2);
30490 }, "JU.A4");
30491 Clazz_defineMethod (c$, "rotate", 
30492 function (t) {
30493 this.rotate2 (t, t);
30494 }, "JU.T3");
30495 Clazz_defineMethod (c$, "rotate2", 
30496 function (t, result) {
30497 result.set (this.m00 * t.x + this.m01 * t.y + this.m02 * t.z, this.m10 * t.x + this.m11 * t.y + this.m12 * t.z, this.m20 * t.x + this.m21 * t.y + this.m22 * t.z);
30498 }, "JU.T3,JU.T3");
30499 Clazz_defineMethod (c$, "setM33", 
30500 function (m1) {
30501 this.m00 = m1.m00;
30502 this.m01 = m1.m01;
30503 this.m02 = m1.m02;
30504 this.m10 = m1.m10;
30505 this.m11 = m1.m11;
30506 this.m12 = m1.m12;
30507 this.m20 = m1.m20;
30508 this.m21 = m1.m21;
30509 this.m22 = m1.m22;
30510 }, "JU.M34");
30511 Clazz_defineMethod (c$, "clear33", 
30512 function () {
30513 this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0;
30514 });
30515 Clazz_defineMethod (c$, "set33", 
30516 function (row, col, v) {
30517 switch (row) {
30518 case 0:
30519 switch (col) {
30520 case 0:
30521 this.m00 = v;
30522 return;
30523 case 1:
30524 this.m01 = v;
30525 return;
30526 case 2:
30527 this.m02 = v;
30528 return;
30529 }
30530 break;
30531 case 1:
30532 switch (col) {
30533 case 0:
30534 this.m10 = v;
30535 return;
30536 case 1:
30537 this.m11 = v;
30538 return;
30539 case 2:
30540 this.m12 = v;
30541 return;
30542 }
30543 break;
30544 case 2:
30545 switch (col) {
30546 case 0:
30547 this.m20 = v;
30548 return;
30549 case 1:
30550 this.m21 = v;
30551 return;
30552 case 2:
30553 this.m22 = v;
30554 return;
30555 }
30556 break;
30557 }
30558 this.err ();
30559 }, "~N,~N,~N");
30560 Clazz_defineMethod (c$, "get33", 
30561 function (row, col) {
30562 switch (row) {
30563 case 0:
30564 switch (col) {
30565 case 0:
30566 return this.m00;
30567 case 1:
30568 return this.m01;
30569 case 2:
30570 return this.m02;
30571 }
30572 break;
30573 case 1:
30574 switch (col) {
30575 case 0:
30576 return this.m10;
30577 case 1:
30578 return this.m11;
30579 case 2:
30580 return this.m12;
30581 }
30582 break;
30583 case 2:
30584 switch (col) {
30585 case 0:
30586 return this.m20;
30587 case 1:
30588 return this.m21;
30589 case 2:
30590 return this.m22;
30591 }
30592 break;
30593 }
30594 this.err ();
30595 return 0;
30596 }, "~N,~N");
30597 Clazz_defineMethod (c$, "setRow33", 
30598 function (row, v) {
30599 switch (row) {
30600 case 0:
30601 this.m00 = v[0];
30602 this.m01 = v[1];
30603 this.m02 = v[2];
30604 return;
30605 case 1:
30606 this.m10 = v[0];
30607 this.m11 = v[1];
30608 this.m12 = v[2];
30609 return;
30610 case 2:
30611 this.m20 = v[0];
30612 this.m21 = v[1];
30613 this.m22 = v[2];
30614 return;
30615 default:
30616 this.err ();
30617 }
30618 }, "~N,~A");
30619 Clazz_defineMethod (c$, "getRow33", 
30620 function (row, v) {
30621 switch (row) {
30622 case 0:
30623 v[0] = this.m00;
30624 v[1] = this.m01;
30625 v[2] = this.m02;
30626 return;
30627 case 1:
30628 v[0] = this.m10;
30629 v[1] = this.m11;
30630 v[2] = this.m12;
30631 return;
30632 case 2:
30633 v[0] = this.m20;
30634 v[1] = this.m21;
30635 v[2] = this.m22;
30636 return;
30637 }
30638 this.err ();
30639 }, "~N,~A");
30640 Clazz_defineMethod (c$, "setColumn33", 
30641 function (column, v) {
30642 switch (column) {
30643 case 0:
30644 this.m00 = v[0];
30645 this.m10 = v[1];
30646 this.m20 = v[2];
30647 break;
30648 case 1:
30649 this.m01 = v[0];
30650 this.m11 = v[1];
30651 this.m21 = v[2];
30652 break;
30653 case 2:
30654 this.m02 = v[0];
30655 this.m12 = v[1];
30656 this.m22 = v[2];
30657 break;
30658 default:
30659 this.err ();
30660 }
30661 }, "~N,~A");
30662 Clazz_defineMethod (c$, "getColumn33", 
30663 function (column, v) {
30664 switch (column) {
30665 case 0:
30666 v[0] = this.m00;
30667 v[1] = this.m10;
30668 v[2] = this.m20;
30669 break;
30670 case 1:
30671 v[0] = this.m01;
30672 v[1] = this.m11;
30673 v[2] = this.m21;
30674 break;
30675 case 2:
30676 v[0] = this.m02;
30677 v[1] = this.m12;
30678 v[2] = this.m22;
30679 break;
30680 default:
30681 this.err ();
30682 }
30683 }, "~N,~A");
30684 Clazz_defineMethod (c$, "add33", 
30685 function (m1) {
30686 this.m00 += m1.m00;
30687 this.m01 += m1.m01;
30688 this.m02 += m1.m02;
30689 this.m10 += m1.m10;
30690 this.m11 += m1.m11;
30691 this.m12 += m1.m12;
30692 this.m20 += m1.m20;
30693 this.m21 += m1.m21;
30694 this.m22 += m1.m22;
30695 }, "JU.M34");
30696 Clazz_defineMethod (c$, "sub33", 
30697 function (m1) {
30698 this.m00 -= m1.m00;
30699 this.m01 -= m1.m01;
30700 this.m02 -= m1.m02;
30701 this.m10 -= m1.m10;
30702 this.m11 -= m1.m11;
30703 this.m12 -= m1.m12;
30704 this.m20 -= m1.m20;
30705 this.m21 -= m1.m21;
30706 this.m22 -= m1.m22;
30707 }, "JU.M34");
30708 Clazz_defineMethod (c$, "mul33", 
30709 function (x) {
30710 this.m00 *= x;
30711 this.m01 *= x;
30712 this.m02 *= x;
30713 this.m10 *= x;
30714 this.m11 *= x;
30715 this.m12 *= x;
30716 this.m20 *= x;
30717 this.m21 *= x;
30718 this.m22 *= x;
30719 }, "~N");
30720 Clazz_defineMethod (c$, "transpose33", 
30721 function () {
30722 var tmp = this.m01;
30723 this.m01 = this.m10;
30724 this.m10 = tmp;
30725 tmp = this.m02;
30726 this.m02 = this.m20;
30727 this.m20 = tmp;
30728 tmp = this.m12;
30729 this.m12 = this.m21;
30730 this.m21 = tmp;
30731 });
30732 Clazz_defineMethod (c$, "setXRot", 
30733 function (angle) {
30734 var c = Math.cos (angle);
30735 var s = Math.sin (angle);
30736 this.m00 = 1.0;
30737 this.m01 = 0.0;
30738 this.m02 = 0.0;
30739 this.m10 = 0.0;
30740 this.m11 = c;
30741 this.m12 = -s;
30742 this.m20 = 0.0;
30743 this.m21 = s;
30744 this.m22 = c;
30745 }, "~N");
30746 Clazz_defineMethod (c$, "setYRot", 
30747 function (angle) {
30748 var c = Math.cos (angle);
30749 var s = Math.sin (angle);
30750 this.m00 = c;
30751 this.m01 = 0.0;
30752 this.m02 = s;
30753 this.m10 = 0.0;
30754 this.m11 = 1.0;
30755 this.m12 = 0.0;
30756 this.m20 = -s;
30757 this.m21 = 0.0;
30758 this.m22 = c;
30759 }, "~N");
30760 Clazz_defineMethod (c$, "setZRot", 
30761 function (angle) {
30762 var c = Math.cos (angle);
30763 var s = Math.sin (angle);
30764 this.m00 = c;
30765 this.m01 = -s;
30766 this.m02 = 0.0;
30767 this.m10 = s;
30768 this.m11 = c;
30769 this.m12 = 0.0;
30770 this.m20 = 0.0;
30771 this.m21 = 0.0;
30772 this.m22 = 1.0;
30773 }, "~N");
30774 Clazz_defineMethod (c$, "determinant3", 
30775 function () {
30776 return this.m00 * (this.m11 * this.m22 - this.m21 * this.m12) - this.m01 * (this.m10 * this.m22 - this.m20 * this.m12) + this.m02 * (this.m10 * this.m21 - this.m20 * this.m11);
30777 });
30778 Clazz_defineMethod (c$, "err", 
30779 function () {
30780 throw  new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds");
30781 });
30782 });
30783 Clazz_declarePackage ("JU");
30784 Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () {
30785 c$ = Clazz_decorateAsClass (function () {
30786 this.m03 = 0;
30787 this.m13 = 0;
30788 this.m23 = 0;
30789 this.m30 = 0;
30790 this.m31 = 0;
30791 this.m32 = 0;
30792 this.m33 = 0;
30793 Clazz_instantialize (this, arguments);
30794 }, JU, "M4", JU.M34);
30795 c$.newA16 = Clazz_defineMethod (c$, "newA16", 
30796 function (v) {
30797 var m =  new JU.M4 ();
30798 m.m00 = v[0];
30799 m.m01 = v[1];
30800 m.m02 = v[2];
30801 m.m03 = v[3];
30802 m.m10 = v[4];
30803 m.m11 = v[5];
30804 m.m12 = v[6];
30805 m.m13 = v[7];
30806 m.m20 = v[8];
30807 m.m21 = v[9];
30808 m.m22 = v[10];
30809 m.m23 = v[11];
30810 m.m30 = v[12];
30811 m.m31 = v[13];
30812 m.m32 = v[14];
30813 m.m33 = v[15];
30814 return m;
30815 }, "~A");
30816 c$.newM4 = Clazz_defineMethod (c$, "newM4", 
30817 function (m1) {
30818 var m =  new JU.M4 ();
30819 if (m1 == null) {
30820 m.setIdentity ();
30821 return m;
30822 }m.setToM3 (m1);
30823 m.m03 = m1.m03;
30824 m.m13 = m1.m13;
30825 m.m23 = m1.m23;
30826 m.m30 = m1.m30;
30827 m.m31 = m1.m31;
30828 m.m32 = m1.m32;
30829 m.m33 = m1.m33;
30830 return m;
30831 }, "JU.M4");
30832 c$.newMV = Clazz_defineMethod (c$, "newMV", 
30833 function (m1, t) {
30834 var m =  new JU.M4 ();
30835 m.setMV (m1, t);
30836 return m;
30837 }, "JU.M3,JU.T3");
30838 Clazz_defineMethod (c$, "setZero", 
30839 function () {
30840 this.clear33 ();
30841 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0;
30842 });
30843 Clazz_defineMethod (c$, "setIdentity", 
30844 function () {
30845 this.setZero ();
30846 this.m00 = this.m11 = this.m22 = this.m33 = 1.0;
30847 });
30848 Clazz_defineMethod (c$, "setM4", 
30849 function (m1) {
30850 this.setM33 (m1);
30851 this.m03 = m1.m03;
30852 this.m13 = m1.m13;
30853 this.m23 = m1.m23;
30854 this.m30 = m1.m30;
30855 this.m31 = m1.m31;
30856 this.m32 = m1.m32;
30857 this.m33 = m1.m33;
30858 return this;
30859 }, "JU.M4");
30860 Clazz_defineMethod (c$, "setMV", 
30861 function (m1, t) {
30862 this.setM33 (m1);
30863 this.setTranslation (t);
30864 this.m33 = 1;
30865 }, "JU.M3,JU.T3");
30866 Clazz_defineMethod (c$, "setToM3", 
30867 function (m1) {
30868 this.setM33 (m1);
30869 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0;
30870 this.m33 = 1.0;
30871 }, "JU.M34");
30872 Clazz_defineMethod (c$, "setToAA", 
30873 function (a) {
30874 this.setIdentity ();
30875 this.setAA33 (a);
30876 }, "JU.A4");
30877 Clazz_defineMethod (c$, "setA", 
30878 function (m) {
30879 this.m00 = m[0];
30880 this.m01 = m[1];
30881 this.m02 = m[2];
30882 this.m03 = m[3];
30883 this.m10 = m[4];
30884 this.m11 = m[5];
30885 this.m12 = m[6];
30886 this.m13 = m[7];
30887 this.m20 = m[8];
30888 this.m21 = m[9];
30889 this.m22 = m[10];
30890 this.m23 = m[11];
30891 this.m30 = m[12];
30892 this.m31 = m[13];
30893 this.m32 = m[14];
30894 this.m33 = m[15];
30895 }, "~A");
30896 Clazz_defineMethod (c$, "setTranslation", 
30897 function (trans) {
30898 this.m03 = trans.x;
30899 this.m13 = trans.y;
30900 this.m23 = trans.z;
30901 }, "JU.T3");
30902 Clazz_defineMethod (c$, "setElement", 
30903 function (row, col, v) {
30904 if (row < 3 && col < 3) {
30905 this.set33 (row, col, v);
30906 return;
30907 }if (row > 3 || col > 3) this.err ();
30908 switch (row) {
30909 case 0:
30910 this.m03 = v;
30911 return;
30912 case 1:
30913 this.m13 = v;
30914 return;
30915 case 2:
30916 this.m23 = v;
30917 return;
30918 }
30919 switch (col) {
30920 case 0:
30921 this.m30 = v;
30922 return;
30923 case 1:
30924 this.m31 = v;
30925 return;
30926 case 2:
30927 this.m32 = v;
30928 return;
30929 case 3:
30930 this.m33 = v;
30931 return;
30932 }
30933 }, "~N,~N,~N");
30934 Clazz_defineMethod (c$, "getElement", 
30935 function (row, col) {
30936 if (row < 3 && col < 3) return this.get33 (row, col);
30937 if (row > 3 || col > 3) {
30938 this.err ();
30939 return 0;
30940 }switch (row) {
30941 case 0:
30942 return this.m03;
30943 case 1:
30944 return this.m13;
30945 case 2:
30946 return this.m23;
30947 default:
30948 switch (col) {
30949 case 0:
30950 return this.m30;
30951 case 1:
30952 return this.m31;
30953 case 2:
30954 return this.m32;
30955 default:
30956 return this.m33;
30957 }
30958 }
30959 }, "~N,~N");
30960 Clazz_defineMethod (c$, "getTranslation", 
30961 function (trans) {
30962 trans.x = this.m03;
30963 trans.y = this.m13;
30964 trans.z = this.m23;
30965 }, "JU.T3");
30966 Clazz_defineMethod (c$, "getRotationScale", 
30967 function (m1) {
30968 m1.m00 = this.m00;
30969 m1.m01 = this.m01;
30970 m1.m02 = this.m02;
30971 m1.m10 = this.m10;
30972 m1.m11 = this.m11;
30973 m1.m12 = this.m12;
30974 m1.m20 = this.m20;
30975 m1.m21 = this.m21;
30976 m1.m22 = this.m22;
30977 }, "JU.M3");
30978 Clazz_defineMethod (c$, "setRotationScale", 
30979 function (m1) {
30980 this.m00 = m1.m00;
30981 this.m01 = m1.m01;
30982 this.m02 = m1.m02;
30983 this.m10 = m1.m10;
30984 this.m11 = m1.m11;
30985 this.m12 = m1.m12;
30986 this.m20 = m1.m20;
30987 this.m21 = m1.m21;
30988 this.m22 = m1.m22;
30989 }, "JU.M3");
30990 Clazz_defineMethod (c$, "setRowA", 
30991 function (row, v) {
30992 if (row < 3) this.setRow33 (row, v);
30993 switch (row) {
30994 case 0:
30995 this.m03 = v[3];
30996 return;
30997 case 1:
30998 this.m13 = v[3];
30999 return;
31000 case 2:
31001 this.m23 = v[3];
31002 return;
31003 case 3:
31004 this.m30 = v[0];
31005 this.m31 = v[1];
31006 this.m32 = v[2];
31007 this.m33 = v[3];
31008 return;
31009 }
31010 this.err ();
31011 }, "~N,~A");
31012 Clazz_overrideMethod (c$, "getRow", 
31013 function (row, v) {
31014 if (row < 3) this.getRow33 (row, v);
31015 switch (row) {
31016 case 0:
31017 v[3] = this.m03;
31018 return;
31019 case 1:
31020 v[3] = this.m13;
31021 return;
31022 case 2:
31023 v[3] = this.m23;
31024 return;
31025 case 3:
31026 v[0] = this.m30;
31027 v[1] = this.m31;
31028 v[2] = this.m32;
31029 v[3] = this.m33;
31030 return;
31031 }
31032 this.err ();
31033 }, "~N,~A");
31034 Clazz_defineMethod (c$, "setColumn4", 
31035 function (column, x, y, z, w) {
31036 if (column == 0) {
31037 this.m00 = x;
31038 this.m10 = y;
31039 this.m20 = z;
31040 this.m30 = w;
31041 } else if (column == 1) {
31042 this.m01 = x;
31043 this.m11 = y;
31044 this.m21 = z;
31045 this.m31 = w;
31046 } else if (column == 2) {
31047 this.m02 = x;
31048 this.m12 = y;
31049 this.m22 = z;
31050 this.m32 = w;
31051 } else if (column == 3) {
31052 this.m03 = x;
31053 this.m13 = y;
31054 this.m23 = z;
31055 this.m33 = w;
31056 } else {
31057 this.err ();
31058 }}, "~N,~N,~N,~N,~N");
31059 Clazz_defineMethod (c$, "setColumnA", 
31060 function (column, v) {
31061 if (column < 3) this.setColumn33 (column, v);
31062 switch (column) {
31063 case 0:
31064 this.m30 = v[3];
31065 return;
31066 case 1:
31067 this.m31 = v[3];
31068 return;
31069 case 2:
31070 this.m32 = v[3];
31071 return;
31072 case 3:
31073 this.m03 = v[0];
31074 this.m13 = v[1];
31075 this.m23 = v[2];
31076 this.m33 = v[3];
31077 return;
31078 default:
31079 this.err ();
31080 }
31081 }, "~N,~A");
31082 Clazz_defineMethod (c$, "getColumn", 
31083 function (column, v) {
31084 if (column < 3) this.getColumn33 (column, v);
31085 switch (column) {
31086 case 0:
31087 v[3] = this.m30;
31088 return;
31089 case 1:
31090 v[3] = this.m31;
31091 return;
31092 case 2:
31093 v[3] = this.m32;
31094 return;
31095 case 3:
31096 v[0] = this.m03;
31097 v[1] = this.m13;
31098 v[2] = this.m23;
31099 v[3] = this.m33;
31100 return;
31101 default:
31102 this.err ();
31103 }
31104 }, "~N,~A");
31105 Clazz_defineMethod (c$, "sub", 
31106 function (m1) {
31107 this.sub33 (m1);
31108 this.m03 -= m1.m03;
31109 this.m13 -= m1.m13;
31110 this.m23 -= m1.m23;
31111 this.m30 -= m1.m30;
31112 this.m31 -= m1.m31;
31113 this.m32 -= m1.m32;
31114 this.m33 -= m1.m33;
31115 }, "JU.M4");
31116 Clazz_defineMethod (c$, "transpose", 
31117 function () {
31118 this.transpose33 ();
31119 var tmp = this.m03;
31120 this.m03 = this.m30;
31121 this.m30 = tmp;
31122 tmp = this.m13;
31123 this.m13 = this.m31;
31124 this.m31 = tmp;
31125 tmp = this.m23;
31126 this.m23 = this.m32;
31127 this.m32 = tmp;
31128 });
31129 Clazz_defineMethod (c$, "invert", 
31130 function () {
31131 var s = this.determinant4 ();
31132 if (s == 0.0) return this;
31133 s = 1 / s;
31134 this.set (this.m11 * (this.m22 * this.m33 - this.m23 * this.m32) + this.m12 * (this.m23 * this.m31 - this.m21 * this.m33) + this.m13 * (this.m21 * this.m32 - this.m22 * this.m31), this.m21 * (this.m02 * this.m33 - this.m03 * this.m32) + this.m22 * (this.m03 * this.m31 - this.m01 * this.m33) + this.m23 * (this.m01 * this.m32 - this.m02 * this.m31), this.m31 * (this.m02 * this.m13 - this.m03 * this.m12) + this.m32 * (this.m03 * this.m11 - this.m01 * this.m13) + this.m33 * (this.m01 * this.m12 - this.m02 * this.m11), this.m01 * (this.m13 * this.m22 - this.m12 * this.m23) + this.m02 * (this.m11 * this.m23 - this.m13 * this.m21) + this.m03 * (this.m12 * this.m21 - this.m11 * this.m22), this.m12 * (this.m20 * this.m33 - this.m23 * this.m30) + this.m13 * (this.m22 * this.m30 - this.m20 * this.m32) + this.m10 * (this.m23 * this.m32 - this.m22 * this.m33), this.m22 * (this.m00 * this.m33 - this.m03 * this.m30) + this.m23 * (this.m02 * this.m30 - this.m00 * this.m32) + this.m20 * (this.m03 * this.m32 - this.m02 * this.m33), this.m32 * (this.m00 * this.m13 - this.m03 * this.m10) + this.m33 * (this.m02 * this.m10 - this.m00 * this.m12) + this.m30 * (this.m03 * this.m12 - this.m02 * this.m13), this.m02 * (this.m13 * this.m20 - this.m10 * this.m23) + this.m03 * (this.m10 * this.m22 - this.m12 * this.m20) + this.m00 * (this.m12 * this.m23 - this.m13 * this.m22), this.m13 * (this.m20 * this.m31 - this.m21 * this.m30) + this.m10 * (this.m21 * this.m33 - this.m23 * this.m31) + this.m11 * (this.m23 * this.m30 - this.m20 * this.m33), this.m23 * (this.m00 * this.m31 - this.m01 * this.m30) + this.m20 * (this.m01 * this.m33 - this.m03 * this.m31) + this.m21 * (this.m03 * this.m30 - this.m00 * this.m33), this.m33 * (this.m00 * this.m11 - this.m01 * this.m10) + this.m30 * (this.m01 * this.m13 - this.m03 * this.m11) + this.m31 * (this.m03 * this.m10 - this.m00 * this.m13), this.m03 * (this.m11 * this.m20 - this.m10 * this.m21) + this.m00 * (this.m13 * this.m21 - this.m11 * this.m23) + this.m01 * (this.m10 * this.m23 - this.m13 * this.m20), this.m10 * (this.m22 * this.m31 - this.m21 * this.m32) + this.m11 * (this.m20 * this.m32 - this.m22 * this.m30) + this.m12 * (this.m21 * this.m30 - this.m20 * this.m31), this.m20 * (this.m02 * this.m31 - this.m01 * this.m32) + this.m21 * (this.m00 * this.m32 - this.m02 * this.m30) + this.m22 * (this.m01 * this.m30 - this.m00 * this.m31), this.m30 * (this.m02 * this.m11 - this.m01 * this.m12) + this.m31 * (this.m00 * this.m12 - this.m02 * this.m10) + this.m32 * (this.m01 * this.m10 - this.m00 * this.m11), this.m00 * (this.m11 * this.m22 - this.m12 * this.m21) + this.m01 * (this.m12 * this.m20 - this.m10 * this.m22) + this.m02 * (this.m10 * this.m21 - this.m11 * this.m20));
31135 this.scale (s);
31136 return this;
31137 });
31138 Clazz_defineMethod (c$, "set", 
31139  function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
31140 this.m00 = m00;
31141 this.m01 = m01;
31142 this.m02 = m02;
31143 this.m03 = m03;
31144 this.m10 = m10;
31145 this.m11 = m11;
31146 this.m12 = m12;
31147 this.m13 = m13;
31148 this.m20 = m20;
31149 this.m21 = m21;
31150 this.m22 = m22;
31151 this.m23 = m23;
31152 this.m30 = m30;
31153 this.m31 = m31;
31154 this.m32 = m32;
31155 this.m33 = m33;
31156 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
31157 Clazz_defineMethod (c$, "determinant4", 
31158 function () {
31159 return (this.m00 * this.m11 - this.m01 * this.m10) * (this.m22 * this.m33 - this.m23 * this.m32) - (this.m00 * this.m12 - this.m02 * this.m10) * (this.m21 * this.m33 - this.m23 * this.m31) + (this.m00 * this.m13 - this.m03 * this.m10) * (this.m21 * this.m32 - this.m22 * this.m31) + (this.m01 * this.m12 - this.m02 * this.m11) * (this.m20 * this.m33 - this.m23 * this.m30) - (this.m01 * this.m13 - this.m03 * this.m11) * (this.m20 * this.m32 - this.m22 * this.m30) + (this.m02 * this.m13 - this.m03 * this.m12) * (this.m20 * this.m31 - this.m21 * this.m30);
31160 });
31161 Clazz_defineMethod (c$, "scale", 
31162  function (scalar) {
31163 this.mul33 (scalar);
31164 this.m03 *= scalar;
31165 this.m13 *= scalar;
31166 this.m23 *= scalar;
31167 this.m30 *= scalar;
31168 this.m31 *= scalar;
31169 this.m32 *= scalar;
31170 this.m33 *= scalar;
31171 }, "~N");
31172 Clazz_defineMethod (c$, "mul", 
31173 function (m1) {
31174 this.mul2 (this, m1);
31175 }, "JU.M4");
31176 Clazz_defineMethod (c$, "mul2", 
31177 function (m1, m2) {
31178 this.set (m1.m00 * m2.m00 + m1.m01 * m2.m10 + m1.m02 * m2.m20 + m1.m03 * m2.m30, m1.m00 * m2.m01 + m1.m01 * m2.m11 + m1.m02 * m2.m21 + m1.m03 * m2.m31, m1.m00 * m2.m02 + m1.m01 * m2.m12 + m1.m02 * m2.m22 + m1.m03 * m2.m32, m1.m00 * m2.m03 + m1.m01 * m2.m13 + m1.m02 * m2.m23 + m1.m03 * m2.m33, m1.m10 * m2.m00 + m1.m11 * m2.m10 + m1.m12 * m2.m20 + m1.m13 * m2.m30, m1.m10 * m2.m01 + m1.m11 * m2.m11 + m1.m12 * m2.m21 + m1.m13 * m2.m31, m1.m10 * m2.m02 + m1.m11 * m2.m12 + m1.m12 * m2.m22 + m1.m13 * m2.m32, m1.m10 * m2.m03 + m1.m11 * m2.m13 + m1.m12 * m2.m23 + m1.m13 * m2.m33, m1.m20 * m2.m00 + m1.m21 * m2.m10 + m1.m22 * m2.m20 + m1.m23 * m2.m30, m1.m20 * m2.m01 + m1.m21 * m2.m11 + m1.m22 * m2.m21 + m1.m23 * m2.m31, m1.m20 * m2.m02 + m1.m21 * m2.m12 + m1.m22 * m2.m22 + m1.m23 * m2.m32, m1.m20 * m2.m03 + m1.m21 * m2.m13 + m1.m22 * m2.m23 + m1.m23 * m2.m33, m1.m30 * m2.m00 + m1.m31 * m2.m10 + m1.m32 * m2.m20 + m1.m33 * m2.m30, m1.m30 * m2.m01 + m1.m31 * m2.m11 + m1.m32 * m2.m21 + m1.m33 * m2.m31, m1.m30 * m2.m02 + m1.m31 * m2.m12 + m1.m32 * m2.m22 + m1.m33 * m2.m32, m1.m30 * m2.m03 + m1.m31 * m2.m13 + m1.m32 * m2.m23 + m1.m33 * m2.m33);
31179 }, "JU.M4,JU.M4");
31180 Clazz_defineMethod (c$, "transform", 
31181 function (vec) {
31182 this.transform2 (vec, vec);
31183 }, "JU.T4");
31184 Clazz_defineMethod (c$, "transform2", 
31185 function (vec, vecOut) {
31186 vecOut.set4 (this.m00 * vec.x + this.m01 * vec.y + this.m02 * vec.z + this.m03 * vec.w, this.m10 * vec.x + this.m11 * vec.y + this.m12 * vec.z + this.m13 * vec.w, this.m20 * vec.x + this.m21 * vec.y + this.m22 * vec.z + this.m23 * vec.w, this.m30 * vec.x + this.m31 * vec.y + this.m32 * vec.z + this.m33 * vec.w);
31187 }, "JU.T4,JU.T4");
31188 Clazz_defineMethod (c$, "rotTrans", 
31189 function (point) {
31190 this.rotTrans2 (point, point);
31191 }, "JU.T3");
31192 Clazz_defineMethod (c$, "rotTrans2", 
31193 function (point, pointOut) {
31194 pointOut.set (this.m00 * point.x + this.m01 * point.y + this.m02 * point.z + this.m03, this.m10 * point.x + this.m11 * point.y + this.m12 * point.z + this.m13, this.m20 * point.x + this.m21 * point.y + this.m22 * point.z + this.m23);
31195 return pointOut;
31196 }, "JU.T3,JU.T3");
31197 Clazz_defineMethod (c$, "setAsXYRotation", 
31198 function (angle) {
31199 this.setIdentity ();
31200 var c = Math.cos (angle);
31201 var s = Math.sin (angle);
31202 this.m22 = c;
31203 this.m23 = -s;
31204 this.m32 = s;
31205 this.m33 = c;
31206 return this;
31207 }, "~N");
31208 Clazz_defineMethod (c$, "setAsYZRotation", 
31209 function (angle) {
31210 this.setIdentity ();
31211 var c = Math.cos (angle);
31212 var s = Math.sin (angle);
31213 this.m00 = c;
31214 this.m03 = -s;
31215 this.m30 = s;
31216 this.m33 = c;
31217 return this;
31218 }, "~N");
31219 Clazz_defineMethod (c$, "setAsXZRotation", 
31220 function (angle) {
31221 this.setIdentity ();
31222 var c = Math.cos (angle);
31223 var s = Math.sin (angle);
31224 this.m11 = c;
31225 this.m13 = -s;
31226 this.m31 = s;
31227 this.m33 = c;
31228 return this;
31229 }, "~N");
31230 Clazz_overrideMethod (c$, "equals", 
31231 function (o) {
31232 if (!(Clazz_instanceOf (o, JU.M4))) return false;
31233 var m = o;
31234 return (this.m00 == m.m00 && this.m01 == m.m01 && this.m02 == m.m02 && this.m03 == m.m03 && this.m10 == m.m10 && this.m11 == m.m11 && this.m12 == m.m12 && this.m13 == m.m13 && this.m20 == m.m20 && this.m21 == m.m21 && this.m22 == m.m22 && this.m23 == m.m23 && this.m30 == m.m30 && this.m31 == m.m31 && this.m32 == m.m32 && this.m33 == m.m33);
31235 }, "~O");
31236 Clazz_overrideMethod (c$, "hashCode", 
31237 function () {
31238 return JU.T3.floatToIntBits0 (this.m00) ^ JU.T3.floatToIntBits0 (this.m01) ^ JU.T3.floatToIntBits0 (this.m02) ^ JU.T3.floatToIntBits0 (this.m03) ^ JU.T3.floatToIntBits0 (this.m10) ^ JU.T3.floatToIntBits0 (this.m11) ^ JU.T3.floatToIntBits0 (this.m12) ^ JU.T3.floatToIntBits0 (this.m13) ^ JU.T3.floatToIntBits0 (this.m20) ^ JU.T3.floatToIntBits0 (this.m21) ^ JU.T3.floatToIntBits0 (this.m22) ^ JU.T3.floatToIntBits0 (this.m23) ^ JU.T3.floatToIntBits0 (this.m30) ^ JU.T3.floatToIntBits0 (this.m31) ^ JU.T3.floatToIntBits0 (this.m32) ^ JU.T3.floatToIntBits0 (this.m33);
31239 });
31240 Clazz_overrideMethod (c$, "toString", 
31241 function () {
31242 return "[\n  [" + this.m00 + "\t" + this.m01 + "\t" + this.m02 + "\t" + this.m03 + "]" + "\n  [" + this.m10 + "\t" + this.m11 + "\t" + this.m12 + "\t" + this.m13 + "]" + "\n  [" + this.m20 + "\t" + this.m21 + "\t" + this.m22 + "\t" + this.m23 + "]" + "\n  [" + this.m30 + "\t" + this.m31 + "\t" + this.m32 + "\t" + this.m33 + "] ]";
31243 });
31244 });
31245 Clazz_declarePackage ("JU");
31246 Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () {
31247 c$ = Clazz_decorateAsClass (function () {
31248 this.x = 0;
31249 this.y = 0;
31250 this.z = 0;
31251 Clazz_instantialize (this, arguments);
31252 }, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]);
31253 Clazz_defineMethod (c$, "set", 
31254 function (x, y, z) {
31255 this.x = x;
31256 this.y = y;
31257 this.z = z;
31258 }, "~N,~N,~N");
31259 Clazz_defineMethod (c$, "setA", 
31260 function (t) {
31261 this.x = t[0];
31262 this.y = t[1];
31263 this.z = t[2];
31264 }, "~A");
31265 Clazz_defineMethod (c$, "setT", 
31266 function (t1) {
31267 this.x = t1.x;
31268 this.y = t1.y;
31269 this.z = t1.z;
31270 }, "JU.T3");
31271 Clazz_defineMethod (c$, "add2", 
31272 function (t1, t2) {
31273 this.x = t1.x + t2.x;
31274 this.y = t1.y + t2.y;
31275 this.z = t1.z + t2.z;
31276 }, "JU.T3,JU.T3");
31277 Clazz_defineMethod (c$, "add", 
31278 function (t1) {
31279 this.x += t1.x;
31280 this.y += t1.y;
31281 this.z += t1.z;
31282 }, "JU.T3");
31283 Clazz_defineMethod (c$, "distanceSquared", 
31284 function (p1) {
31285 var dx = this.x - p1.x;
31286 var dy = this.y - p1.y;
31287 var dz = this.z - p1.z;
31288 return (dx * dx + dy * dy + dz * dz);
31289 }, "JU.T3");
31290 Clazz_defineMethod (c$, "distance", 
31291 function (p1) {
31292 return Math.sqrt (this.distanceSquared (p1));
31293 }, "JU.T3");
31294 Clazz_defineMethod (c$, "sub2", 
31295 function (t1, t2) {
31296 this.x = t1.x - t2.x;
31297 this.y = t1.y - t2.y;
31298 this.z = t1.z - t2.z;
31299 }, "JU.T3,JU.T3");
31300 Clazz_defineMethod (c$, "sub", 
31301 function (t1) {
31302 this.x -= t1.x;
31303 this.y -= t1.y;
31304 this.z -= t1.z;
31305 }, "JU.T3");
31306 Clazz_defineMethod (c$, "scale", 
31307 function (s) {
31308 this.x *= s;
31309 this.y *= s;
31310 this.z *= s;
31311 }, "~N");
31312 Clazz_defineMethod (c$, "add3", 
31313 function (a, b, c) {
31314 this.x += a;
31315 this.y += b;
31316 this.z += c;
31317 }, "~N,~N,~N");
31318 Clazz_defineMethod (c$, "scaleT", 
31319 function (p) {
31320 this.x *= p.x;
31321 this.y *= p.y;
31322 this.z *= p.z;
31323 }, "JU.T3");
31324 Clazz_defineMethod (c$, "scaleAdd2", 
31325 function (s, t1, t2) {
31326 this.x = s * t1.x + t2.x;
31327 this.y = s * t1.y + t2.y;
31328 this.z = s * t1.z + t2.z;
31329 }, "~N,JU.T3,JU.T3");
31330 Clazz_defineMethod (c$, "ave", 
31331 function (a, b) {
31332 this.x = (a.x + b.x) / 2;
31333 this.y = (a.y + b.y) / 2;
31334 this.z = (a.z + b.z) / 2;
31335 }, "JU.T3,JU.T3");
31336 Clazz_defineMethod (c$, "dot", 
31337 function (v) {
31338 return this.x * v.x + this.y * v.y + this.z * v.z;
31339 }, "JU.T3");
31340 Clazz_defineMethod (c$, "lengthSquared", 
31341 function () {
31342 return this.x * this.x + this.y * this.y + this.z * this.z;
31343 });
31344 Clazz_defineMethod (c$, "length", 
31345 function () {
31346 return Math.sqrt (this.lengthSquared ());
31347 });
31348 Clazz_defineMethod (c$, "normalize", 
31349 function () {
31350 var d = this.length ();
31351 this.x /= d;
31352 this.y /= d;
31353 this.z /= d;
31354 });
31355 Clazz_defineMethod (c$, "cross", 
31356 function (v1, v2) {
31357 this.set (v1.y * v2.z - v1.z * v2.y, v1.z * v2.x - v1.x * v2.z, v1.x * v2.y - v1.y * v2.x);
31358 }, "JU.T3,JU.T3");
31359 Clazz_overrideMethod (c$, "hashCode", 
31360 function () {
31361 var bits = 1;
31362 bits = 31 * bits + JU.T3.floatToIntBits0 (this.x);
31363 bits = 31 * bits + JU.T3.floatToIntBits0 (this.y);
31364 bits = 31 * bits + JU.T3.floatToIntBits0 (this.z);
31365 return (bits ^ (bits >> 32));
31366 });
31367 c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", 
31368 function (f) {
31369 return (f == 0 ? 0 : Float.floatToIntBits (f));
31370 }, "~N");
31371 Clazz_overrideMethod (c$, "equals", 
31372 function (t1) {
31373 if (!(Clazz_instanceOf (t1, JU.T3))) return false;
31374 var t2 = t1;
31375 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
31376 }, "~O");
31377 Clazz_overrideMethod (c$, "toString", 
31378 function () {
31379 return "{" + this.x + ", " + this.y + ", " + this.z + "}";
31380 });
31381 Clazz_overrideMethod (c$, "toJSON", 
31382 function () {
31383 return "[" + this.x + "," + this.y + "," + this.z + "]";
31384 });
31385 });
31386 Clazz_declarePackage ("javax.swing");
31387 Clazz_load (["java.awt.LayoutManager2", "javax.swing.AbstractAction", "$.JComponent"], "javax.swing.JRootPane", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.BorderLayout", "$.Dimension", "$.IllegalComponentStateException", "javax.swing.JLayeredPane", "$.JPanel", "$.SwingUtilities", "$.UIManager", "jssun.awt.AppContext"], function () {
31388 c$ = Clazz_decorateAsClass (function () {
31389 this.windowDecorationStyle = 0;
31390 this.menuBar = null;
31391 this.contentPane = null;
31392 this.layeredPane = null;
31393 this.glassPane = null;
31394 this.defaultButton = null;
31395 this.defaultPressAction = null;
31396 this.defaultReleaseAction = null;
31397 this.useTrueDoubleBuffering = true;
31398 if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) {
31399 javax.swing.JRootPane.$JRootPane$RootLayout$ ();
31400 }
31401 Clazz_instantialize (this, arguments);
31402 }, javax.swing, "JRootPane", javax.swing.JComponent);
31403 Clazz_makeConstructor (c$, 
31404 function () {
31405 Clazz_superConstructor (this, javax.swing.JRootPane, []);
31406 var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName ();
31407 this.setName (appletName + ".JRootPane");
31408 this.setGlassPane (this.createGlassPane ());
31409 this.setLayeredPane (this.createLayeredPane ());
31410 this.setContentPane (this.createContentPane ());
31411 this.setLayout (this.createRootLayout ());
31412 this.updateUI ();
31413 });
31414 Clazz_overrideMethod (c$, "setDoubleBuffered", 
31415 function (aFlag) {
31416 }, "~B");
31417 Clazz_defineMethod (c$, "getWindowDecorationStyle", 
31418 function () {
31419 return this.windowDecorationStyle;
31420 });
31421 Clazz_defineMethod (c$, "setWindowDecorationStyle", 
31422 function (windowDecorationStyle) {
31423 if (windowDecorationStyle < 0 || windowDecorationStyle > 8) {
31424 throw  new IllegalArgumentException ("Invalid decoration style");
31425 }var oldWindowDecorationStyle = this.getWindowDecorationStyle ();
31426 this.windowDecorationStyle = windowDecorationStyle;
31427 this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle);
31428 }, "~N");
31429 Clazz_overrideMethod (c$, "getUI", 
31430 function () {
31431 return this.ui;
31432 });
31433 Clazz_overrideMethod (c$, "updateUI", 
31434 function () {
31435 this.setUI (javax.swing.UIManager.getUI (this));
31436 });
31437 Clazz_overrideMethod (c$, "getUIClassID", 
31438 function () {
31439 return "RootPaneUI";
31440 });
31441 Clazz_defineMethod (c$, "createLayeredPane", 
31442 function () {
31443 var p =  new javax.swing.JLayeredPane ();
31444 p.setName (this.getName () + ".layeredPane");
31445 return p;
31446 });
31447 Clazz_defineMethod (c$, "createContentPane", 
31448 function () {
31449 var c =  new javax.swing.JPanel ();
31450 c.setName (this.getName () + ".contentPane");
31451 c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null)));
31452 return c;
31453 });
31454 Clazz_defineMethod (c$, "createGlassPane", 
31455 function () {
31456 var c =  new javax.swing.JPanel ();
31457 c.setName (this.getName () + ".glassPane");
31458 c.setVisible (false);
31459 (c).setOpaque (false);
31460 return c;
31461 });
31462 Clazz_defineMethod (c$, "createRootLayout", 
31463 function () {
31464 return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null);
31465 });
31466 Clazz_defineMethod (c$, "setJMenuBar", 
31467 function (menu) {
31468 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31469 this.menuBar = menu;
31470 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31471 }, "javax.swing.JMenuBar");
31472 Clazz_defineMethod (c$, "setMenuBar", 
31473 function (menu) {
31474 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31475 this.menuBar = menu;
31476 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31477 }, "javax.swing.JMenuBar");
31478 Clazz_defineMethod (c$, "getJMenuBar", 
31479 function () {
31480 return this.menuBar;
31481 });
31482 Clazz_defineMethod (c$, "getMenuBar", 
31483 function () {
31484 return this.menuBar;
31485 });
31486 Clazz_defineMethod (c$, "setContentPane", 
31487 function (content) {
31488 if (content == null) throw  new java.awt.IllegalComponentStateException ("contentPane cannot be set to null.");
31489 if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane);
31490 this.contentPane = content;
31491 this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31492 }, "java.awt.Container");
31493 Clazz_defineMethod (c$, "getContentPane", 
31494 function () {
31495 return this.contentPane;
31496 });
31497 Clazz_defineMethod (c$, "setLayeredPane", 
31498 function (layered) {
31499 if (layered == null) throw  new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null.");
31500 if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane);
31501 this.layeredPane = layered;
31502 this.add (this.layeredPane, -1);
31503 }, "javax.swing.JLayeredPane");
31504 Clazz_defineMethod (c$, "getLayeredPane", 
31505 function () {
31506 return this.layeredPane;
31507 });
31508 Clazz_defineMethod (c$, "setGlassPane", 
31509 function (glass) {
31510 if (glass == null) {
31511 throw  new NullPointerException ("glassPane cannot be set to null.");
31512 }var visible = false;
31513 if (this.glassPane != null && this.glassPane.getParent () === this) {
31514 this.remove (this.glassPane);
31515 visible = this.glassPane.isVisible ();
31516 }glass.setVisible (visible);
31517 this.glassPane = glass;
31518 this.add (this.glassPane, 0);
31519 if (visible) {
31520 this.repaint ();
31521 }}, "java.awt.Component");
31522 Clazz_defineMethod (c$, "getGlassPane", 
31523 function () {
31524 return this.glassPane;
31525 });
31526 Clazz_overrideMethod (c$, "isValidateRoot", 
31527 function () {
31528 return true;
31529 });
31530 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
31531 function () {
31532 return !this.glassPane.isVisible ();
31533 });
31534 Clazz_defineMethod (c$, "addNotify", 
31535 function () {
31536 Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []);
31537 this.enableEvents (8);
31538 });
31539 Clazz_defineMethod (c$, "setDefaultButton", 
31540 function (defaultButton) {
31541 var oldDefault = this.defaultButton;
31542 if (oldDefault !== defaultButton) {
31543 this.defaultButton = defaultButton;
31544 if (oldDefault != null) {
31545 oldDefault.repaint ();
31546 }if (defaultButton != null) {
31547 defaultButton.repaint ();
31548 }}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton);
31549 }, "javax.swing.JButton");
31550 Clazz_defineMethod (c$, "getDefaultButton", 
31551 function () {
31552 return this.defaultButton;
31553 });
31554 Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", 
31555 function (useTrueDoubleBuffering) {
31556 this.useTrueDoubleBuffering = useTrueDoubleBuffering;
31557 }, "~B");
31558 Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", 
31559 function () {
31560 return this.useTrueDoubleBuffering;
31561 });
31562 Clazz_defineMethod (c$, "disableTrueDoubleBuffering", 
31563 function () {
31564 });
31565 Clazz_overrideMethod (c$, "addImpl", 
31566 function (comp, constraints, index) {
31567 this.addImplSAEM (comp, constraints, index);
31568 if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) {
31569 this.add (this.glassPane, 0);
31570 }return comp;
31571 }, "java.awt.Component,~O,~N");
31572 c$.$JRootPane$RootLayout$ = function () {
31573 Clazz_pu$h(self.c$);
31574 c$ = Clazz_decorateAsClass (function () {
31575 Clazz_prepareCallback (this, arguments);
31576 Clazz_instantialize (this, arguments);
31577 }, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2);
31578 Clazz_overrideMethod (c$, "preferredLayoutSize", 
31579 function (a) {
31580 var b;
31581 var c;
31582 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31583 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31584 b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize ();
31585 } else {
31586 b = a.getSize ();
31587 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31588 c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31589 } else {
31590 c =  new java.awt.Dimension (0, 0);
31591 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31592 }, "java.awt.Container");
31593 Clazz_overrideMethod (c$, "minimumLayoutSize", 
31594 function (a) {
31595 var b;
31596 var c;
31597 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31598 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31599 b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize ();
31600 } else {
31601 b = a.getSize ();
31602 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31603 c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize ();
31604 } else {
31605 c =  new java.awt.Dimension (0, 0);
31606 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31607 }, "java.awt.Container");
31608 Clazz_overrideMethod (c$, "maximumLayoutSize", 
31609 function (a) {
31610 var b;
31611 var c;
31612 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31613 if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31614 c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize ();
31615 } else {
31616 c =  new java.awt.Dimension (0, 0);
31617 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31618 b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize ();
31619 } else {
31620 b =  new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1);
31621 }return  new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31622 }, "java.awt.Container");
31623 Clazz_overrideMethod (c$, "layoutContainer", 
31624 function (a) {
31625 var b = a.getBounds ();
31626 var c = this.b$["javax.swing.JRootPane"].getInsets ();
31627 var d = 0;
31628 var e = b.width - c.right - c.left;
31629 var f = b.height - c.top - c.bottom;
31630 if (this.b$["javax.swing.JRootPane"].layeredPane != null) {
31631 this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f);
31632 }if (this.b$["javax.swing.JRootPane"].glassPane != null) {
31633 this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f);
31634 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31635 var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31636 this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height);
31637 d += g.height;
31638 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31639 this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d);
31640 }}, "java.awt.Container");
31641 Clazz_defineMethod (c$, "addLayoutComponent", 
31642 function (a, b) {
31643 }, "~S,java.awt.Component");
31644 Clazz_overrideMethod (c$, "removeLayoutComponent", 
31645 function (a) {
31646 }, "java.awt.Component");
31647 Clazz_defineMethod (c$, "addLayoutComponent", 
31648 function (a, b) {
31649 }, "java.awt.Component,~O");
31650 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
31651 function (a) {
31652 return 0.0;
31653 }, "java.awt.Container");
31654 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
31655 function (a) {
31656 return 0.0;
31657 }, "java.awt.Container");
31658 Clazz_overrideMethod (c$, "invalidateLayout", 
31659 function (a) {
31660 }, "java.awt.Container");
31661 c$ = Clazz_p0p ();
31662 };
31663 c$.$JRootPane$1$ = function () {
31664 Clazz_pu$h(self.c$);
31665 c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout);
31666 Clazz_defineMethod (c$, "addLayoutComponent", 
31667 function (comp, constraints) {
31668 if (constraints == null) {
31669 constraints = "Center";
31670 }Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]);
31671 }, "java.awt.Component,~O");
31672 c$ = Clazz_p0p ();
31673 };
31674 Clazz_pu$h(self.c$);
31675 c$ = Clazz_decorateAsClass (function () {
31676 this.owner = null;
31677 this.root = null;
31678 this.press = false;
31679 Clazz_instantialize (this, arguments);
31680 }, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction);
31681 Clazz_makeConstructor (c$, 
31682 function (a, b) {
31683 Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []);
31684 this.root = a;
31685 this.press = b;
31686 }, "javax.swing.JRootPane,~B");
31687 Clazz_defineMethod (c$, "setOwner", 
31688 function (a) {
31689 this.owner = a;
31690 }, "javax.swing.JButton");
31691 Clazz_overrideMethod (c$, "actionPerformed", 
31692 function (a) {
31693 if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) {
31694 var b = this.owner.getModel ();
31695 if (this.press) {
31696 b.setArmed (true);
31697 b.setPressed (true);
31698 } else {
31699 b.setPressed (false);
31700 }}}, "java.awt.event.ActionEvent");
31701 Clazz_overrideMethod (c$, "isEnabled", 
31702 function () {
31703 return this.owner.getModel ().isEnabled ();
31704 });
31705 c$ = Clazz_p0p ();
31706 Clazz_defineStatics (c$,
31707 "$uiClassID", "RootPaneUI",
31708 "NONE", 0,
31709 "FRAME", 1,
31710 "PLAIN_DIALOG", 2,
31711 "INFORMATION_DIALOG", 3,
31712 "ERROR_DIALOG", 4,
31713 "COLOR_CHOOSER_DIALOG", 5,
31714 "FILE_CHOOSER_DIALOG", 6,
31715 "QUESTION_DIALOG", 7,
31716 "WARNING_DIALOG", 8);
31717 });
31718 Clazz_declarePackage ("javax.swing");
31719 Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () {
31720 c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton);
31721 Clazz_makeConstructor (c$, 
31722 function () {
31723 this.construct (null, null, false);
31724 });
31725 Clazz_makeConstructor (c$, 
31726 function (icon) {
31727 this.construct (null, icon, false);
31728 }, "javax.swing.Icon");
31729 Clazz_makeConstructor (c$, 
31730 function (icon, selected) {
31731 this.construct (null, icon, selected);
31732 }, "javax.swing.Icon,~B");
31733 Clazz_makeConstructor (c$, 
31734 function (text) {
31735 this.construct (text, null, false);
31736 }, "~S");
31737 Clazz_makeConstructor (c$, 
31738 function (text, selected) {
31739 this.construct (text, null, selected);
31740 }, "~S,~B");
31741 Clazz_makeConstructor (c$, 
31742 function (a) {
31743 this.construct ();
31744 this.setAction (a);
31745 }, "javax.swing.Action");
31746 Clazz_makeConstructor (c$, 
31747 function (text, icon) {
31748 this.construct (text, icon, false);
31749 }, "~S,javax.swing.Icon");
31750 Clazz_makeConstructor (c$, 
31751 function (text, icon, selected) {
31752 Clazz_superConstructor (this, javax.swing.JToggleButton, []);
31753 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
31754 this.model.setSelected (selected);
31755 this.init (text, icon);
31756 }, "~S,javax.swing.Icon,~B");
31757 Clazz_overrideMethod (c$, "updateUI", 
31758 function () {
31759 this.setUI (javax.swing.UIManager.getUI (this));
31760 });
31761 Clazz_overrideMethod (c$, "getUIClassID", 
31762 function () {
31763 return "ToggleButtonUI";
31764 });
31765 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
31766 function () {
31767 return true;
31768 });
31769 Clazz_pu$h(self.c$);
31770 c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel);
31771 Clazz_makeConstructor (c$, 
31772 function () {
31773 Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []);
31774 });
31775 Clazz_overrideMethod (c$, "isSelected", 
31776 function () {
31777 return (this.stateMask & 2) != 0;
31778 });
31779 Clazz_overrideMethod (c$, "setSelected", 
31780 function (a) {
31781 var b = this.getGroup ();
31782 if (b != null) {
31783 b.setSelected (this, a);
31784 a = b.isSelected (this);
31785 }if (this.isSelected () == a) {
31786 return;
31787 }if (a) {
31788 this.stateMask |= 2;
31789 } else {
31790 this.stateMask &= -3;
31791 }this.fireStateChanged ();
31792 this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2));
31793 }, "~B");
31794 Clazz_overrideMethod (c$, "setPressed", 
31795 function (a) {
31796 if ((this.isPressed () == a) || !this.isEnabled ()) {
31797 return;
31798 }if (a == false && this.isArmed ()) {
31799 this.setSelected (!this.isSelected ());
31800 }if (a) {
31801 this.stateMask |= 4;
31802 } else {
31803 this.stateMask &= -5;
31804 }this.fireStateChanged ();
31805 if (!this.isPressed () && this.isArmed ()) {
31806 var b = 0;
31807 var c = java.awt.EventQueue.getCurrentEvent ();
31808 if (Clazz_instanceOf (c, java.awt.event.InputEvent)) {
31809 b = (c).getModifiers ();
31810 } else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) {
31811 b = (c).getModifiers ();
31812 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b));
31813 }}, "~B");
31814 c$ = Clazz_p0p ();
31815 Clazz_defineStatics (c$,
31816 "$uiClassID", "ToggleButtonUI");
31817 });
31818 Clazz_declarePackage ("javax.swing");
31819 Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () {
31820 Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable);
31821 });
31822 Clazz_declarePackage ("javax.swing");
31823 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () {
31824 c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton);
31825 Clazz_makeConstructor (c$, 
31826 function () {
31827 this.construct (null, null, false);
31828 });
31829 Clazz_makeConstructor (c$, 
31830 function (icon) {
31831 this.construct (null, icon, false);
31832 }, "javax.swing.Icon");
31833 Clazz_makeConstructor (c$, 
31834 function (a) {
31835 this.construct ();
31836 this.setAction (a);
31837 }, "javax.swing.Action");
31838 Clazz_makeConstructor (c$, 
31839 function (icon, selected) {
31840 this.construct (null, icon, selected);
31841 }, "javax.swing.Icon,~B");
31842 Clazz_makeConstructor (c$, 
31843 function (text) {
31844 this.construct (text, null, false);
31845 }, "~S");
31846 Clazz_makeConstructor (c$, 
31847 function (text, selected) {
31848 this.construct (text, null, selected);
31849 }, "~S,~B");
31850 Clazz_makeConstructor (c$, 
31851 function (text, icon) {
31852 this.construct (text, icon, false);
31853 }, "~S,javax.swing.Icon");
31854 Clazz_makeConstructor (c$, 
31855 function (text, icon, selected) {
31856 Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]);
31857 this.setBorderPainted (false);
31858 this.setHorizontalAlignment (10);
31859 }, "~S,javax.swing.Icon,~B");
31860 Clazz_overrideMethod (c$, "updateUI", 
31861 function () {
31862 this.setUI (javax.swing.UIManager.getUI (this));
31863 });
31864 Clazz_overrideMethod (c$, "getUIClassID", 
31865 function () {
31866 return "RadioButtonUI";
31867 });
31868 Clazz_overrideMethod (c$, "setIconFromAction", 
31869 function (a) {
31870 }, "javax.swing.Action");
31871 Clazz_defineStatics (c$,
31872 "$$uiClassID", "RadioButtonUI");
31873 });
31874 Clazz_declarePackage ("javax.swing");
31875 Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
31876 c$ = Clazz_decorateAsClass (function () {
31877 this.rootPane = null;
31878 this.rootPaneCheckingEnabled = false;
31879 this.transferHandler = null;
31880 Clazz_instantialize (this, arguments);
31881 }, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer);
31882 Clazz_makeConstructor (c$, 
31883 function () {
31884 Clazz_superConstructor (this, javax.swing.JApplet, []);
31885 this.setJApplet ();
31886 });
31887 Clazz_defineMethod (c$, "setJApplet", 
31888  function () {
31889 this.setPanel ();
31890 this.setForeground (java.awt.Color.black);
31891 this.setBackground (java.awt.Color.white);
31892 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
31893 this.setLayout ( new java.awt.BorderLayout ());
31894 this.setRootPane (this.createRootPane ());
31895 this.setRootPaneCheckingEnabled (true);
31896 this.setFocusTraversalPolicyProvider (true);
31897 this.enableEvents (8);
31898 });
31899 Clazz_defineMethod (c$, "createRootPane", 
31900 function () {
31901 var rp =  new javax.swing.JRootPane ();
31902 rp.setOpaque (true);
31903 return rp;
31904 });
31905 Clazz_defineMethod (c$, "setTransferHandler", 
31906 function (newHandler) {
31907 var oldHandler = this.transferHandler;
31908 this.transferHandler = newHandler;
31909 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
31910 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
31911 }, "javax.swing.TransferHandler");
31912 Clazz_defineMethod (c$, "getTransferHandler", 
31913 function () {
31914 return this.transferHandler;
31915 });
31916 Clazz_defineMethod (c$, "paint", 
31917 function (g) {
31918 this.getContentPane ().paint (g);
31919 }, "java.awt.Graphics");
31920 Clazz_overrideMethod (c$, "update", 
31921 function (g) {
31922 this.paint (g);
31923 }, "java.awt.Graphics");
31924 Clazz_defineMethod (c$, "setJMenuBar", 
31925 function (menuBar) {
31926 this.getRootPane ().setMenuBar (menuBar);
31927 }, "javax.swing.JMenuBar");
31928 Clazz_defineMethod (c$, "getJMenuBar", 
31929 function () {
31930 return this.getRootPane ().getMenuBar ();
31931 });
31932 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
31933 function () {
31934 return this.rootPaneCheckingEnabled;
31935 });
31936 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
31937 function (enabled) {
31938 this.rootPaneCheckingEnabled = enabled;
31939 }, "~B");
31940 Clazz_overrideMethod (c$, "addImpl", 
31941 function (comp, constraints, index) {
31942 if (this.isRootPaneCheckingEnabled ()) {
31943 return this.getContentPane ().add (comp, constraints, index);
31944 }return this.addImplSAEM (comp, constraints, index);
31945 }, "java.awt.Component,~O,~N");
31946 Clazz_defineMethod (c$, "remove", 
31947 function (comp) {
31948 if (comp === this.rootPane) {
31949 this.removeChild (comp);
31950 } else {
31951 this.getContentPane ().removeChild (comp);
31952 }}, "java.awt.Component");
31953 Clazz_defineMethod (c$, "setLayout", 
31954 function (manager) {
31955 if (this.isRootPaneCheckingEnabled ()) {
31956 this.getContentPane ().setLayout (manager);
31957 } else {
31958 Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]);
31959 }}, "java.awt.LayoutManager");
31960 Clazz_overrideMethod (c$, "getRootPane", 
31961 function () {
31962 return this.rootPane;
31963 });
31964 Clazz_defineMethod (c$, "setRootPane", 
31965 function (root) {
31966 if (this.rootPane != null) {
31967 this.remove (this.rootPane);
31968 }this.rootPane = root;
31969 if (this.rootPane != null) {
31970 var checkingEnabled = this.isRootPaneCheckingEnabled ();
31971 try {
31972 this.setRootPaneCheckingEnabled (false);
31973 this.add (this.rootPane, "Center");
31974 } finally {
31975 this.setRootPaneCheckingEnabled (checkingEnabled);
31976 }
31977 }}, "javax.swing.JRootPane");
31978 Clazz_overrideMethod (c$, "getContentPane", 
31979 function () {
31980 return this.getRootPane ().getContentPane ();
31981 });
31982 Clazz_overrideMethod (c$, "setContentPane", 
31983 function (contentPane) {
31984 this.getRootPane ().setContentPane (contentPane);
31985 }, "java.awt.Container");
31986 Clazz_overrideMethod (c$, "getLayeredPane", 
31987 function () {
31988 return this.getRootPane ().getLayeredPane ();
31989 });
31990 Clazz_overrideMethod (c$, "setLayeredPane", 
31991 function (layeredPane) {
31992 this.getRootPane ().setLayeredPane (layeredPane);
31993 }, "javax.swing.JLayeredPane");
31994 Clazz_overrideMethod (c$, "getGlassPane", 
31995 function () {
31996 return this.getRootPane ().getGlassPane ();
31997 });
31998 Clazz_overrideMethod (c$, "setGlassPane", 
31999 function (glassPane) {
32000 this.getRootPane ().setGlassPane (glassPane);
32001 }, "java.awt.Component");
32002 Clazz_defineMethod (c$, "getGraphics", 
32003 function () {
32004 javax.swing.JComponent.getGraphicsInvoked (this);
32005 return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []);
32006 });
32007 Clazz_defineMethod (c$, "repaint", 
32008 function (time, x, y, width, height) {
32009 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
32010 System.out.println ("repaintNow " + this);
32011 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
32012 } else {
32013 Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]);
32014 }}, "~N,~N,~N,~N,~N");
32015 Clazz_defineMethod (c$, "repaintNow", 
32016 function () {
32017 this.repaint (100, 0, 0, this.getWidth (), this.getHeight ());
32018 });
32019 Clazz_defineMethod (c$, "paramString", 
32020 function () {
32021 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
32022 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
32023 return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
32024 });
32025 });
32026 Clazz_declarePackage ("java.awt");
32027 Clazz_load (["java.lang.Thread"], ["java.awt.EventQueueItem", "$.EventQueue", "$.Queue"], ["java.lang.Error", "java.lang.reflect.InvocationTargetException", "java.util.EmptyStackException", "java.awt.ActiveEvent", "$.Component", "$.EventDispatchThread", "$.SentEvent", "$.SequencedEvent", "$.Toolkit", "java.awt.event.ActionEvent", "$.FocusEvent", "$.InputEvent", "$.InputMethodEvent", "$.InvocationEvent", "$.KeyEvent", "$.MouseEvent", "$.PaintEvent", "$.WindowEvent", "jssun.awt.AWTAutoShutdown", "$.AppContext", "$.PeerEvent", "$.SunToolkit", "swingjs.JSToolkit"], function () {
32028 c$ = Clazz_decorateAsClass (function () {
32029 this.queues = null;
32030 this.nextQueue = null;
32031 this.previousQueue = null;
32032 this.dispatchThread = null;
32033 this.threadGroup = null;
32034 this.mostRecentEventTime = 0;
32035 this.currentEvent = null;
32036 this.waitForID = 0;
32037 this.name = null;
32038 Clazz_instantialize (this, arguments);
32039 }, java.awt, "EventQueue");
32040 Clazz_prepareFields (c$, function () {
32041 this.queues =  new Array (4);
32042 this.threadGroup = Thread.currentThread ().getThreadGroup ();
32043 this.mostRecentEventTime = System.currentTimeMillis ();
32044 this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum ();
32045 });
32046 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
32047  function () {
32048 return java.awt.EventQueue.threadInitNumber++;
32049 });
32050 c$.noEvents = Clazz_defineMethod (c$, "noEvents", 
32051 function (eventQueue) {
32052 return eventQueue.noEvents ();
32053 }, "java.awt.EventQueue");
32054 c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", 
32055 function (eventQueue) {
32056 return eventQueue.nextQueue;
32057 }, "java.awt.EventQueue");
32058 c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", 
32059 function (eventQueue, source, removeAllEvents) {
32060 eventQueue.removeSourceEvents (source, removeAllEvents);
32061 }, "java.awt.EventQueue,~O,~B");
32062 Clazz_makeConstructor (c$, 
32063 function () {
32064 for (var i = 0; i < 4; i++) {
32065 this.queues[i] =  new java.awt.Queue ();
32066 }
32067 });
32068 Clazz_defineMethod (c$, "postEvent", 
32069 function (event) {
32070 jssun.awt.SunToolkit.flushPendingEvents ();
32071 this.postEventPrivate (event);
32072 }, "java.awt.AWTEvent");
32073 Clazz_defineMethod (c$, "postEventPrivate", 
32074 function (theEvent) {
32075 theEvent.isPosted = true;
32076 {
32077 if (this.dispatchThread == null && this.nextQueue == null) {
32078 if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) {
32079 return;
32080 } else {
32081 this.initDispatchThread ();
32082 }}if (this.nextQueue != null) {
32083 this.nextQueue.postEventPrivate (theEvent);
32084 return;
32085 }this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent));
32086 }}, "java.awt.AWTEvent");
32087 c$.getPriority = Clazz_defineMethod (c$, "getPriority", 
32088  function (theEvent) {
32089 if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) {
32090 var flags = (theEvent).getFlags ();
32091 if ((flags & 2) != 0) return 3;
32092 if ((flags & 1) != 0) return 2;
32093 if ((flags & 4) != 0) return 0;
32094 }switch (theEvent.getID ()) {
32095 case 1201:
32096 case 800:
32097 case 801:
32098 return 0;
32099 default:
32100 return 1;
32101 }
32102 }, "java.awt.AWTEvent");
32103 Clazz_defineMethod (c$, "postEventNow", 
32104  function (theEvent, priority) {
32105 if (this.coalesceEvent (theEvent, priority)) {
32106 return;
32107 }var newItem =  new java.awt.EventQueueItem (theEvent);
32108 this.cacheEQItem (newItem);
32109 if (this.queues[priority].head == null) {
32110 var shouldNotify = this.noEvents ();
32111 this.queues[priority].head = this.queues[priority].tail = newItem;
32112 if (shouldNotify) {
32113 if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) {
32114 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread);
32115 }}} else {
32116 this.queues[priority].tail.next = newItem;
32117 this.queues[priority].tail = newItem;
32118 }}, "java.awt.AWTEvent,~N");
32119 Clazz_defineMethod (c$, "coalescePaintEvent", 
32120  function (e) {
32121 var sourcePeer = (e.getSource ()).peer;
32122 if (sourcePeer != null) {
32123 sourcePeer.coalescePaintEvent (e);
32124 }var cache = (e.getSource ()).eventCache;
32125 if (cache == null) {
32126 return false;
32127 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32128 if (index != -1 && cache[index] != null) {
32129 var merged = this.mergePaintEvents (e, cache[index].event);
32130 if (merged != null) {
32131 cache[index].event = merged;
32132 return true;
32133 }}return false;
32134 }, "java.awt.event.PaintEvent");
32135 Clazz_defineMethod (c$, "mergePaintEvents", 
32136  function (a, b) {
32137 var aRect = a.getUpdateRect ();
32138 var bRect = b.getUpdateRect ();
32139 if (bRect.contains (aRect)) {
32140 return b;
32141 }if (aRect.contains (bRect)) {
32142 return a;
32143 }return null;
32144 }, "java.awt.event.PaintEvent,java.awt.event.PaintEvent");
32145 Clazz_defineMethod (c$, "coalesceMouseEvent", 
32146  function (e) {
32147 var cache = (e.getSource ()).eventCache;
32148 if (cache == null) {
32149 return false;
32150 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32151 if (index != -1 && cache[index] != null) {
32152 cache[index].event = e;
32153 return true;
32154 }return false;
32155 }, "java.awt.event.MouseEvent");
32156 Clazz_defineMethod (c$, "coalescePeerEvent", 
32157  function (e) {
32158 var cache = (e.getSource ()).eventCache;
32159 if (cache == null) {
32160 return false;
32161 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32162 if (index != -1 && cache[index] != null) {
32163 e = e.coalesceEvents (cache[index].event);
32164 if (e != null) {
32165 cache[index].event = e;
32166 return true;
32167 } else {
32168 cache[index] = null;
32169 }}return false;
32170 }, "jssun.awt.PeerEvent");
32171 Clazz_defineMethod (c$, "coalesceOtherEvent", 
32172  function (e, priority) {
32173 var id = e.getID ();
32174 var source = e.getSource ();
32175 for (var entry = this.queues[priority].head; entry != null; entry = entry.next) {
32176 if (entry.event.getSource () === source && entry.id == id) {
32177 var coalescedEvent = source.coalesceEvents (entry.event, e);
32178 if (coalescedEvent != null) {
32179 entry.event = coalescedEvent;
32180 return true;
32181 }}}
32182 return false;
32183 }, "java.awt.AWTEvent,~N");
32184 Clazz_defineMethod (c$, "coalesceEvent", 
32185  function (e, priority) {
32186 if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) {
32187 return false;
32188 }if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) {
32189 return this.coalescePeerEvent (e);
32190 }if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) {
32191 return true;
32192 }if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) {
32193 return this.coalescePaintEvent (e);
32194 }if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
32195 return this.coalesceMouseEvent (e);
32196 }return false;
32197 }, "java.awt.AWTEvent,~N");
32198 Clazz_defineMethod (c$, "cacheEQItem", 
32199  function (entry) {
32200 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32201 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32202 var source = entry.event.getSource ();
32203 if (source.eventCache == null) {
32204 source.eventCache =  new Array (5);
32205 }source.eventCache[index] = entry;
32206 }}, "java.awt.EventQueueItem");
32207 Clazz_defineMethod (c$, "uncacheEQItem", 
32208  function (entry) {
32209 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32210 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32211 var source = entry.event.getSource ();
32212 if (source.eventCache == null) {
32213 return;
32214 }source.eventCache[index] = null;
32215 }}, "java.awt.EventQueueItem");
32216 c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", 
32217  function (e) {
32218 switch (e.getID ()) {
32219 case 800:
32220 return 0;
32221 case 801:
32222 return 1;
32223 case 503:
32224 return 2;
32225 case 506:
32226 return 3;
32227 default:
32228 return -1;
32229 }
32230 }, "java.awt.AWTEvent");
32231 Clazz_defineMethod (c$, "noEvents", 
32232  function () {
32233 for (var i = 0; i < 4; i++) {
32234 if (this.queues[i].head != null) {
32235 return false;
32236 }}
32237 return true;
32238 });
32239 Clazz_defineMethod (c$, "getNextEvent", 
32240 function () {
32241 jssun.awt.SunToolkit.flushPendingEvents ();
32242 {
32243 for (var i = 3; i >= 0; i--) {
32244 if (this.queues[i].head != null) {
32245 var entry = this.queues[i].head;
32246 this.queues[i].head = entry.next;
32247 if (entry.next == null) {
32248 this.queues[i].tail = null;
32249 }this.uncacheEQItem (entry);
32250 return entry.event;
32251 }}
32252 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread);
32253 }return null;
32254 });
32255 Clazz_defineMethod (c$, "getNextEventForID", 
32256 function (id) {
32257 jssun.awt.SunToolkit.flushPendingEvents ();
32258 {
32259 for (var i = 0; i < 4; i++) {
32260 for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) {
32261 if (entry.id == id) {
32262 if (prev == null) {
32263 this.queues[i].head = entry.next;
32264 } else {
32265 prev.next = entry.next;
32266 }if (this.queues[i].tail === entry) {
32267 this.queues[i].tail = prev;
32268 }this.uncacheEQItem (entry);
32269 return entry.event;
32270 }}
32271 }
32272 this.waitForID = id;
32273 this.waitForID = 0;
32274 }return null;
32275 }, "~N");
32276 Clazz_defineMethod (c$, "peekEvent", 
32277 function () {
32278 for (var i = 3; i >= 0; i--) {
32279 if (this.queues[i].head != null) {
32280 return this.queues[i].head.event;
32281 }}
32282 return null;
32283 });
32284 Clazz_defineMethod (c$, "peekEvent", 
32285 function (id) {
32286 for (var i = 3; i >= 0; i--) {
32287 var q = this.queues[i].head;
32288 for (; q != null; q = q.next) {
32289 if (q.id == id) {
32290 return q.event;
32291 }}
32292 }
32293 return null;
32294 }, "~N");
32295 Clazz_defineMethod (c$, "dispatchEvent", 
32296 function (event) {
32297 var src = event.getSource ();
32298 this.dispatchEventImpl (event, src, false);
32299 }, "java.awt.AWTEvent");
32300 Clazz_defineMethod (c$, "dispatchEventAndWait", 
32301 function (event, src) {
32302 this.dispatchEventImpl (event, src, true);
32303 }, "java.awt.AWTEvent,~O");
32304 Clazz_defineMethod (c$, "dispatchEventImpl", 
32305  function (event, src, andWait) {
32306 event.isPosted = true;
32307 if (Clazz_instanceOf (event, java.awt.ActiveEvent)) {
32308 this.setCurrentEventAndMostRecentTimeImpl (event);
32309 swingjs.JSToolkit.dispatchEvent (event, null, andWait);
32310 } else if (Clazz_instanceOf (src, java.awt.Component)) {
32311 swingjs.JSToolkit.dispatchEvent (event, src, andWait);
32312 event.dispatched ();
32313 } else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) {
32314 if (this.noEvents ()) {
32315 this.dispatchThread.stopDispatching ();
32316 }} else {
32317 System.err.println ("unable to dispatch event: " + event);
32318 }}, "java.awt.AWTEvent,~O,~B");
32319 c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", 
32320 function () {
32321 return 0;
32322 });
32323 Clazz_defineMethod (c$, "getMostRecentEventTimeEx", 
32324 function () {
32325 return this.mostRecentEventTime;
32326 });
32327 c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", 
32328 function () {
32329 return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl ();
32330 });
32331 Clazz_defineMethod (c$, "getCurrentEventImpl", 
32332  function () {
32333 return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null);
32334 });
32335 Clazz_defineMethod (c$, "push", 
32336 function (newEventQueue) {
32337 if (this.nextQueue != null) {
32338 this.nextQueue.push (newEventQueue);
32339 return;
32340 }{
32341 while (this.peekEvent () != null) {
32342 try {
32343 newEventQueue.postEventPrivate (this.getNextEvent ());
32344 } catch (ie) {
32345 if (Clazz_exceptionOf (ie, InterruptedException)) {
32346 } else {
32347 throw ie;
32348 }
32349 }
32350 }
32351 newEventQueue.previousQueue = this;
32352 }if (this.dispatchThread != null) {
32353 this.dispatchThread.stopDispatchingLater ();
32354 }this.nextQueue = newEventQueue;
32355 var appContext = jssun.awt.AppContext.getAppContext ();
32356 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32357 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue);
32358 }}, "java.awt.EventQueue");
32359 Clazz_defineMethod (c$, "pop", 
32360 function () {
32361 var prev = this.previousQueue;
32362 {
32363 {
32364 if (this.nextQueue != null) {
32365 this.nextQueue.pop ();
32366 return;
32367 }if (this.previousQueue == null) {
32368 throw  new java.util.EmptyStackException ();
32369 }this.previousQueue.nextQueue = null;
32370 while (this.peekEvent () != null) {
32371 try {
32372 this.previousQueue.postEventPrivate (this.getNextEvent ());
32373 } catch (ie) {
32374 if (Clazz_exceptionOf (ie, InterruptedException)) {
32375 } else {
32376 throw ie;
32377 }
32378 }
32379 }
32380 var appContext = jssun.awt.AppContext.getAppContext ();
32381 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32382 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue);
32383 }this.previousQueue = null;
32384 }}var dt = this.dispatchThread;
32385 if (dt != null) {
32386 dt.stopDispatching ();
32387 }});
32388 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
32389 function () {
32390 return swingjs.JSToolkit.isDispatchThread ();
32391 });
32392 Clazz_defineMethod (c$, "initDispatchThread", 
32393 function () {
32394 {
32395 if (this.dispatchThread == null) {
32396 var t =  new java.awt.EventDispatchThread (this.threadGroup, this.name, this);
32397 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t);
32398 this.dispatchThread = t;
32399 this.dispatchThread.start ();
32400 }}});
32401 Clazz_defineMethod (c$, "detachDispatchThread", 
32402 function () {
32403 this.dispatchThread = null;
32404 });
32405 Clazz_defineMethod (c$, "getDispatchThread", 
32406 function () {
32407 return this.dispatchThread;
32408 });
32409 Clazz_defineMethod (c$, "removeSourceEvents", 
32410 function (source, removeAllEvents) {
32411 jssun.awt.SunToolkit.flushPendingEvents ();
32412 {
32413 for (var i = 0; i < 4; i++) {
32414 var entry = this.queues[i].head;
32415 var prev = null;
32416 while (entry != null) {
32417 if ((entry.event.getSource () === source) && (removeAllEvents || !(Clazz_instanceOf (entry.event, java.awt.SequencedEvent) || Clazz_instanceOf (entry.event, java.awt.SentEvent) || Clazz_instanceOf (entry.event, java.awt.event.FocusEvent) || Clazz_instanceOf (entry.event, java.awt.event.WindowEvent) || Clazz_instanceOf (entry.event, java.awt.event.KeyEvent) || Clazz_instanceOf (entry.event, java.awt.event.InputMethodEvent)))) {
32418 if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) {
32419 (entry.event).dispose ();
32420 }if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) {
32421 (entry.event).dispose ();
32422 }if (prev == null) {
32423 this.queues[i].head = entry.next;
32424 } else {
32425 prev.next = entry.next;
32426 }this.uncacheEQItem (entry);
32427 } else {
32428 prev = entry;
32429 }entry = entry.next;
32430 }
32431 this.queues[i].tail = prev;
32432 }
32433 }}, "~O,~B");
32434 c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", 
32435 function (e) {
32436 java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e);
32437 }, "java.awt.AWTEvent");
32438 Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", 
32439  function (e) {
32440 if (swingjs.JSToolkit.isDispatchThread ()) {
32441 return;
32442 }this.currentEvent = e;
32443 var mostRecentEventTime2 = -9223372036854775808;
32444 if (Clazz_instanceOf (e, java.awt.event.InputEvent)) {
32445 var ie = e;
32446 mostRecentEventTime2 = ie.getWhen ();
32447 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
32448 var ime = e;
32449 mostRecentEventTime2 = ime.getWhen ();
32450 } else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) {
32451 var ae = e;
32452 mostRecentEventTime2 = ae.getWhen ();
32453 } else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) {
32454 var ie = e;
32455 mostRecentEventTime2 = ie.getWhen ();
32456 }this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2);
32457 }, "java.awt.AWTEvent");
32458 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
32459 function (runnable) {
32460 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable));
32461 }, "Runnable");
32462 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
32463 function (runnable) {
32464 java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable);
32465 }, "Runnable");
32466 c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", 
32467  function (source, runnable) {
32468 if (java.awt.EventQueue.isDispatchThread ()) {
32469 throw  new Error ("Cannot call invokeAndWait from the event dispatcher thread");
32470 }var event =  new java.awt.event.InvocationEvent (source, runnable, null, true);
32471 swingjs.JSToolkit.dispatchEvent (event, null, true);
32472 var eventThrowable = event.getThrowable ();
32473 if (eventThrowable != null) {
32474 throw  new java.lang.reflect.InvocationTargetException (eventThrowable);
32475 }}, "~O,Runnable");
32476 Clazz_defineMethod (c$, "wakeup", 
32477 function (isShutdown) {
32478 {
32479 if (this.nextQueue != null) {
32480 this.nextQueue.wakeup (isShutdown);
32481 } else if (this.dispatchThread != null) {
32482 try {
32483 this.dispatchThread.start ();
32484 } catch (e) {
32485 if (Clazz_exceptionOf (e, IllegalThreadStateException)) {
32486 this.dispatchThread.run ();
32487 } else {
32488 throw e;
32489 }
32490 }
32491 } else if (!isShutdown) {
32492 this.initDispatchThread ();
32493 }}}, "~B");
32494 Clazz_defineStatics (c$,
32495 "threadInitNumber", 0,
32496 "LOW_PRIORITY", 0,
32497 "NORM_PRIORITY", 1,
32498 "HIGH_PRIORITY", 2,
32499 "ULTIMATE_PRIORITY", 3,
32500 "NUM_PRIORITIES", 4,
32501 "PAINT", 0,
32502 "UPDATE", 1,
32503 "MOVE", 2,
32504 "DRAG", 3,
32505 "PEER", 4,
32506 "CACHE_LENGTH", 5);
32507 c$ = Clazz_decorateAsClass (function () {
32508 this.head = null;
32509 this.tail = null;
32510 Clazz_instantialize (this, arguments);
32511 }, java.awt, "Queue");
32512 c$ = Clazz_decorateAsClass (function () {
32513 this.event = null;
32514 this.id = 0;
32515 this.next = null;
32516 Clazz_instantialize (this, arguments);
32517 }, java.awt, "EventQueueItem");
32518 Clazz_makeConstructor (c$, 
32519 function (evt) {
32520 this.event = evt;
32521 this.id = evt.getID ();
32522 }, "java.awt.AWTEvent");
32523 });
32524 Clazz_declarePackage ("java.awt");
32525 Clazz_load (["java.awt.event.ActionListener", "$.AdjustmentListener", "$.ComponentListener", "$.ContainerListener", "$.FocusListener", "$.HierarchyBoundsListener", "$.HierarchyListener", "$.InputMethodListener", "$.ItemListener", "$.KeyListener", "$.MouseListener", "$.MouseMotionListener", "$.MouseWheelListener", "$.TextListener", "$.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.AWTEventMulticaster", ["java.lang.NullPointerException", "java.lang.reflect.Array"], function () {
32526 c$ = Clazz_decorateAsClass (function () {
32527 this.a = null;
32528 this.b = null;
32529 Clazz_instantialize (this, arguments);
32530 }, java.awt, "AWTEventMulticaster", null, [java.awt.event.ComponentListener, java.awt.event.ContainerListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.WindowListener, java.awt.event.WindowFocusListener, java.awt.event.WindowStateListener, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.event.AdjustmentListener, java.awt.event.TextListener, java.awt.event.InputMethodListener, java.awt.event.HierarchyListener, java.awt.event.HierarchyBoundsListener, java.awt.event.MouseWheelListener]);
32531 Clazz_makeConstructor (c$, 
32532 function (a, b) {
32533 this.a = a;
32534 this.b = b;
32535 }, "java.util.EventListener,java.util.EventListener");
32536 Clazz_defineMethod (c$, "remove", 
32537 function (oldl) {
32538 if (oldl === this.a) return this.b;
32539 if (oldl === this.b) return this.a;
32540 var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl);
32541 var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl);
32542 if (a2 === this.a && b2 === this.b) {
32543 return this;
32544 }return java.awt.AWTEventMulticaster.addInternal (a2, b2);
32545 }, "java.util.EventListener");
32546 Clazz_defineMethod (c$, "componentResized", 
32547 function (e) {
32548 (this.a).componentResized (e);
32549 (this.b).componentResized (e);
32550 }, "java.awt.event.ComponentEvent");
32551 Clazz_defineMethod (c$, "componentMoved", 
32552 function (e) {
32553 (this.a).componentMoved (e);
32554 (this.b).componentMoved (e);
32555 }, "java.awt.event.ComponentEvent");
32556 Clazz_defineMethod (c$, "componentShown", 
32557 function (e) {
32558 (this.a).componentShown (e);
32559 (this.b).componentShown (e);
32560 }, "java.awt.event.ComponentEvent");
32561 Clazz_defineMethod (c$, "componentHidden", 
32562 function (e) {
32563 (this.a).componentHidden (e);
32564 (this.b).componentHidden (e);
32565 }, "java.awt.event.ComponentEvent");
32566 Clazz_defineMethod (c$, "componentAdded", 
32567 function (e) {
32568 (this.a).componentAdded (e);
32569 (this.b).componentAdded (e);
32570 }, "java.awt.event.ContainerEvent");
32571 Clazz_defineMethod (c$, "componentRemoved", 
32572 function (e) {
32573 (this.a).componentRemoved (e);
32574 (this.b).componentRemoved (e);
32575 }, "java.awt.event.ContainerEvent");
32576 Clazz_defineMethod (c$, "focusGained", 
32577 function (e) {
32578 (this.a).focusGained (e);
32579 (this.b).focusGained (e);
32580 }, "java.awt.event.FocusEvent");
32581 Clazz_defineMethod (c$, "focusLost", 
32582 function (e) {
32583 (this.a).focusLost (e);
32584 (this.b).focusLost (e);
32585 }, "java.awt.event.FocusEvent");
32586 Clazz_defineMethod (c$, "keyTyped", 
32587 function (e) {
32588 (this.a).keyTyped (e);
32589 (this.b).keyTyped (e);
32590 }, "java.awt.event.KeyEvent");
32591 Clazz_defineMethod (c$, "keyPressed", 
32592 function (e) {
32593 (this.a).keyPressed (e);
32594 (this.b).keyPressed (e);
32595 }, "java.awt.event.KeyEvent");
32596 Clazz_defineMethod (c$, "keyReleased", 
32597 function (e) {
32598 (this.a).keyReleased (e);
32599 (this.b).keyReleased (e);
32600 }, "java.awt.event.KeyEvent");
32601 Clazz_defineMethod (c$, "mouseClicked", 
32602 function (e) {
32603 (this.a).mouseClicked (e);
32604 (this.b).mouseClicked (e);
32605 }, "java.awt.event.MouseEvent");
32606 Clazz_defineMethod (c$, "mousePressed", 
32607 function (e) {
32608 (this.a).mousePressed (e);
32609 (this.b).mousePressed (e);
32610 }, "java.awt.event.MouseEvent");
32611 Clazz_defineMethod (c$, "mouseReleased", 
32612 function (e) {
32613 (this.a).mouseReleased (e);
32614 (this.b).mouseReleased (e);
32615 }, "java.awt.event.MouseEvent");
32616 Clazz_defineMethod (c$, "mouseEntered", 
32617 function (e) {
32618 (this.a).mouseEntered (e);
32619 (this.b).mouseEntered (e);
32620 }, "java.awt.event.MouseEvent");
32621 Clazz_defineMethod (c$, "mouseExited", 
32622 function (e) {
32623 (this.a).mouseExited (e);
32624 (this.b).mouseExited (e);
32625 }, "java.awt.event.MouseEvent");
32626 Clazz_defineMethod (c$, "mouseDragged", 
32627 function (e) {
32628 (this.a).mouseDragged (e);
32629 (this.b).mouseDragged (e);
32630 }, "java.awt.event.MouseEvent");
32631 Clazz_defineMethod (c$, "mouseMoved", 
32632 function (e) {
32633 (this.a).mouseMoved (e);
32634 (this.b).mouseMoved (e);
32635 }, "java.awt.event.MouseEvent");
32636 Clazz_defineMethod (c$, "windowOpened", 
32637 function (e) {
32638 (this.a).windowOpened (e);
32639 (this.b).windowOpened (e);
32640 }, "java.awt.event.WindowEvent");
32641 Clazz_defineMethod (c$, "windowClosing", 
32642 function (e) {
32643 (this.a).windowClosing (e);
32644 (this.b).windowClosing (e);
32645 }, "java.awt.event.WindowEvent");
32646 Clazz_defineMethod (c$, "windowClosed", 
32647 function (e) {
32648 (this.a).windowClosed (e);
32649 (this.b).windowClosed (e);
32650 }, "java.awt.event.WindowEvent");
32651 Clazz_defineMethod (c$, "windowIconified", 
32652 function (e) {
32653 (this.a).windowIconified (e);
32654 (this.b).windowIconified (e);
32655 }, "java.awt.event.WindowEvent");
32656 Clazz_defineMethod (c$, "windowDeiconified", 
32657 function (e) {
32658 (this.a).windowDeiconified (e);
32659 (this.b).windowDeiconified (e);
32660 }, "java.awt.event.WindowEvent");
32661 Clazz_defineMethod (c$, "windowActivated", 
32662 function (e) {
32663 (this.a).windowActivated (e);
32664 (this.b).windowActivated (e);
32665 }, "java.awt.event.WindowEvent");
32666 Clazz_defineMethod (c$, "windowDeactivated", 
32667 function (e) {
32668 (this.a).windowDeactivated (e);
32669 (this.b).windowDeactivated (e);
32670 }, "java.awt.event.WindowEvent");
32671 Clazz_defineMethod (c$, "windowStateChanged", 
32672 function (e) {
32673 (this.a).windowStateChanged (e);
32674 (this.b).windowStateChanged (e);
32675 }, "java.awt.event.WindowEvent");
32676 Clazz_defineMethod (c$, "windowGainedFocus", 
32677 function (e) {
32678 (this.a).windowGainedFocus (e);
32679 (this.b).windowGainedFocus (e);
32680 }, "java.awt.event.WindowEvent");
32681 Clazz_defineMethod (c$, "windowLostFocus", 
32682 function (e) {
32683 (this.a).windowLostFocus (e);
32684 (this.b).windowLostFocus (e);
32685 }, "java.awt.event.WindowEvent");
32686 Clazz_defineMethod (c$, "actionPerformed", 
32687 function (e) {
32688 (this.a).actionPerformed (e);
32689 (this.b).actionPerformed (e);
32690 }, "java.awt.event.ActionEvent");
32691 Clazz_defineMethod (c$, "itemStateChanged", 
32692 function (e) {
32693 (this.a).itemStateChanged (e);
32694 (this.b).itemStateChanged (e);
32695 }, "java.awt.event.ItemEvent");
32696 Clazz_defineMethod (c$, "adjustmentValueChanged", 
32697 function (e) {
32698 (this.a).adjustmentValueChanged (e);
32699 (this.b).adjustmentValueChanged (e);
32700 }, "java.awt.event.AdjustmentEvent");
32701 Clazz_defineMethod (c$, "textValueChanged", 
32702 function (e) {
32703 (this.a).textValueChanged (e);
32704 (this.b).textValueChanged (e);
32705 }, "java.awt.event.TextEvent");
32706 Clazz_defineMethod (c$, "inputMethodTextChanged", 
32707 function (e) {
32708 (this.a).inputMethodTextChanged (e);
32709 (this.b).inputMethodTextChanged (e);
32710 }, "java.awt.event.InputMethodEvent");
32711 Clazz_defineMethod (c$, "caretPositionChanged", 
32712 function (e) {
32713 (this.a).caretPositionChanged (e);
32714 (this.b).caretPositionChanged (e);
32715 }, "java.awt.event.InputMethodEvent");
32716 Clazz_defineMethod (c$, "hierarchyChanged", 
32717 function (e) {
32718 (this.a).hierarchyChanged (e);
32719 (this.b).hierarchyChanged (e);
32720 }, "java.awt.event.HierarchyEvent");
32721 Clazz_defineMethod (c$, "ancestorMoved", 
32722 function (e) {
32723 (this.a).ancestorMoved (e);
32724 (this.b).ancestorMoved (e);
32725 }, "java.awt.event.HierarchyEvent");
32726 Clazz_defineMethod (c$, "ancestorResized", 
32727 function (e) {
32728 (this.a).ancestorResized (e);
32729 (this.b).ancestorResized (e);
32730 }, "java.awt.event.HierarchyEvent");
32731 Clazz_defineMethod (c$, "mouseWheelMoved", 
32732 function (e) {
32733 (this.a).mouseWheelMoved (e);
32734 (this.b).mouseWheelMoved (e);
32735 }, "java.awt.event.MouseWheelEvent");
32736 c$.add = Clazz_defineMethod (c$, "add", 
32737 function (a, b) {
32738 return java.awt.AWTEventMulticaster.addInternal (a, b);
32739 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32740 c$.add = Clazz_defineMethod (c$, "add", 
32741 function (a, b) {
32742 return java.awt.AWTEventMulticaster.addInternal (a, b);
32743 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32744 c$.add = Clazz_defineMethod (c$, "add", 
32745 function (a, b) {
32746 return java.awt.AWTEventMulticaster.addInternal (a, b);
32747 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32748 c$.add = Clazz_defineMethod (c$, "add", 
32749 function (a, b) {
32750 return java.awt.AWTEventMulticaster.addInternal (a, b);
32751 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32752 c$.add = Clazz_defineMethod (c$, "add", 
32753 function (a, b) {
32754 return java.awt.AWTEventMulticaster.addInternal (a, b);
32755 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32756 c$.add = Clazz_defineMethod (c$, "add", 
32757 function (a, b) {
32758 return java.awt.AWTEventMulticaster.addInternal (a, b);
32759 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32760 c$.add = Clazz_defineMethod (c$, "add", 
32761 function (a, b) {
32762 return java.awt.AWTEventMulticaster.addInternal (a, b);
32763 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32764 c$.add = Clazz_defineMethod (c$, "add", 
32765 function (a, b) {
32766 return java.awt.AWTEventMulticaster.addInternal (a, b);
32767 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32768 c$.add = Clazz_defineMethod (c$, "add", 
32769 function (a, b) {
32770 return java.awt.AWTEventMulticaster.addInternal (a, b);
32771 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32772 c$.add = Clazz_defineMethod (c$, "add", 
32773 function (a, b) {
32774 return java.awt.AWTEventMulticaster.addInternal (a, b);
32775 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32776 c$.add = Clazz_defineMethod (c$, "add", 
32777 function (a, b) {
32778 return java.awt.AWTEventMulticaster.addInternal (a, b);
32779 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32780 c$.add = Clazz_defineMethod (c$, "add", 
32781 function (a, b) {
32782 return java.awt.AWTEventMulticaster.addInternal (a, b);
32783 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32784 c$.add = Clazz_defineMethod (c$, "add", 
32785 function (a, b) {
32786 return java.awt.AWTEventMulticaster.addInternal (a, b);
32787 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32788 c$.add = Clazz_defineMethod (c$, "add", 
32789 function (a, b) {
32790 return java.awt.AWTEventMulticaster.addInternal (a, b);
32791 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32792 c$.add = Clazz_defineMethod (c$, "add", 
32793 function (a, b) {
32794 return java.awt.AWTEventMulticaster.addInternal (a, b);
32795 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32796 c$.add = Clazz_defineMethod (c$, "add", 
32797 function (a, b) {
32798 return java.awt.AWTEventMulticaster.addInternal (a, b);
32799 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32800 c$.add = Clazz_defineMethod (c$, "add", 
32801 function (a, b) {
32802 return java.awt.AWTEventMulticaster.addInternal (a, b);
32803 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32804 c$.remove = Clazz_defineMethod (c$, "remove", 
32805 function (l, oldl) {
32806 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32807 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32808 c$.remove = Clazz_defineMethod (c$, "remove", 
32809 function (l, oldl) {
32810 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32811 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32812 c$.remove = Clazz_defineMethod (c$, "remove", 
32813 function (l, oldl) {
32814 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32815 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32816 c$.remove = Clazz_defineMethod (c$, "remove", 
32817 function (l, oldl) {
32818 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32819 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32820 c$.remove = Clazz_defineMethod (c$, "remove", 
32821 function (l, oldl) {
32822 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32823 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32824 c$.remove = Clazz_defineMethod (c$, "remove", 
32825 function (l, oldl) {
32826 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32827 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32828 c$.remove = Clazz_defineMethod (c$, "remove", 
32829 function (l, oldl) {
32830 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32831 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32832 c$.remove = Clazz_defineMethod (c$, "remove", 
32833 function (l, oldl) {
32834 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32835 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32836 c$.remove = Clazz_defineMethod (c$, "remove", 
32837 function (l, oldl) {
32838 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32839 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32840 c$.remove = Clazz_defineMethod (c$, "remove", 
32841 function (l, oldl) {
32842 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32843 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32844 c$.remove = Clazz_defineMethod (c$, "remove", 
32845 function (l, oldl) {
32846 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32847 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32848 c$.remove = Clazz_defineMethod (c$, "remove", 
32849 function (l, oldl) {
32850 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32851 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32852 c$.remove = Clazz_defineMethod (c$, "remove", 
32853 function (l, oldl) {
32854 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32855 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32856 c$.remove = Clazz_defineMethod (c$, "remove", 
32857 function (l, oldl) {
32858 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32859 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32860 c$.remove = Clazz_defineMethod (c$, "remove", 
32861 function (l, oldl) {
32862 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32863 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32864 c$.remove = Clazz_defineMethod (c$, "remove", 
32865 function (l, oldl) {
32866 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32867 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32868 c$.remove = Clazz_defineMethod (c$, "remove", 
32869 function (l, oldl) {
32870 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32871 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32872 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
32873 function (a, b) {
32874 if (a == null) return b;
32875 if (b == null) return a;
32876 return  new java.awt.AWTEventMulticaster (a, b);
32877 }, "java.util.EventListener,java.util.EventListener");
32878 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
32879 function (l, oldl) {
32880 if (l === oldl || l == null) {
32881 return null;
32882 } else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32883 return (l).remove (oldl);
32884 } else {
32885 return l;
32886 }}, "java.util.EventListener,java.util.EventListener");
32887 c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", 
32888  function (l, listenerType) {
32889 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32890 var mc = l;
32891 return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType);
32892 } else {
32893 return listenerType.isInstance (l) ? 1 : 0;
32894 }}, "java.util.EventListener,Class");
32895 c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", 
32896  function (a, l, index) {
32897 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32898 var mc = l;
32899 var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index);
32900 return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs);
32901 } else if (a.getClass ().getComponentType ().isInstance (l)) {
32902 a[index] = l;
32903 return index + 1;
32904 } else {
32905 return index;
32906 }}, "~A,java.util.EventListener,~N");
32907 c$.getListeners = Clazz_defineMethod (c$, "getListeners", 
32908 function (l, listenerType) {
32909 if (listenerType == null) {
32910 throw  new NullPointerException ("Listener type should not be null");
32911 }var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType);
32912 var result = java.lang.reflect.Array.newInstance (listenerType, n);
32913 java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0);
32914 return result;
32915 }, "java.util.EventListener,Class");
32916 });
32917 Clazz_declarePackage ("java.awt");
32918 Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () {
32919 c$ = Clazz_decorateAsClass (function () {
32920 this.bdata = null;
32921 this.id = 0;
32922 this.num = 0;
32923 this.consumed = false;
32924 this.focusManagerIsDispatching = false;
32925 this.isPosted = false;
32926 Clazz_instantialize (this, arguments);
32927 }, java.awt, "AWTEvent", java.util.EventObject);
32928 Clazz_makeConstructor (c$, 
32929 function (event) {
32930 this.construct (event.target, event.id);
32931 }, "java.awt.Event");
32932 Clazz_makeConstructor (c$, 
32933 function (source, id) {
32934 Clazz_superConstructor (this, java.awt.AWTEvent, [source]);
32935 this.id = id;
32936 this.num = ++java.awt.AWTEvent.idnum;
32937 switch (id) {
32938 case 1001:
32939 case 701:
32940 case 601:
32941 case 900:
32942 this.consumed = true;
32943 break;
32944 default:
32945 }
32946 }, "~O,~N");
32947 Clazz_defineMethod (c$, "setSource", 
32948 function (newSource) {
32949 if (this.source === newSource) {
32950 return;
32951 }var comp = null;
32952 if (Clazz_instanceOf (newSource, java.awt.Component)) {
32953 comp = newSource;
32954 while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) {
32955 comp = comp.parent;
32956 }
32957 }this.source = newSource;
32958 }, "~O");
32959 Clazz_defineMethod (c$, "getID", 
32960 function () {
32961 return this.id;
32962 });
32963 Clazz_overrideMethod (c$, "toString", 
32964 function () {
32965 var srcName = null;
32966 if (Clazz_instanceOf (this.source, java.awt.Component)) {
32967 srcName = (this.source).getName ();
32968 }return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source);
32969 });
32970 Clazz_defineMethod (c$, "paramString", 
32971 function () {
32972 return "";
32973 });
32974 Clazz_defineMethod (c$, "consume", 
32975 function () {
32976 switch (this.id) {
32977 case 401:
32978 case 402:
32979 case 501:
32980 case 502:
32981 case 503:
32982 case 506:
32983 case 504:
32984 case 505:
32985 case 507:
32986 case 1100:
32987 case 1101:
32988 this.consumed = true;
32989 break;
32990 default:
32991 }
32992 });
32993 Clazz_defineMethod (c$, "isConsumed", 
32994 function () {
32995 return this.consumed;
32996 });
32997 Clazz_defineMethod (c$, "copyPrivateDataInto", 
32998 function (that) {
32999 that.bdata = this.bdata;
33000 }, "java.awt.AWTEvent");
33001 Clazz_defineMethod (c$, "dispatched", 
33002 function () {
33003 });
33004 Clazz_defineStatics (c$,
33005 "idnum", 0,
33006 "COMPONENT_EVENT_MASK", 0x01,
33007 "CONTAINER_EVENT_MASK", 0x02,
33008 "FOCUS_EVENT_MASK", 0x04,
33009 "KEY_EVENT_MASK", 0x08,
33010 "MOUSE_EVENT_MASK", 0x10,
33011 "MOUSE_MOTION_EVENT_MASK", 0x20,
33012 "WINDOW_EVENT_MASK", 0x40,
33013 "ACTION_EVENT_MASK", 0x80,
33014 "ADJUSTMENT_EVENT_MASK", 0x100,
33015 "ITEM_EVENT_MASK", 0x200,
33016 "TEXT_EVENT_MASK", 0x400,
33017 "INPUT_METHOD_EVENT_MASK", 0x800,
33018 "INPUT_METHODS_ENABLED_MASK", 0x1000,
33019 "PAINT_EVENT_MASK", 0x2000,
33020 "INVOCATION_EVENT_MASK", 0x4000,
33021 "HIERARCHY_EVENT_MASK", 0x8000,
33022 "HIERARCHY_BOUNDS_EVENT_MASK", 0x10000,
33023 "MOUSE_WHEEL_EVENT_MASK", 0x20000,
33024 "WINDOW_STATE_EVENT_MASK", 0x40000,
33025 "WINDOW_FOCUS_EVENT_MASK", 0x80000,
33026 "RESERVED_ID_MAX", 1999);
33027 });
33028 Clazz_declarePackage ("java.awt.event");
33029 Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () {
33030 Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener);
33031 });
33032 Clazz_declarePackage ("java.awt");
33033 Clazz_declareInterface (java.awt, "ActiveEvent");
33034 Clazz_declarePackage ("java.awt.event");
33035 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () {
33036 c$ = Clazz_decorateAsClass (function () {
33037 this.runnable = null;
33038 this.notifier = null;
33039 this.catchExceptions = false;
33040 this.exception = null;
33041 this.throwable = null;
33042 this.when = 0;
33043 Clazz_instantialize (this, arguments);
33044 }, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
33045 Clazz_makeConstructor (c$, 
33046 function (source, runnable) {
33047 this.construct (source, runnable, null, false);
33048 }, "~O,Runnable");
33049 Clazz_makeConstructor (c$, 
33050 function (source, runnable, notifier, catchThrowables) {
33051 this.construct (source, 1200, runnable, notifier, catchThrowables);
33052 }, "~O,Runnable,~O,~B");
33053 Clazz_makeConstructor (c$, 
33054 function (source, id, runnable, notifier, catchThrowables) {
33055 Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]);
33056 this.runnable = runnable;
33057 this.notifier = notifier;
33058 this.catchExceptions = catchThrowables;
33059 this.when = System.currentTimeMillis ();
33060 }, "~O,~N,Runnable,~O,~B");
33061 Clazz_overrideMethod (c$, "dispatch", 
33062 function () {
33063 if (this.catchExceptions) {
33064 try {
33065 this.runnable.run ();
33066 } catch (t) {
33067 if (Clazz_instanceOf (t, Exception)) {
33068 this.exception = t;
33069 }this.throwable = t;
33070 }
33071 } else {
33072 this.runnable.run ();
33073 }if (this.notifier != null) {
33074 {
33075 this.notifier.notifyAll ();
33076 }}});
33077 Clazz_defineMethod (c$, "getException", 
33078 function () {
33079 return (this.catchExceptions) ? this.exception : null;
33080 });
33081 Clazz_defineMethod (c$, "getThrowable", 
33082 function () {
33083 return (this.catchExceptions) ? this.throwable : null;
33084 });
33085 Clazz_defineMethod (c$, "getWhen", 
33086 function () {
33087 return this.when;
33088 });
33089 Clazz_overrideMethod (c$, "paramString", 
33090 function () {
33091 var typeStr;
33092 switch (this.id) {
33093 case 1200:
33094 typeStr = "INVOCATION_DEFAULT";
33095 break;
33096 default:
33097 typeStr = "unknown type";
33098 }
33099 return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when;
33100 });
33101 Clazz_defineStatics (c$,
33102 "SWINGJS_INVOCATION_LOW", 1201,
33103 "INVOCATION_FIRST", 1200,
33104 "INVOCATION_DEFAULT", 1200,
33105 "INVOCATION_LAST", 1201);
33106 });
33107 Clazz_declarePackage ("java.awt.event");
33108 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () {
33109 c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent);
33110 Clazz_defineMethod (c$, "getComponent", 
33111 function () {
33112 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
33113 });
33114 Clazz_overrideMethod (c$, "paramString", 
33115 function () {
33116 var typeStr;
33117 var b = (this.source != null ? (this.source).getBounds () : null);
33118 switch (this.id) {
33119 case 102:
33120 typeStr = "COMPONENT_SHOWN";
33121 break;
33122 case 103:
33123 typeStr = "COMPONENT_HIDDEN";
33124 break;
33125 case 100:
33126 typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33127 break;
33128 case 101:
33129 typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33130 break;
33131 default:
33132 typeStr = "unknown type";
33133 }
33134 return typeStr;
33135 });
33136 Clazz_defineStatics (c$,
33137 "COMPONENT_FIRST", 100,
33138 "COMPONENT_LAST", 103,
33139 "COMPONENT_MOVED", 100,
33140 "COMPONENT_RESIZED", 101,
33141 "COMPONENT_SHOWN", 102,
33142 "COMPONENT_HIDDEN", 103);
33143 });
33144 Clazz_declarePackage ("java.awt.event");
33145 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () {
33146 c$ = Clazz_decorateAsClass (function () {
33147 this.x = 0;
33148 this.y = 0;
33149 this.xAbs = 0;
33150 this.yAbs = 0;
33151 this.clickCount = 0;
33152 this.button = 0;
33153 this.popupTrigger = false;
33154 Clazz_instantialize (this, arguments);
33155 }, java.awt.event, "MouseEvent", java.awt.event.InputEvent);
33156 Clazz_defineMethod (c$, "getLocationOnScreen", 
33157 function () {
33158 return  new java.awt.Point (this.xAbs, this.yAbs);
33159 });
33160 Clazz_defineMethod (c$, "getXOnScreen", 
33161 function () {
33162 return this.xAbs;
33163 });
33164 Clazz_defineMethod (c$, "getYOnScreen", 
33165 function () {
33166 return this.yAbs;
33167 });
33168 Clazz_makeConstructor (c$, 
33169 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) {
33170 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button);
33171 var eventLocationOnScreen =  new java.awt.Point (0, 0);
33172 try {
33173 eventLocationOnScreen = source.getLocationOnScreen ();
33174 this.xAbs = eventLocationOnScreen.x + x;
33175 this.yAbs = eventLocationOnScreen.y + y;
33176 } catch (e) {
33177 if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) {
33178 this.xAbs = 0;
33179 this.yAbs = 0;
33180 } else {
33181 throw e;
33182 }
33183 }
33184 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N");
33185 Clazz_makeConstructor (c$, 
33186 function (source, id, when, modifiers, x, y, clickCount, popupTrigger) {
33187 this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0);
33188 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B");
33189 Clazz_makeConstructor (c$, 
33190 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) {
33191 Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]);
33192 this.x = x;
33193 this.y = y;
33194 this.xAbs = xAbs;
33195 this.yAbs = yAbs;
33196 this.clickCount = clickCount;
33197 this.popupTrigger = popupTrigger;
33198 if (button < 0 || button > 3) {
33199 throw  new IllegalArgumentException ("Invalid button value");
33200 }this.button = button;
33201 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
33202 this.setNewModifiers ();
33203 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) {
33204 this.setOldModifiers ();
33205 }}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N");
33206 Clazz_defineMethod (c$, "getX", 
33207 function () {
33208 return this.x;
33209 });
33210 Clazz_defineMethod (c$, "getY", 
33211 function () {
33212 return this.y;
33213 });
33214 Clazz_defineMethod (c$, "getPoint", 
33215 function () {
33216 var x;
33217 var y;
33218 {
33219 x = this.x;
33220 y = this.y;
33221 }return  new java.awt.Point (x, y);
33222 });
33223 Clazz_defineMethod (c$, "translatePoint", 
33224 function (x, y) {
33225 this.x += x;
33226 this.y += y;
33227 }, "~N,~N");
33228 Clazz_defineMethod (c$, "getClickCount", 
33229 function () {
33230 return this.clickCount;
33231 });
33232 Clazz_defineMethod (c$, "getButton", 
33233 function () {
33234 return this.button;
33235 });
33236 Clazz_defineMethod (c$, "isPopupTrigger", 
33237 function () {
33238 return this.popupTrigger;
33239 });
33240 c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", 
33241 function (modifiers) {
33242 var buf =  new StringBuilder ();
33243 if ((modifiers & 8) != 0) {
33244 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33245 buf.append ("+");
33246 }if ((modifiers & 4) != 0) {
33247 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33248 buf.append ("+");
33249 }if ((modifiers & 2) != 0) {
33250 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33251 buf.append ("+");
33252 }if ((modifiers & 1) != 0) {
33253 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33254 buf.append ("+");
33255 }if ((modifiers & 32) != 0) {
33256 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33257 buf.append ("+");
33258 }if ((modifiers & 16) != 0) {
33259 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33260 buf.append ("+");
33261 }if ((modifiers & 8) != 0) {
33262 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33263 buf.append ("+");
33264 }if ((modifiers & 4) != 0) {
33265 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33266 buf.append ("+");
33267 }if (buf.length () > 0) {
33268 buf.setLength (buf.length () - 1);
33269 }return buf.toString ();
33270 }, "~N");
33271 Clazz_overrideMethod (c$, "paramString", 
33272 function () {
33273 var str =  new StringBuilder (80);
33274 str.append (java.awt.event.MouseEvent.getIdString (this.id));
33275 str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")");
33276 str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")");
33277 str.append (",button=").append ("" + this.getButton ());
33278 if (this.getModifiers () != 0) {
33279 str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers));
33280 }if (this.getModifiersEx () != 0) {
33281 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
33282 }str.append (",clickCount=").append ("" + this.clickCount);
33283 return str.toString ();
33284 });
33285 c$.getIdString = Clazz_defineMethod (c$, "getIdString", 
33286 function (id) {
33287 switch (id) {
33288 case 501:
33289 return "MOUSE_PRESSED";
33290 case 502:
33291 return "MOUSE_RELEASED";
33292 case 500:
33293 return "MOUSE_CLICKED";
33294 case 504:
33295 return "MOUSE_ENTERED";
33296 case 505:
33297 return "MOUSE_EXITED";
33298 case 503:
33299 return "MOUSE_MOVED";
33300 case 506:
33301 return "MOUSE_DRAGGED";
33302 case 507:
33303 return "MOUSE_WHEEL";
33304 default:
33305 return "unknown type";
33306 }
33307 }, "~N");
33308 Clazz_defineMethod (c$, "setNewModifiers", 
33309  function () {
33310 if ((this.modifiers & 16) != 0) {
33311 this.modifiers |= 1024;
33312 }if ((this.modifiers & 8) != 0) {
33313 this.modifiers |= 2048;
33314 }if ((this.modifiers & 4) != 0) {
33315 this.modifiers |= 4096;
33316 }if (this.id == 501 || this.id == 502 || this.id == 500) {
33317 if ((this.modifiers & 16) != 0) {
33318 this.button = 1;
33319 this.modifiers &= -13;
33320 if (this.id != 501) {
33321 this.modifiers &= -1025;
33322 }} else if ((this.modifiers & 8) != 0) {
33323 this.button = 2;
33324 this.modifiers &= -21;
33325 if (this.id != 501) {
33326 this.modifiers &= -2049;
33327 }} else if ((this.modifiers & 4) != 0) {
33328 this.button = 3;
33329 this.modifiers &= -25;
33330 if (this.id != 501) {
33331 this.modifiers &= -4097;
33332 }}}if ((this.modifiers & 8) != 0) {
33333 this.modifiers |= 512;
33334 }if ((this.modifiers & 4) != 0) {
33335 this.modifiers |= 256;
33336 }if ((this.modifiers & 1) != 0) {
33337 this.modifiers |= 64;
33338 }if ((this.modifiers & 2) != 0) {
33339 this.modifiers |= 128;
33340 }if ((this.modifiers & 32) != 0) {
33341 this.modifiers |= 8192;
33342 }});
33343 Clazz_defineMethod (c$, "setOldModifiers", 
33344  function () {
33345 if (this.id == 501 || this.id == 502 || this.id == 500) {
33346 switch (this.button) {
33347 case 1:
33348 this.modifiers |= 16;
33349 break;
33350 case 2:
33351 this.modifiers |= 8;
33352 break;
33353 case 3:
33354 this.modifiers |= 4;
33355 break;
33356 }
33357 } else {
33358 if ((this.modifiers & 1024) != 0) {
33359 this.modifiers |= 16;
33360 }if ((this.modifiers & 2048) != 0) {
33361 this.modifiers |= 8;
33362 }if ((this.modifiers & 4096) != 0) {
33363 this.modifiers |= 4;
33364 }}if ((this.modifiers & 512) != 0) {
33365 this.modifiers |= 8;
33366 }if ((this.modifiers & 256) != 0) {
33367 this.modifiers |= 4;
33368 }if ((this.modifiers & 64) != 0) {
33369 this.modifiers |= 1;
33370 }if ((this.modifiers & 128) != 0) {
33371 this.modifiers |= 2;
33372 }if ((this.modifiers & 8192) != 0) {
33373 this.modifiers |= 32;
33374 }});
33375 Clazz_defineStatics (c$,
33376 "MOUSE_FIRST", 500,
33377 "MOUSE_LAST", 507,
33378 "MOUSE_CLICKED", 500,
33379 "MOUSE_PRESSED", 501,
33380 "MOUSE_RELEASED", 502,
33381 "MOUSE_MOVED", 503,
33382 "MOUSE_ENTERED", 504,
33383 "MOUSE_EXITED", 505,
33384 "MOUSE_DRAGGED", 506,
33385 "MOUSE_WHEEL", 507,
33386 "NOBUTTON", 0,
33387 "BUTTON1", 1,
33388 "BUTTON2", 2,
33389 "BUTTON3", 3);
33390 });
33391 Clazz_declarePackage ("java.awt.event");
33392 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () {
33393 c$ = Clazz_decorateAsClass (function () {
33394 this.when = 0;
33395 this.modifiers = 0;
33396 this.canAccessSystemClipboard = false;
33397 Clazz_instantialize (this, arguments);
33398 }, java.awt.event, "InputEvent", java.awt.event.ComponentEvent);
33399 Clazz_makeConstructor (c$, 
33400 function (source, id, when, modifiers) {
33401 Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]);
33402 this.when = when;
33403 this.modifiers = modifiers;
33404 this.canAccessSystemClipboard = false;
33405 }, "java.awt.Component,~N,~N,~N");
33406 Clazz_defineMethod (c$, "isShiftDown", 
33407 function () {
33408 return (this.modifiers & 1) != 0;
33409 });
33410 Clazz_defineMethod (c$, "isControlDown", 
33411 function () {
33412 return (this.modifiers & 2) != 0;
33413 });
33414 Clazz_defineMethod (c$, "isMetaDown", 
33415 function () {
33416 return (this.modifiers & 4) != 0;
33417 });
33418 Clazz_defineMethod (c$, "isAltDown", 
33419 function () {
33420 return (this.modifiers & 8) != 0;
33421 });
33422 Clazz_defineMethod (c$, "isAltGraphDown", 
33423 function () {
33424 return (this.modifiers & 32) != 0;
33425 });
33426 Clazz_defineMethod (c$, "getWhen", 
33427 function () {
33428 return this.when;
33429 });
33430 Clazz_defineMethod (c$, "getModifiers", 
33431 function () {
33432 return this.modifiers & (-16321);
33433 });
33434 Clazz_defineMethod (c$, "getModifiersEx", 
33435 function () {
33436 return this.modifiers & -64;
33437 });
33438 Clazz_overrideMethod (c$, "consume", 
33439 function () {
33440 this.consumed = true;
33441 });
33442 Clazz_overrideMethod (c$, "isConsumed", 
33443 function () {
33444 return this.consumed;
33445 });
33446 c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", 
33447 function (modifiers) {
33448 var buf =  new StringBuilder ();
33449 if ((modifiers & 256) != 0) {
33450 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33451 buf.append ("+");
33452 }if ((modifiers & 128) != 0) {
33453 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33454 buf.append ("+");
33455 }if ((modifiers & 512) != 0) {
33456 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33457 buf.append ("+");
33458 }if ((modifiers & 64) != 0) {
33459 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33460 buf.append ("+");
33461 }if ((modifiers & 8192) != 0) {
33462 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33463 buf.append ("+");
33464 }if ((modifiers & 1024) != 0) {
33465 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33466 buf.append ("+");
33467 }if ((modifiers & 2048) != 0) {
33468 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33469 buf.append ("+");
33470 }if ((modifiers & 4096) != 0) {
33471 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33472 buf.append ("+");
33473 }if (buf.length () > 0) {
33474 buf.setLength (buf.length () - 1);
33475 }return buf.toString ();
33476 }, "~N");
33477 Clazz_defineStatics (c$,
33478 "SHIFT_MASK", 1,
33479 "CTRL_MASK", 2,
33480 "META_MASK", 4,
33481 "ALT_MASK", 8,
33482 "ALT_GRAPH_MASK", 32,
33483 "BUTTON1_MASK", 16,
33484 "BUTTON2_MASK", 8,
33485 "BUTTON3_MASK", 4,
33486 "SHIFT_DOWN_MASK", 64,
33487 "CTRL_DOWN_MASK", 128,
33488 "META_DOWN_MASK", 256,
33489 "ALT_DOWN_MASK", 512,
33490 "BUTTON1_DOWN_MASK", 1024,
33491 "BUTTON2_DOWN_MASK", 2048,
33492 "BUTTON3_DOWN_MASK", 4096,
33493 "ALT_GRAPH_DOWN_MASK", 8192,
33494 "FIRST_HIGH_BIT", 16384,
33495 "JDK_1_3_MODIFIERS", 63,
33496 "HIGH_MODIFIERS", -16384);
33497 });
33498 Clazz_declarePackage ("java.awt");
33499 Clazz_load (["java.awt.AWTEventMulticaster", "java.awt.event.AWTEventListener", "java.util.HashMap"], "java.awt.Toolkit", ["java.util.ArrayList", "java.awt.Cursor", "$.Insets", "$.RenderingHints", "java.awt.event.AWTEventListenerProxy", "java.beans.PropertyChangeSupport", "jssun.awt.NullComponentPeer"], function () {
33500 c$ = Clazz_decorateAsClass (function () {
33501 this.desktopProperties = null;
33502 this.desktopPropsSupport = null;
33503 this.calls = null;
33504 this.eventListener = null;
33505 this.listener2SelectiveListener = null;
33506 if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) {
33507 java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ ();
33508 }
33509 Clazz_instantialize (this, arguments);
33510 }, java.awt, "Toolkit");
33511 Clazz_prepareFields (c$, function () {
33512 this.desktopProperties =  new java.util.HashMap ();
33513 this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this);
33514 this.calls =  Clazz_newIntArray (32, 0);
33515 this.listener2SelectiveListener =  new java.util.HashMap ();
33516 });
33517 Clazz_defineMethod (c$, "createComponent", 
33518 function (target) {
33519 if (java.awt.Toolkit.lightweightMarker == null) {
33520 java.awt.Toolkit.lightweightMarker =  new jssun.awt.NullComponentPeer ();
33521 }return java.awt.Toolkit.lightweightMarker;
33522 }, "java.awt.Component");
33523 Clazz_defineMethod (c$, "loadSystemColors", 
33524 function (systemColors) {
33525 }, "~A");
33526 Clazz_defineMethod (c$, "setDynamicLayout", 
33527 function (dynamic) {
33528 }, "~B");
33529 Clazz_defineMethod (c$, "isDynamicLayoutSet", 
33530 function () {
33531 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33532 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet ();
33533 } else {
33534 return false;
33535 }});
33536 Clazz_defineMethod (c$, "isDynamicLayoutActive", 
33537 function () {
33538 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33539 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive ();
33540 } else {
33541 return false;
33542 }});
33543 Clazz_defineMethod (c$, "getScreenInsets", 
33544 function (gc) {
33545 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33546 return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc);
33547 } else {
33548 return  new java.awt.Insets (0, 0, 0, 0);
33549 }}, "java.awt.GraphicsConfiguration");
33550 c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", 
33551 function () {
33552 return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit =  new swingjs.JSToolkit () : java.awt.Toolkit.toolkit);
33553 });
33554 Clazz_defineMethod (c$, "createImage", 
33555 function (imagedata) {
33556 return this.createImage (imagedata, 0, imagedata.length);
33557 }, "~A");
33558 Clazz_defineMethod (c$, "getMenuShortcutKeyMask", 
33559 function () {
33560 return 2;
33561 });
33562 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
33563 function (c) {
33564 return null;
33565 }, "java.awt.Component");
33566 Clazz_defineMethod (c$, "createCustomCursor", 
33567 function (cursor, hotSpot, name) {
33568 return  new java.awt.Cursor (0);
33569 }, "java.awt.Image,java.awt.Point,~S");
33570 Clazz_defineMethod (c$, "isFrameStateSupported", 
33571 function (state) {
33572 return (state == 0);
33573 }, "~N");
33574 c$.getProperty = Clazz_defineMethod (c$, "getProperty", 
33575 function (key, defaultValue) {
33576 if (java.awt.Toolkit.resources != null) {
33577 try {
33578 return java.awt.Toolkit.resources.getString (key);
33579 } catch (e) {
33580 if (Clazz_exceptionOf (e, java.util.MissingResourceException)) {
33581 } else {
33582 throw e;
33583 }
33584 }
33585 }return defaultValue;
33586 }, "~S,~S");
33587 Clazz_defineMethod (c$, "getSystemEventQueue", 
33588 function () {
33589 return this.getSystemEventQueueImpl ();
33590 });
33591 c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", 
33592 function () {
33593 return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl ();
33594 });
33595 Clazz_defineMethod (c$, "getDesktopProperty", 
33596 function (propertyName) {
33597 if (this.desktopProperties.isEmpty ()) {
33598 this.initializeDesktopProperties ();
33599 }var value;
33600 if (propertyName.equals ("awt.dynamicLayoutSupported")) {
33601 value = this.lazilyLoadDesktopProperty (propertyName);
33602 return value;
33603 }value = this.desktopProperties.get (propertyName);
33604 if (value == null) {
33605 value = this.lazilyLoadDesktopProperty (propertyName);
33606 if (value != null) {
33607 this.setDesktopProperty (propertyName, value);
33608 }}if (Clazz_instanceOf (value, java.awt.RenderingHints)) {
33609 value = (value).clone ();
33610 }return value;
33611 }, "~S");
33612 Clazz_defineMethod (c$, "setDesktopProperty", 
33613 function (name, newValue) {
33614 var oldValue;
33615 {
33616 oldValue = this.desktopProperties.get (name);
33617 this.desktopProperties.put (name, newValue);
33618 }this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue);
33619 }, "~S,~O");
33620 Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", 
33621 function (name) {
33622 return null;
33623 }, "~S");
33624 Clazz_defineMethod (c$, "initializeDesktopProperties", 
33625 function () {
33626 });
33627 Clazz_defineMethod (c$, "addPropertyChangeListener", 
33628 function (name, pcl) {
33629 this.desktopPropsSupport.addPropertyChangeListener (name, pcl);
33630 }, "~S,java.beans.PropertyChangeListener");
33631 Clazz_defineMethod (c$, "removePropertyChangeListener", 
33632 function (name, pcl) {
33633 this.desktopPropsSupport.removePropertyChangeListener (name, pcl);
33634 }, "~S,java.beans.PropertyChangeListener");
33635 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33636 function () {
33637 return this.desktopPropsSupport.getPropertyChangeListeners ();
33638 });
33639 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33640 function (propertyName) {
33641 return this.desktopPropsSupport.getPropertyChangeListeners (propertyName);
33642 }, "~S");
33643 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
33644 function () {
33645 return true;
33646 });
33647 c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", 
33648  function (l) {
33649 var localL = l;
33650 if (localL == null) {
33651 return null;
33652 }if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) {
33653 localL = (l).getListener ();
33654 }return localL;
33655 }, "java.awt.event.AWTEventListener");
33656 Clazz_defineMethod (c$, "addAWTEventListener", 
33657 function (listener, eventMask) {
33658 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33659 if (localL == null) {
33660 return;
33661 }{
33662 var selectiveListener = this.listener2SelectiveListener.get (localL);
33663 if (selectiveListener == null) {
33664 selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask);
33665 this.listener2SelectiveListener.put (localL, selectiveListener);
33666 this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener);
33667 }selectiveListener.orEventMasks (eventMask);
33668 java.awt.Toolkit.enabledOnToolkitMask |= eventMask;
33669 var mask = eventMask;
33670 for (var i = 0; i < 32; i++) {
33671 if (mask == 0) {
33672 break;
33673 }if ((mask & 1) != 0) {
33674 this.calls[i]++;
33675 }mask >>>= 1;
33676 }
33677 }}, "java.awt.event.AWTEventListener,~N");
33678 Clazz_defineMethod (c$, "removeAWTEventListener", 
33679 function (listener) {
33680 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33681 if (listener == null) {
33682 return;
33683 }{
33684 var selectiveListener = this.listener2SelectiveListener.get (localL);
33685 if (selectiveListener != null) {
33686 this.listener2SelectiveListener.remove (localL);
33687 var listenerCalls = selectiveListener.getCalls ();
33688 for (var i = 0; i < 32; i++) {
33689 this.calls[i] -= listenerCalls[i];
33690 if (this.calls[i] == 0) {
33691 java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i);
33692 }}
33693 }this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener);
33694 }}, "java.awt.event.AWTEventListener");
33695 c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", 
33696 function (eventMask) {
33697 return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0;
33698 }, "~N");
33699 Clazz_defineMethod (c$, "countAWTEventListeners", 
33700 function (eventMask) {
33701 var ci = 0;
33702 for (; eventMask != 0; eventMask >>>= 1, ci++) {
33703 }
33704 ci--;
33705 return this.calls[ci];
33706 }, "~N");
33707 Clazz_defineMethod (c$, "getAWTEventListeners", 
33708 function () {
33709 {
33710 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33711 var ret =  new Array (la.length);
33712 for (var i = 0; i < la.length; i++) {
33713 var sael = la[i];
33714 var tempL = sael.getListener ();
33715 ret[i] =  new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL);
33716 }
33717 return ret;
33718 }});
33719 Clazz_defineMethod (c$, "getAWTEventListeners", 
33720 function (eventMask) {
33721 {
33722 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33723 var list =  new java.util.ArrayList (la.length);
33724 for (var i = 0; i < la.length; i++) {
33725 var sael = la[i];
33726 if ((sael.getEventMask () & eventMask) == eventMask) {
33727 list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ()));
33728 }}
33729 return list.toArray ( new Array (0));
33730 }}, "~N");
33731 Clazz_defineMethod (c$, "notifyAWTEventListeners", 
33732 function (theEvent) {
33733 var eventListener = this.eventListener;
33734 if (eventListener != null) {
33735 eventListener.eventDispatched (theEvent);
33736 }}, "java.awt.AWTEvent");
33737 c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", 
33738  function (toolkit) {
33739 return  new java.beans.PropertyChangeSupport (toolkit);
33740 }, "java.awt.Toolkit");
33741 c$.$Toolkit$SelectiveAWTEventListener$ = function () {
33742 Clazz_pu$h(self.c$);
33743 c$ = Clazz_decorateAsClass (function () {
33744 Clazz_prepareCallback (this, arguments);
33745 this.listener = null;
33746 this.eventMask = 0;
33747 this.calls = null;
33748 Clazz_instantialize (this, arguments);
33749 }, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener);
33750 Clazz_prepareFields (c$, function () {
33751 this.calls =  Clazz_newIntArray (32, 0);
33752 });
33753 Clazz_defineMethod (c$, "getListener", 
33754 function () {
33755 return this.listener;
33756 });
33757 Clazz_defineMethod (c$, "getEventMask", 
33758 function () {
33759 return this.eventMask;
33760 });
33761 Clazz_defineMethod (c$, "getCalls", 
33762 function () {
33763 return this.calls;
33764 });
33765 Clazz_defineMethod (c$, "orEventMasks", 
33766 function (a) {
33767 this.eventMask |= a;
33768 for (var b = 0; b < 32; b++) {
33769 if (a == 0) {
33770 break;
33771 }if ((a & 1) != 0) {
33772 this.calls[b]++;
33773 }a >>>= 1;
33774 }
33775 }, "~N");
33776 Clazz_makeConstructor (c$, 
33777 function (a, b) {
33778 this.listener = a;
33779 this.eventMask = b;
33780 }, "java.awt.event.AWTEventListener,~N");
33781 Clazz_defineMethod (c$, "eventDispatched", 
33782 function (a) {
33783 var b = 0;
33784 if (((b = this.eventMask & 1) != 0 && a.id >= 100 && a.id <= 103) || ((b = this.eventMask & 2) != 0 && a.id >= 300 && a.id <= 301) || ((b = this.eventMask & 4) != 0 && a.id >= 1004 && a.id <= 1005) || ((b = this.eventMask & 8) != 0 && a.id >= 400 && a.id <= 402) || ((b = this.eventMask & 131072) != 0 && a.id == 507) || ((b = this.eventMask & 32) != 0 && (a.id == 503 || a.id == 506)) || ((b = this.eventMask & 16) != 0 && a.id != 503 && a.id != 506 && a.id != 507 && a.id >= 500 && a.id <= 507) || ((b = this.eventMask & 64) != 0 && (a.id >= 200 && a.id <= 209)) || ((b = this.eventMask & 128) != 0 && a.id >= 1001 && a.id <= 1001) || ((b = this.eventMask & 256) != 0 && a.id >= 601 && a.id <= 601) || ((b = this.eventMask & 512) != 0 && a.id >= 701 && a.id <= 701) || ((b = this.eventMask & 1024) != 0 && a.id >= 900 && a.id <= 900) || ((b = this.eventMask & 2048) != 0 && a.id >= 1100 && a.id <= 1101) || ((b = this.eventMask & 8192) != 0 && a.id >= 800 && a.id <= 801) || ((b = this.eventMask & 16384) != 0 && a.id >= 1200 && a.id <= 1201) || ((b = this.eventMask & 32768) != 0 && a.id == 1400) || ((b = this.eventMask & 65536) != 0 && (a.id == 1401 || a.id == 1402)) || ((b = this.eventMask & 262144) != 0 && a.id == 209) || ((b = this.eventMask & 524288) != 0 && (a.id == 207 || a.id == 208))) {
33785 var c = 0;
33786 for (var d = b; d != 0; d >>>= 1, c++) {
33787 }
33788 c--;
33789 for (var e = 0; e < this.calls[c]; e++) {
33790 this.listener.eventDispatched (a);
33791 }
33792 }}, "java.awt.AWTEvent");
33793 c$ = Clazz_p0p ();
33794 };
33795 Clazz_pu$h(self.c$);
33796 c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener);
33797 c$.add = Clazz_defineMethod (c$, "add", 
33798 function (a, b) {
33799 if (a == null) return b;
33800 if (b == null) return a;
33801 return  new java.awt.Toolkit.ToolkitEventMulticaster (a, b);
33802 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33803 c$.remove = Clazz_defineMethod (c$, "remove", 
33804 function (a, b) {
33805 return java.awt.AWTEventMulticaster.removeInternal (a, b);
33806 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33807 Clazz_defineMethod (c$, "remove", 
33808 function (a) {
33809 if (a === this.a) return this.b;
33810 if (a === this.b) return this.a;
33811 var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a);
33812 var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a);
33813 if (b === this.a && c === this.b) {
33814 return this;
33815 }return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c);
33816 }, "java.util.EventListener");
33817 Clazz_defineMethod (c$, "eventDispatched", 
33818 function (a) {
33819 (this.a).eventDispatched (a);
33820 (this.b).eventDispatched (a);
33821 }, "java.awt.AWTEvent");
33822 c$ = Clazz_p0p ();
33823 Clazz_defineStatics (c$,
33824 "lightweightMarker", null,
33825 "toolkit", null,
33826 "resources", null,
33827 "LONG_BITS", 32,
33828 "enabledOnToolkitMask", 0);
33829 });
33830 Clazz_declarePackage ("java.lang");
33831 Clazz_load (["java.lang.Enum"], "java.lang.Thread", ["java.lang.Exception", "$.IllegalArgumentException", "$.IllegalThreadStateException", "$.NoSuchMethodError", "$.NullPointerException", "$.ThreadDeath", "java.util.HashMap", "java.lang.ThreadGroup", "swingjs.JSToolkit"], function () {
33832 c$ = Clazz_decorateAsClass (function () {
33833 this.name = null;
33834 this.priority = 5;
33835 this.daemon = false;
33836 this.target = null;
33837 this.group = null;
33838 this.tid = 0;
33839 this.threadStatus = 0;
33840 this.parkBlocker = null;
33841 this.stopBeforeStart = false;
33842 this.throwableFromStop = null;
33843 this.me = null;
33844 this.uncaughtExceptionHandler = null;
33845 this.$interrupted = false;
33846 this.stopped = false;
33847 Clazz_instantialize (this, arguments);
33848 }, java.lang, "Thread", null, Runnable);
33849 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
33850  function () {
33851 return java.lang.Thread.threadInitNumber++;
33852 });
33853 c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", 
33854  function () {
33855 return ++java.lang.Thread.threadSeqNumber;
33856 });
33857 c$.currentThread = Clazz_defineMethod (c$, "currentThread", 
33858 function () {
33859 if (java.lang.Thread.thisThread == null) {
33860 java.lang.Thread.thisThread =  new java.lang.Thread ("master");
33861 java.lang.Thread.thisThread.setPriority (5);
33862 }return java.lang.Thread.thisThread;
33863 });
33864 c$.yield = Clazz_defineMethod (c$, "yield", 
33865 function () {
33866 });
33867 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33868 function (millis) {
33869 }, "~N");
33870 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33871 function (millis, nanos) {
33872 if (millis < 0) {
33873 throw  new IllegalArgumentException ("timeout value is negative");
33874 }if (nanos < 0 || nanos > 999999) {
33875 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
33876 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
33877 millis++;
33878 }java.lang.Thread.sleep (millis);
33879 }, "~N,~N");
33880 Clazz_defineMethod (c$, "init", 
33881  function (g, target, name, stackSize) {
33882 this.init (g, target, name, stackSize, null);
33883 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33884 Clazz_defineMethod (c$, "init", 
33885  function (g, target, name, stackSize, acc) {
33886 var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread);
33887 if (g == null) {
33888 if (g == null && parent != null) {
33889 g = parent.getThreadGroup ();
33890 }}if (g == null) {
33891 g = this.newThreadGroup (null, name);
33892 parent = this;
33893 }g.checkAccess ();
33894 g.addUnstarted ();
33895 this.group = g;
33896 this.priority = parent.getPriority ();
33897 this.name = name;
33898 this.target = target;
33899 this.setPriority (this.priority);
33900 this.tid = java.lang.Thread.nextThreadID ();
33901 this.me = this;
33902 }, "java.lang.ThreadGroup,Runnable,~S,~N,~O");
33903 Clazz_defineMethod (c$, "newThreadGroup", 
33904 function (group, name) {
33905 return  new java.lang.ThreadGroup (group, name);
33906 }, "java.lang.ThreadGroup,~S");
33907 Clazz_makeConstructor (c$, 
33908 function () {
33909 this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33910 });
33911 Clazz_makeConstructor (c$, 
33912 function (target) {
33913 this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33914 }, "Runnable");
33915 Clazz_makeConstructor (c$, 
33916 function (group, target) {
33917 this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33918 }, "java.lang.ThreadGroup,Runnable");
33919 Clazz_makeConstructor (c$, 
33920 function (name) {
33921 this.init (null, null, name, 0);
33922 }, "~S");
33923 Clazz_makeConstructor (c$, 
33924 function (group, name) {
33925 this.init (group, null, name, 0);
33926 }, "java.lang.ThreadGroup,~S");
33927 Clazz_makeConstructor (c$, 
33928 function (target, name) {
33929 this.init (null, target, name, 0);
33930 }, "Runnable,~S");
33931 Clazz_makeConstructor (c$, 
33932 function (group, target, name) {
33933 this.init (group, target, name, 0);
33934 }, "java.lang.ThreadGroup,Runnable,~S");
33935 Clazz_makeConstructor (c$, 
33936 function (group, target, name, stackSize) {
33937 this.init (group, target, name, stackSize);
33938 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33939 Clazz_defineMethod (c$, "start", 
33940 function () {
33941 if (this.threadStatus != 0 || this !== this.me) throw  new IllegalThreadStateException ();
33942 this.group.add (this);
33943 this.start0 ();
33944 if (this.stopBeforeStart) {
33945 this.stop0 (this.throwableFromStop);
33946 }});
33947 Clazz_defineMethod (c$, "start0", 
33948  function () {
33949 });
33950 Clazz_defineMethod (c$, "run", 
33951 function () {
33952 if (this.target != null) {
33953 this.target.run ();
33954 }});
33955 Clazz_defineMethod (c$, "stop", 
33956 function () {
33957 if ((this.threadStatus != 0) && !this.isAlive ()) {
33958 return;
33959 }this.stop1 ( new ThreadDeath ());
33960 });
33961 Clazz_defineMethod (c$, "stop", 
33962 function (obj) {
33963 this.stop1 (obj);
33964 }, "Throwable");
33965 Clazz_defineMethod (c$, "stop1", 
33966  function (th) {
33967 if (this.threadStatus != 0) {
33968 this.resume ();
33969 this.stop0 (th);
33970 } else {
33971 if (th == null) {
33972 throw  new NullPointerException ();
33973 }this.stopBeforeStart = true;
33974 this.throwableFromStop = th;
33975 }}, "Throwable");
33976 Clazz_defineMethod (c$, "interrupt", 
33977 function () {
33978 this.interrupt0 ();
33979 });
33980 c$.interrupted = Clazz_defineMethod (c$, "interrupted", 
33981 function () {
33982 return java.lang.Thread.currentThread ().isInterruptedB (true);
33983 });
33984 Clazz_defineMethod (c$, "isInterrupted", 
33985 function () {
33986 return this.isInterruptedB (false);
33987 });
33988 Clazz_defineMethod (c$, "isInterruptedB", 
33989  function (clearInterrupted) {
33990 var wasInt = this.$interrupted;
33991 if (clearInterrupted) this.$interrupted = false;
33992 return wasInt;
33993 }, "~B");
33994 Clazz_defineMethod (c$, "destroy", 
33995 function () {
33996 throw  new NoSuchMethodError ();
33997 });
33998 Clazz_defineMethod (c$, "isAlive", 
33999 function () {
34000 return true;
34001 });
34002 Clazz_defineMethod (c$, "suspend", 
34003 function () {
34004 this.checkAccess ();
34005 this.suspend0 ();
34006 });
34007 Clazz_defineMethod (c$, "resume", 
34008 function () {
34009 this.checkAccess ();
34010 this.resume0 ();
34011 });
34012 Clazz_defineMethod (c$, "setPriority", 
34013 function (newPriority) {
34014 var g;
34015 this.checkAccess ();
34016 if (newPriority > 10 || newPriority < 1) {
34017 throw  new IllegalArgumentException ();
34018 }if ((g = this.getThreadGroup ()) != null) {
34019 if (newPriority > g.getMaxPriority ()) {
34020 newPriority = g.getMaxPriority ();
34021 }this.setPriority0 (this.priority = newPriority);
34022 }}, "~N");
34023 Clazz_defineMethod (c$, "getPriority", 
34024 function () {
34025 return this.priority;
34026 });
34027 Clazz_defineMethod (c$, "setName", 
34028 function (name) {
34029 this.checkAccess ();
34030 this.name = name;
34031 }, "~S");
34032 Clazz_defineMethod (c$, "getName", 
34033 function () {
34034 return this.name;
34035 });
34036 Clazz_defineMethod (c$, "getThreadGroup", 
34037 function () {
34038 return this.group;
34039 });
34040 c$.activeCount = Clazz_defineMethod (c$, "activeCount", 
34041 function () {
34042 return java.lang.Thread.currentThread ().getThreadGroup ().activeCount ();
34043 });
34044 c$.enumerate = Clazz_defineMethod (c$, "enumerate", 
34045 function (tarray) {
34046 return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray);
34047 }, "~A");
34048 Clazz_defineMethod (c$, "countStackFrames", 
34049 function () {
34050 return 0;
34051 });
34052 Clazz_defineMethod (c$, "join", 
34053 function (millis) {
34054 var base = System.currentTimeMillis ();
34055 var now = 0;
34056 if (millis < 0) {
34057 throw  new IllegalArgumentException ("timeout value is negative");
34058 }swingjs.JSToolkit.warn ("Cannot wait in Thread");
34059 if (millis == 0) {
34060 while (this.isAlive ()) {
34061 this.wait (0);
34062 }
34063 } else {
34064 while (this.isAlive ()) {
34065 var delay = millis - now;
34066 if (delay <= 0) {
34067 break;
34068 }this.wait (delay);
34069 now = System.currentTimeMillis () - base;
34070 }
34071 }}, "~N");
34072 Clazz_defineMethod (c$, "join", 
34073 function (millis, nanos) {
34074 if (millis < 0) {
34075 throw  new IllegalArgumentException ("timeout value is negative");
34076 }if (nanos < 0 || nanos > 999999) {
34077 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
34078 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
34079 millis++;
34080 }this.join (millis);
34081 }, "~N,~N");
34082 Clazz_defineMethod (c$, "join", 
34083 function () {
34084 this.join (0);
34085 });
34086 c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", 
34087 function () {
34088  new Exception ("Stack trace").printStackTrace ();
34089 });
34090 Clazz_defineMethod (c$, "setDaemon", 
34091 function (on) {
34092 this.checkAccess ();
34093 if (this.isAlive ()) {
34094 throw  new IllegalThreadStateException ();
34095 }this.daemon = on;
34096 }, "~B");
34097 Clazz_defineMethod (c$, "isDaemon", 
34098 function () {
34099 return this.daemon;
34100 });
34101 Clazz_defineMethod (c$, "checkAccess", 
34102 function () {
34103 });
34104 Clazz_overrideMethod (c$, "toString", 
34105 function () {
34106 var group = this.getThreadGroup ();
34107 if (group != null) {
34108 return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]";
34109 } else {
34110 return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]";
34111 }});
34112 Clazz_defineMethod (c$, "getContextClassLoader", 
34113 function () {
34114 return null;
34115 });
34116 Clazz_defineMethod (c$, "setContextClassLoader", 
34117 function (cl) {
34118 }, "ClassLoader");
34119 c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", 
34120 function (obj) {
34121 return false;
34122 }, "~O");
34123 Clazz_defineMethod (c$, "getStackTrace", 
34124 function () {
34125 return ( new Exception ()).getStackTrace ();
34126 });
34127 c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", 
34128 function () {
34129 var threads = java.lang.Thread.getThreads ();
34130 var traces = java.lang.Thread.dumpThreads (threads);
34131 var m =  new java.util.HashMap (threads.length);
34132 for (var i = 0; i < threads.length; i++) {
34133 var stackTrace = traces[i];
34134 if (stackTrace != null) {
34135 m.put (threads[i], stackTrace);
34136 }}
34137 return m;
34138 });
34139 c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", 
34140  function (threads) {
34141 return null;
34142 }, "~A");
34143 c$.getThreads = Clazz_defineMethod (c$, "getThreads", 
34144  function () {
34145 return null;
34146 });
34147 Clazz_defineMethod (c$, "getId", 
34148 function () {
34149 return this.tid;
34150 });
34151 Clazz_defineMethod (c$, "getState", 
34152 function () {
34153 switch (this.threadStatus) {
34154 case 0:
34155 return java.lang.Thread.State.NEW;
34156 case 1:
34157 return java.lang.Thread.State.RUNNABLE;
34158 case 2:
34159 default:
34160 return java.lang.Thread.State.TERMINATED;
34161 case 3:
34162 return java.lang.Thread.State.TIMED_WAITING;
34163 case 4:
34164 return java.lang.Thread.State.WAITING;
34165 }
34166 });
34167 c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", 
34168 function (eh) {
34169 java.lang.Thread.defaultUncaughtExceptionHandler = eh;
34170 }, "java.lang.Thread.UncaughtExceptionHandler");
34171 c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", 
34172 function () {
34173 return java.lang.Thread.defaultUncaughtExceptionHandler;
34174 });
34175 Clazz_defineMethod (c$, "getUncaughtExceptionHandler", 
34176 function () {
34177 return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group;
34178 });
34179 Clazz_defineMethod (c$, "setUncaughtExceptionHandler", 
34180 function (eh) {
34181 this.checkAccess ();
34182 this.uncaughtExceptionHandler = eh;
34183 }, "java.lang.Thread.UncaughtExceptionHandler");
34184 Clazz_defineMethod (c$, "setPriority0", 
34185  function (newPriority) {
34186 }, "~N");
34187 Clazz_defineMethod (c$, "stop0", 
34188  function (o) {
34189 this.stopped = true;
34190 }, "~O");
34191 Clazz_defineMethod (c$, "suspend0", 
34192  function () {
34193 });
34194 Clazz_defineMethod (c$, "resume0", 
34195  function () {
34196 });
34197 Clazz_defineMethod (c$, "interrupt0", 
34198  function () {
34199 this.$interrupted = true;
34200 });
34201 Clazz_pu$h(self.c$);
34202 c$ = Clazz_declareType (java.lang.Thread, "State", Enum);
34203 Clazz_defineEnumConstant (c$, "NEW", 0, []);
34204 Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []);
34205 Clazz_defineEnumConstant (c$, "BLOCKED", 2, []);
34206 Clazz_defineEnumConstant (c$, "WAITING", 3, []);
34207 Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []);
34208 Clazz_defineEnumConstant (c$, "TERMINATED", 5, []);
34209 c$ = Clazz_p0p ();
34210 Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler");
34211 Clazz_defineStatics (c$,
34212 "threadInitNumber", 0,
34213 "threadSeqNumber", 0,
34214 "thisThread", null,
34215 "MIN_PRIORITY", 1,
34216 "NORM_PRIORITY", 5,
34217 "MAX_PRIORITY", 10,
34218 "defaultUncaughtExceptionHandler", null);
34219 });
34220 Clazz_declarePackage ("java.lang");
34221 Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () {
34222 c$ = Clazz_decorateAsClass (function () {
34223 this.parent = null;
34224 this.name = null;
34225 this.maxPriority = 10;
34226 this.destroyed = false;
34227 this.daemon = false;
34228 this.vmAllowSuspension = false;
34229 this.nUnstartedThreads = 0;
34230 this.nthreads = 0;
34231 this.threads = null;
34232 this.ngroups = 0;
34233 this.groups = null;
34234 this.html5Applet = null;
34235 Clazz_instantialize (this, arguments);
34236 }, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler);
34237 Clazz_makeConstructor (c$, 
34238 function (name) {
34239 this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name);
34240 }, "~S");
34241 Clazz_makeConstructor (c$, 
34242 function (parent, name) {
34243 this.name = name;
34244 this.parent = parent;
34245 if (parent != null) {
34246 this.maxPriority = parent.maxPriority;
34247 this.daemon = parent.daemon;
34248 this.vmAllowSuspension = parent.vmAllowSuspension;
34249 parent.add (this);
34250 }}, "java.lang.ThreadGroup,~S");
34251 Clazz_defineMethod (c$, "getName", 
34252 function () {
34253 return this.name;
34254 });
34255 Clazz_defineMethod (c$, "getParent", 
34256 function () {
34257 if (this.parent != null) this.parent.checkAccess ();
34258 return this.parent;
34259 });
34260 Clazz_defineMethod (c$, "getMaxPriority", 
34261 function () {
34262 return this.maxPriority;
34263 });
34264 Clazz_defineMethod (c$, "isDaemon", 
34265 function () {
34266 return this.daemon;
34267 });
34268 Clazz_defineMethod (c$, "isDestroyed", 
34269 function () {
34270 return this.destroyed;
34271 });
34272 Clazz_defineMethod (c$, "setDaemon", 
34273 function (daemon) {
34274 this.checkAccess ();
34275 this.daemon = daemon;
34276 }, "~B");
34277 Clazz_defineMethod (c$, "setMaxPriority", 
34278 function (pri) {
34279 var ngroupsSnapshot;
34280 var groupsSnapshot;
34281 {
34282 this.checkAccess ();
34283 if (pri < 1 || pri > 10) {
34284 return;
34285 }this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri;
34286 ngroupsSnapshot = this.ngroups;
34287 if (this.groups != null) {
34288 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34289 } else {
34290 groupsSnapshot = null;
34291 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34292 groupsSnapshot[i].setMaxPriority (pri);
34293 }
34294 }, "~N");
34295 Clazz_defineMethod (c$, "parentOf", 
34296 function (g) {
34297 for (; g != null; g = g.parent) {
34298 if (g === this) {
34299 return true;
34300 }}
34301 return false;
34302 }, "java.lang.ThreadGroup");
34303 Clazz_defineMethod (c$, "checkAccess", 
34304 function () {
34305 });
34306 Clazz_defineMethod (c$, "activeCount", 
34307 function () {
34308 var result;
34309 var ngroupsSnapshot;
34310 var groupsSnapshot;
34311 {
34312 if (this.destroyed) {
34313 return 0;
34314 }result = this.nthreads;
34315 ngroupsSnapshot = this.ngroups;
34316 if (this.groups != null) {
34317 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34318 } else {
34319 groupsSnapshot = null;
34320 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34321 result += groupsSnapshot[i].activeCount ();
34322 }
34323 return result;
34324 });
34325 Clazz_defineMethod (c$, "enumerate", 
34326 function (list) {
34327 this.checkAccess ();
34328 return this.enumerate (list, 0, true);
34329 }, "~A");
34330 Clazz_defineMethod (c$, "enumerate", 
34331 function (list, recurse) {
34332 this.checkAccess ();
34333 return this.enumerate (list, 0, recurse);
34334 }, "~A,~B");
34335 Clazz_defineMethod (c$, "enumerate", 
34336  function (list, n, recurse) {
34337 var ngroupsSnapshot = 0;
34338 var groupsSnapshot = null;
34339 {
34340 if (this.destroyed) {
34341 return 0;
34342 }var nt = this.nthreads;
34343 if (nt > list.length - n) {
34344 nt = list.length - n;
34345 }for (var i = 0; i < nt; i++) {
34346 if (this.threads[i].isAlive ()) {
34347 list[n++] = this.threads[i];
34348 }}
34349 if (recurse) {
34350 ngroupsSnapshot = this.ngroups;
34351 if (this.groups != null) {
34352 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34353 } else {
34354 groupsSnapshot = null;
34355 }}}if (recurse) {
34356 for (var i = 0; i < ngroupsSnapshot; i++) {
34357 n = groupsSnapshot[i].enumerate (list, n, true);
34358 }
34359 }return n;
34360 }, "~A,~N,~B");
34361 Clazz_defineMethod (c$, "activeGroupCount", 
34362 function () {
34363 var ngroupsSnapshot;
34364 var groupsSnapshot;
34365 {
34366 if (this.destroyed) {
34367 return 0;
34368 }ngroupsSnapshot = this.ngroups;
34369 if (this.groups != null) {
34370 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34371 } else {
34372 groupsSnapshot = null;
34373 }}var n = ngroupsSnapshot;
34374 for (var i = 0; i < ngroupsSnapshot; i++) {
34375 n += groupsSnapshot[i].activeGroupCount ();
34376 }
34377 return n;
34378 });
34379 Clazz_defineMethod (c$, "enumerate", 
34380 function (list) {
34381 this.checkAccess ();
34382 return this.enumerate (list, 0, true);
34383 }, "~A");
34384 Clazz_defineMethod (c$, "enumerate", 
34385 function (list, recurse) {
34386 this.checkAccess ();
34387 return this.enumerate (list, 0, recurse);
34388 }, "~A,~B");
34389 Clazz_defineMethod (c$, "enumerate", 
34390  function (list, n, recurse) {
34391 var ngroupsSnapshot = 0;
34392 var groupsSnapshot = null;
34393 {
34394 if (this.destroyed) {
34395 return 0;
34396 }var ng = this.ngroups;
34397 if (ng > list.length - n) {
34398 ng = list.length - n;
34399 }if (ng > 0) {
34400 System.arraycopy (this.groups, 0, list, n, ng);
34401 n += ng;
34402 }if (recurse) {
34403 ngroupsSnapshot = this.ngroups;
34404 if (this.groups != null) {
34405 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34406 } else {
34407 groupsSnapshot = null;
34408 }}}if (recurse) {
34409 for (var i = 0; i < ngroupsSnapshot; i++) {
34410 n = groupsSnapshot[i].enumerate (list, n, true);
34411 }
34412 }return n;
34413 }, "~A,~N,~B");
34414 Clazz_defineMethod (c$, "stop", 
34415 function () {
34416 if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop ();
34417 });
34418 Clazz_defineMethod (c$, "interrupt", 
34419 function () {
34420 var ngroupsSnapshot;
34421 var groupsSnapshot;
34422 {
34423 this.checkAccess ();
34424 for (var i = 0; i < this.nthreads; i++) {
34425 this.threads[i].interrupt ();
34426 }
34427 ngroupsSnapshot = this.ngroups;
34428 if (this.groups != null) {
34429 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34430 } else {
34431 groupsSnapshot = null;
34432 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34433 groupsSnapshot[i].interrupt ();
34434 }
34435 });
34436 Clazz_defineMethod (c$, "suspend", 
34437 function () {
34438 if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend ();
34439 });
34440 Clazz_defineMethod (c$, "stopOrSuspend", 
34441  function (suspend) {
34442 var suicide = false;
34443 var us = java.lang.Thread.currentThread ();
34444 var ngroupsSnapshot;
34445 var groupsSnapshot = null;
34446 {
34447 this.checkAccess ();
34448 for (var i = 0; i < this.nthreads; i++) {
34449 if (this.threads[i] === us) suicide = true;
34450  else if (suspend) this.threads[i].suspend ();
34451  else this.threads[i].stop ();
34452 }
34453 ngroupsSnapshot = this.ngroups;
34454 if (this.groups != null) {
34455 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34456 }}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide;
34457
34458 return suicide;
34459 }, "~B");
34460 Clazz_defineMethod (c$, "resume", 
34461 function () {
34462 var ngroupsSnapshot;
34463 var groupsSnapshot;
34464 {
34465 this.checkAccess ();
34466 for (var i = 0; i < this.nthreads; i++) {
34467 this.threads[i].resume ();
34468 }
34469 ngroupsSnapshot = this.ngroups;
34470 if (this.groups != null) {
34471 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34472 } else {
34473 groupsSnapshot = null;
34474 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34475 groupsSnapshot[i].resume ();
34476 }
34477 });
34478 Clazz_defineMethod (c$, "destroy", 
34479 function () {
34480 var ngroupsSnapshot;
34481 var groupsSnapshot;
34482 {
34483 this.checkAccess ();
34484 if (this.destroyed || (this.nthreads > 0)) {
34485 throw  new IllegalThreadStateException ();
34486 }ngroupsSnapshot = this.ngroups;
34487 if (this.groups != null) {
34488 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34489 } else {
34490 groupsSnapshot = null;
34491 }if (this.parent != null) {
34492 this.destroyed = true;
34493 this.ngroups = 0;
34494 this.groups = null;
34495 this.nthreads = 0;
34496 this.threads = null;
34497 }}for (var i = 0; i < ngroupsSnapshot; i += 1) {
34498 groupsSnapshot[i].destroy ();
34499 }
34500 if (this.parent != null) {
34501 this.parent.remove (this);
34502 }});
34503 Clazz_defineMethod (c$, "add", 
34504  function (g) {
34505 {
34506 if (this.destroyed) {
34507 throw  new IllegalThreadStateException ();
34508 }if (this.groups == null) {
34509 this.groups =  new Array (4);
34510 } else if (this.ngroups == this.groups.length) {
34511 this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2);
34512 }this.groups[this.ngroups] = g;
34513 this.ngroups++;
34514 }}, "java.lang.ThreadGroup");
34515 Clazz_defineMethod (c$, "remove", 
34516  function (g) {
34517 {
34518 if (this.destroyed) {
34519 return;
34520 }for (var i = 0; i < this.ngroups; i++) {
34521 if (this.groups[i] === g) {
34522 this.ngroups -= 1;
34523 System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i);
34524 this.groups[this.ngroups] = null;
34525 break;
34526 }}
34527 if (this.nthreads == 0) {
34528 this.notifyAll ();
34529 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34530 this.destroy ();
34531 }}}, "java.lang.ThreadGroup");
34532 Clazz_defineMethod (c$, "addUnstarted", 
34533 function () {
34534 {
34535 if (this.destroyed) {
34536 throw  new IllegalThreadStateException ();
34537 }this.nUnstartedThreads++;
34538 }});
34539 Clazz_defineMethod (c$, "add", 
34540 function (t) {
34541 {
34542 if (this.destroyed) {
34543 throw  new IllegalThreadStateException ();
34544 }if (this.threads == null) {
34545 this.threads =  new Array (4);
34546 } else if (this.nthreads == this.threads.length) {
34547 this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2);
34548 }this.threads[this.nthreads] = t;
34549 this.nthreads++;
34550 this.nUnstartedThreads--;
34551 }}, "java.lang.Thread");
34552 Clazz_defineMethod (c$, "remove", 
34553 function (t) {
34554 {
34555 if (this.destroyed) {
34556 return;
34557 }for (var i = 0; i < this.nthreads; i++) {
34558 if (this.threads[i] === t) {
34559 System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i);
34560 this.threads[this.nthreads] = null;
34561 break;
34562 }}
34563 if (this.nthreads == 0) {
34564 this.notifyAll ();
34565 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34566 this.destroy ();
34567 }}}, "java.lang.Thread");
34568 Clazz_defineMethod (c$, "uncaughtException", 
34569 function (t, e) {
34570 if (this.parent != null) {
34571 this.parent.uncaughtException (t, e);
34572 } else {
34573 var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler ();
34574 if (ueh != null) {
34575 ueh.uncaughtException (t, e);
34576 } else if (!(Clazz_instanceOf (e, ThreadDeath))) {
34577 System.err.print ("Exception in thread \"" + t.getName () + "\" ");
34578 e.printStackTrace (System.err);
34579 }}}, "java.lang.Thread,Throwable");
34580 Clazz_overrideMethod (c$, "toString", 
34581 function () {
34582 return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]";
34583 });
34584 });
34585 Clazz_declarePackage ("java.awt");
34586 Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () {
34587 c$ = Clazz_decorateAsClass (function () {
34588 this.align = 0;
34589 this.newAlign = 0;
34590 this.hgap = 0;
34591 this.vgap = 0;
34592 this.alignOnBaseline = false;
34593 Clazz_instantialize (this, arguments);
34594 }, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]);
34595 Clazz_makeConstructor (c$, 
34596 function () {
34597 this.construct (1, 5, 5);
34598 });
34599 Clazz_makeConstructor (c$, 
34600 function (align) {
34601 this.construct (align, 5, 5);
34602 }, "~N");
34603 Clazz_makeConstructor (c$, 
34604 function (align, hgap, vgap) {
34605 this.hgap = hgap;
34606 this.vgap = vgap;
34607 this.setAlignment (align);
34608 }, "~N,~N,~N");
34609 Clazz_defineMethod (c$, "getAlignment", 
34610 function () {
34611 return this.newAlign;
34612 });
34613 Clazz_defineMethod (c$, "setAlignment", 
34614 function (align) {
34615 this.newAlign = align;
34616 switch (align) {
34617 case 3:
34618 this.align = 0;
34619 break;
34620 case 4:
34621 this.align = 2;
34622 break;
34623 default:
34624 this.align = align;
34625 break;
34626 }
34627 }, "~N");
34628 Clazz_defineMethod (c$, "getHgap", 
34629 function () {
34630 return this.hgap;
34631 });
34632 Clazz_defineMethod (c$, "setHgap", 
34633 function (hgap) {
34634 this.hgap = hgap;
34635 }, "~N");
34636 Clazz_defineMethod (c$, "getVgap", 
34637 function () {
34638 return this.vgap;
34639 });
34640 Clazz_defineMethod (c$, "setVgap", 
34641 function (vgap) {
34642 this.vgap = vgap;
34643 }, "~N");
34644 Clazz_defineMethod (c$, "setAlignOnBaseline", 
34645 function (alignOnBaseline) {
34646 this.alignOnBaseline = alignOnBaseline;
34647 }, "~B");
34648 Clazz_defineMethod (c$, "getAlignOnBaseline", 
34649 function () {
34650 return this.alignOnBaseline;
34651 });
34652 Clazz_overrideMethod (c$, "addLayoutComponent", 
34653 function (name, comp) {
34654 }, "~S,java.awt.Component");
34655 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34656 function (comp) {
34657 }, "java.awt.Component");
34658 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34659 function (target) {
34660 {
34661 var dim =  new java.awt.Dimension (0, 0);
34662 var nmembers = target.getComponentCount ();
34663 var firstVisibleComponent = true;
34664 var useBaseline = this.getAlignOnBaseline ();
34665 var maxAscent = 0;
34666 var maxDescent = 0;
34667 for (var i = 0; i < nmembers; i++) {
34668 var m = target.getComponent (i);
34669 if (m.isVisible ()) {
34670 var d = m.getPreferredSize ();
34671 dim.height = Math.max (dim.height, d.height);
34672 if (firstVisibleComponent) {
34673 firstVisibleComponent = false;
34674 } else {
34675 dim.width += this.hgap;
34676 }dim.width += d.width;
34677 if (useBaseline) {
34678 var baseline = m.getBaseline (d.width, d.height);
34679 if (baseline >= 0) {
34680 maxAscent = Math.max (maxAscent, baseline);
34681 maxDescent = Math.max (maxDescent, d.height - baseline);
34682 }}}}
34683 if (useBaseline) {
34684 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34685 }var insets = target.getInsets ();
34686 dim.width += insets.left + insets.right + this.hgap * 2;
34687 dim.height += insets.top + insets.bottom + this.vgap * 2;
34688 return dim;
34689 }}, "java.awt.Container");
34690 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34691 function (target) {
34692 {
34693 var useBaseline = this.getAlignOnBaseline ();
34694 var dim =  new java.awt.Dimension (0, 0);
34695 var nmembers = target.getComponentCount ();
34696 var maxAscent = 0;
34697 var maxDescent = 0;
34698 var firstVisibleComponent = true;
34699 for (var i = 0; i < nmembers; i++) {
34700 var m = target.getComponent (i);
34701 if (m.visible) {
34702 var d = m.getMinimumSize ();
34703 dim.height = Math.max (dim.height, d.height);
34704 if (firstVisibleComponent) {
34705 firstVisibleComponent = false;
34706 } else {
34707 dim.width += this.hgap;
34708 }dim.width += d.width;
34709 if (useBaseline) {
34710 var baseline = m.getBaseline (d.width, d.height);
34711 if (baseline >= 0) {
34712 maxAscent = Math.max (maxAscent, baseline);
34713 maxDescent = Math.max (maxDescent, dim.height - baseline);
34714 }}}}
34715 if (useBaseline) {
34716 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34717 }var insets = target.getInsets ();
34718 dim.width += insets.left + insets.right + this.hgap * 2;
34719 dim.height += insets.top + insets.bottom + this.vgap * 2;
34720 return dim;
34721 }}, "java.awt.Container");
34722 Clazz_defineMethod (c$, "moveComponents", 
34723  function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) {
34724 switch (this.newAlign) {
34725 case 0:
34726 x += ltr ? 0 : width;
34727 break;
34728 case 1:
34729 x += Clazz_doubleToInt (width / 2);
34730 break;
34731 case 2:
34732 x += ltr ? width : 0;
34733 break;
34734 case 3:
34735 break;
34736 case 4:
34737 x += width;
34738 break;
34739 }
34740 var maxAscent = 0;
34741 var nonbaselineHeight = 0;
34742 var baselineOffset = 0;
34743 if (useBaseline) {
34744 var maxDescent = 0;
34745 for (var i = rowStart; i < rowEnd; i++) {
34746 var m = target.getComponent (i);
34747 if (m.visible) {
34748 if (ascent[i] >= 0) {
34749 maxAscent = Math.max (maxAscent, ascent[i]);
34750 maxDescent = Math.max (maxDescent, descent[i]);
34751 } else {
34752 nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight);
34753 }}}
34754 height = Math.max (maxAscent + maxDescent, nonbaselineHeight);
34755 baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2);
34756 }for (var i = rowStart; i < rowEnd; i++) {
34757 var m = target.getComponent (i);
34758 if (m.isVisible ()) {
34759 var cy;
34760 if (useBaseline && ascent[i] >= 0) {
34761 cy = y + baselineOffset + maxAscent - ascent[i];
34762 } else {
34763 cy = y + Clazz_doubleToInt ((height - m.height) / 2);
34764 }if (ltr) {
34765 m.setLocation (x, cy);
34766 } else {
34767 m.setLocation (target.width - x - m.width, cy);
34768 }x += m.width + this.hgap;
34769 }}
34770 return height;
34771 }, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A");
34772 Clazz_overrideMethod (c$, "layoutContainer", 
34773 function (target) {
34774 System.out.println ("FlowLayout laying out " + target);
34775 {
34776 var insets = target.getInsets ();
34777 var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2);
34778 var nmembers = target.getComponentCount ();
34779 var x = 0;
34780 var y = insets.top + this.vgap;
34781 var rowh = 0;
34782 var start = 0;
34783 var ltr = target.getComponentOrientation ().isLeftToRight ();
34784 var useBaseline = this.getAlignOnBaseline ();
34785 var ascent = null;
34786 var descent = null;
34787 if (useBaseline) {
34788 ascent =  Clazz_newIntArray (nmembers, 0);
34789 descent =  Clazz_newIntArray (nmembers, 0);
34790 }for (var i = 0; i < nmembers; i++) {
34791 var m = target.getComponent (i);
34792 if (m.isVisible ()) {
34793 var d = m.getPreferredSize ();
34794 m.setSize (d.width, d.height);
34795 if (useBaseline) {
34796 var baseline = m.getBaseline (d.width, d.height);
34797 if (baseline >= 0) {
34798 ascent[i] = baseline;
34799 descent[i] = d.height - baseline;
34800 } else {
34801 ascent[i] = -1;
34802 }}if ((x == 0) || ((x + d.width) <= maxwidth)) {
34803 if (x > 0) {
34804 x += this.hgap;
34805 }x += d.width;
34806 rowh = Math.max (rowh, d.height);
34807 } else {
34808 rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent);
34809 x = d.width;
34810 y += this.vgap + rowh;
34811 rowh = d.height;
34812 start = i;
34813 }}}
34814 this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent);
34815 }}, "java.awt.Container");
34816 Clazz_overrideMethod (c$, "toString", 
34817 function () {
34818 var str = "";
34819 switch (this.align) {
34820 case 0:
34821 str = ",align=left";
34822 break;
34823 case 1:
34824 str = ",align=center";
34825 break;
34826 case 2:
34827 str = ",align=right";
34828 break;
34829 case 3:
34830 str = ",align=leading";
34831 break;
34832 case 4:
34833 str = ",align=trailing";
34834 break;
34835 }
34836 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]";
34837 });
34838 Clazz_defineStatics (c$,
34839 "LEFT", 0,
34840 "CENTER", 1,
34841 "RIGHT", 2,
34842 "LEADING", 3,
34843 "TRAILING", 4);
34844 });
34845 Clazz_declarePackage ("java.awt");
34846 Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () {
34847 c$ = Clazz_decorateAsClass (function () {
34848 this.hgap = 0;
34849 this.vgap = 0;
34850 this.north = null;
34851 this.west = null;
34852 this.east = null;
34853 this.south = null;
34854 this.center = null;
34855 this.firstLine = null;
34856 this.lastLine = null;
34857 this.firstItem = null;
34858 this.lastItem = null;
34859 Clazz_instantialize (this, arguments);
34860 }, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]);
34861 Clazz_makeConstructor (c$, 
34862 function () {
34863 this.construct (0, 0);
34864 });
34865 Clazz_makeConstructor (c$, 
34866 function (hgap, vgap) {
34867 this.hgap = hgap;
34868 this.vgap = vgap;
34869 }, "~N,~N");
34870 Clazz_defineMethod (c$, "getHgap", 
34871 function () {
34872 return this.hgap;
34873 });
34874 Clazz_defineMethod (c$, "setHgap", 
34875 function (hgap) {
34876 this.hgap = hgap;
34877 }, "~N");
34878 Clazz_defineMethod (c$, "getVgap", 
34879 function () {
34880 return this.vgap;
34881 });
34882 Clazz_defineMethod (c$, "setVgap", 
34883 function (vgap) {
34884 this.vgap = vgap;
34885 }, "~N");
34886 Clazz_defineMethod (c$, "addLayoutComponent", 
34887 function (comp, constraints) {
34888 {
34889 if ((constraints == null) || (Clazz_instanceOf (constraints, String))) {
34890 this.addLayoutComponent (constraints, comp);
34891 } else {
34892 throw  new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)");
34893 }}}, "java.awt.Component,~O");
34894 Clazz_defineMethod (c$, "addLayoutComponent", 
34895 function (name, comp) {
34896 {
34897 if (name == null) {
34898 name = "Center";
34899 }System.out.println ("BorderLayout adding " + name + " " + comp);
34900 if ("Center".equals (name)) {
34901 this.center = comp;
34902 } else if ("North".equals (name)) {
34903 this.north = comp;
34904 } else if ("South".equals (name)) {
34905 this.south = comp;
34906 } else if ("East".equals (name)) {
34907 this.east = comp;
34908 } else if ("West".equals (name)) {
34909 this.west = comp;
34910 } else if ("First".equals (name)) {
34911 this.firstLine = comp;
34912 } else if ("Last".equals (name)) {
34913 this.lastLine = comp;
34914 } else if ("Before".equals (name)) {
34915 this.firstItem = comp;
34916 } else if ("After".equals (name)) {
34917 this.lastItem = comp;
34918 } else {
34919 throw  new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name);
34920 }}}, "~S,java.awt.Component");
34921 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34922 function (comp) {
34923 {
34924 if (comp === this.center) {
34925 this.center = null;
34926 } else if (comp === this.north) {
34927 this.north = null;
34928 } else if (comp === this.south) {
34929 this.south = null;
34930 } else if (comp === this.east) {
34931 this.east = null;
34932 } else if (comp === this.west) {
34933 this.west = null;
34934 }if (comp === this.firstLine) {
34935 this.firstLine = null;
34936 } else if (comp === this.lastLine) {
34937 this.lastLine = null;
34938 } else if (comp === this.firstItem) {
34939 this.firstItem = null;
34940 } else if (comp === this.lastItem) {
34941 this.lastItem = null;
34942 }}}, "java.awt.Component");
34943 Clazz_defineMethod (c$, "getLayoutComponent", 
34944 function (constraints) {
34945 if ("Center".equals (constraints)) {
34946 return this.center;
34947 } else if ("North".equals (constraints)) {
34948 return this.north;
34949 } else if ("South".equals (constraints)) {
34950 return this.south;
34951 } else if ("West".equals (constraints)) {
34952 return this.west;
34953 } else if ("East".equals (constraints)) {
34954 return this.east;
34955 } else if ("First".equals (constraints)) {
34956 return this.firstLine;
34957 } else if ("Last".equals (constraints)) {
34958 return this.lastLine;
34959 } else if ("Before".equals (constraints)) {
34960 return this.firstItem;
34961 } else if ("After".equals (constraints)) {
34962 return this.lastItem;
34963 } else {
34964 throw  new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints);
34965 }}, "~O");
34966 Clazz_defineMethod (c$, "getLayoutComponent", 
34967 function (target, constraints) {
34968 var ltr = target.getComponentOrientation ().isLeftToRight ();
34969 var result = null;
34970 if ("North".equals (constraints)) {
34971 result = (this.firstLine != null) ? this.firstLine : this.north;
34972 } else if ("South".equals (constraints)) {
34973 result = (this.lastLine != null) ? this.lastLine : this.south;
34974 } else if ("West".equals (constraints)) {
34975 result = ltr ? this.firstItem : this.lastItem;
34976 if (result == null) {
34977 result = this.west;
34978 }} else if ("East".equals (constraints)) {
34979 result = ltr ? this.lastItem : this.firstItem;
34980 if (result == null) {
34981 result = this.east;
34982 }} else if ("Center".equals (constraints)) {
34983 result = this.center;
34984 } else {
34985 throw  new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints);
34986 }return result;
34987 }, "java.awt.Container,~O");
34988 Clazz_defineMethod (c$, "getConstraints", 
34989 function (comp) {
34990 if (comp == null) {
34991 return null;
34992 }if (comp === this.center) {
34993 return "Center";
34994 } else if (comp === this.north) {
34995 return "North";
34996 } else if (comp === this.south) {
34997 return "South";
34998 } else if (comp === this.west) {
34999 return "West";
35000 } else if (comp === this.east) {
35001 return "East";
35002 } else if (comp === this.firstLine) {
35003 return "First";
35004 } else if (comp === this.lastLine) {
35005 return "Last";
35006 } else if (comp === this.firstItem) {
35007 return "Before";
35008 } else if (comp === this.lastItem) {
35009 return "After";
35010 }return null;
35011 }, "java.awt.Component");
35012 Clazz_overrideMethod (c$, "minimumLayoutSize", 
35013 function (target) {
35014 {
35015 var dim =  new java.awt.Dimension (0, 0);
35016 var ltr = target.getComponentOrientation ().isLeftToRight ();
35017 var c = null;
35018 if ((c = this.getChild ("East", ltr)) != null) {
35019 var d = c.getMinimumSize ();
35020 dim.width += d.width + this.hgap;
35021 dim.height = Math.max (d.height, dim.height);
35022 }if ((c = this.getChild ("West", ltr)) != null) {
35023 var d = c.getMinimumSize ();
35024 dim.width += d.width + this.hgap;
35025 dim.height = Math.max (d.height, dim.height);
35026 }if ((c = this.getChild ("Center", ltr)) != null) {
35027 var d = c.getMinimumSize ();
35028 dim.width += d.width;
35029 dim.height = Math.max (d.height, dim.height);
35030 }if ((c = this.getChild ("North", ltr)) != null) {
35031 var d = c.getMinimumSize ();
35032 dim.width = Math.max (d.width, dim.width);
35033 dim.height += d.height + this.vgap;
35034 }if ((c = this.getChild ("South", ltr)) != null) {
35035 var d = c.getMinimumSize ();
35036 dim.width = Math.max (d.width, dim.width);
35037 dim.height += d.height + this.vgap;
35038 }var insets = target.getInsets ();
35039 dim.width += insets.left + insets.right;
35040 dim.height += insets.top + insets.bottom;
35041 return dim;
35042 }}, "java.awt.Container");
35043 Clazz_overrideMethod (c$, "preferredLayoutSize", 
35044 function (target) {
35045 {
35046 var dim =  new java.awt.Dimension (0, 0);
35047 var ltr = target.getComponentOrientation ().isLeftToRight ();
35048 var c = null;
35049 if ((c = this.getChild ("East", ltr)) != null) {
35050 var d = c.getPreferredSize ();
35051 dim.width += d.width + this.hgap;
35052 dim.height = Math.max (d.height, dim.height);
35053 }if ((c = this.getChild ("West", ltr)) != null) {
35054 var d = c.getPreferredSize ();
35055 dim.width += d.width + this.hgap;
35056 dim.height = Math.max (d.height, dim.height);
35057 }if ((c = this.getChild ("Center", ltr)) != null) {
35058 var d = c.getPreferredSize ();
35059 dim.width += d.width;
35060 dim.height = Math.max (d.height, dim.height);
35061 }if ((c = this.getChild ("North", ltr)) != null) {
35062 var d = c.getPreferredSize ();
35063 dim.width = Math.max (d.width, dim.width);
35064 dim.height += d.height + this.vgap;
35065 }if ((c = this.getChild ("South", ltr)) != null) {
35066 var d = c.getPreferredSize ();
35067 dim.width = Math.max (d.width, dim.width);
35068 dim.height += d.height + this.vgap;
35069 }var insets = target.getInsets ();
35070 dim.width += insets.left + insets.right;
35071 dim.height += insets.top + insets.bottom;
35072 return dim;
35073 }}, "java.awt.Container");
35074 Clazz_overrideMethod (c$, "maximumLayoutSize", 
35075 function (target) {
35076 return  new java.awt.Dimension (2147483647, 2147483647);
35077 }, "java.awt.Container");
35078 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
35079 function (parent) {
35080 return 0.5;
35081 }, "java.awt.Container");
35082 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
35083 function (parent) {
35084 return 0.5;
35085 }, "java.awt.Container");
35086 Clazz_overrideMethod (c$, "invalidateLayout", 
35087 function (target) {
35088 }, "java.awt.Container");
35089 Clazz_overrideMethod (c$, "layoutContainer", 
35090 function (target) {
35091 System.out.println ("BorderLayout laying out " + target);
35092 {
35093 var insets = target.getInsets ();
35094 var top = insets.top;
35095 var bottom = target.height - insets.bottom;
35096 var left = insets.left;
35097 var right = target.width - insets.right;
35098 var ltr = target.getComponentOrientation ().isLeftToRight ();
35099 var c = null;
35100 if ((c = this.getChild ("North", ltr)) != null) {
35101 c.setSize (right - left, c.height);
35102 var d = c.getPreferredSize ();
35103 c.setBounds (left, top, right - left, d.height);
35104 top += d.height + this.vgap;
35105 }if ((c = this.getChild ("South", ltr)) != null) {
35106 c.setSize (right - left, c.height);
35107 var d = c.getPreferredSize ();
35108 c.setBounds (left, bottom - d.height, right - left, d.height);
35109 bottom -= d.height + this.vgap;
35110 }if ((c = this.getChild ("East", ltr)) != null) {
35111 c.setSize (c.width, bottom - top);
35112 var d = c.getPreferredSize ();
35113 c.setBounds (right - d.width, top, d.width, bottom - top);
35114 right -= d.width + this.hgap;
35115 }if ((c = this.getChild ("West", ltr)) != null) {
35116 c.setSize (c.width, bottom - top);
35117 var d = c.getPreferredSize ();
35118 c.setBounds (left, top, d.width, bottom - top);
35119 left += d.width + this.hgap;
35120 }if ((c = this.getChild ("Center", ltr)) != null) {
35121 c.setBounds (left, top, right - left, bottom - top);
35122 }}}, "java.awt.Container");
35123 Clazz_defineMethod (c$, "getChild", 
35124  function (key, ltr) {
35125 var result = null;
35126 if (key === "North") {
35127 result = (this.firstLine != null) ? this.firstLine : this.north;
35128 } else if (key === "South") {
35129 result = (this.lastLine != null) ? this.lastLine : this.south;
35130 } else if (key === "West") {
35131 result = ltr ? this.firstItem : this.lastItem;
35132 if (result == null) {
35133 result = this.west;
35134 }} else if (key === "East") {
35135 result = ltr ? this.lastItem : this.firstItem;
35136 if (result == null) {
35137 result = this.east;
35138 }} else if (key === "Center") {
35139 result = this.center;
35140 }if (result != null && !result.visible) {
35141 result = null;
35142 }return result;
35143 }, "~S,~B");
35144 Clazz_overrideMethod (c$, "toString", 
35145 function () {
35146 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]";
35147 });
35148 Clazz_defineStatics (c$,
35149 "NORTH", "North",
35150 "SOUTH", "South",
35151 "EAST", "East",
35152 "WEST", "West",
35153 "CENTER", "Center",
35154 "BEFORE_FIRST_LINE", "First",
35155 "AFTER_LAST_LINE", "Last",
35156 "BEFORE_LINE_BEGINS", "Before",
35157 "AFTER_LINE_ENDS", "After");
35158 c$.PAGE_START = c$.prototype.PAGE_START = "First";
35159 c$.PAGE_END = c$.prototype.PAGE_END = "Last";
35160 c$.LINE_START = c$.prototype.LINE_START = "Before";
35161 c$.LINE_END = c$.prototype.LINE_END = "After";
35162 });
35163 Clazz_declarePackage ("java.awt");
35164 Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () {
35165 Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager);
35166 });
35167 Clazz_declarePackage ("java.awt");
35168 Clazz_declareInterface (java.awt, "LayoutManager");
35169 Clazz_declarePackage ("java.awt");
35170 Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () {
35171 c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback);
35172 Clazz_pu$h(self.c$);
35173 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback);
35174 Clazz_makeConstructor (c$, 
35175  function () {
35176 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []);
35177 });
35178 Clazz_overrideMethod (c$, "run", 
35179 function (a, b) {
35180 a.paint (b);
35181 }, "java.awt.Component,java.awt.Graphics");
35182 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35183 function () {
35184 return java.awt.GraphicsCallback.PaintCallback.instance;
35185 });
35186 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintCallback ();
35187 c$ = Clazz_p0p ();
35188 Clazz_pu$h(self.c$);
35189 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback);
35190 Clazz_makeConstructor (c$, 
35191  function () {
35192 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []);
35193 });
35194 Clazz_overrideMethod (c$, "run", 
35195 function (a, b) {
35196 a.paintAll (b);
35197 }, "java.awt.Component,java.awt.Graphics");
35198 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35199 function () {
35200 return java.awt.GraphicsCallback.PaintAllCallback.instance;
35201 });
35202 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintAllCallback ();
35203 c$ = Clazz_p0p ();
35204 Clazz_pu$h(self.c$);
35205 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback);
35206 Clazz_makeConstructor (c$, 
35207  function () {
35208 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []);
35209 });
35210 Clazz_overrideMethod (c$, "run", 
35211 function (a, b) {
35212 if (a.isLightweight ()) {
35213 a.paintHeavyweightComponents (b);
35214 } else {
35215 a.paintAll (b);
35216 }}, "java.awt.Component,java.awt.Graphics");
35217 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35218 function () {
35219 return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance;
35220 });
35221 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback ();
35222 c$ = Clazz_p0p ();
35223 });
35224 Clazz_declarePackage ("java.awt");
35225 Clazz_load (["java.awt.Component", "java.awt.event.AWTEventListener"], ["java.awt.LightweightDispatcher", "$.Container"], ["java.lang.ArrayIndexOutOfBoundsException", "$.IllegalArgumentException", "$.IllegalStateException", "java.util.ArrayList", "java.awt.AWTEventMulticaster", "$.Dimension", "$.GraphicsCallback", "$.Insets", "$.LayoutManager2", "$.Toolkit", "java.awt.event.ContainerEvent", "$.ContainerListener", "$.MouseEvent", "$.MouseWheelEvent", "java.awt.peer.ContainerPeer", "$.LightweightPeer"], function () {
35226 c$ = Clazz_decorateAsClass (function () {
35227 this.component = null;
35228 this.layoutMgr = null;
35229 this.dispatcher = null;
35230 this.focusCycleRoot = false;
35231 this.focusTraversalPolicyProvider = false;
35232 this.containerListener = null;
35233 this.listeningChildren = 0;
35234 this.listeningBoundsChildren = 0;
35235 this.descendantsCount = 0;
35236 this.preserveBackgroundColor = null;
35237 this.numOfHWComponents = 0;
35238 this.numOfLWComponents = 0;
35239 this.modalComp = null;
35240 this.modalAppContext = null;
35241 Clazz_instantialize (this, arguments);
35242 }, java.awt, "Container", java.awt.Component);
35243 Clazz_makeConstructor (c$, 
35244 function () {
35245 Clazz_superConstructor (this, java.awt.Container, []);
35246 this.component =  new java.util.ArrayList ();
35247 });
35248 Clazz_defineMethod (c$, "initializeFocusTraversalKeys", 
35249 function () {
35250 });
35251 Clazz_defineMethod (c$, "getComponentCount", 
35252 function () {
35253 return this.countComponents ();
35254 });
35255 Clazz_defineMethod (c$, "countComponents", 
35256 function () {
35257 return this.component.size ();
35258 });
35259 Clazz_defineMethod (c$, "getComponent", 
35260 function (n) {
35261 if ((n < 0) || (n >= this.component.size ())) {
35262 throw  new ArrayIndexOutOfBoundsException ("No such child: " + n);
35263 }return this.component.get (n);
35264 }, "~N");
35265 Clazz_defineMethod (c$, "getComponents", 
35266 function () {
35267 return this.getComponents_NoClientCode ();
35268 });
35269 Clazz_defineMethod (c$, "getComponents_NoClientCode", 
35270 function () {
35271 return this.component.toArray (java.awt.Container.EMPTY_ARRAY);
35272 });
35273 Clazz_defineMethod (c$, "getInsets", 
35274 function () {
35275 var peer = this.peer;
35276 if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) {
35277 var cpeer = peer;
35278 return cpeer.getInsets ().clone ();
35279 }return  new java.awt.Insets (0, 0, 0, 0);
35280 });
35281 Clazz_defineMethod (c$, "add", 
35282 function (comp) {
35283 return this.addImpl (comp, null, -1);
35284 }, "java.awt.Component");
35285 Clazz_defineMethod (c$, "add", 
35286 function (name, comp) {
35287 return this.addImpl (comp, name, -1);
35288 }, "~S,java.awt.Component");
35289 Clazz_defineMethod (c$, "add", 
35290 function (comp, index) {
35291 return this.addImpl (comp, null, index);
35292 }, "java.awt.Component,~N");
35293 Clazz_defineMethod (c$, "checkAddToSelf", 
35294  function (comp) {
35295 if (Clazz_instanceOf (comp, java.awt.Container)) {
35296 for (var cn = this; cn != null; cn = cn.parent) {
35297 if (cn === comp) {
35298 throw  new IllegalArgumentException ("adding container's parent to itself");
35299 }}
35300 }}, "java.awt.Component");
35301 Clazz_defineMethod (c$, "checkNotAWindow", 
35302  function (comp) {
35303 if (Clazz_instanceOf (comp, java.awt.Window)) {
35304 throw  new IllegalArgumentException ("adding a window to a container");
35305 }}, "java.awt.Component");
35306 Clazz_defineMethod (c$, "removeDelicately", 
35307  function (comp, newParent, newIndex) {
35308 var index = this.getComponentZOrder (comp);
35309 var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent);
35310 if (needRemoveNotify) {
35311 comp.removeNotify ();
35312 }if (newParent !== this) {
35313 if (this.layoutMgr != null) {
35314 this.layoutMgr.removeLayoutComponent (comp);
35315 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35316 this.adjustListeningChildren (65536, -comp.numListening (65536));
35317 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35318 comp.parent = null;
35319 this.component.remove (index);
35320 this.invalidateIfValid ();
35321 } else {
35322 this.component.remove (index);
35323 this.component.add (newIndex, comp);
35324 }if (comp.parent == null) {
35325 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35326 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35327 this.dispatchEvent (e);
35328 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35329 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35330 this.updateCursorImmediately ();
35331 }}return needRemoveNotify;
35332 }, "java.awt.Component,java.awt.Container,~N");
35333 Clazz_defineMethod (c$, "canContainFocusOwner", 
35334 function (focusOwnerCandidate) {
35335 if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) {
35336 return false;
35337 }{
35338 if (this.parent != null) {
35339 return this.parent.canContainFocusOwner (focusOwnerCandidate);
35340 }}return true;
35341 }, "java.awt.Component");
35342 Clazz_defineMethod (c$, "hasHeavyweightDescendants", 
35343 function () {
35344 return this.numOfHWComponents > 0;
35345 });
35346 Clazz_defineMethod (c$, "hasLightweightDescendants", 
35347 function () {
35348 return this.numOfLWComponents > 0;
35349 });
35350 Clazz_defineMethod (c$, "getHeavyweightContainer", 
35351 function () {
35352 if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35353 return this;
35354 } else {
35355 return this.getNativeContainer ();
35356 }});
35357 c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", 
35358  function (comp, oldContainer, newContainer) {
35359 return false;
35360 }, "java.awt.Component,java.awt.Container,java.awt.Container");
35361 Clazz_defineMethod (c$, "setComponentZOrder", 
35362 function (comp, index) {
35363 {
35364 var curParent = comp.parent;
35365 var oldZindex = this.getComponentZOrder (comp);
35366 if (curParent === this && index == oldZindex) {
35367 return;
35368 }var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false;
35369 this.addDelicately (comp, curParent, index);
35370 if (!peerRecreated && oldZindex != -1) {
35371 comp.mixOnZOrderChanging (oldZindex, index);
35372 }}}, "java.awt.Component,~N");
35373 Clazz_defineMethod (c$, "reparentTraverse", 
35374  function (parentPeer, child) {
35375 this.checkTreeLock ();
35376 for (var i = 0; i < child.getComponentCount (); i++) {
35377 var comp = child.getComponent (i);
35378 if (comp.isLightweight ()) {
35379 if (Clazz_instanceOf (comp, java.awt.Container)) {
35380 this.reparentTraverse (parentPeer, comp);
35381 }} else {
35382 comp.getPeer ().reparent (parentPeer);
35383 }}
35384 }, "java.awt.peer.ContainerPeer,java.awt.Container");
35385 Clazz_defineMethod (c$, "reparentChild", 
35386  function (comp) {
35387 if (comp == null) {
35388 return;
35389 }if (comp.isLightweight ()) {
35390 if (Clazz_instanceOf (comp, java.awt.Container)) {
35391 this.reparentTraverse (this.getPeer (), comp);
35392 }} else {
35393 comp.getPeer ().reparent (this.getPeer ());
35394 }}, "java.awt.Component");
35395 Clazz_defineMethod (c$, "addDelicately", 
35396  function (comp, curParent, index) {
35397 this.checkTreeLock ();
35398 if (curParent !== this) {
35399 if (index == -1) {
35400 this.component.add (comp);
35401 } else {
35402 this.component.add (index, comp);
35403 }comp.parent = this;
35404 this.adjustListeningChildren (32768, comp.numListening (32768));
35405 this.adjustListeningChildren (65536, comp.numListening (65536));
35406 this.adjustDescendants (comp.countHierarchyMembers ());
35407 } else {
35408 if (index < this.component.size ()) {
35409 this.component.set (index, comp);
35410 }}this.invalidateIfValid ();
35411 if (this.peer != null) {
35412 if (comp.peer == null) {
35413 comp.addNotify ();
35414 } else {
35415 var newNativeContainer = this.getHeavyweightContainer ();
35416 var oldNativeContainer = curParent.getHeavyweightContainer ();
35417 if (oldNativeContainer !== newNativeContainer) {
35418 newNativeContainer.reparentChild (comp);
35419 }if (!comp.isLightweight () && this.isLightweight ()) {
35420 comp.relocateComponent ();
35421 }}}if (curParent !== this) {
35422 if (this.layoutMgr != null) {
35423 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35424 (this.layoutMgr).addLayoutComponent (comp, null);
35425 } else {
35426 this.layoutMgr.addLayoutComponent (null, comp);
35427 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35428 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35429 this.dispatchEvent (e);
35430 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35431 } else {
35432 comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768));
35433 }if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35434 this.updateCursorImmediately ();
35435 }}, "java.awt.Component,java.awt.Container,~N");
35436 Clazz_defineMethod (c$, "checkTreeLock", 
35437  function () {
35438 });
35439 Clazz_defineMethod (c$, "getComponentZOrder", 
35440 function (comp) {
35441 if (comp == null) {
35442 return -1;
35443 }{
35444 if (comp.parent !== this) {
35445 return -1;
35446 }return this.component.indexOf (comp);
35447 }}, "java.awt.Component");
35448 Clazz_defineMethod (c$, "add", 
35449 function (comp, constraints) {
35450 this.addImpl (comp, constraints, -1);
35451 }, "java.awt.Component,~O");
35452 Clazz_defineMethod (c$, "add", 
35453 function (comp, constraints, index) {
35454 return this.addImpl (comp, constraints, index);
35455 }, "java.awt.Component,~O,~N");
35456 Clazz_defineMethod (c$, "addImpl", 
35457 function (comp, constraints, index) {
35458 return this.addImplSAEM (comp, constraints, index);
35459 }, "java.awt.Component,~O,~N");
35460 Clazz_defineMethod (c$, "addImplSAEM", 
35461 function (comp, constraints, index) {
35462 {
35463 if (index > this.component.size () || (index < 0 && index != -1)) {
35464 throw  new IllegalArgumentException ("illegal component position");
35465 }this.checkAddToSelf (comp);
35466 this.checkNotAWindow (comp);
35467 if (comp.parent != null) {
35468 comp.parent.remove (comp);
35469 if (index > this.component.size ()) {
35470 throw  new IllegalArgumentException ("illegal component position");
35471 }}if (index == -1) {
35472 this.component.add (comp);
35473 } else {
35474 this.component.add (index, comp);
35475 }comp.parent = this;
35476 this.adjustListeningChildren (32768, comp.numListening (32768));
35477 this.adjustListeningChildren (65536, comp.numListening (65536));
35478 this.adjustDescendants (comp.countHierarchyMembers ());
35479 this.invalidateIfValid ();
35480 if (this.peer != null) {
35481 comp.addNotify ();
35482 }if (this.layoutMgr != null) {
35483 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35484 (this.layoutMgr).addLayoutComponent (comp, constraints);
35485 } else if (Clazz_instanceOf (constraints, String)) {
35486 this.layoutMgr.addLayoutComponent (constraints, comp);
35487 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35488 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35489 this.dispatchEvent (e);
35490 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35491 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35492 this.updateCursorImmediately ();
35493 }}return comp;
35494 }, "java.awt.Component,~O,~N");
35495 Clazz_defineMethod (c$, "checkGD", 
35496 function (stringID) {
35497 }, "~S");
35498 Clazz_defineMethod (c$, "remove", 
35499 function (index) {
35500 this.removeInt (index);
35501 }, "~N");
35502 Clazz_defineMethod (c$, "removeInt", 
35503 function (index) {
35504 {
35505 if (index < 0 || index >= this.component.size ()) {
35506 throw  new ArrayIndexOutOfBoundsException (index);
35507 }var comp = this.component.get (index);
35508 if (this.peer != null) {
35509 comp.removeNotify ();
35510 }if (this.layoutMgr != null) {
35511 this.layoutMgr.removeLayoutComponent (comp);
35512 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35513 this.adjustListeningChildren (65536, -comp.numListening (65536));
35514 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35515 comp.parent = null;
35516 this.component.remove (index);
35517 this.invalidateIfValid ();
35518 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35519 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35520 this.dispatchEvent (e);
35521 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35522 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35523 this.updateCursorImmediately ();
35524 }}}, "~N");
35525 Clazz_defineMethod (c$, "remove", 
35526 function (comp) {
35527 this.removeChild (comp);
35528 }, "java.awt.Component");
35529 Clazz_defineMethod (c$, "removeChild", 
35530 function (comp) {
35531 {
35532 if (comp.parent === this) {
35533 var index = this.component.indexOf (comp);
35534 if (index >= 0) {
35535 this.remove (index);
35536 }}}}, "java.awt.Component");
35537 Clazz_defineMethod (c$, "removeAll", 
35538 function () {
35539 {
35540 this.adjustListeningChildren (32768, -this.listeningChildren);
35541 this.adjustListeningChildren (65536, -this.listeningBoundsChildren);
35542 this.adjustDescendants (-this.descendantsCount);
35543 while (!this.component.isEmpty ()) {
35544 var comp = this.component.remove (this.component.size () - 1);
35545 if (this.peer != null) {
35546 comp.removeNotify ();
35547 }if (this.layoutMgr != null) {
35548 this.layoutMgr.removeLayoutComponent (comp);
35549 }comp.parent = null;
35550 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35551 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35552 this.dispatchEvent (e);
35553 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35554 }
35555 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35556 this.updateCursorImmediately ();
35557 }this.invalidateIfValid ();
35558 }});
35559 Clazz_defineMethod (c$, "numListening", 
35560 function (mask) {
35561 var superListening = this.numListeningMask (mask);
35562 if (mask == 32768) {
35563 return this.listeningChildren + superListening;
35564 } else if (mask == 65536) {
35565 return this.listeningBoundsChildren + superListening;
35566 } else {
35567 return superListening;
35568 }}, "~N");
35569 Clazz_defineMethod (c$, "adjustListeningChildren", 
35570 function (mask, num) {
35571 if (num == 0) return;
35572 if ((mask & 32768) != 0) {
35573 this.listeningChildren += num;
35574 }if ((mask & 65536) != 0) {
35575 this.listeningBoundsChildren += num;
35576 }this.adjustListeningChildrenOnParent (mask, num);
35577 }, "~N,~N");
35578 Clazz_defineMethod (c$, "adjustDescendants", 
35579 function (num) {
35580 if (num == 0) return;
35581 this.descendantsCount += num;
35582 this.adjustDecendantsOnParent (num);
35583 }, "~N");
35584 Clazz_defineMethod (c$, "adjustDecendantsOnParent", 
35585 function (num) {
35586 if (this.parent != null) {
35587 this.parent.adjustDescendants (num);
35588 }}, "~N");
35589 Clazz_defineMethod (c$, "countHierarchyMembers", 
35590 function () {
35591 return this.descendantsCount + 1;
35592 });
35593 Clazz_defineMethod (c$, "getListenersCount", 
35594  function (id, enabledOnToolkit) {
35595 if (enabledOnToolkit) {
35596 return this.descendantsCount;
35597 }switch (id) {
35598 case 1400:
35599 return this.listeningChildren;
35600 case 1401:
35601 case 1402:
35602 return this.listeningBoundsChildren;
35603 default:
35604 return 0;
35605 }
35606 }, "~N,~B");
35607 Clazz_defineMethod (c$, "createHierarchyEvents", 
35608 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
35609 var listeners = this.getListenersCount (id, enabledOnToolkit);
35610 for (var count = listeners, i = 0; count > 0; i++) {
35611 count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit);
35612 }
35613 return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
35614 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
35615 Clazz_defineMethod (c$, "createChildHierarchyEvents", 
35616 function (id, changeFlags, enabledOnToolkit) {
35617 if (this.component.isEmpty ()) {
35618 return;
35619 }var listeners = this.getListenersCount (id, enabledOnToolkit);
35620 for (var count = listeners, i = 0; count > 0; i++) {
35621 count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit);
35622 }
35623 }, "~N,~N,~B");
35624 Clazz_defineMethod (c$, "getLayout", 
35625 function () {
35626 return this.layoutMgr;
35627 });
35628 Clazz_defineMethod (c$, "setLayout", 
35629 function (mgr) {
35630 this.layoutMgr = mgr;
35631 this.invalidateIfValid ();
35632 }, "java.awt.LayoutManager");
35633 Clazz_overrideMethod (c$, "doLayout", 
35634 function () {
35635 this.layout ();
35636 });
35637 Clazz_overrideMethod (c$, "layout", 
35638 function () {
35639 var layoutMgr = this.layoutMgr;
35640 if (layoutMgr != null) {
35641 layoutMgr.layoutContainer (this);
35642 }});
35643 Clazz_overrideMethod (c$, "invalidate", 
35644 function () {
35645 var layoutMgr = this.layoutMgr;
35646 if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) {
35647 var lm = layoutMgr;
35648 lm.invalidateLayout (this);
35649 }this.invalidateComp ();
35650 });
35651 Clazz_overrideMethod (c$, "validate", 
35652 function () {
35653 if (!this.isValid ()) {
35654 var updateCur = false;
35655 {
35656 if (!this.isValid () && this.peer != null) {
35657 var p = null;
35658 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35659 p = this.peer;
35660 }if (p != null) {
35661 p.beginValidate ();
35662 }this.validateTree ();
35663 if (p != null) {
35664 p.endValidate ();
35665 updateCur = this.isVisible ();
35666 }}}if (updateCur) {
35667 this.updateCursorImmediately ();
35668 }}});
35669 Clazz_defineMethod (c$, "validateTree", 
35670 function () {
35671 if (!this.isValid ()) {
35672 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35673 (this.peer).beginLayout ();
35674 }this.doLayout ();
35675 for (var i = 0; i < this.component.size (); i++) {
35676 var comp = this.component.get (i);
35677 if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) {
35678 (comp).validateTree ();
35679 } else {
35680 comp.validate ();
35681 }}
35682 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35683 (this.peer).endLayout ();
35684 }}this.validateComponent ();
35685 });
35686 Clazz_defineMethod (c$, "invalidateTree", 
35687 function () {
35688 {
35689 for (var i = 0; i < this.component.size (); i++) {
35690 var comp = this.component.get (i);
35691 if (Clazz_instanceOf (comp, java.awt.Container)) {
35692 (comp).invalidateTree ();
35693 } else {
35694 comp.invalidateIfValid ();
35695 }}
35696 this.invalidateIfValid ();
35697 }});
35698 Clazz_overrideMethod (c$, "setFont", 
35699 function (f) {
35700 var oldfont = this.getFont ();
35701 this.setFontComp (f);
35702 var newfont = this.getFont ();
35703 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
35704 this.invalidateTree ();
35705 }}, "java.awt.Font");
35706 Clazz_overrideMethod (c$, "getPreferredSize", 
35707 function () {
35708 return this.preferredSize ();
35709 });
35710 Clazz_overrideMethod (c$, "preferredSize", 
35711 function () {
35712 var dim = this.prefSize;
35713 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
35714 {
35715 this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp ();
35716 dim = this.prefSize;
35717 }}return (dim == null ? null :  new java.awt.Dimension (dim));
35718 });
35719 Clazz_overrideMethod (c$, "getMinimumSize", 
35720 function () {
35721 var dim = this.minSize;
35722 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
35723 {
35724 this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize ();
35725 dim = this.minSize;
35726 }}if (dim != null) {
35727 return  new java.awt.Dimension (dim);
35728 } else {
35729 return dim;
35730 }});
35731 Clazz_overrideMethod (c$, "getMaximumSize", 
35732 function () {
35733 var dim = this.maxSize;
35734 if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) {
35735 {
35736 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35737 var lm = this.layoutMgr;
35738 this.maxSize = lm.maximumLayoutSize (this);
35739 } else {
35740 this.maxSize = this.getMaxSizeComp ();
35741 }dim = this.maxSize;
35742 }}if (dim != null) {
35743 return  new java.awt.Dimension (dim);
35744 } else {
35745 return dim;
35746 }});
35747 Clazz_overrideMethod (c$, "getAlignmentX", 
35748 function () {
35749 var xAlign;
35750 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35751 {
35752 var lm = this.layoutMgr;
35753 xAlign = lm.getLayoutAlignmentX (this);
35754 }} else {
35755 xAlign = this.getAlignmentXComp ();
35756 }return xAlign;
35757 });
35758 Clazz_overrideMethod (c$, "getAlignmentY", 
35759 function () {
35760 var yAlign;
35761 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35762 {
35763 var lm = this.layoutMgr;
35764 yAlign = lm.getLayoutAlignmentY (this);
35765 }} else {
35766 yAlign = this.getAlignmentYComp ();
35767 }return yAlign;
35768 });
35769 Clazz_overrideMethod (c$, "paint", 
35770 function (g) {
35771 java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2);
35772 }, "java.awt.Graphics");
35773 Clazz_overrideMethod (c$, "update", 
35774 function (g) {
35775 if (this.isShowing ()) {
35776 g.clearRect (0, 0, this.width, this.height);
35777 this.paint (g);
35778 }}, "java.awt.Graphics");
35779 Clazz_defineMethod (c$, "paintComponents", 
35780 function (g) {
35781 if (this.isShowing ()) {
35782 java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4);
35783 }}, "java.awt.Graphics");
35784 Clazz_overrideMethod (c$, "lightweightPaint", 
35785 function (g) {
35786 this.lwPaintComp (g);
35787 this.paintHeavyweightComponents (g);
35788 }, "java.awt.Graphics");
35789 Clazz_overrideMethod (c$, "paintHeavyweightComponents", 
35790 function (g) {
35791 if (this.isShowing ()) {
35792 java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3);
35793 }}, "java.awt.Graphics");
35794 Clazz_defineMethod (c$, "addContainerListener", 
35795 function (l) {
35796 if (l == null) {
35797 return;
35798 }this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l);
35799 this.newEventsOnly = true;
35800 }, "java.awt.event.ContainerListener");
35801 Clazz_defineMethod (c$, "removeContainerListener", 
35802 function (l) {
35803 if (l == null) {
35804 return;
35805 }this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l);
35806 }, "java.awt.event.ContainerListener");
35807 Clazz_defineMethod (c$, "getContainerListeners", 
35808 function () {
35809 return (this.getListeners (java.awt.event.ContainerListener));
35810 });
35811 Clazz_overrideMethod (c$, "getListeners", 
35812 function (listenerType) {
35813 var l = null;
35814 if (listenerType === java.awt.event.ContainerListener) {
35815 l = this.containerListener;
35816 } else {
35817 return this.getListenersComp (listenerType);
35818 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
35819 }, "Class");
35820 Clazz_overrideMethod (c$, "eventEnabled", 
35821 function (e) {
35822 var id = e.getID ();
35823 if (id == 300 || id == 301) {
35824 if ((this.eventMask & 2) != 0 || this.containerListener != null) {
35825 return true;
35826 }return false;
35827 }return this.eventTypeEnabled (e.id);
35828 }, "java.awt.AWTEvent");
35829 Clazz_overrideMethod (c$, "processEvent", 
35830 function (e) {
35831 this.processEventCont (e);
35832 }, "java.awt.AWTEvent");
35833 Clazz_defineMethod (c$, "processEventCont", 
35834 function (e) {
35835 if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) {
35836 this.processContainerEvent (e);
35837 return;
35838 }this.processEventComp (e);
35839 }, "java.awt.AWTEvent");
35840 Clazz_defineMethod (c$, "processContainerEvent", 
35841 function (e) {
35842 var listener = this.containerListener;
35843 if (listener != null) {
35844 switch (e.getID ()) {
35845 case 300:
35846 listener.componentAdded (e);
35847 break;
35848 case 301:
35849 listener.componentRemoved (e);
35850 break;
35851 }
35852 }}, "java.awt.event.ContainerEvent");
35853 Clazz_overrideMethod (c$, "dispatchEventImpl", 
35854 function (e) {
35855 if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) {
35856 e.consume ();
35857 if (this.peer != null) {
35858 this.peer.handleEvent (e);
35859 }return;
35860 }this.dispatchEventImplComp (e);
35861 {
35862 switch (e.getID ()) {
35863 case 101:
35864 break;
35865 case 100:
35866 break;
35867 default:
35868 break;
35869 }
35870 }}, "java.awt.AWTEvent");
35871 Clazz_defineMethod (c$, "dispatchEventToSelf", 
35872 function (e) {
35873 this.dispatchEventImplComp (e);
35874 }, "java.awt.AWTEvent");
35875 Clazz_defineMethod (c$, "getMouseEventTarget", 
35876  function (x, y, includeSelf, filter, searchHeavyweights) {
35877 {
35878 if (arguments.length == 3) {
35879 filter = java.awt.Container.MouseEventTargetFilter.FILTER;
35880 searchHeavyWeights = false;
35881 }
35882 }var comp = null;
35883 if (comp == null || comp === this) {
35884 comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights);
35885 }return comp;
35886 }, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B");
35887 Clazz_defineMethod (c$, "getMouseEventTargetImpl", 
35888  function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) {
35889 {
35890 for (var i = 0; i < this.component.size (); i++) {
35891 var comp = this.component.get (i);
35892 if (comp != null && comp.visible && ((!searchHeavyweightChildren && Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer)) || (searchHeavyweightChildren && !(Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer)))) && comp.contains (x - comp.x, y - comp.y)) {
35893 if (Clazz_instanceOf (comp, java.awt.Container)) {
35894 var child = comp;
35895 var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants);
35896 if (deeper != null) {
35897 return deeper;
35898 }} else {
35899 if (filter.accept (comp)) {
35900 return comp;
35901 }}}}
35902 var isPeerOK;
35903 var isMouseOverMe;
35904 isPeerOK = includeSelf;
35905 isMouseOverMe = this.contains (x, y);
35906 if (isMouseOverMe && isPeerOK && filter.accept (this)) {
35907 return this;
35908 }return null;
35909 }}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B");
35910 Clazz_defineMethod (c$, "proxyEnableEvents", 
35911 function (events) {
35912 if (this.parent != null) {
35913 this.parent.proxyEnableEvents (events);
35914 }if (this.dispatcher != null) {
35915 this.dispatcher.enableEvents (events);
35916 }}, "~N");
35917 Clazz_defineMethod (c$, "deliverEvent", 
35918 function (e) {
35919 var comp = this.getComponentAt (e.x, e.y);
35920 if ((comp != null) && (comp !== this)) {
35921 e.translate (-comp.x, -comp.y);
35922 comp.deliverEvent (e);
35923 } else {
35924 this.postEvent (e);
35925 }}, "java.awt.Event");
35926 Clazz_defineMethod (c$, "getComponentAt", 
35927 function (x, y) {
35928 return this.locate (x, y);
35929 }, "~N,~N");
35930 Clazz_overrideMethod (c$, "locate", 
35931 function (x, y) {
35932 return this;
35933 }, "~N,~N");
35934 Clazz_defineMethod (c$, "getComponentAt", 
35935 function (p) {
35936 return this.getComponentAt (p.x, p.y);
35937 }, "java.awt.Point");
35938 Clazz_defineMethod (c$, "getMousePosition", 
35939 function (allowChildren) {
35940 return null;
35941 }, "~B");
35942 Clazz_overrideMethod (c$, "isSameOrAncestorOf", 
35943 function (comp, allowChildren) {
35944 return this === comp || (allowChildren && this.isParentOf (comp));
35945 }, "java.awt.Component,~B");
35946 Clazz_defineMethod (c$, "findComponentAt", 
35947 function (x, y) {
35948 {
35949 return this.findComponentAt (x, y, true);
35950 }}, "~N,~N");
35951 Clazz_defineMethod (c$, "findComponentAt", 
35952 function (x, y, ignoreEnabled) {
35953 return null;
35954 }, "~N,~N,~B");
35955 Clazz_defineMethod (c$, "findComponentAt", 
35956 function (p) {
35957 return this.findComponentAt (p.x, p.y);
35958 }, "java.awt.Point");
35959 Clazz_defineMethod (c$, "addNotify", 
35960 function () {
35961 {
35962 this.addNotifyComp ();
35963 if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35964 this.setDispatcher ();
35965 }for (var i = 0; i < this.component.size (); i++) {
35966 this.component.get (i).addNotify ();
35967 }
35968 }});
35969 Clazz_defineMethod (c$, "setDispatcher", 
35970 function () {
35971 this.dispatcher =  new java.awt.LightweightDispatcher (this);
35972 });
35973 Clazz_defineMethod (c$, "removeNotify", 
35974 function () {
35975 for (var i = this.component.size () - 1; i >= 0; i--) {
35976 var comp = this.component.get (i);
35977 if (comp != null) {
35978 comp.setAutoFocusTransferOnDisposal (false);
35979 comp.removeNotify ();
35980 comp.setAutoFocusTransferOnDisposal (true);
35981 }}
35982 if (this.dispatcher != null) {
35983 this.dispatcher.dispose ();
35984 this.dispatcher = null;
35985 }this.removeNotifyComp ();
35986 });
35987 Clazz_defineMethod (c$, "isAncestorOf", 
35988 function (c) {
35989 var p;
35990 if (c == null || ((p = c.getParent ()) == null)) {
35991 return false;
35992 }while (p != null) {
35993 if (p === this) {
35994 return true;
35995 }p = p.getParent ();
35996 }
35997 return false;
35998 }, "java.awt.Component");
35999 Clazz_overrideMethod (c$, "paramString", 
36000 function () {
36001 var str = this.paramStringComp ();
36002 var layoutMgr = this.layoutMgr;
36003 if (layoutMgr != null) {
36004 str += ",layout=" + layoutMgr.getClass ().getName ();
36005 }return str;
36006 });
36007 Clazz_defineMethod (c$, "setFocusTraversalKeys", 
36008 function (id, keystrokes) {
36009 }, "~N,java.util.Set");
36010 Clazz_defineMethod (c$, "getFocusTraversalKeys", 
36011 function (id) {
36012 return null;
36013 }, "~N");
36014 Clazz_defineMethod (c$, "areFocusTraversalKeysSet", 
36015 function (id) {
36016 return false;
36017 }, "~N");
36018 Clazz_defineMethod (c$, "isFocusCycleRoot", 
36019 function (container) {
36020 if (this.isFocusCycleRoot () && container === this) {
36021 return true;
36022 } else {
36023 return this.isFocusCycleRootComp (container);
36024 }}, "java.awt.Container");
36025 Clazz_overrideMethod (c$, "containsFocus", 
36026 function () {
36027 return false;
36028 });
36029 Clazz_defineMethod (c$, "isParentOf", 
36030  function (comp) {
36031 {
36032 while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) {
36033 comp = comp.getParent ();
36034 }
36035 return (comp === this);
36036 }}, "java.awt.Component");
36037 Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", 
36038 function () {
36039 });
36040 Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36041 function () {
36042 });
36043 Clazz_defineMethod (c$, "getTraversalRoot", 
36044 function () {
36045 return null;
36046 });
36047 Clazz_defineMethod (c$, "isFocusCycleRoot", 
36048 function () {
36049 return this.focusCycleRoot;
36050 });
36051 Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", 
36052 function (provider) {
36053 var oldProvider;
36054 {
36055 oldProvider = this.focusTraversalPolicyProvider;
36056 this.focusTraversalPolicyProvider = provider;
36057 }this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider);
36058 }, "~B");
36059 Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", 
36060 function () {
36061 return this.focusTraversalPolicyProvider;
36062 });
36063 Clazz_defineMethod (c$, "transferFocusDownCycle", 
36064 function () {
36065 });
36066 Clazz_defineMethod (c$, "preProcessKeyEvent", 
36067 function (e) {
36068 var parent = this.parent;
36069 if (parent != null) {
36070 parent.preProcessKeyEvent (e);
36071 }}, "java.awt.event.KeyEvent");
36072 Clazz_defineMethod (c$, "postProcessKeyEvent", 
36073 function (e) {
36074 var parent = this.parent;
36075 if (parent != null) {
36076 parent.postProcessKeyEvent (e);
36077 }}, "java.awt.event.KeyEvent");
36078 Clazz_overrideMethod (c$, "postsOldMouseEvents", 
36079 function () {
36080 return true;
36081 });
36082 Clazz_defineMethod (c$, "applyComponentOrientation", 
36083 function (o) {
36084 this.applyCompOrientComp (o);
36085 {
36086 for (var i = 0; i < this.component.size (); i++) {
36087 var comp = this.component.get (i);
36088 comp.applyComponentOrientation (o);
36089 }
36090 }}, "java.awt.ComponentOrientation");
36091 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36092 function (listener) {
36093 this.addPropChangeListenerComp (listener);
36094 }, "java.beans.PropertyChangeListener");
36095 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36096 function (propertyName, listener) {
36097 this.addPropChangeListComp (propertyName, listener);
36098 }, "~S,java.beans.PropertyChangeListener");
36099 Clazz_defineMethod (c$, "increaseComponentCount", 
36100 function (c) {
36101 if (!c.isDisplayable ()) {
36102 throw  new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method");
36103 }var addHW = 0;
36104 var addLW = 0;
36105 if (Clazz_instanceOf (c, java.awt.Container)) {
36106 addLW = (c).numOfLWComponents;
36107 addHW = (c).numOfHWComponents;
36108 }if (c.isLightweight ()) {
36109 addLW++;
36110 } else {
36111 addHW++;
36112 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36113 cont.numOfLWComponents += addLW;
36114 cont.numOfHWComponents += addHW;
36115 }
36116 }, "java.awt.Component");
36117 Clazz_defineMethod (c$, "decreaseComponentCount", 
36118 function (c) {
36119 if (!c.isDisplayable ()) {
36120 throw  new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method");
36121 }var subHW = 0;
36122 var subLW = 0;
36123 if (Clazz_instanceOf (c, java.awt.Container)) {
36124 subLW = (c).numOfLWComponents;
36125 subHW = (c).numOfHWComponents;
36126 }if (c.isLightweight ()) {
36127 subLW++;
36128 } else {
36129 subHW++;
36130 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36131 cont.numOfLWComponents -= subLW;
36132 cont.numOfHWComponents -= subHW;
36133 }
36134 }, "java.awt.Component");
36135 Clazz_declareInterface (java.awt.Container, "EventTargetFilter");
36136 Clazz_pu$h(self.c$);
36137 c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter);
36138 Clazz_makeConstructor (c$, 
36139  function () {
36140 });
36141 Clazz_overrideMethod (c$, "accept", 
36142 function (a) {
36143 return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null;
36144 }, "java.awt.Component");
36145 c$.FILTER = c$.prototype.FILTER =  new java.awt.Container.MouseEventTargetFilter ();
36146 c$ = Clazz_p0p ();
36147 c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY =  new Array (0);
36148 Clazz_defineStatics (c$,
36149 "INCLUDE_SELF", true,
36150 "SEARCH_HEAVYWEIGHTS", true);
36151 c$ = Clazz_decorateAsClass (function () {
36152 this.nativeContainer = null;
36153 this.mouseEventTarget = null;
36154 this.targetLastEntered = null;
36155 this.isMouseInNativeContainer = false;
36156 this.eventMask = 0;
36157 Clazz_instantialize (this, arguments);
36158 }, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener);
36159 Clazz_makeConstructor (c$, 
36160 function (nativeContainer) {
36161 this.nativeContainer = nativeContainer;
36162 this.mouseEventTarget = null;
36163 this.eventMask = 0;
36164 }, "java.awt.Container");
36165 Clazz_defineMethod (c$, "dispose", 
36166 function () {
36167 this.stopListeningForOtherDrags ();
36168 this.mouseEventTarget = null;
36169 });
36170 Clazz_defineMethod (c$, "enableEvents", 
36171 function (events) {
36172 this.eventMask |= events;
36173 }, "~N");
36174 Clazz_defineMethod (c$, "dispatchEvent", 
36175 function (e) {
36176 var ret = false;
36177 if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) {
36178 var me = e;
36179 ret = this.processMouseEvent (me);
36180 }return ret;
36181 }, "java.awt.AWTEvent");
36182 Clazz_defineMethod (c$, "isMouseGrab", 
36183  function (e) {
36184 var modifiers = e.getModifiersEx ();
36185 if (e.getID () == 501 || e.getID () == 502) {
36186 switch (e.getButton ()) {
36187 case 1:
36188 modifiers ^= 1024;
36189 break;
36190 case 2:
36191 modifiers ^= 2048;
36192 break;
36193 case 3:
36194 modifiers ^= 4096;
36195 break;
36196 }
36197 }return ((modifiers & (7168)) != 0);
36198 }, "java.awt.event.MouseEvent");
36199 Clazz_defineMethod (c$, "processMouseEvent", 
36200  function (e) {
36201 var id = e.getID ();
36202 var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true);
36203 this.trackMouseEnterExit (mouseOver, e);
36204 if (!this.isMouseGrab (e) && id != 500) {
36205 this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null;
36206 }if (this.mouseEventTarget != null) {
36207 switch (id) {
36208 case 504:
36209 case 505:
36210 break;
36211 case 501:
36212 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36213 break;
36214 case 502:
36215 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36216 break;
36217 case 500:
36218 if (mouseOver === this.mouseEventTarget) {
36219 this.retargetMouseEvent (mouseOver, id, e);
36220 }break;
36221 case 503:
36222 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36223 break;
36224 case 506:
36225 if (this.isMouseGrab (e)) {
36226 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36227 }break;
36228 case 507:
36229 this.retargetMouseEvent (mouseOver, id, e);
36230 break;
36231 }
36232 e.consume ();
36233 }return e.isConsumed ();
36234 }, "java.awt.event.MouseEvent");
36235 Clazz_defineMethod (c$, "trackMouseEnterExit", 
36236  function (targetOver, e) {
36237 var targetEnter = null;
36238 var id = e.getID ();
36239 if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) {
36240 this.isMouseInNativeContainer = true;
36241 this.startListeningForOtherDrags ();
36242 } else if (id == 505) {
36243 this.isMouseInNativeContainer = false;
36244 this.stopListeningForOtherDrags ();
36245 }if (this.isMouseInNativeContainer) {
36246 targetEnter = targetOver;
36247 }if (this.targetLastEntered === targetEnter) {
36248 return;
36249 }if (this.targetLastEntered != null) {
36250 this.retargetMouseEvent (this.targetLastEntered, 505, e);
36251 }if (id == 505) {
36252 e.consume ();
36253 }if (targetEnter != null) {
36254 this.retargetMouseEvent (targetEnter, 504, e);
36255 }if (id == 504) {
36256 e.consume ();
36257 }this.targetLastEntered = targetEnter;
36258 }, "java.awt.Component,java.awt.event.MouseEvent");
36259 Clazz_defineMethod (c$, "startListeningForOtherDrags", 
36260  function () {
36261 });
36262 Clazz_defineMethod (c$, "stopListeningForOtherDrags", 
36263  function () {
36264 });
36265 Clazz_overrideMethod (c$, "eventDispatched", 
36266 function (e) {
36267 var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer);
36268 if (!isForeignDrag) {
36269 return;
36270 }var srcEvent = e;
36271 var me;
36272 {
36273 var srcComponent = srcEvent.getComponent ();
36274 if (!srcComponent.isShowing ()) {
36275 return;
36276 }var c = this.nativeContainer;
36277 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
36278 c = c.getParent_NoClientCode ();
36279 }
36280 if ((c == null) || (c).isModalBlocked ()) {
36281 return;
36282 }me =  new java.awt.event.MouseEvent (this.nativeContainer, 1500, srcEvent.getWhen (), srcEvent.getModifiersEx () | srcEvent.getModifiers (), srcEvent.getX (), srcEvent.getY (), srcEvent.getXOnScreen (), srcEvent.getYOnScreen (), srcEvent.getClickCount (), srcEvent.isPopupTrigger (), srcEvent.getButton ());
36283 (srcEvent).copyPrivateDataInto (me);
36284 }var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true);
36285 this.trackMouseEnterExit (targetOver, me);
36286 }, "java.awt.AWTEvent");
36287 Clazz_defineMethod (c$, "retargetMouseEvent", 
36288 function (target, id, e) {
36289 if (target == null) {
36290 return;
36291 }var x = e.getX ();
36292 var y = e.getY ();
36293 var component;
36294 for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) {
36295 x -= component.x;
36296 y -= component.y;
36297 }
36298 var retargeted;
36299 if (component != null) {
36300 if (id == 507) {
36301 retargeted =  new java.awt.event.MouseWheelEvent (target, id, e.getWhen (), e.getModifiersEx () | e.getModifiers (), x, y, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), (e).getScrollType (), (e).getScrollAmount (), (e).getWheelRotation ());
36302 } else {
36303 retargeted =  new java.awt.event.MouseEvent (target, id, e.getWhen (), e.getModifiersEx () | e.getModifiers (), x, y, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), e.getButton ());
36304 }(e).copyPrivateDataInto (retargeted);
36305 if (target === this.nativeContainer) {
36306 (target).dispatchEventToSelf (retargeted);
36307 } else {
36308 if (this.nativeContainer.modalComp != null) {
36309 if ((this.nativeContainer.modalComp).isAncestorOf (target)) {
36310 target.dispatchEvent (retargeted);
36311 } else {
36312 e.consume ();
36313 }} else {
36314 target.dispatchEvent (retargeted);
36315 }}}}, "java.awt.Component,~N,java.awt.event.MouseEvent");
36316 Clazz_defineStatics (c$,
36317 "LWD_MOUSE_DRAGGED_OVER", 1500,
36318 "MOUSE_MASK", 131120);
36319 });
36320 Clazz_declarePackage ("java.awt");
36321 Clazz_load (["java.lang.Enum", "java.awt.image.ImageObserver", "java.util.HashMap", "java.awt.ComponentOrientation"], "java.awt.Component", ["java.lang.Boolean", "$.Character", "$.Double", "$.Float", "$.IllegalArgumentException", "$.Long", "$.NullPointerException", "$.Short", "$.Thread", "java.awt.AWTEventMulticaster", "$.Cursor", "$.Dimension", "$.EventQueue", "$.IllegalComponentStateException", "$.Point", "$.Rectangle", "$.Toolkit", "java.awt.event.ComponentEvent", "$.ComponentListener", "$.FocusEvent", "$.FocusListener", "$.HierarchyBoundsListener", "$.HierarchyEvent", "$.HierarchyListener", "$.InputEvent", "$.InputMethodEvent", "$.InputMethodListener", "$.KeyEvent", "$.KeyListener", "$.MouseEvent", "$.MouseListener", "$.MouseMotionListener", "$.MouseWheelEvent", "$.MouseWheelListener", "$.PaintEvent", "java.awt.peer.LightweightPeer", "java.beans.PropertyChangeListener", "$.PropertyChangeSupport", "jssun.awt.AppContext", "$.SunToolkit", "jssun.font.FontDesignMetrics", "swingjs.JSToolkit"], function () {
36322 c$ = Clazz_decorateAsClass (function () {
36323 this.threadGroup = null;
36324 this.myThread = null;
36325 this.peer = null;
36326 this.parent = null;
36327 this.appContext = null;
36328 this.x = 0;
36329 this.y = 0;
36330 this.width = 0;
36331 this.height = 0;
36332 this.foreground = null;
36333 this.background = null;
36334 this.font = null;
36335 this.peerFont = null;
36336 this.cursor = null;
36337 this.locale = null;
36338 this.visible = true;
36339 this.enabled = true;
36340 this.valid = false;
36341 this.popups = null;
36342 this.name = null;
36343 this.nameExplicitlySet = false;
36344 this.focusable = true;
36345 this.$isFocusTraversableOverridden = 0;
36346 this.focusTraversalKeysEnabled = false;
36347 this.minSize = null;
36348 this.minSizeSet = false;
36349 this.prefSize = null;
36350 this.prefSizeSet = false;
36351 this.maxSize = null;
36352 this.maxSizeSet = false;
36353 this.componentOrientation = null;
36354 this.newEventsOnly = false;
36355 this.componentListener = null;
36356 this.focusListener = null;
36357 this.hierarchyListener = null;
36358 this.hierarchyBoundsListener = null;
36359 this.keyListener = null;
36360 this.mouseListener = null;
36361 this.mouseMotionListener = null;
36362 this.mouseWheelListener = null;
36363 this.inputMethodListener = null;
36364 this.windowClosingException = null;
36365 this.eventMask = 4096;
36366 this.changeSupport = null;
36367 this.changeSupportLock = null;
36368 this.isPacked = false;
36369 this.boundsOp = 3;
36370 this.isAddNotifyComplete = false;
36371 this.backgroundEraseDisabled = false;
36372 this.htmlName = null;
36373 this.num = 0;
36374 this.graphicsConfig = null;
36375 this.eventCache = null;
36376 this.coalescingEnabled = false;
36377 this.autoFocusTransferOnDisposal = true;
36378 Clazz_instantialize (this, arguments);
36379 }, java.awt, "Component", null, java.awt.image.ImageObserver);
36380 Clazz_prepareFields (c$, function () {
36381 this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN;
36382 this.changeSupportLock =  new Clazz._O ();
36383 this.coalescingEnabled = this.checkCoalescing ();
36384 });
36385 Clazz_defineMethod (c$, "getAppContext", 
36386 function () {
36387 return this.appContext;
36388 });
36389 Clazz_defineMethod (c$, "getChangeSupportLock", 
36390  function () {
36391 return this.changeSupportLock;
36392 });
36393 Clazz_defineMethod (c$, "getBoundsOp", 
36394 function () {
36395 return this.boundsOp;
36396 });
36397 Clazz_defineMethod (c$, "setBoundsOp", 
36398 function (op) {
36399 if (op == 5) {
36400 this.boundsOp = 3;
36401 } else if (this.boundsOp == 3) {
36402 this.boundsOp = op;
36403 }}, "~N");
36404 Clazz_makeConstructor (c$, 
36405 function () {
36406 this.setAppContext ();
36407 });
36408 Clazz_defineMethod (c$, "setAppContext", 
36409 function () {
36410 this.appContext = jssun.awt.AppContext.getAppContext ();
36411 this.num = ++java.awt.Component.incr;
36412 });
36413 Clazz_defineMethod (c$, "getHTMLName", 
36414 function (uid) {
36415 return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName);
36416 }, "~S");
36417 Clazz_defineMethod (c$, "constructComponentName", 
36418 function () {
36419 return null;
36420 });
36421 Clazz_defineMethod (c$, "getName", 
36422 function () {
36423 if (this.name == null && !this.nameExplicitlySet) {
36424 {
36425 if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName ();
36426 }}return this.name;
36427 });
36428 Clazz_defineMethod (c$, "setName", 
36429 function (name) {
36430 var oldName;
36431 {
36432 oldName = this.name;
36433 this.name = name;
36434 this.nameExplicitlySet = true;
36435 }this.firePropertyChangeObject ("name", oldName, name);
36436 }, "~S");
36437 Clazz_defineMethod (c$, "getParent", 
36438 function () {
36439 return this.getParent_NoClientCode ();
36440 });
36441 Clazz_defineMethod (c$, "getParent_NoClientCode", 
36442 function () {
36443 return this.parent;
36444 });
36445 Clazz_defineMethod (c$, "getContainer", 
36446 function () {
36447 return this.getParent ();
36448 });
36449 Clazz_defineMethod (c$, "getPeer", 
36450 function () {
36451 return this.peer;
36452 });
36453 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
36454 function () {
36455 return swingjs.JSToolkit.getGraphicsConfiguration ();
36456 });
36457 Clazz_defineMethod (c$, "resetGC", 
36458 function () {
36459 });
36460 Clazz_defineMethod (c$, "getToolkit", 
36461 function () {
36462 return this.getToolkitImpl ();
36463 });
36464 Clazz_defineMethod (c$, "getToolkitImpl", 
36465 function () {
36466 var peer = this.peer;
36467 if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
36468 return peer.getToolkit ();
36469 }var parent = this.parent;
36470 if (parent != null) {
36471 return parent.getToolkitImpl ();
36472 }return java.awt.Toolkit.getDefaultToolkit ();
36473 });
36474 Clazz_defineMethod (c$, "isValid", 
36475 function () {
36476 return this.valid;
36477 });
36478 Clazz_defineMethod (c$, "isDisplayable", 
36479 function () {
36480 return true;
36481 });
36482 Clazz_defineMethod (c$, "isVisible", 
36483 function () {
36484 return this.isVisible_NoClientCode ();
36485 });
36486 Clazz_defineMethod (c$, "isVisible_NoClientCode", 
36487 function () {
36488 return this.visible;
36489 });
36490 Clazz_defineMethod (c$, "isRecursivelyVisible", 
36491 function () {
36492 return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ());
36493 });
36494 Clazz_defineMethod (c$, "pointRelativeToComponent", 
36495 function (absolute) {
36496 var compCoords = this.getLocationOnScreen ();
36497 return  new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y);
36498 }, "java.awt.Point");
36499 Clazz_defineMethod (c$, "getMousePosition", 
36500 function () {
36501 return null;
36502 });
36503 Clazz_defineMethod (c$, "isSameOrAncestorOf", 
36504 function (comp, allowChildren) {
36505 return comp === this;
36506 }, "java.awt.Component,~B");
36507 Clazz_defineMethod (c$, "isShowing", 
36508 function () {
36509 if (this.visible) {
36510 var parent = this.parent;
36511 return (parent == null) || parent.isShowing ();
36512 }return false;
36513 });
36514 Clazz_defineMethod (c$, "isEnabled", 
36515 function () {
36516 return this.isEnabledImpl ();
36517 });
36518 Clazz_defineMethod (c$, "isEnabledImpl", 
36519 function () {
36520 return this.enabled;
36521 });
36522 Clazz_defineMethod (c$, "setEnabled", 
36523 function (b) {
36524 this.enable (b);
36525 }, "~B");
36526 Clazz_defineMethod (c$, "enable", 
36527 function () {
36528 if (!this.enabled) {
36529 this.enabled = true;
36530 var peer = this.peer;
36531 if (peer != null) {
36532 peer.setEnabled (true);
36533 if (this.visible) {
36534 this.updateCursorImmediately ();
36535 }}}});
36536 Clazz_defineMethod (c$, "enable", 
36537 function (b) {
36538 if (b) {
36539 this.enable ();
36540 } else {
36541 this.disable ();
36542 }}, "~B");
36543 Clazz_defineMethod (c$, "disable", 
36544 function () {
36545 if (this.enabled) {
36546 this.enabled = false;
36547 var peer = this.peer;
36548 if (peer != null) {
36549 peer.setEnabled (false);
36550 if (this.visible) {
36551 this.updateCursorImmediately ();
36552 }}}});
36553 Clazz_defineMethod (c$, "isDoubleBuffered", 
36554 function () {
36555 return false;
36556 });
36557 Clazz_defineMethod (c$, "setVisible", 
36558 function (b) {
36559 this.show (b);
36560 }, "~B");
36561 Clazz_defineMethod (c$, "show", 
36562 function () {
36563 if (!this.visible) {
36564 this.visible = true;
36565 var peer = this.peer;
36566 if (peer != null) {
36567 peer.setVisible (true);
36568 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36569 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36570 this.repaint ();
36571 }this.updateCursorImmediately ();
36572 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36573 var e =  new java.awt.event.ComponentEvent (this, 102);
36574 java.awt.Toolkit.getEventQueue ().postEvent (e);
36575 }}var parent = this.parent;
36576 if (parent != null) {
36577 parent.invalidate ();
36578 }});
36579 Clazz_defineMethod (c$, "containsFocus", 
36580 function () {
36581 return this.isFocusOwner ();
36582 });
36583 Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36584 function () {
36585 });
36586 Clazz_defineMethod (c$, "hide", 
36587 function () {
36588 this.isPacked = false;
36589 if (this.visible) {
36590 this.clearCurrentFocusCycleRootOnHide ();
36591 this.visible = false;
36592 this.mixOnHiding (this.isLightweight ());
36593 var peer = this.peer;
36594 if (peer != null) {
36595 peer.setVisible (false);
36596 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36597 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36598 this.repaint ();
36599 }this.updateCursorImmediately ();
36600 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36601 var e =  new java.awt.event.ComponentEvent (this, 103);
36602 java.awt.Toolkit.getEventQueue ().postEvent (e);
36603 }}var parent = this.parent;
36604 if (parent != null) {
36605 parent.invalidate ();
36606 }});
36607 Clazz_defineMethod (c$, "getForeground", 
36608 function () {
36609 var foreground = this.foreground;
36610 if (foreground != null) {
36611 return foreground;
36612 }var parent = this.parent;
36613 return (parent != null) ? parent.getForeground () : null;
36614 });
36615 Clazz_defineMethod (c$, "setForeground", 
36616 function (c) {
36617 var oldColor = this.foreground;
36618 var peer = this.peer;
36619 this.foreground = c;
36620 if (peer != null) {
36621 c = this.getForeground ();
36622 if (c != null) {
36623 peer.setForeground (c);
36624 }}this.firePropertyChangeObject ("foreground", oldColor, c);
36625 }, "java.awt.Color");
36626 Clazz_defineMethod (c$, "isForegroundSet", 
36627 function () {
36628 return (this.foreground != null);
36629 });
36630 Clazz_defineMethod (c$, "getBackground", 
36631 function () {
36632 var background = this.background;
36633 if (background != null) {
36634 return background;
36635 }var parent = this.parent;
36636 return (parent != null) ? parent.getBackground () : null;
36637 });
36638 Clazz_defineMethod (c$, "setBackground", 
36639 function (c) {
36640 var oldColor = this.background;
36641 var peer = this.peer;
36642 this.background = c;
36643 if (peer != null) {
36644 c = this.getBackground ();
36645 if (c != null) {
36646 peer.setBackground (c);
36647 }}this.firePropertyChangeObject ("background", oldColor, c);
36648 }, "java.awt.Color");
36649 Clazz_defineMethod (c$, "isBackgroundSet", 
36650 function () {
36651 return (this.background != null);
36652 });
36653 Clazz_defineMethod (c$, "getFont", 
36654 function () {
36655 return this.getFont_NoClientCode ();
36656 });
36657 Clazz_defineMethod (c$, "getFont_NoClientCode", 
36658 function () {
36659 var font = this.font;
36660 if (font != null) {
36661 return font;
36662 }var parent = this.parent;
36663 return (parent != null) ? parent.getFont_NoClientCode () : null;
36664 });
36665 Clazz_defineMethod (c$, "setFont", 
36666 function (f) {
36667 this.setFontComp (f);
36668 }, "java.awt.Font");
36669 Clazz_defineMethod (c$, "setFontComp", 
36670 function (f) {
36671 var oldFont;
36672 var newFont;
36673 oldFont = this.font;
36674 newFont = this.font = f;
36675 {
36676 {
36677 }var peer = this.peer;
36678 if (peer != null) {
36679 f = this.getFont ();
36680 if (f != null) {
36681 peer.setFont (f);
36682 this.peerFont = f;
36683 }}}this.firePropertyChangeObject ("font", oldFont, newFont);
36684 if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) {
36685 this.invalidateIfValid ();
36686 }}, "java.awt.Font");
36687 Clazz_defineMethod (c$, "isFontSet", 
36688 function () {
36689 return (this.font != null);
36690 });
36691 Clazz_defineMethod (c$, "getLocale", 
36692 function () {
36693 var locale = this.locale;
36694 if (locale != null) {
36695 return locale;
36696 }var parent = this.parent;
36697 if (parent == null) {
36698 throw  new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale");
36699 } else {
36700 return parent.getLocale ();
36701 }});
36702 Clazz_defineMethod (c$, "setLocale", 
36703 function (l) {
36704 var oldValue = this.locale;
36705 this.locale = l;
36706 this.firePropertyChangeObject ("locale", oldValue, l);
36707 this.invalidateIfValid ();
36708 }, "java.util.Locale");
36709 Clazz_defineMethod (c$, "getLocation", 
36710 function () {
36711 return this.location ();
36712 });
36713 Clazz_defineMethod (c$, "getLocationOnScreen", 
36714 function () {
36715 return this.getLocationOnScreen_NoTreeLock ();
36716 });
36717 Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", 
36718 function () {
36719 if (this.isShowing ()) {
36720 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
36721 var host = this.getNativeContainer ();
36722 var pt = host.peer.getLocationOnScreen ();
36723 for (var c = this; c !== host; c = c.getParent ()) {
36724 pt.x += c.x;
36725 pt.y += c.y;
36726 }
36727 return pt;
36728 } else {
36729 var pt = this.peer.getLocationOnScreen ();
36730 return pt;
36731 }} else {
36732 throw  new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location");
36733 }});
36734 Clazz_defineMethod (c$, "location", 
36735 function () {
36736 return this.location_NoClientCode ();
36737 });
36738 Clazz_defineMethod (c$, "location_NoClientCode", 
36739  function () {
36740 return  new java.awt.Point (this.x, this.y);
36741 });
36742 Clazz_defineMethod (c$, "setLocation", 
36743 function (x, y) {
36744 this.setBoundsOp (1);
36745 this.setBounds (x, y, this.width, this.height);
36746 }, "~N,~N");
36747 Clazz_defineMethod (c$, "setLocation", 
36748 function (p) {
36749 this.setLocation (p.x, p.y);
36750 }, "java.awt.Point");
36751 Clazz_defineMethod (c$, "getSize", 
36752 function () {
36753 return this.size ();
36754 });
36755 Clazz_defineMethod (c$, "size", 
36756 function () {
36757 return  new java.awt.Dimension (this.width, this.height);
36758 });
36759 Clazz_defineMethod (c$, "setSize", 
36760 function (width, height) {
36761 {
36762 if (arguments.length == 1) {
36763 var d = arguments[0];
36764 width = d.width;
36765 height = d.height;
36766 }
36767 }this.resize (width, height);
36768 }, "~N,~N");
36769 Clazz_defineMethod (c$, "resize", 
36770 function (width, height) {
36771 this.setBoundsOp (2);
36772 this.setBounds (this.x, this.y, width, height);
36773 }, "~N,~N");
36774 Clazz_defineMethod (c$, "setBounds", 
36775 function (x, y, width, height) {
36776 this.reshape (x, y, width, height);
36777 }, "~N,~N,~N,~N");
36778 Clazz_defineMethod (c$, "setBounds", 
36779 function (r) {
36780 this.setBounds (r.x, r.y, r.width, r.height);
36781 }, "java.awt.Rectangle");
36782 Clazz_defineMethod (c$, "reshape", 
36783 function (x, y, width, height) {
36784 try {
36785 this.setBoundsOp (3);
36786 var resized = (this.width != width) || (this.height != height);
36787 var moved = (this.x != x) || (this.y != y);
36788 if (!resized && !moved) {
36789 return;
36790 }var oldX = this.x;
36791 var oldY = this.y;
36792 var oldWidth = this.width;
36793 var oldHeight = this.height;
36794 this.x = x;
36795 this.y = y;
36796 this.width = width;
36797 this.height = height;
36798 if (resized) {
36799 this.isPacked = false;
36800 System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ());
36801 }var needNotify = true;
36802 this.mixOnReshaping ();
36803 if (this.peer != null) {
36804 this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ());
36805 resized = (oldWidth != this.width) || (oldHeight != this.height);
36806 moved = (oldX != this.x) || (oldY != this.y);
36807 if (Clazz_instanceOf (this, java.awt.Window)) {
36808 needNotify = false;
36809 }if (resized) {
36810 this.invalidate ();
36811 }if (this.parent != null) {
36812 this.parent.invalidateIfValid ();
36813 }}if (needNotify) {
36814 this.notifyNewBounds (resized, moved);
36815 }this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight);
36816 } finally {
36817 this.setBoundsOp (5);
36818 }
36819 }, "~N,~N,~N,~N");
36820 Clazz_defineMethod (c$, "repaintParentIfNeeded", 
36821  function (oldX, oldY, oldWidth, oldHeight) {
36822 if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) {
36823 this.parent.repaint (oldX, oldY, oldWidth, oldHeight);
36824 this.repaint ();
36825 }}, "~N,~N,~N,~N");
36826 Clazz_defineMethod (c$, "reshapeNativePeer", 
36827  function (x, y, width, height, op) {
36828 var nativeX = x;
36829 var nativeY = y;
36830 for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) {
36831 nativeX += c.x;
36832 nativeY += c.y;
36833 }
36834 this.peer.setBounds (nativeX, nativeY, width, height, op);
36835 }, "~N,~N,~N,~N,~N");
36836 Clazz_defineMethod (c$, "notifyNewBounds", 
36837  function (resized, moved) {
36838 if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36839 if (resized) {
36840 var e =  new java.awt.event.ComponentEvent (this, 101);
36841 java.awt.Toolkit.getEventQueue ().postEvent (e);
36842 }if (moved) {
36843 var e =  new java.awt.event.ComponentEvent (this, 100);
36844 java.awt.Toolkit.getEventQueue ().postEvent (e);
36845 }} else {
36846 if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) {
36847 var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536);
36848 if (resized) {
36849 (this).createChildHierarchyEvents (1402, 0, enabledOnToolkit);
36850 }if (moved) {
36851 (this).createChildHierarchyEvents (1401, 0, enabledOnToolkit);
36852 }}}}, "~B,~B");
36853 Clazz_defineMethod (c$, "getX", 
36854 function () {
36855 return this.x;
36856 });
36857 Clazz_defineMethod (c$, "getY", 
36858 function () {
36859 return this.y;
36860 });
36861 Clazz_defineMethod (c$, "getWidth", 
36862 function () {
36863 return this.width;
36864 });
36865 Clazz_defineMethod (c$, "getHeight", 
36866 function () {
36867 return this.height;
36868 });
36869 Clazz_defineMethod (c$, "getBounds", 
36870 function (rv) {
36871 if (rv == null) return  new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36872 rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36873 return rv;
36874 }, "java.awt.Rectangle");
36875 Clazz_defineMethod (c$, "getSize", 
36876 function (rv) {
36877 if (rv == null) {
36878 return  new java.awt.Dimension (this.getWidth (), this.getHeight ());
36879 } else {
36880 rv.setSize (this.getWidth (), this.getHeight ());
36881 return rv;
36882 }}, "java.awt.Dimension");
36883 Clazz_defineMethod (c$, "getLocation", 
36884 function (rv) {
36885 if (rv == null) {
36886 return  new java.awt.Point (this.getX (), this.getY ());
36887 } else {
36888 rv.setLocation (this.getX (), this.getY ());
36889 return rv;
36890 }}, "java.awt.Point");
36891 Clazz_defineMethod (c$, "isOpaque", 
36892 function () {
36893 return true;
36894 });
36895 Clazz_defineMethod (c$, "isLightweight", 
36896 function () {
36897 return false;
36898 });
36899 Clazz_defineMethod (c$, "setPreferredSize", 
36900 function (preferredSize) {
36901 this.setPrefSizeComp (preferredSize);
36902 }, "java.awt.Dimension");
36903 Clazz_defineMethod (c$, "setPrefSizeComp", 
36904 function (preferredSize) {
36905 var old = (this.prefSizeSet ? this.prefSize : null);
36906 this.prefSize = preferredSize;
36907 this.prefSizeSet = (preferredSize != null);
36908 this.firePropertyChangeObject ("preferredSize", old, preferredSize);
36909 }, "java.awt.Dimension");
36910 Clazz_defineMethod (c$, "isPreferredSizeSet", 
36911 function () {
36912 return this.prefSizeSet;
36913 });
36914 Clazz_defineMethod (c$, "getPreferredSize", 
36915 function () {
36916 return this.preferredSize ();
36917 });
36918 Clazz_defineMethod (c$, "preferredSize", 
36919 function () {
36920 return this.prefSizeComp ();
36921 });
36922 Clazz_defineMethod (c$, "prefSizeComp", 
36923 function () {
36924 var dim = this.prefSize;
36925 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
36926 this.prefSize = this.getMinimumSize ();
36927 dim = this.prefSize;
36928 }return  new java.awt.Dimension (dim);
36929 });
36930 Clazz_defineMethod (c$, "setMinimumSize", 
36931 function (minimumSize) {
36932 var old;
36933 if (this.minSizeSet) {
36934 old = this.minSize;
36935 } else {
36936 old = null;
36937 }this.minSize = minimumSize;
36938 this.minSizeSet = (minimumSize != null);
36939 this.firePropertyChangeObject ("minimumSize", old, minimumSize);
36940 }, "java.awt.Dimension");
36941 Clazz_defineMethod (c$, "isMinimumSizeSet", 
36942 function () {
36943 return this.minSizeSet;
36944 });
36945 Clazz_defineMethod (c$, "getMinimumSize", 
36946 function () {
36947 return this.minimumSize ();
36948 });
36949 Clazz_defineMethod (c$, "minimumSize", 
36950 function () {
36951 var dim = this.minSize;
36952 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
36953 this.minSize = this.getSize ();
36954 dim = this.minSize;
36955 }return  new java.awt.Dimension (dim);
36956 });
36957 Clazz_defineMethod (c$, "setMaximumSize", 
36958 function (maximumSize) {
36959 var old;
36960 if (this.maxSizeSet) {
36961 old = this.maxSize;
36962 } else {
36963 old = null;
36964 }this.maxSize = maximumSize;
36965 this.maxSizeSet = (maximumSize != null);
36966 this.firePropertyChangeObject ("maximumSize", old, maximumSize);
36967 }, "java.awt.Dimension");
36968 Clazz_defineMethod (c$, "isMaximumSizeSet", 
36969 function () {
36970 return this.maxSizeSet;
36971 });
36972 Clazz_defineMethod (c$, "getMaximumSize", 
36973 function () {
36974 return this.getMaxSizeComp ();
36975 });
36976 Clazz_defineMethod (c$, "getMaxSizeComp", 
36977 function () {
36978 if (this.isMaximumSizeSet ()) {
36979 return  new java.awt.Dimension (this.maxSize);
36980 }return  new java.awt.Dimension (32767, 32767);
36981 });
36982 Clazz_defineMethod (c$, "getAlignmentX", 
36983 function () {
36984 return this.getAlignmentXComp ();
36985 });
36986 Clazz_defineMethod (c$, "getAlignmentXComp", 
36987 function () {
36988 return 0.5;
36989 });
36990 Clazz_defineMethod (c$, "getAlignmentY", 
36991 function () {
36992 return this.getAlignmentYComp ();
36993 });
36994 Clazz_defineMethod (c$, "getAlignmentYComp", 
36995 function () {
36996 return 0.5;
36997 });
36998 Clazz_defineMethod (c$, "getBaseline", 
36999 function (width, height) {
37000 if (width < 0 || height < 0) {
37001 throw  new IllegalArgumentException ("Width and height must be >= 0");
37002 }return -1;
37003 }, "~N,~N");
37004 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
37005 function () {
37006 return java.awt.Component.BaselineResizeBehavior.OTHER;
37007 });
37008 Clazz_defineMethod (c$, "doLayout", 
37009 function () {
37010 this.layout ();
37011 });
37012 Clazz_defineMethod (c$, "layout", 
37013 function () {
37014 });
37015 Clazz_defineMethod (c$, "validate", 
37016 function () {
37017 this.validateComponent ();
37018 });
37019 Clazz_defineMethod (c$, "validateComponent", 
37020 function () {
37021 {
37022 var peer = this.peer;
37023 var wasValid = this.isValid ();
37024 if (!wasValid && peer != null) {
37025 var newfont = this.getFont ();
37026 var oldfont = this.peerFont;
37027 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
37028 peer.setFont (newfont);
37029 this.peerFont = newfont;
37030 }peer.layout ();
37031 }this.valid = true;
37032 if (!wasValid) {
37033 this.mixOnValidating ();
37034 }}});
37035 Clazz_defineMethod (c$, "invalidate", 
37036 function () {
37037 this.invalidateComp ();
37038 });
37039 Clazz_defineMethod (c$, "invalidateComp", 
37040 function () {
37041 this.valid = false;
37042 if (!this.isPreferredSizeSet ()) {
37043 this.prefSize = null;
37044 }if (!this.isMinimumSizeSet ()) {
37045 this.minSize = null;
37046 }if (!this.isMaximumSizeSet ()) {
37047 this.maxSize = null;
37048 }if (this.parent != null) {
37049 this.parent.invalidateIfValid ();
37050 }});
37051 Clazz_defineMethod (c$, "invalidateIfValid", 
37052 function () {
37053 if (this.isValid ()) {
37054 this.invalidate ();
37055 }});
37056 Clazz_defineMethod (c$, "getGraphics", 
37057 function () {
37058 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37059 if (this.parent == null) return null;
37060 var g = this.parent.getGraphics ();
37061 if (g == null) return null;
37062 g.setFont (this.getFont ());
37063 return g;
37064 } else {
37065 var peer = this.peer;
37066 return (peer != null) ? peer.getGraphics () : null;
37067 }});
37068 Clazz_defineMethod (c$, "getTreeLock", 
37069 function () {
37070 return this;
37071 });
37072 Clazz_defineMethod (c$, "getFontMetrics", 
37073 function (font) {
37074 return jssun.font.FontDesignMetrics.getMetrics (font);
37075 }, "java.awt.Font");
37076 Clazz_defineMethod (c$, "setCursor", 
37077 function (cursor) {
37078 this.cursor = cursor;
37079 this.updateCursorImmediately ();
37080 }, "java.awt.Cursor");
37081 Clazz_defineMethod (c$, "updateCursorImmediately", 
37082 function () {
37083 });
37084 Clazz_defineMethod (c$, "getCursor", 
37085 function () {
37086 return this.getCursor_NoClientCode ();
37087 });
37088 Clazz_defineMethod (c$, "getCursor_NoClientCode", 
37089 function () {
37090 var cursor = this.cursor;
37091 if (cursor != null) {
37092 return cursor;
37093 }var parent = this.parent;
37094 if (parent != null) {
37095 return parent.getCursor_NoClientCode ();
37096 } else {
37097 return java.awt.Cursor.getPredefinedCursor (0);
37098 }});
37099 Clazz_defineMethod (c$, "isCursorSet", 
37100 function () {
37101 return (this.cursor != null);
37102 });
37103 Clazz_defineMethod (c$, "paint", 
37104 function (g) {
37105 }, "java.awt.Graphics");
37106 Clazz_defineMethod (c$, "update", 
37107 function (g) {
37108 this.paint (g);
37109 }, "java.awt.Graphics");
37110 Clazz_defineMethod (c$, "paintAll", 
37111 function (g) {
37112 }, "java.awt.Graphics");
37113 Clazz_defineMethod (c$, "lightweightPaint", 
37114 function (g) {
37115 this.lwPaintComp (g);
37116 }, "java.awt.Graphics");
37117 Clazz_defineMethod (c$, "lwPaintComp", 
37118 function (g) {
37119 this.paint (g);
37120 }, "java.awt.Graphics");
37121 Clazz_defineMethod (c$, "paintHeavyweightComponents", 
37122 function (g) {
37123 }, "java.awt.Graphics");
37124 Clazz_defineMethod (c$, "repaint", 
37125 function () {
37126 this.repaintImpl (0, 0, 0, this.width, this.height);
37127 });
37128 Clazz_defineMethod (c$, "repaint", 
37129 function (tm) {
37130 this.repaintImpl (tm, 0, 0, this.width, this.height);
37131 }, "~N");
37132 Clazz_defineMethod (c$, "repaint", 
37133 function (x, y, width, height) {
37134 this.repaintImpl (0, x, y, width, height);
37135 }, "~N,~N,~N,~N");
37136 Clazz_defineMethod (c$, "repaint", 
37137 function (tm, x, y, width, height) {
37138 this.repaintImpl (tm, x, y, width, height);
37139 }, "~N,~N,~N,~N,~N");
37140 Clazz_defineMethod (c$, "repaintImpl", 
37141 function (tm, x, y, width, height) {
37142 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37143 if (this.parent != null) {
37144 var px = this.x + ((x < 0) ? 0 : x);
37145 var py = this.y + ((y < 0) ? 0 : y);
37146 var pwidth = (width > this.width) ? this.width : width;
37147 var pheight = (height > this.height) ? this.height : height;
37148 this.parent.repaint (tm, px, py, pwidth, pheight);
37149 }} else {
37150 if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) {
37151 var e =  new java.awt.event.PaintEvent (this, 801,  new java.awt.Rectangle (x, y, width, height));
37152 java.awt.Toolkit.getEventQueue ().postEvent (e);
37153 }}}, "~N,~N,~N,~N,~N");
37154 Clazz_defineMethod (c$, "print", 
37155 function (g) {
37156 this.paint (g);
37157 }, "java.awt.Graphics");
37158 Clazz_defineMethod (c$, "printAll", 
37159 function (g) {
37160 }, "java.awt.Graphics");
37161 Clazz_defineMethod (c$, "printHeavyweightComponents", 
37162 function (g) {
37163 }, "java.awt.Graphics");
37164 Clazz_overrideMethod (c$, "imageUpdate", 
37165 function (img, infoflags, x, y, w, h) {
37166 return false;
37167 }, "java.awt.Image,~N,~N,~N,~N,~N");
37168 Clazz_defineMethod (c$, "createImage", 
37169 function (producer) {
37170 return this.getToolkit ().createImage (producer);
37171 }, "java.awt.image.ImageProducer");
37172 Clazz_defineMethod (c$, "createImage", 
37173 function (width, height) {
37174 return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height);
37175 }, "~N,~N");
37176 Clazz_defineMethod (c$, "createVolatileImage", 
37177 function (width, height) {
37178 return null;
37179 }, "~N,~N");
37180 Clazz_defineMethod (c$, "createVolatileImage", 
37181 function (width, height, caps) {
37182 return this.createVolatileImage (width, height);
37183 }, "~N,~N,java.awt.ImageCapabilities");
37184 Clazz_defineMethod (c$, "prepareImage", 
37185 function (image, observer) {
37186 return this.prepareImage (image, -1, -1, observer);
37187 }, "java.awt.Image,java.awt.image.ImageObserver");
37188 Clazz_defineMethod (c$, "prepareImage", 
37189 function (image, width, height, observer) {
37190 return false;
37191 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37192 Clazz_defineMethod (c$, "checkImage", 
37193 function (image, observer) {
37194 return this.checkImage (image, -1, -1, observer);
37195 }, "java.awt.Image,java.awt.image.ImageObserver");
37196 Clazz_defineMethod (c$, "checkImage", 
37197 function (image, width, height, observer) {
37198 return 0;
37199 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37200 Clazz_defineMethod (c$, "setIgnoreRepaint", 
37201 function (ignoreRepaint) {
37202 }, "~B");
37203 Clazz_defineMethod (c$, "getIgnoreRepaint", 
37204 function () {
37205 return false;
37206 });
37207 Clazz_defineMethod (c$, "contains", 
37208 function (x, y) {
37209 return this.inside (x, y);
37210 }, "~N,~N");
37211 Clazz_defineMethod (c$, "inside", 
37212 function (x, y) {
37213 return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height);
37214 }, "~N,~N");
37215 Clazz_defineMethod (c$, "getComponentAt", 
37216 function (x, y) {
37217 return this.locate (x, y);
37218 }, "~N,~N");
37219 Clazz_defineMethod (c$, "locate", 
37220 function (x, y) {
37221 return this.contains (x, y) ? this : null;
37222 }, "~N,~N");
37223 Clazz_defineMethod (c$, "getComponentAt", 
37224 function (p) {
37225 return this.getComponentAt (p.x, p.y);
37226 }, "java.awt.Point");
37227 Clazz_defineMethod (c$, "deliverEvent", 
37228 function (e) {
37229 this.postEvent (e);
37230 }, "java.awt.Event");
37231 Clazz_defineMethod (c$, "dispatchEvent", 
37232 function (e) {
37233 this.dispatchEventImpl (e);
37234 }, "java.awt.AWTEvent");
37235 Clazz_defineMethod (c$, "dispatchEventImpl", 
37236 function (e) {
37237 this.dispatchEventImplComp (e);
37238 }, "java.awt.AWTEvent");
37239 Clazz_defineMethod (c$, "dispatchEventImplComp", 
37240 function (e) {
37241 var id = e.getID ();
37242 java.awt.EventQueue.setCurrentEventAndMostRecentTime (e);
37243 if (!e.focusManagerIsDispatching) {
37244 if (e.isPosted) {
37245 e.isPosted = true;
37246 }}if (!e.isConsumed ()) {
37247 if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37248 if (e.isConsumed ()) {
37249 return;
37250 }}}if (this.areInputMethodsEnabled ()) {
37251 if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) {
37252 }} else {
37253 if (id == 1004) {
37254 }}switch (id) {
37255 case 401:
37256 case 402:
37257 var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent);
37258 if (p != null) {
37259 p.preProcessKeyEvent (e);
37260 }break;
37261 case 201:
37262 break;
37263 default:
37264 break;
37265 }
37266 if (this.newEventsOnly) {
37267 if (this.eventEnabled (e)) {
37268 this.processEvent (e);
37269 }} else if (id == 507) {
37270 this.autoProcessMouseWheel (e);
37271 } else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) {
37272 }if (id == 201 && !e.isConsumed ()) {
37273 }if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) {
37274 }}, "java.awt.AWTEvent");
37275 Clazz_defineMethod (c$, "autoProcessMouseWheel", 
37276 function (e) {
37277 }, "java.awt.event.MouseWheelEvent");
37278 Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", 
37279 function (e) {
37280 var newX;
37281 var newY;
37282 newX = e.getX () + this.getX ();
37283 newY = e.getY () + this.getY ();
37284 var newMWE;
37285 {
37286 var anc = this.getParent ();
37287 while (anc != null && !anc.eventEnabled (e)) {
37288 newX += anc.getX ();
37289 newY += anc.getY ();
37290 if (!(Clazz_instanceOf (anc, java.awt.Window))) {
37291 anc = anc.getParent ();
37292 } else {
37293 break;
37294 }}
37295 if (anc != null && anc.eventEnabled (e)) {
37296 newMWE =  new java.awt.event.MouseWheelEvent (anc, e.getID (), e.getWhen (), e.getModifiers (), newX, newY, e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), e.getScrollType (), e.getScrollAmount (), e.getWheelRotation ());
37297 (e).copyPrivateDataInto (newMWE);
37298 anc.dispatchEventToSelf (newMWE);
37299 }}return true;
37300 }, "java.awt.event.MouseWheelEvent");
37301 Clazz_defineMethod (c$, "checkWindowClosingException", 
37302 function () {
37303 if (this.windowClosingException != null) {
37304 if (Clazz_instanceOf (this, java.awt.Dialog)) {
37305 (this).interruptBlocking ();
37306 } else {
37307 this.windowClosingException.fillInStackTrace ();
37308 this.windowClosingException.printStackTrace ();
37309 this.windowClosingException = null;
37310 }return true;
37311 }return false;
37312 });
37313 Clazz_defineMethod (c$, "areInputMethodsEnabled", 
37314 function () {
37315 return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null);
37316 });
37317 Clazz_defineMethod (c$, "eventEnabled", 
37318 function (e) {
37319 return this.eventTypeEnabled (e.id);
37320 }, "java.awt.AWTEvent");
37321 Clazz_defineMethod (c$, "eventTypeEnabled", 
37322 function (type) {
37323 switch (type) {
37324 case 100:
37325 case 101:
37326 case 102:
37327 case 103:
37328 if ((this.eventMask & 1) != 0 || this.componentListener != null) {
37329 return true;
37330 }break;
37331 case 1004:
37332 case 1005:
37333 if ((this.eventMask & 4) != 0 || this.focusListener != null) {
37334 return true;
37335 }break;
37336 case 401:
37337 case 402:
37338 case 400:
37339 if ((this.eventMask & 8) != 0 || this.keyListener != null) {
37340 return true;
37341 }break;
37342 case 501:
37343 case 502:
37344 case 504:
37345 case 505:
37346 case 500:
37347 if ((this.eventMask & 16) != 0 || this.mouseListener != null) {
37348 return true;
37349 }break;
37350 case 503:
37351 case 506:
37352 if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) {
37353 return true;
37354 }break;
37355 case 507:
37356 if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) {
37357 return true;
37358 }break;
37359 case 1100:
37360 case 1101:
37361 if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) {
37362 return true;
37363 }break;
37364 case 1400:
37365 if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) {
37366 return true;
37367 }break;
37368 case 1401:
37369 case 1402:
37370 if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) {
37371 return true;
37372 }break;
37373 case 1001:
37374 if ((this.eventMask & 128) != 0) {
37375 return true;
37376 }break;
37377 case 900:
37378 if ((this.eventMask & 1024) != 0) {
37379 return true;
37380 }break;
37381 case 701:
37382 if ((this.eventMask & 512) != 0) {
37383 return true;
37384 }break;
37385 case 601:
37386 if ((this.eventMask & 256) != 0) {
37387 return true;
37388 }break;
37389 default:
37390 break;
37391 }
37392 if (type > 1999) {
37393 return true;
37394 }return false;
37395 }, "~N");
37396 Clazz_defineMethod (c$, "postEvent", 
37397 function (e) {
37398 if (this.handleEvent (e)) {
37399 e.consume ();
37400 return true;
37401 }var parent = this.parent;
37402 var eventx = e.x;
37403 var eventy = e.y;
37404 if (parent != null) {
37405 e.translate (this.x, this.y);
37406 if (parent.postEvent (e)) {
37407 e.consume ();
37408 return true;
37409 }e.x = eventx;
37410 e.y = eventy;
37411 }return false;
37412 }, "java.awt.Event");
37413 Clazz_defineMethod (c$, "addComponentListener", 
37414 function (l) {
37415 if (l == null) {
37416 return;
37417 }this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l);
37418 this.newEventsOnly = true;
37419 }, "java.awt.event.ComponentListener");
37420 Clazz_defineMethod (c$, "removeComponentListener", 
37421 function (l) {
37422 if (l == null) {
37423 return;
37424 }this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l);
37425 }, "java.awt.event.ComponentListener");
37426 Clazz_defineMethod (c$, "getComponentListeners", 
37427 function () {
37428 return (this.getListeners (java.awt.event.ComponentListener));
37429 });
37430 Clazz_defineMethod (c$, "addFocusListener", 
37431 function (l) {
37432 if (l == null) {
37433 return;
37434 }this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l);
37435 this.newEventsOnly = true;
37436 }, "java.awt.event.FocusListener");
37437 Clazz_defineMethod (c$, "removeFocusListener", 
37438 function (l) {
37439 if (l == null) {
37440 return;
37441 }this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l);
37442 }, "java.awt.event.FocusListener");
37443 Clazz_defineMethod (c$, "getFocusListeners", 
37444 function () {
37445 return (this.getListeners (java.awt.event.FocusListener));
37446 });
37447 Clazz_defineMethod (c$, "addHierarchyListener", 
37448 function (l) {
37449 }, "java.awt.event.HierarchyListener");
37450 Clazz_defineMethod (c$, "removeHierarchyListener", 
37451 function (l) {
37452 }, "java.awt.event.HierarchyListener");
37453 Clazz_defineMethod (c$, "getHierarchyListeners", 
37454 function () {
37455 return (this.getListeners (java.awt.event.HierarchyListener));
37456 });
37457 Clazz_defineMethod (c$, "addHierarchyBoundsListener", 
37458 function (l) {
37459 if (l == null) {
37460 return;
37461 }var notifyAncestors;
37462 {
37463 notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0);
37464 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l);
37465 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null);
37466 this.newEventsOnly = true;
37467 }if (notifyAncestors) {
37468 {
37469 this.adjustListeningChildrenOnParent (65536, 1);
37470 }}}, "java.awt.event.HierarchyBoundsListener");
37471 Clazz_defineMethod (c$, "removeHierarchyBoundsListener", 
37472 function (l) {
37473 if (l == null) {
37474 return;
37475 }var notifyAncestors;
37476 {
37477 notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0);
37478 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l);
37479 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null);
37480 }if (notifyAncestors) {
37481 {
37482 this.adjustListeningChildrenOnParent (65536, -1);
37483 }}}, "java.awt.event.HierarchyBoundsListener");
37484 Clazz_defineMethod (c$, "numListening", 
37485 function (mask) {
37486 return this.numListeningMask (mask);
37487 }, "~N");
37488 Clazz_defineMethod (c$, "numListeningMask", 
37489 function (mask) {
37490 if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) {
37491 return 1;
37492 } else {
37493 return 0;
37494 }}, "~N");
37495 Clazz_defineMethod (c$, "countHierarchyMembers", 
37496 function () {
37497 return 1;
37498 });
37499 Clazz_defineMethod (c$, "createHierarchyEvents", 
37500 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37501 return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
37502 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37503 Clazz_defineMethod (c$, "createHierEventsComp", 
37504 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37505 switch (id) {
37506 case 1400:
37507 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) {
37508 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags);
37509 this.dispatchEvent (e);
37510 return 1;
37511 }break;
37512 case 1401:
37513 case 1402:
37514 if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) {
37515 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent);
37516 this.dispatchEvent (e);
37517 return 1;
37518 }break;
37519 default:
37520 break;
37521 }
37522 return 0;
37523 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37524 Clazz_defineMethod (c$, "getHierarchyBoundsListeners", 
37525 function () {
37526 return (this.getListeners (java.awt.event.HierarchyBoundsListener));
37527 });
37528 Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", 
37529 function (mask, num) {
37530 if (this.parent != null) {
37531 this.parent.adjustListeningChildren (mask, num);
37532 }}, "~N,~N");
37533 Clazz_defineMethod (c$, "addKeyListener", 
37534 function (l) {
37535 if (l == null) {
37536 return;
37537 }this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l);
37538 this.newEventsOnly = true;
37539 }, "java.awt.event.KeyListener");
37540 Clazz_defineMethod (c$, "removeKeyListener", 
37541 function (l) {
37542 if (l == null) {
37543 return;
37544 }this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l);
37545 }, "java.awt.event.KeyListener");
37546 Clazz_defineMethod (c$, "getKeyListeners", 
37547 function () {
37548 return (this.getListeners (java.awt.event.KeyListener));
37549 });
37550 Clazz_defineMethod (c$, "addMouseListener", 
37551 function (l) {
37552 if (l == null) {
37553 return;
37554 }System.out.println ("C adding mouse listener " + l);
37555 this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l);
37556 this.newEventsOnly = true;
37557 }, "java.awt.event.MouseListener");
37558 Clazz_defineMethod (c$, "removeMouseListener", 
37559 function (l) {
37560 if (l == null) {
37561 return;
37562 }this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l);
37563 }, "java.awt.event.MouseListener");
37564 Clazz_defineMethod (c$, "getMouseListeners", 
37565 function () {
37566 return (this.getListeners (java.awt.event.MouseListener));
37567 });
37568 Clazz_defineMethod (c$, "addMouseMotionListener", 
37569 function (l) {
37570 if (l == null) {
37571 return;
37572 }this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l);
37573 this.newEventsOnly = true;
37574 }, "java.awt.event.MouseMotionListener");
37575 Clazz_defineMethod (c$, "removeMouseMotionListener", 
37576 function (l) {
37577 if (l == null) {
37578 return;
37579 }this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l);
37580 }, "java.awt.event.MouseMotionListener");
37581 Clazz_defineMethod (c$, "getMouseMotionListeners", 
37582 function () {
37583 return (this.getListeners (java.awt.event.MouseMotionListener));
37584 });
37585 Clazz_defineMethod (c$, "addMouseWheelListener", 
37586 function (l) {
37587 if (l == null) {
37588 return;
37589 }this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l);
37590 this.newEventsOnly = true;
37591 }, "java.awt.event.MouseWheelListener");
37592 Clazz_defineMethod (c$, "removeMouseWheelListener", 
37593 function (l) {
37594 if (l == null) {
37595 return;
37596 }this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l);
37597 }, "java.awt.event.MouseWheelListener");
37598 Clazz_defineMethod (c$, "getMouseWheelListeners", 
37599 function () {
37600 return (this.getListeners (java.awt.event.MouseWheelListener));
37601 });
37602 Clazz_defineMethod (c$, "addInputMethodListener", 
37603 function (l) {
37604 if (l == null) {
37605 return;
37606 }this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l);
37607 this.newEventsOnly = true;
37608 }, "java.awt.event.InputMethodListener");
37609 Clazz_defineMethod (c$, "removeInputMethodListener", 
37610 function (l) {
37611 if (l == null) {
37612 return;
37613 }this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l);
37614 }, "java.awt.event.InputMethodListener");
37615 Clazz_defineMethod (c$, "getInputMethodListeners", 
37616 function () {
37617 return (this.getListeners (java.awt.event.InputMethodListener));
37618 });
37619 Clazz_defineMethod (c$, "getListeners", 
37620 function (listenerType) {
37621 return this.getListenersComp (listenerType);
37622 }, "Class");
37623 Clazz_defineMethod (c$, "getListenersComp", 
37624 function (listenerType) {
37625 var l = null;
37626 if (listenerType === java.awt.event.ComponentListener) {
37627 l = this.componentListener;
37628 } else if (listenerType === java.awt.event.FocusListener) {
37629 l = this.focusListener;
37630 } else if (listenerType === java.awt.event.HierarchyListener) {
37631 l = this.hierarchyListener;
37632 } else if (listenerType === java.awt.event.HierarchyBoundsListener) {
37633 l = this.hierarchyBoundsListener;
37634 } else if (listenerType === java.awt.event.KeyListener) {
37635 l = this.keyListener;
37636 } else if (listenerType === java.awt.event.MouseListener) {
37637 l = this.mouseListener;
37638 } else if (listenerType === java.awt.event.MouseMotionListener) {
37639 l = this.mouseMotionListener;
37640 } else if (listenerType === java.awt.event.MouseWheelListener) {
37641 l = this.mouseWheelListener;
37642 } else if (listenerType === java.awt.event.InputMethodListener) {
37643 l = this.inputMethodListener;
37644 } else if (listenerType === java.beans.PropertyChangeListener) {
37645 return this.getPropertyChangeListeners ();
37646 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
37647 }, "Class");
37648 Clazz_defineMethod (c$, "enableEvents", 
37649 function (eventsToEnable) {
37650 var notifyAncestors = 0;
37651 {
37652 if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) {
37653 notifyAncestors |= 32768;
37654 }if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) {
37655 notifyAncestors |= 65536;
37656 }this.eventMask |= eventsToEnable;
37657 this.newEventsOnly = true;
37658 }if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37659 this.parent.proxyEnableEvents (this.eventMask);
37660 }if (notifyAncestors != 0) {
37661 {
37662 this.adjustListeningChildrenOnParent (notifyAncestors, 1);
37663 }}}, "~N");
37664 Clazz_defineMethod (c$, "disableEvents", 
37665 function (eventsToDisable) {
37666 var notifyAncestors = 0;
37667 {
37668 if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) {
37669 notifyAncestors |= 32768;
37670 }if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) {
37671 notifyAncestors |= 65536;
37672 }this.eventMask &= ~eventsToDisable;
37673 }if (notifyAncestors != 0) {
37674 {
37675 this.adjustListeningChildrenOnParent (notifyAncestors, -1);
37676 }}}, "~N");
37677 Clazz_defineMethod (c$, "checkCoalescing", 
37678  function () {
37679 if (this.getClass ().getClassLoader () == null) {
37680 return false;
37681 }var clazz = this.getClass ();
37682 {
37683 var value = java.awt.Component.coalesceMap.get (clazz);
37684 if (value != null) {
37685 return value;
37686 }var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent"));
37687 java.awt.Component.coalesceMap.put (clazz, enabled);
37688 return enabled;
37689 }});
37690 Clazz_defineMethod (c$, "isCoalescingEnabled", 
37691 function () {
37692 return this.coalescingEnabled;
37693 });
37694 Clazz_defineMethod (c$, "coalesceEvents", 
37695 function (existingEvent, newEvent) {
37696 return null;
37697 }, "java.awt.AWTEvent,java.awt.AWTEvent");
37698 Clazz_defineMethod (c$, "processEvent", 
37699 function (e) {
37700 this.processEventComp (e);
37701 }, "java.awt.AWTEvent");
37702 Clazz_defineMethod (c$, "processEventComp", 
37703 function (e) {
37704 if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) {
37705 this.processFocusEvent (e);
37706 } else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
37707 switch (e.getID ()) {
37708 case 501:
37709 case 502:
37710 case 500:
37711 case 504:
37712 case 505:
37713 this.processMouseEvent (e);
37714 break;
37715 case 503:
37716 case 506:
37717 this.processMouseMotionEvent (e);
37718 break;
37719 case 507:
37720 this.processMouseWheelEvent (e);
37721 break;
37722 }
37723 } else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37724 this.processKeyEvent (e);
37725 } else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) {
37726 this.processComponentEvent (e);
37727 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
37728 this.processInputMethodEvent (e);
37729 } else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) {
37730 switch (e.getID ()) {
37731 case 1400:
37732 this.processHierarchyEvent (e);
37733 break;
37734 case 1401:
37735 case 1402:
37736 this.processHierarchyBoundsEvent (e);
37737 break;
37738 }
37739 }}, "java.awt.AWTEvent");
37740 Clazz_defineMethod (c$, "processComponentEvent", 
37741 function (e) {
37742 var listener = this.componentListener;
37743 if (listener != null) {
37744 var id = e.getID ();
37745 switch (id) {
37746 case 101:
37747 listener.componentResized (e);
37748 break;
37749 case 100:
37750 listener.componentMoved (e);
37751 break;
37752 case 102:
37753 listener.componentShown (e);
37754 break;
37755 case 103:
37756 listener.componentHidden (e);
37757 break;
37758 }
37759 }}, "java.awt.event.ComponentEvent");
37760 Clazz_defineMethod (c$, "processFocusEvent", 
37761 function (e) {
37762 var listener = this.focusListener;
37763 if (listener != null) {
37764 var id = e.getID ();
37765 switch (id) {
37766 case 1004:
37767 listener.focusGained (e);
37768 break;
37769 case 1005:
37770 listener.focusLost (e);
37771 break;
37772 }
37773 }}, "java.awt.event.FocusEvent");
37774 Clazz_defineMethod (c$, "processKeyEvent", 
37775 function (e) {
37776 var listener = this.keyListener;
37777 if (listener != null) {
37778 var id = e.getID ();
37779 switch (id) {
37780 case 400:
37781 listener.keyTyped (e);
37782 break;
37783 case 401:
37784 listener.keyPressed (e);
37785 break;
37786 case 402:
37787 listener.keyReleased (e);
37788 break;
37789 }
37790 }}, "java.awt.event.KeyEvent");
37791 Clazz_defineMethod (c$, "processMouseEvent", 
37792 function (e) {
37793 var listener = this.mouseListener;
37794 if (listener != null) {
37795 var id = e.getID ();
37796 switch (id) {
37797 case 501:
37798 listener.mousePressed (e);
37799 break;
37800 case 502:
37801 listener.mouseReleased (e);
37802 break;
37803 case 500:
37804 listener.mouseClicked (e);
37805 break;
37806 case 505:
37807 listener.mouseExited (e);
37808 break;
37809 case 504:
37810 listener.mouseEntered (e);
37811 break;
37812 }
37813 }}, "java.awt.event.MouseEvent");
37814 Clazz_defineMethod (c$, "processMouseMotionEvent", 
37815 function (e) {
37816 var listener = this.mouseMotionListener;
37817 if (listener != null) {
37818 var id = e.getID ();
37819 switch (id) {
37820 case 503:
37821 listener.mouseMoved (e);
37822 break;
37823 case 506:
37824 listener.mouseDragged (e);
37825 break;
37826 }
37827 }}, "java.awt.event.MouseEvent");
37828 Clazz_defineMethod (c$, "processMouseWheelEvent", 
37829 function (e) {
37830 var listener = this.mouseWheelListener;
37831 if (listener != null) {
37832 var id = e.getID ();
37833 switch (id) {
37834 case 507:
37835 listener.mouseWheelMoved (e);
37836 break;
37837 }
37838 }}, "java.awt.event.MouseWheelEvent");
37839 Clazz_defineMethod (c$, "postsOldMouseEvents", 
37840 function () {
37841 return false;
37842 });
37843 Clazz_defineMethod (c$, "processInputMethodEvent", 
37844 function (e) {
37845 var listener = this.inputMethodListener;
37846 if (listener != null) {
37847 var id = e.getID ();
37848 switch (id) {
37849 case 1100:
37850 listener.inputMethodTextChanged (e);
37851 break;
37852 case 1101:
37853 listener.caretPositionChanged (e);
37854 break;
37855 }
37856 }}, "java.awt.event.InputMethodEvent");
37857 Clazz_defineMethod (c$, "processHierarchyEvent", 
37858 function (e) {
37859 var listener = this.hierarchyListener;
37860 if (listener != null) {
37861 var id = e.getID ();
37862 switch (id) {
37863 case 1400:
37864 listener.hierarchyChanged (e);
37865 break;
37866 }
37867 }}, "java.awt.event.HierarchyEvent");
37868 Clazz_defineMethod (c$, "processHierarchyBoundsEvent", 
37869 function (e) {
37870 var listener = this.hierarchyBoundsListener;
37871 if (listener != null) {
37872 var id = e.getID ();
37873 switch (id) {
37874 case 1401:
37875 listener.ancestorMoved (e);
37876 break;
37877 case 1402:
37878 listener.ancestorResized (e);
37879 break;
37880 }
37881 }}, "java.awt.event.HierarchyEvent");
37882 Clazz_defineMethod (c$, "handleEvent", 
37883 function (evt) {
37884 switch (evt.id) {
37885 case 504:
37886 return this.mouseEnter (evt, evt.x, evt.y);
37887 case 505:
37888 return this.mouseExit (evt, evt.x, evt.y);
37889 case 503:
37890 return this.mouseMove (evt, evt.x, evt.y);
37891 case 501:
37892 return this.mouseDown (evt, evt.x, evt.y);
37893 case 506:
37894 return this.mouseDrag (evt, evt.x, evt.y);
37895 case 502:
37896 return this.mouseUp (evt, evt.x, evt.y);
37897 case 401:
37898 case 403:
37899 return this.keyDown (evt, evt.key);
37900 case 402:
37901 case 404:
37902 return this.keyUp (evt, evt.key);
37903 case 1001:
37904 return this.action (evt, evt.arg);
37905 case 1004:
37906 return this.gotFocus (evt, evt.arg);
37907 case 1005:
37908 return this.lostFocus (evt, evt.arg);
37909 }
37910 return false;
37911 }, "java.awt.Event");
37912 Clazz_defineMethod (c$, "mouseDown", 
37913 function (evt, x, y) {
37914 return false;
37915 }, "java.awt.Event,~N,~N");
37916 Clazz_defineMethod (c$, "mouseDrag", 
37917 function (evt, x, y) {
37918 return false;
37919 }, "java.awt.Event,~N,~N");
37920 Clazz_defineMethod (c$, "mouseUp", 
37921 function (evt, x, y) {
37922 return false;
37923 }, "java.awt.Event,~N,~N");
37924 Clazz_defineMethod (c$, "mouseMove", 
37925 function (evt, x, y) {
37926 return false;
37927 }, "java.awt.Event,~N,~N");
37928 Clazz_defineMethod (c$, "mouseEnter", 
37929 function (evt, x, y) {
37930 return false;
37931 }, "java.awt.Event,~N,~N");
37932 Clazz_defineMethod (c$, "mouseExit", 
37933 function (evt, x, y) {
37934 return false;
37935 }, "java.awt.Event,~N,~N");
37936 Clazz_defineMethod (c$, "keyDown", 
37937 function (evt, key) {
37938 return false;
37939 }, "java.awt.Event,~N");
37940 Clazz_defineMethod (c$, "keyUp", 
37941 function (evt, key) {
37942 return false;
37943 }, "java.awt.Event,~N");
37944 Clazz_defineMethod (c$, "action", 
37945 function (evt, what) {
37946 return false;
37947 }, "java.awt.Event,~O");
37948 Clazz_defineMethod (c$, "addNotify", 
37949 function () {
37950 this.addNotifyComp ();
37951 });
37952 Clazz_defineMethod (c$, "addNotifyComp", 
37953 function () {
37954 {
37955 var peer = this.peer;
37956 if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
37957 if (peer == null) {
37958 this.peer = peer = this.getToolkit ().createComponent (this);
37959 }if (this.parent != null) {
37960 var mask = 0;
37961 if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) {
37962 mask |= 16;
37963 }if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) {
37964 mask |= 32;
37965 }if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) {
37966 mask |= 131072;
37967 }if (this.focusListener != null || (this.eventMask & 4) != 0) {
37968 mask |= 4;
37969 }if (this.keyListener != null || (this.eventMask & 8) != 0) {
37970 mask |= 8;
37971 }if (mask != 0) {
37972 this.parent.proxyEnableEvents (mask);
37973 }}} else {
37974 var parent = this.parent;
37975 if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) {
37976 this.relocateComponent ();
37977 }}this.invalidate ();
37978 this.peerFont = this.getFont ();
37979 if (this.getContainer () != null && !this.isAddNotifyComplete) {
37980 this.getContainer ().increaseComponentCount (this);
37981 }if (this.parent != null && this.parent.peer != null) {
37982 var parentContPeer = this.parent.peer;
37983 if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
37984 var hwParent = this.getNativeContainer ();
37985 if (hwParent != null && hwParent.peer != null) {
37986 parentContPeer = hwParent.peer;
37987 }}}if (!this.isAddNotifyComplete) {
37988 this.mixOnShowing ();
37989 }this.isAddNotifyComplete = true;
37990 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
37991 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
37992 this.dispatchEvent (e);
37993 }}});
37994 Clazz_defineMethod (c$, "getNativeContainer", 
37995 function () {
37996 var p = this.parent;
37997 while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) {
37998 p = p.getParent ();
37999 }
38000 return p;
38001 });
38002 Clazz_defineMethod (c$, "removeNotify", 
38003 function () {
38004 this.removeNotifyComp ();
38005 });
38006 Clazz_defineMethod (c$, "removeNotifyComp", 
38007 function () {
38008 {
38009 if (this.getContainer () != null && this.isAddNotifyComplete) {
38010 this.getContainer ().decreaseComponentCount (this);
38011 }var p = this.peer;
38012 if (p != null) {
38013 var isLightweight = this.isLightweight ();
38014 this.peer = null;
38015 this.peerFont = null;
38016 java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false);
38017 p.dispose ();
38018 this.mixOnHiding (isLightweight);
38019 this.isAddNotifyComplete = false;
38020 }if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
38021 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
38022 this.dispatchEvent (e);
38023 }}});
38024 Clazz_defineMethod (c$, "gotFocus", 
38025 function (evt, what) {
38026 return false;
38027 }, "java.awt.Event,~O");
38028 Clazz_defineMethod (c$, "lostFocus", 
38029 function (evt, what) {
38030 return false;
38031 }, "java.awt.Event,~O");
38032 Clazz_defineMethod (c$, "isFocusTraversable", 
38033 function () {
38034 if (this.$isFocusTraversableOverridden == 0) {
38035 this.$isFocusTraversableOverridden = 1;
38036 }return this.focusable;
38037 });
38038 Clazz_defineMethod (c$, "isFocusable", 
38039 function () {
38040 return this.isFocusTraversable ();
38041 });
38042 Clazz_defineMethod (c$, "setFocusable", 
38043 function (focusable) {
38044 var oldFocusable;
38045 {
38046 oldFocusable = this.focusable;
38047 this.focusable = focusable;
38048 }this.$isFocusTraversableOverridden = 2;
38049 this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable));
38050 }, "~B");
38051 Clazz_defineMethod (c$, "isFocusTraversableOverridden", 
38052 function () {
38053 return (this.$isFocusTraversableOverridden != 1);
38054 });
38055 Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", 
38056 function () {
38057 return this.focusTraversalKeysEnabled;
38058 });
38059 Clazz_defineMethod (c$, "requestFocus", 
38060 function () {
38061 swingjs.JSToolkit.requestFocus (this);
38062 });
38063 Clazz_defineMethod (c$, "requestFocus", 
38064 function (temporary) {
38065 return swingjs.JSToolkit.requestFocus (this);
38066 }, "~B");
38067 Clazz_defineMethod (c$, "requestFocusInWindow", 
38068 function () {
38069 return swingjs.JSToolkit.requestFocus (this);
38070 });
38071 Clazz_defineMethod (c$, "requestFocusInWindow", 
38072 function (temporary) {
38073 return swingjs.JSToolkit.requestFocus (this);
38074 }, "~B");
38075 Clazz_defineMethod (c$, "getFocusCycleRootAncestor", 
38076 function () {
38077 var rootAncestor = this.parent;
38078 while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) {
38079 rootAncestor = rootAncestor.parent;
38080 }
38081 return rootAncestor;
38082 });
38083 Clazz_defineMethod (c$, "isFocusCycleRoot", 
38084 function (container) {
38085 return this.isFocusCycleRootComp (container);
38086 }, "java.awt.Container");
38087 Clazz_defineMethod (c$, "isFocusCycleRootComp", 
38088 function (container) {
38089 var rootAncestor = this.getFocusCycleRootAncestor ();
38090 return (rootAncestor === container);
38091 }, "java.awt.Container");
38092 Clazz_defineMethod (c$, "hasFocus", 
38093 function () {
38094 return swingjs.JSToolkit.hasFocus (this);
38095 });
38096 Clazz_defineMethod (c$, "isFocusOwner", 
38097 function () {
38098 return this.hasFocus ();
38099 });
38100 Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", 
38101 function (value) {
38102 this.autoFocusTransferOnDisposal = value;
38103 }, "~B");
38104 Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", 
38105 function () {
38106 return this.autoFocusTransferOnDisposal;
38107 });
38108 Clazz_defineMethod (c$, "paramString", 
38109 function () {
38110 return this.paramStringComp ();
38111 });
38112 Clazz_defineMethod (c$, "paramStringComp", 
38113 function () {
38114 var thisName = this.getName ();
38115 var str = (thisName != null ? thisName : "");
38116 if (!this.isValid ()) {
38117 str += ",invalid";
38118 }if (!this.visible) {
38119 str += ",hidden";
38120 }if (!this.enabled) {
38121 str += ",disabled";
38122 }str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height;
38123 return str;
38124 });
38125 Clazz_overrideMethod (c$, "toString", 
38126 function () {
38127 return this.getClass ().getName () + "[" + this.paramString () + "]";
38128 });
38129 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38130 function (listener) {
38131 this.addPropChangeListenerComp (listener);
38132 }, "java.beans.PropertyChangeListener");
38133 Clazz_defineMethod (c$, "addPropChangeListenerComp", 
38134 function (listener) {
38135 {
38136 if (listener == null) {
38137 return;
38138 }if (this.changeSupport == null) {
38139 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38140 }this.changeSupport.addPropertyChangeListener1 (listener);
38141 }}, "java.beans.PropertyChangeListener");
38142 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38143 function (listener) {
38144 {
38145 if (listener == null || this.changeSupport == null) {
38146 return;
38147 }this.changeSupport.removePropertyChangeListener (listener);
38148 }}, "java.beans.PropertyChangeListener");
38149 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38150 function () {
38151 {
38152 if (this.changeSupport == null) {
38153 return  new Array (0);
38154 }return this.changeSupport.getPropertyChangeListeners ();
38155 }});
38156 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38157 function (propertyName, listener) {
38158 this.addPropChangeListComp (propertyName, listener);
38159 }, "~S,java.beans.PropertyChangeListener");
38160 Clazz_defineMethod (c$, "addPropChangeListComp", 
38161 function (propertyName, listener) {
38162 {
38163 if (arguments.length == 1) {
38164 addPropertyChangeListener1(propertyName); return; }
38165 }{
38166 if (listener == null) {
38167 return;
38168 }if (this.changeSupport == null) {
38169 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38170 }this.changeSupport.addPropertyChangeListener2 (propertyName, listener);
38171 }}, "~S,java.beans.PropertyChangeListener");
38172 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38173 function (propertyName, listener) {
38174 {
38175 if (listener == null || this.changeSupport == null) {
38176 return;
38177 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
38178 }}, "~S,java.beans.PropertyChangeListener");
38179 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38180 function (propertyName) {
38181 {
38182 if (this.changeSupport == null) {
38183 return  new Array (0);
38184 }return this.changeSupport.getPropertyChangeListeners (propertyName);
38185 }}, "~S");
38186 Clazz_defineMethod (c$, "firePropertyChange", 
38187 function (propertyName, oldValue, newValue) {
38188 this.firePropertyChangeObject (propertyName, oldValue, newValue);
38189 }, "~S,~O,~O");
38190 Clazz_defineMethod (c$, "firePropertyChangeObject", 
38191 function (propertyName, oldValue, newValue) {
38192 var changeSupport;
38193 {
38194 changeSupport = this.changeSupport;
38195 }if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
38196 return;
38197 }changeSupport.firePropertyChange (propertyName, oldValue, newValue);
38198 }, "~S,~O,~O");
38199 Clazz_defineMethod (c$, "firePropertyChange", 
38200 function (propertyName, oldValue, newValue) {
38201 this.firePropertyChangeBool (propertyName, oldValue, newValue);
38202 }, "~S,~B,~B");
38203 Clazz_defineMethod (c$, "firePropertyChangeBool", 
38204 function (propertyName, oldValue, newValue) {
38205 var changeSupport = this.changeSupport;
38206 if (changeSupport == null || oldValue == newValue) {
38207 return;
38208 }changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
38209 }, "~S,~B,~B");
38210 Clazz_defineMethod (c$, "firePropertyChange", 
38211 function (propertyName, oldValue, newValue) {
38212 this.firePropertyChangeInt (propertyName, oldValue, newValue);
38213 }, "~S,~N,~N");
38214 Clazz_defineMethod (c$, "firePropertyChangeInt", 
38215 function (propertyName, oldValue, newValue) {
38216 var changeSupport = this.changeSupport;
38217 if (changeSupport == null || oldValue == newValue) {
38218 return;
38219 }changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
38220 }, "~S,~N,~N");
38221 Clazz_defineMethod (c$, "firePropertyChange", 
38222 function (propertyName, oldValue, newValue) {
38223 this.firePropertyChangeChar (propertyName, oldValue, newValue);
38224 }, "~S,~S,~S");
38225 Clazz_defineMethod (c$, "firePropertyChangeChar", 
38226 function (propertyName, oldValue, newValue) {
38227 if (this.changeSupport == null || oldValue == newValue) {
38228 return;
38229 }this.firePropertyChangeObject (propertyName,  new Character (oldValue),  new Character (newValue));
38230 }, "~S,~S,~S");
38231 Clazz_defineMethod (c$, "firePropertyChangeShort", 
38232 function (propertyName, oldValue, newValue) {
38233 if (this.changeSupport == null || oldValue == newValue) {
38234 return;
38235 }this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue));
38236 }, "~S,~N,~N");
38237 Clazz_defineMethod (c$, "firePropertyChangeLong", 
38238 function (propertyName, oldValue, newValue) {
38239 if (this.changeSupport == null || oldValue == newValue) {
38240 return;
38241 }this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue));
38242 }, "~S,~N,~N");
38243 Clazz_defineMethod (c$, "firePropertyChangeFloat", 
38244 function (propertyName, oldValue, newValue) {
38245 if (this.changeSupport == null || oldValue == newValue) {
38246 return;
38247 }this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue));
38248 }, "~S,~N,~N");
38249 Clazz_defineMethod (c$, "firePropertyChangeDouble", 
38250 function (propertyName, oldValue, newValue) {
38251 if (this.changeSupport == null || oldValue == newValue) {
38252 return;
38253 }this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue));
38254 }, "~S,~N,~N");
38255 Clazz_defineMethod (c$, "setComponentOrientation", 
38256 function (o) {
38257 var oldValue = this.componentOrientation;
38258 this.componentOrientation = o;
38259 this.firePropertyChangeObject ("componentOrientation", oldValue, o);
38260 this.invalidateIfValid ();
38261 }, "java.awt.ComponentOrientation");
38262 Clazz_defineMethod (c$, "getComponentOrientation", 
38263 function () {
38264 return this.componentOrientation;
38265 });
38266 Clazz_defineMethod (c$, "applyComponentOrientation", 
38267 function (orientation) {
38268 this.applyCompOrientComp (orientation);
38269 }, "java.awt.ComponentOrientation");
38270 Clazz_defineMethod (c$, "applyCompOrientComp", 
38271 function (orientation) {
38272 if (orientation == null) {
38273 throw  new NullPointerException ();
38274 }this.setComponentOrientation (orientation);
38275 }, "java.awt.ComponentOrientation");
38276 Clazz_defineMethod (c$, "canBeFocusOwner", 
38277 function () {
38278 if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) {
38279 return true;
38280 }return false;
38281 });
38282 Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", 
38283 function () {
38284 if (!this.canBeFocusOwner ()) {
38285 return false;
38286 }if (this.parent != null) {
38287 return this.parent.canContainFocusOwner (this);
38288 }return true;
38289 });
38290 Clazz_defineMethod (c$, "relocateComponent", 
38291 function () {
38292 });
38293 Clazz_defineMethod (c$, "getContainingWindow", 
38294 function () {
38295 return jssun.awt.SunToolkit.getContainingWindow (this);
38296 });
38297 c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", 
38298 function (obj, className) {
38299 if (obj == null) return false;
38300 if (className == null) return false;
38301 var cls = obj.getClass ();
38302 while (cls != null) {
38303 if (cls.getName ().equals (className)) {
38304 return true;
38305 }cls = cls.getSuperclass ();
38306 }
38307 return false;
38308 }, "~O,~S");
38309 Clazz_defineMethod (c$, "areBoundsValid", 
38310 function () {
38311 var cont = this.getContainer ();
38312 return cont == null || cont.isValid () || cont.getLayout () == null;
38313 });
38314 Clazz_defineMethod (c$, "getLocationOnWindow", 
38315 function () {
38316 var curLocation = this.getLocation ();
38317 for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) {
38318 curLocation.x += parent.getX ();
38319 curLocation.y += parent.getY ();
38320 }
38321 return curLocation;
38322 });
38323 Clazz_defineMethod (c$, "getSiblingIndexAbove", 
38324 function () {
38325 var parent = this.getContainer ();
38326 if (parent == null) {
38327 return -1;
38328 }var nextAbove = parent.getComponentZOrder (this) - 1;
38329 return nextAbove < 0 ? -1 : nextAbove;
38330 });
38331 Clazz_defineMethod (c$, "getSiblingIndexBelow", 
38332 function () {
38333 var parent = this.getContainer ();
38334 if (parent == null) {
38335 return -1;
38336 }var nextBelow = parent.getComponentZOrder (this) + 1;
38337 return nextBelow >= parent.getComponentCount () ? -1 : nextBelow;
38338 });
38339 Clazz_defineMethod (c$, "mixOnShowing", 
38340 function () {
38341 });
38342 Clazz_defineMethod (c$, "mixOnHiding", 
38343 function (isLightweight) {
38344 }, "~B");
38345 Clazz_defineMethod (c$, "mixOnReshaping", 
38346 function () {
38347 swingjs.JSToolkit.taintUI (this);
38348 });
38349 Clazz_defineMethod (c$, "mixOnZOrderChanging", 
38350 function (oldZorder, newZorder) {
38351 }, "~N,~N");
38352 Clazz_defineMethod (c$, "mixOnValidating", 
38353 function () {
38354 });
38355 c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", 
38356  function (cls, interfaceName) {
38357 if (cls == null) return false;
38358 for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
38359 if (c.getName ().equals (interfaceName)) {
38360 return true;
38361 }}
38362 return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName);
38363 }, "Class,~S");
38364 c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", 
38365 function (obj, interfaceName) {
38366 if (obj == null) return false;
38367 if (interfaceName == null) return false;
38368 return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName);
38369 }, "~O,~S");
38370 Clazz_pu$h(self.c$);
38371 c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum);
38372 Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []);
38373 Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []);
38374 Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []);
38375 Clazz_defineEnumConstant (c$, "OTHER", 3, []);
38376 c$ = Clazz_p0p ();
38377 Clazz_pu$h(self.c$);
38378 c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock");
38379 c$ = Clazz_p0p ();
38380 Clazz_defineStatics (c$,
38381 "FOCUS_TRAVERSABLE_UNKNOWN", 0,
38382 "FOCUS_TRAVERSABLE_DEFAULT", 1,
38383 "FOCUS_TRAVERSABLE_SET", 2,
38384 "actionListenerK", "actionL",
38385 "adjustmentListenerK", "adjustmentL",
38386 "componentListenerK", "componentL",
38387 "containerListenerK", "containerL",
38388 "focusListenerK", "focusL",
38389 "itemListenerK", "itemL",
38390 "keyListenerK", "keyL",
38391 "mouseListenerK", "mouseL",
38392 "mouseMotionListenerK", "mouseMotionL",
38393 "mouseWheelListenerK", "mouseWheelL",
38394 "textListenerK", "textL",
38395 "ownedWindowK", "ownedL",
38396 "windowListenerK", "windowL",
38397 "inputMethodListenerK", "inputMethodL",
38398 "hierarchyListenerK", "hierarchyL",
38399 "hierarchyBoundsListenerK", "hierarchyBoundsL",
38400 "windowStateListenerK", "windowStateL",
38401 "windowFocusListenerK", "windowFocusL",
38402 "isInc", false,
38403 "incRate", 0,
38404 "TOP_ALIGNMENT", 0.0,
38405 "CENTER_ALIGNMENT", 0.5,
38406 "BOTTOM_ALIGNMENT", 1.0,
38407 "LEFT_ALIGNMENT", 0.0,
38408 "RIGHT_ALIGNMENT", 1.0,
38409 "incr", 0);
38410 c$.coalesceMap = c$.prototype.coalesceMap =  new java.util.HashMap ();
38411 });
38412 Clazz_declarePackage ("jssun.awt");
38413 Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () {
38414 c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback");
38415 Clazz_defineMethod (c$, "constrainGraphics", 
38416 function (g, bounds) {
38417 if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) {
38418 (g).constrain (bounds.x, bounds.y, bounds.width, bounds.height);
38419 } else {
38420 g.translate (bounds.x, bounds.y);
38421 }g.clipRect (0, 0, bounds.width, bounds.height);
38422 }, "java.awt.Graphics,java.awt.Rectangle");
38423 Clazz_defineMethod (c$, "runOneComponent", 
38424 function (comp, bounds, g, clip, weightFlags) {
38425 if (comp == null || !comp.isLightweight () || !comp.isVisible ()) {
38426 return;
38427 }var lightweight = comp.isLightweight ();
38428 if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) {
38429 return;
38430 }if (bounds == null) {
38431 bounds = comp.getBounds ();
38432 }if (clip == null || clip.intersects (bounds)) {
38433 var cg = g.createSwingJS ();
38434 try {
38435 this.constrainGraphics (cg, bounds);
38436 cg.setFont (comp.getFont ());
38437 cg.setColor (comp.getForeground ());
38438 if (Clazz_instanceOf (cg, java.awt.Graphics2D)) {
38439 (cg).setBackground (comp.getBackground ());
38440 } else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) {
38441 (cg).setBackground (comp.getBackground ());
38442 }this.run (comp, cg);
38443 } finally {
38444 cg.dispose ();
38445 }
38446 }}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N");
38447 Clazz_defineMethod (c$, "runComponents", 
38448 function (comps, g, weightFlags) {
38449 var ncomponents = comps.length;
38450 var clip = g.getClip ();
38451 for (var i = ncomponents - 1; i >= 0; i--) {
38452 this.runOneComponent (comps[i], null, g, clip, weightFlags);
38453 }
38454 }, "~A,java.awt.Graphics,~N");
38455 Clazz_pu$h(self.c$);
38456 c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback);
38457 Clazz_makeConstructor (c$, 
38458  function () {
38459 Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []);
38460 });
38461 Clazz_overrideMethod (c$, "run", 
38462 function (a, b) {
38463 if (!a.isLightweight ()) {
38464 a.paintAll (b);
38465 } else if (Clazz_instanceOf (a, java.awt.Container)) {
38466 this.runComponents ((a).getComponents (), b, 3);
38467 }}, "java.awt.Component,java.awt.Graphics");
38468 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
38469 function () {
38470 return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance;
38471 });
38472 c$.instance = c$.prototype.instance =  new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback ();
38473 c$ = Clazz_p0p ();
38474 Clazz_defineStatics (c$,
38475 "HEAVYWEIGHTS", 0x1,
38476 "LIGHTWEIGHTS", 0x2,
38477 "TWO_PASSES", 0x4);
38478 });
38479 Clazz_declarePackage ("javax.swing");
38480 Clazz_load (["java.util.HashMap", "java.awt.Rectangle"], "javax.swing.RepaintManager", ["java.lang.StringBuffer", "$.Thread", "java.util.ArrayList", "$.HashSet", "$.IdentityHashMap", "java.applet.Applet", "java.awt.Frame", "$.Toolkit", "$.Window", "java.awt.event.InvocationEvent", "javax.swing.CellRendererPane", "$.JComponent", "$.SwingUtilities", "jssun.awt.AWTAccessor", "$.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () {
38481 c$ = Clazz_decorateAsClass (function () {
38482 this.volatileMap = null;
38483 this.hwDirtyComponents = null;
38484 this.dirtyComponents = null;
38485 this.tmpDirtyComponents = null;
38486 this.invalidComponents = null;
38487 this.runnableList = null;
38488 this.paintDepth = 0;
38489 this.painting = false;
38490 this.repaintRoot = null;
38491 this.paintThread = null;
38492 this.processingRunnable = null;
38493 this.myComponent = null;
38494 this.tmp = null;
38495 if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) {
38496 javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ ();
38497 }
38498 Clazz_instantialize (this, arguments);
38499 }, javax.swing, "RepaintManager");
38500 Clazz_prepareFields (c$, function () {
38501 this.volatileMap =  new java.util.HashMap (1);
38502 this.tmp =  new java.awt.Rectangle ();
38503 });
38504 c$.currentManager = Clazz_defineMethod (c$, "currentManager", 
38505 function (c) {
38506 var appContext = jssun.awt.AppContext.getAppContext ();
38507 var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey);
38508 if (rm == null) {
38509 rm =  new javax.swing.RepaintManager ();
38510 rm.set (c);
38511 appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm);
38512 }return rm;
38513 }, "java.awt.Component");
38514 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
38515 function (aRepaintManager) {
38516 if (aRepaintManager != null) {
38517 javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager);
38518 } else {
38519 javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey);
38520 }}, "javax.swing.RepaintManager");
38521 Clazz_makeConstructor (c$, 
38522  function () {
38523 this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null);
38524 });
38525 Clazz_defineMethod (c$, "set", 
38526  function (c) {
38527 this.myComponent = c;
38528 this.dirtyComponents =  new java.util.IdentityHashMap ();
38529 this.tmpDirtyComponents =  new java.util.IdentityHashMap ();
38530 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38531 }, "java.awt.Component");
38532 Clazz_defineMethod (c$, "addInvalidComponent", 
38533 function (invalidComponent) {
38534 var validateRoot = null;
38535 for (var c = invalidComponent; c != null; c = c.getParent ()) {
38536 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) {
38537 return;
38538 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
38539 validateRoot = c;
38540 break;
38541 }}
38542 if (validateRoot == null) {
38543 return;
38544 }var root = null;
38545 for (var c = validateRoot; c != null; c = c.getParent ()) {
38546 if (!c.isVisible ()) {
38547 return;
38548 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
38549 root = c;
38550 break;
38551 }}
38552 if (root == null) {
38553 return;
38554 }if (this.invalidComponents == null) {
38555 this.invalidComponents =  new java.util.ArrayList ();
38556 } else {
38557 var n = this.invalidComponents.size ();
38558 for (var i = 0; i < n; i++) {
38559 if (validateRoot === this.invalidComponents.get (i)) {
38560 return;
38561 }}
38562 }this.invalidComponents.add (validateRoot);
38563 this.scheduleProcessingRunnable (root);
38564 }, "javax.swing.JComponent");
38565 Clazz_defineMethod (c$, "removeInvalidComponent", 
38566 function (component) {
38567 if (this.invalidComponents != null) {
38568 var index = this.invalidComponents.indexOf (component);
38569 if (index != -1) {
38570 this.invalidComponents.remove (index);
38571 }}}, "javax.swing.JComponent");
38572 Clazz_defineMethod (c$, "addDirtyRegion0", 
38573  function (c, x, y, w, h) {
38574 {
38575 var g = c.getGraphics();
38576 if (g == null || g.gc == null)return;
38577 }if ((w <= 0) || (h <= 0) || (c == null)) {
38578 return;
38579 }if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) {
38580 return;
38581 }if (this.extendDirtyRegion (c, x, y, w, h)) {
38582 return;
38583 }var root = null;
38584 for (var p = c; p != null; p = p.getParent ()) {
38585 if (!p.isVisible () || p.getPeer () == null) {
38586 return;
38587 }if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) {
38588 if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) {
38589 return;
38590 }root = p;
38591 break;
38592 }}
38593 if (root == null) return;
38594 {
38595 if (this.extendDirtyRegion (c, x, y, w, h)) {
38596 return;
38597 }this.dirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38598 }this.scheduleProcessingRunnable (c);
38599 }, "java.awt.Container,~N,~N,~N,~N");
38600 Clazz_defineMethod (c$, "addDirtyRegion", 
38601 function (c, x, y, w, h) {
38602 this.addDirtyRegion0 (c, x, y, w, h);
38603 }, "javax.swing.JComponent,~N,~N,~N,~N");
38604 Clazz_defineMethod (c$, "addDirtyRegion", 
38605 function (window, x, y, w, h) {
38606 this.addDirtyRegion0 (window, x, y, w, h);
38607 }, "java.awt.Window,~N,~N,~N,~N");
38608 Clazz_defineMethod (c$, "addDirtyRegion", 
38609 function (applet, x, y, w, h) {
38610 this.addDirtyRegion0 (applet, x, y, w, h);
38611 }, "java.applet.Applet,~N,~N,~N,~N");
38612 Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", 
38613 function () {
38614 var hws;
38615 {
38616 if (this.hwDirtyComponents.size () == 0) {
38617 return;
38618 }hws = this.hwDirtyComponents;
38619 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38620 }for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) {
38621 var dirty = hws.get (hw);
38622 if (Clazz_instanceOf (hw, java.awt.Window)) {
38623 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38624 } else if (Clazz_instanceOf (hw, java.applet.Applet)) {
38625 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38626 } else {
38627 this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38628 }}
38629 });
38630 Clazz_defineMethod (c$, "nativeAddDirtyRegion", 
38631 function (appContext, c, x, y, w, h) {
38632 if (w > 0 && h > 0) {
38633 {
38634 var dirty = this.hwDirtyComponents.get (c);
38635 if (dirty == null) {
38636 this.hwDirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38637 } else {
38638 this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty));
38639 }}this.scheduleProcessingRunnable (appContext);
38640 }}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N");
38641 Clazz_defineMethod (c$, "extendDirtyRegion", 
38642  function (c, x, y, w, h) {
38643 var r = this.dirtyComponents.get (c);
38644 if (r != null) {
38645 javax.swing.SwingUtilities.computeUnion (x, y, w, h, r);
38646 return true;
38647 }return false;
38648 }, "java.awt.Component,~N,~N,~N,~N");
38649 Clazz_defineMethod (c$, "getDirtyRegion", 
38650 function (aComponent) {
38651 var r = null;
38652 {
38653 r = this.dirtyComponents.get (aComponent);
38654 }if (r == null) return  new java.awt.Rectangle (0, 0, 0, 0);
38655  else return  new java.awt.Rectangle (r);
38656 }, "javax.swing.JComponent");
38657 Clazz_defineMethod (c$, "markCompletelyDirty", 
38658 function (aComponent) {
38659 this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647);
38660 }, "javax.swing.JComponent");
38661 Clazz_defineMethod (c$, "markCompletelyClean", 
38662 function (aComponent) {
38663 {
38664 this.dirtyComponents.remove (aComponent);
38665 }}, "javax.swing.JComponent");
38666 Clazz_defineMethod (c$, "isCompletelyDirty", 
38667 function (aComponent) {
38668 var r;
38669 r = this.getDirtyRegion (aComponent);
38670 if (r.width == 2147483647 && r.height == 2147483647) return true;
38671  else return false;
38672 }, "javax.swing.JComponent");
38673 Clazz_defineMethod (c$, "validateInvalidComponents", 
38674 function () {
38675 var ic;
38676 {
38677 if (this.invalidComponents == null) {
38678 return;
38679 }ic = this.invalidComponents;
38680 this.invalidComponents = null;
38681 }var n = ic.size ();
38682 for (var i = 0; i < n; i++) {
38683 var c = ic.get (i);
38684 c.validate ();
38685 }
38686 });
38687 Clazz_defineMethod (c$, "prePaintDirtyRegions", 
38688  function () {
38689 var dirtyComponents;
38690 var runnableList;
38691 {
38692 dirtyComponents = this.dirtyComponents;
38693 runnableList = this.runnableList;
38694 this.runnableList = null;
38695 }if (runnableList != null) {
38696 for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) {
38697 runnable.run ();
38698 }
38699 }this.paintDirtyRegions ();
38700 if (dirtyComponents.size () > 0) {
38701 this.paintDirtyRegions1 (dirtyComponents);
38702 }});
38703 Clazz_defineMethod (c$, "updateWindows", 
38704  function (dirtyComponents) {
38705 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
38706 if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) {
38707 return dirtyComponents;
38708 }var windows =  new java.util.HashSet ();
38709 var dirtyComps = dirtyComponents.keySet ();
38710 for (var it = dirtyComps.iterator (); it.hasNext (); ) {
38711 var dirty = it.next ();
38712 var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty);
38713 if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) {
38714 it.remove ();
38715 windows.add (window);
38716 }}
38717 for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) {
38718 jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null);
38719 }
38720 return dirtyComponents;
38721 }, "java.util.Map");
38722 Clazz_defineMethod (c$, "paintDirtyRegions", 
38723 function () {
38724 {
38725 var tmp = this.tmpDirtyComponents;
38726 this.tmpDirtyComponents = this.dirtyComponents;
38727 this.dirtyComponents = tmp;
38728 this.dirtyComponents.clear ();
38729 }this.paintDirtyRegions1 (this.tmpDirtyComponents);
38730 });
38731 Clazz_defineMethod (c$, "paintDirtyRegions1", 
38732  function (tmpDirtyComponents) {
38733 if (tmpDirtyComponents.isEmpty ()) {
38734 return;
38735 }this.updateWindows (tmpDirtyComponents);
38736 var roots =  new java.util.ArrayList (tmpDirtyComponents.size ());
38737 for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) {
38738 this.collectDirtyComponents (tmpDirtyComponents, dirty, roots);
38739 }
38740 var count = roots.size ();
38741 this.painting = true;
38742 try {
38743 for (var j = 0; j < count; j++) {
38744 var i = j;
38745 var dirtyComponent = roots.get (j);
38746 var rect = tmpDirtyComponents.get (dirtyComponent);
38747 var localBoundsH = dirtyComponent.getHeight ();
38748 var localBoundsW = dirtyComponent.getWidth ();
38749 javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect);
38750 if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) {
38751 (dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height);
38752 } else if (dirtyComponent.isShowing ()) {
38753 var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent);
38754 if (g != null) {
38755 try {
38756 dirtyComponent.paint (g);
38757 } finally {
38758 g.dispose ();
38759 }
38760 }}if (this.repaintRoot != null) {
38761 this.adjustRoots (this.repaintRoot, roots, i + 1);
38762 count = roots.size ();
38763 this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ());
38764 this.repaintRoot = null;
38765 }}
38766 } finally {
38767 this.painting = false;
38768 }
38769 tmpDirtyComponents.clear ();
38770 }, "java.util.Map");
38771 Clazz_defineMethod (c$, "adjustRoots", 
38772  function (root, roots, index) {
38773 for (var i = roots.size () - 1; i >= index; i--) {
38774 var c = roots.get (i);
38775 for (; ; ) {
38776 if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) {
38777 break;
38778 }c = c.getParent ();
38779 }
38780 if (c === root) {
38781 roots.remove (i);
38782 }}
38783 }, "javax.swing.JComponent,java.util.List,~N");
38784 Clazz_defineMethod (c$, "collectDirtyComponents", 
38785 function (dirtyComponents, dirtyComponent, roots) {
38786 var dx;
38787 var dy;
38788 var rootDx;
38789 var rootDy;
38790 var component;
38791 var rootDirtyComponent;
38792 var parent;
38793 component = rootDirtyComponent = dirtyComponent;
38794 var x = dirtyComponent.getX ();
38795 var y = dirtyComponent.getY ();
38796 var w = dirtyComponent.getWidth ();
38797 var h = dirtyComponent.getHeight ();
38798 dx = rootDx = 0;
38799 dy = rootDy = 0;
38800 this.tmp.setBounds (dirtyComponents.get (dirtyComponent));
38801 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38802 if (this.tmp.isEmpty ()) {
38803 return;
38804 }for (; ; ) {
38805 if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break;
38806 parent = component.getParent ();
38807 if (parent == null) break;
38808 component = parent;
38809 dx += x;
38810 dy += y;
38811 this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y);
38812 x = component.getX ();
38813 y = component.getY ();
38814 w = component.getWidth ();
38815 h = component.getHeight ();
38816 this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38817 if (this.tmp.isEmpty ()) {
38818 return;
38819 }if (dirtyComponents.get (component) != null) {
38820 rootDirtyComponent = component;
38821 rootDx = dx;
38822 rootDy = dy;
38823 }}
38824 if (dirtyComponent !== rootDirtyComponent) {
38825 var r;
38826 this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy);
38827 r = dirtyComponents.get (rootDirtyComponent);
38828 javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r);
38829 }if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent);
38830 }, "java.util.Map,java.awt.Component,java.util.List");
38831 Clazz_overrideMethod (c$, "toString", 
38832 function () {
38833 var sb =  new StringBuffer ();
38834 if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents);
38835 return sb.toString ();
38836 });
38837 Clazz_defineMethod (c$, "getOffscreenBuffer", 
38838 function (c, proposedWidth, proposedHeight) {
38839 return null;
38840 }, "java.awt.Component,~N,~N");
38841 Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", 
38842 function (c, proposedWidth, proposedHeight) {
38843 var config = c.getGraphicsConfiguration ();
38844 var maxSize = this.getDoubleBufferMaximumSize ();
38845 var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth);
38846 var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight);
38847 var image = this.volatileMap.get (config);
38848 if (image == null || image.getWidth () < width || image.getHeight () < height) {
38849 if (image != null) {
38850 image.flush ();
38851 }image = config.createCompatibleVolatileImage (width, height);
38852 this.volatileMap.put (config, image);
38853 }return image;
38854 }, "java.awt.Component,~N,~N");
38855 Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", 
38856 function (d) {
38857 }, "java.awt.Dimension");
38858 Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", 
38859 function () {
38860 return null;
38861 });
38862 Clazz_defineMethod (c$, "setDoubleBufferingEnabled", 
38863 function (aFlag) {
38864 }, "~B");
38865 Clazz_defineMethod (c$, "resetDoubleBuffer", 
38866 function () {
38867 });
38868 Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", 
38869 function (gc) {
38870 var image = this.volatileMap.remove (gc);
38871 if (image != null) {
38872 image.flush ();
38873 }}, "java.awt.GraphicsConfiguration");
38874 Clazz_defineMethod (c$, "useVolatileDoubleBuffer", 
38875 function () {
38876 return javax.swing.RepaintManager.volatileImageBufferEnabled;
38877 });
38878 Clazz_defineMethod (c$, "isPaintingThread", 
38879  function () {
38880 return (Thread.currentThread () === this.paintThread);
38881 });
38882 Clazz_defineMethod (c$, "paint", 
38883 function (paintingComponent, bufferComponent, g, x, y, w, h) {
38884 paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h);
38885 }, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N");
38886 Clazz_defineMethod (c$, "beginPaint", 
38887 function () {
38888 var multiThreadedPaint = false;
38889 var paintDepth = 0;
38890 var currentThread = Thread.currentThread ();
38891 {
38892 paintDepth = this.paintDepth;
38893 if (this.paintThread == null || currentThread === this.paintThread) {
38894 this.paintThread = currentThread;
38895 this.paintDepth++;
38896 } else {
38897 multiThreadedPaint = true;
38898 }}});
38899 Clazz_defineMethod (c$, "endPaint", 
38900 function () {
38901 if (this.isPaintingThread ()) {
38902 }});
38903 Clazz_defineMethod (c$, "doubleBufferingChanged", 
38904 function (rootPane) {
38905 }, "javax.swing.JRootPane");
38906 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38907  function (c) {
38908 this.scheduleProcessingRunnable (c.getAppContext ());
38909 }, "java.awt.Component");
38910 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38911  function (context) {
38912 if (this.processingRunnable.markPending ()) {
38913 jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable));
38914 }}, "jssun.awt.AppContext");
38915 c$.$RepaintManager$ProcessingRunnable$ = function () {
38916 Clazz_pu$h(self.c$);
38917 c$ = Clazz_decorateAsClass (function () {
38918 Clazz_prepareCallback (this, arguments);
38919 this.pending = false;
38920 Clazz_instantialize (this, arguments);
38921 }, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable);
38922 Clazz_defineMethod (c$, "markPending", 
38923 function () {
38924 if (!this.pending) {
38925 this.pending = true;
38926 return true;
38927 }return false;
38928 });
38929 Clazz_overrideMethod (c$, "run", 
38930 function () {
38931 {
38932 this.pending = false;
38933 }this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints ();
38934 this.b$["javax.swing.RepaintManager"].validateInvalidComponents ();
38935 this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions ();
38936 swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent);
38937 });
38938 c$ = Clazz_p0p ();
38939 };
38940 Clazz_defineStatics (c$,
38941 "HANDLE_TOP_LEVEL_PAINT", false);
38942 c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager;
38943 Clazz_defineStatics (c$,
38944 "volatileImageBufferEnabled", true);
38945 {
38946 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38947 var headless = false;
38948 if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) {
38949 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38950 }javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true;
38951 }});
38952 Clazz_declarePackage ("jssun.awt");
38953 Clazz_load (["java.awt.Toolkit", "jssun.awt.ComponentFactory", "$.WindowClosingListener", "$.WindowClosingSupport", "java.util.HashMap"], "jssun.awt.SunToolkit", ["java.lang.NullPointerException", "$.Thread", "java.awt.Component", "$.Dimension", "$.EventQueue", "$.Panel", "$.Window", "jssun.awt.AWTAccessor", "$.AWTAutoShutdown", "$.AppContext", "$.PeerEvent", "$.PostEventQueue", "jssun.font.FontDesignMetrics"], function () {
38954 c$ = Clazz_decorateAsClass (function () {
38955 this.windowClosingListener = null;
38956 Clazz_instantialize (this, arguments);
38957 }, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]);
38958 Clazz_makeConstructor (c$, 
38959 function () {
38960 Clazz_superConstructor (this, jssun.awt.SunToolkit, []);
38961 var eventQueue;
38962 eventQueue =  new java.awt.EventQueue ();
38963 var appContext = jssun.awt.AppContext.getAppContext ();
38964 if (appContext != null) {
38965 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38966 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38967 appContext.put ("PostEventQueue", postEventQueue);
38968 }});
38969 Clazz_defineMethod (c$, "useBufferPerWindow", 
38970 function () {
38971 return false;
38972 });
38973 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38974 function () {
38975 var threadGroup = Thread.currentThread ().getThreadGroup ();
38976 return jssun.awt.SunToolkit.createNewAppContext (threadGroup);
38977 });
38978 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38979 function (threadGroup) {
38980 var eventQueue;
38981 var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue");
38982 try {
38983 eventQueue = Clazz._4Name (eqName).newInstance ();
38984 } catch (e) {
38985 if (Clazz_exceptionOf (e, Exception)) {
38986 System.err.println ("Failed loading " + eqName + ": " + e);
38987 eventQueue =  new java.awt.EventQueue ();
38988 } else {
38989 throw e;
38990 }
38991 }
38992 var appContext =  new jssun.awt.AppContext (threadGroup);
38993 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38994 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38995 appContext.put ("PostEventQueue", postEventQueue);
38996 return appContext;
38997 }, "ThreadGroup");
38998 c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", 
38999 function (q, isShutdown) {
39000 q.wakeup (isShutdown);
39001 }, "java.awt.EventQueue,~B");
39002 c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", 
39003 function (target) {
39004 if (target != null) {
39005 return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target);
39006 }return null;
39007 }, "~O");
39008 c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", 
39009 function (target, peer) {
39010 if (target != null && peer != null) {
39011 jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer);
39012 }}, "~O,~O");
39013 c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", 
39014 function (target, peer) {
39015 if (target != null && peer != null) {
39016 jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer);
39017 }}, "~O,~O");
39018 c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", 
39019  function (target, context) {
39020 if (Clazz_instanceOf (target, java.awt.Component)) {
39021 jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context);
39022 } else {
39023 return false;
39024 }return true;
39025 }, "~O,jssun.awt.AppContext");
39026 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
39027  function (target) {
39028 if (Clazz_instanceOf (target, java.awt.Component)) {
39029 {
39030 return target.appContext;
39031 }} else {
39032 return null;
39033 }}, "~O");
39034 c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", 
39035 function (target) {
39036 if (target == null) {
39037 return null;
39038 }var context = jssun.awt.SunToolkit.getAppContext (target);
39039 if (context == null) {
39040 context = jssun.awt.SunToolkit.appContextMap.get (target);
39041 }return context;
39042 }, "~O");
39043 c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", 
39044 function (changed, status) {
39045 jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status);
39046 }, "java.awt.Window,~B");
39047 c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", 
39048 function (cont, isSwingCont) {
39049 }, "java.awt.Container,~B");
39050 c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", 
39051 function (target, appContext) {
39052 if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) {
39053 jssun.awt.SunToolkit.appContextMap.put (target, appContext);
39054 }}, "~O,jssun.awt.AppContext");
39055 c$.postEvent = Clazz_defineMethod (c$, "postEvent", 
39056 function (appContext, event) {
39057 if (event == null) {
39058 throw  new NullPointerException ();
39059 }var postEventQueue = appContext.get ("PostEventQueue");
39060 if (postEventQueue != null) {
39061 postEventQueue.postEvent (event);
39062 }}, "jssun.awt.AppContext,java.awt.AWTEvent");
39063 c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", 
39064 function (e) {
39065 var pe =  new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), ((Clazz_isClassDefined ("jssun.awt.SunToolkit$1") ? 0 : jssun.awt.SunToolkit.$SunToolkit$1$ ()), Clazz_innerTypeInstance (jssun.awt.SunToolkit$1, this, Clazz_cloneFinals ("e", e))), 2);
39066 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe);
39067 }, "java.awt.AWTEvent");
39068 c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", 
39069 function () {
39070 var appContext = jssun.awt.AppContext.getAppContext ();
39071 var postEventQueue = appContext.get ("PostEventQueue");
39072 if (postEventQueue != null) {
39073 postEventQueue.flush ();
39074 }});
39075 c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", 
39076 function () {
39077 var appContext = jssun.awt.AppContext.getAppContext ();
39078 var postEventQueue = appContext.get ("PostEventQueue");
39079 return (postEventQueue == null || postEventQueue.noEvents ());
39080 });
39081 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39082 function (target, runnable) {
39083 jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1));
39084 }, "~O,Runnable");
39085 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39086 function (target, runnable, when) {
39087 jssun.awt.SunToolkit.executeOnEventHandlerThread (((Clazz_isClassDefined ("jssun.awt.SunToolkit$2") ? 0 : jssun.awt.SunToolkit.$SunToolkit$2$ ()), Clazz_innerTypeInstance (jssun.awt.SunToolkit$2, this, Clazz_cloneFinals ("when", when), target, runnable, 1)));
39088 }, "~O,Runnable,~N");
39089 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39090 function (peerEvent) {
39091 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent);
39092 }, "jssun.awt.PeerEvent");
39093 c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", 
39094 function (appContext, dispatcher) {
39095 jssun.awt.SunToolkit.postEvent (appContext,  new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1));
39096 }, "jssun.awt.AppContext,Runnable");
39097 c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", 
39098 function (target) {
39099 var appContext = jssun.awt.SunToolkit.targetToAppContext (target);
39100 var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39101 var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39102 while (next != null) {
39103 eq = next;
39104 next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39105 }
39106 return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq));
39107 }, "~O");
39108 Clazz_overrideMethod (c$, "getScreenSize", 
39109 function () {
39110 return  new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ());
39111 });
39112 Clazz_overrideMethod (c$, "getFontMetrics", 
39113 function (font) {
39114 return jssun.font.FontDesignMetrics.getMetrics (font);
39115 }, "java.awt.Font");
39116 Clazz_overrideMethod (c$, "getFontList", 
39117 function () {
39118 var hardwiredFontList =  Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
39119 return hardwiredFontList;
39120 });
39121 Clazz_overrideMethod (c$, "createPanel", 
39122 function (target) {
39123 return this.createComponent (target);
39124 }, "java.awt.Panel");
39125 Clazz_defineMethod (c$, "disableBackgroundErase", 
39126 function (component) {
39127 this.disableBackgroundEraseImpl (component);
39128 }, "java.awt.Component");
39129 Clazz_defineMethod (c$, "disableBackgroundEraseImpl", 
39130  function (component) {
39131 jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true);
39132 }, "java.awt.Component");
39133 c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", 
39134 function () {
39135 return false;
39136 });
39137 c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", 
39138 function () {
39139 return true;
39140 });
39141 Clazz_defineMethod (c$, "setOverrideRedirect", 
39142 function (target) {
39143 }, "java.awt.Window");
39144 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39145 function (tk, url) {
39146 var img = jssun.awt.SunToolkit.imgCache.get (url);
39147 if (img == null) {
39148 try {
39149 img = tk.createImage (url);
39150 jssun.awt.SunToolkit.imgCache.put (url, img);
39151 } catch (e) {
39152 if (Clazz_exceptionOf (e, Exception)) {
39153 } else {
39154 throw e;
39155 }
39156 }
39157 }return img;
39158 }, "java.awt.Toolkit,java.net.URL");
39159 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39160 function (tk, filename) {
39161 var img = jssun.awt.SunToolkit.imgCache.get (filename);
39162 if (img == null) {
39163 try {
39164 tk.createImage (filename);
39165 jssun.awt.SunToolkit.imgCache.put (filename, img);
39166 } catch (e) {
39167 if (Clazz_exceptionOf (e, Exception)) {
39168 } else {
39169 throw e;
39170 }
39171 }
39172 }return img;
39173 }, "java.awt.Toolkit,~S");
39174 Clazz_defineMethod (c$, "getImage", 
39175 function (filename) {
39176 return jssun.awt.SunToolkit.getImageFromHash (this, filename);
39177 }, "~S");
39178 Clazz_defineMethod (c$, "getImage", 
39179 function (url) {
39180 return jssun.awt.SunToolkit.getImageFromHash (this, url);
39181 }, "java.net.URL");
39182 Clazz_overrideMethod (c$, "checkImage", 
39183 function (img, w, h, o) {
39184 return 0;
39185 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39186 Clazz_overrideMethod (c$, "prepareImage", 
39187 function (img, w, h, o) {
39188 if (w == 0 || h == 0) {
39189 return true;
39190 }return true;
39191 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39192 Clazz_overrideMethod (c$, "getSystemEventQueueImpl", 
39193 function () {
39194 return jssun.awt.SunToolkit.getSystemEventQueueImplPP ();
39195 });
39196 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39197 function () {
39198 return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ());
39199 });
39200 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39201 function (appContext) {
39202 var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39203 return theEventQueue;
39204 }, "jssun.awt.AppContext");
39205 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
39206 function (c) {
39207 return java.awt.Toolkit.getNativeContainer (c);
39208 }, "java.awt.Component");
39209 Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", 
39210 function () {
39211 return false;
39212 });
39213 c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", 
39214 function () {
39215 if (jssun.awt.SunToolkit.startupLocale == null) {
39216 {
39217 }}return jssun.awt.SunToolkit.startupLocale;
39218 });
39219 Clazz_defineMethod (c$, "getDefaultKeyboardLocale", 
39220 function () {
39221 return jssun.awt.SunToolkit.getStartupLocale ();
39222 });
39223 c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", 
39224 function (className) {
39225 jssun.awt.SunToolkit.dataTransfererClassName = className;
39226 }, "~S");
39227 c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", 
39228 function () {
39229 if (jssun.awt.SunToolkit.dataTransfererClassName == null) {
39230 java.awt.Toolkit.getDefaultToolkit ();
39231 }return jssun.awt.SunToolkit.dataTransfererClassName;
39232 });
39233 Clazz_overrideMethod (c$, "getWindowClosingListener", 
39234 function () {
39235 return this.windowClosingListener;
39236 });
39237 Clazz_overrideMethod (c$, "setWindowClosingListener", 
39238 function (wcl) {
39239 this.windowClosingListener = wcl;
39240 }, "jssun.awt.WindowClosingListener");
39241 Clazz_defineMethod (c$, "windowClosingNotify", 
39242 function (event) {
39243 if (this.windowClosingListener != null) {
39244 return this.windowClosingListener.windowClosingNotify (event);
39245 } else {
39246 return null;
39247 }}, "java.awt.event.WindowEvent");
39248 Clazz_defineMethod (c$, "windowClosingDelivered", 
39249 function (event) {
39250 if (this.windowClosingListener != null) {
39251 return this.windowClosingListener.windowClosingDelivered (event);
39252 } else {
39253 return null;
39254 }}, "java.awt.event.WindowEvent");
39255 c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", 
39256 function (window) {
39257 return true;
39258 }, "java.awt.Window");
39259 c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", 
39260 function (comp) {
39261 if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) {
39262 return true;
39263 }return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window));
39264 }, "java.awt.Component");
39265 Clazz_defineMethod (c$, "getDesktopAAHints", 
39266 function () {
39267 return null;
39268 });
39269 c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", 
39270 function (comp) {
39271 while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) {
39272 comp = comp.getParent ();
39273 }
39274 return comp;
39275 }, "java.awt.Component");
39276 Clazz_defineMethod (c$, "isNativeGTKAvailable", 
39277 function () {
39278 return false;
39279 });
39280 Clazz_defineMethod (c$, "isWindowOpacitySupported", 
39281 function () {
39282 return false;
39283 });
39284 Clazz_defineMethod (c$, "isWindowShapingSupported", 
39285 function () {
39286 return false;
39287 });
39288 Clazz_defineMethod (c$, "isWindowTranslucencySupported", 
39289 function () {
39290 return false;
39291 });
39292 Clazz_defineMethod (c$, "isTranslucencyCapable", 
39293 function (gc) {
39294 return false;
39295 }, "java.awt.GraphicsConfiguration");
39296 Clazz_defineMethod (c$, "needUpdateWindow", 
39297 function () {
39298 return false;
39299 });
39300 c$.$SunToolkit$1$ = function () {
39301 Clazz_pu$h(self.c$);
39302 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable);
39303 Clazz_overrideMethod (c$, "run", 
39304 function () {
39305 jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e);
39306 (this.f$.e.getSource ()).dispatchEvent (this.f$.e);
39307 });
39308 c$ = Clazz_p0p ();
39309 };
39310 c$.$SunToolkit$2$ = function () {
39311 Clazz_pu$h(self.c$);
39312 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent);
39313 Clazz_overrideMethod (c$, "getWhen", 
39314 function () {
39315 return this.f$.when;
39316 });
39317 c$ = Clazz_p0p ();
39318 };
39319 Clazz_defineStatics (c$,
39320 "GRAB_EVENT_MASK", 0x80000000,
39321 "POST_EVENT_QUEUE_KEY", "PostEventQueue");
39322 c$.appContextMap = c$.prototype.appContextMap =  new java.util.HashMap ();
39323 c$.imgCache = c$.prototype.imgCache =  new java.util.HashMap ();
39324 Clazz_defineStatics (c$,
39325 "startupLocale", null,
39326 "dataTransfererClassName", null,
39327 "DESKTOPFONTHINTS", "awt.font.desktophints");
39328 });
39329 Clazz_declarePackage ("java.awt");
39330 Clazz_declareInterface (java.awt, "Conditional");
39331 Clazz_declarePackage ("java.awt.event");
39332 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () {
39333 c$ = Clazz_decorateAsClass (function () {
39334 this.updateRect = null;
39335 Clazz_instantialize (this, arguments);
39336 }, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent);
39337 Clazz_makeConstructor (c$, 
39338 function (source, id, updateRect) {
39339 Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]);
39340 this.updateRect = updateRect;
39341 }, "java.awt.Component,~N,java.awt.Rectangle");
39342 Clazz_defineMethod (c$, "getUpdateRect", 
39343 function () {
39344 return this.updateRect;
39345 });
39346 Clazz_defineMethod (c$, "setUpdateRect", 
39347 function (updateRect) {
39348 this.updateRect = updateRect;
39349 }, "java.awt.Rectangle");
39350 Clazz_overrideMethod (c$, "paramString", 
39351 function () {
39352 var typeStr;
39353 switch (this.id) {
39354 case 800:
39355 typeStr = "PAINT";
39356 break;
39357 case 801:
39358 typeStr = "UPDATE";
39359 break;
39360 default:
39361 typeStr = "unknown type";
39362 }
39363 return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null");
39364 });
39365 Clazz_defineStatics (c$,
39366 "PAINT_FIRST", 800,
39367 "PAINT_LAST", 801,
39368 "PAINT", 800,
39369 "UPDATE", 801);
39370 });
39371 Clazz_declarePackage ("java.awt");
39372 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent", "$.EventFilter", "swingjs.JSThread", "java.util.Vector"], "java.awt.EventDispatchThread", ["java.lang.Error", "$.RuntimeException", "$.Thread", "java.awt.Component", "$.Container", "$.ModalEventFilter", "$.Window", "jssun.awt.AWTAutoShutdown", "$.ModalExclude", "$.SunToolkit", "swingjs.JSToolkit"], function () {
39373 c$ = Clazz_decorateAsClass (function () {
39374 this.theQueue = null;
39375 this.eventFilters = null;
39376 this.modalFiltersCount = 0;
39377 this.filter = null;
39378 this.cond = null;
39379 this.id = 0;
39380 this.doDispatch = true;
39381 if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) {
39382 java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ ();
39383 }
39384 Clazz_instantialize (this, arguments);
39385 }, java.awt, "EventDispatchThread", swingjs.JSThread);
39386 Clazz_prepareFields (c$, function () {
39387 this.eventFilters =  new java.util.Vector ();
39388 });
39389 Clazz_makeConstructor (c$, 
39390 function (group, name, queue) {
39391 Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]);
39392 this.theQueue = queue;
39393 }, "ThreadGroup,~S,java.awt.EventQueue");
39394 Clazz_defineMethod (c$, "stopDispatchingImpl", 
39395 function (wait) {
39396 var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null);
39397 if (Thread.currentThread () !== this) {
39398 this.theQueue.postEventPrivate (stopEvent);
39399 if (wait) {
39400 try {
39401 this.join ();
39402 } catch (e) {
39403 if (Clazz_exceptionOf (e, InterruptedException)) {
39404 } else {
39405 throw e;
39406 }
39407 }
39408 }} else {
39409 stopEvent.dispatch ();
39410 }{
39411 if (this.theQueue.getDispatchThread () === this) {
39412 this.theQueue.detachDispatchThread ();
39413 }}}, "~B");
39414 Clazz_defineMethod (c$, "stopDispatching", 
39415 function () {
39416 this.stopDispatchingImpl (true);
39417 });
39418 Clazz_defineMethod (c$, "stopDispatchingLater", 
39419 function () {
39420 this.stopDispatchingImpl (false);
39421 });
39422 Clazz_overrideMethod (c$, "run", 
39423 function () {
39424 this.pumpEvents (-1, null);
39425 });
39426 Clazz_defineMethod (c$, "pumpEvents", 
39427 function (id, cond) {
39428 this.pumpEventsForHierarchy (id, cond, null);
39429 }, "~N,java.awt.Conditional");
39430 Clazz_defineMethod (c$, "pumpEventsForHierarchy", 
39431 function (id, cond, modalComponent) {
39432 this.pumpEventsForFilter (id, cond,  new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent));
39433 }, "~N,java.awt.Conditional,java.awt.Component");
39434 Clazz_defineMethod (c$, "pumpEventsForFilter", 
39435 function (id, cond, filter) {
39436 this.filter = filter;
39437 this.cond = cond;
39438 this.id = id;
39439 this.run1 (0);
39440 }, "~N,java.awt.Conditional,java.awt.EventFilter");
39441 Clazz_overrideMethod (c$, "run1", 
39442 function (mode) {
39443 try {
39444 while (true) switch (mode) {
39445 case 0:
39446 this.addEventFilter (this.filter);
39447 mode = 1;
39448 case 1:
39449 if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) {
39450 this.doDispatch = false;
39451 return;
39452 }var myid = this.id;
39453 var r = ((Clazz_isClassDefined ("java.awt.EventDispatchThread$1") ? 0 : java.awt.EventDispatchThread.$EventDispatchThread$1$ ()), Clazz_innerTypeInstance (java.awt.EventDispatchThread$1, this, Clazz_cloneFinals ("myid", myid)));
39454 this.dispatchAndReturn (r, mode);
39455 if (this.isJS) return;
39456 break;
39457 case 2:
39458 this.doDispatch = false;
39459 return;
39460 }
39461
39462 } finally {
39463 if (!this.doDispatch) this.finish ();
39464 }
39465 }, "~N");
39466 Clazz_defineMethod (c$, "dispatchAndReturn", 
39467 function (r, mode) {
39468 var f = null;
39469 var me = this;
39470 {
39471 f = function() {r.run();me.run1(mode)
39472 };
39473 }swingjs.JSToolkit.setTimeout (f, 0, 0);
39474 }, "Runnable,~N");
39475 Clazz_defineMethod (c$, "finish", 
39476  function () {
39477 this.doDispatch = false;
39478 this.removeEventFilter (this.filter);
39479 {
39480 if (this.theQueue.getDispatchThread () === this) {
39481 this.theQueue.detachDispatchThread ();
39482 }if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) {
39483 this.theQueue.initDispatchThread ();
39484 }jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this);
39485 }});
39486 Clazz_defineMethod (c$, "addEventFilter", 
39487 function (filter) {
39488 {
39489 if (!this.eventFilters.contains (filter)) {
39490 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39491 var newFilter = filter;
39492 var k = 0;
39493 for (k = 0; k < this.eventFilters.size (); k++) {
39494 var f = this.eventFilters.get (k);
39495 if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) {
39496 var cf = f;
39497 if (cf.compareTo (newFilter) > 0) {
39498 break;
39499 }}}
39500 this.eventFilters.add (k, filter);
39501 this.modalFiltersCount++;
39502 } else {
39503 this.eventFilters.add (filter);
39504 }}}}, "java.awt.EventFilter");
39505 Clazz_defineMethod (c$, "removeEventFilter", 
39506 function (filter) {
39507 {
39508 if (this.eventFilters.contains (filter)) {
39509 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39510 this.modalFiltersCount--;
39511 }this.eventFilters.remove (filter);
39512 }}}, "java.awt.EventFilter");
39513 Clazz_defineMethod (c$, "pumpOneEventForFilters", 
39514 function (id) {
39515 try {
39516 var event;
39517 var eventOK;
39518 do {
39519 event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id);
39520 if (event == null) return (this.doDispatch = false);
39521 eventOK = true;
39522 {
39523 for (var i = this.eventFilters.size () - 1; i >= 0; i--) {
39524 var f = this.eventFilters.get (i);
39525 var accept = f.acceptEvent (event);
39526 if (accept === java.awt.EventFilter.FilterAction.REJECT) {
39527 eventOK = false;
39528 break;
39529 } else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) {
39530 break;
39531 }}
39532 }if (!eventOK) {
39533 event.consume ();
39534 }} while (eventOK == false);
39535 this.theQueue.dispatchEvent (event);
39536 return this.doDispatch = true;
39537 } catch (e$$) {
39538 if (Clazz_exceptionOf (e$$, ThreadDeath)) {
39539 var death = e$$;
39540 {
39541 return this.doDispatch = false;
39542 }
39543 } else if (Clazz_exceptionOf (e$$, InterruptedException)) {
39544 var interruptedException = e$$;
39545 {
39546 return this.doDispatch = false;
39547 }
39548 } else {
39549 var e = e$$;
39550 {
39551 this.processException (e, this.modalFiltersCount > 0);
39552 }
39553 }
39554 }
39555 return this.doDispatch = true;
39556 }, "~N");
39557 Clazz_defineMethod (c$, "processException", 
39558  function (e, isModal) {
39559 if (!this.handleException (e)) {
39560 if (isModal) {
39561 System.err.println ("Exception occurred during event dispatching:");
39562 e.printStackTrace ();
39563 } else if (Clazz_instanceOf (e, RuntimeException)) {
39564 throw e;
39565 } else if (Clazz_instanceOf (e, Error)) {
39566 throw e;
39567 }}}, "Throwable,~B");
39568 Clazz_defineMethod (c$, "handleException", 
39569  function (thrown) {
39570 return false;
39571 }, "Throwable");
39572 Clazz_defineMethod (c$, "isDispatching", 
39573 function (eq) {
39574 return this.theQueue.equals (eq);
39575 }, "java.awt.EventQueue");
39576 Clazz_defineMethod (c$, "getEventQueue", 
39577 function () {
39578 return this.theQueue;
39579 });
39580 c$.$EventDispatchThread$StopDispatchEvent$ = function () {
39581 Clazz_pu$h(self.c$);
39582 c$ = Clazz_decorateAsClass (function () {
39583 Clazz_prepareCallback (this, arguments);
39584 Clazz_instantialize (this, arguments);
39585 }, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39586 Clazz_makeConstructor (c$, 
39587 function () {
39588 Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]);
39589 });
39590 Clazz_overrideMethod (c$, "dispatch", 
39591 function () {
39592 this.b$["java.awt.EventDispatchThread"].doDispatch = false;
39593 });
39594 c$ = Clazz_p0p ();
39595 };
39596 c$.$EventDispatchThread$1$ = function () {
39597 Clazz_pu$h(self.c$);
39598 c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable);
39599 Clazz_overrideMethod (c$, "run", 
39600 function () {
39601 this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid);
39602 });
39603 c$ = Clazz_p0p ();
39604 };
39605 Clazz_pu$h(self.c$);
39606 c$ = Clazz_decorateAsClass (function () {
39607 this.modalComponent = null;
39608 Clazz_instantialize (this, arguments);
39609 }, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter);
39610 Clazz_makeConstructor (c$, 
39611 function (a) {
39612 this.modalComponent = a;
39613 }, "java.awt.Component");
39614 Clazz_overrideMethod (c$, "acceptEvent", 
39615 function (a) {
39616 if (this.modalComponent != null) {
39617 var b = a.getID ();
39618 var c = (b >= 500) && (b <= 507);
39619 var d = (b >= 1001) && (b <= 1001);
39620 var e = (b == 201);
39621 if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) {
39622 return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT;
39623 }if (c || d || e) {
39624 var f = a.getSource ();
39625 if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) {
39626 return java.awt.EventFilter.FilterAction.ACCEPT;
39627 } else if (Clazz_instanceOf (f, java.awt.Component)) {
39628 var g = f;
39629 var h = false;
39630 if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) {
39631 while (g !== this.modalComponent && g != null) {
39632 if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) {
39633 h = true;
39634 break;
39635 }g = g.getParent ();
39636 }
39637 }if (!h && (g !== this.modalComponent)) {
39638 return java.awt.EventFilter.FilterAction.REJECT;
39639 }}}}return java.awt.EventFilter.FilterAction.ACCEPT;
39640 }, "java.awt.AWTEvent");
39641 c$ = Clazz_p0p ();
39642 Clazz_defineStatics (c$,
39643 "ANY_EVENT", -1);
39644 });
39645 Clazz_declarePackage ("java.awt");
39646 Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () {
39647 Clazz_declareInterface (java.awt, "EventFilter");
39648 Clazz_pu$h(self.c$);
39649 c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum);
39650 Clazz_defineEnumConstant (c$, "ACCEPT", 0, []);
39651 Clazz_defineEnumConstant (c$, "REJECT", 1, []);
39652 Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []);
39653 c$ = Clazz_p0p ();
39654 });
39655 Clazz_declarePackage ("java.awt");
39656 Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () {
39657 c$ = Clazz_decorateAsClass (function () {
39658 this.modalDialog = null;
39659 this.disabled = false;
39660 Clazz_instantialize (this, arguments);
39661 }, java.awt, "ModalEventFilter", null, java.awt.EventFilter);
39662 Clazz_makeConstructor (c$, 
39663 function (modalDialog) {
39664 this.modalDialog = modalDialog;
39665 this.disabled = false;
39666 }, "java.awt.Dialog");
39667 Clazz_defineMethod (c$, "getModalDialog", 
39668 function () {
39669 return this.modalDialog;
39670 });
39671 Clazz_overrideMethod (c$, "acceptEvent", 
39672 function (event) {
39673 if (this.disabled || !this.modalDialog.isVisible ()) {
39674 return java.awt.EventFilter.FilterAction.ACCEPT;
39675 }var eventID = event.getID ();
39676 if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) {
39677 var o = event.getSource ();
39678 if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) {
39679 } else if (Clazz_instanceOf (o, java.awt.Component)) {
39680 var c = o;
39681 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
39682 c = c.getParent_NoClientCode ();
39683 }
39684 if (c != null) {
39685 return this.acceptWindow (c);
39686 }}}return java.awt.EventFilter.FilterAction.ACCEPT;
39687 }, "java.awt.AWTEvent");
39688 Clazz_defineMethod (c$, "disable", 
39689 function () {
39690 this.disabled = true;
39691 });
39692 Clazz_defineMethod (c$, "compareTo", 
39693 function (another) {
39694 var anotherDialog = another.getModalDialog ();
39695 var c = this.modalDialog;
39696 while (c != null) {
39697 if (c === anotherDialog) {
39698 return 1;
39699 }c = c.getParent_NoClientCode ();
39700 }
39701 c = anotherDialog;
39702 while (c != null) {
39703 if (c === this.modalDialog) {
39704 return -1;
39705 }c = c.getParent_NoClientCode ();
39706 }
39707 var blocker = this.modalDialog.getModalBlocker ();
39708 while (blocker != null) {
39709 if (blocker === anotherDialog) {
39710 return -1;
39711 }blocker = blocker.getModalBlocker ();
39712 }
39713 blocker = anotherDialog.getModalBlocker ();
39714 while (blocker != null) {
39715 if (blocker === this.modalDialog) {
39716 return 1;
39717 }blocker = blocker.getModalBlocker ();
39718 }
39719 return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ());
39720 }, "java.awt.ModalEventFilter");
39721 c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", 
39722 function (modalDialog) {
39723 switch (modalDialog.getModalityType ()) {
39724 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
39725 return  new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog);
39726 case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
39727 return  new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog);
39728 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
39729 return  new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog);
39730 }
39731 return null;
39732 }, "java.awt.Dialog");
39733 Clazz_pu$h(self.c$);
39734 c$ = Clazz_decorateAsClass (function () {
39735 this.appContext = null;
39736 Clazz_instantialize (this, arguments);
39737 }, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter);
39738 Clazz_makeConstructor (c$, 
39739 function (a) {
39740 Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]);
39741 this.appContext = a.appContext;
39742 }, "java.awt.Dialog");
39743 Clazz_overrideMethod (c$, "acceptWindow", 
39744 function (a) {
39745 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) {
39746 return java.awt.EventFilter.FilterAction.ACCEPT;
39747 }if (a.appContext !== this.appContext) {
39748 return java.awt.EventFilter.FilterAction.REJECT;
39749 }while (a != null) {
39750 if (a === this.modalDialog) {
39751 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39752 }a = a.getOwner ();
39753 }
39754 return java.awt.EventFilter.FilterAction.REJECT;
39755 }, "java.awt.Window");
39756 c$ = Clazz_p0p ();
39757 Clazz_pu$h(self.c$);
39758 c$ = Clazz_decorateAsClass (function () {
39759 this.appContext = null;
39760 Clazz_instantialize (this, arguments);
39761 }, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter);
39762 Clazz_makeConstructor (c$, 
39763 function (a) {
39764 Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]);
39765 this.appContext = a.appContext;
39766 }, "java.awt.Dialog");
39767 Clazz_overrideMethod (c$, "acceptWindow", 
39768 function (a) {
39769 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39770 return java.awt.EventFilter.FilterAction.ACCEPT;
39771 }if (a.appContext === this.appContext) {
39772 while (a != null) {
39773 if (a === this.modalDialog) {
39774 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39775 }a = a.getOwner ();
39776 }
39777 return java.awt.EventFilter.FilterAction.REJECT;
39778 }return java.awt.EventFilter.FilterAction.ACCEPT;
39779 }, "java.awt.Window");
39780 c$ = Clazz_p0p ();
39781 Clazz_pu$h(self.c$);
39782 c$ = Clazz_decorateAsClass (function () {
39783 this.documentRoot = null;
39784 Clazz_instantialize (this, arguments);
39785 }, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter);
39786 Clazz_makeConstructor (c$, 
39787 function (a) {
39788 Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]);
39789 this.documentRoot = a.getDocumentRoot ();
39790 }, "java.awt.Dialog");
39791 Clazz_overrideMethod (c$, "acceptWindow", 
39792 function (a) {
39793 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39794 var b = this.modalDialog.getOwner ();
39795 while (b != null) {
39796 if (b === a) {
39797 return java.awt.EventFilter.FilterAction.REJECT;
39798 }b = b.getOwner ();
39799 }
39800 return java.awt.EventFilter.FilterAction.ACCEPT;
39801 }while (a != null) {
39802 if (a === this.modalDialog) {
39803 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39804 }if (a === this.documentRoot) {
39805 return java.awt.EventFilter.FilterAction.REJECT;
39806 }a = a.getOwner ();
39807 }
39808 return java.awt.EventFilter.FilterAction.ACCEPT;
39809 }, "java.awt.Window");
39810 c$ = Clazz_p0p ();
39811 });
39812 Clazz_declarePackage ("java.awt.peer");
39813 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () {
39814 Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer);
39815 });
39816 Clazz_declarePackage ("java.awt.peer");
39817 c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer");
39818 Clazz_defineStatics (c$,
39819 "SET_LOCATION", 1,
39820 "SET_SIZE", 2,
39821 "SET_BOUNDS", 3,
39822 "SET_CLIENT_SIZE", 4,
39823 "RESET_OPERATION", 5,
39824 "NO_EMBEDDED_CHECK", (16384),
39825 "DEFAULT_OPERATION", 3);
39826 Clazz_declarePackage ("java.awt.peer");
39827 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () {
39828 Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer);
39829 });
39830 Clazz_declarePackage ("java.awt.peer");
39831 Clazz_load (["java.awt.peer.WindowPeer"], "java.awt.peer.FramePeer", null, function () {
39832 Clazz_declareInterface (java.awt.peer, "FramePeer", java.awt.peer.WindowPeer);
39833 });
39834 Clazz_declarePackage ("java.awt.peer");
39835 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () {
39836 Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer);
39837 });
39838 Clazz_declarePackage ("java.awt.peer");
39839 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () {
39840 Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer);
39841 });
39842 Clazz_declarePackage ("java.awt.peer");
39843 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.WindowPeer", null, function () {
39844 Clazz_declareInterface (java.awt.peer, "WindowPeer", java.awt.peer.ContainerPeer);
39845 });
39846 Clazz_declarePackage ("java.awt");
39847 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () {
39848 c$ = Clazz_decorateAsClass (function () {
39849 this.$dispatched = false;
39850 this.nested = null;
39851 this.toNotify = null;
39852 Clazz_instantialize (this, arguments);
39853 }, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39854 Clazz_makeConstructor (c$, 
39855 function () {
39856 this.construct (null);
39857 });
39858 Clazz_makeConstructor (c$, 
39859 function (nested) {
39860 this.construct (nested, null);
39861 }, "java.awt.AWTEvent");
39862 Clazz_makeConstructor (c$, 
39863 function (nested, toNotify) {
39864 Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]);
39865 this.nested = nested;
39866 this.toNotify = toNotify;
39867 }, "java.awt.AWTEvent,jssun.awt.AppContext");
39868 Clazz_overrideMethod (c$, "dispatch", 
39869 function () {
39870 try {
39871 if (this.nested != null) {
39872 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39873 }} finally {
39874 this.$dispatched = true;
39875 if (this.toNotify != null) {
39876 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39877 }{
39878 this.notifyAll ();
39879 }}
39880 });
39881 Clazz_defineMethod (c$, "dispose", 
39882 function () {
39883 this.$dispatched = true;
39884 if (this.toNotify != null) {
39885 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39886 }{
39887 this.notifyAll ();
39888 }});
39889 Clazz_defineStatics (c$,
39890 "ID", 1007);
39891 });
39892 Clazz_declarePackage ("java.awt");
39893 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent", "java.util.LinkedList"], "java.awt.SequencedEvent", ["java.lang.Thread", "java.awt.Component", "$.Conditional", "$.EventQueue", "$.SentEvent", "$.Toolkit", "jssun.awt.AppContext", "$.SunToolkit", "swingjs.JSToolkit"], function () {
39894 c$ = Clazz_decorateAsClass (function () {
39895 this.nested = null;
39896 this.appContext = null;
39897 this.disposed = false;
39898 Clazz_instantialize (this, arguments);
39899 }, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39900 Clazz_makeConstructor (c$, 
39901 function (nested) {
39902 Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]);
39903 this.nested = nested;
39904 {
39905 java.awt.SequencedEvent.list.add (this);
39906 }}, "java.awt.AWTEvent");
39907 Clazz_overrideMethod (c$, "dispatch", 
39908 function () {
39909 try {
39910 this.appContext = jssun.awt.AppContext.getAppContext ();
39911 if (java.awt.SequencedEvent.getFirst () !== this) {
39912 if (java.awt.EventQueue.isDispatchThread ()) {
39913 var edt = Thread.currentThread ();
39914 edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null)));
39915 } else {
39916 while (!this.isFirstOrDisposed ()) {
39917 {
39918 try {
39919 swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent");
39920 java.awt.SequencedEvent.wait (1000);
39921 } catch (e) {
39922 if (Clazz_exceptionOf (e, InterruptedException)) {
39923 break;
39924 } else {
39925 throw e;
39926 }
39927 }
39928 }}
39929 }}if (!this.disposed) {
39930 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39931 }} finally {
39932 this.dispose ();
39933 }
39934 });
39935 c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", 
39936  function (se) {
39937 if (se != null) {
39938 var target = se.nested.getSource ();
39939 if (Clazz_instanceOf (target, java.awt.Component)) {
39940 return (target).appContext.isDisposed ();
39941 }}return false;
39942 }, "java.awt.SequencedEvent");
39943 Clazz_defineMethod (c$, "isFirstOrDisposed", 
39944 function () {
39945 if (this.disposed) {
39946 return true;
39947 }return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed;
39948 });
39949 c$.getFirst = Clazz_defineMethod (c$, "getFirst", 
39950  function () {
39951 return java.awt.SequencedEvent.list.getFirst ();
39952 });
39953 c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", 
39954  function () {
39955 var first = java.awt.SequencedEvent.getFirst ();
39956 while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) {
39957 first.dispose ();
39958 first = java.awt.SequencedEvent.getFirst ();
39959 }
39960 return first;
39961 });
39962 Clazz_defineMethod (c$, "dispose", 
39963 function () {
39964 {
39965 if (this.disposed) {
39966 return;
39967 }this.disposed = true;
39968 }if (this.appContext != null) {
39969 jssun.awt.SunToolkit.postEvent (this.appContext,  new java.awt.SentEvent ());
39970 }var next = null;
39971 {
39972 java.awt.SequencedEvent.notifyAll ();
39973 if (java.awt.SequencedEvent.list.getFirst () === this) {
39974 java.awt.SequencedEvent.list.removeFirst ();
39975 if (!java.awt.SequencedEvent.list.isEmpty ()) {
39976 next = java.awt.SequencedEvent.list.getFirst ();
39977 }} else {
39978 java.awt.SequencedEvent.list.remove (this);
39979 }}if (next != null && next.appContext != null) {
39980 jssun.awt.SunToolkit.postEvent (next.appContext,  new java.awt.SentEvent ());
39981 }});
39982 c$.$SequencedEvent$1$ = function () {
39983 Clazz_pu$h(self.c$);
39984 c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional);
39985 Clazz_overrideMethod (c$, "evaluate", 
39986 function () {
39987 return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed ();
39988 });
39989 c$ = Clazz_p0p ();
39990 };
39991 Clazz_defineStatics (c$,
39992 "ID", 1006);
39993 c$.list = c$.prototype.list =  new java.util.LinkedList ();
39994 });
39995 Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){
39996 c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList);
39997 Clazz_defineMethod(c$,"add",
39998 function(location,object){
39999 this.listIterator(location).add(object);
40000 },"~N,~O");
40001 Clazz_defineMethod(c$,"addAll",
40002 function(location,collection){
40003 var it=this.listIterator(location);
40004 var colIt=collection.iterator();
40005 var next=it.nextIndex();
40006 while(colIt.hasNext()){
40007 it.add(colIt.next());
40008 it.previous();
40009 }
40010 return next!=it.nextIndex();
40011 },"~N,java.util.Collection");
40012 Clazz_overrideMethod(c$,"get",
40013 function(location){
40014 try{
40015 return this.listIterator(location).next();
40016 }catch(e){
40017 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
40018 throw new IndexOutOfBoundsException();
40019 }else{
40020 throw e;
40021 }
40022 }
40023 },"~N");
40024 Clazz_overrideMethod(c$,"iterator",
40025 function(){
40026 return this.listIterator(0);
40027 });
40028 Clazz_defineMethod(c$,"remove",
40029 function(location){
40030 try{
40031 var it=this.listIterator(location);
40032 var result=it.next();
40033 it.remove();
40034 return result;
40035 }catch(e){
40036 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
40037 throw new IndexOutOfBoundsException();
40038 }else{
40039 throw e;
40040 }
40041 }
40042 },"~N");
40043 Clazz_overrideMethod(c$,"set",
40044 function(location,object){
40045 var it=this.listIterator(location);
40046 var result=it.next();
40047 it.set(object);
40048 return result;
40049 },"~N,~O");
40050 });
40051 Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){
40052 c$=Clazz_decorateAsClass(function(){
40053 this.$size=0;
40054 this.voidLink=null;
40055 Clazz_instantialize(this,arguments);
40056 },java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]);
40057 Clazz_makeConstructor(c$,
40058 function(){
40059 Clazz_superConstructor(this,java.util.LinkedList,[]);
40060 this.voidLink=new java.util.LinkedList.Link(null,null,null);
40061 this.voidLink.previous=this.voidLink;
40062 this.voidLink.next=this.voidLink;
40063 });
40064 Clazz_makeConstructor(c$,
40065 function(collection){
40066 this.construct();
40067 this.addAll(collection);
40068 },"java.util.Collection");
40069 Clazz_defineMethod(c$,"add",
40070 function(location,object){
40071 if(0<=location&&location<=this.$size){
40072 var link=this.voidLink;
40073 if(location<(Math.floor(this.$size/2))){
40074 for(var i=0;i<=location;i++){
40075 link=link.next;
40076 }
40077 }else{
40078 for(var i=this.$size;i>location;i--){
40079 link=link.previous;
40080 }
40081 }var previous=link.previous;
40082 var newLink=new java.util.LinkedList.Link(object,previous,link);
40083 previous.next=newLink;
40084 link.previous=newLink;
40085 this.$size++;
40086 this.modCount++;
40087 }else{
40088 throw new IndexOutOfBoundsException();
40089 }},"~N,~O");
40090 Clazz_defineMethod(c$,"add",
40091 function(object){
40092 var oldLast=this.voidLink.previous;
40093 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40094 this.voidLink.previous=newLink;
40095 oldLast.next=newLink;
40096 this.$size++;
40097 this.modCount++;
40098 return true;
40099 },"~O");
40100 Clazz_defineMethod(c$,"addAll",
40101 function(location,collection){
40102 if(location<0||location>this.$size){
40103 throw new IndexOutOfBoundsException();
40104 }var adding=collection.size();
40105 if(adding==0){
40106 return false;
40107 }var previous=this.voidLink;
40108 if(location<(Math.floor(this.$size/2))){
40109 for(var i=0;i<location;i++){
40110 previous=previous.next;
40111 }
40112 }else{
40113 for(var i=this.$size;i>=location;i--){
40114 previous=previous.previous;
40115 }
40116 }var next=previous.next;
40117 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40118 var newLink=new java.util.LinkedList.Link(e,previous,null);
40119 previous.next=newLink;
40120 previous=newLink;
40121 }
40122 previous.next=next;
40123 next.previous=previous;
40124 this.$size+=adding;
40125 this.modCount++;
40126 return true;
40127 },"~N,java.util.Collection");
40128 Clazz_defineMethod(c$,"addAll",
40129 function(collection){
40130 var adding=collection.size();
40131 if(adding==0){
40132 return false;
40133 }var previous=this.voidLink.previous;
40134 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40135 var newLink=new java.util.LinkedList.Link(e,previous,null);
40136 previous.next=newLink;
40137 previous=newLink;
40138 }
40139 previous.next=this.voidLink;
40140 this.voidLink.previous=previous;
40141 this.$size+=adding;
40142 this.modCount++;
40143 return true;
40144 },"java.util.Collection");
40145 Clazz_defineMethod(c$,"addFirst",
40146 function(object){
40147 var oldFirst=this.voidLink.next;
40148 var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst);
40149 this.voidLink.next=newLink;
40150 oldFirst.previous=newLink;
40151 this.$size++;
40152 this.modCount++;
40153 },"~O");
40154 Clazz_defineMethod(c$,"addLast",
40155 function(object){
40156 var oldLast=this.voidLink.previous;
40157 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40158 this.voidLink.previous=newLink;
40159 oldLast.next=newLink;
40160 this.$size++;
40161 this.modCount++;
40162 },"~O");
40163 Clazz_overrideMethod(c$,"clear",
40164 function(){
40165 if(this.$size>0){
40166 this.$size=0;
40167 this.voidLink.next=this.voidLink;
40168 this.voidLink.previous=this.voidLink;
40169 this.modCount++;
40170 }});
40171 Clazz_overrideMethod(c$,"clone",
40172 function(){
40173 return new java.util.LinkedList(this);
40174 });
40175 Clazz_overrideMethod(c$,"contains",
40176 function(object){
40177 var link=this.voidLink.next;
40178 if(object!=null){
40179 while(link!==this.voidLink){
40180 if(object.equals(link.data)){
40181 return true;
40182 }link=link.next;
40183 }
40184 }else{
40185 while(link!==this.voidLink){
40186 if(link.data==null){
40187 return true;
40188 }link=link.next;
40189 }
40190 }return false;
40191 },"~O");
40192 Clazz_overrideMethod(c$,"get",
40193 function(location){
40194 if(0<=location&&location<this.$size){
40195 var link=this.voidLink;
40196 if(location<(Math.floor(this.$size/2))){
40197 for(var i=0;i<=location;i++){
40198 link=link.next;
40199 }
40200 }else{
40201 for(var i=this.$size;i>location;i--){
40202 link=link.previous;
40203 }
40204 }return link.data;
40205 }throw new IndexOutOfBoundsException();
40206 },"~N");
40207 Clazz_defineMethod(c$,"getFirst",
40208 function(){
40209 var first=this.voidLink.next;
40210 if(first!==this.voidLink){
40211 return first.data;
40212 }throw new java.util.NoSuchElementException();
40213 });
40214 Clazz_defineMethod(c$,"getLast",
40215 function(){
40216 var last=this.voidLink.previous;
40217 if(last!==this.voidLink){
40218 return last.data;
40219 }throw new java.util.NoSuchElementException();
40220 });
40221 Clazz_overrideMethod(c$,"indexOf",
40222 function(object){
40223 var pos=0;
40224 var link=this.voidLink.next;
40225 if(object!=null){
40226 while(link!==this.voidLink){
40227 if(object.equals(link.data)){
40228 return pos;
40229 }link=link.next;
40230 pos++;
40231 }
40232 }else{
40233 while(link!==this.voidLink){
40234 if(link.data==null){
40235 return pos;
40236 }link=link.next;
40237 pos++;
40238 }
40239 }return-1;
40240 },"~O");
40241 Clazz_overrideMethod(c$,"lastIndexOf",
40242 function(object){
40243 var pos=this.$size;
40244 var link=this.voidLink.previous;
40245 if(object!=null){
40246 while(link!==this.voidLink){
40247 pos--;
40248 if(object.equals(link.data)){
40249 return pos;
40250 }link=link.previous;
40251 }
40252 }else{
40253 while(link!==this.voidLink){
40254 pos--;
40255 if(link.data==null){
40256 return pos;
40257 }link=link.previous;
40258 }
40259 }return-1;
40260 },"~O");
40261 Clazz_defineMethod(c$,"listIterator",
40262 function(location){
40263 return new java.util.LinkedList.LinkIterator(this,location);
40264 },"~N");
40265 Clazz_defineMethod(c$,"remove",
40266 function(location){
40267 if(0<=location&&location<this.$size){
40268 var link=this.voidLink;
40269 if(location<(Math.floor(this.$size/2))){
40270 for(var i=0;i<=location;i++){
40271 link=link.next;
40272 }
40273 }else{
40274 for(var i=this.$size;i>location;i--){
40275 link=link.previous;
40276 }
40277 }var previous=link.previous;
40278 var next=link.next;
40279 previous.next=next;
40280 next.previous=previous;
40281 this.$size--;
40282 this.modCount++;
40283 return link.data;
40284 }throw new IndexOutOfBoundsException();
40285 },"~N");
40286 Clazz_defineMethod(c$,"remove",
40287 function(object){
40288 var link=this.voidLink.next;
40289 if(object!=null){
40290 while(link!==this.voidLink&&!object.equals(link.data)){
40291 link=link.next;
40292 }
40293 }else{
40294 while(link!==this.voidLink&&link.data!=null){
40295 link=link.next;
40296 }
40297 }if(link===this.voidLink){
40298 return false;
40299 }var next=link.next;
40300 var previous=link.previous;
40301 previous.next=next;
40302 next.previous=previous;
40303 this.$size--;
40304 this.modCount++;
40305 return true;
40306 },"~O");
40307 Clazz_defineMethod(c$,"removeFirst",
40308 function(){
40309 var first=this.voidLink.next;
40310 if(first!==this.voidLink){
40311 var next=first.next;
40312 this.voidLink.next=next;
40313 next.previous=this.voidLink;
40314 this.$size--;
40315 this.modCount++;
40316 return first.data;
40317 }throw new java.util.NoSuchElementException();
40318 });
40319 Clazz_defineMethod(c$,"removeLast",
40320 function(){
40321 var last=this.voidLink.previous;
40322 if(last!==this.voidLink){
40323 var previous=last.previous;
40324 this.voidLink.previous=previous;
40325 previous.next=this.voidLink;
40326 this.$size--;
40327 this.modCount++;
40328 return last.data;
40329 }throw new java.util.NoSuchElementException();
40330 });
40331 Clazz_overrideMethod(c$,"set",
40332 function(location,object){
40333 if(0<=location&&location<this.$size){
40334 var link=this.voidLink;
40335 if(location<(Math.floor(this.$size/2))){
40336 for(var i=0;i<=location;i++){
40337 link=link.next;
40338 }
40339 }else{
40340 for(var i=this.$size;i>location;i--){
40341 link=link.previous;
40342 }
40343 }var result=link.data;
40344 link.data=object;
40345 return result;
40346 }throw new IndexOutOfBoundsException();
40347 },"~N,~O");
40348 Clazz_overrideMethod(c$,"size",
40349 function(){
40350 return this.$size;
40351 });
40352 Clazz_overrideMethod(c$,"offer",
40353 function(o){
40354 this.add(o);
40355 return true;
40356 },"~O");
40357 Clazz_overrideMethod(c$,"poll",
40358 function(){
40359 return this.$size==0?null:this.removeFirst();
40360 });
40361 Clazz_defineMethod(c$,"remove",
40362 function(){
40363 return this.removeFirst();
40364 });
40365 Clazz_overrideMethod(c$,"peek",
40366 function(){
40367 var first=this.voidLink.next;
40368 return first===this.voidLink?null:first.data;
40369 });
40370 Clazz_overrideMethod(c$,"element",
40371 function(){
40372 return this.getFirst();
40373 });
40374 Clazz_defineMethod(c$,"toArray",
40375 function(){
40376 var index=0;
40377 var contents=new Array(this.$size);
40378 var link=this.voidLink.next;
40379 while(link!==this.voidLink){
40380 contents[index++]=link.data;
40381 link=link.next;
40382 }
40383 return contents;
40384 });
40385 Clazz_defineMethod(c$,"toArray",
40386 function(contents){
40387 var index=0;
40388 if(this.$size>contents.length){
40389 var ct=contents.getClass().getComponentType();
40390 contents=java.lang.reflect.Array.newInstance(ct,this.$size);
40391 }var link=this.voidLink.next;
40392 while(link!==this.voidLink){
40393 contents[index++]=link.data;
40394 link=link.next;
40395 }
40396 if(index<contents.length){
40397 contents[index]=null;
40398 }return contents;
40399 },"~A");
40400 Clazz_pu$h(self.c$);
40401 c$=Clazz_decorateAsClass(function(){
40402 this.data=null;
40403 this.previous=null;
40404 this.next=null;
40405 Clazz_instantialize(this,arguments);
40406 },java.util.LinkedList,"Link");
40407 Clazz_makeConstructor(c$,
40408 function(a,b,c){
40409 this.data=a;
40410 this.previous=b;
40411 this.next=c;
40412 },"~O,java.util.LinkedList.Link,java.util.LinkedList.Link");
40413 c$=Clazz_p0p();
40414 Clazz_pu$h(self.c$);
40415 c$=Clazz_decorateAsClass(function(){
40416 this.pos=0;
40417 this.expectedModCount=0;
40418 this.list=null;
40419 this.link=null;
40420 this.lastLink=null;
40421 Clazz_instantialize(this,arguments);
40422 },java.util.LinkedList,"LinkIterator",null,java.util.ListIterator);
40423 Clazz_makeConstructor(c$,
40424 function(a,b){
40425 this.list=a;
40426 this.expectedModCount=this.list.modCount;
40427 if(0<=b&&b<=this.list.$size){
40428 this.link=this.list.voidLink;
40429 if(b<Math.floor(this.list.$size/2)){
40430 for(this.pos=-1;this.pos+1<b;this.pos++){
40431 this.link=this.link.next;
40432 }
40433 }else{
40434 for(this.pos=this.list.$size;this.pos>=b;this.pos--){
40435 this.link=this.link.previous;
40436 }
40437 }}else{
40438 throw new IndexOutOfBoundsException();
40439 }},"java.util.LinkedList,~N");
40440 Clazz_overrideMethod(c$,"add",
40441 function(a){
40442 if(this.expectedModCount==this.list.modCount){
40443 var b=this.link.next;
40444 var c=new java.util.LinkedList.Link(a,this.link,b);
40445 this.link.next=c;
40446 b.previous=c;
40447 this.link=c;
40448 this.lastLink=null;
40449 this.pos++;
40450 this.expectedModCount++;
40451 this.list.$size++;
40452 this.list.modCount++;
40453 }else{
40454 throw new java.util.ConcurrentModificationException();
40455 }},"~O");
40456 Clazz_overrideMethod(c$,"hasNext",
40457 function(){
40458 return this.link.next!==this.list.voidLink;
40459 });
40460 Clazz_overrideMethod(c$,"hasPrevious",
40461 function(){
40462 return this.link!==this.list.voidLink;
40463 });
40464 Clazz_overrideMethod(c$,"next",
40465 function(){
40466 if(this.expectedModCount==this.list.modCount){
40467 var a=this.link.next;
40468 if(a!==this.list.voidLink){
40469 this.lastLink=this.link=a;
40470 this.pos++;
40471 return this.link.data;
40472 }throw new java.util.NoSuchElementException();
40473 }throw new java.util.ConcurrentModificationException();
40474 });
40475 Clazz_overrideMethod(c$,"nextIndex",
40476 function(){
40477 return this.pos+1;
40478 });
40479 Clazz_overrideMethod(c$,"previous",
40480 function(){
40481 if(this.expectedModCount==this.list.modCount){
40482 if(this.link!==this.list.voidLink){
40483 this.lastLink=this.link;
40484 this.link=this.link.previous;
40485 this.pos--;
40486 return this.lastLink.data;
40487 }throw new java.util.NoSuchElementException();
40488 }throw new java.util.ConcurrentModificationException();
40489 });
40490 Clazz_overrideMethod(c$,"previousIndex",
40491 function(){
40492 return this.pos;
40493 });
40494 Clazz_overrideMethod(c$,"remove",
40495 function(){
40496 if(this.expectedModCount==this.list.modCount){
40497 if(this.lastLink!=null){
40498 var a=this.lastLink.next;
40499 var b=this.lastLink.previous;
40500 a.previous=b;
40501 b.next=a;
40502 if(this.lastLink===this.link){
40503 this.pos--;
40504 }this.link=b;
40505 this.lastLink=null;
40506 this.expectedModCount++;
40507 this.list.$size--;
40508 this.list.modCount++;
40509 }else{
40510 throw new IllegalStateException();
40511 }}else{
40512 throw new java.util.ConcurrentModificationException();
40513 }});
40514 Clazz_overrideMethod(c$,"set",
40515 function(a){
40516 if(this.expectedModCount==this.list.modCount){
40517 if(this.lastLink!=null){
40518 this.lastLink.data=a;
40519 }else{
40520 throw new IllegalStateException();
40521 }}else{
40522 throw new java.util.ConcurrentModificationException();
40523 }},"~O");
40524 c$=Clazz_p0p();
40525 });
40526 Clazz_declarePackage ("JU");
40527 Clazz_load (["JU.T3"], "JU.V3", null, function () {
40528 c$ = Clazz_declareType (JU, "V3", JU.T3);
40529 Clazz_makeConstructor (c$, 
40530 function () {
40531 });
40532 c$.newV = Clazz_defineMethod (c$, "newV", 
40533 function (t) {
40534 return JU.V3.new3 (t.x, t.y, t.z);
40535 }, "JU.T3");
40536 c$.newVsub = Clazz_defineMethod (c$, "newVsub", 
40537 function (t1, t2) {
40538 return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z);
40539 }, "JU.T3,JU.T3");
40540 c$.new3 = Clazz_defineMethod (c$, "new3", 
40541 function (x, y, z) {
40542 var v =  new JU.V3 ();
40543 v.x = x;
40544 v.y = y;
40545 v.z = z;
40546 return v;
40547 }, "~N,~N,~N");
40548 Clazz_defineMethod (c$, "angle", 
40549 function (v1) {
40550 var xx = this.y * v1.z - this.z * v1.y;
40551 var yy = this.z * v1.x - this.x * v1.z;
40552 var zz = this.x * v1.y - this.y * v1.x;
40553 var cross = Math.sqrt (xx * xx + yy * yy + zz * zz);
40554 return Math.abs (Math.atan2 (cross, this.dot (v1)));
40555 }, "JU.V3");
40556 });
40557 Clazz_declarePackage ("javax.swing");
40558 Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () {
40559 c$ = Clazz_decorateAsClass (function () {
40560 this.buttons = null;
40561 this.selection = null;
40562 Clazz_instantialize (this, arguments);
40563 }, javax.swing, "ButtonGroup");
40564 Clazz_prepareFields (c$, function () {
40565 this.buttons =  new java.util.Vector ();
40566 });
40567 Clazz_makeConstructor (c$, 
40568 function () {
40569 });
40570 Clazz_defineMethod (c$, "add", 
40571 function (b) {
40572 if (b == null) {
40573 return;
40574 }this.buttons.addElement (b);
40575 if (b.isSelected ()) {
40576 if (this.selection == null) {
40577 this.selection = b.getModel ();
40578 } else {
40579 b.setSelected (false);
40580 }}b.getModel ().setGroup (this);
40581 }, "javax.swing.AbstractButton");
40582 Clazz_defineMethod (c$, "remove", 
40583 function (b) {
40584 if (b == null) {
40585 return;
40586 }this.buttons.removeElement (b);
40587 if (b.getModel () === this.selection) {
40588 this.selection = null;
40589 }b.getModel ().setGroup (null);
40590 }, "javax.swing.AbstractButton");
40591 Clazz_defineMethod (c$, "clearSelection", 
40592 function () {
40593 if (this.selection != null) {
40594 var oldSelection = this.selection;
40595 this.selection = null;
40596 oldSelection.setSelected (false);
40597 }});
40598 Clazz_defineMethod (c$, "getElements", 
40599 function () {
40600 return this.buttons.elements ();
40601 });
40602 Clazz_defineMethod (c$, "getSelection", 
40603 function () {
40604 return this.selection;
40605 });
40606 Clazz_defineMethod (c$, "setSelected", 
40607 function (m, b) {
40608 if (b && m != null && m !== this.selection) {
40609 var oldSelection = this.selection;
40610 this.selection = m;
40611 if (oldSelection != null) {
40612 oldSelection.setSelected (false);
40613 }m.setSelected (true);
40614 }}, "javax.swing.ButtonModel,~B");
40615 Clazz_defineMethod (c$, "isSelected", 
40616 function (m) {
40617 return (m === this.selection);
40618 }, "javax.swing.ButtonModel");
40619 Clazz_defineMethod (c$, "getButtonCount", 
40620 function () {
40621 if (this.buttons == null) {
40622 return 0;
40623 } else {
40624 return this.buttons.size ();
40625 }});
40626 });
40627 Clazz_declarePackage ("javax.swing");
40628 Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () {
40629 c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher);
40630 Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", 
40631 function (c) {
40632 return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer));
40633 }, "java.awt.Component");
40634 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40635 function (c, r) {
40636 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
40637 var appContext = jssun.awt.SunToolkit.targetToAppContext (c);
40638 return true;
40639 }return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]);
40640 }, "java.awt.Component,Runnable");
40641 Clazz_defineStatics (c$,
40642 "SHOW_FROM_DOUBLE_BUFFER", false,
40643 "ERASE_BACKGROUND", false);
40644 {
40645 javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false;
40646 javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true;
40647 }});
40648 Clazz_declarePackage ("jssun.awt");
40649 Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () {
40650 c$ = Clazz_decorateAsClass (function () {
40651 this.busyThreadSet = null;
40652 this.toolkitThreadBusy = false;
40653 this.peerMap = null;
40654 Clazz_instantialize (this, arguments);
40655 }, jssun.awt, "AWTAutoShutdown", null, Runnable);
40656 Clazz_prepareFields (c$, function () {
40657 this.busyThreadSet =  new java.util.HashSet (7);
40658 this.peerMap =  new java.util.IdentityHashMap ();
40659 });
40660 Clazz_makeConstructor (c$, 
40661  function () {
40662 });
40663 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
40664 function () {
40665 return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance =  new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance);
40666 });
40667 c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", 
40668 function () {
40669 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true);
40670 });
40671 c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", 
40672 function () {
40673 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false);
40674 });
40675 Clazz_defineMethod (c$, "notifyThreadBusy", 
40676 function (thread) {
40677 this.busyThreadSet.add (thread);
40678 }, "Thread");
40679 Clazz_defineMethod (c$, "notifyThreadFree", 
40680 function (thread) {
40681 this.busyThreadSet.remove (thread);
40682 }, "Thread");
40683 Clazz_defineMethod (c$, "notifyPeerMapUpdated", 
40684 function () {
40685 if (!this.isReadyToShutdown ()) {
40686 this.activateBlockerThread ();
40687 }});
40688 Clazz_defineMethod (c$, "isReadyToShutdown", 
40689  function () {
40690 return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ());
40691 });
40692 Clazz_defineMethod (c$, "setToolkitBusy", 
40693  function (busy) {
40694 if (busy != this.toolkitThreadBusy) {
40695 if (busy != this.toolkitThreadBusy) {
40696 if (busy) {
40697 this.toolkitThreadBusy = busy;
40698 } else {
40699 this.toolkitThreadBusy = busy;
40700 }}}}, "~B");
40701 Clazz_overrideMethod (c$, "run", 
40702 function () {
40703 });
40704 c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", 
40705 function () {
40706 return ((Clazz_isClassDefined ("jssun.awt.AWTAutoShutdown$1") ? 0 : jssun.awt.AWTAutoShutdown.$AWTAutoShutdown$1$ ()), Clazz_innerTypeInstance (jssun.awt.AWTAutoShutdown$1, this, null, jssun.awt.AWTAutoShutdown.getInstance (), 0));
40707 });
40708 Clazz_defineMethod (c$, "activateBlockerThread", 
40709  function () {
40710 });
40711 Clazz_defineMethod (c$, "registerPeer", 
40712 function (target, peer) {
40713 this.peerMap.put (target, peer);
40714 this.notifyPeerMapUpdated ();
40715 }, "~O,~O");
40716 Clazz_defineMethod (c$, "unregisterPeer", 
40717 function (target, peer) {
40718 if (this.peerMap.get (target) === peer) {
40719 this.peerMap.remove (target);
40720 }}, "~O,~O");
40721 Clazz_defineMethod (c$, "getPeer", 
40722 function (target) {
40723 return this.peerMap.get (target);
40724 }, "~O");
40725 Clazz_defineMethod (c$, "dumpPeers", 
40726 function (aLog) {
40727 aLog.fine ("Mapped peers:");
40728 for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
40729 aLog.fine (key + "->" + this.peerMap.get (key));
40730 }
40731 }, "java.util.logging.Logger");
40732 c$.$AWTAutoShutdown$1$ = function () {
40733 Clazz_pu$h(self.c$);
40734 c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent);
40735 c$ = Clazz_p0p ();
40736 };
40737 Clazz_defineStatics (c$,
40738 "theInstance", null);
40739 });
40740 Clazz_declarePackage ("jssun.awt");
40741 c$ = Clazz_decorateAsClass (function () {
40742 this.event = null;
40743 this.next = null;
40744 Clazz_instantialize (this, arguments);
40745 }, jssun.awt, "EventQueueItem");
40746 Clazz_makeConstructor (c$, 
40747 function (evt) {
40748 this.event = evt;
40749 }, "java.awt.AWTEvent");
40750 Clazz_declarePackage ("jssun.awt");
40751 Clazz_declareInterface (jssun.awt, "ModalExclude");
40752 Clazz_declarePackage ("jssun.awt");
40753 Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () {
40754 c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]);
40755 Clazz_overrideMethod (c$, "isObscured", 
40756 function () {
40757 return false;
40758 });
40759 Clazz_overrideMethod (c$, "canDetermineObscurity", 
40760 function () {
40761 return false;
40762 });
40763 Clazz_overrideMethod (c$, "isFocusable", 
40764 function () {
40765 return false;
40766 });
40767 Clazz_overrideMethod (c$, "setVisible", 
40768 function (b) {
40769 }, "~B");
40770 Clazz_defineMethod (c$, "show", 
40771 function () {
40772 });
40773 Clazz_defineMethod (c$, "hide", 
40774 function () {
40775 });
40776 Clazz_overrideMethod (c$, "setEnabled", 
40777 function (b) {
40778 }, "~B");
40779 Clazz_defineMethod (c$, "enable", 
40780 function () {
40781 });
40782 Clazz_defineMethod (c$, "disable", 
40783 function () {
40784 });
40785 Clazz_overrideMethod (c$, "paint", 
40786 function (g) {
40787 }, "java.awt.Graphics");
40788 Clazz_overrideMethod (c$, "repaint", 
40789 function (tm, x, y, width, height) {
40790 }, "~N,~N,~N,~N,~N");
40791 Clazz_overrideMethod (c$, "print", 
40792 function (g) {
40793 }, "java.awt.Graphics");
40794 Clazz_overrideMethod (c$, "setBounds", 
40795 function (x, y, width, height, op) {
40796 }, "~N,~N,~N,~N,~N");
40797 Clazz_defineMethod (c$, "reshape", 
40798 function (x, y, width, height) {
40799 }, "~N,~N,~N,~N");
40800 Clazz_overrideMethod (c$, "coalescePaintEvent", 
40801 function (e) {
40802 }, "java.awt.event.PaintEvent");
40803 Clazz_defineMethod (c$, "handleEvent", 
40804 function (e) {
40805 return false;
40806 }, "java.awt.Event");
40807 Clazz_defineMethod (c$, "handleEvent", 
40808 function (arg0) {
40809 }, "java.awt.AWTEvent");
40810 Clazz_overrideMethod (c$, "getPreferredSize", 
40811 function () {
40812 return  new java.awt.Dimension (1, 1);
40813 });
40814 Clazz_overrideMethod (c$, "getMinimumSize", 
40815 function () {
40816 return  new java.awt.Dimension (1, 1);
40817 });
40818 Clazz_overrideMethod (c$, "getToolkit", 
40819 function () {
40820 return null;
40821 });
40822 Clazz_overrideMethod (c$, "getColorModel", 
40823 function () {
40824 return null;
40825 });
40826 Clazz_overrideMethod (c$, "getGraphics", 
40827 function () {
40828 return null;
40829 });
40830 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
40831 function () {
40832 return null;
40833 });
40834 Clazz_overrideMethod (c$, "getFontMetrics", 
40835 function (font) {
40836 return null;
40837 }, "java.awt.Font");
40838 Clazz_overrideMethod (c$, "dispose", 
40839 function () {
40840 });
40841 Clazz_overrideMethod (c$, "setForeground", 
40842 function (c) {
40843 }, "java.awt.Color");
40844 Clazz_overrideMethod (c$, "setBackground", 
40845 function (c) {
40846 }, "java.awt.Color");
40847 Clazz_overrideMethod (c$, "setFont", 
40848 function (f) {
40849 }, "java.awt.Font");
40850 Clazz_overrideMethod (c$, "updateCursorImmediately", 
40851 function () {
40852 });
40853 Clazz_defineMethod (c$, "setCursor", 
40854 function (cursor) {
40855 }, "java.awt.Cursor");
40856 Clazz_overrideMethod (c$, "requestFocus", 
40857 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
40858 return false;
40859 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
40860 Clazz_defineMethod (c$, "createImage", 
40861 function (producer) {
40862 return null;
40863 }, "java.awt.image.ImageProducer");
40864 Clazz_defineMethod (c$, "createImage", 
40865 function (width, height) {
40866 return null;
40867 }, "~N,~N");
40868 Clazz_overrideMethod (c$, "prepareImage", 
40869 function (img, w, h, o) {
40870 return false;
40871 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40872 Clazz_overrideMethod (c$, "checkImage", 
40873 function (img, w, h, o) {
40874 return 0;
40875 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40876 Clazz_defineMethod (c$, "preferredSize", 
40877 function () {
40878 return this.getPreferredSize ();
40879 });
40880 Clazz_defineMethod (c$, "minimumSize", 
40881 function () {
40882 return this.getMinimumSize ();
40883 });
40884 Clazz_overrideMethod (c$, "getLocationOnScreen", 
40885 function () {
40886 return  new java.awt.Point (0, 0);
40887 });
40888 Clazz_overrideMethod (c$, "getInsets", 
40889 function () {
40890 return this.insets ();
40891 });
40892 Clazz_overrideMethod (c$, "beginValidate", 
40893 function () {
40894 });
40895 Clazz_overrideMethod (c$, "endValidate", 
40896 function () {
40897 });
40898 Clazz_defineMethod (c$, "insets", 
40899 function () {
40900 return  new java.awt.Insets (0, 0, 0, 0);
40901 });
40902 Clazz_defineMethod (c$, "isPaintPending", 
40903 function () {
40904 return false;
40905 });
40906 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
40907 function () {
40908 return false;
40909 });
40910 Clazz_overrideMethod (c$, "createVolatileImage", 
40911 function (width, height) {
40912 return null;
40913 }, "~N,~N");
40914 Clazz_overrideMethod (c$, "beginLayout", 
40915 function () {
40916 });
40917 Clazz_overrideMethod (c$, "endLayout", 
40918 function () {
40919 });
40920 Clazz_overrideMethod (c$, "getBackBuffer", 
40921 function () {
40922 throw  new IllegalStateException ("Page-flipping is not allowed on a lightweight component");
40923 });
40924 Clazz_overrideMethod (c$, "destroyBuffers", 
40925 function () {
40926 });
40927 Clazz_overrideMethod (c$, "isReparentSupported", 
40928 function () {
40929 return false;
40930 });
40931 Clazz_overrideMethod (c$, "reparent", 
40932 function (newNativeParent) {
40933 throw  new UnsupportedOperationException ();
40934 }, "java.awt.peer.ContainerPeer");
40935 Clazz_defineMethod (c$, "restack", 
40936 function () {
40937 throw  new UnsupportedOperationException ();
40938 });
40939 Clazz_defineMethod (c$, "isRestackSupported", 
40940 function () {
40941 return false;
40942 });
40943 Clazz_overrideMethod (c$, "layout", 
40944 function () {
40945 });
40946 Clazz_overrideMethod (c$, "getBounds", 
40947 function () {
40948 return  new java.awt.Rectangle (0, 0, 0, 0);
40949 });
40950 });
40951 Clazz_declarePackage ("jssun.awt");
40952 Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () {
40953 c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher");
40954 c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", 
40955 function (dispatcher) {
40956 {
40957 jssun.awt.PaintEventDispatcher.dispatcher = dispatcher;
40958 }}, "jssun.awt.PaintEventDispatcher");
40959 c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", 
40960 function () {
40961 {
40962 if (jssun.awt.PaintEventDispatcher.dispatcher == null) {
40963 jssun.awt.PaintEventDispatcher.dispatcher =  new jssun.awt.PaintEventDispatcher ();
40964 }return jssun.awt.PaintEventDispatcher.dispatcher;
40965 }});
40966 Clazz_defineMethod (c$, "createPaintEvent", 
40967 function (target, x, y, w, h) {
40968 return  new java.awt.event.PaintEvent (target, 800,  new java.awt.Rectangle (x, y, w, h));
40969 }, "java.awt.Component,~N,~N,~N,~N");
40970 Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", 
40971 function (c) {
40972 return true;
40973 }, "java.awt.Component");
40974 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40975 function (c, r) {
40976 return false;
40977 }, "java.awt.Component,Runnable");
40978 Clazz_defineStatics (c$,
40979 "dispatcher", null);
40980 });
40981 Clazz_declarePackage ("jssun.awt");
40982 Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () {
40983 c$ = Clazz_decorateAsClass (function () {
40984 this.queueHead = null;
40985 this.queueTail = null;
40986 this.eventQueue = null;
40987 Clazz_instantialize (this, arguments);
40988 }, jssun.awt, "PostEventQueue");
40989 Clazz_makeConstructor (c$, 
40990 function (eq) {
40991 this.eventQueue = eq;
40992 }, "java.awt.EventQueue");
40993 Clazz_defineMethod (c$, "noEvents", 
40994 function () {
40995 return this.queueHead == null;
40996 });
40997 Clazz_defineMethod (c$, "flush", 
40998 function () {
40999 if (this.queueHead != null) {
41000 var tempQueue;
41001 {
41002 tempQueue = this.queueHead;
41003 this.queueHead = this.queueTail = null;
41004 while (tempQueue != null) {
41005 swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event);
41006 this.eventQueue.postEvent (tempQueue.event);
41007 tempQueue = tempQueue.next;
41008 }
41009 }}});
41010 Clazz_defineMethod (c$, "postEvent", 
41011 function (event) {
41012 var item =  new jssun.awt.EventQueueItem (event);
41013 {
41014 if (this.queueHead == null) {
41015 this.queueHead = this.queueTail = item;
41016 } else {
41017 this.queueTail.next = item;
41018 this.queueTail = item;
41019 }}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false);
41020 }, "java.awt.AWTEvent");
41021 });
41022 Clazz_declarePackage ("jssun.java2d");
41023 Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () {
41024 c$ = Clazz_decorateAsClass (function () {
41025 this.transformState = 0;
41026 this.foregroundColor = null;
41027 this.backgroundColor = null;
41028 this.$transform = null;
41029 this.transX = 0;
41030 this.transY = 0;
41031 this.hints = null;
41032 Clazz_instantialize (this, arguments);
41033 }, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D);
41034 Clazz_defineMethod (c$, "clone", 
41035 function () {
41036 return this.clone0 ();
41037 });
41038 Clazz_defineMethod (c$, "clone0", 
41039 function () {
41040 try {
41041 var g;
41042 {
41043 g = Clazz_clone(this);
41044 }g.$transform =  new java.awt.geom.AffineTransform (this.$transform);
41045 if (this.hints != null) {
41046 g.hints = this.hints.clone ();
41047 }return g;
41048 } catch (e) {
41049 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
41050 } else {
41051 throw e;
41052 }
41053 }
41054 return null;
41055 });
41056 Clazz_defineMethod (c$, "create", 
41057 function () {
41058 return this.clone0 ();
41059 });
41060 Clazz_defineStatics (c$,
41061 "TRANSFORM_GENERIC", 4,
41062 "TRANSFORM_TRANSLATESCALE", 3,
41063 "TRANSFORM_ANY_TRANSLATE", 2,
41064 "TRANSFORM_INT_TRANSLATE", 1,
41065 "TRANSFORM_ISIDENT", 0);
41066 });
41067 Clazz_declarePackage ("javax.swing");
41068 Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () {
41069 c$ = Clazz_declareType (javax.swing, "UIManager");
41070 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
41071 function () {
41072 return javax.swing.UIManager.uid;
41073 });
41074 c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", 
41075 function () {
41076 return javax.swing.UIManager.installedLAFs;
41077 });
41078 c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", 
41079 function (infos) {
41080 swingjs.JSToolkit.notImplemented (null);
41081 }, "~A");
41082 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41083 function (info) {
41084 swingjs.JSToolkit.notImplemented (null);
41085 }, "javax.swing.UIManager.LookAndFeelInfo");
41086 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41087 function (name, className) {
41088 swingjs.JSToolkit.notImplemented (null);
41089 }, "~S,~S");
41090 c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", 
41091 function () {
41092 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
41093 });
41094 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41095 function (newLookAndFeel) {
41096 }, "javax.swing.LookAndFeel");
41097 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41098 function (className) {
41099 var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className);
41100 javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ()));
41101 }, "~S");
41102 c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", 
41103 function () {
41104 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
41105 });
41106 c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", 
41107 function () {
41108 return "swingjs.plaf.HTML5LookAndFeel";
41109 });
41110 c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", 
41111 function () {
41112 javax.swing.UIManager.maybeInitialize ();
41113 return javax.swing.UIManager.uid;
41114 });
41115 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41116 function (key) {
41117 return javax.swing.UIManager.getDefaults ().getFont (key);
41118 }, "~O");
41119 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41120 function (key, l) {
41121 return javax.swing.UIManager.getDefaults ().getFont (key, l);
41122 }, "~O,java.util.Locale");
41123 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41124 function (key) {
41125 return javax.swing.UIManager.getDefaults ().getColor (key);
41126 }, "~O");
41127 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41128 function (key, l) {
41129 return javax.swing.UIManager.getDefaults ().getColor (key, l);
41130 }, "~O,java.util.Locale");
41131 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41132 function (key) {
41133 return javax.swing.UIManager.getDefaults ().getIcon (key);
41134 }, "~O");
41135 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41136 function (key, l) {
41137 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
41138 }, "~O,java.util.Locale");
41139 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41140 function (key) {
41141 return javax.swing.UIManager.getDefaults ().getBorder (key);
41142 }, "~O");
41143 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41144 function (key, l) {
41145 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
41146 }, "~O,java.util.Locale");
41147 c$.getString = Clazz_defineMethod (c$, "getString", 
41148 function (key) {
41149 return javax.swing.UIManager.getDefaults ().getString (key);
41150 }, "~O");
41151 c$.getString = Clazz_defineMethod (c$, "getString", 
41152 function (key, l) {
41153 return javax.swing.UIManager.getDefaults ().getString (key, l);
41154 }, "~O,java.util.Locale");
41155 c$.getString = Clazz_defineMethod (c$, "getString", 
41156 function (key, c) {
41157 var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale ();
41158 return javax.swing.UIManager.getString (key, l);
41159 }, "~O,java.awt.Component");
41160 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41161 function (key) {
41162 return javax.swing.UIManager.getDefaults ().getInt (key);
41163 }, "~O");
41164 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41165 function (key, l) {
41166 return javax.swing.UIManager.getDefaults ().getInt (key, l);
41167 }, "~O,java.util.Locale");
41168 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41169 function (key) {
41170 return javax.swing.UIManager.getDefaults ().getBoolean (key);
41171 }, "~O");
41172 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41173 function (key, l) {
41174 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
41175 }, "~O,java.util.Locale");
41176 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41177 function (key) {
41178 return javax.swing.UIManager.getDefaults ().getInsets (key);
41179 }, "~O");
41180 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41181 function (key, l) {
41182 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
41183 }, "~O,java.util.Locale");
41184 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41185 function (key) {
41186 return javax.swing.UIManager.getDefaults ().getDimension (key);
41187 }, "~O");
41188 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41189 function (key, l) {
41190 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
41191 }, "~O,java.util.Locale");
41192 c$.get = Clazz_defineMethod (c$, "get", 
41193 function (key) {
41194 return javax.swing.UIManager.getDefaults ().get (key);
41195 }, "~O");
41196 c$.get = Clazz_defineMethod (c$, "get", 
41197 function (key, l) {
41198 return javax.swing.UIManager.getDefaults ().get (key, l);
41199 }, "~O,java.util.Locale");
41200 c$.put = Clazz_defineMethod (c$, "put", 
41201 function (key, value) {
41202 return javax.swing.UIManager.getDefaults ().put (key, value);
41203 }, "~O,~O");
41204 c$.getUI = Clazz_defineMethod (c$, "getUI", 
41205 function (target) {
41206 javax.swing.UIManager.maybeInitialize ();
41207 var ui = null;
41208 ui = javax.swing.UIManager.getDefaults ().getUI (target);
41209 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
41210 return ui;
41211 }, "javax.swing.JComponent");
41212 c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", 
41213 function (listener) {
41214 }, "java.beans.PropertyChangeListener");
41215 c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", 
41216 function (listener) {
41217 }, "java.beans.PropertyChangeListener");
41218 c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41219 function () {
41220 return  new Array (0);
41221 });
41222 c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", 
41223  function () {
41224 if (javax.swing.UIManager.uid == null) {
41225 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
41226 javax.swing.UIManager.initialize ();
41227 }});
41228 c$.initialize = Clazz_defineMethod (c$, "initialize", 
41229  function () {
41230 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
41231 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
41232 }});
41233 Clazz_pu$h(self.c$);
41234 c$ = Clazz_decorateAsClass (function () {
41235 this.name = null;
41236 this.className = null;
41237 Clazz_instantialize (this, arguments);
41238 }, javax.swing.UIManager, "LookAndFeelInfo");
41239 Clazz_makeConstructor (c$, 
41240 function (a, b) {
41241 this.name = a;
41242 this.className = b;
41243 }, "~S,~S");
41244 Clazz_defineMethod (c$, "getName", 
41245 function () {
41246 return this.name;
41247 });
41248 Clazz_defineMethod (c$, "getClassName", 
41249 function () {
41250 return this.className;
41251 });
41252 Clazz_overrideMethod (c$, "toString", 
41253 function () {
41254 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
41255 });
41256 c$ = Clazz_p0p ();
41257 Clazz_defineStatics (c$,
41258 "installedLAFs", null);
41259 {
41260 var iLAFs =  new java.util.ArrayList (4);
41261 iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel"));
41262 javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ()));
41263 }Clazz_defineStatics (c$,
41264 "laf", null,
41265 "uid", null);
41266 });
41267 Clazz_declarePackage ("javax.swing");
41268 Clazz_load (["java.util.Hashtable", "java.util.Locale"], "javax.swing.UIDefaults", ["java.lang.Boolean", "$.Error", "java.util.HashMap", "$.Vector", "java.awt.Color", "$.Dimension", "$.Font", "$.Insets", "javax.swing.Icon", "$.SwingUtilities", "javax.swing.border.Border", "javax.swing.event.SwingPropertyChangeSupport", "swingjs.JSToolkit"], function () {
41269 c$ = Clazz_decorateAsClass (function () {
41270 this.changeSupport = null;
41271 this.resourceBundles = null;
41272 this.defaultLocale = null;
41273 this.resourceCache = null;
41274 Clazz_instantialize (this, arguments);
41275 }, javax.swing, "UIDefaults", java.util.Hashtable);
41276 Clazz_prepareFields (c$, function () {
41277 this.defaultLocale = java.util.Locale.getDefault ();
41278 });
41279 Clazz_makeConstructor (c$, 
41280 function () {
41281 this.construct (700, .75);
41282 });
41283 Clazz_makeConstructor (c$, 
41284 function (initialCapacity, loadFactor) {
41285 Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]);
41286 this.resourceCache =  new java.util.HashMap ();
41287 }, "~N,~N");
41288 Clazz_makeConstructor (c$, 
41289 function (keyValueList) {
41290 Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]);
41291 for (var i = 0; i < keyValueList.length; i += 2) {
41292 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]);
41293 }
41294 }, "~A");
41295 Clazz_defineMethod (c$, "get", 
41296 function (key) {
41297 var value = this.getFromHashtable (key);
41298 return (value != null) ? value : this.getFromResourceBundle (key, null);
41299 }, "~O");
41300 Clazz_defineMethod (c$, "getFromHashtable", 
41301  function (key) {
41302 var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]);
41303 if (value == null && (Clazz_instanceOf (key, String))) {
41304 var skey = key;
41305 if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]);
41306 }if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) {
41307 return value;
41308 }if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) {
41309 return value;
41310 }if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) {
41311 try {
41312 value = (value).createValue (this);
41313 } finally {
41314 if (value == null) {
41315 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]);
41316 } else {
41317 Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41318 }}
41319 } else {
41320 value = (value).createValue (this);
41321 }return value;
41322 }, "~O");
41323 Clazz_defineMethod (c$, "get", 
41324 function (key, l) {
41325 var value = this.getFromHashtable (key);
41326 return (value != null) ? value : this.getFromResourceBundle (key, l);
41327 }, "~O,java.util.Locale");
41328 Clazz_defineMethod (c$, "getFromResourceBundle", 
41329  function (key, l) {
41330 if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) {
41331 return null;
41332 }if (l == null) {
41333 if (this.defaultLocale == null) return null;
41334  else l = this.defaultLocale;
41335 }{
41336 return this.getResourceCache (l).get (key);
41337 }}, "~O,java.util.Locale");
41338 Clazz_defineMethod (c$, "getResourceCache", 
41339  function (l) {
41340 return null;
41341 }, "java.util.Locale");
41342 Clazz_defineMethod (c$, "put", 
41343 function (key, value) {
41344 var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41345 if (Clazz_instanceOf (key, String)) {
41346 this.firePropertyChange (key, oldValue, value);
41347 }return oldValue;
41348 }, "~O,~O");
41349 Clazz_defineMethod (c$, "putDefaults", 
41350 function (keyValueList) {
41351 for (var i = 0, max = keyValueList.length; i < max; i += 2) {
41352 var value = keyValueList[i + 1];
41353 if (value == null) {
41354 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]);
41355 } else {
41356 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]);
41357 }}
41358 this.firePropertyChange ("UIDefaults", null, null);
41359 }, "~A");
41360 Clazz_defineMethod (c$, "getFont", 
41361 function (key) {
41362 var value = this.get (key);
41363 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41364 }, "~O");
41365 Clazz_defineMethod (c$, "getFont", 
41366 function (key, l) {
41367 var value = this.get (key, l);
41368 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41369 }, "~O,java.util.Locale");
41370 Clazz_defineMethod (c$, "getColor", 
41371 function (key) {
41372 var value = this.get (key);
41373 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41374 }, "~O");
41375 Clazz_defineMethod (c$, "getColor", 
41376 function (key, l) {
41377 var value = this.get (key, l);
41378 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41379 }, "~O,java.util.Locale");
41380 Clazz_defineMethod (c$, "getIcon", 
41381 function (key) {
41382 var value = this.get (key);
41383 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41384 }, "~O");
41385 Clazz_defineMethod (c$, "getIcon", 
41386 function (key, l) {
41387 var value = this.get (key, l);
41388 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41389 }, "~O,java.util.Locale");
41390 Clazz_defineMethod (c$, "getBorder", 
41391 function (key) {
41392 var value = this.get (key);
41393 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41394 }, "~O");
41395 Clazz_defineMethod (c$, "getBorder", 
41396 function (key, l) {
41397 var value = this.get (key, l);
41398 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41399 }, "~O,java.util.Locale");
41400 Clazz_defineMethod (c$, "getString", 
41401 function (key) {
41402 var value = this.get (key);
41403 return (Clazz_instanceOf (value, String)) ? value : null;
41404 }, "~O");
41405 Clazz_defineMethod (c$, "getString", 
41406 function (key, l) {
41407 var value = this.get (key, l);
41408 return (Clazz_instanceOf (value, String)) ? value : null;
41409 }, "~O,java.util.Locale");
41410 Clazz_defineMethod (c$, "getInt", 
41411 function (key) {
41412 var value = this.get (key);
41413 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41414 }, "~O");
41415 Clazz_defineMethod (c$, "getInt", 
41416 function (key, l) {
41417 var value = this.get (key, l);
41418 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41419 }, "~O,java.util.Locale");
41420 Clazz_defineMethod (c$, "getBoolean", 
41421 function (key) {
41422 var value = this.get (key);
41423 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41424 }, "~O");
41425 Clazz_defineMethod (c$, "getBoolean", 
41426 function (key, l) {
41427 var value = this.get (key, l);
41428 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41429 }, "~O,java.util.Locale");
41430 Clazz_defineMethod (c$, "getInsets", 
41431 function (key) {
41432 var value = this.get (key);
41433 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41434 }, "~O");
41435 Clazz_defineMethod (c$, "getInsets", 
41436 function (key, l) {
41437 var value = this.get (key, l);
41438 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41439 }, "~O,java.util.Locale");
41440 Clazz_defineMethod (c$, "getDimension", 
41441 function (key) {
41442 var value = this.get (key);
41443 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41444 }, "~O");
41445 Clazz_defineMethod (c$, "getDimension", 
41446 function (key, l) {
41447 var value = this.get (key, l);
41448 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41449 }, "~O,java.util.Locale");
41450 Clazz_defineMethod (c$, "getUIClass", 
41451 function (uiClassID, uiClassLoader) {
41452 try {
41453 var className = this.get (uiClassID);
41454 if (className != null) {
41455 var cls = this.get (className);
41456 if (cls == null) {
41457 if (uiClassLoader == null) {
41458 cls = javax.swing.SwingUtilities.loadSystemClass (className);
41459 } else {
41460 cls = uiClassLoader.loadClass (className);
41461 }if (cls != null) {
41462 this.put (className, cls);
41463 }}return cls;
41464 }} catch (e$$) {
41465 if (Clazz_exceptionOf (e$$, ClassNotFoundException)) {
41466 var e = e$$;
41467 {
41468 return null;
41469 }
41470 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
41471 var e = e$$;
41472 {
41473 return null;
41474 }
41475 } else {
41476 throw e$$;
41477 }
41478 }
41479 return null;
41480 }, "~S,ClassLoader");
41481 Clazz_defineMethod (c$, "getUIClass", 
41482 function (uiClassID) {
41483 return this.getUIClass (uiClassID, null);
41484 }, "~S");
41485 Clazz_defineMethod (c$, "getUIError", 
41486 function (msg) {
41487 System.err.println ("UIDefaults.getUI() failed: " + msg);
41488 try {
41489 throw  new Error ();
41490 } catch (e) {
41491 e.printStackTrace ();
41492 }
41493 }, "~S");
41494 Clazz_defineMethod (c$, "getUI", 
41495 function (target) {
41496 return swingjs.JSToolkit.getComponentUI (target);
41497 }, "javax.swing.JComponent");
41498 Clazz_defineMethod (c$, "addPropertyChangeListener", 
41499 function (listener) {
41500 if (this.changeSupport == null) {
41501 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
41502 }this.changeSupport.addPropertyChangeListener (listener);
41503 }, "java.beans.PropertyChangeListener");
41504 Clazz_defineMethod (c$, "removePropertyChangeListener", 
41505 function (listener) {
41506 if (this.changeSupport != null) {
41507 this.changeSupport.removePropertyChangeListener (listener);
41508 }}, "java.beans.PropertyChangeListener");
41509 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41510 function () {
41511 if (this.changeSupport == null) {
41512 return  new Array (0);
41513 }return this.changeSupport.getPropertyChangeListeners ();
41514 });
41515 Clazz_defineMethod (c$, "firePropertyChange", 
41516 function (propertyName, oldValue, newValue) {
41517 if (this.changeSupport != null) {
41518 this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
41519 }}, "~S,~O,~O");
41520 Clazz_defineMethod (c$, "addResourceBundle", 
41521 function (bundleName) {
41522 if (bundleName == null) {
41523 return;
41524 }if (this.resourceBundles == null) {
41525 this.resourceBundles =  new java.util.Vector (5);
41526 }if (!this.resourceBundles.contains (bundleName)) {
41527 this.resourceBundles.add (bundleName);
41528 this.resourceCache.clear ();
41529 }}, "~S");
41530 Clazz_defineMethod (c$, "removeResourceBundle", 
41531 function (bundleName) {
41532 if (this.resourceBundles != null) {
41533 this.resourceBundles.remove (bundleName);
41534 }this.resourceCache.clear ();
41535 }, "~S");
41536 Clazz_defineMethod (c$, "setDefaultLocale", 
41537 function (l) {
41538 this.defaultLocale = l;
41539 }, "java.util.Locale");
41540 Clazz_defineMethod (c$, "getDefaultLocale", 
41541 function () {
41542 return this.defaultLocale;
41543 });
41544 Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue");
41545 Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue");
41546 c$.PENDING = c$.prototype.PENDING =  String.instantialize ("Pending");
41547 });
41548 Clazz_declarePackage ("javax.swing");
41549 Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () {
41550 c$ = Clazz_declareType (javax.swing, "LookAndFeel");
41551 c$.installColors = Clazz_defineMethod (c$, "installColors", 
41552 function (c, defaultBgName, defaultFgName) {
41553 var bg = c.getBackground ();
41554 if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName));
41555 var fg = c.getForeground ();
41556 if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName));
41557 }, "javax.swing.JComponent,~S,~S");
41558 c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", 
41559 function (c, defaultBgName, defaultFgName, defaultFontName) {
41560 var f = c.getFont ();
41561 if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) {
41562 c.setFont (javax.swing.UIManager.getFont (defaultFontName));
41563 }javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName);
41564 }, "javax.swing.JComponent,~S,~S,~S");
41565 c$.installBorder = Clazz_defineMethod (c$, "installBorder", 
41566 function (c, defaultBorderName) {
41567 swingjs.JSToolkit.notImplemented (null);
41568 }, "javax.swing.JComponent,~S");
41569 c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", 
41570 function (c) {
41571 swingjs.JSToolkit.notImplemented (null);
41572 }, "javax.swing.JComponent");
41573 c$.installProperty = Clazz_defineMethod (c$, "installProperty", 
41574 function (c, propertyName, propertyValue) {
41575 if (Clazz_instanceOf (c, javax.swing.JPasswordField)) {
41576 if (!(c).customSetUIProperty (propertyName, propertyValue)) {
41577 c.setUIProperty (propertyName, propertyValue);
41578 }} else {
41579 c.setUIProperty (propertyName, propertyValue);
41580 }}, "javax.swing.JComponent,~S,~O");
41581 c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", 
41582 function (keyBindingList) {
41583 swingjs.JSToolkit.notImplemented (null);
41584 return null;
41585 }, "~A");
41586 c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", 
41587 function (keys) {
41588 swingjs.JSToolkit.notImplemented (null);
41589 return null;
41590 }, "~A");
41591 c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", 
41592 function (c, keys) {
41593 swingjs.JSToolkit.notImplemented (null);
41594 return null;
41595 }, "javax.swing.JComponent,~A");
41596 c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", 
41597 function (retMap, keys) {
41598 swingjs.JSToolkit.notImplemented (null);
41599 }, "javax.swing.InputMap,~A");
41600 c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", 
41601 function (baseClass, gifFile) {
41602 swingjs.JSToolkit.notImplemented (null);
41603 return null;
41604 }, "Class,~S");
41605 Clazz_defineMethod (c$, "getLayoutStyle", 
41606 function () {
41607 return jssun.swing.DefaultLayoutStyle.getInstance ();
41608 });
41609 Clazz_defineMethod (c$, "provideErrorFeedback", 
41610 function (component) {
41611 swingjs.JSToolkit.notImplemented (null);
41612 }, "java.awt.Component");
41613 c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", 
41614 function (systemPropertyName, fallbackValue) {
41615 swingjs.JSToolkit.notImplemented (null);
41616 return fallbackValue;
41617 }, "~S,~O");
41618 Clazz_defineMethod (c$, "getDisabledIcon", 
41619 function (component, icon) {
41620 swingjs.JSToolkit.notImplemented (null);
41621 return null;
41622 }, "javax.swing.JComponent,javax.swing.Icon");
41623 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
41624 function (component, icon) {
41625 return this.getDisabledIcon (component, icon);
41626 }, "javax.swing.JComponent,javax.swing.Icon");
41627 Clazz_defineMethod (c$, "getSupportsWindowDecorations", 
41628 function () {
41629 return false;
41630 });
41631 Clazz_defineMethod (c$, "initialize", 
41632 function () {
41633 });
41634 Clazz_defineMethod (c$, "uninitialize", 
41635 function () {
41636 });
41637 Clazz_defineMethod (c$, "getDefaults", 
41638 function () {
41639 return null;
41640 });
41641 Clazz_overrideMethod (c$, "toString", 
41642 function () {
41643 return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]";
41644 });
41645 });
41646 Clazz_declarePackage ("javax.swing");
41647 Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () {
41648 c$ = Clazz_declareType (javax.swing, "DropMode", Enum);
41649 Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []);
41650 Clazz_defineEnumConstant (c$, "ON", 1, []);
41651 Clazz_defineEnumConstant (c$, "INSERT", 2, []);
41652 Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []);
41653 Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []);
41654 Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []);
41655 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []);
41656 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []);
41657 });
41658 Clazz_declarePackage ("java.awt.font");
41659 Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () {
41660 c$ = Clazz_decorateAsClass (function () {
41661 this.tx = null;
41662 this.aaHintValue = null;
41663 this.fmHintValue = null;
41664 this.defaulting = false;
41665 Clazz_instantialize (this, arguments);
41666 }, java.awt.font, "FontRenderContext");
41667 Clazz_makeConstructor (c$, 
41668 function () {
41669 this.defaulting = true;
41670 });
41671 Clazz_makeConstructor (c$, 
41672 function (tx, isAntiAliased, usesFractionalMetrics) {
41673 if (tx != null && !tx.isIdentity ()) {
41674 this.tx =  new java.awt.geom.AffineTransform (tx);
41675 }}, "java.awt.geom.AffineTransform,~B,~B");
41676 Clazz_makeConstructor (c$, 
41677 function (tx, aaHint, fmHint) {
41678 if (tx != null && !tx.isIdentity ()) {
41679 this.tx =  new java.awt.geom.AffineTransform (tx);
41680 }this.aaHintValue = aaHint;
41681 this.fmHintValue = fmHint;
41682 }, "java.awt.geom.AffineTransform,~O,~O");
41683 Clazz_defineMethod (c$, "isTransformed", 
41684 function () {
41685 if (!this.defaulting) {
41686 return this.tx != null;
41687 } else {
41688 return !this.getTransform ().isIdentity ();
41689 }});
41690 Clazz_defineMethod (c$, "getTransformType", 
41691 function () {
41692 if (!this.defaulting) {
41693 if (this.tx == null) {
41694 return 0;
41695 } else {
41696 return this.tx.getType ();
41697 }} else {
41698 return this.getTransform ().getType ();
41699 }});
41700 Clazz_defineMethod (c$, "getTransform", 
41701 function () {
41702 return (this.tx == null) ?  new java.awt.geom.AffineTransform () :  new java.awt.geom.AffineTransform (this.tx);
41703 });
41704 Clazz_defineMethod (c$, "isAntiAliased", 
41705 function () {
41706 return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
41707 });
41708 Clazz_defineMethod (c$, "usesFractionalMetrics", 
41709 function () {
41710 return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
41711 });
41712 Clazz_defineMethod (c$, "getAntiAliasingHint", 
41713 function () {
41714 if (this.defaulting) {
41715 if (this.isAntiAliased ()) {
41716 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
41717 } else {
41718 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
41719 }}return this.aaHintValue;
41720 });
41721 Clazz_defineMethod (c$, "getFractionalMetricsHint", 
41722 function () {
41723 if (this.defaulting) {
41724 if (this.usesFractionalMetrics ()) {
41725 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON;
41726 } else {
41727 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
41728 }}return this.fmHintValue;
41729 });
41730 Clazz_defineMethod (c$, "equals", 
41731 function (obj) {
41732 try {
41733 return this.equals (obj);
41734 } catch (e) {
41735 if (Clazz_exceptionOf (e, ClassCastException)) {
41736 return false;
41737 } else {
41738 throw e;
41739 }
41740 }
41741 }, "~O");
41742 Clazz_defineMethod (c$, "equals", 
41743 function (rhs) {
41744 if (this === rhs) {
41745 return true;
41746 }if (rhs == null) {
41747 return false;
41748 }if (!rhs.defaulting && !this.defaulting) {
41749 if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) {
41750 return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx);
41751 }return false;
41752 } else {
41753 return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ());
41754 }}, "java.awt.font.FontRenderContext");
41755 Clazz_defineMethod (c$, "hashCode", 
41756 function () {
41757 var hash = this.tx == null ? 0 : this.tx.hashCode ();
41758 if (this.defaulting) {
41759 hash += this.getAntiAliasingHint ().hashCode ();
41760 hash += this.getFractionalMetricsHint ().hashCode ();
41761 } else {
41762 hash += this.aaHintValue.hashCode ();
41763 hash += this.fmHintValue.hashCode ();
41764 }return hash;
41765 });
41766 });
41767 Clazz_declarePackage ("java.awt.event");
41768 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () {
41769 c$ = Clazz_decorateAsClass (function () {
41770 this.when = 0;
41771 this.text = null;
41772 this.committedCharacterCount = 0;
41773 Clazz_instantialize (this, arguments);
41774 }, java.awt.event, "InputMethodEvent", java.awt.AWTEvent);
41775 Clazz_defineMethod (c$, "getText", 
41776 function () {
41777 return this.text;
41778 });
41779 Clazz_defineMethod (c$, "getCommittedCharacterCount", 
41780 function () {
41781 return this.committedCharacterCount;
41782 });
41783 Clazz_defineMethod (c$, "getWhen", 
41784 function () {
41785 return this.when;
41786 });
41787 Clazz_defineStatics (c$,
41788 "INPUT_METHOD_FIRST", 1100,
41789 "INPUT_METHOD_TEXT_CHANGED", 1100,
41790 "CARET_POSITION_CHANGED", 1101,
41791 "INPUT_METHOD_LAST", 1101);
41792 });
41793 Clazz_declarePackage ("javax.swing");
41794 Clazz_load (["java.awt.event.ComponentAdapter", "javax.swing.JComponent"], "javax.swing.JViewport", ["java.lang.IllegalArgumentException", "java.applet.Applet", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle", "$.Window", "javax.swing.CellRendererPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager", "$.ViewportLayout", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
41795 c$ = Clazz_decorateAsClass (function () {
41796 this.isViewSizeSet = false;
41797 this.lastPaintPosition = null;
41798 this.backingStore = false;
41799 this.backingStoreImage = null;
41800 this.scrollUnderway = false;
41801 this.viewListener = null;
41802 this.changeEvent = null;
41803 this.scrollMode = 1;
41804 this.repaintAll = false;
41805 this.waitingForRepaint = false;
41806 this.inBlitPaint = false;
41807 this.hasHadValidView = false;
41808 if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) {
41809 javax.swing.JViewport.$JViewport$ViewListener$ ();
41810 }
41811 Clazz_instantialize (this, arguments);
41812 }, javax.swing, "JViewport", javax.swing.JComponent);
41813 Clazz_makeConstructor (c$, 
41814 function () {
41815 Clazz_superConstructor (this, javax.swing.JViewport);
41816 this.setLayout (this.createLayoutManager ());
41817 this.setOpaque (true);
41818 this.updateUI ();
41819 this.setInheritsPopupMenu (true);
41820 });
41821 Clazz_overrideMethod (c$, "getUI", 
41822 function () {
41823 return this.ui;
41824 });
41825 Clazz_overrideMethod (c$, "updateUI", 
41826 function () {
41827 this.setUI (javax.swing.UIManager.getUI (this));
41828 });
41829 Clazz_overrideMethod (c$, "getUIClassID", 
41830 function () {
41831 return "ViewportUI";
41832 });
41833 Clazz_overrideMethod (c$, "addImpl", 
41834 function (child, constraints, index) {
41835 this.setView (child);
41836 return child;
41837 }, "java.awt.Component,~O,~N");
41838 Clazz_defineMethod (c$, "remove", 
41839 function (child) {
41840 child.removeComponentListener (this.viewListener);
41841 this.removeChild (child);
41842 }, "java.awt.Component");
41843 Clazz_overrideMethod (c$, "scrollRectToVisible", 
41844 function (contentRect) {
41845 var view = this.getView ();
41846 if (view == null) {
41847 return;
41848 } else {
41849 if (!view.isValid ()) {
41850 this.validateView ();
41851 }var dx = 0;
41852 var dy = 0;
41853 dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x);
41854 dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y);
41855 if (dx != 0 || dy != 0) {
41856 var viewPosition = this.getViewPosition ();
41857 var viewSize = view.getSize ();
41858 var startX = viewPosition.x;
41859 var startY = viewPosition.y;
41860 var extent = this.getExtentSize ();
41861 viewPosition.x -= dx;
41862 viewPosition.y -= dy;
41863 if (view.isValid ()) {
41864 if (this.getParent ().getComponentOrientation ().isLeftToRight ()) {
41865 if (viewPosition.x + extent.width > viewSize.width) {
41866 viewPosition.x = Math.max (0, viewSize.width - extent.width);
41867 } else if (viewPosition.x < 0) {
41868 viewPosition.x = 0;
41869 }} else {
41870 if (extent.width > viewSize.width) {
41871 viewPosition.x = viewSize.width - extent.width;
41872 } else {
41873 viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x));
41874 }}if (viewPosition.y + extent.height > viewSize.height) {
41875 viewPosition.y = Math.max (0, viewSize.height - extent.height);
41876 } else if (viewPosition.y < 0) {
41877 viewPosition.y = 0;
41878 }}if (viewPosition.x != startX || viewPosition.y != startY) {
41879 this.setViewPosition (viewPosition);
41880 this.scrollUnderway = false;
41881 }}}}, "java.awt.Rectangle");
41882 Clazz_defineMethod (c$, "validateView", 
41883  function () {
41884 var validateRoot = null;
41885 for (var c = this; c != null; c = c.getParent ()) {
41886 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) {
41887 return;
41888 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
41889 validateRoot = c;
41890 break;
41891 }}
41892 if (validateRoot == null) {
41893 return;
41894 }var root = null;
41895 for (var c = validateRoot; c != null; c = c.getParent ()) {
41896 if (!c.isLightweight ()) {
41897 return;
41898 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
41899 root = c;
41900 break;
41901 }}
41902 if (root == null) {
41903 return;
41904 }validateRoot.validate ();
41905 var rm = javax.swing.RepaintManager.currentManager (this);
41906 if (rm != null) {
41907 rm.removeInvalidComponent (validateRoot);
41908 }});
41909 Clazz_defineMethod (c$, "positionAdjustment", 
41910  function (parentWidth, childWidth, childAt) {
41911 if (childAt >= 0 && childWidth + childAt <= parentWidth) {
41912 return 0;
41913 }if (childAt <= 0 && childWidth + childAt >= parentWidth) {
41914 return 0;
41915 }if (childAt > 0 && childWidth <= parentWidth) {
41916 return -childAt + parentWidth - childWidth;
41917 }if (childAt >= 0 && childWidth >= parentWidth) {
41918 return -childAt;
41919 }if (childAt <= 0 && childWidth <= parentWidth) {
41920 return -childAt;
41921 }if (childAt < 0 && childWidth >= parentWidth) {
41922 return -childAt + parentWidth - childWidth;
41923 }return 0;
41924 }, "~N,~N,~N");
41925 Clazz_overrideMethod (c$, "setBorder", 
41926 function (border) {
41927 if (border != null) {
41928 throw  new IllegalArgumentException ("JViewport.setBorder() not supported");
41929 }}, "javax.swing.border.Border");
41930 Clazz_defineMethod (c$, "getInsets", 
41931 function () {
41932 return  new java.awt.Insets (0, 0, 0, 0);
41933 });
41934 Clazz_defineMethod (c$, "getInsets", 
41935 function (insets) {
41936 insets.left = insets.top = insets.right = insets.bottom = 0;
41937 return insets;
41938 }, "java.awt.Insets");
41939 Clazz_defineMethod (c$, "getBackingStoreGraphics", 
41940  function (g) {
41941 var bsg = this.backingStoreImage.getGraphics ();
41942 bsg.setColor (g.getColor ());
41943 bsg.setFont (g.getFont ());
41944 bsg.setClip (g.getClipBounds ());
41945 return bsg;
41946 }, "java.awt.Graphics");
41947 Clazz_defineMethod (c$, "paintViaBackingStore", 
41948  function (g) {
41949 var bsg = this.getBackingStoreGraphics (g);
41950 try {
41951 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41952 g.drawImage (this.backingStoreImage, 0, 0, this);
41953 } finally {
41954 bsg.dispose ();
41955 }
41956 }, "java.awt.Graphics");
41957 Clazz_defineMethod (c$, "paintViaBackingStore", 
41958  function (g, oClip) {
41959 var bsg = this.getBackingStoreGraphics (g);
41960 try {
41961 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41962 g.setClip (oClip);
41963 g.drawImage (this.backingStoreImage, 0, 0, this);
41964 } finally {
41965 bsg.dispose ();
41966 }
41967 }, "java.awt.Graphics,java.awt.Rectangle");
41968 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
41969 function () {
41970 return false;
41971 });
41972 Clazz_overrideMethod (c$, "isPaintingOrigin", 
41973 function () {
41974 if (this.scrollMode == 2) {
41975 return true;
41976 }return false;
41977 });
41978 Clazz_defineMethod (c$, "getViewLocation", 
41979  function () {
41980 var view = this.getView ();
41981 if (view != null) {
41982 return view.getLocation ();
41983 } else {
41984 return  new java.awt.Point (0, 0);
41985 }});
41986 Clazz_defineMethod (c$, "paint", 
41987 function (g) {
41988 var width = this.getWidth ();
41989 var height = this.getHeight ();
41990 if ((width <= 0) || (height <= 0)) {
41991 return;
41992 }if (this.inBlitPaint) {
41993 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
41994 return;
41995 }if (this.repaintAll) {
41996 this.repaintAll = false;
41997 var clipB = g.getClipBounds ();
41998 } else if (this.waitingForRepaint) {
41999 var clipB = g.getClipBounds ();
42000 if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) {
42001 this.waitingForRepaint = false;
42002 }}if (!this.backingStore || this.isBlitting () || this.getView () == null) {
42003 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
42004 this.lastPaintPosition = this.getViewLocation ();
42005 return;
42006 }var viewBounds = this.getView ().getBounds ();
42007 if (!this.isOpaque ()) {
42008 g.clipRect (0, 0, viewBounds.width, viewBounds.height);
42009 }if (this.backingStoreImage == null) {
42010 this.backingStoreImage = this.createImage (width, height);
42011 var clip = g.getClipBounds ();
42012 if (clip.width != width || clip.height != height) {
42013 if (!this.isOpaque ()) {
42014 g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height));
42015 } else {
42016 g.setClip (0, 0, width, height);
42017 }this.paintViaBackingStore (g, clip);
42018 } else {
42019 this.paintViaBackingStore (g);
42020 }} else {
42021 if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) {
42022 this.paintViaBackingStore (g);
42023 } else {
42024 var blitFrom =  new java.awt.Point ();
42025 var blitTo =  new java.awt.Point ();
42026 var blitSize =  new java.awt.Dimension ();
42027 var blitPaint =  new java.awt.Rectangle ();
42028 var newLocation = this.getViewLocation ();
42029 var dx = newLocation.x - this.lastPaintPosition.x;
42030 var dy = newLocation.y - this.lastPaintPosition.y;
42031 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42032 if (!canBlit) {
42033 this.paintViaBackingStore (g);
42034 } else {
42035 var bdx = blitTo.x - blitFrom.x;
42036 var bdy = blitTo.y - blitFrom.y;
42037 var clip = g.getClipBounds ();
42038 g.setClip (0, 0, width, height);
42039 var bsg = this.getBackingStoreGraphics (g);
42040 try {
42041 bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy);
42042 g.setClip (clip.x, clip.y, clip.width, clip.height);
42043 var r = viewBounds.intersection (blitPaint);
42044 bsg.setClip (r);
42045 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
42046 g.drawImage (this.backingStoreImage, 0, 0, this);
42047 } finally {
42048 bsg.dispose ();
42049 }
42050 }}}this.lastPaintPosition = this.getViewLocation ();
42051 this.scrollUnderway = false;
42052 }, "java.awt.Graphics");
42053 Clazz_defineMethod (c$, "reshape", 
42054 function (x, y, w, h) {
42055 var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h);
42056 if (sizeChanged) {
42057 this.backingStoreImage = null;
42058 }Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]);
42059 if (sizeChanged) {
42060 this.fireStateChanged ();
42061 }}, "~N,~N,~N,~N");
42062 Clazz_defineMethod (c$, "setScrollMode", 
42063 function (mode) {
42064 this.scrollMode = mode;
42065 if (mode == 2) {
42066 this.backingStore = true;
42067 } else {
42068 this.backingStore = false;
42069 }}, "~N");
42070 Clazz_defineMethod (c$, "getScrollMode", 
42071 function () {
42072 return this.scrollMode;
42073 });
42074 Clazz_defineMethod (c$, "isBackingStoreEnabled", 
42075 function () {
42076 return this.scrollMode == 2;
42077 });
42078 Clazz_defineMethod (c$, "setBackingStoreEnabled", 
42079 function (enabled) {
42080 if (enabled) {
42081 this.setScrollMode (2);
42082 } else {
42083 this.setScrollMode (1);
42084 }}, "~B");
42085 Clazz_defineMethod (c$, "isBlitting", 
42086  function () {
42087 var view = this.getView ();
42088 return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque ();
42089 });
42090 Clazz_defineMethod (c$, "getView", 
42091 function () {
42092 return (this.getComponentCount () > 0) ? this.getComponent (0) : null;
42093 });
42094 Clazz_defineMethod (c$, "setView", 
42095 function (view) {
42096 var n = this.getComponentCount ();
42097 for (var i = n - 1; i >= 0; i--) {
42098 this.remove (this.getComponent (i));
42099 }
42100 this.isViewSizeSet = false;
42101 if (view != null) {
42102 this.addImplSAEM (view, null, -1);
42103 this.viewListener = this.createViewListener ();
42104 view.addComponentListener (this.viewListener);
42105 }if (this.hasHadValidView) {
42106 this.fireStateChanged ();
42107 } else if (view != null) {
42108 this.hasHadValidView = true;
42109 }this.revalidate ();
42110 this.repaint ();
42111 }, "java.awt.Component");
42112 Clazz_defineMethod (c$, "getViewSize", 
42113 function () {
42114 var view = this.getView ();
42115 if (view == null) {
42116 return  new java.awt.Dimension (0, 0);
42117 } else if (this.isViewSizeSet) {
42118 return view.getSize ();
42119 } else {
42120 return view.getPreferredSize ();
42121 }});
42122 Clazz_defineMethod (c$, "setViewSize", 
42123 function (newSize) {
42124 var view = this.getView ();
42125 if (view != null) {
42126 var oldSize = view.getSize ();
42127 if (!newSize.equals (oldSize)) {
42128 this.scrollUnderway = false;
42129 view.setSize (newSize);
42130 this.isViewSizeSet = true;
42131 this.fireStateChanged ();
42132 }}}, "java.awt.Dimension");
42133 Clazz_defineMethod (c$, "getViewPosition", 
42134 function () {
42135 var view = this.getView ();
42136 if (view != null) {
42137 var p = view.getLocation ();
42138 p.x = -p.x;
42139 p.y = -p.y;
42140 return p;
42141 } else {
42142 return  new java.awt.Point (0, 0);
42143 }});
42144 Clazz_defineMethod (c$, "setViewPosition", 
42145 function (p) {
42146 var view = this.getView ();
42147 if (view == null) {
42148 return;
42149 }var oldX;
42150 var oldY;
42151 var x = p.x;
42152 var y = p.y;
42153 if (Clazz_instanceOf (view, javax.swing.JComponent)) {
42154 var c = view;
42155 oldX = c.getX ();
42156 oldY = c.getY ();
42157 } else {
42158 var r = view.getBounds ();
42159 oldX = r.x;
42160 oldY = r.y;
42161 }var newX = -x;
42162 var newY = -y;
42163 if ((oldX != newX) || (oldY != newY)) {
42164 if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) {
42165 var rm = javax.swing.RepaintManager.currentManager (this);
42166 var jview = view;
42167 var dirty = rm.getDirtyRegion (jview);
42168 if (dirty == null || !dirty.contains (jview.getVisibleRect ())) {
42169 rm.beginPaint ();
42170 try {
42171 var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this));
42172 this.flushViewDirtyRegion (g, dirty);
42173 view.setLocation (newX, newY);
42174 g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ()));
42175 this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ());
42176 g.dispose ();
42177 rm.markCompletelyClean (this.getParent ());
42178 rm.markCompletelyClean (this);
42179 rm.markCompletelyClean (jview);
42180 } finally {
42181 rm.endPaint ();
42182 }
42183 } else {
42184 view.setLocation (newX, newY);
42185 this.repaintAll = false;
42186 }} else {
42187 this.scrollUnderway = true;
42188 view.setLocation (newX, newY);
42189 this.repaintAll = false;
42190 }this.fireStateChanged ();
42191 }}, "java.awt.Point");
42192 Clazz_defineMethod (c$, "getViewRect", 
42193 function () {
42194 return  new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ());
42195 });
42196 Clazz_defineMethod (c$, "computeBlit", 
42197 function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) {
42198 var dxAbs = Math.abs (dx);
42199 var dyAbs = Math.abs (dy);
42200 var extentSize = this.getExtentSize ();
42201 if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) {
42202 if (dy < 0) {
42203 blitFrom.y = -dy;
42204 blitTo.y = 0;
42205 blitPaint.y = extentSize.height + dy;
42206 } else {
42207 blitFrom.y = 0;
42208 blitTo.y = dy;
42209 blitPaint.y = 0;
42210 }blitPaint.x = blitFrom.x = blitTo.x = 0;
42211 blitSize.width = extentSize.width;
42212 blitSize.height = extentSize.height - dyAbs;
42213 blitPaint.width = extentSize.width;
42214 blitPaint.height = dyAbs;
42215 return true;
42216 } else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) {
42217 if (dx < 0) {
42218 blitFrom.x = -dx;
42219 blitTo.x = 0;
42220 blitPaint.x = extentSize.width + dx;
42221 } else {
42222 blitFrom.x = 0;
42223 blitTo.x = dx;
42224 blitPaint.x = 0;
42225 }blitPaint.y = blitFrom.y = blitTo.y = 0;
42226 blitSize.width = extentSize.width - dxAbs;
42227 blitSize.height = extentSize.height;
42228 blitPaint.width = dxAbs;
42229 blitPaint.height = extentSize.height;
42230 return true;
42231 } else {
42232 return false;
42233 }}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle");
42234 Clazz_defineMethod (c$, "getExtentSize", 
42235 function () {
42236 return this.getSize ();
42237 });
42238 Clazz_defineMethod (c$, "toViewCoordinates", 
42239 function (size) {
42240 return  new java.awt.Dimension (size);
42241 }, "java.awt.Dimension");
42242 Clazz_defineMethod (c$, "toViewCoordinates", 
42243 function (p) {
42244 return  new java.awt.Point (p);
42245 }, "java.awt.Point");
42246 Clazz_defineMethod (c$, "setExtentSize", 
42247 function (newExtent) {
42248 var oldExtent = this.getExtentSize ();
42249 if (!newExtent.equals (oldExtent)) {
42250 this.setSize (newExtent);
42251 this.fireStateChanged ();
42252 }}, "java.awt.Dimension");
42253 Clazz_defineMethod (c$, "createViewListener", 
42254 function () {
42255 return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null);
42256 });
42257 Clazz_defineMethod (c$, "createLayoutManager", 
42258 function () {
42259 return javax.swing.ViewportLayout.SHARED_INSTANCE;
42260 });
42261 Clazz_defineMethod (c$, "addChangeListener", 
42262 function (l) {
42263 this.listenerList.add (javax.swing.event.ChangeListener, l);
42264 }, "javax.swing.event.ChangeListener");
42265 Clazz_defineMethod (c$, "removeChangeListener", 
42266 function (l) {
42267 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42268 }, "javax.swing.event.ChangeListener");
42269 Clazz_defineMethod (c$, "getChangeListeners", 
42270 function () {
42271 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42272 });
42273 Clazz_defineMethod (c$, "fireStateChanged", 
42274 function () {
42275 var listeners = this.listenerList.getListenerList ();
42276 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42277 if (listeners[i] === javax.swing.event.ChangeListener) {
42278 if (this.changeEvent == null) {
42279 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42280 }(listeners[i + 1]).stateChanged (this.changeEvent);
42281 }}
42282 });
42283 Clazz_defineMethod (c$, "repaint", 
42284 function (tm, x, y, w, h) {
42285 var parent = this.getParent ();
42286 if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h);
42287  else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]);
42288 }, "~N,~N,~N,~N,~N");
42289 Clazz_defineMethod (c$, "paramString", 
42290 function () {
42291 var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false");
42292 var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : "");
42293 var scrollUnderwayString = (this.scrollUnderway ? "true" : "false");
42294 return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString;
42295 });
42296 Clazz_defineMethod (c$, "firePropertyChangeObject", 
42297 function (propertyName, oldValue, newValue) {
42298 Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]);
42299 if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) {
42300 if (newValue != null) {
42301 this.setScrollMode (1);
42302 } else {
42303 this.setScrollMode (0);
42304 }}}, "~S,~O,~O");
42305 Clazz_defineMethod (c$, "needsRepaintAfterBlit", 
42306  function () {
42307 var heavyParent = this.getParent ();
42308 while (heavyParent != null && heavyParent.isLightweight ()) {
42309 heavyParent = heavyParent.getParent ();
42310 }
42311 if (heavyParent != null) {
42312 }return true;
42313 });
42314 Clazz_defineMethod (c$, "flushViewDirtyRegion", 
42315  function (g, dirty) {
42316 var view = this.getView ();
42317 if (dirty != null && dirty.width > 0 && dirty.height > 0) {
42318 dirty.x += view.getX ();
42319 dirty.y += view.getY ();
42320 var clip = g.getClipBounds ();
42321 if (clip == null) {
42322 g.setClip (0, 0, this.getWidth (), this.getHeight ());
42323 }g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height);
42324 clip = g.getClipBounds ();
42325 if (clip.width > 0 && clip.height > 0) {
42326 this.paintView (g);
42327 }}}, "java.awt.Graphics,java.awt.Rectangle");
42328 Clazz_defineMethod (c$, "windowBlitPaint", 
42329  function (g) {
42330 var width = this.getWidth ();
42331 var height = this.getHeight ();
42332 if ((width == 0) || (height == 0)) {
42333 return false;
42334 }var retValue;
42335 var rm = javax.swing.RepaintManager.currentManager (this);
42336 var view = this.getView ();
42337 if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) {
42338 this.paintView (g);
42339 retValue = false;
42340 } else {
42341 var blitFrom =  new java.awt.Point ();
42342 var blitTo =  new java.awt.Point ();
42343 var blitSize =  new java.awt.Dimension ();
42344 var blitPaint =  new java.awt.Rectangle ();
42345 var newLocation = this.getViewLocation ();
42346 var dx = newLocation.x - this.lastPaintPosition.x;
42347 var dy = newLocation.y - this.lastPaintPosition.y;
42348 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42349 if (!canBlit) {
42350 this.paintView (g);
42351 retValue = false;
42352 } else {
42353 var r = view.getBounds ().intersection (blitPaint);
42354 r.x -= view.getX ();
42355 r.y -= view.getY ();
42356 this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height);
42357 retValue = true;
42358 }}this.lastPaintPosition = this.getViewLocation ();
42359 return retValue;
42360 }, "java.awt.Graphics");
42361 Clazz_defineMethod (c$, "blitDoubleBuffered", 
42362  function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) {
42363 var rm = javax.swing.RepaintManager.currentManager (this);
42364 var bdx = blitToX - blitFromX;
42365 var bdy = blitToY - blitFromY;
42366 var x = view.getX ();
42367 var y = view.getY ();
42368 g.translate (x, y);
42369 g.setClip (clipX, clipY, clipW, clipH);
42370 view.paintForceDoubleBuffered (g);
42371 g.translate (-x, -y);
42372 }, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
42373 Clazz_defineMethod (c$, "paintView", 
42374  function (g) {
42375 var clip = g.getClipBounds ();
42376 var view = this.getView ();
42377 if (view.getWidth () >= this.getWidth ()) {
42378 var x = view.getX ();
42379 var y = view.getY ();
42380 g.translate (x, y);
42381 g.setClip (clip.x - x, clip.y - y, clip.width, clip.height);
42382 view.paintForceDoubleBuffered (g);
42383 g.translate (-x, -y);
42384 g.setClip (clip.x, clip.y, clip.width, clip.height);
42385 } else {
42386 try {
42387 this.inBlitPaint = true;
42388 this.paintForceDoubleBuffered (g);
42389 } finally {
42390 this.inBlitPaint = false;
42391 }
42392 }}, "java.awt.Graphics");
42393 Clazz_defineMethod (c$, "canUseWindowBlitter", 
42394  function () {
42395 if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) {
42396 return false;
42397 }if (this.isPainting ()) {
42398 return false;
42399 }var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ());
42400 if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) {
42401 return false;
42402 }var clip =  new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ());
42403 var oldClip =  new java.awt.Rectangle ();
42404 var tmp2 = null;
42405 var parent;
42406 var lastParent = null;
42407 var x;
42408 var y;
42409 var w;
42410 var h;
42411 for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) {
42412 x = parent.getX ();
42413 y = parent.getY ();
42414 w = parent.getWidth ();
42415 h = parent.getHeight ();
42416 oldClip.setBounds (clip);
42417 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip);
42418 if (!clip.equals (oldClip)) return false;
42419 if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) {
42420 var comps = parent.getComponents ();
42421 var index = 0;
42422 for (var i = comps.length - 1; i >= 0; i--) {
42423 if (comps[i] === lastParent) {
42424 index = i - 1;
42425 break;
42426 }}
42427 while (index >= 0) {
42428 tmp2 = comps[index].getBounds (tmp2);
42429 if (tmp2.intersects (clip)) return false;
42430 index--;
42431 }
42432 }clip.x += x;
42433 clip.y += y;
42434 lastParent = parent;
42435 }
42436 if (parent == null) {
42437 return false;
42438 }return true;
42439 });
42440 c$.$JViewport$ViewListener$ = function () {
42441 Clazz_pu$h(self.c$);
42442 c$ = Clazz_decorateAsClass (function () {
42443 Clazz_prepareCallback (this, arguments);
42444 Clazz_instantialize (this, arguments);
42445 }, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter);
42446 Clazz_overrideMethod (c$, "componentResized", 
42447 function (a) {
42448 this.b$["javax.swing.JViewport"].fireStateChanged ();
42449 this.b$["javax.swing.JViewport"].revalidate ();
42450 }, "java.awt.event.ComponentEvent");
42451 c$ = Clazz_p0p ();
42452 };
42453 Clazz_defineStatics (c$,
42454 "$uiClassID", "ViewportUI",
42455 "EnableWindowBlit", "EnableWindowBlit",
42456 "BLIT_SCROLL_MODE", 1,
42457 "BACKINGSTORE_SCROLL_MODE", 2,
42458 "SIMPLE_SCROLL_MODE", 0);
42459 });
42460 Clazz_declarePackage ("java.awt.event");
42461 Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () {
42462 c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener);
42463 Clazz_overrideMethod (c$, "componentResized", 
42464 function (e) {
42465 }, "java.awt.event.ComponentEvent");
42466 Clazz_overrideMethod (c$, "componentMoved", 
42467 function (e) {
42468 }, "java.awt.event.ComponentEvent");
42469 Clazz_overrideMethod (c$, "componentShown", 
42470 function (e) {
42471 }, "java.awt.event.ComponentEvent");
42472 Clazz_overrideMethod (c$, "componentHidden", 
42473 function (e) {
42474 }, "java.awt.event.ComponentEvent");
42475 });
42476 Clazz_declarePackage ("javax.swing");
42477 Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () {
42478 c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container);
42479 Clazz_makeConstructor (c$, 
42480 function () {
42481 Clazz_superConstructor (this, javax.swing.CellRendererPane);
42482 this.setLayout (null);
42483 this.setVisible (false);
42484 });
42485 Clazz_overrideMethod (c$, "invalidate", 
42486 function () {
42487 });
42488 Clazz_overrideMethod (c$, "paint", 
42489 function (g) {
42490 }, "java.awt.Graphics");
42491 Clazz_overrideMethod (c$, "update", 
42492 function (g) {
42493 }, "java.awt.Graphics");
42494 Clazz_overrideMethod (c$, "addImpl", 
42495 function (x, constraints, index) {
42496 if (x.getParent () === this) {
42497 return null;
42498 } else {
42499 return this.addImplSAEM (x, constraints, index);
42500 }}, "java.awt.Component,~O,~N");
42501 Clazz_defineMethod (c$, "paintComponent", 
42502 function (g, c, p, x, y, w, h, shouldValidate) {
42503 if (c == null) {
42504 if (p != null) {
42505 var oldColor = g.getColor ();
42506 g.setColor (p.getBackground ());
42507 g.fillRect (x, y, w, h);
42508 g.setColor (oldColor);
42509 }return;
42510 }if (c.getParent () !== this) {
42511 this.add (c);
42512 }c.setBounds (x, y, w, h);
42513 if (shouldValidate) {
42514 c.validate ();
42515 }var cg = g.create4 (x, y, w, h);
42516 try {
42517 c.paint (cg);
42518 } finally {
42519 cg.dispose ();
42520 }
42521 c.setBounds (-w, -h, 0, 0);
42522 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B");
42523 Clazz_defineMethod (c$, "paintComponent", 
42524 function (g, c, p, x, y, w, h) {
42525 this.paintComponent (g, c, p, x, y, w, h, false);
42526 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
42527 Clazz_defineMethod (c$, "paintComponent", 
42528 function (g, c, p, r) {
42529 this.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
42530 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
42531 });
42532 Clazz_declarePackage ("jssun.awt");
42533 c$ = Clazz_declareType (jssun.awt, "AWTAccessor");
42534 c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", 
42535 function (wa) {
42536 jssun.awt.AWTAccessor.windowAccessor = wa;
42537 }, "jssun.awt.AWTAccessor.WindowAccessor");
42538 c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", 
42539 function () {
42540 return jssun.awt.AWTAccessor.windowAccessor;
42541 });
42542 c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", 
42543 function (ca) {
42544 jssun.awt.AWTAccessor.componentAccessor = ca;
42545 }, "jssun.awt.AWTAccessor.ComponentAccessor");
42546 c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", 
42547 function () {
42548 return jssun.awt.AWTAccessor.componentAccessor;
42549 });
42550 c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", 
42551 function (aea) {
42552 jssun.awt.AWTAccessor.awtEventAccessor = aea;
42553 }, "jssun.awt.AWTAccessor.AWTEventAccessor");
42554 c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", 
42555 function () {
42556 return jssun.awt.AWTAccessor.awtEventAccessor;
42557 });
42558 c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", 
42559 function (eqa) {
42560 jssun.awt.AWTAccessor.eventQueueAccessor = eqa;
42561 }, "jssun.awt.AWTAccessor.EventQueueAccessor");
42562 c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", 
42563 function () {
42564 return jssun.awt.AWTAccessor.eventQueueAccessor;
42565 });
42566 Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor");
42567 Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor");
42568 Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor");
42569 Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor");
42570 Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor");
42571 Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor");
42572 Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor");
42573 Clazz_defineStatics (c$,
42574 "componentAccessor", null,
42575 "windowAccessor", null,
42576 "awtEventAccessor", null,
42577 "eventQueueAccessor", null);
42578 Clazz_declarePackage ("javax.swing");
42579 Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () {
42580 c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager);
42581 Clazz_overrideMethod (c$, "addLayoutComponent", 
42582 function (name, c) {
42583 }, "~S,java.awt.Component");
42584 Clazz_overrideMethod (c$, "removeLayoutComponent", 
42585 function (c) {
42586 }, "java.awt.Component");
42587 Clazz_overrideMethod (c$, "preferredLayoutSize", 
42588 function (parent) {
42589 var view = (parent).getView ();
42590 if (view == null) {
42591 return  new java.awt.Dimension (0, 0);
42592 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42593 return (view).getPreferredScrollableViewportSize ();
42594 } else {
42595 return view.getPreferredSize ();
42596 }}, "java.awt.Container");
42597 Clazz_overrideMethod (c$, "minimumLayoutSize", 
42598 function (parent) {
42599 return  new java.awt.Dimension (4, 4);
42600 }, "java.awt.Container");
42601 Clazz_overrideMethod (c$, "layoutContainer", 
42602 function (parent) {
42603 var vp = parent;
42604 var view = vp.getView ();
42605 var scrollableView = null;
42606 if (view == null) {
42607 return;
42608 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42609 scrollableView = view;
42610 }var insets = vp.getInsets ();
42611 var viewPrefSize = view.getPreferredSize ();
42612 var vpSize = vp.getSize ();
42613 var extentSize = vp.toViewCoordinates (vpSize);
42614 var viewSize =  new java.awt.Dimension (viewPrefSize);
42615 if (scrollableView != null) {
42616 if (scrollableView.getScrollableTracksViewportWidth ()) {
42617 viewSize.width = vpSize.width;
42618 }if (scrollableView.getScrollableTracksViewportHeight ()) {
42619 viewSize.height = vpSize.height;
42620 }}var viewPosition = vp.getViewPosition ();
42621 if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) {
42622 if ((viewPosition.x + extentSize.width) > viewSize.width) {
42623 viewPosition.x = Math.max (0, viewSize.width - extentSize.width);
42624 }} else {
42625 if (extentSize.width > viewSize.width) {
42626 viewPosition.x = viewSize.width - extentSize.width;
42627 } else {
42628 viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x));
42629 }}if ((viewPosition.y + extentSize.height) > viewSize.height) {
42630 viewPosition.y = Math.max (0, viewSize.height - extentSize.height);
42631 }if (scrollableView == null) {
42632 if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) {
42633 viewSize.width = vpSize.width;
42634 }if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) {
42635 viewSize.height = vpSize.height;
42636 }}vp.setViewPosition (viewPosition);
42637 vp.setViewSize (viewSize);
42638 }, "java.awt.Container");
42639 c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE =  new javax.swing.ViewportLayout ();
42640 });
42641 Clazz_declarePackage ("javax.swing.event");
42642 Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () {
42643 Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener);
42644 });
42645 Clazz_declarePackage ("javax.swing");
42646 Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
42647 c$ = Clazz_decorateAsClass (function () {
42648 this.changeEvent = null;
42649 this.listenerList = null;
42650 this.value = 0;
42651 this.extent = 0;
42652 this.min = 0;
42653 this.max = 100;
42654 this.isAdjusting = false;
42655 Clazz_instantialize (this, arguments);
42656 }, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel);
42657 Clazz_prepareFields (c$, function () {
42658 this.listenerList =  new javax.swing.event.EventListenerList ();
42659 });
42660 Clazz_makeConstructor (c$, 
42661 function () {
42662 });
42663 Clazz_makeConstructor (c$, 
42664 function (value, extent, min, max) {
42665 if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) {
42666 this.value = value;
42667 this.extent = extent;
42668 this.min = min;
42669 this.max = max;
42670 } else {
42671 throw  new IllegalArgumentException ("invalid range properties");
42672 }}, "~N,~N,~N,~N");
42673 Clazz_overrideMethod (c$, "getValue", 
42674 function () {
42675 return this.value;
42676 });
42677 Clazz_overrideMethod (c$, "getExtent", 
42678 function () {
42679 return this.extent;
42680 });
42681 Clazz_overrideMethod (c$, "getMinimum", 
42682 function () {
42683 return this.min;
42684 });
42685 Clazz_overrideMethod (c$, "getMaximum", 
42686 function () {
42687 return this.max;
42688 });
42689 Clazz_overrideMethod (c$, "setValue", 
42690 function (n) {
42691 n = Math.min (n, 2147483647 - this.extent);
42692 var newValue = Math.max (n, this.min);
42693 if (newValue + this.extent > this.max) {
42694 newValue = this.max - this.extent;
42695 }this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting);
42696 }, "~N");
42697 Clazz_overrideMethod (c$, "setExtent", 
42698 function (n) {
42699 var newExtent = Math.max (0, n);
42700 if (this.value + newExtent > this.max) {
42701 newExtent = this.max - this.value;
42702 }this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting);
42703 }, "~N");
42704 Clazz_overrideMethod (c$, "setMinimum", 
42705 function (n) {
42706 var newMax = Math.max (n, this.max);
42707 var newValue = Math.max (n, this.value);
42708 var newExtent = Math.min (newMax - newValue, this.extent);
42709 this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting);
42710 }, "~N");
42711 Clazz_overrideMethod (c$, "setMaximum", 
42712 function (n) {
42713 var newMin = Math.min (n, this.min);
42714 var newExtent = Math.min (n - newMin, this.extent);
42715 var newValue = Math.min (n - newExtent, this.value);
42716 this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting);
42717 }, "~N");
42718 Clazz_overrideMethod (c$, "setValueIsAdjusting", 
42719 function (b) {
42720 this.setRangeProperties (this.value, this.extent, this.min, this.max, b);
42721 }, "~B");
42722 Clazz_overrideMethod (c$, "getValueIsAdjusting", 
42723 function () {
42724 return this.isAdjusting;
42725 });
42726 Clazz_overrideMethod (c$, "setRangeProperties", 
42727 function (newValue, newExtent, newMin, newMax, adjusting) {
42728 if (newMin > newMax) {
42729 newMin = newMax;
42730 }if (newValue > newMax) {
42731 newMax = newValue;
42732 }if (newValue < newMin) {
42733 newMin = newValue;
42734 }if ((newExtent + newValue) > newMax) {
42735 newExtent = newMax - newValue;
42736 }if (newExtent < 0) {
42737 newExtent = 0;
42738 }var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting);
42739 if (isChange) {
42740 this.value = newValue;
42741 this.extent = newExtent;
42742 this.min = newMin;
42743 this.max = newMax;
42744 this.isAdjusting = adjusting;
42745 this.fireStateChanged ();
42746 }}, "~N,~N,~N,~N,~B");
42747 Clazz_overrideMethod (c$, "addChangeListener", 
42748 function (l) {
42749 this.listenerList.add (javax.swing.event.ChangeListener, l);
42750 }, "javax.swing.event.ChangeListener");
42751 Clazz_overrideMethod (c$, "removeChangeListener", 
42752 function (l) {
42753 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42754 }, "javax.swing.event.ChangeListener");
42755 Clazz_defineMethod (c$, "getChangeListeners", 
42756 function () {
42757 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42758 });
42759 Clazz_defineMethod (c$, "fireStateChanged", 
42760 function () {
42761 var listeners = this.listenerList.getListenerList ();
42762 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42763 if (listeners[i] === javax.swing.event.ChangeListener) {
42764 if (this.changeEvent == null) {
42765 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42766 }(listeners[i + 1]).stateChanged (this.changeEvent);
42767 }}
42768 });
42769 Clazz_overrideMethod (c$, "toString", 
42770 function () {
42771 var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting ();
42772 return this.getClass ().getName () + "[" + modelString + "]";
42773 });
42774 Clazz_defineMethod (c$, "getListeners", 
42775 function (listenerType) {
42776 return this.listenerList.getListeners (listenerType);
42777 }, "Class");
42778 });
42779 Clazz_declarePackage ("javax.swing");
42780 Clazz_declareInterface (javax.swing, "BoundedRangeModel");
42781 Clazz_declarePackage ("javax.swing");
42782 Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () {
42783 c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke);
42784 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42785 function (keyChar) {
42786 {
42787 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42788 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar);
42789 }}, "~S");
42790 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42791 function (keyChar, onKeyRelease) {
42792 return  new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease);
42793 }, "~S,~B");
42794 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42795 function (keyChar, modifiers) {
42796 {
42797 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42798 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers);
42799 }}, "Character,~N");
42800 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42801 function (keyCode, modifiers, onKeyRelease) {
42802 {
42803 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42804 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease);
42805 }}, "~N,~N,~B");
42806 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42807 function (keyCode, modifiers) {
42808 {
42809 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42810 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers);
42811 }}, "~N,~N");
42812 c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", 
42813 function (anEvent) {
42814 {
42815 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42816 return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent);
42817 }}, "java.awt.event.KeyEvent");
42818 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42819 function (s) {
42820 if (s == null || s.length == 0) {
42821 return null;
42822 }{
42823 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42824 try {
42825 return java.awt.AWTKeyStroke.getAWTKeyStroke (s);
42826 } catch (e) {
42827 if (Clazz_exceptionOf (e, IllegalArgumentException)) {
42828 return null;
42829 } else {
42830 throw e;
42831 }
42832 }
42833 }}, "~S");
42834 });
42835 Clazz_declarePackage ("java.awt");
42836 Clazz_load (null, ["java.awt.AWTKeyStroke", "$.VKCollection"], ["java.io.ObjectStreamException", "java.lang.IllegalArgumentException", "$.StringBuilder", "java.util.Collections", "$.HashMap", "$.StringTokenizer", "java.awt.event.KeyEvent", "jssun.awt.AppContext"], function () {
42837 c$ = Clazz_decorateAsClass (function () {
42838 this.keyChar = '\uffff';
42839 this.keyCode = 0;
42840 this.modifiers = 0;
42841 this.onKeyRelease = false;
42842 Clazz_instantialize (this, arguments);
42843 }, java.awt, "AWTKeyStroke");
42844 c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", 
42845  function () {
42846 var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke);
42847 if (clazz == null) {
42848 clazz = java.awt.AWTKeyStroke;
42849 jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke);
42850 }return clazz;
42851 });
42852 Clazz_makeConstructor (c$, 
42853 function () {
42854 });
42855 Clazz_makeConstructor (c$, 
42856 function (keyChar, keyCode, modifiers, onKeyRelease) {
42857 this.keyChar = keyChar;
42858 this.keyCode = keyCode;
42859 this.modifiers = modifiers;
42860 this.onKeyRelease = onKeyRelease;
42861 }, "~S,~N,~N,~B");
42862 c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", 
42863 function (subclass) {
42864 }, "Class");
42865 c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", 
42866  function (keyChar, keyCode, modifiers, onKeyRelease) {
42867 return null;
42868 }, "~S,~N,~N,~B");
42869 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42870 function (keyChar) {
42871 return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false);
42872 }, "~S");
42873 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42874 function (keyChar, modifiers) {
42875 if (keyChar == null) {
42876 throw  new IllegalArgumentException ("keyChar cannot be null");
42877 }return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false);
42878 }, "Character,~N");
42879 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42880 function (keyCode, modifiers, onKeyRelease) {
42881 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease);
42882 }, "~N,~N,~B");
42883 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42884 function (keyCode, modifiers) {
42885 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false);
42886 }, "~N,~N");
42887 c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", 
42888 function (anEvent) {
42889 var id = anEvent.getID ();
42890 switch (id) {
42891 case 401:
42892 case 402:
42893 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402));
42894 case 400:
42895 return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false);
42896 default:
42897 return null;
42898 }
42899 }, "java.awt.event.KeyEvent");
42900 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42901 function (s) {
42902 if (s == null) {
42903 throw  new IllegalArgumentException ("String cannot be null");
42904 }var errmsg = "String formatted incorrectly";
42905 var st =  new java.util.StringTokenizer (s, " ");
42906 var mask = 0;
42907 var released = false;
42908 var typed = false;
42909 var pressed = false;
42910 {
42911 if (java.awt.AWTKeyStroke.modifierKeywords == null) {
42912 var uninitializedMap =  new java.util.HashMap (8, 1.0);
42913 uninitializedMap.put ("shift", Integer.$valueOf (65));
42914 uninitializedMap.put ("control", Integer.$valueOf (130));
42915 uninitializedMap.put ("ctrl", Integer.$valueOf (130));
42916 uninitializedMap.put ("meta", Integer.$valueOf (260));
42917 uninitializedMap.put ("alt", Integer.$valueOf (520));
42918 uninitializedMap.put ("altGraph", Integer.$valueOf (8224));
42919 uninitializedMap.put ("button1", Integer.$valueOf (1024));
42920 uninitializedMap.put ("button2", Integer.$valueOf (2048));
42921 uninitializedMap.put ("button3", Integer.$valueOf (4096));
42922 java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap);
42923 }}var count = st.countTokens ();
42924 for (var i = 1; i <= count; i++) {
42925 var token = st.nextToken ();
42926 if (typed) {
42927 if (token.length != 1 || i != count) {
42928 throw  new IllegalArgumentException ("String formatted incorrectly");
42929 }return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false);
42930 }if (pressed || released || i == count) {
42931 if (i != count) {
42932 throw  new IllegalArgumentException ("String formatted incorrectly");
42933 }var keyCodeName = "VK_" + token;
42934 var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName);
42935 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released);
42936 }if (token.equals ("released")) {
42937 released = true;
42938 continue;
42939 }if (token.equals ("pressed")) {
42940 pressed = true;
42941 continue;
42942 }if (token.equals ("typed")) {
42943 typed = true;
42944 continue;
42945 }var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token);
42946 if (tokenMask != null) {
42947 mask |= tokenMask.intValue ();
42948 } else {
42949 throw  new IllegalArgumentException ("String formatted incorrectly");
42950 }}
42951 throw  new IllegalArgumentException ("String formatted incorrectly");
42952 }, "~S");
42953 c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", 
42954  function () {
42955 if (java.awt.AWTKeyStroke.vks == null) {
42956 java.awt.AWTKeyStroke.vks =  new java.awt.VKCollection ();
42957 }return java.awt.AWTKeyStroke.vks;
42958 });
42959 c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", 
42960  function (key) {
42961 var vkCollect = java.awt.AWTKeyStroke.getVKCollection ();
42962 var value = vkCollect.findCode (key);
42963 if (value == null) {
42964 var keyCode = 0;
42965 var errmsg = "String formatted incorrectly";
42966 try {
42967 keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent);
42968 } catch (e$$) {
42969 if (Clazz_exceptionOf (e$$, NoSuchFieldException)) {
42970 var nsfe = e$$;
42971 {
42972 throw  new IllegalArgumentException ("String formatted incorrectly");
42973 }
42974 } else if (Clazz_exceptionOf (e$$, IllegalAccessException)) {
42975 var iae = e$$;
42976 {
42977 throw  new IllegalArgumentException ("String formatted incorrectly");
42978 }
42979 } else {
42980 throw e$$;
42981 }
42982 }
42983 value = Integer.$valueOf (keyCode);
42984 vkCollect.put (key, value);
42985 }return value.intValue ();
42986 }, "~S");
42987 Clazz_defineMethod (c$, "getKeyChar", 
42988 function () {
42989 return this.keyChar;
42990 });
42991 Clazz_defineMethod (c$, "getKeyCode", 
42992 function () {
42993 return this.keyCode;
42994 });
42995 Clazz_defineMethod (c$, "getModifiers", 
42996 function () {
42997 return this.modifiers;
42998 });
42999 Clazz_defineMethod (c$, "isOnKeyRelease", 
43000 function () {
43001 return this.onKeyRelease;
43002 });
43003 Clazz_defineMethod (c$, "getKeyEventType", 
43004 function () {
43005 if (this.keyCode == 0) {
43006 return 400;
43007 } else {
43008 return (this.onKeyRelease) ? 402 : 401;
43009 }});
43010 Clazz_overrideMethod (c$, "hashCode", 
43011 function () {
43012 return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2);
43013 });
43014 Clazz_defineMethod (c$, "equals", 
43015 function (anObject) {
43016 if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) {
43017 var ks = anObject;
43018 return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers);
43019 }return false;
43020 }, "~O");
43021 Clazz_overrideMethod (c$, "toString", 
43022 function () {
43023 if (this.keyCode == 0) {
43024 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar;
43025 } else {
43026 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode);
43027 }});
43028 c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", 
43029 function (modifiers) {
43030 var buf =  new StringBuilder ();
43031 if ((modifiers & 64) != 0) {
43032 buf.append ("shift ");
43033 }if ((modifiers & 128) != 0) {
43034 buf.append ("ctrl ");
43035 }if ((modifiers & 256) != 0) {
43036 buf.append ("meta ");
43037 }if ((modifiers & 512) != 0) {
43038 buf.append ("alt ");
43039 }if ((modifiers & 8192) != 0) {
43040 buf.append ("altGraph ");
43041 }if ((modifiers & 1024) != 0) {
43042 buf.append ("button1 ");
43043 }if ((modifiers & 2048) != 0) {
43044 buf.append ("button2 ");
43045 }if ((modifiers & 4096) != 0) {
43046 buf.append ("button3 ");
43047 }return buf.toString ();
43048 }, "~N");
43049 c$.getVKText = Clazz_defineMethod (c$, "getVKText", 
43050 function (keyCode) {
43051 return "UNKNOWN";
43052 }, "~N");
43053 Clazz_defineMethod (c$, "readResolve", 
43054 function () {
43055 {
43056 var newClass = this.getClass ();
43057 var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass ();
43058 if (!newClass.equals (awtKeyStrokeClass)) {
43059 java.awt.AWTKeyStroke.registerSubclass (newClass);
43060 }return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease);
43061 }});
43062 Clazz_defineStatics (c$,
43063 "modifierKeywords", null,
43064 "vks", null);
43065 c$ = Clazz_decorateAsClass (function () {
43066 this.code2name = null;
43067 this.name2code = null;
43068 Clazz_instantialize (this, arguments);
43069 }, java.awt, "VKCollection");
43070 Clazz_makeConstructor (c$, 
43071 function () {
43072 this.code2name =  new java.util.HashMap ();
43073 this.name2code =  new java.util.HashMap ();
43074 });
43075 Clazz_defineMethod (c$, "put", 
43076 function (name, code) {
43077 this.code2name.put (code, name);
43078 this.name2code.put (name, code);
43079 }, "~S,Integer");
43080 Clazz_defineMethod (c$, "findCode", 
43081 function (name) {
43082 return this.name2code.get (name);
43083 }, "~S");
43084 Clazz_defineMethod (c$, "findName", 
43085 function (code) {
43086 return this.code2name.get (code);
43087 }, "Integer");
43088 });
43089 Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){
43090 c$=Clazz_decorateAsClass(function(){
43091 this.string=null;
43092 this.delimiters=null;
43093 this.returnDelimiters=false;
43094 this.position=0;
43095 Clazz_instantialize(this,arguments);
43096 },java.util,"StringTokenizer",null,java.util.Enumeration);
43097 Clazz_makeConstructor(c$,
43098 function(string){
43099 this.construct(string," \t\n\r\f",false);
43100 },"~S");
43101 Clazz_makeConstructor(c$,
43102 function(string,delimiters){
43103 this.construct(string,delimiters,false);
43104 },"~S,~S");
43105 Clazz_makeConstructor(c$,
43106 function(string,delimiters,returnDelimiters){
43107 if(string!=null){
43108 this.string=string;
43109 this.delimiters=delimiters;
43110 this.returnDelimiters=returnDelimiters;
43111 this.position=0;
43112 }else throw new NullPointerException();
43113 },"~S,~S,~B");
43114 Clazz_defineMethod(c$,"countTokens",
43115 function(){
43116 var count=0;
43117 var inToken=false;
43118 for(var i=this.position,length=this.string.length;i<length;i++){
43119 if(this.delimiters.indexOf(this.string.charAt(i),0)>=0){
43120 if(this.returnDelimiters)count++;
43121 if(inToken){
43122 count++;
43123 inToken=false;
43124 }}else{
43125 inToken=true;
43126 }}
43127 if(inToken)count++;
43128 return count;
43129 });
43130 Clazz_overrideMethod(c$,"hasMoreElements",
43131 function(){
43132 return this.hasMoreTokens();
43133 });
43134 Clazz_defineMethod(c$,"hasMoreTokens",
43135 function(){
43136 var length=this.string.length;
43137 if(this.position<length){
43138 if(this.returnDelimiters)return true;
43139 for(var i=this.position;i<length;i++)if(this.delimiters.indexOf(this.string.charAt(i),0)==-1)return true;
43140
43141 }return false;
43142 });
43143 Clazz_overrideMethod(c$,"nextElement",
43144 function(){
43145 return this.nextToken();
43146 });
43147 Clazz_defineMethod(c$,"nextToken",
43148 function(){
43149 var i=this.position;
43150 var length=this.string.length;
43151 if(i<length){
43152 if(this.returnDelimiters){
43153 if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return String.valueOf(this.string.charAt(this.position++));
43154 for(this.position++;this.position<length;this.position++)if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return this.string.substring(i,this.position);
43155
43156 return this.string.substring(i);
43157 }while(i<length&&this.delimiters.indexOf(this.string.charAt(i),0)>=0)i++;
43158
43159 this.position=i;
43160 if(i<length){
43161 for(this.position++;this.position<length;this.position++)if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return this.string.substring(i,this.position);
43162
43163 return this.string.substring(i);
43164 }}throw new java.util.NoSuchElementException();
43165 });
43166 Clazz_defineMethod(c$,"nextToken",
43167 function(delims){
43168 this.delimiters=delims;
43169 return this.nextToken();
43170 },"~S");
43171 });
43172 Clazz_declarePackage ("javax.swing");
43173 Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () {
43174 c$ = Clazz_decorateAsClass (function () {
43175 this.component = null;
43176 Clazz_instantialize (this, arguments);
43177 }, javax.swing, "ComponentInputMap", javax.swing.InputMap);
43178 Clazz_makeConstructor (c$, 
43179 function (component) {
43180 Clazz_superConstructor (this, javax.swing.ComponentInputMap, []);
43181 this.component = component;
43182 if (component == null) {
43183 throw  new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent");
43184 }}, "javax.swing.JComponent");
43185 Clazz_defineMethod (c$, "setParent", 
43186 function (map) {
43187 if (this.getParent () === map) {
43188 return;
43189 }if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) {
43190 throw  new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component");
43191 }Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]);
43192 this.getComponent ().componentInputMapChanged (this);
43193 }, "javax.swing.InputMap");
43194 Clazz_defineMethod (c$, "getComponent", 
43195 function () {
43196 return this.component;
43197 });
43198 Clazz_defineMethod (c$, "put", 
43199 function (keyStroke, actionMapKey) {
43200 Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]);
43201 if (this.getComponent () != null) {
43202 this.getComponent ().componentInputMapChanged (this);
43203 }}, "javax.swing.KeyStroke,~O");
43204 Clazz_defineMethod (c$, "remove", 
43205 function (key) {
43206 Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]);
43207 if (this.getComponent () != null) {
43208 this.getComponent ().componentInputMapChanged (this);
43209 }}, "javax.swing.KeyStroke");
43210 Clazz_defineMethod (c$, "clear", 
43211 function () {
43212 var oldSize = this.size ();
43213 Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []);
43214 if (oldSize > 0 && this.getComponent () != null) {
43215 this.getComponent ().componentInputMapChanged (this);
43216 }});
43217 });
43218 Clazz_declarePackage ("jssun.swing");
43219 Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () {
43220 c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle);
43221 c$.getInstance = Clazz_overrideMethod (c$, "getInstance", 
43222 function () {
43223 return jssun.swing.DefaultLayoutStyle.INSTANCE;
43224 });
43225 Clazz_overrideMethod (c$, "getPreferredGap", 
43226 function (component1, component2, type, position, parent) {
43227 if (component1 == null || component2 == null || type == null) {
43228 throw  new NullPointerException ();
43229 }this.checkPosition (position);
43230 if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) {
43231 var indent = this.getIndent (component1, position);
43232 if (indent > 0) {
43233 return indent;
43234 }}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6;
43235 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container");
43236 Clazz_overrideMethod (c$, "getContainerGap", 
43237 function (component, position, parent) {
43238 if (component == null) {
43239 throw  new NullPointerException ();
43240 }this.checkPosition (position);
43241 return 6;
43242 }, "javax.swing.JComponent,~N,java.awt.Container");
43243 Clazz_defineMethod (c$, "isLabelAndNonlabel", 
43244 function (c1, c2, position) {
43245 if (position == 3 || position == 7) {
43246 var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel));
43247 var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel));
43248 return ((c1Label || c2Label) && (c1Label != c2Label));
43249 }return false;
43250 }, "javax.swing.JComponent,javax.swing.JComponent,~N");
43251 Clazz_defineMethod (c$, "getButtonGap", 
43252 function (source, target, position, offset) {
43253 offset -= this.getButtonGap (source, position);
43254 if (offset > 0) {
43255 offset -= this.getButtonGap (target, this.flipDirection (position));
43256 }if (offset < 0) {
43257 return 0;
43258 }return offset;
43259 }, "javax.swing.JComponent,javax.swing.JComponent,~N,~N");
43260 Clazz_defineMethod (c$, "getButtonGap", 
43261 function (source, position, offset) {
43262 offset -= this.getButtonGap (source, position);
43263 return Math.max (offset, 0);
43264 }, "javax.swing.JComponent,~N,~N");
43265 Clazz_defineMethod (c$, "getButtonGap", 
43266 function (c, position) {
43267 var classID = c.getUIClassID ();
43268 if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) {
43269 var border = c.getBorder ();
43270 if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) {
43271 return this.getInset (c, position);
43272 }}return 0;
43273 }, "javax.swing.JComponent,~N");
43274 Clazz_defineMethod (c$, "checkPosition", 
43275  function (position) {
43276 if (position != 1 && position != 5 && position != 7 && position != 3) {
43277 throw  new IllegalArgumentException ();
43278 }}, "~N");
43279 Clazz_defineMethod (c$, "flipDirection", 
43280 function (position) {
43281 switch (position) {
43282 case 1:
43283 return 5;
43284 case 5:
43285 return 1;
43286 case 3:
43287 return 7;
43288 case 7:
43289 return 3;
43290 }
43291 return 0;
43292 }, "~N");
43293 Clazz_defineMethod (c$, "getIndent", 
43294 function (c, position) {
43295 var classID = c.getUIClassID ();
43296 if (classID === "CheckBoxUI" || classID === "RadioButtonUI") {
43297 var button = c;
43298 var insets = c.getInsets ();
43299 var icon = this.getIcon (button);
43300 var gap = button.getIconTextGap ();
43301 if (this.isLeftAligned (button, position)) {
43302 return insets.left + icon.getIconWidth () + gap;
43303 } else if (this.isRightAligned (button, position)) {
43304 return insets.right + icon.getIconWidth () + gap;
43305 }}return 0;
43306 }, "javax.swing.JComponent,~N");
43307 Clazz_defineMethod (c$, "getIcon", 
43308  function (button) {
43309 var icon = button.getIcon ();
43310 if (icon != null) {
43311 return icon;
43312 }var key = null;
43313 if (Clazz_instanceOf (button, javax.swing.JCheckBox)) {
43314 key = "CheckBox.icon";
43315 } else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) {
43316 key = "RadioButton.icon";
43317 }if (key != null) {
43318 var oIcon = javax.swing.UIManager.get (key);
43319 if (Clazz_instanceOf (oIcon, javax.swing.Icon)) {
43320 return oIcon;
43321 }}return null;
43322 }, "javax.swing.AbstractButton");
43323 Clazz_defineMethod (c$, "isLeftAligned", 
43324  function (button, position) {
43325 if (position == 7) {
43326 var ltr = button.getComponentOrientation ().isLeftToRight ();
43327 var hAlign = button.getHorizontalAlignment ();
43328 return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11)));
43329 }return false;
43330 }, "javax.swing.AbstractButton,~N");
43331 Clazz_defineMethod (c$, "isRightAligned", 
43332  function (button, position) {
43333 if (position == 3) {
43334 var ltr = button.getComponentOrientation ().isLeftToRight ();
43335 var hAlign = button.getHorizontalAlignment ();
43336 return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10)));
43337 }return false;
43338 }, "javax.swing.AbstractButton,~N");
43339 Clazz_defineMethod (c$, "getInset", 
43340  function (c, position) {
43341 return this.getInset (c.getInsets (), position);
43342 }, "javax.swing.JComponent,~N");
43343 Clazz_defineMethod (c$, "getInset", 
43344  function (insets, position) {
43345 if (insets == null) {
43346 return 0;
43347 }switch (position) {
43348 case 1:
43349 return insets.top;
43350 case 5:
43351 return insets.bottom;
43352 case 3:
43353 return insets.right;
43354 case 7:
43355 return insets.left;
43356 }
43357 return 0;
43358 }, "java.awt.Insets,~N");
43359 c$.INSTANCE = c$.prototype.INSTANCE =  new jssun.swing.DefaultLayoutStyle ();
43360 });
43361 Clazz_declarePackage ("javax.swing");
43362 Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () {
43363 c$ = Clazz_declareType (javax.swing, "LayoutStyle");
43364 c$.setInstance = Clazz_defineMethod (c$, "setInstance", 
43365 function (style) {
43366 {
43367 if (style == null) {
43368 jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle);
43369 } else {
43370 jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style);
43371 }}}, "javax.swing.LayoutStyle");
43372 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
43373 function () {
43374 var style;
43375 {
43376 style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle);
43377 }if (style == null) {
43378 return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle ();
43379 }return style;
43380 });
43381 Clazz_makeConstructor (c$, 
43382 function () {
43383 });
43384 Clazz_pu$h(self.c$);
43385 c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum);
43386 Clazz_defineEnumConstant (c$, "RELATED", 0, []);
43387 Clazz_defineEnumConstant (c$, "UNRELATED", 1, []);
43388 Clazz_defineEnumConstant (c$, "INDENT", 2, []);
43389 c$ = Clazz_p0p ();
43390 });
43391 Clazz_declarePackage ("javax.swing");
43392 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () {
43393 c$ = Clazz_decorateAsClass (function () {
43394 this.flat = false;
43395 Clazz_instantialize (this, arguments);
43396 }, javax.swing, "JCheckBox", javax.swing.JToggleButton);
43397 Clazz_makeConstructor (c$, 
43398 function () {
43399 this.construct (null, null, false);
43400 });
43401 Clazz_makeConstructor (c$, 
43402 function (icon) {
43403 this.construct (null, icon, false);
43404 }, "javax.swing.Icon");
43405 Clazz_makeConstructor (c$, 
43406 function (icon, selected) {
43407 this.construct (null, icon, selected);
43408 }, "javax.swing.Icon,~B");
43409 Clazz_makeConstructor (c$, 
43410 function (text) {
43411 this.construct (text, null, false);
43412 }, "~S");
43413 Clazz_makeConstructor (c$, 
43414 function (a) {
43415 this.construct ();
43416 this.setAction (a);
43417 }, "javax.swing.Action");
43418 Clazz_makeConstructor (c$, 
43419 function (text, selected) {
43420 this.construct (text, null, selected);
43421 }, "~S,~B");
43422 Clazz_makeConstructor (c$, 
43423 function (text, icon) {
43424 this.construct (text, icon, false);
43425 }, "~S,javax.swing.Icon");
43426 Clazz_makeConstructor (c$, 
43427 function (text, icon, selected) {
43428 Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]);
43429 this.setUIProperty ("borderPainted", Boolean.FALSE);
43430 this.setHorizontalAlignment (10);
43431 }, "~S,javax.swing.Icon,~B");
43432 Clazz_defineMethod (c$, "setBorderPaintedFlat", 
43433 function (b) {
43434 var oldValue = this.flat;
43435 this.flat = b;
43436 this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat);
43437 if (b != oldValue) {
43438 this.revalidate ();
43439 this.repaint ();
43440 }}, "~B");
43441 Clazz_defineMethod (c$, "isBorderPaintedFlat", 
43442 function () {
43443 return this.flat;
43444 });
43445 Clazz_overrideMethod (c$, "updateUI", 
43446 function () {
43447 this.setUI (javax.swing.UIManager.getUI (this));
43448 });
43449 Clazz_overrideMethod (c$, "getUIClassID", 
43450 function () {
43451 return "CheckBoxUI";
43452 });
43453 Clazz_overrideMethod (c$, "setIconFromAction", 
43454 function (a) {
43455 }, "javax.swing.Action");
43456 Clazz_defineStatics (c$,
43457 "BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat",
43458 "$$uiClassID", "CheckBoxUI");
43459 });
43460 Clazz_declarePackage ("java.awt");
43461 Clazz_declareInterface (java.awt, "ItemSelectable");
43462 Clazz_declarePackage ("java.awt.event");
43463 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () {
43464 c$ = Clazz_decorateAsClass (function () {
43465 this.item = null;
43466 this.stateChange = 0;
43467 Clazz_instantialize (this, arguments);
43468 }, java.awt.event, "ItemEvent", java.awt.AWTEvent);
43469 Clazz_makeConstructor (c$, 
43470 function (source, id, item, stateChange) {
43471 Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]);
43472 this.item = item;
43473 this.stateChange = stateChange;
43474 }, "java.awt.ItemSelectable,~N,~O,~N");
43475 Clazz_defineMethod (c$, "getItemSelectable", 
43476 function () {
43477 return this.source;
43478 });
43479 Clazz_defineMethod (c$, "getItem", 
43480 function () {
43481 return this.item;
43482 });
43483 Clazz_defineMethod (c$, "getStateChange", 
43484 function () {
43485 return this.stateChange;
43486 });
43487 Clazz_overrideMethod (c$, "paramString", 
43488 function () {
43489 var typeStr;
43490 switch (this.id) {
43491 case 701:
43492 typeStr = "ITEM_STATE_CHANGED";
43493 break;
43494 default:
43495 typeStr = "unknown type";
43496 }
43497 var stateStr;
43498 switch (this.stateChange) {
43499 case 1:
43500 stateStr = "SELECTED";
43501 break;
43502 case 2:
43503 stateStr = "DESELECTED";
43504 break;
43505 default:
43506 stateStr = "unknown type";
43507 }
43508 return typeStr + ",item=" + this.item + ",stateChange=" + stateStr;
43509 });
43510 Clazz_defineStatics (c$,
43511 "ITEM_FIRST", 701,
43512 "ITEM_LAST", 701,
43513 "ITEM_STATE_CHANGED", 701,
43514 "SELECTED", 1,
43515 "DESELECTED", 2);
43516 });
43517 Clazz_declarePackage ("javax.swing");
43518 Clazz_load (["javax.swing.ButtonModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultButtonModel", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.ActionListener", "$.InputEvent", "$.ItemEvent", "$.ItemListener", "javax.swing.UIManager", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
43519 c$ = Clazz_decorateAsClass (function () {
43520 this.stateMask = 0;
43521 this.actionCommand = null;
43522 this.group = null;
43523 this.mnemonic = 0;
43524 this.changeEvent = null;
43525 this.listenerList = null;
43526 this.menuItem = false;
43527 Clazz_instantialize (this, arguments);
43528 }, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel);
43529 Clazz_prepareFields (c$, function () {
43530 this.listenerList =  new javax.swing.event.EventListenerList ();
43531 });
43532 Clazz_makeConstructor (c$, 
43533 function () {
43534 this.stateMask = 0;
43535 this.setEnabled (true);
43536 });
43537 Clazz_overrideMethod (c$, "setActionCommand", 
43538 function (actionCommand) {
43539 this.actionCommand = actionCommand;
43540 }, "~S");
43541 Clazz_overrideMethod (c$, "getActionCommand", 
43542 function () {
43543 return this.actionCommand;
43544 });
43545 Clazz_overrideMethod (c$, "isArmed", 
43546 function () {
43547 return (this.stateMask & 1) != 0;
43548 });
43549 Clazz_overrideMethod (c$, "isSelected", 
43550 function () {
43551 return (this.stateMask & 2) != 0;
43552 });
43553 Clazz_overrideMethod (c$, "isEnabled", 
43554 function () {
43555 return (this.stateMask & 8) != 0;
43556 });
43557 Clazz_overrideMethod (c$, "isPressed", 
43558 function () {
43559 return (this.stateMask & 4) != 0;
43560 });
43561 Clazz_overrideMethod (c$, "isRollover", 
43562 function () {
43563 return (this.stateMask & 16) != 0;
43564 });
43565 Clazz_overrideMethod (c$, "setArmed", 
43566 function (b) {
43567 if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
43568 if ((this.isArmed () == b)) {
43569 return;
43570 }} else {
43571 if ((this.isArmed () == b) || !this.isEnabled ()) {
43572 return;
43573 }}if (b) {
43574 this.stateMask |= 1;
43575 } else {
43576 this.stateMask &= -2;
43577 }this.fireStateChanged ();
43578 }, "~B");
43579 Clazz_overrideMethod (c$, "setEnabled", 
43580 function (b) {
43581 if (this.isEnabled () == b) {
43582 return;
43583 }if (b) {
43584 this.stateMask |= 8;
43585 } else {
43586 this.stateMask &= -9;
43587 this.stateMask &= -2;
43588 this.stateMask &= -5;
43589 }this.fireStateChanged ();
43590 }, "~B");
43591 Clazz_overrideMethod (c$, "setSelected", 
43592 function (b) {
43593 if (this.isSelected () == b) {
43594 return;
43595 }if (b) {
43596 this.stateMask |= 2;
43597 } else {
43598 this.stateMask &= -3;
43599 }this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2));
43600 this.fireStateChanged ();
43601 }, "~B");
43602 Clazz_overrideMethod (c$, "setPressed", 
43603 function (b) {
43604 if ((this.isPressed () == b) || !this.isEnabled ()) {
43605 return;
43606 }if (b) {
43607 this.stateMask |= 4;
43608 } else {
43609 this.stateMask &= -5;
43610 }if (!this.isPressed () && this.isArmed ()) {
43611 var modifiers = 0;
43612 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
43613 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
43614 modifiers = (currentEvent).getModifiers ();
43615 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
43616 modifiers = (currentEvent).getModifiers ();
43617 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers));
43618 }this.fireStateChanged ();
43619 }, "~B");
43620 Clazz_overrideMethod (c$, "setRollover", 
43621 function (b) {
43622 if ((this.isRollover () == b) || !this.isEnabled ()) {
43623 return;
43624 }if (b) {
43625 this.stateMask |= 16;
43626 } else {
43627 this.stateMask &= -17;
43628 }this.fireStateChanged ();
43629 }, "~B");
43630 Clazz_overrideMethod (c$, "setMnemonic", 
43631 function (key) {
43632 this.mnemonic = key;
43633 this.fireStateChanged ();
43634 }, "~N");
43635 Clazz_overrideMethod (c$, "getMnemonic", 
43636 function () {
43637 return this.mnemonic;
43638 });
43639 Clazz_overrideMethod (c$, "addChangeListener", 
43640 function (l) {
43641 this.listenerList.add (javax.swing.event.ChangeListener, l);
43642 }, "javax.swing.event.ChangeListener");
43643 Clazz_overrideMethod (c$, "removeChangeListener", 
43644 function (l) {
43645 this.listenerList.remove (javax.swing.event.ChangeListener, l);
43646 }, "javax.swing.event.ChangeListener");
43647 Clazz_defineMethod (c$, "getChangeListeners", 
43648 function () {
43649 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
43650 });
43651 Clazz_defineMethod (c$, "fireStateChanged", 
43652 function () {
43653 var listeners = this.listenerList.getListenerList ();
43654 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43655 if (listeners[i] === javax.swing.event.ChangeListener) {
43656 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
43657 (listeners[i + 1]).stateChanged (this.changeEvent);
43658 }}
43659 });
43660 Clazz_overrideMethod (c$, "addActionListener", 
43661 function (l) {
43662 this.listenerList.add (java.awt.event.ActionListener, l);
43663 }, "java.awt.event.ActionListener");
43664 Clazz_overrideMethod (c$, "removeActionListener", 
43665 function (l) {
43666 this.listenerList.remove (java.awt.event.ActionListener, l);
43667 }, "java.awt.event.ActionListener");
43668 Clazz_defineMethod (c$, "getActionListeners", 
43669 function () {
43670 return this.listenerList.getListeners (java.awt.event.ActionListener);
43671 });
43672 Clazz_defineMethod (c$, "fireActionPerformed", 
43673 function (e) {
43674 var listeners = this.listenerList.getListenerList ();
43675 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43676 if (listeners[i] === java.awt.event.ActionListener) {
43677 (listeners[i + 1]).actionPerformed (e);
43678 }}
43679 }, "java.awt.event.ActionEvent");
43680 Clazz_overrideMethod (c$, "addItemListener", 
43681 function (l) {
43682 this.listenerList.add (java.awt.event.ItemListener, l);
43683 }, "java.awt.event.ItemListener");
43684 Clazz_overrideMethod (c$, "removeItemListener", 
43685 function (l) {
43686 this.listenerList.remove (java.awt.event.ItemListener, l);
43687 }, "java.awt.event.ItemListener");
43688 Clazz_defineMethod (c$, "getItemListeners", 
43689 function () {
43690 return this.listenerList.getListeners (java.awt.event.ItemListener);
43691 });
43692 Clazz_defineMethod (c$, "fireItemStateChanged", 
43693 function (e) {
43694 var listeners = this.listenerList.getListenerList ();
43695 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43696 if (listeners[i] === java.awt.event.ItemListener) {
43697 (listeners[i + 1]).itemStateChanged (e);
43698 }}
43699 }, "java.awt.event.ItemEvent");
43700 Clazz_defineMethod (c$, "getListeners", 
43701 function (listenerType) {
43702 return this.listenerList.getListeners (listenerType);
43703 }, "Class");
43704 Clazz_overrideMethod (c$, "getSelectedObjects", 
43705 function () {
43706 return null;
43707 });
43708 Clazz_overrideMethod (c$, "setGroup", 
43709 function (group) {
43710 this.group = group;
43711 }, "javax.swing.ButtonGroup");
43712 Clazz_defineMethod (c$, "getGroup", 
43713 function () {
43714 return this.group;
43715 });
43716 Clazz_defineMethod (c$, "isMenuItem", 
43717 function () {
43718 return this.menuItem;
43719 });
43720 Clazz_defineMethod (c$, "setMenuItem", 
43721 function (menuItem) {
43722 this.menuItem = menuItem;
43723 }, "~B");
43724 Clazz_defineStatics (c$,
43725 "ARMED", 1,
43726 "SELECTED", 2,
43727 "PRESSED", 4,
43728 "ENABLED", 8,
43729 "ROLLOVER", 16);
43730 });
43731 Clazz_declarePackage ("javax.swing");
43732 Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () {
43733 c$ = Clazz_decorateAsClass (function () {
43734 this.target = null;
43735 this.xChildren = null;
43736 this.yChildren = null;
43737 this.xTotal = null;
43738 this.yTotal = null;
43739 Clazz_instantialize (this, arguments);
43740 }, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2);
43741 Clazz_makeConstructor (c$, 
43742 function (target) {
43743 this.target = target;
43744 }, "java.awt.Container");
43745 Clazz_defineMethod (c$, "getTarget", 
43746 function () {
43747 return this.target;
43748 });
43749 Clazz_overrideMethod (c$, "invalidateLayout", 
43750 function (target) {
43751 this.checkContainer (target);
43752 this.xChildren = null;
43753 this.yChildren = null;
43754 this.xTotal = null;
43755 this.yTotal = null;
43756 }, "java.awt.Container");
43757 Clazz_defineMethod (c$, "addLayoutComponent", 
43758 function (name, comp) {
43759 this.invalidateLayout (comp.getParent ());
43760 }, "~S,java.awt.Component");
43761 Clazz_overrideMethod (c$, "removeLayoutComponent", 
43762 function (comp) {
43763 this.invalidateLayout (comp.getParent ());
43764 }, "java.awt.Component");
43765 Clazz_defineMethod (c$, "addLayoutComponent", 
43766 function (comp, constraints) {
43767 this.invalidateLayout (comp.getParent ());
43768 }, "java.awt.Component,~O");
43769 Clazz_overrideMethod (c$, "preferredLayoutSize", 
43770 function (target) {
43771 this.checkContainer (target);
43772 this.checkRequests ();
43773 var size =  new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred);
43774 var insets = target.getInsets ();
43775 size.width += insets.left + insets.right;
43776 size.height += insets.top + insets.bottom;
43777 return size;
43778 }, "java.awt.Container");
43779 Clazz_overrideMethod (c$, "minimumLayoutSize", 
43780 function (target) {
43781 this.checkContainer (target);
43782 this.checkRequests ();
43783 var size =  new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum);
43784 var insets = target.getInsets ();
43785 size.width += insets.left + insets.right;
43786 size.height += insets.top + insets.bottom;
43787 return size;
43788 }, "java.awt.Container");
43789 Clazz_overrideMethod (c$, "maximumLayoutSize", 
43790 function (target) {
43791 this.checkContainer (target);
43792 this.checkRequests ();
43793 var size =  new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum);
43794 var insets = target.getInsets ();
43795 size.width += insets.left + insets.right;
43796 size.height += insets.top + insets.bottom;
43797 return size;
43798 }, "java.awt.Container");
43799 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
43800 function (target) {
43801 this.checkContainer (target);
43802 this.checkRequests ();
43803 return this.xTotal.alignment;
43804 }, "java.awt.Container");
43805 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
43806 function (target) {
43807 this.checkContainer (target);
43808 this.checkRequests ();
43809 return this.yTotal.alignment;
43810 }, "java.awt.Container");
43811 Clazz_overrideMethod (c$, "layoutContainer", 
43812 function (target) {
43813 this.checkContainer (target);
43814 this.checkRequests ();
43815 var nChildren = target.getComponentCount ();
43816 var xOffsets =  Clazz_newIntArray (nChildren, 0);
43817 var xSpans =  Clazz_newIntArray (nChildren, 0);
43818 var yOffsets =  Clazz_newIntArray (nChildren, 0);
43819 var ySpans =  Clazz_newIntArray (nChildren, 0);
43820 var alloc = target.getSize ();
43821 var $in = target.getInsets ();
43822 alloc.width -= $in.left + $in.right;
43823 alloc.height -= $in.top + $in.bottom;
43824 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans);
43825 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans);
43826 for (var i = 0; i < nChildren; i++) {
43827 var c = target.getComponent (i);
43828 c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]);
43829 }
43830 }, "java.awt.Container");
43831 Clazz_defineMethod (c$, "checkContainer", 
43832 function (target) {
43833 if (this.target !== target) {
43834 throw  new java.awt.AWTError ("OverlayLayout can't be shared");
43835 }}, "java.awt.Container");
43836 Clazz_defineMethod (c$, "checkRequests", 
43837 function () {
43838 if (this.xChildren == null || this.yChildren == null) {
43839 var n = this.target.getComponentCount ();
43840 this.xChildren =  new Array (n);
43841 this.yChildren =  new Array (n);
43842 for (var i = 0; i < n; i++) {
43843 var c = this.target.getComponent (i);
43844 var min = c.getMinimumSize ();
43845 var typ = c.getPreferredSize ();
43846 var max = c.getMaximumSize ();
43847 this.xChildren[i] =  new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ());
43848 this.yChildren[i] =  new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ());
43849 }
43850 this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren);
43851 this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren);
43852 }});
43853 });
43854 Clazz_declarePackage ("javax.swing");
43855 c$ = Clazz_decorateAsClass (function () {
43856 this.minimum = 0;
43857 this.preferred = 0;
43858 this.maximum = 0;
43859 this.alignment = 0;
43860 Clazz_instantialize (this, arguments);
43861 }, javax.swing, "SizeRequirements");
43862 Clazz_makeConstructor (c$, 
43863 function () {
43864 this.minimum = 0;
43865 this.preferred = 0;
43866 this.maximum = 0;
43867 this.alignment = 0.5;
43868 });
43869 Clazz_makeConstructor (c$, 
43870 function (min, pref, max, a) {
43871 this.minimum = min;
43872 this.preferred = pref;
43873 this.maximum = max;
43874 this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a;
43875 }, "~N,~N,~N,~N");
43876 Clazz_overrideMethod (c$, "toString", 
43877 function () {
43878 return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment;
43879 });
43880 c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", 
43881 function (children) {
43882 var total =  new javax.swing.SizeRequirements ();
43883 for (var i = 0; i < children.length; i++) {
43884 var req = children[i];
43885 total.minimum = Math.min (total.minimum + req.minimum, 2147483647);
43886 total.preferred = Math.min (total.preferred + req.preferred, 2147483647);
43887 total.maximum = Math.min (total.maximum + req.maximum, 2147483647);
43888 }
43889 return total;
43890 }, "~A");
43891 c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", 
43892 function (children) {
43893 var totalAscent =  new javax.swing.SizeRequirements ();
43894 var totalDescent =  new javax.swing.SizeRequirements ();
43895 for (var i = 0; i < children.length; i++) {
43896 var req = children[i];
43897 var ascent = Clazz_floatToInt (req.alignment * req.minimum);
43898 var descent = req.minimum - ascent;
43899 totalAscent.minimum = Math.max (ascent, totalAscent.minimum);
43900 totalDescent.minimum = Math.max (descent, totalDescent.minimum);
43901 ascent = Clazz_floatToInt (req.alignment * req.preferred);
43902 descent = req.preferred - ascent;
43903 totalAscent.preferred = Math.max (ascent, totalAscent.preferred);
43904 totalDescent.preferred = Math.max (descent, totalDescent.preferred);
43905 ascent = Clazz_floatToInt (req.alignment * req.maximum);
43906 descent = req.maximum - ascent;
43907 totalAscent.maximum = Math.max (ascent, totalAscent.maximum);
43908 totalDescent.maximum = Math.max (descent, totalDescent.maximum);
43909 }
43910 var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647);
43911 var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647);
43912 var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647);
43913 var alignment = 0.0;
43914 if (min > 0) {
43915 alignment = totalAscent.minimum / min;
43916 alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment;
43917 }return  new javax.swing.SizeRequirements (min, pref, max, alignment);
43918 }, "~A");
43919 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43920 function (allocated, total, children, offsets, spans) {
43921 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true);
43922 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43923 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43924 function (allocated, total, children, offsets, spans, forward) {
43925 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward);
43926 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43927 c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", 
43928 function (allocated, total, children, offsets, spans, forward) {
43929 var min = 0;
43930 var pref = 0;
43931 var max = 0;
43932 for (var i = 0; i < children.length; i++) {
43933 min += children[i].minimum;
43934 pref += children[i].preferred;
43935 max += children[i].maximum;
43936 }
43937 if (allocated >= pref) {
43938 javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward);
43939 } else {
43940 javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward);
43941 }}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43942 c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", 
43943  function (allocated, min, pref, max, request, offsets, spans, forward) {
43944 var totalPlay = Math.min (pref - allocated, pref - min);
43945 var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min);
43946 var totalOffset;
43947 if (forward) {
43948 totalOffset = 0;
43949 for (var i = 0; i < spans.length; i++) {
43950 offsets[i] = totalOffset;
43951 var req = request[i];
43952 var play = factor * (req.preferred - req.minimum);
43953 spans[i] = Clazz_floatToInt (req.preferred - play);
43954 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43955 }
43956 } else {
43957 totalOffset = allocated;
43958 for (var i = 0; i < spans.length; i++) {
43959 var req = request[i];
43960 var play = factor * (req.preferred - req.minimum);
43961 spans[i] = Clazz_floatToInt (req.preferred - play);
43962 offsets[i] = totalOffset - spans[i];
43963 totalOffset = Math.max (totalOffset - spans[i], 0);
43964 }
43965 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43966 c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", 
43967  function (allocated, min, pref, max, request, offsets, spans, forward) {
43968 var totalPlay = Math.min (allocated - pref, max - pref);
43969 var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref);
43970 var totalOffset;
43971 if (forward) {
43972 totalOffset = 0;
43973 for (var i = 0; i < spans.length; i++) {
43974 offsets[i] = totalOffset;
43975 var req = request[i];
43976 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43977 spans[i] = Math.min (req.preferred + play, 2147483647);
43978 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43979 }
43980 } else {
43981 totalOffset = allocated;
43982 for (var i = 0; i < spans.length; i++) {
43983 var req = request[i];
43984 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43985 spans[i] = Math.min (req.preferred + play, 2147483647);
43986 offsets[i] = totalOffset - spans[i];
43987 totalOffset = Math.max (totalOffset - spans[i], 0);
43988 }
43989 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43990 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
43991 function (allocated, total, children, offsets, spans) {
43992 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true);
43993 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43994 c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", 
43995 function (allocated, total, children, offsets, spans, normal) {
43996 var totalAlignment = normal ? total.alignment : 1.0 - total.alignment;
43997 var totalAscent = Clazz_floatToInt (allocated * totalAlignment);
43998 var totalDescent = allocated - totalAscent;
43999 for (var i = 0; i < children.length; i++) {
44000 var req = children[i];
44001 var alignment = normal ? req.alignment : 1.0 - req.alignment;
44002 var maxAscent = Clazz_floatToInt (req.maximum * alignment);
44003 var maxDescent = req.maximum - maxAscent;
44004 var ascent = Math.min (totalAscent, maxAscent);
44005 var descent = Math.min (totalDescent, maxDescent);
44006 offsets[i] = totalAscent - ascent;
44007 spans[i] = Math.min (ascent + descent, 2147483647);
44008 }
44009 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
44010 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
44011 function (allocated, total, children, offsets, spans, normal) {
44012 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal);
44013 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
44014 c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", 
44015 function (delta, children) {
44016 return  Clazz_newIntArray (0, 0);
44017 }, "~N,~A");
44018 Clazz_declarePackage ("javax.swing");
44019 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () {
44020 c$ = Clazz_decorateAsClass (function () {
44021 this.mnemonic = '\0';
44022 this.mnemonicIndex = -1;
44023 this.text = "";
44024 this.defaultIcon = null;
44025 this.disabledIcon = null;
44026 this.disabledIconSet = false;
44027 this.verticalAlignment = 0;
44028 this.horizontalAlignment = 10;
44029 this.verticalTextPosition = 0;
44030 this.horizontalTextPosition = 11;
44031 this.iconTextGap = 4;
44032 this.labelFor = null;
44033 Clazz_instantialize (this, arguments);
44034 }, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants);
44035 Clazz_makeConstructor (c$, 
44036 function (text, icon, horizontalAlignment) {
44037 Clazz_superConstructor (this, javax.swing.JLabel, []);
44038 this.setText (text);
44039 this.setIcon (icon);
44040 this.setHorizontalAlignment (horizontalAlignment);
44041 this.updateUI ();
44042 this.setAlignmentX (0.0);
44043 }, "~S,javax.swing.Icon,~N");
44044 Clazz_makeConstructor (c$, 
44045 function (text, horizontalAlignment) {
44046 this.construct (text, null, horizontalAlignment);
44047 }, "~S,~N");
44048 Clazz_makeConstructor (c$, 
44049 function (text) {
44050 this.construct (text, null, 10);
44051 }, "~S");
44052 Clazz_makeConstructor (c$, 
44053 function (image, horizontalAlignment) {
44054 this.construct (null, image, horizontalAlignment);
44055 }, "javax.swing.Icon,~N");
44056 Clazz_makeConstructor (c$, 
44057 function (image) {
44058 this.construct (null, image, 0);
44059 }, "javax.swing.Icon");
44060 Clazz_makeConstructor (c$, 
44061 function () {
44062 this.construct ("", null, 10);
44063 });
44064 Clazz_overrideMethod (c$, "getUI", 
44065 function () {
44066 return this.ui;
44067 });
44068 Clazz_defineMethod (c$, "setUI", 
44069 function (ui) {
44070 Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]);
44071 if (!this.disabledIconSet && this.disabledIcon != null) {
44072 this.setDisabledIcon (null);
44073 }}, "javax.swing.plaf.LabelUI");
44074 Clazz_overrideMethod (c$, "updateUI", 
44075 function () {
44076 this.setUI (javax.swing.UIManager.getUI (this));
44077 });
44078 Clazz_overrideMethod (c$, "getUIClassID", 
44079 function () {
44080 return "LabelUI";
44081 });
44082 Clazz_defineMethod (c$, "getText", 
44083 function () {
44084 return this.text;
44085 });
44086 Clazz_defineMethod (c$, "setText", 
44087 function (text) {
44088 var oldValue = this.text;
44089 this.text = text;
44090 this.firePropertyChangeObject ("text", oldValue, text);
44091 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ()));
44092 if (text == null || oldValue == null || !text.equals (oldValue)) {
44093 this.revalidate ();
44094 this.repaint ();
44095 }}, "~S");
44096 Clazz_defineMethod (c$, "getIcon", 
44097 function () {
44098 return this.defaultIcon;
44099 });
44100 Clazz_defineMethod (c$, "setIcon", 
44101 function (icon) {
44102 var oldValue = this.defaultIcon;
44103 this.defaultIcon = icon;
44104 if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) {
44105 this.disabledIcon = null;
44106 }this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon);
44107 if (this.defaultIcon !== oldValue) {
44108 if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) {
44109 this.revalidate ();
44110 }this.repaint ();
44111 }}, "javax.swing.Icon");
44112 Clazz_defineMethod (c$, "getDisabledIcon", 
44113 function () {
44114 if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) {
44115 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon);
44116 if (this.disabledIcon != null) {
44117 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
44118 }}return this.disabledIcon;
44119 });
44120 Clazz_defineMethod (c$, "setDisabledIcon", 
44121 function (disabledIcon) {
44122 var oldValue = this.disabledIcon;
44123 this.disabledIcon = disabledIcon;
44124 this.disabledIconSet = (disabledIcon != null);
44125 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
44126 if (disabledIcon !== oldValue) {
44127 if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) {
44128 this.revalidate ();
44129 }if (!this.isEnabled ()) {
44130 this.repaint ();
44131 }}}, "javax.swing.Icon");
44132 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44133 function (key) {
44134 var oldKey = this.mnemonic;
44135 this.mnemonic = key;
44136 this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic);
44137 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic));
44138 if (key != oldKey) {
44139 this.revalidate ();
44140 this.repaint ();
44141 }}, "~N");
44142 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44143 function (aChar) {
44144 var vk = (aChar).charCodeAt (0);
44145 if (vk >= 97 && vk <= 122) vk -= (32);
44146 this.setDisplayedMnemonic (vk);
44147 }, "~S");
44148 Clazz_defineMethod (c$, "getDisplayedMnemonic", 
44149 function () {
44150 return this.mnemonic;
44151 });
44152 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
44153 function (index) {
44154 var oldValue = this.mnemonicIndex;
44155 if (index == -1) {
44156 this.mnemonicIndex = -1;
44157 } else {
44158 var text = this.getText ();
44159 var textLength = (text == null) ? 0 : text.length;
44160 if (index < -1 || index >= textLength) {
44161 throw  new IllegalArgumentException ("index == " + index);
44162 }}this.mnemonicIndex = index;
44163 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
44164 if (index != oldValue) {
44165 this.revalidate ();
44166 this.repaint ();
44167 }}, "~N");
44168 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
44169 function () {
44170 return this.mnemonicIndex;
44171 });
44172 Clazz_defineMethod (c$, "checkHorizontalKey", 
44173 function (key, message) {
44174 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
44175 return key;
44176 } else {
44177 throw  new IllegalArgumentException (message);
44178 }}, "~N,~S");
44179 Clazz_defineMethod (c$, "checkVerticalKey", 
44180 function (key, message) {
44181 if ((key == 1) || (key == 0) || (key == 3)) {
44182 return key;
44183 } else {
44184 throw  new IllegalArgumentException (message);
44185 }}, "~N,~S");
44186 Clazz_defineMethod (c$, "getIconTextGap", 
44187 function () {
44188 return this.iconTextGap;
44189 });
44190 Clazz_defineMethod (c$, "setIconTextGap", 
44191 function (iconTextGap) {
44192 var oldValue = this.iconTextGap;
44193 this.iconTextGap = iconTextGap;
44194 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
44195 if (iconTextGap != oldValue) {
44196 this.revalidate ();
44197 this.repaint ();
44198 }}, "~N");
44199 Clazz_defineMethod (c$, "getVerticalAlignment", 
44200 function () {
44201 return this.verticalAlignment;
44202 });
44203 Clazz_defineMethod (c$, "setVerticalAlignment", 
44204 function (alignment) {
44205 if (alignment == this.verticalAlignment) return;
44206 var oldValue = this.verticalAlignment;
44207 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
44208 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
44209 this.repaint ();
44210 }, "~N");
44211 Clazz_defineMethod (c$, "getHorizontalAlignment", 
44212 function () {
44213 return this.horizontalAlignment;
44214 });
44215 Clazz_defineMethod (c$, "setHorizontalAlignment", 
44216 function (alignment) {
44217 if (alignment == this.horizontalAlignment) return;
44218 var oldValue = this.horizontalAlignment;
44219 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
44220 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
44221 this.repaint ();
44222 }, "~N");
44223 Clazz_defineMethod (c$, "getVerticalTextPosition", 
44224 function () {
44225 return this.verticalTextPosition;
44226 });
44227 Clazz_defineMethod (c$, "setVerticalTextPosition", 
44228 function (textPosition) {
44229 if (textPosition == this.verticalTextPosition) return;
44230 var old = this.verticalTextPosition;
44231 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
44232 this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition);
44233 this.revalidate ();
44234 this.repaint ();
44235 }, "~N");
44236 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
44237 function () {
44238 return this.horizontalTextPosition;
44239 });
44240 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
44241 function (textPosition) {
44242 var old = this.horizontalTextPosition;
44243 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
44244 this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition);
44245 this.revalidate ();
44246 this.repaint ();
44247 }, "~N");
44248 Clazz_defineMethod (c$, "imageUpdate", 
44249 function (img, infoflags, x, y, w, h) {
44250 if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) {
44251 return false;
44252 }return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]);
44253 }, "java.awt.Image,~N,~N,~N,~N,~N");
44254 Clazz_defineMethod (c$, "paramString", 
44255 function () {
44256 var textString = (this.text != null ? this.text : "");
44257 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
44258 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
44259 var labelForString = (this.labelFor != null ? this.labelFor.toString () : "");
44260 var verticalAlignmentString;
44261 if (this.verticalAlignment == 1) {
44262 verticalAlignmentString = "TOP";
44263 } else if (this.verticalAlignment == 0) {
44264 verticalAlignmentString = "CENTER";
44265 } else if (this.verticalAlignment == 3) {
44266 verticalAlignmentString = "BOTTOM";
44267 } else verticalAlignmentString = "";
44268 var horizontalAlignmentString;
44269 if (this.horizontalAlignment == 2) {
44270 horizontalAlignmentString = "LEFT";
44271 } else if (this.horizontalAlignment == 0) {
44272 horizontalAlignmentString = "CENTER";
44273 } else if (this.horizontalAlignment == 4) {
44274 horizontalAlignmentString = "RIGHT";
44275 } else if (this.horizontalAlignment == 10) {
44276 horizontalAlignmentString = "LEADING";
44277 } else if (this.horizontalAlignment == 11) {
44278 horizontalAlignmentString = "TRAILING";
44279 } else horizontalAlignmentString = "";
44280 var verticalTextPositionString;
44281 if (this.verticalTextPosition == 1) {
44282 verticalTextPositionString = "TOP";
44283 } else if (this.verticalTextPosition == 0) {
44284 verticalTextPositionString = "CENTER";
44285 } else if (this.verticalTextPosition == 3) {
44286 verticalTextPositionString = "BOTTOM";
44287 } else verticalTextPositionString = "";
44288 var horizontalTextPositionString;
44289 if (this.horizontalTextPosition == 2) {
44290 horizontalTextPositionString = "LEFT";
44291 } else if (this.horizontalTextPosition == 0) {
44292 horizontalTextPositionString = "CENTER";
44293 } else if (this.horizontalTextPosition == 4) {
44294 horizontalTextPositionString = "RIGHT";
44295 } else if (this.horizontalTextPosition == 10) {
44296 horizontalTextPositionString = "LEADING";
44297 } else if (this.horizontalTextPosition == 11) {
44298 horizontalTextPositionString = "TRAILING";
44299 } else horizontalTextPositionString = "";
44300 return Clazz_superCall (this, javax.swing.JLabel, "paramString", []) + ",defaultIcon=" + defaultIconString + ",disabledIcon=" + disabledIconString + ",horizontalAlignment=" + horizontalAlignmentString + ",horizontalTextPosition=" + horizontalTextPositionString + ",iconTextGap=" + this.iconTextGap + ",labelFor=" + labelForString + ",text=" + textString + ",verticalAlignment=" + verticalAlignmentString + ",verticalTextPosition=" + verticalTextPositionString;
44301 });
44302 Clazz_defineMethod (c$, "getLabelFor", 
44303 function () {
44304 return this.labelFor;
44305 });
44306 Clazz_defineMethod (c$, "setLabelFor", 
44307 function (c) {
44308 var oldC = this.labelFor;
44309 this.labelFor = c;
44310 this.firePropertyChangeObject ("labelFor", oldC, c);
44311 if (Clazz_instanceOf (oldC, javax.swing.JComponent)) {
44312 (oldC).putClientProperty ("labeledBy", null);
44313 }if (Clazz_instanceOf (c, javax.swing.JComponent)) {
44314 (c).putClientProperty ("labeledBy", this);
44315 }}, "java.awt.Component");
44316 Clazz_defineStatics (c$,
44317 "$uiClassID", "LabelUI",
44318 "LABELED_BY_PROPERTY", "labeledBy");
44319 });
44320 Clazz_declarePackage ("javax.swing.border");
44321 Clazz_declareInterface (javax.swing.border, "Border");
44322 Clazz_declarePackage ("javax.swing");
44323 Clazz_declareInterface (javax.swing, "RootPaneContainer");
44324 Clazz_declarePackage ("javax.swing.event");
44325 Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () {
44326 c$ = Clazz_decorateAsClass (function () {
44327 this.path = null;
44328 this.manager = null;
44329 Clazz_instantialize (this, arguments);
44330 }, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent);
44331 Clazz_makeConstructor (c$, 
44332 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) {
44333 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]);
44334 this.path = p;
44335 this.manager = m;
44336 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44337 Clazz_makeConstructor (c$, 
44338 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) {
44339 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
44340 this.path = p;
44341 this.manager = m;
44342 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44343 Clazz_defineMethod (c$, "getPath", 
44344 function () {
44345 return this.path;
44346 });
44347 Clazz_defineMethod (c$, "getMenuSelectionManager", 
44348 function () {
44349 return this.manager;
44350 });
44351 });
44352 Clazz_declarePackage ("jssun.swing");
44353 Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () {
44354 c$ = Clazz_decorateAsClass (function () {
44355 this.name = null;
44356 Clazz_instantialize (this, arguments);
44357 }, jssun.swing, "UIAction", null, javax.swing.Action);
44358 Clazz_makeConstructor (c$, 
44359 function (name) {
44360 this.name = name;
44361 }, "~S");
44362 Clazz_defineMethod (c$, "getName", 
44363 function () {
44364 return this.name;
44365 });
44366 Clazz_overrideMethod (c$, "getValue", 
44367 function (key) {
44368 if (key === "Name") {
44369 return this.name;
44370 }return null;
44371 }, "~S");
44372 Clazz_overrideMethod (c$, "putValue", 
44373 function (key, value) {
44374 }, "~S,~O");
44375 Clazz_overrideMethod (c$, "setEnabled", 
44376 function (b) {
44377 }, "~B");
44378 Clazz_defineMethod (c$, "isEnabled", 
44379 function () {
44380 return this.isEnabled (null);
44381 });
44382 Clazz_defineMethod (c$, "isEnabled", 
44383 function (sender) {
44384 return true;
44385 }, "~O");
44386 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
44387 function (listener) {
44388 }, "java.beans.PropertyChangeListener");
44389 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
44390 function (listener) {
44391 }, "java.beans.PropertyChangeListener");
44392 });
44393 Clazz_declarePackage ("jssun.awt");
44394 Clazz_declareInterface (jssun.awt, "RequestFocusController");
44395 Clazz_declarePackage ("javax.swing");
44396 Clazz_load (["java.awt.event.ComponentListener", "java.beans.PropertyChangeListener", "javax.swing.event.EventListenerList"], "javax.swing.AncestorNotifier", ["java.awt.Window", "javax.swing.JComponent", "javax.swing.event.AncestorEvent", "$.AncestorListener"], function () {
44397 c$ = Clazz_decorateAsClass (function () {
44398 this.firstInvisibleAncestor = null;
44399 this.listenerList = null;
44400 this.root = null;
44401 Clazz_instantialize (this, arguments);
44402 }, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]);
44403 Clazz_prepareFields (c$, function () {
44404 this.listenerList =  new javax.swing.event.EventListenerList ();
44405 });
44406 Clazz_makeConstructor (c$, 
44407 function (root) {
44408 this.root = root;
44409 this.addListeners (root, true);
44410 }, "javax.swing.JComponent");
44411 Clazz_defineMethod (c$, "addAncestorListener", 
44412 function (l) {
44413 this.listenerList.add (javax.swing.event.AncestorListener, l);
44414 }, "javax.swing.event.AncestorListener");
44415 Clazz_defineMethod (c$, "removeAncestorListener", 
44416 function (l) {
44417 this.listenerList.remove (javax.swing.event.AncestorListener, l);
44418 }, "javax.swing.event.AncestorListener");
44419 Clazz_defineMethod (c$, "getAncestorListeners", 
44420 function () {
44421 return this.listenerList.getListeners (javax.swing.event.AncestorListener);
44422 });
44423 Clazz_defineMethod (c$, "fireAncestorAdded", 
44424 function (source, id, ancestor, ancestorParent) {
44425 var listeners = this.listenerList.getListenerList ();
44426 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44427 if (listeners[i] === javax.swing.event.AncestorListener) {
44428 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44429 (listeners[i + 1]).ancestorAdded (ancestorEvent);
44430 }}
44431 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44432 Clazz_defineMethod (c$, "fireAncestorRemoved", 
44433 function (source, id, ancestor, ancestorParent) {
44434 var listeners = this.listenerList.getListenerList ();
44435 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44436 if (listeners[i] === javax.swing.event.AncestorListener) {
44437 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44438 (listeners[i + 1]).ancestorRemoved (ancestorEvent);
44439 }}
44440 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44441 Clazz_defineMethod (c$, "fireAncestorMoved", 
44442 function (source, id, ancestor, ancestorParent) {
44443 var listeners = this.listenerList.getListenerList ();
44444 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44445 if (listeners[i] === javax.swing.event.AncestorListener) {
44446 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44447 (listeners[i + 1]).ancestorMoved (ancestorEvent);
44448 }}
44449 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44450 Clazz_defineMethod (c$, "removeAllListeners", 
44451 function () {
44452 this.removeListeners (this.root);
44453 });
44454 Clazz_defineMethod (c$, "addListeners", 
44455 function (ancestor, addToFirst) {
44456 var a;
44457 this.firstInvisibleAncestor = null;
44458 for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) {
44459 if (addToFirst || a !== ancestor) {
44460 a.addComponentListener (this);
44461 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44462 var jAncestor = a;
44463 jAncestor.addPropertyChangeListener (this);
44464 }}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) {
44465 this.firstInvisibleAncestor = a;
44466 }}
44467 if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) {
44468 this.firstInvisibleAncestor = null;
44469 }}, "java.awt.Component,~B");
44470 Clazz_defineMethod (c$, "removeListeners", 
44471 function (ancestor) {
44472 var a;
44473 for (a = ancestor; a != null; a = a.getParent ()) {
44474 a.removeComponentListener (this);
44475 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44476 var jAncestor = a;
44477 jAncestor.removePropertyChangeListener (this);
44478 }if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) {
44479 break;
44480 }}
44481 }, "java.awt.Component");
44482 Clazz_overrideMethod (c$, "componentResized", 
44483 function (e) {
44484 }, "java.awt.event.ComponentEvent");
44485 Clazz_overrideMethod (c$, "componentMoved", 
44486 function (e) {
44487 var source = e.getComponent ();
44488 this.fireAncestorMoved (this.root, 3, source, source.getParent ());
44489 }, "java.awt.event.ComponentEvent");
44490 Clazz_overrideMethod (c$, "componentShown", 
44491 function (e) {
44492 var ancestor = e.getComponent ();
44493 if (ancestor === this.firstInvisibleAncestor) {
44494 this.addListeners (ancestor, false);
44495 if (this.firstInvisibleAncestor == null) {
44496 this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ());
44497 }}}, "java.awt.event.ComponentEvent");
44498 Clazz_overrideMethod (c$, "componentHidden", 
44499 function (e) {
44500 var ancestor = e.getComponent ();
44501 var needsNotify = this.firstInvisibleAncestor == null;
44502 if (!(Clazz_instanceOf (ancestor, java.awt.Window))) {
44503 this.removeListeners (ancestor.getParent ());
44504 }this.firstInvisibleAncestor = ancestor;
44505 if (needsNotify) {
44506 this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ());
44507 }}, "java.awt.event.ComponentEvent");
44508 Clazz_overrideMethod (c$, "propertyChange", 
44509 function (evt) {
44510 var s = evt.getPropertyName ();
44511 if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) {
44512 var component = evt.getSource ();
44513 if (evt.getNewValue () != null) {
44514 if (component === this.firstInvisibleAncestor) {
44515 this.addListeners (component, false);
44516 if (this.firstInvisibleAncestor == null) {
44517 this.fireAncestorAdded (this.root, 1, component, component.getParent ());
44518 }}} else {
44519 var needsNotify = this.firstInvisibleAncestor == null;
44520 var oldParent = evt.getOldValue ();
44521 this.removeListeners (oldParent);
44522 this.firstInvisibleAncestor = component;
44523 if (needsNotify) {
44524 this.fireAncestorRemoved (this.root, 2, component, oldParent);
44525 }}}}, "java.beans.PropertyChangeEvent");
44526 });
44527 Clazz_declarePackage ("javax.swing.event");
44528 Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () {
44529 c$ = Clazz_decorateAsClass (function () {
44530 this.ancestor = null;
44531 this.ancestorParent = null;
44532 Clazz_instantialize (this, arguments);
44533 }, javax.swing.event, "AncestorEvent", java.awt.AWTEvent);
44534 Clazz_makeConstructor (c$, 
44535 function (source, id, ancestor, ancestorParent) {
44536 Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]);
44537 this.ancestor = ancestor;
44538 this.ancestorParent = ancestorParent;
44539 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44540 Clazz_defineMethod (c$, "getAncestor", 
44541 function () {
44542 return this.ancestor;
44543 });
44544 Clazz_defineMethod (c$, "getAncestorParent", 
44545 function () {
44546 return this.ancestorParent;
44547 });
44548 Clazz_defineMethod (c$, "getComponent", 
44549 function () {
44550 return this.getSource ();
44551 });
44552 Clazz_defineStatics (c$,
44553 "ANCESTOR_ADDED", 1,
44554 "ANCESTOR_REMOVED", 2,
44555 "ANCESTOR_MOVED", 3);
44556 });
44557 Clazz_declarePackage ("javax.swing.event");
44558 Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () {
44559 Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener);
44560 });
44561 Clazz_declarePackage ("javax.swing");
44562 Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () {
44563 c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum);
44564 Clazz_makeConstructor (c$, 
44565  function (reportValueNotSerializable) {
44566 }, "~B");
44567 Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]);
44568 Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]);
44569 Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]);
44570 Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]);
44571 });
44572 Clazz_declarePackage ("javax.swing");
44573 Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
44574 c$ = Clazz_decorateAsClass (function () {
44575 this.defaultCloseOperation = 1;
44576 this.rootPane = null;
44577 this.rootPaneCheckingEnabled = false;
44578 this.transferHandler = null;
44579 Clazz_instantialize (this, arguments);
44580 }, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
44581 Clazz_makeConstructor (c$, 
44582 function () {
44583 this.construct (Clazz_castNullAs ("java.awt.Frame"), false);
44584 });
44585 Clazz_makeConstructor (c$, 
44586 function (owner) {
44587 this.construct (owner, false);
44588 }, "java.awt.Frame");
44589 Clazz_makeConstructor (c$, 
44590 function (owner, modal) {
44591 this.construct (owner, null, modal);
44592 }, "java.awt.Frame,~B");
44593 Clazz_makeConstructor (c$, 
44594 function (owner, title) {
44595 this.construct (owner, title, false);
44596 }, "java.awt.Frame,~S");
44597 Clazz_makeConstructor (c$, 
44598 function (owner, title, modal) {
44599 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]);
44600 if (owner == null) {
44601 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44602 this.addWindowListener (ownerShutdownListener);
44603 }this.dialogInit ();
44604 }, "java.awt.Frame,~S,~B");
44605 Clazz_makeConstructor (c$, 
44606 function (owner, title, modal, gc) {
44607 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]);
44608 if (owner == null) {
44609 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44610 this.addWindowListener (ownerShutdownListener);
44611 }this.dialogInit ();
44612 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44613 Clazz_makeConstructor (c$, 
44614 function (owner) {
44615 this.construct (owner, false);
44616 }, "java.awt.Dialog");
44617 Clazz_makeConstructor (c$, 
44618 function (owner, modal) {
44619 this.construct (owner, null, modal);
44620 }, "java.awt.Dialog,~B");
44621 Clazz_makeConstructor (c$, 
44622 function (owner, title) {
44623 this.construct (owner, title, false);
44624 }, "java.awt.Dialog,~S");
44625 Clazz_makeConstructor (c$, 
44626 function (owner, title, modal) {
44627 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]);
44628 this.dialogInit ();
44629 }, "java.awt.Dialog,~S,~B");
44630 Clazz_makeConstructor (c$, 
44631 function (owner, title, modal, gc) {
44632 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]);
44633 this.dialogInit ();
44634 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44635 Clazz_makeConstructor (c$, 
44636 function (owner) {
44637 this.construct (owner, java.awt.Dialog.ModalityType.MODELESS);
44638 }, "java.awt.Window");
44639 Clazz_makeConstructor (c$, 
44640 function (owner, modalityType) {
44641 this.construct (owner, null, modalityType);
44642 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44643 Clazz_makeConstructor (c$, 
44644 function (owner, title) {
44645 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44646 }, "java.awt.Window,~S");
44647 Clazz_makeConstructor (c$, 
44648 function (owner, title, modalityType) {
44649 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]);
44650 this.dialogInit ();
44651 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44652 Clazz_makeConstructor (c$, 
44653 function (owner, title, modalityType, gc) {
44654 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]);
44655 this.dialogInit ();
44656 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44657 Clazz_defineMethod (c$, "dialogInit", 
44658 function () {
44659 this.enableEvents (72);
44660 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
44661 this.setRootPane (this.createRootPane ());
44662 this.setRootPaneCheckingEnabled (true);
44663 if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) {
44664 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
44665 if (supportsWindowDecorations) {
44666 this.setUndecorated (true);
44667 this.getRootPane ().setWindowDecorationStyle (2);
44668 }}});
44669 Clazz_defineMethod (c$, "createRootPane", 
44670 function () {
44671 var rp =  new javax.swing.JRootPane ();
44672 rp.setOpaque (true);
44673 return rp;
44674 });
44675 Clazz_defineMethod (c$, "processWindowEvent", 
44676 function (e) {
44677 Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]);
44678 if (e.getID () == 201) {
44679 switch (this.defaultCloseOperation) {
44680 case 1:
44681 this.setVisible (false);
44682 break;
44683 case 2:
44684 this.dispose ();
44685 break;
44686 case 0:
44687 default:
44688 break;
44689 }
44690 }}, "java.awt.event.WindowEvent");
44691 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
44692 function (operation) {
44693 if (operation != 0 && operation != 1 && operation != 2) {
44694 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
44695 }var oldValue = this.defaultCloseOperation;
44696 this.defaultCloseOperation = operation;
44697 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
44698 }, "~N");
44699 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
44700 function () {
44701 return this.defaultCloseOperation;
44702 });
44703 Clazz_defineMethod (c$, "setTransferHandler", 
44704 function (newHandler) {
44705 var oldHandler = this.transferHandler;
44706 this.transferHandler = newHandler;
44707 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
44708 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
44709 }, "javax.swing.TransferHandler");
44710 Clazz_defineMethod (c$, "getTransferHandler", 
44711 function () {
44712 return this.transferHandler;
44713 });
44714 Clazz_overrideMethod (c$, "update", 
44715 function (g) {
44716 this.paint (g);
44717 }, "java.awt.Graphics");
44718 Clazz_defineMethod (c$, "setJMenuBar", 
44719 function (menu) {
44720 this.getRootPane ().setMenuBar (menu);
44721 }, "javax.swing.JMenuBar");
44722 Clazz_defineMethod (c$, "getJMenuBar", 
44723 function () {
44724 return this.getRootPane ().getMenuBar ();
44725 });
44726 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
44727 function () {
44728 return this.rootPaneCheckingEnabled;
44729 });
44730 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
44731 function (enabled) {
44732 this.rootPaneCheckingEnabled = enabled;
44733 }, "~B");
44734 Clazz_overrideMethod (c$, "addImpl", 
44735 function (comp, constraints, index) {
44736 if (this.isRootPaneCheckingEnabled ()) {
44737 return this.getContentPane ().add (comp, constraints, index);
44738 }return this.addImplSAEM (comp, constraints, index);
44739 }, "java.awt.Component,~O,~N");
44740 Clazz_defineMethod (c$, "remove", 
44741 function (comp) {
44742 if (comp === this.rootPane) {
44743 this.removeChild (comp);
44744 } else {
44745 this.getContentPane ().removeChild (comp);
44746 }}, "java.awt.Component");
44747 Clazz_defineMethod (c$, "setLayout", 
44748 function (manager) {
44749 if (this.isRootPaneCheckingEnabled ()) {
44750 this.getContentPane ().setLayout (manager);
44751 } else {
44752 Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]);
44753 }}, "java.awt.LayoutManager");
44754 Clazz_overrideMethod (c$, "getRootPane", 
44755 function () {
44756 return this.rootPane;
44757 });
44758 Clazz_defineMethod (c$, "setRootPane", 
44759 function (root) {
44760 if (this.rootPane != null) {
44761 this.remove (this.rootPane);
44762 }this.rootPane = root;
44763 if (this.rootPane != null) {
44764 var checkingEnabled = this.isRootPaneCheckingEnabled ();
44765 try {
44766 this.setRootPaneCheckingEnabled (false);
44767 this.add (this.rootPane, "Center");
44768 } finally {
44769 this.setRootPaneCheckingEnabled (checkingEnabled);
44770 }
44771 }}, "javax.swing.JRootPane");
44772 Clazz_overrideMethod (c$, "getContentPane", 
44773 function () {
44774 return this.getRootPane ().getContentPane ();
44775 });
44776 Clazz_overrideMethod (c$, "setContentPane", 
44777 function (contentPane) {
44778 this.getRootPane ().setContentPane (contentPane);
44779 }, "java.awt.Container");
44780 Clazz_overrideMethod (c$, "getLayeredPane", 
44781 function () {
44782 return this.getRootPane ().getLayeredPane ();
44783 });
44784 Clazz_overrideMethod (c$, "setLayeredPane", 
44785 function (layeredPane) {
44786 this.getRootPane ().setLayeredPane (layeredPane);
44787 }, "javax.swing.JLayeredPane");
44788 Clazz_overrideMethod (c$, "getGlassPane", 
44789 function () {
44790 return this.getRootPane ().getGlassPane ();
44791 });
44792 Clazz_overrideMethod (c$, "setGlassPane", 
44793 function (glassPane) {
44794 this.getRootPane ().setGlassPane (glassPane);
44795 }, "java.awt.Component");
44796 Clazz_defineMethod (c$, "getGraphics", 
44797 function () {
44798 javax.swing.JComponent.getGraphicsInvoked (this);
44799 return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []);
44800 });
44801 Clazz_defineMethod (c$, "repaint", 
44802 function (time, x, y, width, height) {
44803 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
44804 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
44805 } else {
44806 Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]);
44807 }}, "~N,~N,~N,~N,~N");
44808 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
44809 function (defaultLookAndFeelDecorated) {
44810 if (defaultLookAndFeelDecorated) {
44811 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
44812 } else {
44813 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
44814 }}, "~B");
44815 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
44816 function () {
44817 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey);
44818 if (defaultLookAndFeelDecorated == null) {
44819 defaultLookAndFeelDecorated = Boolean.FALSE;
44820 }return defaultLookAndFeelDecorated.booleanValue ();
44821 });
44822 Clazz_defineMethod (c$, "paramString", 
44823 function () {
44824 var defaultCloseOperationString;
44825 if (this.defaultCloseOperation == 1) {
44826 defaultCloseOperationString = "HIDE_ON_CLOSE";
44827 } else if (this.defaultCloseOperation == 2) {
44828 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
44829 } else if (this.defaultCloseOperation == 0) {
44830 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
44831 } else defaultCloseOperationString = "";
44832 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
44833 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
44834 return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
44835 });
44836 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
44837 });
44838 Clazz_declarePackage ("java.awt");
44839 Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {
44840 c$ = Clazz_decorateAsClass (function () {
44841 this.resizable = true;
44842 this.undecorated = false;
44843 this.modal = false;
44844 this.modalityType = null;
44845 this.title = null;
44846 this.isInHide = false;
44847 this.isInDispose = false;
44848 Clazz_instantialize (this, arguments);
44849 }, java.awt, "Dialog", java.awt.Window);
44850 Clazz_makeConstructor (c$, 
44851 function (owner) {
44852 this.construct (owner, "", false);
44853 }, "java.awt.Frame");
44854 Clazz_makeConstructor (c$, 
44855 function (owner, modal) {
44856 this.construct (owner, "", modal);
44857 }, "java.awt.Frame,~B");
44858 Clazz_makeConstructor (c$, 
44859 function (owner, title) {
44860 this.construct (owner, title, false);
44861 }, "java.awt.Frame,~S");
44862 Clazz_makeConstructor (c$, 
44863 function (owner, title, modal) {
44864 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44865 }, "java.awt.Frame,~S,~B");
44866 Clazz_makeConstructor (c$, 
44867 function (owner, title, modal, gc) {
44868 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44869 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44870 Clazz_makeConstructor (c$, 
44871 function (owner) {
44872 this.construct (owner, "", false);
44873 }, "java.awt.Dialog");
44874 Clazz_makeConstructor (c$, 
44875 function (owner, title) {
44876 this.construct (owner, title, false);
44877 }, "java.awt.Dialog,~S");
44878 Clazz_makeConstructor (c$, 
44879 function (owner, title, modal) {
44880 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44881 }, "java.awt.Dialog,~S,~B");
44882 Clazz_makeConstructor (c$, 
44883 function (owner, title, modal, gc) {
44884 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44885 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44886 Clazz_makeConstructor (c$, 
44887 function (owner) {
44888 this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);
44889 }, "java.awt.Window");
44890 Clazz_makeConstructor (c$, 
44891 function (owner, title) {
44892 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44893 }, "java.awt.Window,~S");
44894 Clazz_makeConstructor (c$, 
44895 function (owner, modalityType) {
44896 this.construct (owner, null, modalityType);
44897 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44898 Clazz_makeConstructor (c$, 
44899 function (owner, title, modalityType) {
44900 Clazz_superConstructor (this, java.awt.Dialog, [owner]);
44901 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44902 throw  new IllegalArgumentException ("Wrong parent window");
44903 }this.title = title;
44904 this.setModalityType (modalityType);
44905 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44906 Clazz_makeConstructor (c$, 
44907 function (owner, title, modalityType, gc) {
44908 Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]);
44909 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44910 throw  new IllegalArgumentException ("wrong owner window");
44911 }this.title = title;
44912 this.setModalityType (modalityType);
44913 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44914 Clazz_overrideMethod (c$, "constructComponentName", 
44915 function () {
44916 {
44917 return "dialog" + java.awt.Dialog.$nameCounter++;
44918 }});
44919 Clazz_defineMethod (c$, "addNotify", 
44920 function () {
44921 {
44922 if (this.parent != null) {
44923 this.parent.addNotify ();
44924 }Clazz_superCall (this, java.awt.Dialog, "addNotify", []);
44925 }});
44926 Clazz_defineMethod (c$, "isModal", 
44927 function () {
44928 return this.isModal_NoClientCode ();
44929 });
44930 Clazz_defineMethod (c$, "isModal_NoClientCode", 
44931 function () {
44932 return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;
44933 });
44934 Clazz_defineMethod (c$, "setModal", 
44935 function (modal) {
44936 this.modal = modal;
44937 this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44938 }, "~B");
44939 Clazz_defineMethod (c$, "getModalityType", 
44940 function () {
44941 return this.modalityType;
44942 });
44943 Clazz_defineMethod (c$, "setModalityType", 
44944 function (type) {
44945 if (type == null) {
44946 type = java.awt.Dialog.ModalityType.MODELESS;
44947 }if (this.modalityType === type) {
44948 return;
44949 }this.checkModalityPermission (type);
44950 this.modalityType = type;
44951 this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);
44952 }, "java.awt.Dialog.ModalityType");
44953 Clazz_defineMethod (c$, "getTitle", 
44954 function () {
44955 return this.title;
44956 });
44957 Clazz_defineMethod (c$, "setTitle", 
44958 function (title) {
44959 var oldTitle = this.title;
44960 {
44961 this.title = title;
44962 }this.firePropertyChangeObject ("title", oldTitle, title);
44963 }, "~S");
44964 Clazz_defineMethod (c$, "show", 
44965 function () {
44966 });
44967 Clazz_defineMethod (c$, "modalityPushed", 
44968 function () {
44969 });
44970 Clazz_defineMethod (c$, "modalityPopped", 
44971 function () {
44972 });
44973 Clazz_defineMethod (c$, "interruptBlocking", 
44974 function () {
44975 if (this.isModal ()) {
44976 this.disposeImpl ();
44977 } else if (this.windowClosingException != null) {
44978 this.windowClosingException.fillInStackTrace ();
44979 this.windowClosingException.printStackTrace ();
44980 this.windowClosingException = null;
44981 }});
44982 Clazz_defineMethod (c$, "hideAndDisposePreHandler", 
44983  function () {
44984 this.isInHide = true;
44985 });
44986 Clazz_defineMethod (c$, "hideAndDisposeHandler", 
44987  function () {
44988 this.isInHide = false;
44989 });
44990 Clazz_defineMethod (c$, "hide", 
44991 function () {
44992 this.hideAndDisposePreHandler ();
44993 Clazz_superCall (this, java.awt.Dialog, "hide", []);
44994 if (!this.isInDispose) {
44995 this.hideAndDisposeHandler ();
44996 }});
44997 Clazz_defineMethod (c$, "doDispose", 
44998 function () {
44999 this.isInDispose = true;
45000 Clazz_superCall (this, java.awt.Dialog, "doDispose", []);
45001 this.hideAndDisposeHandler ();
45002 this.isInDispose = false;
45003 });
45004 Clazz_defineMethod (c$, "isResizable", 
45005 function () {
45006 return this.resizable;
45007 });
45008 Clazz_defineMethod (c$, "setResizable", 
45009 function (resizable) {
45010 var testvalid = false;
45011 {
45012 this.resizable = resizable;
45013 }if (testvalid) {
45014 this.invalidateIfValid ();
45015 }}, "~B");
45016 Clazz_defineMethod (c$, "setUndecorated", 
45017 function (undecorated) {
45018 {
45019 if (this.isDisplayable ()) {
45020 throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");
45021 }this.undecorated = undecorated;
45022 }}, "~B");
45023 Clazz_defineMethod (c$, "isUndecorated", 
45024 function () {
45025 return this.undecorated;
45026 });
45027 Clazz_defineMethod (c$, "paramString", 
45028 function () {
45029 var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;
45030 if (this.title != null) {
45031 str += ",title=" + this.title;
45032 }return str;
45033 });
45034 Clazz_defineMethod (c$, "modalShow", 
45035 function () {
45036 });
45037 Clazz_defineMethod (c$, "modalHide", 
45038 function () {
45039 });
45040 Clazz_defineMethod (c$, "shouldBlock", 
45041 function (w) {
45042 if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {
45043 return false;
45044 }if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) {
45045 return false;
45046 }var blockerToCheck = this;
45047 while (blockerToCheck != null) {
45048 var c = w;
45049 while ((c != null) && (c !== blockerToCheck)) {
45050 c = c.getParent_NoClientCode ();
45051 }
45052 if (c === blockerToCheck) {
45053 return false;
45054 }blockerToCheck = blockerToCheck.getModalBlocker ();
45055 }
45056 switch (this.modalityType) {
45057 case java.awt.Dialog.ModalityType.MODELESS:
45058 return false;
45059 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
45060 if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
45061 var c = this;
45062 while ((c != null) && (c !== w)) {
45063 c = c.getParent_NoClientCode ();
45064 }
45065 return c === w;
45066 } else {
45067 return this.getDocumentRoot () === w.getDocumentRoot ();
45068 }case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
45069 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);
45070 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
45071 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
45072 }
45073 return false;
45074 }, "java.awt.Window");
45075 Clazz_defineMethod (c$, "checkModalityPermission", 
45076  function (mt) {
45077 }, "java.awt.Dialog.ModalityType");
45078 Clazz_pu$h(self.c$);
45079 c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum);
45080 Clazz_defineEnumConstant (c$, "MODELESS", 0, []);
45081 Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);
45082 Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);
45083 Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);
45084 c$ = Clazz_p0p ();
45085 Clazz_pu$h(self.c$);
45086 c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum);
45087 Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []);
45088 Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);
45089 Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);
45090 c$ = Clazz_p0p ();
45091 c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;
45092 Clazz_defineStatics (c$,
45093 "$base", "dialog",
45094 "$nameCounter", 0);
45095 });
45096 Clazz_declarePackage ("javax.swing");
45097 c$ = Clazz_declareInterface (javax.swing, "WindowConstants");
45098 Clazz_defineStatics (c$,
45099 "DO_NOTHING_ON_CLOSE", 0,
45100 "HIDE_ON_CLOSE", 1,
45101 "DISPOSE_ON_CLOSE", 2,
45102 "EXIT_ON_CLOSE", 3);
45103 Clazz_declarePackage ("javax.swing");
45104 Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
45105 c$ = Clazz_decorateAsClass (function () {
45106 this.defaultCloseOperation = 1;
45107 this.transferHandler = null;
45108 this.rootPane = null;
45109 this.rootPaneCheckingEnabled = false;
45110 Clazz_instantialize (this, arguments);
45111 }, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
45112 Clazz_makeConstructor (c$, 
45113 function () {
45114 Clazz_superConstructor (this, javax.swing.JFrame);
45115 this.frameInit ();
45116 });
45117 Clazz_makeConstructor (c$, 
45118 function (gc) {
45119 Clazz_superConstructor (this, javax.swing.JFrame, [gc]);
45120 this.frameInit ();
45121 }, "java.awt.GraphicsConfiguration");
45122 Clazz_makeConstructor (c$, 
45123 function (title) {
45124 Clazz_superConstructor (this, javax.swing.JFrame, [title]);
45125 this.frameInit ();
45126 }, "~S");
45127 Clazz_makeConstructor (c$, 
45128 function (title, gc) {
45129 Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]);
45130 this.frameInit ();
45131 }, "~S,java.awt.GraphicsConfiguration");
45132 Clazz_defineMethod (c$, "frameInit", 
45133 function () {
45134 this.enableEvents (72);
45135 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45136 this.setRootPane (this.createRootPane ());
45137 this.setBackground (javax.swing.UIManager.getColor ("control"));
45138 this.setRootPaneCheckingEnabled (true);
45139 if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) {
45140 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
45141 if (supportsWindowDecorations) {
45142 this.setUndecorated (true);
45143 this.getRootPane ().setWindowDecorationStyle (1);
45144 }}});
45145 Clazz_defineMethod (c$, "createRootPane", 
45146 function () {
45147 var rp =  new javax.swing.JRootPane ();
45148 rp.setOpaque (true);
45149 return rp;
45150 });
45151 Clazz_defineMethod (c$, "processWindowEvent", 
45152 function (e) {
45153 Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]);
45154 if (e.getID () == 201) {
45155 switch (this.defaultCloseOperation) {
45156 case 1:
45157 this.setVisible (false);
45158 break;
45159 case 2:
45160 this.dispose ();
45161 break;
45162 case 0:
45163 default:
45164 break;
45165 case 3:
45166 System.exit (0);
45167 break;
45168 }
45169 }}, "java.awt.event.WindowEvent");
45170 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
45171 function (operation) {
45172 if (operation != 0 && operation != 1 && operation != 2 && operation != 3) {
45173 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
45174 }if (this.defaultCloseOperation != operation) {
45175 if (operation == 3) {
45176 var security = System.getSecurityManager ();
45177 if (security != null) {
45178 security.checkExit (0);
45179 }}var oldValue = this.defaultCloseOperation;
45180 this.defaultCloseOperation = operation;
45181 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
45182 }}, "~N");
45183 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
45184 function () {
45185 return this.defaultCloseOperation;
45186 });
45187 Clazz_defineMethod (c$, "setTransferHandler", 
45188 function (newHandler) {
45189 var oldHandler = this.transferHandler;
45190 this.transferHandler = newHandler;
45191 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45192 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45193 }, "javax.swing.TransferHandler");
45194 Clazz_defineMethod (c$, "getTransferHandler", 
45195 function () {
45196 return this.transferHandler;
45197 });
45198 Clazz_overrideMethod (c$, "update", 
45199 function (g) {
45200 this.paint (g);
45201 }, "java.awt.Graphics");
45202 Clazz_defineMethod (c$, "setJMenuBar", 
45203 function (menubar) {
45204 this.getRootPane ().setMenuBar (menubar);
45205 }, "javax.swing.JMenuBar");
45206 Clazz_defineMethod (c$, "getJMenuBar", 
45207 function () {
45208 return this.getRootPane ().getMenuBar ();
45209 });
45210 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45211 function () {
45212 return this.rootPaneCheckingEnabled;
45213 });
45214 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45215 function (enabled) {
45216 this.rootPaneCheckingEnabled = enabled;
45217 }, "~B");
45218 Clazz_overrideMethod (c$, "addImpl", 
45219 function (comp, constraints, index) {
45220 if (this.isRootPaneCheckingEnabled ()) {
45221 return this.getContentPane ().add (comp, constraints, index);
45222 }return this.addImplSAEM (comp, constraints, index);
45223 }, "java.awt.Component,~O,~N");
45224 Clazz_defineMethod (c$, "remove", 
45225 function (comp) {
45226 if (comp === this.rootPane) {
45227 this.removeChild (comp);
45228 } else {
45229 this.getContentPane ().removeChild (comp);
45230 }}, "java.awt.Component");
45231 Clazz_defineMethod (c$, "setLayout", 
45232 function (manager) {
45233 if (this.isRootPaneCheckingEnabled ()) {
45234 this.getContentPane ().setLayout (manager);
45235 } else {
45236 Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]);
45237 }}, "java.awt.LayoutManager");
45238 Clazz_overrideMethod (c$, "getRootPane", 
45239 function () {
45240 return this.rootPane;
45241 });
45242 Clazz_defineMethod (c$, "setRootPane", 
45243 function (root) {
45244 if (this.rootPane != null) {
45245 this.remove (this.rootPane);
45246 }this.rootPane = root;
45247 if (this.rootPane != null) {
45248 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45249 try {
45250 this.setRootPaneCheckingEnabled (false);
45251 this.add (this.rootPane, "Center");
45252 } finally {
45253 this.setRootPaneCheckingEnabled (checkingEnabled);
45254 }
45255 }}, "javax.swing.JRootPane");
45256 Clazz_overrideMethod (c$, "getContentPane", 
45257 function () {
45258 return this.getRootPane ().getContentPane ();
45259 });
45260 Clazz_overrideMethod (c$, "setContentPane", 
45261 function (contentPane) {
45262 this.getRootPane ().setContentPane (contentPane);
45263 }, "java.awt.Container");
45264 Clazz_overrideMethod (c$, "getLayeredPane", 
45265 function () {
45266 return this.getRootPane ().getLayeredPane ();
45267 });
45268 Clazz_overrideMethod (c$, "setLayeredPane", 
45269 function (layeredPane) {
45270 this.getRootPane ().setLayeredPane (layeredPane);
45271 }, "javax.swing.JLayeredPane");
45272 Clazz_overrideMethod (c$, "getGlassPane", 
45273 function () {
45274 return this.getRootPane ().getGlassPane ();
45275 });
45276 Clazz_overrideMethod (c$, "setGlassPane", 
45277 function (glassPane) {
45278 this.getRootPane ().setGlassPane (glassPane);
45279 }, "java.awt.Component");
45280 Clazz_defineMethod (c$, "getGraphics", 
45281 function () {
45282 javax.swing.JComponent.getGraphicsInvoked (this);
45283 return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []);
45284 });
45285 Clazz_defineMethod (c$, "repaint", 
45286 function (time, x, y, width, height) {
45287 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45288 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45289 } else {
45290 Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]);
45291 }}, "~N,~N,~N,~N,~N");
45292 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
45293 function (defaultLookAndFeelDecorated) {
45294 if (defaultLookAndFeelDecorated) {
45295 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
45296 } else {
45297 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
45298 }}, "~B");
45299 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
45300 function () {
45301 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey);
45302 if (defaultLookAndFeelDecorated == null) {
45303 defaultLookAndFeelDecorated = Boolean.FALSE;
45304 }return defaultLookAndFeelDecorated.booleanValue ();
45305 });
45306 Clazz_defineMethod (c$, "paramString", 
45307 function () {
45308 var defaultCloseOperationString;
45309 if (this.defaultCloseOperation == 1) {
45310 defaultCloseOperationString = "HIDE_ON_CLOSE";
45311 } else if (this.defaultCloseOperation == 2) {
45312 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
45313 } else if (this.defaultCloseOperation == 0) {
45314 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
45315 } else if (this.defaultCloseOperation == 3) {
45316 defaultCloseOperationString = "EXIT_ON_CLOSE";
45317 } else defaultCloseOperationString = "";
45318 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
45319 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45320 return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45321 });
45322 Clazz_defineStatics (c$,
45323 "EXIT_ON_CLOSE", 3);
45324 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
45325 });
45326 Clazz_declarePackage ("javax.swing");
45327 Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
45328 c$ = Clazz_decorateAsClass (function () {
45329 this.rootPane = null;
45330 this.rootPaneCheckingEnabled = false;
45331 this.transferHandler = null;
45332 Clazz_instantialize (this, arguments);
45333 }, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer);
45334 Clazz_makeConstructor (c$, 
45335 function () {
45336 this.construct (Clazz_castNullAs ("java.awt.Frame"));
45337 });
45338 Clazz_makeConstructor (c$, 
45339 function (gc) {
45340 this.construct (null, gc);
45341 Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]);
45342 }, "java.awt.GraphicsConfiguration");
45343 Clazz_makeConstructor (c$, 
45344 function (owner) {
45345 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45346 if (owner == null) {
45347 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45348 this.addWindowListener (ownerShutdownListener);
45349 }this.windowInit ();
45350 }, "java.awt.Frame");
45351 Clazz_makeConstructor (c$, 
45352 function (owner) {
45353 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45354 if (owner == null) {
45355 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45356 this.addWindowListener (ownerShutdownListener);
45357 }this.windowInit ();
45358 }, "java.awt.Window");
45359 Clazz_makeConstructor (c$, 
45360 function (owner, gc) {
45361 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]);
45362 if (owner == null) {
45363 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45364 this.addWindowListener (ownerShutdownListener);
45365 }this.windowInit ();
45366 }, "java.awt.Window,java.awt.GraphicsConfiguration");
45367 Clazz_defineMethod (c$, "windowInit", 
45368 function () {
45369 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45370 this.setRootPane (this.createRootPane ());
45371 this.setRootPaneCheckingEnabled (true);
45372 });
45373 Clazz_defineMethod (c$, "createRootPane", 
45374 function () {
45375 var rp =  new javax.swing.JRootPane ();
45376 rp.setOpaque (true);
45377 return rp;
45378 });
45379 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45380 function () {
45381 return this.rootPaneCheckingEnabled;
45382 });
45383 Clazz_defineMethod (c$, "setTransferHandler", 
45384 function (newHandler) {
45385 var oldHandler = this.transferHandler;
45386 this.transferHandler = newHandler;
45387 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45388 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45389 }, "javax.swing.TransferHandler");
45390 Clazz_defineMethod (c$, "getTransferHandler", 
45391 function () {
45392 return this.transferHandler;
45393 });
45394 Clazz_overrideMethod (c$, "update", 
45395 function (g) {
45396 this.paint (g);
45397 }, "java.awt.Graphics");
45398 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45399 function (enabled) {
45400 this.rootPaneCheckingEnabled = enabled;
45401 }, "~B");
45402 Clazz_overrideMethod (c$, "addImpl", 
45403 function (comp, constraints, index) {
45404 if (this.isRootPaneCheckingEnabled ()) {
45405 return this.getContentPane ().add (comp, constraints, index);
45406 }return this.addImplSAEM (comp, constraints, index);
45407 }, "java.awt.Component,~O,~N");
45408 Clazz_defineMethod (c$, "remove", 
45409 function (comp) {
45410 if (comp === this.rootPane) {
45411 this.removeChild (comp);
45412 } else {
45413 this.getContentPane ().removeChild (comp);
45414 }}, "java.awt.Component");
45415 Clazz_defineMethod (c$, "setLayout", 
45416 function (manager) {
45417 if (this.isRootPaneCheckingEnabled ()) {
45418 this.getContentPane ().setLayout (manager);
45419 } else {
45420 Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]);
45421 }}, "java.awt.LayoutManager");
45422 Clazz_overrideMethod (c$, "getRootPane", 
45423 function () {
45424 return this.rootPane;
45425 });
45426 Clazz_defineMethod (c$, "setRootPane", 
45427 function (root) {
45428 if (this.rootPane != null) {
45429 this.remove (this.rootPane);
45430 }this.rootPane = root;
45431 if (this.rootPane != null) {
45432 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45433 try {
45434 this.setRootPaneCheckingEnabled (false);
45435 this.add (this.rootPane, "Center");
45436 } finally {
45437 this.setRootPaneCheckingEnabled (checkingEnabled);
45438 }
45439 }}, "javax.swing.JRootPane");
45440 Clazz_overrideMethod (c$, "getContentPane", 
45441 function () {
45442 return this.getRootPane ().getContentPane ();
45443 });
45444 Clazz_overrideMethod (c$, "setContentPane", 
45445 function (contentPane) {
45446 this.getRootPane ().setContentPane (contentPane);
45447 }, "java.awt.Container");
45448 Clazz_overrideMethod (c$, "getLayeredPane", 
45449 function () {
45450 return this.getRootPane ().getLayeredPane ();
45451 });
45452 Clazz_overrideMethod (c$, "setLayeredPane", 
45453 function (layeredPane) {
45454 this.getRootPane ().setLayeredPane (layeredPane);
45455 }, "javax.swing.JLayeredPane");
45456 Clazz_overrideMethod (c$, "getGlassPane", 
45457 function () {
45458 return this.getRootPane ().getGlassPane ();
45459 });
45460 Clazz_overrideMethod (c$, "setGlassPane", 
45461 function (glassPane) {
45462 this.getRootPane ().setGlassPane (glassPane);
45463 }, "java.awt.Component");
45464 Clazz_defineMethod (c$, "getGraphics", 
45465 function () {
45466 javax.swing.JComponent.getGraphicsInvoked (this);
45467 return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []);
45468 });
45469 Clazz_defineMethod (c$, "repaint", 
45470 function (time, x, y, width, height) {
45471 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45472 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45473 } else {
45474 Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]);
45475 }}, "~N,~N,~N,~N,~N");
45476 Clazz_defineMethod (c$, "paramString", 
45477 function () {
45478 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45479 return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45480 });
45481 });
45482 Clazz_declarePackage ("javax.swing");
45483 Clazz_load (["java.util.Hashtable"], "javax.swing.KeyboardManager", ["java.lang.Thread", "java.util.Vector", "java.applet.Applet", "java.awt.Window", "javax.swing.JComponent", "$.JMenuBar", "$.KeyStroke"], function () {
45484 c$ = Clazz_decorateAsClass (function () {
45485 this.containerMap = null;
45486 this.componentKeyStrokeMap = null;
45487 if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) {
45488 javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ ();
45489 }
45490 Clazz_instantialize (this, arguments);
45491 }, javax.swing, "KeyboardManager");
45492 Clazz_prepareFields (c$, function () {
45493 this.containerMap =  new java.util.Hashtable ();
45494 this.componentKeyStrokeMap =  new java.util.Hashtable ();
45495 });
45496 c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", 
45497 function () {
45498 return javax.swing.KeyboardManager.currentManager;
45499 });
45500 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
45501 function (km) {
45502 javax.swing.KeyboardManager.currentManager = km;
45503 }, "javax.swing.KeyboardManager");
45504 Clazz_defineMethod (c$, "registerKeyStroke", 
45505 function (k, c) {
45506 var topContainer = javax.swing.KeyboardManager.getTopAncestor (c);
45507 if (topContainer == null) {
45508 return;
45509 }var keyMap = this.containerMap.get (topContainer);
45510 if (keyMap == null) {
45511 keyMap = this.registerNewTopContainer (topContainer);
45512 }var tmp = keyMap.get (k);
45513 if (tmp == null) {
45514 keyMap.put (k, c);
45515 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45516 var v = tmp;
45517 if (!v.contains (c)) {
45518 v.addElement (c);
45519 }} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45520 if (tmp !== c) {
45521 var v =  new java.util.Vector ();
45522 v.addElement (tmp);
45523 v.addElement (c);
45524 keyMap.put (k, v);
45525 }} else {
45526 System.out.println ("Unexpected condition in registerKeyStroke");
45527 Thread.dumpStack ();
45528 }this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer);
45529 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45530 c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", 
45531  function (c) {
45532 for (var p = c.getParent (); p != null; p = p.getParent ()) {
45533 if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) {
45534 return p;
45535 }}
45536 return null;
45537 }, "javax.swing.JComponent");
45538 Clazz_defineMethod (c$, "unregisterKeyStroke", 
45539 function (ks, c) {
45540 var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks);
45541 var topContainer = this.componentKeyStrokeMap.get (ckp);
45542 if (topContainer == null) {
45543 return;
45544 }var keyMap = this.containerMap.get (topContainer);
45545 if (keyMap == null) {
45546 Thread.dumpStack ();
45547 return;
45548 }var tmp = keyMap.get (ks);
45549 if (tmp == null) {
45550 Thread.dumpStack ();
45551 return;
45552 }if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) {
45553 keyMap.remove (ks);
45554 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45555 var v = tmp;
45556 v.removeElement (c);
45557 if (v.isEmpty ()) {
45558 keyMap.remove (ks);
45559 }}if (keyMap.isEmpty ()) {
45560 this.containerMap.remove (topContainer);
45561 }this.componentKeyStrokeMap.remove (ckp);
45562 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45563 Clazz_defineMethod (c$, "fireKeyboardAction", 
45564 function (e, pressed, topAncestor) {
45565 if (e.isConsumed ()) {
45566 System.out.println ("Aquired pre-used event!");
45567 Thread.dumpStack ();
45568 }var ks;
45569 if (e.getID () == 400) {
45570 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
45571 } else {
45572 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed);
45573 }var keyMap = this.containerMap.get (topAncestor);
45574 if (keyMap != null) {
45575 var tmp = keyMap.get (ks);
45576 if (tmp == null) {
45577 } else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45578 var c = tmp;
45579 if (c.isShowing () && c.isEnabled ()) {
45580 this.fireBinding (c, ks, e, pressed);
45581 }} else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45582 var v = tmp;
45583 for (var counter = v.size () - 1; counter >= 0; counter--) {
45584 var c = v.elementAt (counter);
45585 if (c.isShowing () && c.isEnabled ()) {
45586 this.fireBinding (c, ks, e, pressed);
45587 if (e.isConsumed ()) return true;
45588 }}
45589 } else {
45590 System.out.println ("Unexpected condition in fireKeyboardAction " + tmp);
45591 Thread.dumpStack ();
45592 }}if (e.isConsumed ()) {
45593 return true;
45594 }if (keyMap != null) {
45595 var v = keyMap.get (javax.swing.JMenuBar);
45596 if (v != null) {
45597 var iter = v.elements ();
45598 while (iter.hasMoreElements ()) {
45599 var mb = iter.nextElement ();
45600 if (mb.isShowing () && mb.isEnabled ()) {
45601 this.fireBinding (mb, ks, e, pressed);
45602 if (e.isConsumed ()) {
45603 return true;
45604 }}}
45605 }}return e.isConsumed ();
45606 }, "java.awt.event.KeyEvent,~B,java.awt.Container");
45607 Clazz_defineMethod (c$, "fireBinding", 
45608 function (c, ks, e, pressed) {
45609 if (c.processKeyBinding (ks, e, 2, pressed)) {
45610 e.consume ();
45611 }}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B");
45612 Clazz_defineMethod (c$, "registerMenuBar", 
45613 function (mb) {
45614 var top = javax.swing.KeyboardManager.getTopAncestor (mb);
45615 if (top == null) {
45616 return;
45617 }var keyMap = this.containerMap.get (top);
45618 if (keyMap == null) {
45619 keyMap = this.registerNewTopContainer (top);
45620 }var menuBars = keyMap.get (javax.swing.JMenuBar);
45621 if (menuBars == null) {
45622 menuBars =  new java.util.Vector ();
45623 keyMap.put (javax.swing.JMenuBar, menuBars);
45624 }if (!menuBars.contains (mb)) {
45625 menuBars.addElement (mb);
45626 }}, "javax.swing.JMenuBar");
45627 Clazz_defineMethod (c$, "unregisterMenuBar", 
45628 function (mb) {
45629 var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb);
45630 if (topContainer == null) {
45631 return;
45632 }var keyMap = this.containerMap.get (topContainer);
45633 if (keyMap != null) {
45634 var v = keyMap.get (javax.swing.JMenuBar);
45635 if (v != null) {
45636 v.removeElement (mb);
45637 if (v.isEmpty ()) {
45638 keyMap.remove (javax.swing.JMenuBar);
45639 if (keyMap.isEmpty ()) {
45640 this.containerMap.remove (topContainer);
45641 }}}}}, "javax.swing.JMenuBar");
45642 Clazz_defineMethod (c$, "registerNewTopContainer", 
45643 function (topContainer) {
45644 var keyMap =  new java.util.Hashtable ();
45645 this.containerMap.put (topContainer, keyMap);
45646 return keyMap;
45647 }, "java.awt.Container");
45648 c$.$KeyboardManager$ComponentKeyStrokePair$ = function () {
45649 Clazz_pu$h(self.c$);
45650 c$ = Clazz_decorateAsClass (function () {
45651 Clazz_prepareCallback (this, arguments);
45652 this.component = null;
45653 this.keyStroke = null;
45654 Clazz_instantialize (this, arguments);
45655 }, javax.swing.KeyboardManager, "ComponentKeyStrokePair");
45656 Clazz_makeConstructor (c$, 
45657 function (a, b) {
45658 this.component = a;
45659 this.keyStroke = b;
45660 }, "~O,~O");
45661 Clazz_defineMethod (c$, "equals", 
45662 function (a) {
45663 if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) {
45664 return false;
45665 }var b = a;
45666 return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke)));
45667 }, "~O");
45668 Clazz_defineMethod (c$, "hashCode", 
45669 function () {
45670 return this.component.hashCode () * this.keyStroke.hashCode ();
45671 });
45672 c$ = Clazz_p0p ();
45673 };
45674 c$.currentManager = c$.prototype.currentManager =  new javax.swing.KeyboardManager ();
45675 });
45676 Clazz_declarePackage ("javax.swing");
45677 Clazz_load (["javax.swing.JComponent", "$.MenuElement"], "javax.swing.JMenuBar", ["java.lang.Error", "java.util.Vector", "java.awt.Insets", "javax.swing.DefaultSingleSelectionModel", "$.JMenu", "$.JPopupMenu", "$.KeyboardManager", "$.UIManager"], function () {
45678 c$ = Clazz_decorateAsClass (function () {
45679 this.selectionModel = null;
45680 this.$paintBorder = true;
45681 this.margin = null;
45682 Clazz_instantialize (this, arguments);
45683 }, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement);
45684 Clazz_makeConstructor (c$, 
45685 function () {
45686 Clazz_superConstructor (this, javax.swing.JMenuBar);
45687 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
45688 this.updateUI ();
45689 });
45690 Clazz_overrideMethod (c$, "getUI", 
45691 function () {
45692 return this.ui;
45693 });
45694 Clazz_overrideMethod (c$, "updateUI", 
45695 function () {
45696 this.setUI (javax.swing.UIManager.getUI (this));
45697 });
45698 Clazz_overrideMethod (c$, "getUIClassID", 
45699 function () {
45700 return "MenuBarUI";
45701 });
45702 Clazz_defineMethod (c$, "getSelectionModel", 
45703 function () {
45704 return this.selectionModel;
45705 });
45706 Clazz_defineMethod (c$, "setSelectionModel", 
45707 function (model) {
45708 var oldValue = this.selectionModel;
45709 this.selectionModel = model;
45710 this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel);
45711 }, "javax.swing.SingleSelectionModel");
45712 Clazz_defineMethod (c$, "add", 
45713 function (c) {
45714 Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]);
45715 return c;
45716 }, "javax.swing.JMenu");
45717 Clazz_defineMethod (c$, "getMenu", 
45718 function (index) {
45719 var c = this.getComponentAtIndex (index);
45720 if (Clazz_instanceOf (c, javax.swing.JMenu)) return c;
45721 return null;
45722 }, "~N");
45723 Clazz_defineMethod (c$, "getMenuCount", 
45724 function () {
45725 return this.getComponentCount ();
45726 });
45727 Clazz_defineMethod (c$, "setHelpMenu", 
45728 function (menu) {
45729 throw  new Error ("setHelpMenu() not yet implemented.");
45730 }, "javax.swing.JMenu");
45731 Clazz_defineMethod (c$, "getHelpMenu", 
45732 function () {
45733 throw  new Error ("getHelpMenu() not yet implemented.");
45734 });
45735 Clazz_defineMethod (c$, "getComponentAtIndex", 
45736 function (i) {
45737 if (i < 0 || i >= this.getComponentCount ()) {
45738 return null;
45739 }return this.getComponent (i);
45740 }, "~N");
45741 Clazz_defineMethod (c$, "getComponentIndex", 
45742 function (c) {
45743 var ncomponents = this.getComponentCount ();
45744 var component = this.getComponents ();
45745 for (var i = 0; i < ncomponents; i++) {
45746 var comp = component[i];
45747 if (comp === c) return i;
45748 }
45749 return -1;
45750 }, "java.awt.Component");
45751 Clazz_defineMethod (c$, "setSelected", 
45752 function (sel) {
45753 var model = this.getSelectionModel ();
45754 var index = this.getComponentIndex (sel);
45755 model.setSelectedIndex (index);
45756 }, "java.awt.Component");
45757 Clazz_defineMethod (c$, "isSelected", 
45758 function () {
45759 return this.selectionModel.isSelected ();
45760 });
45761 Clazz_defineMethod (c$, "isBorderPainted", 
45762 function () {
45763 return this.$paintBorder;
45764 });
45765 Clazz_defineMethod (c$, "setBorderPainted", 
45766 function (b) {
45767 var oldValue = this.$paintBorder;
45768 this.$paintBorder = b;
45769 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
45770 if (b != oldValue) {
45771 this.revalidate ();
45772 this.repaint ();
45773 }}, "~B");
45774 Clazz_defineMethod (c$, "paintBorder", 
45775 function (g) {
45776 if (this.isBorderPainted ()) {
45777 Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]);
45778 }}, "java.awt.Graphics");
45779 Clazz_defineMethod (c$, "setMargin", 
45780 function (m) {
45781 var old = this.margin;
45782 this.margin = m;
45783 this.firePropertyChangeObject ("margin", old, m);
45784 if (old == null || !old.equals (m)) {
45785 this.revalidate ();
45786 this.repaint ();
45787 }}, "java.awt.Insets");
45788 Clazz_defineMethod (c$, "getMargin", 
45789 function () {
45790 if (this.margin == null) {
45791 return  new java.awt.Insets (0, 0, 0, 0);
45792 } else {
45793 return this.margin;
45794 }});
45795 Clazz_defineMethod (c$, "processMouseEvent", 
45796 function (event, path, manager) {
45797 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
45798 Clazz_defineMethod (c$, "processKeyEvent", 
45799 function (e, path, manager) {
45800 }, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
45801 Clazz_overrideMethod (c$, "menuSelectionChanged", 
45802 function (isIncluded) {
45803 }, "~B");
45804 Clazz_defineMethod (c$, "getSubElements", 
45805 function () {
45806 var result;
45807 var tmp =  new java.util.Vector ();
45808 var c = this.getComponentCount ();
45809 var i;
45810 var m;
45811 for (i = 0; i < c; i++) {
45812 m = this.getComponent (i);
45813 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
45814 }
45815 result =  new Array (tmp.size ());
45816 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
45817
45818 return result;
45819 });
45820 Clazz_defineMethod (c$, "getComponent", 
45821 function () {
45822 return this;
45823 });
45824 Clazz_defineMethod (c$, "paramString", 
45825 function () {
45826 var paintBorderString = (this.$paintBorder ? "true" : "false");
45827 var marginString = (this.margin != null ? this.margin.toString () : "");
45828 return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
45829 });
45830 Clazz_defineMethod (c$, "processKeyBinding", 
45831 function (ks, e, condition, pressed) {
45832 var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]);
45833 if (!retValue) {
45834 var subElements = this.getSubElements ();
45835 for (var i = 0; i < subElements.length; i++) {
45836 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45837 return true;
45838 }}
45839 }return retValue;
45840 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45841 c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", 
45842 function (elem, ks, e, condition, pressed) {
45843 if (elem == null) {
45844 return false;
45845 }var c = elem.getComponent ();
45846 if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) {
45847 return false;
45848 }if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) {
45849 return true;
45850 }var subElements = elem.getSubElements ();
45851 for (var i = 0; i < subElements.length; i++) {
45852 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45853 return true;
45854 }}
45855 return false;
45856 }, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45857 Clazz_defineMethod (c$, "addNotify", 
45858 function () {
45859 Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []);
45860 javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this);
45861 });
45862 Clazz_defineMethod (c$, "removeNotify", 
45863 function () {
45864 Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []);
45865 javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this);
45866 });
45867 Clazz_defineStatics (c$,
45868 "$uiClassID", "MenuBarUI");
45869 });
45870 Clazz_declarePackage ("javax.swing");
45871 Clazz_declareInterface (javax.swing, "MenuElement");
45872 Clazz_declarePackage ("javax.swing");
45873 Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
45874 c$ = Clazz_decorateAsClass (function () {
45875 this.changeEvent = null;
45876 this.listenerList = null;
45877 this.index = -1;
45878 Clazz_instantialize (this, arguments);
45879 }, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel);
45880 Clazz_prepareFields (c$, function () {
45881 this.listenerList =  new javax.swing.event.EventListenerList ();
45882 });
45883 Clazz_overrideMethod (c$, "getSelectedIndex", 
45884 function () {
45885 return this.index;
45886 });
45887 Clazz_overrideMethod (c$, "setSelectedIndex", 
45888 function (index) {
45889 if (this.index != index) {
45890 this.index = index;
45891 this.fireStateChanged ();
45892 }}, "~N");
45893 Clazz_overrideMethod (c$, "clearSelection", 
45894 function () {
45895 this.setSelectedIndex (-1);
45896 });
45897 Clazz_overrideMethod (c$, "isSelected", 
45898 function () {
45899 var ret = false;
45900 if (this.getSelectedIndex () != -1) {
45901 ret = true;
45902 }return ret;
45903 });
45904 Clazz_overrideMethod (c$, "addChangeListener", 
45905 function (l) {
45906 this.listenerList.add (javax.swing.event.ChangeListener, l);
45907 }, "javax.swing.event.ChangeListener");
45908 Clazz_overrideMethod (c$, "removeChangeListener", 
45909 function (l) {
45910 this.listenerList.remove (javax.swing.event.ChangeListener, l);
45911 }, "javax.swing.event.ChangeListener");
45912 Clazz_defineMethod (c$, "getChangeListeners", 
45913 function () {
45914 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
45915 });
45916 Clazz_defineMethod (c$, "fireStateChanged", 
45917 function () {
45918 var listeners = this.listenerList.getListenerList ();
45919 for (var i = listeners.length - 2; i >= 0; i -= 2) {
45920 if (listeners[i] === javax.swing.event.ChangeListener) {
45921 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
45922 (listeners[i + 1]).stateChanged (this.changeEvent);
45923 }}
45924 });
45925 Clazz_defineMethod (c$, "getListeners", 
45926 function (listenerType) {
45927 return this.listenerList.getListeners (listenerType);
45928 }, "Class");
45929 });
45930 Clazz_declarePackage ("javax.swing");
45931 Clazz_declareInterface (javax.swing, "SingleSelectionModel");
45932 Clazz_declarePackage ("javax.swing");
45933 Clazz_load (["java.awt.event.WindowAdapter", "javax.swing.JMenuItem", "$.MenuElement", "javax.swing.event.ChangeListener"], "javax.swing.JMenu", ["java.lang.Error", "$.IllegalArgumentException", "java.util.Vector", "java.awt.Point", "$.Rectangle", "$.Toolkit", "javax.swing.JMenuBar", "$.JPopupMenu", "$.MenuSelectionManager", "$.SwingUtilities", "$.UIManager", "javax.swing.event.MenuEvent", "$.MenuListener"], function () {
45934 c$ = Clazz_decorateAsClass (function () {
45935 this.$popupMenu = null;
45936 this.menuChangeListener = null;
45937 this.menuEvent = null;
45938 this.delay = 0;
45939 this.customMenuLocation = null;
45940 this.popupListener = null;
45941 if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) {
45942 javax.swing.JMenu.$JMenu$MenuChangeListener$ ();
45943 }
45944 if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) {
45945 javax.swing.JMenu.$JMenu$WinListener$ ();
45946 }
45947 Clazz_instantialize (this, arguments);
45948 }, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement);
45949 Clazz_makeConstructor (c$, 
45950 function () {
45951 Clazz_superConstructor (this, javax.swing.JMenu, []);
45952 this.init0 ("", null, -2147483648);
45953 });
45954 Clazz_makeConstructor (c$, 
45955 function (s) {
45956 Clazz_superConstructor (this, javax.swing.JMenu, []);
45957 this.init0 (s, null, -2147483648);
45958 }, "~S");
45959 Clazz_makeConstructor (c$, 
45960 function (a) {
45961 Clazz_superConstructor (this, javax.swing.JMenu, []);
45962 this.init0 ("", null, -2147483648);
45963 this.setAction (a);
45964 }, "javax.swing.Action");
45965 Clazz_makeConstructor (c$, 
45966 function (s, b) {
45967 Clazz_superConstructor (this, javax.swing.JMenu, []);
45968 this.init0 (s, null, -2147483648);
45969 }, "~S,~B");
45970 Clazz_overrideMethod (c$, "initFocusability", 
45971 function () {
45972 });
45973 Clazz_overrideMethod (c$, "updateUI", 
45974 function () {
45975 this.setUI (javax.swing.UIManager.getUI (this));
45976 if (this.$popupMenu != null) {
45977 this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu));
45978 }});
45979 Clazz_overrideMethod (c$, "getUIClassID", 
45980 function () {
45981 return "MenuUI";
45982 });
45983 Clazz_defineMethod (c$, "setModel", 
45984 function (newModel) {
45985 var oldModel = this.getModel ();
45986 Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]);
45987 if (oldModel != null && this.menuChangeListener != null) {
45988 oldModel.removeChangeListener (this.menuChangeListener);
45989 this.menuChangeListener = null;
45990 }this.model = newModel;
45991 if (newModel != null) {
45992 this.menuChangeListener = this.createMenuChangeListener ();
45993 newModel.addChangeListener (this.menuChangeListener);
45994 }}, "javax.swing.ButtonModel");
45995 Clazz_overrideMethod (c$, "isSelected", 
45996 function () {
45997 return this.getModel ().isSelected ();
45998 });
45999 Clazz_overrideMethod (c$, "setSelected", 
46000 function (b) {
46001 var model = this.getModel ();
46002 if (b != model.isSelected ()) {
46003 this.getModel ().setSelected (b);
46004 }}, "~B");
46005 Clazz_defineMethod (c$, "isPopupMenuVisible", 
46006 function () {
46007 this.ensurePopupMenuCreated ();
46008 return this.$popupMenu.isVisible ();
46009 });
46010 Clazz_defineMethod (c$, "setPopupMenuVisible", 
46011 function (b) {
46012 var isVisible = this.isPopupMenuVisible ();
46013 if (b != isVisible && (this.isEnabled () || !b)) {
46014 this.ensurePopupMenuCreated ();
46015 if ((b == true) && this.isShowing ()) {
46016 var p = this.getCustomMenuLocation ();
46017 if (p == null) {
46018 p = this.getPopupMenuOrigin ();
46019 }this.getPopupMenu ().show (this, p.x, p.y);
46020 } else {
46021 this.getPopupMenu ().setVisible (false);
46022 }}}, "~B");
46023 Clazz_defineMethod (c$, "getPopupMenuOrigin", 
46024 function () {
46025 var x = 0;
46026 var y = 0;
46027 var pm = this.getPopupMenu ();
46028 var s = this.getSize ();
46029 var pmSize = pm.getSize ();
46030 if (pmSize.width == 0) {
46031 pmSize = pm.getPreferredSize ();
46032 }var position = this.getLocationOnScreen ();
46033 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
46034 var gc = this.getGraphicsConfiguration ();
46035 var screenBounds =  new java.awt.Rectangle (toolkit.getScreenSize ());
46036 if (gc != null) {
46037 screenBounds = gc.getBounds ();
46038 var screenInsets = toolkit.getScreenInsets (gc);
46039 screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right);
46040 screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom);
46041 position.x -= Math.abs (screenInsets.left);
46042 position.y -= Math.abs (screenInsets.top);
46043 }var parent = this.getParent ();
46044 if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) {
46045 var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX");
46046 var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY");
46047 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46048 x = s.width + xOffset;
46049 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46050 x = 0 - xOffset - pmSize.width;
46051 }} else {
46052 x = 0 - xOffset - pmSize.width;
46053 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46054 x = s.width + xOffset;
46055 }}y = yOffset;
46056 if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46057 y = s.height - yOffset - pmSize.height;
46058 }} else {
46059 var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX");
46060 var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY");
46061 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46062 x = xOffset;
46063 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46064 x = s.width - xOffset - pmSize.width;
46065 }} else {
46066 x = s.width - xOffset - pmSize.width;
46067 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46068 x = xOffset;
46069 }}y = s.height + yOffset;
46070 if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46071 y = 0 - yOffset - pmSize.height;
46072 }}return  new java.awt.Point (x, y);
46073 });
46074 Clazz_defineMethod (c$, "getDelay", 
46075 function () {
46076 return this.delay;
46077 });
46078 Clazz_defineMethod (c$, "setDelay", 
46079 function (d) {
46080 if (d < 0) throw  new IllegalArgumentException ("Delay must be a positive integer");
46081 this.delay = d;
46082 }, "~N");
46083 Clazz_defineMethod (c$, "ensurePopupMenuCreated", 
46084  function () {
46085 if (this.$popupMenu == null) {
46086 this.$popupMenu =  new javax.swing.JPopupMenu ();
46087 this.$popupMenu.setInvoker (this);
46088 this.popupListener = this.createWinListener (this.$popupMenu);
46089 }});
46090 Clazz_defineMethod (c$, "getCustomMenuLocation", 
46091  function () {
46092 return this.customMenuLocation;
46093 });
46094 Clazz_defineMethod (c$, "setMenuLocation", 
46095 function (x, y) {
46096 this.customMenuLocation =  new java.awt.Point (x, y);
46097 if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y);
46098 }, "~N,~N");
46099 Clazz_defineMethod (c$, "add", 
46100 function (menuItem) {
46101 this.ensurePopupMenuCreated ();
46102 return this.$popupMenu.add (menuItem);
46103 }, "javax.swing.JMenuItem");
46104 Clazz_defineMethod (c$, "add", 
46105 function (c) {
46106 this.ensurePopupMenuCreated ();
46107 this.$popupMenu.add (c);
46108 return c;
46109 }, "java.awt.Component");
46110 Clazz_defineMethod (c$, "add", 
46111 function (c, index) {
46112 this.ensurePopupMenuCreated ();
46113 this.$popupMenu.add (c, index);
46114 return c;
46115 }, "java.awt.Component,~N");
46116 Clazz_defineMethod (c$, "add", 
46117 function (s) {
46118 return this.add ( new javax.swing.JMenuItem (s));
46119 }, "~S");
46120 Clazz_defineMethod (c$, "add", 
46121 function (a) {
46122 var mi = this.createActionComponent (a);
46123 mi.setAction (a);
46124 this.add (mi);
46125 return mi;
46126 }, "javax.swing.Action");
46127 Clazz_defineMethod (c$, "createActionComponent", 
46128 function (a) {
46129 var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null));
46130 mi.setHorizontalTextPosition (11);
46131 mi.setVerticalTextPosition (0);
46132 return mi;
46133 }, "javax.swing.Action");
46134 Clazz_defineMethod (c$, "createActionChangeListener", 
46135 function (b) {
46136 return b.createActionPropertyChangeListener0 (b.getAction ());
46137 }, "javax.swing.JMenuItem");
46138 Clazz_defineMethod (c$, "addSeparator", 
46139 function () {
46140 this.ensurePopupMenuCreated ();
46141 this.$popupMenu.addSeparator ();
46142 });
46143 Clazz_defineMethod (c$, "insert", 
46144 function (s, pos) {
46145 if (pos < 0) {
46146 throw  new IllegalArgumentException ("index less than zero.");
46147 }this.ensurePopupMenuCreated ();
46148 this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos);
46149 }, "~S,~N");
46150 Clazz_defineMethod (c$, "insert", 
46151 function (mi, pos) {
46152 if (pos < 0) {
46153 throw  new IllegalArgumentException ("index less than zero.");
46154 }this.ensurePopupMenuCreated ();
46155 this.$popupMenu.insert (mi, pos);
46156 return mi;
46157 }, "javax.swing.JMenuItem,~N");
46158 Clazz_defineMethod (c$, "insert", 
46159 function (a, pos) {
46160 if (pos < 0) {
46161 throw  new IllegalArgumentException ("index less than zero.");
46162 }this.ensurePopupMenuCreated ();
46163 var mi =  new javax.swing.JMenuItem (a);
46164 mi.setHorizontalTextPosition (11);
46165 mi.setVerticalTextPosition (0);
46166 this.$popupMenu.insert (mi, pos);
46167 return mi;
46168 }, "javax.swing.Action,~N");
46169 Clazz_defineMethod (c$, "insertSeparator", 
46170 function (index) {
46171 if (index < 0) {
46172 throw  new IllegalArgumentException ("index less than zero.");
46173 }this.ensurePopupMenuCreated ();
46174 this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index);
46175 }, "~N");
46176 Clazz_defineMethod (c$, "getItem", 
46177 function (pos) {
46178 if (pos < 0) {
46179 throw  new IllegalArgumentException ("index less than zero.");
46180 }var c = this.getMenuComponent (pos);
46181 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) {
46182 var mi = c;
46183 return mi;
46184 }return null;
46185 }, "~N");
46186 Clazz_defineMethod (c$, "getItemCount", 
46187 function () {
46188 return this.getMenuComponentCount ();
46189 });
46190 Clazz_defineMethod (c$, "isTearOff", 
46191 function () {
46192 throw  new Error ("boolean isTearOff() {} not yet implemented");
46193 });
46194 Clazz_defineMethod (c$, "remove", 
46195 function (pos) {
46196 if (pos < 0) {
46197 throw  new IllegalArgumentException ("index less than zero.");
46198 }if (pos > this.getItemCount ()) {
46199 throw  new IllegalArgumentException ("index greater than the number of items.");
46200 }if (this.$popupMenu != null) this.$popupMenu.remove (pos);
46201 }, "~N");
46202 Clazz_defineMethod (c$, "remove", 
46203 function (c) {
46204 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c);
46205 if (this.$popupMenu != null) this.$popupMenu.remove (c);
46206 }, "java.awt.Component");
46207 Clazz_defineMethod (c$, "removeAll", 
46208 function () {
46209 if (this.$popupMenu != null) this.$popupMenu.removeAll ();
46210 });
46211 Clazz_defineMethod (c$, "getMenuComponentCount", 
46212 function () {
46213 var componentCount = 0;
46214 if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount ();
46215 return componentCount;
46216 });
46217 Clazz_defineMethod (c$, "getMenuComponent", 
46218 function (n) {
46219 if (this.$popupMenu != null) return this.$popupMenu.getComponent (n);
46220 return null;
46221 }, "~N");
46222 Clazz_defineMethod (c$, "getMenuComponents", 
46223 function () {
46224 if (this.$popupMenu != null) return this.$popupMenu.getComponents ();
46225 return  new Array (0);
46226 });
46227 Clazz_defineMethod (c$, "isTopLevelMenu", 
46228 function () {
46229 if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true;
46230 return false;
46231 });
46232 Clazz_defineMethod (c$, "isMenuComponent", 
46233 function (c) {
46234 if (c === this) return true;
46235 if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) {
46236 var comp = c;
46237 if (comp === this.getPopupMenu ()) return true;
46238 }var ncomponents = this.getMenuComponentCount ();
46239 var component = this.getMenuComponents ();
46240 for (var i = 0; i < ncomponents; i++) {
46241 var comp = component[i];
46242 if (comp === c) return true;
46243 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
46244 var subMenu = comp;
46245 if (subMenu.isMenuComponent (c)) return true;
46246 }}
46247 return false;
46248 }, "java.awt.Component");
46249 Clazz_defineMethod (c$, "getPopupMenu", 
46250 function () {
46251 this.ensurePopupMenuCreated ();
46252 return this.$popupMenu;
46253 });
46254 Clazz_defineMethod (c$, "addMenuListener", 
46255 function (l) {
46256 this.listenerList.add (javax.swing.event.MenuListener, l);
46257 }, "javax.swing.event.MenuListener");
46258 Clazz_defineMethod (c$, "removeMenuListener", 
46259 function (l) {
46260 this.listenerList.remove (javax.swing.event.MenuListener, l);
46261 }, "javax.swing.event.MenuListener");
46262 Clazz_defineMethod (c$, "getMenuListeners", 
46263 function () {
46264 return this.listenerList.getListeners (javax.swing.event.MenuListener);
46265 });
46266 Clazz_defineMethod (c$, "fireMenuSelected", 
46267 function () {
46268 var listeners = this.listenerList.getListenerList ();
46269 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46270 if (listeners[i] === javax.swing.event.MenuListener) {
46271 if (listeners[i + 1] == null) {
46272 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46273 } else {
46274 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46275 (listeners[i + 1]).menuSelected (this.menuEvent);
46276 }}}
46277 });
46278 Clazz_defineMethod (c$, "fireMenuDeselected", 
46279 function () {
46280 var listeners = this.listenerList.getListenerList ();
46281 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46282 if (listeners[i] === javax.swing.event.MenuListener) {
46283 if (listeners[i + 1] == null) {
46284 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46285 } else {
46286 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46287 (listeners[i + 1]).menuDeselected (this.menuEvent);
46288 }}}
46289 });
46290 Clazz_defineMethod (c$, "fireMenuCanceled", 
46291 function () {
46292 var listeners = this.listenerList.getListenerList ();
46293 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46294 if (listeners[i] === javax.swing.event.MenuListener) {
46295 if (listeners[i + 1] == null) {
46296 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46297 } else {
46298 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46299 (listeners[i + 1]).menuCanceled (this.menuEvent);
46300 }}}
46301 });
46302 Clazz_overrideMethod (c$, "configureAcceleratorFromAction", 
46303 function (a) {
46304 }, "javax.swing.Action");
46305 Clazz_defineMethod (c$, "createMenuChangeListener", 
46306  function () {
46307 return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null);
46308 });
46309 Clazz_defineMethod (c$, "createWinListener", 
46310 function (p) {
46311 return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p);
46312 }, "javax.swing.JPopupMenu");
46313 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46314 function (isIncluded) {
46315 this.setSelected (isIncluded);
46316 }, "~B");
46317 Clazz_overrideMethod (c$, "getSubElements", 
46318 function () {
46319 if (this.$popupMenu == null) return  new Array (0);
46320  else {
46321 var result =  new Array (1);
46322 result[0] = this.$popupMenu;
46323 return result;
46324 }});
46325 Clazz_defineMethod (c$, "getComponent", 
46326 function () {
46327 return this;
46328 });
46329 Clazz_defineMethod (c$, "applyComponentOrientation", 
46330 function (o) {
46331 Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]);
46332 if (this.$popupMenu != null) {
46333 var ncomponents = this.getMenuComponentCount ();
46334 for (var i = 0; i < ncomponents; ++i) {
46335 this.getMenuComponent (i).applyComponentOrientation (o);
46336 }
46337 this.$popupMenu.setComponentOrientation (o);
46338 }}, "java.awt.ComponentOrientation");
46339 Clazz_defineMethod (c$, "setComponentOrientation", 
46340 function (o) {
46341 Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]);
46342 if (this.$popupMenu != null) {
46343 this.$popupMenu.setComponentOrientation (o);
46344 }}, "java.awt.ComponentOrientation");
46345 Clazz_overrideMethod (c$, "setAccelerator", 
46346 function (keyStroke) {
46347 throw  new Error ("setAccelerator() is not defined for JMenu.  Use setMnemonic() instead.");
46348 }, "javax.swing.KeyStroke");
46349 Clazz_defineMethod (c$, "processKeyEvent", 
46350 function (evt) {
46351 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46352 if (evt.isConsumed ()) return;
46353 Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]);
46354 }, "java.awt.event.KeyEvent");
46355 Clazz_defineMethod (c$, "doClick", 
46356 function (pressTime) {
46357 var me = this.buildMenuElementArray (this);
46358 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
46359 }, "~N");
46360 Clazz_defineMethod (c$, "buildMenuElementArray", 
46361  function (leaf) {
46362 var elements =  new java.util.Vector ();
46363 var current = leaf.getPopupMenu ();
46364 var pop;
46365 var menu;
46366 var bar;
46367 while (true) {
46368 if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) {
46369 pop = current;
46370 elements.insertElementAt (pop, 0);
46371 current = pop.getInvoker ();
46372 } else if (Clazz_instanceOf (current, javax.swing.JMenu)) {
46373 menu = current;
46374 elements.insertElementAt (menu, 0);
46375 current = menu.getParent ();
46376 } else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) {
46377 bar = current;
46378 elements.insertElementAt (bar, 0);
46379 var me =  new Array (elements.size ());
46380 elements.copyInto (me);
46381 return me;
46382 }}
46383 }, "javax.swing.JMenu");
46384 c$.$JMenu$MenuChangeListener$ = function () {
46385 Clazz_pu$h(self.c$);
46386 c$ = Clazz_decorateAsClass (function () {
46387 Clazz_prepareCallback (this, arguments);
46388 this.isSelected = false;
46389 Clazz_instantialize (this, arguments);
46390 }, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener);
46391 Clazz_overrideMethod (c$, "stateChanged", 
46392 function (a) {
46393 var b = a.getSource ();
46394 var c = b.isSelected ();
46395 if (c != this.isSelected) {
46396 if (c == true) {
46397 this.b$["javax.swing.JMenu"].fireMenuSelected ();
46398 } else {
46399 this.b$["javax.swing.JMenu"].fireMenuDeselected ();
46400 }this.isSelected = c;
46401 }}, "javax.swing.event.ChangeEvent");
46402 c$ = Clazz_p0p ();
46403 };
46404 c$.$JMenu$WinListener$ = function () {
46405 Clazz_pu$h(self.c$);
46406 c$ = Clazz_decorateAsClass (function () {
46407 Clazz_prepareCallback (this, arguments);
46408 this.popupMenu = null;
46409 Clazz_instantialize (this, arguments);
46410 }, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter);
46411 Clazz_makeConstructor (c$, 
46412 function (a) {
46413 Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []);
46414 this.popupMenu = a;
46415 }, "javax.swing.JPopupMenu");
46416 Clazz_overrideMethod (c$, "windowClosing", 
46417 function (a) {
46418 this.b$["javax.swing.JMenu"].setSelected (false);
46419 }, "java.awt.event.WindowEvent");
46420 c$ = Clazz_p0p ();
46421 };
46422 c$.$JMenu$1$ = function () {
46423 Clazz_pu$h(self.c$);
46424 c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem);
46425 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
46426 function (a) {
46427 var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this);
46428 if (pcl == null) {
46429 pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]);
46430 }return pcl;
46431 }, "javax.swing.Action");
46432 c$ = Clazz_p0p ();
46433 };
46434 Clazz_defineStatics (c$,
46435 "$$uiClassID", "MenuUI");
46436 });
46437 Clazz_declarePackage ("java.awt.event");
46438 Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () {
46439 c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]);
46440 Clazz_overrideMethod (c$, "windowOpened", 
46441 function (e) {
46442 }, "java.awt.event.WindowEvent");
46443 Clazz_overrideMethod (c$, "windowClosing", 
46444 function (e) {
46445 }, "java.awt.event.WindowEvent");
46446 Clazz_overrideMethod (c$, "windowClosed", 
46447 function (e) {
46448 }, "java.awt.event.WindowEvent");
46449 Clazz_overrideMethod (c$, "windowIconified", 
46450 function (e) {
46451 }, "java.awt.event.WindowEvent");
46452 Clazz_overrideMethod (c$, "windowDeiconified", 
46453 function (e) {
46454 }, "java.awt.event.WindowEvent");
46455 Clazz_overrideMethod (c$, "windowActivated", 
46456 function (e) {
46457 }, "java.awt.event.WindowEvent");
46458 Clazz_overrideMethod (c$, "windowDeactivated", 
46459 function (e) {
46460 }, "java.awt.event.WindowEvent");
46461 Clazz_overrideMethod (c$, "windowStateChanged", 
46462 function (e) {
46463 }, "java.awt.event.WindowEvent");
46464 Clazz_overrideMethod (c$, "windowGainedFocus", 
46465 function (e) {
46466 }, "java.awt.event.WindowEvent");
46467 Clazz_overrideMethod (c$, "windowLostFocus", 
46468 function (e) {
46469 }, "java.awt.event.WindowEvent");
46470 });
46471 Clazz_declarePackage ("javax.swing");
46472 Clazz_load (["java.awt.event.FocusListener", "javax.swing.AbstractButton", "$.MenuElement"], "javax.swing.JMenuItem", ["java.lang.Boolean", "javax.swing.DefaultButtonModel", "$.UIManager", "javax.swing.event.MenuDragMouseEvent", "$.MenuDragMouseListener", "$.MenuKeyEvent", "$.MenuKeyListener"], function () {
46473 c$ = Clazz_decorateAsClass (function () {
46474 this.isMouseDragged = false;
46475 this.accelerator = null;
46476 Clazz_instantialize (this, arguments);
46477 }, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement);
46478 Clazz_makeConstructor (c$, 
46479 function () {
46480 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46481 this.init0 (null, null, -2147483648);
46482 });
46483 Clazz_makeConstructor (c$, 
46484 function (icon) {
46485 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46486 this.init0 (null, icon, -2147483648);
46487 }, "javax.swing.Icon");
46488 Clazz_makeConstructor (c$, 
46489 function (text) {
46490 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46491 this.init0 (text, null, -2147483648);
46492 }, "~S");
46493 Clazz_makeConstructor (c$, 
46494 function (a) {
46495 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46496 this.init0 (null, null, -2147483648);
46497 this.setAction (a);
46498 }, "javax.swing.Action");
46499 Clazz_makeConstructor (c$, 
46500 function (text, icon) {
46501 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46502 this.init0 (text, icon, -2147483648);
46503 }, "~S,javax.swing.Icon");
46504 Clazz_makeConstructor (c$, 
46505 function (text, mnemonic) {
46506 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46507 this.init0 (text, null, mnemonic);
46508 }, "~S,~N");
46509 Clazz_defineMethod (c$, "setModel", 
46510 function (newModel) {
46511 Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]);
46512 if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) {
46513 (newModel).setMenuItem (true);
46514 }}, "javax.swing.ButtonModel");
46515 Clazz_defineMethod (c$, "initFocusability", 
46516 function () {
46517 this.setFocusable (false);
46518 });
46519 Clazz_defineMethod (c$, "init0", 
46520 function (text, icon, mnemonic) {
46521 this.setModel ( new javax.swing.DefaultButtonModel ());
46522 this.init (text, icon);
46523 if (mnemonic >= 0) this.setMnemonic (mnemonic);
46524 this.initFocusability ();
46525 }, "~S,javax.swing.Icon,~N");
46526 Clazz_overrideMethod (c$, "init", 
46527 function (text, icon) {
46528 this.updateUI ();
46529 if (text != null) this.setText (text);
46530 if (icon != null) this.setIcon (icon);
46531 this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ());
46532 this.setUIProperty ("borderPainted", Boolean.FALSE);
46533 this.setFocusPainted (false);
46534 this.setHorizontalTextPosition (11);
46535 this.setHorizontalAlignment (10);
46536 }, "~S,javax.swing.Icon");
46537 Clazz_overrideMethod (c$, "updateUI", 
46538 function () {
46539 this.setUI (javax.swing.UIManager.getUI (this));
46540 });
46541 Clazz_overrideMethod (c$, "getUIClassID", 
46542 function () {
46543 return "MenuItemUI";
46544 });
46545 Clazz_defineMethod (c$, "setArmed", 
46546 function (b) {
46547 var model = this.getModel ();
46548 if (model.isArmed () != b) {
46549 model.setArmed (b);
46550 }}, "~B");
46551 Clazz_defineMethod (c$, "isArmed", 
46552 function () {
46553 var model = this.getModel ();
46554 return model.isArmed ();
46555 });
46556 Clazz_defineMethod (c$, "setEnabled", 
46557 function (b) {
46558 if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
46559 this.setArmed (false);
46560 }Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]);
46561 }, "~B");
46562 Clazz_overrideMethod (c$, "alwaysOnTop", 
46563 function () {
46564 return true;
46565 });
46566 Clazz_defineMethod (c$, "setAccelerator", 
46567 function (keyStroke) {
46568 var oldAccelerator = this.accelerator;
46569 this.accelerator = keyStroke;
46570 this.repaint ();
46571 this.revalidate ();
46572 this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator);
46573 }, "javax.swing.KeyStroke");
46574 Clazz_defineMethod (c$, "getAccelerator", 
46575 function () {
46576 return this.accelerator;
46577 });
46578 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
46579 function (a) {
46580 Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]);
46581 this.configureAcceleratorFromAction (a);
46582 }, "javax.swing.Action");
46583 Clazz_overrideMethod (c$, "setIconFromAction", 
46584 function (a) {
46585 var icon = null;
46586 if (a != null) {
46587 icon = a.getValue ("SmallIcon");
46588 }this.setIcon (icon);
46589 }, "javax.swing.Action");
46590 Clazz_overrideMethod (c$, "largeIconChanged", 
46591 function (a) {
46592 }, "javax.swing.Action");
46593 Clazz_overrideMethod (c$, "smallIconChanged", 
46594 function (a) {
46595 this.setIconFromAction (a);
46596 }, "javax.swing.Action");
46597 Clazz_defineMethod (c$, "configureAcceleratorFromAction", 
46598 function (a) {
46599 var ks = (a == null) ? null : a.getValue ("AcceleratorKey");
46600 this.setAccelerator (ks);
46601 }, "javax.swing.Action");
46602 Clazz_defineMethod (c$, "actionPropertyChanged", 
46603 function (action, propertyName) {
46604 if (propertyName === "AcceleratorKey") {
46605 this.configureAcceleratorFromAction (action);
46606 } else {
46607 Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]);
46608 }}, "javax.swing.Action,~S");
46609 Clazz_defineMethod (c$, "processMouseEvent", 
46610 function (e, path, manager) {
46611 this.processMenuDragMouseEvent ( new javax.swing.event.MenuDragMouseEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getX (), e.getY (), e.getXOnScreen (), e.getYOnScreen (), e.getClickCount (), e.isPopupTrigger (), path, manager));
46612 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
46613 Clazz_defineMethod (c$, "processKeyEvent", 
46614 function (e, path, manager) {
46615 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
46616 this.processMenuKeyEvent (mke);
46617 if (mke.isConsumed ()) {
46618 e.consume ();
46619 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
46620 Clazz_defineMethod (c$, "processMenuDragMouseEvent", 
46621 function (e) {
46622 switch (e.getID ()) {
46623 case 504:
46624 this.isMouseDragged = false;
46625 this.fireMenuDragMouseEntered (e);
46626 break;
46627 case 505:
46628 this.isMouseDragged = false;
46629 this.fireMenuDragMouseExited (e);
46630 break;
46631 case 506:
46632 this.isMouseDragged = true;
46633 this.fireMenuDragMouseDragged (e);
46634 break;
46635 case 502:
46636 if (this.isMouseDragged) this.fireMenuDragMouseReleased (e);
46637 break;
46638 default:
46639 break;
46640 }
46641 }, "javax.swing.event.MenuDragMouseEvent");
46642 Clazz_defineMethod (c$, "processMenuKeyEvent", 
46643 function (e) {
46644 switch (e.getID ()) {
46645 case 401:
46646 this.fireMenuKeyPressed (e);
46647 break;
46648 case 402:
46649 this.fireMenuKeyReleased (e);
46650 break;
46651 case 400:
46652 this.fireMenuKeyTyped (e);
46653 break;
46654 default:
46655 break;
46656 }
46657 }, "javax.swing.event.MenuKeyEvent");
46658 Clazz_defineMethod (c$, "fireMenuDragMouseEntered", 
46659 function (event) {
46660 var listeners = this.listenerList.getListenerList ();
46661 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46662 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46663 (listeners[i + 1]).menuDragMouseEntered (event);
46664 }}
46665 }, "javax.swing.event.MenuDragMouseEvent");
46666 Clazz_defineMethod (c$, "fireMenuDragMouseExited", 
46667 function (event) {
46668 var listeners = this.listenerList.getListenerList ();
46669 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46670 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46671 (listeners[i + 1]).menuDragMouseExited (event);
46672 }}
46673 }, "javax.swing.event.MenuDragMouseEvent");
46674 Clazz_defineMethod (c$, "fireMenuDragMouseDragged", 
46675 function (event) {
46676 var listeners = this.listenerList.getListenerList ();
46677 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46678 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46679 (listeners[i + 1]).menuDragMouseDragged (event);
46680 }}
46681 }, "javax.swing.event.MenuDragMouseEvent");
46682 Clazz_defineMethod (c$, "fireMenuDragMouseReleased", 
46683 function (event) {
46684 var listeners = this.listenerList.getListenerList ();
46685 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46686 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46687 (listeners[i + 1]).menuDragMouseReleased (event);
46688 }}
46689 }, "javax.swing.event.MenuDragMouseEvent");
46690 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
46691 function (event) {
46692 var listeners = this.listenerList.getListenerList ();
46693 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46694 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46695 (listeners[i + 1]).menuKeyPressed (event);
46696 }}
46697 }, "javax.swing.event.MenuKeyEvent");
46698 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
46699 function (event) {
46700 var listeners = this.listenerList.getListenerList ();
46701 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46702 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46703 (listeners[i + 1]).menuKeyReleased (event);
46704 }}
46705 }, "javax.swing.event.MenuKeyEvent");
46706 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
46707 function (event) {
46708 var listeners = this.listenerList.getListenerList ();
46709 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46710 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46711 (listeners[i + 1]).menuKeyTyped (event);
46712 }}
46713 }, "javax.swing.event.MenuKeyEvent");
46714 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46715 function (isIncluded) {
46716 this.setArmed (isIncluded);
46717 }, "~B");
46718 Clazz_overrideMethod (c$, "getSubElements", 
46719 function () {
46720 return  new Array (0);
46721 });
46722 Clazz_defineMethod (c$, "getComponent", 
46723 function () {
46724 return this;
46725 });
46726 Clazz_defineMethod (c$, "addMenuDragMouseListener", 
46727 function (l) {
46728 this.listenerList.add (javax.swing.event.MenuDragMouseListener, l);
46729 }, "javax.swing.event.MenuDragMouseListener");
46730 Clazz_defineMethod (c$, "removeMenuDragMouseListener", 
46731 function (l) {
46732 this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l);
46733 }, "javax.swing.event.MenuDragMouseListener");
46734 Clazz_defineMethod (c$, "getMenuDragMouseListeners", 
46735 function () {
46736 return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener);
46737 });
46738 Clazz_defineMethod (c$, "addMenuKeyListener", 
46739 function (l) {
46740 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
46741 }, "javax.swing.event.MenuKeyListener");
46742 Clazz_defineMethod (c$, "removeMenuKeyListener", 
46743 function (l) {
46744 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
46745 }, "javax.swing.event.MenuKeyListener");
46746 Clazz_defineMethod (c$, "getMenuKeyListeners", 
46747 function () {
46748 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
46749 });
46750 Clazz_pu$h(self.c$);
46751 c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener);
46752 Clazz_overrideMethod (c$, "focusGained", 
46753 function (a) {
46754 }, "java.awt.event.FocusEvent");
46755 Clazz_overrideMethod (c$, "focusLost", 
46756 function (a) {
46757 var b = a.getSource ();
46758 if (b.isFocusPainted ()) {
46759 b.repaint ();
46760 }}, "java.awt.event.FocusEvent");
46761 c$ = Clazz_p0p ();
46762 Clazz_defineStatics (c$,
46763 "$uiClassID", "MenuItemUI");
46764 });
46765 Clazz_declarePackage ("javax.swing");
46766 Clazz_load (["javax.swing.JMenuItem", "$.SwingConstants"], "javax.swing.JCheckBoxMenuItem", ["javax.swing.JToggleButton"], function () {
46767 c$ = Clazz_declareType (javax.swing, "JCheckBoxMenuItem", javax.swing.JMenuItem, javax.swing.SwingConstants);
46768 Clazz_makeConstructor (c$, 
46769 function () {
46770 this.construct (null, null, false);
46771 });
46772 Clazz_makeConstructor (c$, 
46773 function (icon) {
46774 this.construct (null, icon, false);
46775 }, "javax.swing.Icon");
46776 Clazz_makeConstructor (c$, 
46777 function (text) {
46778 this.construct (text, null, false);
46779 }, "~S");
46780 Clazz_makeConstructor (c$, 
46781 function (a) {
46782 this.construct ();
46783 this.setAction (a);
46784 }, "javax.swing.Action");
46785 Clazz_makeConstructor (c$, 
46786 function (text, icon) {
46787 this.construct (text, icon, false);
46788 }, "~S,javax.swing.Icon");
46789 Clazz_makeConstructor (c$, 
46790 function (text, b) {
46791 this.construct (text, null, b);
46792 }, "~S,~B");
46793 Clazz_makeConstructor (c$, 
46794 function (text, icon, b) {
46795 Clazz_superConstructor (this, javax.swing.JCheckBoxMenuItem, [text, icon]);
46796 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46797 this.setSelected (b);
46798 this.setFocusable (false);
46799 }, "~S,javax.swing.Icon,~B");
46800 Clazz_overrideMethod (c$, "getUIClassID", 
46801 function () {
46802 return "CheckBoxMenuItemUI";
46803 });
46804 Clazz_defineMethod (c$, "getState", 
46805 function () {
46806 return this.isSelected ();
46807 });
46808 Clazz_defineMethod (c$, "setState", 
46809 function (b) {
46810 this.setSelected (b);
46811 }, "~B");
46812 Clazz_overrideMethod (c$, "getSelectedObjects", 
46813 function () {
46814 if (this.isSelected () == false) return null;
46815 var selectedObjects =  new Array (1);
46816 selectedObjects[0] = this.getText ();
46817 return selectedObjects;
46818 });
46819 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46820 function () {
46821 return true;
46822 });
46823 Clazz_defineStatics (c$,
46824 "$$uiClassID", "CheckBoxMenuItemUI");
46825 });
46826 Clazz_declarePackage ("javax.swing");
46827 Clazz_load (["javax.swing.JMenuItem"], "javax.swing.JRadioButtonMenuItem", ["javax.swing.JToggleButton"], function () {
46828 c$ = Clazz_declareType (javax.swing, "JRadioButtonMenuItem", javax.swing.JMenuItem);
46829 Clazz_makeConstructor (c$, 
46830 function () {
46831 this.construct (null, null, false);
46832 });
46833 Clazz_makeConstructor (c$, 
46834 function (icon) {
46835 this.construct (null, icon, false);
46836 }, "javax.swing.Icon");
46837 Clazz_makeConstructor (c$, 
46838 function (text) {
46839 this.construct (text, null, false);
46840 }, "~S");
46841 Clazz_makeConstructor (c$, 
46842 function (a) {
46843 this.construct ();
46844 this.setAction (a);
46845 }, "javax.swing.Action");
46846 Clazz_makeConstructor (c$, 
46847 function (text, icon) {
46848 this.construct (text, icon, false);
46849 }, "~S,javax.swing.Icon");
46850 Clazz_makeConstructor (c$, 
46851 function (text, selected) {
46852 this.construct (text);
46853 this.setSelected (selected);
46854 }, "~S,~B");
46855 Clazz_makeConstructor (c$, 
46856 function (icon, selected) {
46857 this.construct (null, icon, selected);
46858 }, "javax.swing.Icon,~B");
46859 Clazz_makeConstructor (c$, 
46860 function (text, icon, selected) {
46861 Clazz_superConstructor (this, javax.swing.JRadioButtonMenuItem, [text, icon]);
46862 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46863 this.setSelected (selected);
46864 this.setFocusable (false);
46865 }, "~S,javax.swing.Icon,~B");
46866 Clazz_overrideMethod (c$, "getUIClassID", 
46867 function () {
46868 return "RadioButtonMenuItemUI";
46869 });
46870 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46871 function () {
46872 return true;
46873 });
46874 Clazz_defineStatics (c$,
46875 "$$uiClassID", "RadioButtonMenuItemUI");
46876 });
46877 Clazz_declarePackage ("javax.swing.event");
46878 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () {
46879 Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener);
46880 });
46881 Clazz_declarePackage ("javax.swing.event");
46882 Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () {
46883 c$ = Clazz_decorateAsClass (function () {
46884 this.path = null;
46885 this.manager = null;
46886 Clazz_instantialize (this, arguments);
46887 }, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent);
46888 Clazz_makeConstructor (c$, 
46889 function (source, id, when, modifiers, keyCode, keyChar, p, m) {
46890 Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]);
46891 this.path = p;
46892 this.manager = m;
46893 }, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager");
46894 Clazz_defineMethod (c$, "getPath", 
46895 function () {
46896 return this.path;
46897 });
46898 Clazz_defineMethod (c$, "getMenuSelectionManager", 
46899 function () {
46900 return this.manager;
46901 });
46902 });
46903 Clazz_declarePackage ("javax.swing.event");
46904 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () {
46905 Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener);
46906 });
46907 Clazz_declarePackage ("javax.swing");
46908 Clazz_load (["javax.swing.JComponent", "$.JSeparator", "$.MenuElement"], "javax.swing.JPopupMenu", ["java.lang.Boolean", "$.IllegalArgumentException", "java.util.Vector", "java.awt.Dimension", "$.Frame", "$.GraphicsEnvironment", "$.Insets", "$.Point", "javax.swing.DefaultSingleSelectionModel", "$.JMenu", "$.JMenuItem", "$.MenuSelectionManager", "$.PopupFactory", "$.SwingUtilities", "$.UIManager", "javax.swing.event.MenuKeyEvent", "$.MenuKeyListener", "$.PopupMenuEvent", "$.PopupMenuListener"], function () {
46909 c$ = Clazz_decorateAsClass (function () {
46910 this.invoker = null;
46911 this.popup = null;
46912 this.frame = null;
46913 this.desiredLocationX = 0;
46914 this.desiredLocationY = 0;
46915 this.label = null;
46916 this.$paintBorder = true;
46917 this.margin = null;
46918 this.lightWeightPopup = true;
46919 this.selectionModel = null;
46920 Clazz_instantialize (this, arguments);
46921 }, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement);
46922 c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", 
46923 function (aFlag) {
46924 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag));
46925 }, "~B");
46926 c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", 
46927 function () {
46928 var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey);
46929 if (b == null) {
46930 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE);
46931 return true;
46932 }return b.booleanValue ();
46933 });
46934 Clazz_makeConstructor (c$, 
46935 function () {
46936 this.construct (null);
46937 });
46938 Clazz_makeConstructor (c$, 
46939 function (label) {
46940 Clazz_superConstructor (this, javax.swing.JPopupMenu, []);
46941 this.label = label;
46942 this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled ();
46943 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
46944 this.enableEvents (16);
46945 this.updateUI ();
46946 }, "~S");
46947 Clazz_overrideMethod (c$, "getUI", 
46948 function () {
46949 return this.ui;
46950 });
46951 Clazz_overrideMethod (c$, "updateUI", 
46952 function () {
46953 this.setUI (javax.swing.UIManager.getUI (this));
46954 });
46955 Clazz_overrideMethod (c$, "getUIClassID", 
46956 function () {
46957 return "PopupMenuUI";
46958 });
46959 Clazz_defineMethod (c$, "processKeyEvent", 
46960 function (evt) {
46961 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46962 if (evt.isConsumed ()) {
46963 return;
46964 }Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]);
46965 }, "java.awt.event.KeyEvent");
46966 Clazz_defineMethod (c$, "getSelectionModel", 
46967 function () {
46968 return this.selectionModel;
46969 });
46970 Clazz_defineMethod (c$, "setSelectionModel", 
46971 function (model) {
46972 this.selectionModel = model;
46973 }, "javax.swing.SingleSelectionModel");
46974 Clazz_defineMethod (c$, "add", 
46975 function (menuItem) {
46976 Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]);
46977 return menuItem;
46978 }, "javax.swing.JMenuItem");
46979 Clazz_defineMethod (c$, "add", 
46980 function (s) {
46981 return this.add ( new javax.swing.JMenuItem (s));
46982 }, "~S");
46983 Clazz_defineMethod (c$, "add", 
46984 function (a) {
46985 var mi = this.createActionComponent (a);
46986 mi.setAction (a);
46987 this.add (mi);
46988 return mi;
46989 }, "javax.swing.Action");
46990 Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", 
46991 function (xposition, yposition) {
46992 var p =  new java.awt.Point (xposition, yposition);
46993 if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p;
46994 return p;
46995 }, "~N,~N");
46996 Clazz_defineMethod (c$, "createActionComponent", 
46997 function (a) {
46998 var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null));
46999 mi.setHorizontalTextPosition (11);
47000 mi.setVerticalTextPosition (0);
47001 return mi;
47002 }, "javax.swing.Action");
47003 Clazz_defineMethod (c$, "createActionChangeListener", 
47004 function (b) {
47005 return b.createActionPropertyChangeListener0 (b.getAction ());
47006 }, "javax.swing.JMenuItem");
47007 Clazz_defineMethod (c$, "remove", 
47008 function (pos) {
47009 if (pos < 0) {
47010 throw  new IllegalArgumentException ("index less than zero.");
47011 }if (pos > this.getComponentCount () - 1) {
47012 throw  new IllegalArgumentException ("index greater than the number of items.");
47013 }Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]);
47014 }, "~N");
47015 Clazz_defineMethod (c$, "setLightWeightPopupEnabled", 
47016 function (aFlag) {
47017 this.lightWeightPopup = aFlag;
47018 }, "~B");
47019 Clazz_defineMethod (c$, "isLightWeightPopupEnabled", 
47020 function () {
47021 return this.lightWeightPopup;
47022 });
47023 Clazz_defineMethod (c$, "getLabel", 
47024 function () {
47025 return this.label;
47026 });
47027 Clazz_defineMethod (c$, "setLabel", 
47028 function (label) {
47029 var oldValue = this.label;
47030 this.label = label;
47031 this.firePropertyChangeObject ("label", oldValue, label);
47032 this.invalidate ();
47033 this.repaint ();
47034 }, "~S");
47035 Clazz_defineMethod (c$, "addSeparator", 
47036 function () {
47037 this.add ( new javax.swing.JPopupMenu.Separator ());
47038 });
47039 Clazz_defineMethod (c$, "insert", 
47040 function (a, index) {
47041 var mi = this.createActionComponent (a);
47042 mi.setAction (a);
47043 this.insert (mi, index);
47044 }, "javax.swing.Action,~N");
47045 Clazz_defineMethod (c$, "insert", 
47046 function (component, index) {
47047 if (index < 0) {
47048 throw  new IllegalArgumentException ("index less than zero.");
47049 }var nitems = this.getComponentCount ();
47050 var tempItems =  new java.util.Vector ();
47051 for (var i = index; i < nitems; i++) {
47052 tempItems.addElement (this.getComponent (index));
47053 this.remove (index);
47054 }
47055 this.add (component);
47056 for (var i = 0; i < tempItems.size (); i++) {
47057 this.add (tempItems.elementAt (i));
47058 }
47059 }, "java.awt.Component,~N");
47060 Clazz_defineMethod (c$, "addPopupMenuListener", 
47061 function (l) {
47062 this.listenerList.add (javax.swing.event.PopupMenuListener, l);
47063 }, "javax.swing.event.PopupMenuListener");
47064 Clazz_defineMethod (c$, "removePopupMenuListener", 
47065 function (l) {
47066 this.listenerList.remove (javax.swing.event.PopupMenuListener, l);
47067 }, "javax.swing.event.PopupMenuListener");
47068 Clazz_defineMethod (c$, "getPopupMenuListeners", 
47069 function () {
47070 return this.listenerList.getListeners (javax.swing.event.PopupMenuListener);
47071 });
47072 Clazz_defineMethod (c$, "addMenuKeyListener", 
47073 function (l) {
47074 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
47075 }, "javax.swing.event.MenuKeyListener");
47076 Clazz_defineMethod (c$, "removeMenuKeyListener", 
47077 function (l) {
47078 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
47079 }, "javax.swing.event.MenuKeyListener");
47080 Clazz_defineMethod (c$, "getMenuKeyListeners", 
47081 function () {
47082 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
47083 });
47084 Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", 
47085 function () {
47086 var listeners = this.listenerList.getListenerList ();
47087 var e = null;
47088 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47089 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47090 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47091 (listeners[i + 1]).popupMenuWillBecomeVisible (e);
47092 }}
47093 });
47094 Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", 
47095 function () {
47096 var listeners = this.listenerList.getListenerList ();
47097 var e = null;
47098 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47099 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47100 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47101 (listeners[i + 1]).popupMenuWillBecomeInvisible (e);
47102 }}
47103 });
47104 Clazz_defineMethod (c$, "firePopupMenuCanceled", 
47105 function () {
47106 var listeners = this.listenerList.getListenerList ();
47107 var e = null;
47108 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47109 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47110 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47111 (listeners[i + 1]).popupMenuCanceled (e);
47112 }}
47113 });
47114 Clazz_overrideMethod (c$, "alwaysOnTop", 
47115 function () {
47116 return true;
47117 });
47118 Clazz_defineMethod (c$, "pack", 
47119 function () {
47120 if (this.popup != null) {
47121 var pref = this.getPreferredSize ();
47122 if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) {
47123 this.popup = this.getPopup ();
47124 } else {
47125 this.validate ();
47126 }}});
47127 Clazz_overrideMethod (c$, "setVisible", 
47128 function (b) {
47129 if (b == this.isVisible ()) return;
47130 if (b == false) {
47131 var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled");
47132 if (doCanceled != null && doCanceled === Boolean.TRUE) {
47133 this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE);
47134 this.firePopupMenuCanceled ();
47135 }this.getSelectionModel ().clearSelection ();
47136 } else {
47137 if (this.isPopupMenu ()) {
47138 var me =  new Array (1);
47139 me[0] = this;
47140 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
47141 }}if (b) {
47142 this.firePopupMenuWillBecomeVisible ();
47143 this.popup = this.getPopup ();
47144 this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE);
47145 } else if (this.popup != null) {
47146 this.firePopupMenuWillBecomeInvisible ();
47147 this.popup.hide ();
47148 this.popup = null;
47149 this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE);
47150 if (this.isPopupMenu ()) {
47151 javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath ();
47152 }}}, "~B");
47153 Clazz_defineMethod (c$, "getPopup", 
47154  function () {
47155 var oldPopup = this.popup;
47156 if (oldPopup != null) {
47157 oldPopup.hide ();
47158 }var popupFactory = javax.swing.PopupFactory.getSharedInstance ();
47159 if (this.isLightWeightPopupEnabled ()) {
47160 popupFactory.setPopupType (0);
47161 } else {
47162 popupFactory.setPopupType (1);
47163 }var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY);
47164 this.desiredLocationX = p.x;
47165 this.desiredLocationY = p.y;
47166 var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY);
47167 popupFactory.setPopupType (0);
47168 newPopup.show ();
47169 return newPopup;
47170 });
47171 Clazz_overrideMethod (c$, "isVisible", 
47172 function () {
47173 if (this.popup != null) return true;
47174  else return false;
47175 });
47176 Clazz_defineMethod (c$, "setLocation", 
47177 function (x, y) {
47178 var oldX = this.desiredLocationX;
47179 var oldY = this.desiredLocationY;
47180 this.desiredLocationX = x;
47181 this.desiredLocationY = y;
47182 if (this.popup != null && (x != oldX || y != oldY)) {
47183 this.popup = this.getPopup ();
47184 }}, "~N,~N");
47185 Clazz_defineMethod (c$, "isPopupMenu", 
47186  function () {
47187 return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu)));
47188 });
47189 Clazz_defineMethod (c$, "getInvoker", 
47190 function () {
47191 return this.invoker;
47192 });
47193 Clazz_defineMethod (c$, "setInvoker", 
47194 function (invoker) {
47195 var oldInvoker = this.invoker;
47196 this.invoker = invoker;
47197 if ((oldInvoker !== this.invoker) && (this.ui != null)) {
47198 this.ui.uninstallUI (this);
47199 this.ui.installUI (this);
47200 }this.invalidate ();
47201 }, "java.awt.Component");
47202 Clazz_defineMethod (c$, "show", 
47203 function (invoker, x, y) {
47204 this.setInvoker (invoker);
47205 var newFrame = javax.swing.JPopupMenu.getFrame (invoker);
47206 if (newFrame !== this.frame) {
47207 if (newFrame != null) {
47208 this.frame = newFrame;
47209 if (this.popup != null) {
47210 this.setVisible (false);
47211 }}}var invokerOrigin;
47212 if (invoker != null) {
47213 invokerOrigin = invoker.getLocationOnScreen ();
47214 var lx;
47215 var ly;
47216 lx = (invokerOrigin.x) + (x);
47217 ly = (invokerOrigin.y) + (y);
47218 if (lx > 2147483647) lx = 2147483647;
47219 if (lx < -2147483648) lx = -2147483648;
47220 if (ly > 2147483647) ly = 2147483647;
47221 if (ly < -2147483648) ly = -2147483648;
47222 this.setLocation (lx, ly);
47223 } else {
47224 this.setLocation (x, y);
47225 }this.setVisible (true);
47226 }, "java.awt.Component,~N,~N");
47227 Clazz_defineMethod (c$, "getRootPopupMenu", 
47228 function () {
47229 var mp = this;
47230 while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) {
47231 mp = mp.getInvoker ().getParent ();
47232 }
47233 return mp;
47234 });
47235 Clazz_defineMethod (c$, "getComponentAtIndex", 
47236 function (i) {
47237 return this.getComponent (i);
47238 }, "~N");
47239 Clazz_defineMethod (c$, "getComponentIndex", 
47240 function (c) {
47241 var ncomponents = this.getComponentCount ();
47242 var component = this.getComponents ();
47243 for (var i = 0; i < ncomponents; i++) {
47244 var comp = component[i];
47245 if (comp === c) return i;
47246 }
47247 return -1;
47248 }, "java.awt.Component");
47249 Clazz_defineMethod (c$, "setPopupSize", 
47250 function (d) {
47251 var oldSize = this.getPreferredSize ();
47252 this.setPreferredSize (d);
47253 if (this.popup != null) {
47254 var newSize = this.getPreferredSize ();
47255 if (!oldSize.equals (newSize)) {
47256 this.popup = this.getPopup ();
47257 }}}, "java.awt.Dimension");
47258 Clazz_defineMethod (c$, "setPopupSize", 
47259 function (width, height) {
47260 this.setPopupSize ( new java.awt.Dimension (width, height));
47261 }, "~N,~N");
47262 Clazz_defineMethod (c$, "setSelected", 
47263 function (sel) {
47264 var model = this.getSelectionModel ();
47265 var index = this.getComponentIndex (sel);
47266 model.setSelectedIndex (index);
47267 }, "java.awt.Component");
47268 Clazz_defineMethod (c$, "isBorderPainted", 
47269 function () {
47270 return this.$paintBorder;
47271 });
47272 Clazz_defineMethod (c$, "setBorderPainted", 
47273 function (b) {
47274 this.$paintBorder = b;
47275 this.repaint ();
47276 }, "~B");
47277 Clazz_defineMethod (c$, "paintBorder", 
47278 function (g) {
47279 if (this.isBorderPainted ()) {
47280 Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]);
47281 }}, "java.awt.Graphics");
47282 Clazz_defineMethod (c$, "getMargin", 
47283 function () {
47284 if (this.margin == null) {
47285 return  new java.awt.Insets (0, 0, 0, 0);
47286 } else {
47287 return this.margin;
47288 }});
47289 Clazz_defineMethod (c$, "isSubPopupMenu", 
47290 function (popup) {
47291 var ncomponents = this.getComponentCount ();
47292 var component = this.getComponents ();
47293 for (var i = 0; i < ncomponents; i++) {
47294 var comp = component[i];
47295 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
47296 var menu = comp;
47297 var subPopup = menu.getPopupMenu ();
47298 if (subPopup === popup) return true;
47299 if (subPopup.isSubPopupMenu (popup)) return true;
47300 }}
47301 return false;
47302 }, "javax.swing.JPopupMenu");
47303 c$.getFrame = Clazz_defineMethod (c$, "getFrame", 
47304  function (c) {
47305 var w = c;
47306 while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) {
47307 w = w.getParent ();
47308 }
47309 return w;
47310 }, "java.awt.Component");
47311 Clazz_defineMethod (c$, "paramString", 
47312 function () {
47313 var labelString = (this.label != null ? this.label : "");
47314 var paintBorderString = (this.$paintBorder ? "true" : "false");
47315 var marginString = (this.margin != null ? this.margin.toString () : "");
47316 var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false");
47317 return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
47318 });
47319 Clazz_defineMethod (c$, "processMouseEvent", 
47320 function (event, path, manager) {
47321 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
47322 Clazz_defineMethod (c$, "processKeyEvent", 
47323 function (e, path, manager) {
47324 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
47325 this.processMenuKeyEvent (mke);
47326 if (mke.isConsumed ()) {
47327 e.consume ();
47328 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
47329 Clazz_defineMethod (c$, "processMenuKeyEvent", 
47330  function (e) {
47331 switch (e.getID ()) {
47332 case 401:
47333 this.fireMenuKeyPressed (e);
47334 break;
47335 case 402:
47336 this.fireMenuKeyReleased (e);
47337 break;
47338 case 400:
47339 this.fireMenuKeyTyped (e);
47340 break;
47341 default:
47342 break;
47343 }
47344 }, "javax.swing.event.MenuKeyEvent");
47345 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
47346  function (event) {
47347 var listeners = this.listenerList.getListenerList ();
47348 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47349 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47350 (listeners[i + 1]).menuKeyPressed (event);
47351 }}
47352 }, "javax.swing.event.MenuKeyEvent");
47353 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
47354  function (event) {
47355 var listeners = this.listenerList.getListenerList ();
47356 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47357 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47358 (listeners[i + 1]).menuKeyReleased (event);
47359 }}
47360 }, "javax.swing.event.MenuKeyEvent");
47361 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
47362  function (event) {
47363 var listeners = this.listenerList.getListenerList ();
47364 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47365 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47366 (listeners[i + 1]).menuKeyTyped (event);
47367 }}
47368 }, "javax.swing.event.MenuKeyEvent");
47369 Clazz_overrideMethod (c$, "menuSelectionChanged", 
47370 function (isIncluded) {
47371 if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) {
47372 var m = this.invoker;
47373 if (isIncluded) m.setPopupMenuVisible (true);
47374  else m.setPopupMenuVisible (false);
47375 }if (this.isPopupMenu () && !isIncluded) this.setVisible (false);
47376 }, "~B");
47377 Clazz_overrideMethod (c$, "getSubElements", 
47378 function () {
47379 var result;
47380 var tmp =  new java.util.Vector ();
47381 var c = this.getComponentCount ();
47382 var i;
47383 var m;
47384 for (i = 0; i < c; i++) {
47385 m = this.getComponent (i);
47386 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
47387 }
47388 result =  new Array (tmp.size ());
47389 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
47390
47391 return result;
47392 });
47393 Clazz_defineMethod (c$, "getComponent", 
47394 function () {
47395 return this;
47396 });
47397 Clazz_defineMethod (c$, "isPopupTrigger", 
47398 function (e) {
47399 return this.getUI ().isPopupTrigger (e);
47400 }, "java.awt.event.MouseEvent");
47401 c$.$JPopupMenu$1$ = function () {
47402 Clazz_pu$h(self.c$);
47403 c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem);
47404 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
47405 function (a) {
47406 var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this);
47407 if (pcl == null) {
47408 pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]);
47409 }return pcl;
47410 }, "javax.swing.Action");
47411 c$ = Clazz_p0p ();
47412 };
47413 Clazz_pu$h(self.c$);
47414 c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator);
47415 Clazz_makeConstructor (c$, 
47416 function () {
47417 Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]);
47418 });
47419 Clazz_overrideMethod (c$, "getUIClassID", 
47420 function () {
47421 return "PopupMenuSeparatorUI";
47422 });
47423 c$ = Clazz_p0p ();
47424 Clazz_defineStatics (c$,
47425 "$uiClassID", "PopupMenuUI");
47426 c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey =  new Clazz._O ();
47427 Clazz_defineStatics (c$,
47428 "popupPostionFixDisabled", false);
47429 });
47430 Clazz_declarePackage ("javax.swing");
47431 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () {
47432 c$ = Clazz_decorateAsClass (function () {
47433 this.orientation = 0;
47434 Clazz_instantialize (this, arguments);
47435 }, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants);
47436 Clazz_makeConstructor (c$, 
47437 function () {
47438 this.construct (0);
47439 });
47440 Clazz_makeConstructor (c$, 
47441 function (orientation) {
47442 Clazz_superConstructor (this, javax.swing.JSeparator, []);
47443 this.checkOrientation (orientation);
47444 this.orientation = orientation;
47445 this.setFocusable (false);
47446 this.updateUI ();
47447 }, "~N");
47448 Clazz_overrideMethod (c$, "getUI", 
47449 function () {
47450 return this.ui;
47451 });
47452 Clazz_overrideMethod (c$, "updateUI", 
47453 function () {
47454 this.setUI (javax.swing.UIManager.getUI (this));
47455 });
47456 Clazz_overrideMethod (c$, "getUIClassID", 
47457 function () {
47458 return "SeparatorUI";
47459 });
47460 Clazz_defineMethod (c$, "getOrientation", 
47461 function () {
47462 return this.orientation;
47463 });
47464 Clazz_defineMethod (c$, "setOrientation", 
47465 function (orientation) {
47466 if (this.orientation == orientation) {
47467 return;
47468 }var oldValue = this.orientation;
47469 this.checkOrientation (orientation);
47470 this.orientation = orientation;
47471 this.firePropertyChangeInt ("orientation", oldValue, orientation);
47472 this.revalidate ();
47473 this.repaint ();
47474 }, "~N");
47475 Clazz_defineMethod (c$, "checkOrientation", 
47476  function (orientation) {
47477 switch (orientation) {
47478 case 1:
47479 case 0:
47480 break;
47481 default:
47482 throw  new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL");
47483 }
47484 }, "~N");
47485 Clazz_defineMethod (c$, "paramString", 
47486 function () {
47487 var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL");
47488 return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString;
47489 });
47490 Clazz_defineStatics (c$,
47491 "$uiClassID", "SeparatorUI");
47492 });
47493 Clazz_declarePackage ("javax.swing");
47494 Clazz_load (["java.util.Vector", "javax.swing.event.EventListenerList"], "javax.swing.MenuSelectionManager", ["java.awt.event.MouseEvent", "javax.swing.JComponent", "$.SwingUtilities", "javax.swing.event.ChangeEvent", "$.ChangeListener", "jssun.awt.AppContext"], function () {
47495 c$ = Clazz_decorateAsClass (function () {
47496 this.selection = null;
47497 this.changeEvent = null;
47498 this.listenerList = null;
47499 Clazz_instantialize (this, arguments);
47500 }, javax.swing, "MenuSelectionManager");
47501 Clazz_prepareFields (c$, function () {
47502 this.selection =  new java.util.Vector ();
47503 this.listenerList =  new javax.swing.event.EventListenerList ();
47504 });
47505 c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", 
47506 function () {
47507 {
47508 var context = jssun.awt.AppContext.getAppContext ();
47509 var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY);
47510 if (msm == null) {
47511 msm =  new javax.swing.MenuSelectionManager ();
47512 context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm);
47513 }return msm;
47514 }});
47515 Clazz_defineMethod (c$, "setSelectedPath", 
47516 function (path) {
47517 var i;
47518 var c;
47519 var currentSelectionCount = this.selection.size ();
47520 var firstDifference = 0;
47521 if (path == null) {
47522 path =  new Array (0);
47523 }for (i = 0, c = path.length; i < c; i++) {
47524 if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++;
47525  else break;
47526 }
47527 for (i = currentSelectionCount - 1; i >= firstDifference; i--) {
47528 var me = this.selection.elementAt (i);
47529 this.selection.removeElementAt (i);
47530 me.menuSelectionChanged (false);
47531 }
47532 for (i = firstDifference, c = path.length; i < c; i++) {
47533 if (path[i] != null) {
47534 this.selection.addElement (path[i]);
47535 path[i].menuSelectionChanged (true);
47536 }}
47537 this.fireStateChanged ();
47538 }, "~A");
47539 Clazz_defineMethod (c$, "getSelectedPath", 
47540 function () {
47541 var res =  new Array (this.selection.size ());
47542 var i;
47543 var c;
47544 for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i);
47545
47546 return res;
47547 });
47548 Clazz_defineMethod (c$, "clearSelectedPath", 
47549 function () {
47550 if (this.selection.size () > 0) {
47551 this.setSelectedPath (null);
47552 }});
47553 Clazz_defineMethod (c$, "addChangeListener", 
47554 function (l) {
47555 this.listenerList.add (javax.swing.event.ChangeListener, l);
47556 }, "javax.swing.event.ChangeListener");
47557 Clazz_defineMethod (c$, "removeChangeListener", 
47558 function (l) {
47559 this.listenerList.remove (javax.swing.event.ChangeListener, l);
47560 }, "javax.swing.event.ChangeListener");
47561 Clazz_defineMethod (c$, "getChangeListeners", 
47562 function () {
47563 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
47564 });
47565 Clazz_defineMethod (c$, "fireStateChanged", 
47566 function () {
47567 var listeners = this.listenerList.getListenerList ();
47568 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47569 if (listeners[i] === javax.swing.event.ChangeListener) {
47570 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
47571 (listeners[i + 1]).stateChanged (this.changeEvent);
47572 }}
47573 });
47574 Clazz_defineMethod (c$, "processMouseEvent", 
47575 function (event) {
47576 var screenX;
47577 var screenY;
47578 var p;
47579 var i;
47580 var j;
47581 var d;
47582 var mc;
47583 var r2;
47584 var cWidth;
47585 var cHeight;
47586 var menuElement;
47587 var subElements;
47588 var path;
47589 var tmp;
47590 var selectionSize;
47591 p = event.getPoint ();
47592 var source = event.getSource ();
47593 if (!source.isShowing ()) {
47594 return;
47595 }var type = event.getID ();
47596 var modifiers = event.getModifiers ();
47597 if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) {
47598 return;
47599 }javax.swing.SwingUtilities.convertPointToScreen (p, source);
47600 screenX = p.x;
47601 screenY = p.y;
47602 tmp = this.selection.clone ();
47603 selectionSize = tmp.size ();
47604 var success = false;
47605 for (i = selectionSize - 1; i >= 0 && success == false; i--) {
47606 menuElement = tmp.elementAt (i);
47607 subElements = menuElement.getSubElements ();
47608 path = null;
47609 for (j = 0, d = subElements.length; j < d && success == false; j++) {
47610 if (subElements[j] == null) continue;
47611 mc = subElements[j].getComponent ();
47612 if (!mc.isShowing ()) continue;
47613 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47614 cWidth = (mc).getWidth ();
47615 cHeight = (mc).getHeight ();
47616 } else {
47617 r2 = mc.getBounds ();
47618 cWidth = r2.width;
47619 cHeight = r2.height;
47620 }p.x = screenX;
47621 p.y = screenY;
47622 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47623 if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) {
47624 var k;
47625 if (path == null) {
47626 path =  new Array (i + 2);
47627 for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k);
47628
47629 }path[i + 1] = subElements[j];
47630 var currentSelection = this.getSelectedPath ();
47631 if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) {
47632 var oldMC = currentSelection[currentSelection.length - 1].getComponent ();
47633 var exitEvent =  new java.awt.event.MouseEvent (oldMC, 505, event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0);
47634 currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this);
47635 var enterEvent =  new java.awt.event.MouseEvent (mc, 504, event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0);
47636 subElements[j].processMouseEvent (enterEvent, path, this);
47637 }var mouseEvent =  new java.awt.event.MouseEvent (mc, event.getID (), event.getWhen (), event.getModifiers (), p.x, p.y, event.getXOnScreen (), event.getYOnScreen (), event.getClickCount (), event.isPopupTrigger (), 0);
47638 subElements[j].processMouseEvent (mouseEvent, path, this);
47639 success = true;
47640 event.consume ();
47641 }}
47642 }
47643 }, "java.awt.event.MouseEvent");
47644 Clazz_defineMethod (c$, "componentForPoint", 
47645 function (source, sourcePoint) {
47646 var screenX;
47647 var screenY;
47648 var p = sourcePoint;
47649 var i;
47650 var j;
47651 var d;
47652 var mc;
47653 var r2;
47654 var cWidth;
47655 var cHeight;
47656 var menuElement;
47657 var subElements;
47658 var tmp;
47659 var selectionSize;
47660 javax.swing.SwingUtilities.convertPointToScreen (p, source);
47661 screenX = p.x;
47662 screenY = p.y;
47663 tmp = this.selection.clone ();
47664 selectionSize = tmp.size ();
47665 for (i = selectionSize - 1; i >= 0; i--) {
47666 menuElement = tmp.elementAt (i);
47667 subElements = menuElement.getSubElements ();
47668 for (j = 0, d = subElements.length; j < d; j++) {
47669 if (subElements[j] == null) continue;
47670 mc = subElements[j].getComponent ();
47671 if (!mc.isShowing ()) continue;
47672 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47673 cWidth = (mc).getWidth ();
47674 cHeight = (mc).getHeight ();
47675 } else {
47676 r2 = mc.getBounds ();
47677 cWidth = r2.width;
47678 cHeight = r2.height;
47679 }p.x = screenX;
47680 p.y = screenY;
47681 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47682 if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) {
47683 return mc;
47684 }}
47685 }
47686 return null;
47687 }, "java.awt.Component,java.awt.Point");
47688 Clazz_defineMethod (c$, "processKeyEvent", 
47689 function (e) {
47690 var sel2 =  new Array (0);
47691 sel2 = this.selection.toArray (sel2);
47692 var selSize = sel2.length;
47693 var path;
47694 if (selSize < 1) {
47695 return;
47696 }for (var i = selSize - 1; i >= 0; i--) {
47697 var elem = sel2[i];
47698 var subs = elem.getSubElements ();
47699 path = null;
47700 for (var j = 0; j < subs.length; j++) {
47701 if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) {
47702 continue;
47703 }if (path == null) {
47704 path =  new Array (i + 2);
47705 System.arraycopy (sel2, 0, path, 0, i + 1);
47706 }path[i + 1] = subs[j];
47707 subs[j].processKeyEvent (e, path, this);
47708 if (e.isConsumed ()) {
47709 return;
47710 }}
47711 }
47712 path =  new Array (1);
47713 path[0] = sel2[0];
47714 path[0].processKeyEvent (e, path, this);
47715 if (e.isConsumed ()) {
47716 return;
47717 }}, "java.awt.event.KeyEvent");
47718 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47719 function (c) {
47720 if (this.selection.size () > 0) {
47721 var me = this.selection.elementAt (0);
47722 return this.isComponentPartOfCurrentMenu (me, c);
47723 } else return false;
47724 }, "java.awt.Component");
47725 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47726  function (root, c) {
47727 var children;
47728 var i;
47729 var d;
47730 if (root == null) return false;
47731 if (root.getComponent () === c) return true;
47732  else {
47733 children = root.getSubElements ();
47734 for (i = 0, d = children.length; i < d; i++) {
47735 if (this.isComponentPartOfCurrentMenu (children[i], c)) return true;
47736 }
47737 }return false;
47738 }, "javax.swing.MenuElement,java.awt.Component");
47739 c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY =  new Clazz._O ();
47740 });
47741 Clazz_declarePackage ("javax.swing");
47742 Clazz_load (["java.awt.Panel", "javax.swing.Popup", "$.SwingHeavyWeight", "java.awt.BorderLayout"], "javax.swing.PopupFactory", ["java.lang.Boolean", "$.IllegalArgumentException", "java.util.ArrayList", "$.HashMap", "java.applet.Applet", "java.awt.Container", "$.Insets", "$.Rectangle", "$.Toolkit", "$.Window", "java.awt.event.WindowAdapter", "javax.swing.ClientPropertyKey", "$.JApplet", "$.JComponent", "$.JDialog", "$.JFrame", "$.JLayeredPane", "$.JPanel", "$.JPopupMenu", "$.JRootPane", "$.JSeparator", "$.JToolTip", "$.JWindow", "$.MenuElement", "javax.swing.Popup.DefaultFrame", "$.HeavyWeightWindow", "javax.swing.RootPaneContainer", "$.SwingUtilities"], function () {
47743 c$ = Clazz_decorateAsClass (function () {
47744 this.popupType = 0;
47745 Clazz_instantialize (this, arguments);
47746 }, javax.swing, "PopupFactory");
47747 c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", 
47748 function (factory) {
47749 if (factory == null) {
47750 throw  new IllegalArgumentException ("PopupFactory can not be null");
47751 }javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory);
47752 }, "javax.swing.PopupFactory");
47753 c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", 
47754 function () {
47755 var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey);
47756 if (factory == null) {
47757 factory =  new javax.swing.PopupFactory ();
47758 javax.swing.PopupFactory.setSharedInstance (factory);
47759 }return factory;
47760 });
47761 Clazz_defineMethod (c$, "setPopupType", 
47762 function (type) {
47763 this.popupType = type;
47764 }, "~N");
47765 Clazz_defineMethod (c$, "getPopupType", 
47766 function () {
47767 return this.popupType;
47768 });
47769 Clazz_defineMethod (c$, "getPopup", 
47770 function (owner, contents, x, y) {
47771 if (contents == null) {
47772 throw  new IllegalArgumentException ("Popup.getPopup must be passed non-null contents");
47773 }var popupType = this.getPopupType (owner, contents, x, y);
47774 var popup = this.getPopup (owner, contents, x, y, popupType);
47775 if (popup == null) {
47776 popup = this.getPopup (owner, contents, x, y, 2);
47777 }return popup;
47778 }, "java.awt.Component,java.awt.Component,~N,~N");
47779 Clazz_defineMethod (c$, "getPopupType", 
47780  function (owner, contents, ownerX, ownerY) {
47781 var popupType = this.getPopupType ();
47782 if (owner == null || this.invokerInHeavyWeightPopup (owner)) {
47783 popupType = 2;
47784 } else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) {
47785 popupType = 1;
47786 }var c = owner;
47787 while (c != null) {
47788 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
47789 if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) {
47790 popupType = 2;
47791 break;
47792 }}c = c.getParent ();
47793 }
47794 return popupType;
47795 }, "java.awt.Component,java.awt.Component,~N,~N");
47796 Clazz_defineMethod (c$, "getPopup", 
47797  function (owner, contents, ownerX, ownerY, popupType) {
47798 switch (popupType) {
47799 case 0:
47800 return this.getLightWeightPopup (owner, contents, ownerX, ownerY);
47801 case 1:
47802 return this.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47803 case 2:
47804 return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47805 }
47806 return null;
47807 }, "java.awt.Component,java.awt.Component,~N,~N,~N");
47808 Clazz_defineMethod (c$, "getLightWeightPopup", 
47809  function (owner, contents, ownerX, ownerY) {
47810 return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY);
47811 }, "java.awt.Component,java.awt.Component,~N,~N");
47812 Clazz_defineMethod (c$, "getMediumWeightPopup", 
47813  function (owner, contents, ownerX, ownerY) {
47814 return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47815 }, "java.awt.Component,java.awt.Component,~N,~N");
47816 Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47817  function (owner, contents, ownerX, ownerY) {
47818 return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47819 }, "java.awt.Component,java.awt.Component,~N,~N");
47820 Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", 
47821  function (i) {
47822 if (i != null) {
47823 var parent;
47824 for (parent = i.getParent (); parent != null; parent = parent.getParent ()) {
47825 if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) {
47826 return true;
47827 }}
47828 }return false;
47829 }, "java.awt.Component");
47830 Clazz_pu$h(self.c$);
47831 c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup);
47832 c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47833 function (a, b, c, d) {
47834 var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null;
47835 var f = null;
47836 if (e != null) {
47837 f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e);
47838 }var g = false;
47839 if (b != null && b.isFocusable ()) {
47840 if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) {
47841 var h = b;
47842 var i = h.getComponents ();
47843 for (var j = 0; j < i.length; j++) {
47844 if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) {
47845 g = true;
47846 break;
47847 }}
47848 }}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) {
47849 if (f != null) {
47850 f._dispose ();
47851 }f =  new javax.swing.PopupFactory.HeavyWeightPopup ();
47852 }f.reset (a, b, c, d);
47853 if (g) {
47854 var h = f.getComponent ();
47855 h.setFocusableWindowState (true);
47856 h.setName ("###focusableSwingPopup###");
47857 }return f;
47858 }, "java.awt.Component,java.awt.Component,~N,~N");
47859 c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", 
47860  function (a) {
47861 {
47862 var b;
47863 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47864 if (c.containsKey (a)) {
47865 b = c.get (a);
47866 } else {
47867 return null;
47868 }var d;
47869 if ((d = b.size ()) > 0) {
47870 var e = b.get (0);
47871 b.remove (0);
47872 return e;
47873 }return null;
47874 }}, "java.awt.Window");
47875 c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", 
47876  function () {
47877 {
47878 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey);
47879 if (a == null) {
47880 a =  new java.util.HashMap (2);
47881 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a);
47882 }return a;
47883 }});
47884 c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", 
47885  function (a) {
47886 {
47887 var b;
47888 var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ());
47889 var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47890 if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) {
47891 a._dispose ();
47892 return;
47893 } else if (d.containsKey (c)) {
47894 b = d.get (c);
47895 } else {
47896 b =  new java.util.ArrayList ();
47897 d.put (c, b);
47898 var e = c;
47899 e.addWindowListener (((Clazz_isClassDefined ("javax.swing.PopupFactory$HeavyWeightPopup$1") ? 0 : javax.swing.PopupFactory.HeavyWeightPopup.$PopupFactory$HeavyWeightPopup$1$ ()), Clazz_innerTypeInstance (javax.swing.PopupFactory$HeavyWeightPopup$1, this, Clazz_cloneFinals ("e", e))));
47900 }if (b.size () < 5) {
47901 b.add (a);
47902 } else {
47903 a._dispose ();
47904 }}}, "javax.swing.PopupFactory.HeavyWeightPopup");
47905 Clazz_defineMethod (c$, "hide", 
47906 function () {
47907 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []);
47908 javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this);
47909 });
47910 Clazz_defineMethod (c$, "dispose", 
47911 function () {
47912 });
47913 Clazz_defineMethod (c$, "_dispose", 
47914 function () {
47915 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []);
47916 });
47917 c$.$PopupFactory$HeavyWeightPopup$1$ = function () {
47918 Clazz_pu$h(self.c$);
47919 c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter);
47920 Clazz_overrideMethod (c$, "windowClosed", 
47921 function (a) {
47922 var b;
47923 {
47924 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47925 b = c.remove (this.f$.e);
47926 }if (b != null) {
47927 for (var c = b.size () - 1; c >= 0; c--) {
47928 (b.get (c))._dispose ();
47929 }
47930 }}, "java.awt.event.WindowEvent");
47931 c$ = Clazz_p0p ();
47932 };
47933 c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey =  new Clazz._O ();
47934 c$ = Clazz_p0p ();
47935 Clazz_pu$h(self.c$);
47936 c$ = Clazz_decorateAsClass (function () {
47937 this.owner = null;
47938 this.x = 0;
47939 this.y = 0;
47940 Clazz_instantialize (this, arguments);
47941 }, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup);
47942 Clazz_overrideMethod (c$, "hide", 
47943 function () {
47944 var a = this.getComponent ();
47945 if (a != null) {
47946 var b = a.getParent ();
47947 if (b != null) {
47948 var c = a.getBounds ();
47949 b.remove (a);
47950 b.repaint (c.x, c.y, c.width, c.height);
47951 }}this.owner = null;
47952 });
47953 Clazz_overrideMethod (c$, "pack", 
47954 function () {
47955 var a = this.getComponent ();
47956 if (a != null) {
47957 a.setSize (a.getPreferredSize ());
47958 }});
47959 Clazz_defineMethod (c$, "reset", 
47960 function (a, b, c, d) {
47961 if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) {
47962 a = (a).getLayeredPane ();
47963 }Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]);
47964 this.x = c;
47965 this.y = d;
47966 this.owner = a;
47967 }, "java.awt.Component,java.awt.Component,~N,~N");
47968 Clazz_defineMethod (c$, "overlappedByOwnedWindow", 
47969 function () {
47970 var a = this.getComponent ();
47971 if (this.owner != null && a != null) {
47972 var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner);
47973 if (b == null) {
47974 return false;
47975 }var c = b.getOwnedWindows ();
47976 if (c != null) {
47977 var d = a.getBounds ();
47978 for (var e = 0; e < c.length; e++) {
47979 var f = c[e];
47980 if (f.isVisible () && d.intersects (f.getBounds ())) {
47981 return true;
47982 }}
47983 }}return false;
47984 });
47985 Clazz_defineMethod (c$, "fitsOnScreen", 
47986 function () {
47987 var a = this.getComponent ();
47988 if (this.owner != null && a != null) {
47989 var b;
47990 var c = a.getWidth ();
47991 var d = a.getHeight ();
47992 for (b = this.owner.getParent (); b != null; b = b.getParent ()) {
47993 if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) {
47994 var e = b.getBounds ();
47995 var f = b.getInsets ();
47996 e.x += f.left;
47997 e.y += f.top;
47998 e.width -= (f.left + f.right);
47999 e.height -= (f.top + f.bottom);
48000 var g = b.getGraphicsConfiguration ();
48001 var h = this.getContainerPopupArea (g);
48002 return e.intersection (h).contains (this.x, this.y, c, d);
48003 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48004 var e = b.getBounds ();
48005 var f = b.getLocationOnScreen ();
48006 e.x = f.x;
48007 e.y = f.y;
48008 return e.contains (this.x, this.y, c, d);
48009 } else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) {
48010 break;
48011 }}
48012 }return false;
48013 });
48014 Clazz_defineMethod (c$, "getContainerPopupArea", 
48015 function (a) {
48016 var b;
48017 var c = java.awt.Toolkit.getDefaultToolkit ();
48018 var d;
48019 if (a != null) {
48020 b = a.getBounds ();
48021 d = c.getScreenInsets (a);
48022 } else {
48023 b =  new java.awt.Rectangle (c.getScreenSize ());
48024 d =  new java.awt.Insets (0, 0, 0, 0);
48025 }b.x += d.left;
48026 b.y += d.top;
48027 b.width -= (d.left + d.right);
48028 b.height -= (d.top + d.bottom);
48029 return b;
48030 }, "java.awt.GraphicsConfiguration");
48031 c$ = Clazz_p0p ();
48032 Clazz_pu$h(self.c$);
48033 c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48034 c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", 
48035 function (a, b, c, d) {
48036 var e = null;
48037 if (e == null) {
48038 e =  new javax.swing.PopupFactory.LightWeightPopup ();
48039 }e.reset (a, b, c, d);
48040 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48041 e.hide ();
48042 return null;
48043 }return e;
48044 }, "java.awt.Component,java.awt.Component,~N,~N");
48045 Clazz_defineMethod (c$, "hide", 
48046 function () {
48047 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []);
48048 var a = this.getComponent ();
48049 a.removeAll ();
48050 });
48051 Clazz_overrideMethod (c$, "show", 
48052 function () {
48053 var a = null;
48054 if (this.owner != null) {
48055 a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ());
48056 }for (var b = a; b != null; b = b.getParent ()) {
48057 if (Clazz_instanceOf (b, javax.swing.JRootPane)) {
48058 a = (b).getLayeredPane ();
48059 } else if (Clazz_instanceOf (b, java.awt.Window)) {
48060 if (a == null) {
48061 a = b;
48062 }break;
48063 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48064 break;
48065 }}
48066 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y);
48067 var d = this.getComponent ();
48068 d.setLocation (c.x, c.y);
48069 if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) {
48070 (a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48071 } else {
48072 a.add (d);
48073 }});
48074 Clazz_overrideMethod (c$, "createComponent", 
48075 function (a) {
48076 var b =  new javax.swing.JPanel ( new java.awt.BorderLayout (), true);
48077 b.setOpaque (true);
48078 return b;
48079 }, "java.awt.Component");
48080 Clazz_defineMethod (c$, "reset", 
48081 function (a, b, c, d) {
48082 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]);
48083 var e = this.getComponent ();
48084 e.setOpaque (b.isOpaque ());
48085 e.setLocation (c, d);
48086 e.add (b, "Center");
48087 b.invalidate ();
48088 this.pack ();
48089 }, "java.awt.Component,java.awt.Component,~N,~N");
48090 c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey =  new Clazz._O ();
48091 c$ = Clazz_p0p ();
48092 Clazz_pu$h(self.c$);
48093 c$ = Clazz_decorateAsClass (function () {
48094 this.rootPane = null;
48095 Clazz_instantialize (this, arguments);
48096 }, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48097 c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", 
48098 function (a, b, c, d) {
48099 var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup ();
48100 if (e == null) {
48101 e =  new javax.swing.PopupFactory.MediumWeightPopup ();
48102 }e.reset (a, b, c, d);
48103 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48104 e.hide ();
48105 return null;
48106 }return e;
48107 }, "java.awt.Component,java.awt.Component,~N,~N");
48108 c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", 
48109  function () {
48110 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey);
48111 if (a == null) {
48112 a =  new java.util.ArrayList ();
48113 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a);
48114 }return a;
48115 });
48116 c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", 
48117  function (a) {
48118 {
48119 var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48120 if (b.size () < 5) {
48121 b.add (a);
48122 }}}, "javax.swing.PopupFactory.MediumWeightPopup");
48123 c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", 
48124  function () {
48125 {
48126 var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48127 var b;
48128 if ((b = a.size ()) > 0) {
48129 var c = a.get (0);
48130 a.remove (0);
48131 return c;
48132 }return null;
48133 }});
48134 Clazz_defineMethod (c$, "hide", 
48135 function () {
48136 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []);
48137 this.rootPane.getContentPane ().removeAll ();
48138 javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this);
48139 });
48140 Clazz_overrideMethod (c$, "show", 
48141 function () {
48142 var a = this.getComponent ();
48143 var b = null;
48144 if (this.owner != null) {
48145 b = this.owner.getParent ();
48146 }while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) {
48147 b = b.getParent ();
48148 }
48149 if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) {
48150 b = (b).getLayeredPane ();
48151 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48152 a.setVisible (false);
48153 a.setLocation (c.x, c.y);
48154 (b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48155 } else {
48156 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48157 a.setLocation (c.x, c.y);
48158 a.setVisible (false);
48159 b.add (a);
48160 }a.setVisible (true);
48161 });
48162 Clazz_overrideMethod (c$, "createComponent", 
48163 function (a) {
48164 var b =  new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent ();
48165 this.rootPane =  new javax.swing.JRootPane ();
48166 this.rootPane.setOpaque (true);
48167 b.add (this.rootPane, "Center");
48168 return b;
48169 }, "java.awt.Component");
48170 Clazz_defineMethod (c$, "reset", 
48171 function (a, b, c, d) {
48172 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]);
48173 var e = this.getComponent ();
48174 e.setLocation (c, d);
48175 this.rootPane.getContentPane ().add (b, "Center");
48176 b.invalidate ();
48177 e.validate ();
48178 this.pack ();
48179 }, "java.awt.Component,java.awt.Component,~N,~N");
48180 Clazz_pu$h(self.c$);
48181 c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight);
48182 Clazz_makeConstructor (c$, 
48183 function () {
48184 Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]);
48185 });
48186 c$ = Clazz_p0p ();
48187 c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey =  new Clazz._O ();
48188 c$ = Clazz_p0p ();
48189 c$.SharedInstanceKey = c$.prototype.SharedInstanceKey =  new Clazz._O ();
48190 Clazz_defineStatics (c$,
48191 "MAX_CACHE_SIZE", 5,
48192 "LIGHT_WEIGHT_POPUP", 0,
48193 "MEDIUM_WEIGHT_POPUP", 1,
48194 "HEAVY_WEIGHT_POPUP", 2);
48195 });
48196 Clazz_declarePackage ("javax.swing");
48197 Clazz_load (["java.awt.Frame", "javax.swing.JWindow"], "javax.swing.Popup", ["java.lang.IllegalArgumentException", "java.awt.Toolkit", "$.Window", "javax.swing.SwingUtilities", "jssun.awt.SunToolkit"], function () {
48198 c$ = Clazz_decorateAsClass (function () {
48199 this.component = null;
48200 Clazz_instantialize (this, arguments);
48201 }, javax.swing, "Popup");
48202 Clazz_makeConstructor (c$, 
48203 function (owner, contents, x, y) {
48204 this.construct ();
48205 if (contents == null) {
48206 throw  new IllegalArgumentException ("Contents must be non-null");
48207 }this.reset (owner, contents, x, y);
48208 }, "java.awt.Component,java.awt.Component,~N,~N");
48209 Clazz_makeConstructor (c$, 
48210 function () {
48211 });
48212 Clazz_defineMethod (c$, "show", 
48213 function () {
48214 var component = this.getComponent ();
48215 if (component != null) {
48216 component.show ();
48217 }});
48218 Clazz_defineMethod (c$, "hide", 
48219 function () {
48220 var component = this.getComponent ();
48221 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48222 component.hide ();
48223 (component).getContentPane ().removeAll ();
48224 }this.dispose ();
48225 });
48226 Clazz_defineMethod (c$, "dispose", 
48227 function () {
48228 var component = this.getComponent ();
48229 var window = javax.swing.SwingUtilities.getWindowAncestor (component);
48230 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48231 (component).dispose ();
48232 component = null;
48233 }if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) {
48234 window.dispose ();
48235 }});
48236 Clazz_defineMethod (c$, "reset", 
48237 function (owner, contents, ownerX, ownerY) {
48238 if (this.getComponent () == null) {
48239 this.component = this.createComponent (owner);
48240 }var c = this.getComponent ();
48241 if (Clazz_instanceOf (c, javax.swing.JWindow)) {
48242 var component = this.getComponent ();
48243 component.setLocation (ownerX, ownerY);
48244 component.getContentPane ().add (contents, "Center");
48245 contents.invalidate ();
48246 if (component.isVisible ()) {
48247 this.pack ();
48248 }}}, "java.awt.Component,java.awt.Component,~N,~N");
48249 Clazz_defineMethod (c$, "pack", 
48250 function () {
48251 var component = this.getComponent ();
48252 if (Clazz_instanceOf (component, java.awt.Window)) {
48253 (component).pack ();
48254 }});
48255 Clazz_defineMethod (c$, "getParentWindow", 
48256  function (owner) {
48257 var window = null;
48258 if (Clazz_instanceOf (owner, java.awt.Window)) {
48259 window = owner;
48260 } else if (owner != null) {
48261 window = javax.swing.SwingUtilities.getWindowAncestor (owner);
48262 }if (window == null) {
48263 window =  new javax.swing.Popup.DefaultFrame ();
48264 }return window;
48265 }, "java.awt.Component");
48266 Clazz_defineMethod (c$, "createComponent", 
48267 function (owner) {
48268 return  new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner));
48269 }, "java.awt.Component");
48270 Clazz_defineMethod (c$, "getComponent", 
48271 function () {
48272 return this.component;
48273 });
48274 Clazz_pu$h(self.c$);
48275 c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow);
48276 Clazz_makeConstructor (c$, 
48277 function (a) {
48278 Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]);
48279 this.setFocusableWindowState (false);
48280 var b = java.awt.Toolkit.getDefaultToolkit ();
48281 if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) {
48282 (b).setOverrideRedirect (this);
48283 }this.getRootPane ().setUseTrueDoubleBuffering (false);
48284 try {
48285 this.setAlwaysOnTop (true);
48286 } catch (se) {
48287 if (Clazz_exceptionOf (se, SecurityException)) {
48288 } else {
48289 throw se;
48290 }
48291 }
48292 }, "java.awt.Window");
48293 Clazz_overrideMethod (c$, "update", 
48294 function (a) {
48295 this.paint (a);
48296 }, "java.awt.Graphics");
48297 Clazz_defineMethod (c$, "show", 
48298 function () {
48299 this.pack ();
48300 if (this.getWidth () > 0 && this.getHeight () > 0) {
48301 Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []);
48302 }});
48303 c$ = Clazz_p0p ();
48304 Clazz_pu$h(self.c$);
48305 c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame);
48306 c$ = Clazz_p0p ();
48307 });
48308 Clazz_declarePackage ("javax.swing");
48309 Clazz_declareInterface (javax.swing, "SwingHeavyWeight");
48310 Clazz_declarePackage ("javax.swing");
48311 Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () {
48312 c$ = Clazz_decorateAsClass (function () {
48313 this.tipText = null;
48314 this.$component = null;
48315 Clazz_instantialize (this, arguments);
48316 }, javax.swing, "JToolTip", javax.swing.JComponent);
48317 Clazz_makeConstructor (c$, 
48318 function () {
48319 Clazz_superConstructor (this, javax.swing.JToolTip, []);
48320 this.setOpaque (true);
48321 this.updateUI ();
48322 });
48323 Clazz_overrideMethod (c$, "getUI", 
48324 function () {
48325 return this.ui;
48326 });
48327 Clazz_overrideMethod (c$, "updateUI", 
48328 function () {
48329 this.setUI (javax.swing.UIManager.getUI (this));
48330 });
48331 Clazz_overrideMethod (c$, "getUIClassID", 
48332 function () {
48333 return "ToolTipUI";
48334 });
48335 Clazz_defineMethod (c$, "setTipText", 
48336 function (tipText) {
48337 var oldValue = this.tipText;
48338 this.tipText = tipText;
48339 this.firePropertyChangeObject ("tiptext", oldValue, tipText);
48340 }, "~S");
48341 Clazz_defineMethod (c$, "getTipText", 
48342 function () {
48343 return this.tipText;
48344 });
48345 Clazz_defineMethod (c$, "setComponent", 
48346 function (c) {
48347 var oldValue = this.$component;
48348 this.$component = c;
48349 this.firePropertyChangeObject ("component", oldValue, c);
48350 }, "javax.swing.JComponent");
48351 Clazz_defineMethod (c$, "getComponent", 
48352 function () {
48353 return this.$component;
48354 });
48355 Clazz_overrideMethod (c$, "alwaysOnTop", 
48356 function () {
48357 return true;
48358 });
48359 Clazz_defineMethod (c$, "paramString", 
48360 function () {
48361 var tipTextString = (this.tipText != null ? this.tipText : "");
48362 return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString;
48363 });
48364 Clazz_defineStatics (c$,
48365 "$uiClassID", "ToolTipUI");
48366 });
48367 Clazz_declarePackage ("javax.swing.event");
48368 Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () {
48369 c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject);
48370 });
48371 Clazz_declarePackage ("javax.swing.event");
48372 Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () {
48373 Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener);
48374 });
48375 Clazz_declarePackage ("javax.swing.event");
48376 Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () {
48377 c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject);
48378 });
48379 Clazz_declarePackage ("javax.swing.event");
48380 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () {
48381 Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener);
48382 });
48383 Clazz_declarePackage ("javax.swing.border");
48384 Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () {
48385 c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border);
48386 Clazz_overrideMethod (c$, "paintBorder", 
48387 function (c, g, x, y, width, height) {
48388 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
48389 Clazz_defineMethod (c$, "getBorderInsets", 
48390 function (c) {
48391 return  new java.awt.Insets (0, 0, 0, 0);
48392 }, "java.awt.Component");
48393 Clazz_defineMethod (c$, "getBorderInsets", 
48394 function (c, insets) {
48395 insets.left = insets.top = insets.right = insets.bottom = 0;
48396 return insets;
48397 }, "java.awt.Component,java.awt.Insets");
48398 Clazz_overrideMethod (c$, "isBorderOpaque", 
48399 function () {
48400 return false;
48401 });
48402 Clazz_defineMethod (c$, "getInteriorRectangle", 
48403 function (c, x, y, width, height) {
48404 return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height);
48405 }, "java.awt.Component,~N,~N,~N,~N");
48406 c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", 
48407 function (c, b, x, y, width, height) {
48408 var insets;
48409 if (b != null) insets = b.getBorderInsets (c);
48410  else insets =  new java.awt.Insets (0, 0, 0, 0);
48411 return  new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
48412 }, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N");
48413 Clazz_defineMethod (c$, "getBaseline", 
48414 function (c, width, height) {
48415 if (width < 0 || height < 0) {
48416 throw  new IllegalArgumentException ("Width and height must be >= 0");
48417 }return -1;
48418 }, "java.awt.Component,~N,~N");
48419 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
48420 function (c) {
48421 if (c == null) {
48422 throw  new NullPointerException ("Component must be non-null");
48423 }return java.awt.Component.BaselineResizeBehavior.OTHER;
48424 }, "java.awt.Component");
48425 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
48426 function (c) {
48427 return c.getComponentOrientation ().isLeftToRight ();
48428 }, "java.awt.Component");
48429 });
48430 Clazz_declarePackage ("jssun.awt");
48431 Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () {
48432 c$ = Clazz_decorateAsClass (function () {
48433 this.flags = 0;
48434 Clazz_instantialize (this, arguments);
48435 }, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent);
48436 Clazz_makeConstructor (c$, 
48437 function (source, runnable, flags) {
48438 this.construct (source, runnable, null, false, flags);
48439 }, "~O,Runnable,~N");
48440 Clazz_makeConstructor (c$, 
48441 function (source, runnable, notifier, catchExceptions, flags) {
48442 Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]);
48443 this.flags = flags;
48444 }, "~O,Runnable,~O,~B,~N");
48445 Clazz_defineMethod (c$, "getFlags", 
48446 function () {
48447 return this.flags;
48448 });
48449 Clazz_defineMethod (c$, "coalesceEvents", 
48450 function (newEvent) {
48451 return null;
48452 }, "jssun.awt.PeerEvent");
48453 Clazz_defineStatics (c$,
48454 "PRIORITY_EVENT", 0x01,
48455 "ULTIMATE_PRIORITY_EVENT", 0x02,
48456 "LOW_PRIORITY_EVENT", 0x04);
48457 });
48458 Clazz_declarePackage ("jssun.awt.image");
48459 Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () {
48460 c$ = Clazz_decorateAsClass (function () {
48461 this.url = null;
48462 this.conn = null;
48463 this.actualHost = null;
48464 this.actualPort = 0;
48465 Clazz_instantialize (this, arguments);
48466 }, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource);
48467 Clazz_makeConstructor (c$, 
48468 function (u) {
48469 Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []);
48470 this.url = u;
48471 }, "java.net.URL");
48472 Clazz_makeConstructor (c$, 
48473 function (href) {
48474 this.construct ( new java.net.URL (null, href));
48475 }, "~S");
48476 Clazz_makeConstructor (c$, 
48477 function (u, uc) {
48478 this.construct (u);
48479 this.conn = uc;
48480 }, "java.net.URL,java.net.URLConnection");
48481 Clazz_makeConstructor (c$, 
48482 function (uc) {
48483 this.construct (uc.getURL (), uc);
48484 }, "java.net.URLConnection");
48485 Clazz_overrideMethod (c$, "checkSecurity", 
48486 function (context, quiet) {
48487 if (this.actualHost != null) {
48488 try {
48489 var security = System.getSecurityManager ();
48490 if (security != null) {
48491 security.checkConnect (this.actualHost, this.actualPort, context);
48492 }} catch (e) {
48493 if (Clazz_exceptionOf (e, SecurityException)) {
48494 if (!quiet) {
48495 throw e;
48496 }return false;
48497 } else {
48498 throw e;
48499 }
48500 }
48501 }return true;
48502 }, "~O,~B");
48503 Clazz_defineMethod (c$, "getDecoder", 
48504 function () {
48505 return null;
48506 });
48507 });
48508 Clazz_declarePackage ("jssun.awt.image");
48509 Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () {
48510 c$ = Clazz_decorateAsClass (function () {
48511 this.consumers = null;
48512 this.decoder = null;
48513 this.decoders = null;
48514 this.awaitingFetch = false;
48515 Clazz_instantialize (this, arguments);
48516 }, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]);
48517 Clazz_defineMethod (c$, "countConsumers", 
48518 function (cq) {
48519 var i = 0;
48520 while (cq != null) {
48521 i++;
48522 cq = cq.next;
48523 }
48524 return i;
48525 }, "jssun.awt.image.ImageConsumerQueue");
48526 Clazz_defineMethod (c$, "countConsumers", 
48527 function () {
48528 var id = this.decoders;
48529 var i = this.countConsumers (this.consumers);
48530 while (id != null) {
48531 i += this.countConsumers (id.queue);
48532 id = id.next;
48533 }
48534 return i;
48535 });
48536 Clazz_defineMethod (c$, "addConsumer", 
48537 function (ic) {
48538 this.addConsumer (ic, false);
48539 }, "java.awt.image.ImageConsumer");
48540 Clazz_defineMethod (c$, "printQueue", 
48541 function (cq, prefix) {
48542 while (cq != null) {
48543 System.out.println (prefix + cq);
48544 cq = cq.next;
48545 }
48546 }, "jssun.awt.image.ImageConsumerQueue,~S");
48547 Clazz_defineMethod (c$, "printQueues", 
48548 function (title) {
48549 System.out.println (title + "[ -----------");
48550 this.printQueue (this.consumers, "  ");
48551 for (var id = this.decoders; id != null; id = id.next) {
48552 System.out.println ("    " + id);
48553 this.printQueue (id.queue, "      ");
48554 }
48555 System.out.println ("----------- ]" + title);
48556 }, "~S");
48557 Clazz_defineMethod (c$, "addConsumer", 
48558 function (ic, produce) {
48559 for (var id = this.decoders; id != null; id = id.next) {
48560 if (id.isConsumer (ic)) {
48561 return;
48562 }}
48563 var cq = this.consumers;
48564 while (cq != null && cq.consumer !== ic) {
48565 cq = cq.next;
48566 }
48567 if (cq == null) {
48568 cq =  new jssun.awt.image.ImageConsumerQueue (this, ic);
48569 cq.next = this.consumers;
48570 this.consumers = cq;
48571 } else {
48572 if (!cq.secure) {
48573 var context = null;
48574 var security = System.getSecurityManager ();
48575 if (security != null) {
48576 context = security.getSecurityContext ();
48577 }if (cq.securityContext == null) {
48578 cq.securityContext = context;
48579 } else if (!cq.securityContext.equals (context)) {
48580 this.errorConsumer (cq, false);
48581 throw  new SecurityException ("Applets are trading image data!");
48582 }}cq.interested = true;
48583 }if (produce && this.decoder == null) {
48584 this.startProduction ();
48585 }}, "java.awt.image.ImageConsumer,~B");
48586 Clazz_overrideMethod (c$, "isConsumer", 
48587 function (ic) {
48588 for (var id = this.decoders; id != null; id = id.next) {
48589 if (id.isConsumer (ic)) {
48590 return true;
48591 }}
48592 return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic);
48593 }, "java.awt.image.ImageConsumer");
48594 Clazz_defineMethod (c$, "errorAllConsumers", 
48595  function (cq, needReload) {
48596 while (cq != null) {
48597 if (cq.interested) {
48598 this.errorConsumer (cq, needReload);
48599 }cq = cq.next;
48600 }
48601 }, "jssun.awt.image.ImageConsumerQueue,~B");
48602 Clazz_defineMethod (c$, "errorConsumer", 
48603  function (cq, needReload) {
48604 cq.consumer.imageComplete (1);
48605 this.removeConsumer (cq.consumer);
48606 }, "jssun.awt.image.ImageConsumerQueue,~B");
48607 Clazz_overrideMethod (c$, "removeConsumer", 
48608 function (ic) {
48609 for (var id = this.decoders; id != null; id = id.next) {
48610 id.removeConsumer (ic);
48611 }
48612 this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false);
48613 }, "java.awt.image.ImageConsumer");
48614 Clazz_defineMethod (c$, "startProduction", 
48615 function (ic) {
48616 this.addConsumer (ic, true);
48617 }, "java.awt.image.ImageConsumer");
48618 Clazz_defineMethod (c$, "startProduction", 
48619  function () {
48620 if (!this.awaitingFetch) {
48621 jssun.awt.image.ImageFetcher.add (this);
48622 this.awaitingFetch = true;
48623 }});
48624 Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", 
48625 function (ic) {
48626 }, "java.awt.image.ImageConsumer");
48627 Clazz_defineMethod (c$, "decoderForType", 
48628 function (is, content_type) {
48629 return null;
48630 }, "java.io.InputStream,~S");
48631 Clazz_defineMethod (c$, "getDecoder", 
48632 function (is) {
48633 return null;
48634 }, "java.io.InputStream");
48635 Clazz_overrideMethod (c$, "doFetch", 
48636 function () {
48637 {
48638 if (this.consumers == null) {
48639 this.awaitingFetch = false;
48640 return;
48641 }}var imgd = this.getDecoder ();
48642 if (imgd == null) {
48643 this.badDecoder ();
48644 } else {
48645 this.setDecoder (imgd);
48646 try {
48647 imgd.produceImage ();
48648 } catch (e$$) {
48649 if (Clazz_exceptionOf (e$$, java.io.IOException)) {
48650 var e = e$$;
48651 {
48652 e.printStackTrace ();
48653 }
48654 } else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) {
48655 var e = e$$;
48656 {
48657 e.printStackTrace ();
48658 }
48659 } else {
48660 throw e$$;
48661 }
48662 } finally {
48663 this.removeDecoder (imgd);
48664 if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) {
48665 this.errorAllConsumers (imgd.queue, true);
48666 } else {
48667 this.errorAllConsumers (imgd.queue, false);
48668 }}
48669 }});
48670 Clazz_defineMethod (c$, "badDecoder", 
48671  function () {
48672 var cq;
48673 {
48674 cq = this.consumers;
48675 this.consumers = null;
48676 this.awaitingFetch = false;
48677 }this.errorAllConsumers (cq, false);
48678 });
48679 Clazz_defineMethod (c$, "setDecoder", 
48680  function (mydecoder) {
48681 var cq;
48682 {
48683 mydecoder.next = this.decoders;
48684 this.decoders = mydecoder;
48685 this.decoder = mydecoder;
48686 cq = this.consumers;
48687 mydecoder.queue = cq;
48688 this.consumers = null;
48689 this.awaitingFetch = false;
48690 }}, "jssun.awt.image.ImageDecoder");
48691 Clazz_defineMethod (c$, "removeDecoder", 
48692  function (mydecoder) {
48693 this.doneDecoding (mydecoder);
48694 var idprev = null;
48695 for (var id = this.decoders; id != null; id = id.next) {
48696 if (id === mydecoder) {
48697 if (idprev == null) {
48698 this.decoders = id.next;
48699 } else {
48700 idprev.next = id.next;
48701 }break;
48702 }idprev = id;
48703 }
48704 }, "jssun.awt.image.ImageDecoder");
48705 Clazz_defineMethod (c$, "doneDecoding", 
48706 function (mydecoder) {
48707 if (this.decoder === mydecoder) {
48708 this.decoder = null;
48709 if (this.consumers != null) {
48710 this.startProduction ();
48711 }}}, "jssun.awt.image.ImageDecoder");
48712 Clazz_defineMethod (c$, "latchConsumers", 
48713 function (id) {
48714 this.doneDecoding (id);
48715 }, "jssun.awt.image.ImageDecoder");
48716 Clazz_defineMethod (c$, "flush", 
48717 function () {
48718 this.decoder = null;
48719 });
48720 });
48721 Clazz_declarePackage ("java.awt.image");
48722 Clazz_declareInterface (java.awt.image, "ImageProducer");
48723 Clazz_declarePackage ("jssun.awt.image");
48724 Clazz_declareInterface (jssun.awt.image, "ImageFetchable");
48725 Clazz_declarePackage ("jssun.awt.image");
48726 c$ = Clazz_decorateAsClass (function () {
48727 this.next = null;
48728 this.consumer = null;
48729 this.interested = false;
48730 this.securityContext = null;
48731 this.secure = false;
48732 Clazz_instantialize (this, arguments);
48733 }, jssun.awt.image, "ImageConsumerQueue");
48734 c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", 
48735 function (cqbase, ic, stillinterested) {
48736 var cqprev = null;
48737 for (var cq = cqbase; cq != null; cq = cq.next) {
48738 if (cq.consumer === ic) {
48739 if (cqprev == null) {
48740 cqbase = cq.next;
48741 } else {
48742 cqprev.next = cq.next;
48743 }cq.interested = stillinterested;
48744 break;
48745 }cqprev = cq;
48746 }
48747 return cqbase;
48748 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B");
48749 c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", 
48750 function (cqbase, ic) {
48751 for (var cq = cqbase; cq != null; cq = cq.next) {
48752 if (cq.consumer === ic) {
48753 return true;
48754 }}
48755 return false;
48756 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer");
48757 Clazz_makeConstructor (c$, 
48758 function (src, ic) {
48759 this.consumer = ic;
48760 this.interested = true;
48761 this.secure = true;
48762 }, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer");
48763 Clazz_overrideMethod (c$, "toString", 
48764 function () {
48765 return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]");
48766 });
48767 Clazz_declarePackage ("jssun.awt.image");
48768 Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () {
48769 c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread);
48770 Clazz_makeConstructor (c$, 
48771  function (threadGroup, index) {
48772 Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]);
48773 this.setDaemon (true);
48774 }, "ThreadGroup,~N");
48775 c$.add = Clazz_defineMethod (c$, "add", 
48776 function (src) {
48777 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48778 {
48779 if (!info.waitList.contains (src)) {
48780 info.waitList.addElement (src);
48781 if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) {
48782 jssun.awt.image.ImageFetcher.createFetchers (info);
48783 }info.waitList.notify ();
48784 }}}, "jssun.awt.image.ImageFetchable");
48785 c$.remove = Clazz_defineMethod (c$, "remove", 
48786 function (src) {
48787 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48788 {
48789 if (info.waitList.contains (src)) {
48790 info.waitList.removeElement (src);
48791 }}}, "jssun.awt.image.ImageFetchable");
48792 c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", 
48793 function (t) {
48794 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48795 {
48796 for (var i = 0; i < info.fetchers.length; i++) {
48797 if (info.fetchers[i] === t) {
48798 return true;
48799 }}
48800 }return false;
48801 }, "Thread");
48802 c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", 
48803 function () {
48804 return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ());
48805 });
48806 c$.nextImage = Clazz_defineMethod (c$, "nextImage", 
48807  function () {
48808 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48809 {
48810 var src = null;
48811 var end = System.currentTimeMillis () + 5000;
48812 while (src == null) {
48813 while (info.waitList.size () == 0) {
48814 var now = System.currentTimeMillis ();
48815 if (now >= end) {
48816 return null;
48817 }try {
48818 info.numWaiting++;
48819 info.waitList.wait (end - now);
48820 } catch (e) {
48821 if (Clazz_exceptionOf (e, InterruptedException)) {
48822 return null;
48823 } else {
48824 throw e;
48825 }
48826 } finally {
48827 info.numWaiting--;
48828 }
48829 }
48830 src = info.waitList.elementAt (0);
48831 info.waitList.removeElement (src);
48832 }
48833 return src;
48834 }});
48835 Clazz_overrideMethod (c$, "run", 
48836 function () {
48837 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48838 try {
48839 this.fetchloop ();
48840 } catch (e) {
48841 if (Clazz_exceptionOf (e, Exception)) {
48842 e.printStackTrace ();
48843 } else {
48844 throw e;
48845 }
48846 } finally {
48847 {
48848 var me = Thread.currentThread ();
48849 for (var i = 0; i < info.fetchers.length; i++) {
48850 if (info.fetchers[i] === me) {
48851 info.fetchers[i] = null;
48852 info.numFetchers--;
48853 }}
48854 }}
48855 });
48856 Clazz_defineMethod (c$, "fetchloop", 
48857  function () {
48858 var me = Thread.currentThread ();
48859 while (jssun.awt.image.ImageFetcher.isFetcher (me)) {
48860 Thread.interrupted ();
48861 me.setPriority (8);
48862 var src = jssun.awt.image.ImageFetcher.nextImage ();
48863 if (src == null) {
48864 return;
48865 }try {
48866 src.doFetch ();
48867 } catch (e) {
48868 if (Clazz_exceptionOf (e, Exception)) {
48869 System.err.println ("Uncaught error fetching image:");
48870 e.printStackTrace ();
48871 } else {
48872 throw e;
48873 }
48874 }
48875 jssun.awt.image.ImageFetcher.stoppingAnimation (me);
48876 }
48877 });
48878 c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", 
48879 function () {
48880 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48881 var me = Thread.currentThread ();
48882 {
48883 for (var i = 0; i < info.fetchers.length; i++) {
48884 if (info.fetchers[i] === me) {
48885 info.fetchers[i] = null;
48886 info.numFetchers--;
48887 me.setName ("Image Animator " + i);
48888 if (info.waitList.size () > info.numWaiting) {
48889 jssun.awt.image.ImageFetcher.createFetchers (info);
48890 }return;
48891 }}
48892 }me.setPriority (2);
48893 me.setName ("Image Animator");
48894 });
48895 c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", 
48896  function (me) {
48897 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48898 {
48899 var index = -1;
48900 for (var i = 0; i < info.fetchers.length; i++) {
48901 if (info.fetchers[i] === me) {
48902 return;
48903 }if (info.fetchers[i] == null) {
48904 index = i;
48905 }}
48906 if (index >= 0) {
48907 info.fetchers[index] = me;
48908 info.numFetchers++;
48909 me.setName ("Image Fetcher " + index);
48910 return;
48911 }}}, "Thread");
48912 c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", 
48913  function (info) {
48914 var appContext = jssun.awt.AppContext.getAppContext ();
48915 var threadGroup = appContext.getThreadGroup ();
48916 var fetcherThreadGroup;
48917 try {
48918 if (threadGroup.getParent () != null) {
48919 fetcherThreadGroup = threadGroup;
48920 } else {
48921 threadGroup = Thread.currentThread ().getThreadGroup ();
48922 var parent = threadGroup.getParent ();
48923 while ((parent != null) && (parent.getParent () != null)) {
48924 threadGroup = parent;
48925 parent = threadGroup.getParent ();
48926 }
48927 fetcherThreadGroup = threadGroup;
48928 }} catch (e) {
48929 if (Clazz_exceptionOf (e, SecurityException)) {
48930 fetcherThreadGroup = appContext.getThreadGroup ();
48931 } else {
48932 throw e;
48933 }
48934 }
48935 var fetcherGroup = fetcherThreadGroup;
48936 for (var i = 0; i < info.fetchers.length; i++) {
48937 if (info.fetchers[i] == null) {
48938 info.fetchers[i] =  new jssun.awt.image.ImageFetcher (fetcherGroup, i);
48939 info.fetchers[i].start ();
48940 info.numFetchers++;
48941 break;
48942 }}
48943 return;
48944 }, "jssun.awt.image.FetcherInfo");
48945 Clazz_defineStatics (c$,
48946 "HIGH_PRIORITY", 8,
48947 "LOW_PRIORITY", 3,
48948 "ANIM_PRIORITY", 2,
48949 "TIMEOUT", 5000);
48950 c$ = Clazz_decorateAsClass (function () {
48951 this.fetchers = null;
48952 this.numFetchers = 0;
48953 this.numWaiting = 0;
48954 this.waitList = null;
48955 Clazz_instantialize (this, arguments);
48956 }, jssun.awt.image, "FetcherInfo");
48957 Clazz_makeConstructor (c$, 
48958  function () {
48959 this.fetchers =  new Array (4);
48960 this.numFetchers = 0;
48961 this.numWaiting = 0;
48962 this.waitList =  new java.util.Vector ();
48963 });
48964 c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", 
48965 function () {
48966 var appContext = jssun.awt.AppContext.getAppContext ();
48967 {
48968 var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY);
48969 if (info == null) {
48970 info =  new jssun.awt.image.FetcherInfo ();
48971 appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info);
48972 }return info;
48973 }});
48974 Clazz_defineStatics (c$,
48975 "MAX_NUM_FETCHERS_PER_APPCONTEXT", 4);
48976 c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY =  new StringBuffer ("FetcherInfo");
48977 });
48978 Clazz_declarePackage ("java.awt.event");
48979 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () {
48980 c$ = Clazz_decorateAsClass (function () {
48981 this.temporary = false;
48982 this.opposite = null;
48983 Clazz_instantialize (this, arguments);
48984 }, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent);
48985 Clazz_makeConstructor (c$, 
48986 function (source, id, temporary, opposite) {
48987 Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]);
48988 this.temporary = temporary;
48989 this.opposite = opposite;
48990 }, "java.awt.Component,~N,~B,java.awt.Component");
48991 Clazz_makeConstructor (c$, 
48992 function (source, id, temporary) {
48993 this.construct (source, id, temporary, null);
48994 }, "java.awt.Component,~N,~B");
48995 Clazz_makeConstructor (c$, 
48996 function (source, id) {
48997 this.construct (source, id, false);
48998 }, "java.awt.Component,~N");
48999 Clazz_defineMethod (c$, "isTemporary", 
49000 function () {
49001 return this.temporary;
49002 });
49003 Clazz_defineMethod (c$, "getOppositeComponent", 
49004 function () {
49005 if (this.opposite == null) {
49006 return null;
49007 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
49008 });
49009 Clazz_overrideMethod (c$, "paramString", 
49010 function () {
49011 var typeStr;
49012 switch (this.id) {
49013 case 1004:
49014 typeStr = "FOCUS_GAINED";
49015 break;
49016 case 1005:
49017 typeStr = "FOCUS_LOST";
49018 break;
49019 default:
49020 typeStr = "unknown type";
49021 }
49022 return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent ();
49023 });
49024 Clazz_defineStatics (c$,
49025 "FOCUS_FIRST", 1004,
49026 "FOCUS_LAST", 1005,
49027 "FOCUS_GAINED", 1004,
49028 "FOCUS_LOST", 1005);
49029 });
49030 Clazz_declarePackage ("java.awt.event");
49031 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () {
49032 c$ = Clazz_decorateAsClass (function () {
49033 this.changed = null;
49034 this.changedParent = null;
49035 this.changeFlags = 0;
49036 Clazz_instantialize (this, arguments);
49037 }, java.awt.event, "HierarchyEvent", java.awt.AWTEvent);
49038 Clazz_makeConstructor (c$, 
49039 function (source, id, changed, changedParent) {
49040 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
49041 this.changed = changed;
49042 this.changedParent = changedParent;
49043 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container");
49044 Clazz_makeConstructor (c$, 
49045 function (source, id, changed, changedParent, changeFlags) {
49046 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
49047 this.changed = changed;
49048 this.changedParent = changedParent;
49049 this.changeFlags = changeFlags;
49050 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N");
49051 Clazz_defineMethod (c$, "getComponent", 
49052 function () {
49053 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
49054 });
49055 Clazz_defineMethod (c$, "getChanged", 
49056 function () {
49057 return this.changed;
49058 });
49059 Clazz_defineMethod (c$, "getChangedParent", 
49060 function () {
49061 return this.changedParent;
49062 });
49063 Clazz_defineMethod (c$, "getChangeFlags", 
49064 function () {
49065 return this.changeFlags;
49066 });
49067 Clazz_overrideMethod (c$, "paramString", 
49068 function () {
49069 var typeStr;
49070 switch (this.id) {
49071 case 1401:
49072 typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")";
49073 break;
49074 case 1402:
49075 typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")";
49076 break;
49077 case 1400:
49078 {
49079 typeStr = "HIERARCHY_CHANGED (";
49080 var first = true;
49081 if ((this.changeFlags & 1) != 0) {
49082 first = false;
49083 typeStr += "PARENT_CHANGED";
49084 }if ((this.changeFlags & 2) != 0) {
49085 if (first) {
49086 first = false;
49087 } else {
49088 typeStr += ",";
49089 }typeStr += "DISPLAYABILITY_CHANGED";
49090 }if ((this.changeFlags & 4) != 0) {
49091 if (first) {
49092 first = false;
49093 } else {
49094 typeStr += ",";
49095 }typeStr += "SHOWING_CHANGED";
49096 }if (!first) {
49097 typeStr += ",";
49098 }typeStr += this.changed + "," + this.changedParent + ")";
49099 break;
49100 }default:
49101 typeStr = "unknown type";
49102 }
49103 return typeStr;
49104 });
49105 Clazz_defineStatics (c$,
49106 "HIERARCHY_FIRST", 1400,
49107 "HIERARCHY_CHANGED", 1400,
49108 "ANCESTOR_MOVED", 1401,
49109 "ANCESTOR_RESIZED", 1402,
49110 "HIERARCHY_LAST", 1402,
49111 "PARENT_CHANGED", 0x1,
49112 "DISPLAYABILITY_CHANGED", 0x2,
49113 "SHOWING_CHANGED", 0x4);
49114 });
49115 Clazz_declarePackage ("jssun.awt");
49116 Clazz_declareInterface (jssun.awt, "ConstrainableGraphics");
49117 Clazz_declarePackage ("jssun.awt");
49118 Clazz_declareInterface (jssun.awt, "Graphics2Delegate");
49119 Clazz_declarePackage ("java.awt.event");
49120 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () {
49121 c$ = Clazz_decorateAsClass (function () {
49122 this.child = null;
49123 Clazz_instantialize (this, arguments);
49124 }, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent);
49125 Clazz_makeConstructor (c$, 
49126 function (source, id, child) {
49127 Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]);
49128 this.child = child;
49129 }, "java.awt.Component,~N,java.awt.Component");
49130 Clazz_defineMethod (c$, "getContainer", 
49131 function () {
49132 return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null;
49133 });
49134 Clazz_defineMethod (c$, "getChild", 
49135 function () {
49136 return this.child;
49137 });
49138 Clazz_overrideMethod (c$, "paramString", 
49139 function () {
49140 var typeStr;
49141 switch (this.id) {
49142 case 300:
49143 typeStr = "COMPONENT_ADDED";
49144 break;
49145 case 301:
49146 typeStr = "COMPONENT_REMOVED";
49147 break;
49148 default:
49149 typeStr = "unknown type";
49150 }
49151 return typeStr + ",child=" + this.child.getName ();
49152 });
49153 Clazz_defineStatics (c$,
49154 "CONTAINER_FIRST", 300,
49155 "CONTAINER_LAST", 301,
49156 "COMPONENT_ADDED", 300,
49157 "COMPONENT_REMOVED", 301);
49158 });
49159 Clazz_declarePackage ("jssun.applet");
49160 Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () {
49161 c$ = Clazz_decorateAsClass (function () {
49162 this.arg = null;
49163 this.id = 0;
49164 Clazz_instantialize (this, arguments);
49165 }, jssun.applet, "AppletEvent", java.util.EventObject);
49166 Clazz_makeConstructor (c$, 
49167 function (source, id, argument) {
49168 Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]);
49169 this.arg = argument;
49170 this.id = id;
49171 }, "~O,~N,~O");
49172 Clazz_defineMethod (c$, "getID", 
49173 function () {
49174 return this.id;
49175 });
49176 Clazz_defineMethod (c$, "getArgument", 
49177 function () {
49178 return this.arg;
49179 });
49180 Clazz_overrideMethod (c$, "toString", 
49181 function () {
49182 var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id;
49183 if (this.arg != null) {
49184 str += " + arg=" + this.arg;
49185 }str += " ]";
49186 return str;
49187 });
49188 });
49189 Clazz_declarePackage ("jssun.applet");
49190 Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () {
49191 c$ = Clazz_decorateAsClass (function () {
49192 this.a = null;
49193 this.b = null;
49194 Clazz_instantialize (this, arguments);
49195 }, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener);
49196 Clazz_makeConstructor (c$, 
49197 function (a, b) {
49198 this.a = a;
49199 this.b = b;
49200 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49201 Clazz_defineMethod (c$, "appletStateChanged", 
49202 function (e) {
49203 this.a.appletStateChanged (e);
49204 this.b.appletStateChanged (e);
49205 }, "jssun.applet.AppletEvent");
49206 c$.add = Clazz_defineMethod (c$, "add", 
49207 function (a, b) {
49208 return jssun.applet.AppletEventMulticaster.addInternal (a, b);
49209 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49210 c$.remove = Clazz_defineMethod (c$, "remove", 
49211 function (l, oldl) {
49212 return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl);
49213 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49214 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
49215  function (a, b) {
49216 if (a == null) return b;
49217 if (b == null) return a;
49218 return  new jssun.applet.AppletEventMulticaster (a, b);
49219 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49220 Clazz_defineMethod (c$, "remove", 
49221 function (oldl) {
49222 if (oldl === this.a) return this.b;
49223 if (oldl === this.b) return this.a;
49224 var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl);
49225 var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl);
49226 if (a2 === this.a && b2 === this.b) {
49227 return this;
49228 }return jssun.applet.AppletEventMulticaster.addInternal (a2, b2);
49229 }, "jssun.applet.AppletListener");
49230 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
49231  function (l, oldl) {
49232 if (l === oldl || l == null) {
49233 return null;
49234 } else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) {
49235 return (l).remove (oldl);
49236 } else {
49237 return l;
49238 }}, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49239 });
49240 Clazz_declarePackage ("jssun.applet");
49241 Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () {
49242 Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener);
49243 });
49244 Clazz_declarePackage ("jssun.misc");
49245 Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {
49246 c$ = Clazz_decorateAsClass (function () {
49247 this.length = 0;
49248 this.head = null;
49249 this.tail = null;
49250 Clazz_instantialize (this, arguments);
49251 }, jssun.misc, "Queue");
49252 Clazz_makeConstructor (c$, 
49253 function () {
49254 });
49255 Clazz_defineMethod (c$, "enqueue", 
49256 function (obj) {
49257 var newElt =  new jssun.misc.QueueElement (obj);
49258 if (this.head == null) {
49259 this.head = newElt;
49260 this.tail = newElt;
49261 this.length = 1;
49262 } else {
49263 newElt.next = this.head;
49264 this.head.prev = newElt;
49265 this.head = newElt;
49266 this.length++;
49267 }this.notify ();
49268 }, "~O");
49269 Clazz_defineMethod (c$, "dequeue", 
49270 function () {
49271 return this.dequeue (0);
49272 });
49273 Clazz_defineMethod (c$, "dequeue", 
49274 function (timeOut) {
49275 while (this.tail == null) {
49276 swingjs.JSToolkit.warn ("Cannot wait in Queue.java");
49277 this.wait (timeOut);
49278 }
49279 var elt = this.tail;
49280 this.tail = elt.prev;
49281 if (this.tail == null) {
49282 this.head = null;
49283 } else {
49284 this.tail.next = null;
49285 }this.length--;
49286 return elt.obj;
49287 }, "~N");
49288 Clazz_defineMethod (c$, "isEmpty", 
49289 function () {
49290 return (this.tail == null);
49291 });
49292 Clazz_defineMethod (c$, "elements", 
49293 function () {
49294 return  new jssun.misc.LIFOQueueEnumerator (this);
49295 });
49296 Clazz_defineMethod (c$, "reverseElements", 
49297 function () {
49298 return  new jssun.misc.FIFOQueueEnumerator (this);
49299 });
49300 Clazz_defineMethod (c$, "dump", 
49301 function (msg) {
49302 System.err.println (">> " + msg);
49303 System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));
49304 var cursor = this.head;
49305 var last = null;
49306 while (cursor != null) {
49307 System.err.println ("  " + cursor);
49308 last = cursor;
49309 cursor = cursor.next;
49310 }
49311 if (last !== this.tail) {
49312 System.err.println ("  tail != last: " + this.tail + ", " + last);
49313 }System.err.println ("]");
49314 }, "~S");
49315 c$ = Clazz_decorateAsClass (function () {
49316 this.queue = null;
49317 this.cursor = null;
49318 Clazz_instantialize (this, arguments);
49319 }, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);
49320 Clazz_makeConstructor (c$, 
49321 function (q) {
49322 this.queue = q;
49323 this.cursor = q.tail;
49324 }, "jssun.misc.Queue");
49325 Clazz_overrideMethod (c$, "hasMoreElements", 
49326 function () {
49327 return (this.cursor != null);
49328 });
49329 Clazz_overrideMethod (c$, "nextElement", 
49330 function () {
49331 {
49332 if (this.cursor != null) {
49333 var result = this.cursor;
49334 this.cursor = this.cursor.prev;
49335 return result.obj;
49336 }}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");
49337 });
49338 c$ = Clazz_decorateAsClass (function () {
49339 this.queue = null;
49340 this.cursor = null;
49341 Clazz_instantialize (this, arguments);
49342 }, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);
49343 Clazz_makeConstructor (c$, 
49344 function (q) {
49345 this.queue = q;
49346 this.cursor = q.head;
49347 }, "jssun.misc.Queue");
49348 Clazz_overrideMethod (c$, "hasMoreElements", 
49349 function () {
49350 return (this.cursor != null);
49351 });
49352 Clazz_overrideMethod (c$, "nextElement", 
49353 function () {
49354 {
49355 if (this.cursor != null) {
49356 var result = this.cursor;
49357 this.cursor = this.cursor.next;
49358 return result.obj;
49359 }}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");
49360 });
49361 c$ = Clazz_decorateAsClass (function () {
49362 this.next = null;
49363 this.prev = null;
49364 this.obj = null;
49365 Clazz_instantialize (this, arguments);
49366 }, jssun.misc, "QueueElement");
49367 Clazz_makeConstructor (c$, 
49368 function (obj) {
49369 this.obj = obj;
49370 }, "~O");
49371 Clazz_overrideMethod (c$, "toString", 
49372 function () {
49373 return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";
49374 });
49375 });
49376 Clazz_declarePackage ("javax.swing.plaf");
49377 Clazz_declareInterface (javax.swing.plaf, "UIResource");
49378 Clazz_declarePackage ("javax.swing.plaf");
49379 Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () {
49380 c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource);
49381 Clazz_makeConstructor (c$, 
49382 function () {
49383 Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []);
49384 });
49385 });
49386 Clazz_declarePackage ("javax.swing.plaf");
49387 Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () {
49388 c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource);
49389 Clazz_makeConstructor (c$, 
49390 function () {
49391 Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []);
49392 });
49393 });
49394 Clazz_declarePackage ("javax.swing.plaf");
49395 Clazz_load (["java.awt.peer.LightweightPeer"], "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () {
49396 c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI", null, java.awt.peer.LightweightPeer);
49397 Clazz_makeConstructor (c$, 
49398 function () {
49399 });
49400 Clazz_defineMethod (c$, "installUI", 
49401 function (c) {
49402 }, "javax.swing.JComponent");
49403 Clazz_defineMethod (c$, "uninstallUI", 
49404 function (c) {
49405 }, "javax.swing.JComponent");
49406 Clazz_defineMethod (c$, "paint", 
49407 function (g, c) {
49408 }, "java.awt.Graphics,javax.swing.JComponent");
49409 Clazz_defineMethod (c$, "update", 
49410 function (g, c) {
49411 }, "java.awt.Graphics,javax.swing.JComponent");
49412 Clazz_defineMethod (c$, "getPreferredSize", 
49413 function (c) {
49414 return null;
49415 }, "javax.swing.JComponent");
49416 Clazz_defineMethod (c$, "getMinimumSize", 
49417 function (c) {
49418 return this.getPreferredSize (c);
49419 }, "javax.swing.JComponent");
49420 Clazz_defineMethod (c$, "getMaximumSize", 
49421 function (c) {
49422 return null;
49423 }, "javax.swing.JComponent");
49424 Clazz_defineMethod (c$, "contains", 
49425 function (c, x, y) {
49426 return c.inside (x, y);
49427 }, "javax.swing.JComponent,~N,~N");
49428 c$.createUI = Clazz_defineMethod (c$, "createUI", 
49429 function (c) {
49430 throw  new Error ("ComponentUI.createUI not implemented.");
49431 }, "javax.swing.JComponent");
49432 Clazz_defineMethod (c$, "getBaseline", 
49433 function (c, width, height) {
49434 return -1;
49435 }, "javax.swing.JComponent,~N,~N");
49436 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
49437 function (c) {
49438 return java.awt.Component.BaselineResizeBehavior.OTHER;
49439 }, "javax.swing.JComponent");
49440 });
49441 Clazz_declarePackage ("javax.swing.plaf");
49442 Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () {
49443 c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource);
49444 });
49445 Clazz_declarePackage ("javax.swing.plaf");
49446 Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () {
49447 c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource);
49448 });
49449 Clazz_declarePackage ("javax.swing.plaf");
49450 Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () {
49451 c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource);
49452 });
49453 Clazz_declarePackage ("swingjs.api");
49454 Clazz_declareInterface (swingjs.api, "JSFunction");
49455 Clazz_declarePackage ("swingjs.api");
49456 Clazz_declareInterface (swingjs.api, "JSInterface");
49457 Clazz_declarePackage ("swingjs.api");
49458 c$ = Clazz_declareType (swingjs.api, "Interface");
49459 c$.getInstanceWithParams = Clazz_defineMethod (c$, "getInstanceWithParams", 
49460 function (name, classes, params) {
49461 try {
49462 var cl = Clazz._4Name (name);
49463 return cl.getConstructor (classes).newInstance (params);
49464 } catch (e) {
49465 if (Clazz_exceptionOf (e, Exception)) {
49466 return null;
49467 } else {
49468 throw e;
49469 }
49470 }
49471 }, "~S,~A,~A");
49472 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49473 function (name, isQuiet) {
49474 try {
49475 {
49476 Clazz._isQuiet = isQuiet;
49477 }System.out.println ("swingjs.api.Interface creating instance of " + name);
49478 var x = Clazz._4Name (name);
49479 {
49480 Clazz._isQuiet = false;
49481 }return (x == null ? null : x.newInstance ());
49482 } catch (e) {
49483 if (Clazz_exceptionOf (e, Exception)) {
49484 System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e);
49485 return null;
49486 } else {
49487 throw e;
49488 }
49489 }
49490 }, "~S,~B");
49491 Clazz_declarePackage ("swingjs.api");
49492 c$ = Clazz_declareType (swingjs.api, "DOMNode");
49493 c$.createElement = Clazz_defineMethod (c$, "createElement", 
49494 function (key, id) {
49495 var obj = null;
49496 {
49497 obj = document.createElement(key);
49498 obj.id = id;
49499 }return obj;
49500 }, "~S,~S");
49501 c$.getParent = Clazz_defineMethod (c$, "getParent", 
49502 function (obj) {
49503 {
49504 return obj.parentNode;
49505 }}, "swingjs.api.DOMNode");
49506 c$.remove = Clazz_defineMethod (c$, "remove", 
49507 function (obj) {
49508 {
49509 try {
49510 var p = obj.parentNode;
49511 p.removeNode(obj);
49512 } catch(e) {};
49513 return p;
49514 }}, "swingjs.api.DOMNode");
49515 c$.add = Clazz_defineMethod (c$, "add", 
49516 function (parent, child) {
49517 {
49518 parent && parent.appendChild(child);
49519 }}, "swingjs.api.DOMNode,swingjs.api.DOMNode");
49520 c$.getAttr = Clazz_defineMethod (c$, "getAttr", 
49521 function (obj, attr) {
49522 {
49523 if (obj)return obj[attr];
49524 }}, "swingjs.api.DOMNode,~S");
49525 Clazz_defineMethod (c$, "getStyle", 
49526 function (style) {
49527 {
49528 if (obj)return obj.style[style];
49529 }}, "~S");
49530 c$.setAttr = Clazz_defineMethod (c$, "setAttr", 
49531 function (obj, attr, val) {
49532 {
49533 obj[attr] = (val == "TRUE" ? true : val);
49534 }return obj;
49535 }, "swingjs.api.DOMNode,~S,~O");
49536 c$.setStyles = Clazz_defineMethod (c$, "setStyles", 
49537 function (obj, attr) {
49538 {
49539 for (var i = 0; i < attr.length;) {
49540 //System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]])
49541 ;
49542 obj.style[attr[i++]] = attr[i++]; }
49543 }return obj;
49544 }, "swingjs.api.DOMNode,~A");
49545 c$.setSize = Clazz_defineMethod (c$, "setSize", 
49546 function (obj, width, height) {
49547 return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]);
49548 }, "swingjs.api.DOMNode,~N,~N");
49549 Clazz_declarePackage ("swingjs");
49550 c$ = Clazz_declareType (swingjs, "JSUtil");
49551 c$.split = Clazz_defineMethod (c$, "split", 
49552 function (text, run) {
49553 if (text.length == 0) return  new Array (0);
49554 var n = 1;
49555 var i = text.indexOf (run);
49556 var lines;
49557 var runLen = run.length;
49558 if (i < 0 || runLen == 0) {
49559 lines =  new Array (1);
49560 lines[0] = text;
49561 return lines;
49562 }var len = text.length - runLen;
49563 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
49564
49565 lines =  new Array (n);
49566 i = 0;
49567 var ipt = 0;
49568 var pt = 0;
49569 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
49570 lines[pt++] = text.substring (i, ipt);
49571 i = ipt + runLen;
49572 }
49573 if (text.indexOf (run, len) != len) len += runLen;
49574 lines[pt] = text.substring (i, len);
49575 return lines;
49576 }, "~S,~S");
49577 Clazz_declarePackage ("swingjs");
49578 Clazz_load (["jssun.awt.SunToolkit"], "swingjs.JSToolkit", ["java.io.BufferedInputStream", "$.ByteArrayInputStream", "$.InputStream", "java.lang.Boolean", "$.Thread", "java.util.Hashtable", "JU.AU", "$.Rdr", "$.SB", "java.awt.Dimension", "java.awt.image.ColorModel", "javax.swing.UIManager", "jssun.awt.AppContext", "swingjs.JSComponentPeer", "swingjs.api.Interface"], function () {
49579 c$ = Clazz_decorateAsClass (function () {
49580 this.imageKit = null;
49581 Clazz_instantialize (this, arguments);
49582 }, swingjs, "JSToolkit", jssun.awt.SunToolkit);
49583 Clazz_makeConstructor (c$, 
49584 function () {
49585 Clazz_superConstructor (this, swingjs.JSToolkit);
49586 System.out.println ("JSToolkit initialized");
49587 });
49588 c$.warn = Clazz_defineMethod (c$, "warn", 
49589 function (msg) {
49590 swingjs.JSToolkit.alert (msg);
49591 }, "~S");
49592 c$.alert = Clazz_defineMethod (c$, "alert", 
49593 function (object) {
49594 {
49595 console.log("[JSToolkit] " + object);
49596 alert("[JSToolkit] " + object);
49597 }}, "~O");
49598 c$.log = Clazz_defineMethod (c$, "log", 
49599 function (msg) {
49600 {
49601 System.out.println(msg);
49602 console.log(msg);
49603 }}, "~S");
49604 c$.confirm = Clazz_defineMethod (c$, "confirm", 
49605 function (msg) {
49606 {
49607 return confirm(msg);
49608 }}, "~S");
49609 c$.prompt = Clazz_defineMethod (c$, "prompt", 
49610 function (msg, defaultRet) {
49611 {
49612 return confirm(msg, defaultRet);
49613 }}, "~S,~S");
49614 c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", 
49615 function (isPost) {
49616 return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY));
49617 }, "~B");
49618 Clazz_overrideMethod (c$, "getScreenSize", 
49619 function () {
49620 var d =  new java.awt.Dimension (0, 0);
49621 var jq = swingjs.JSToolkit.getJQuery ();
49622 {
49623 d.setSize(jq.$(window).width(), jq.$(window).height()); return
49624 d;
49625 }});
49626 Clazz_overrideMethod (c$, "getScreenResolution", 
49627 function () {
49628 return 0;
49629 });
49630 Clazz_overrideMethod (c$, "getColorModel", 
49631 function () {
49632 return java.awt.image.ColorModel.getRGBdefault ();
49633 });
49634 Clazz_overrideMethod (c$, "getFontList", 
49635 function () {
49636 var hardwiredFontList =  Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
49637 return hardwiredFontList;
49638 });
49639 Clazz_overrideMethod (c$, "sync", 
49640 function () {
49641 });
49642 Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", 
49643 function (modalExclusionType) {
49644 return true;
49645 }, "java.awt.Dialog.ModalExclusionType");
49646 Clazz_overrideMethod (c$, "isModalityTypeSupported", 
49647 function (modalityType) {
49648 return false;
49649 }, "java.awt.Dialog.ModalityType");
49650 Clazz_overrideMethod (c$, "isTraySupported", 
49651 function () {
49652 return false;
49653 });
49654 Clazz_overrideMethod (c$, "getScreenWidth", 
49655 function () {
49656 return 0;
49657 });
49658 Clazz_overrideMethod (c$, "getScreenHeight", 
49659 function () {
49660 return 0;
49661 });
49662 Clazz_overrideMethod (c$, "grab", 
49663 function (w) {
49664 }, "java.awt.Window");
49665 Clazz_overrideMethod (c$, "ungrab", 
49666 function (w) {
49667 }, "java.awt.Window");
49668 c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", 
49669 function (t, key, def) {
49670 return def;
49671 }, "~O,~S,~O");
49672 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49673 function (className) {
49674 return swingjs.api.Interface.getInstance (className, false);
49675 }, "~S");
49676 c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", 
49677 function () {
49678 return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc);
49679 });
49680 c$.isFocused = Clazz_defineMethod (c$, "isFocused", 
49681 function (window) {
49682 return false;
49683 }, "java.awt.Window");
49684 c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", 
49685 function (font) {
49686 var css = "";
49687 if (font.isItalic ()) css += "font-style:italic;";
49688 if (font.isBold ()) css += "font-weight:bold;";
49689 css += "font-size:" + font.getSize () + "px;";
49690 css += "font-family:" + font.getFamily () + ";";
49691 return css;
49692 }, "java.awt.Font");
49693 c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", 
49694 function (context, font, text) {
49695 var fontInfo = swingjs.JSToolkit.getCanvasFont (font);
49696 if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d ();
49697 var w = 0;
49698 {
49699 context.font = fontInfo;
49700 w = Math.ceil(context.measureText(text).width);
49701 }return w;
49702 }, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S");
49703 c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", 
49704 function () {
49705 {
49706 if (this.defaultContext == null) this.defaultContext =
49707 document.createElement( 'canvas' ).getContext('2d');
49708 }return swingjs.JSToolkit.defaultContext;
49709 });
49710 c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", 
49711 function (font) {
49712 var strStyle = "";
49713 if (font.isItalic ()) strStyle += "italic ";
49714 if (font.isBold ()) strStyle += "bold ";
49715 return strStyle + font.getSize () + "px " + font.getFamily ();
49716 }, "java.awt.Font");
49717 c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", 
49718 function (font) {
49719 return font.getName ();
49720 }, "java.awt.Font");
49721 Clazz_overrideMethod (c$, "getFontMetrics", 
49722 function (font) {
49723 var fm = font.getFontMetrics ();
49724 if (fm == null) {
49725 fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics");
49726 (fm).setFont (font);
49727 font.setFontMetrics (fm);
49728 }return fm;
49729 }, "java.awt.Font");
49730 c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", 
49731 function (c) {
49732 var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF);
49733 return "#" + s.substring (s.length - 6);
49734 }, "java.awt.Color");
49735 c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", 
49736 function (msg) {
49737 var s = null;
49738 if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl =  new java.util.Hashtable ();
49739 {
49740 s = arguments.callee.caller; s = s.__CLASS_NAME__ ||
49741 s.claxxOwner.__CLASS_NAME__; s += "." +
49742 arguments.callee.caller.exName;
49743 }if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return;
49744 swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE);
49745 System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5)));
49746 }, "~S");
49747 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49748 function () {
49749 {
49750 return Clazz_getStackTrace();
49751 }});
49752 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49753 function (n) {
49754 {
49755 return Clazz_getStackTrace(n);
49756 }}, "~N");
49757 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
49758 function () {
49759 if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults ();
49760 return swingjs.JSToolkit.uid;
49761 });
49762 c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", 
49763 function (target) {
49764 var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true);
49765 if (c != null) c.set (target);
49766 return c;
49767 }, "javax.swing.JComponent");
49768 c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", 
49769 function () {
49770 return Thread.currentThread ().getName () + "_swingdiv";
49771 });
49772 c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", 
49773 function () {
49774 {
49775 if (!window.jQuery) alert(
49776 "jQuery is required for SwingJS, but window.jQuery is not defined."
49777 ); jQuery.$ || (jQuery.$ = jQuery); return(jQuery);
49778 }});
49779 c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", 
49780 function (resourceName, isJavaPath) {
49781 System.out.println ("JSToolkit getting Java resource " + resourceName);
49782 {
49783 return SwingJS.getJavaResource(resourceName, isJavaPath);
49784 }}, "~S,~B");
49785 c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", 
49786 function (runnable) {
49787 var f = null;
49788 {
49789 System.out.println("JST dispatchSystemEvent " +
49790 runnable.run.toString()); f =
49791 function(_JSToolkit_dispatchSystemEvent) {
49792 System.out.println("JST running " +
49793 runnable.run.toString());runnable.run()};
49794 }swingjs.JSToolkit.setTimeout (f, 0, 0);
49795 }, "Runnable");
49796 c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", 
49797 function (event, src, andWait) {
49798 var f = null;
49799 var id = ++swingjs.JSToolkit.dispatchID;
49800 {
49801 f = function()
49802 {
49803 if
49804 (src == null) event.dispatch(); else src.dispatchEvent(event);
49805 };
49806 }if (andWait) swingjs.JSToolkit.invokeAndWait (f, id);
49807  else swingjs.JSToolkit.setTimeout (f, 0, id);
49808 }, "java.awt.AWTEvent,~O,~B");
49809 c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", 
49810 function (f, msDelay, id) {
49811 {
49812 var thread = java.lang.Thread.thisThread;
49813 var thread0 = thread;
49814 var id0 = SwingJS.eventID || 0;
49815 setTimeout(function(_JSToolkit_setTimeout) {
49816 SwingJS.eventID = id;
49817 java.lang.Thread.thisThread = thread;
49818 try {
49819 if (f.run)
49820 f.run();
49821 else
49822 f();
49823 } catch (e) {
49824 var s = "JSToolkit.setTimeout(" + id +"): " + e;
49825 System.out.println(s);
49826 alert(s)}
49827 SwingJS.eventID = id0;
49828 java.lang.Thread.thisThread = thread0;
49829 }, msDelay);
49830 }}, "~O,~N,~N");
49831 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
49832  function (f, id) {
49833 {
49834 var thread = java.lang.Thread.thisThread;
49835 var thread0 = thread;
49836 (function(_JSToolkit_setTimeout) {
49837 var id0 = SwingJS.eventID || 0;
49838 System.out.println("runNow " + id); SwingJS.eventID = id;
49839 java.lang.Thread.thisThread = thread;
49840 if (f.run)
49841 f.run();
49842 else
49843 f();
49844 SwingJS.eventID = id0;
49845 java.lang.Thread.thisThread = thread0;
49846 })();
49847 }}, "swingjs.api.JSFunction,~N");
49848 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
49849 function () {
49850 {
49851 return (!!SwingJS.eventID);
49852 }});
49853 c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", 
49854 function (component, fname, signature) {
49855 {
49856 return component[fname] && component[fname][signature];
49857 }}, "java.awt.Component,~S,~S");
49858 c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", 
49859 function (aname, fname, a, me) {
49860 {
49861 Jmol._readyCallback(aname, fname, true,a, me);
49862 }}, "~S,~S,~O,~O");
49863 c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", 
49864 function (c) {
49865 }, "java.awt.Component");
49866 c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", 
49867 function (c) {
49868 return (c.getAppContext ().getThreadGroup ()).getHtmlApplet ();
49869 }, "javax.swing.JComponent");
49870 c$.taintUI = Clazz_defineMethod (c$, "taintUI", 
49871 function (c) {
49872 {
49873 c.getUI && c.getUI() && c.getUI().setTainted();
49874 }}, "java.awt.Component");
49875 Clazz_overrideMethod (c$, "createComponent", 
49876 function (target) {
49877 System.out.println ("JSToolkit creating LightweightPeer for " + target);
49878 var peer = swingjs.JSToolkit.getUI (target, true);
49879 return (peer == null ?  new swingjs.JSComponentPeer (target) : peer);
49880 }, "java.awt.Component");
49881 c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", 
49882 function (c) {
49883 return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument");
49884 }, "javax.swing.JComponent");
49885 c$.getClassName = Clazz_defineMethod (c$, "getClassName", 
49886 function (c) {
49887 {
49888 return c.__CLASS_NAME__;
49889 }}, "~O");
49890 c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", 
49891 function (bis) {
49892 try {
49893 return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null));
49894 } catch (e) {
49895 if (Clazz_exceptionOf (e, java.io.IOException)) {
49896 return null;
49897 } else {
49898 throw e;
49899 }
49900 }
49901 }, "java.io.BufferedInputStream");
49902 c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", 
49903 function (uri) {
49904 {
49905 return Jmol._getFileData(uri);
49906 }}, "~S");
49907 Clazz_defineMethod (c$, "getFileAsBytes", 
49908 function (filename) {
49909 var data = swingjs.JSToolkit.getFileContents (filename);
49910 var b = null;
49911 if (JU.AU.isAB (data)) b = data;
49912  else if (Clazz_instanceOf (data, String)) b = (data).getBytes ();
49913  else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data);
49914  else if (Clazz_instanceOf (data, java.io.InputStream)) try {
49915 b = JU.Rdr.getLimitedStreamBytes (data, -1);
49916 } catch (e) {
49917 if (Clazz_exceptionOf (e, java.io.IOException)) {
49918 } else {
49919 throw e;
49920 }
49921 }
49922 return JU.AU.ensureSignedBytes (b);
49923 }, "~S");
49924 Clazz_defineMethod (c$, "getImagekit", 
49925  function () {
49926 return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit);
49927 });
49928 Clazz_defineMethod (c$, "createImage", 
49929 function (producer) {
49930 producer.startProduction (null);
49931 return null;
49932 }, "java.awt.image.ImageProducer");
49933 Clazz_defineMethod (c$, "createImage", 
49934 function (filename) {
49935 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1);
49936 }, "~S");
49937 Clazz_defineMethod (c$, "createImage", 
49938 function (url) {
49939 try {
49940 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1);
49941 } catch (e) {
49942 if (Clazz_exceptionOf (e, java.io.IOException)) {
49943 return null;
49944 } else {
49945 throw e;
49946 }
49947 }
49948 }, "java.net.URL");
49949 Clazz_defineMethod (c$, "createImage", 
49950 function (data, imageoffset, imagelength) {
49951 return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength);
49952 }, "~A,~N,~N");
49953 Clazz_overrideMethod (c$, "checkImage", 
49954 function (image, width, height, observer) {
49955 return 63;
49956 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49957 Clazz_overrideMethod (c$, "prepareImage", 
49958 function (image, width, height, observer) {
49959 return true;
49960 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49961 c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", 
49962 function (c) {
49963 var ui = swingjs.JSToolkit.getUI (c, false);
49964 return (ui != null && ui.hasFocus ());
49965 }, "java.awt.Component");
49966 c$.getUI = Clazz_defineMethod (c$, "getUI", 
49967 function (c, isQuiet) {
49968 var ui = null;
49969 {
49970 ui = c.getUI && c.getUI();
49971 }if (ui == null) {
49972 var s = "[JSToolkit] Component " + c.getClass ().getName () + " has no cooresponding JSComponentUI.";
49973 System.out.println (s);
49974 }return ui;
49975 }, "java.awt.Component,~B");
49976 c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", 
49977 function (c) {
49978 var ui = swingjs.JSToolkit.getUI (c, false);
49979 if (ui == null || !ui.isFocusable ()) return false;
49980 var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui)));
49981 swingjs.JSToolkit.setTimeout (r, 50, 0);
49982 return true;
49983 }, "java.awt.Component");
49984 c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", 
49985 function () {
49986 return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor);
49987 });
49988 c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", 
49989 function (g, rule) {
49990 return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule);
49991 }, "swingjs.JSGraphics2D,~N");
49992 c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", 
49993 function (g, img, op, x, y) {
49994 return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y);
49995 }, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
49996 c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", 
49997 function (src, dst, op) {
49998 return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op);
49999 }, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp");
50000 c$.filterImage = Clazz_defineMethod (c$, "filterImage", 
50001 function (src, dst, op) {
50002 return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op);
50003 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp");
50004 c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", 
50005 function (ui, what) {
50006 {
50007 if (what) return getHTML5Applet(ui.c)._z[what];
50008 var c = ui.domNode; var z;
50009 while (c && !(z = c.style["z-index"])) {
50010 c = c.parentNode;
50011 }
50012 return z || 100000;
50013 }}, "swingjs.plaf.JSComponentUI,~S");
50014 Clazz_overrideMethod (c$, "createFrame", 
50015 function (target) {
50016 return this.createWindowPeer (target, true);
50017 }, "java.awt.Frame");
50018 Clazz_overrideMethod (c$, "createWindow", 
50019 function (target) {
50020 return this.createWindowPeer (target, false);
50021 }, "java.awt.Window");
50022 Clazz_defineMethod (c$, "createWindowPeer", 
50023  function (target, isFrame) {
50024 return (swingjs.JSToolkit.getInstance ("swingjs.JSWindowPeer")).setFrame (target, true);
50025 }, "java.awt.Window,~B");
50026 c$.$JSToolkit$1$ = function () {
50027 Clazz_pu$h(self.c$);
50028 c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable);
50029 Clazz_overrideMethod (c$, "run", 
50030 function () {
50031 this.f$.ui.requestFocus (null, false, false, 0, null);
50032 });
50033 c$ = Clazz_p0p ();
50034 };
50035 Clazz_defineStatics (c$,
50036 "gc", null,
50037 "defaultContext", null,
50038 "mapNotImpl", null,
50039 "uid", null,
50040 "dispatchID", 0,
50041 "compositor", null);
50042 });
50043 Clazz_declarePackage ("swingjs");
50044 Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () {
50045 c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent);
50046 Clazz_makeConstructor (c$, 
50047 function (t, r) {
50048 Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]);
50049 }, "swingjs.JSThread,Runnable");
50050 });
50051 Clazz_declarePackage ("swingjs");
50052 Clazz_load (["java.awt.FontMetrics"], "swingjs.JSFontMetrics", ["swingjs.JSToolkit"], function () {
50053 c$ = Clazz_decorateAsClass (function () {
50054 this.fwidths = null;
50055 this.iwidths = null;
50056 this.FIRST_PRINTABLE = 32;
50057 Clazz_instantialize (this, arguments);
50058 }, swingjs, "JSFontMetrics", java.awt.FontMetrics);
50059 Clazz_makeConstructor (c$, 
50060 function () {
50061 Clazz_superConstructor (this, swingjs.JSFontMetrics, [null]);
50062 });
50063 Clazz_defineMethod (c$, "setFont", 
50064 function (f) {
50065 this.font = f;
50066 }, "java.awt.Font");
50067 Clazz_overrideMethod (c$, "getLeading", 
50068 function () {
50069 return Clazz_doubleToInt (this.font.getSize () / 20) + 1;
50070 });
50071 Clazz_overrideMethod (c$, "getAscent", 
50072 function () {
50073 return this.font.getSize ();
50074 });
50075 Clazz_overrideMethod (c$, "getDescent", 
50076 function () {
50077 return Clazz_doubleToInt (this.font.getSize () / 4) + 1;
50078 });
50079 Clazz_defineMethod (c$, "charWidth", 
50080 function (pt) {
50081 {
50082 var spt;
50083 return ((pt + 0 == pt ? pt : (pt = (spt = pt).charCodeAt(0))) < 256 ?
50084 Clazz_floatToInt(this.getWidthsFloat()[pt])
50085 : this.stringWidth(isChar ? spt : String.fromCharCode (pt)));
50086 }}, "~N");
50087 Clazz_overrideMethod (c$, "stringWidth", 
50088 function (s) {
50089 return Clazz_floatToInt (swingjs.JSToolkit.getStringWidth (null, this.font, s));
50090 }, "~S");
50091 Clazz_overrideMethod (c$, "getWidths", 
50092 function () {
50093 if (this.iwidths != null) return this.iwidths;
50094 this.iwidths =  Clazz_newIntArray (256, 0);
50095 this.getWidthsFloat ();
50096 for (var ch = this.FIRST_PRINTABLE; ch < 256; ch++) {
50097 this.iwidths[ch] = Clazz_floatToInt (this.fwidths[ch]);
50098 }
50099 return this.iwidths;
50100 });
50101 Clazz_defineMethod (c$, "getWidthsFloat", 
50102 function () {
50103 if (this.fwidths != null) return this.fwidths;
50104 this.fwidths =  Clazz_newFloatArray (256, 0);
50105 for (var ch = this.FIRST_PRINTABLE; ch < 256; ch++) {
50106 this.fwidths[ch] = swingjs.JSToolkit.getStringWidth (null, this.font, "" + String.fromCharCode (ch));
50107 }
50108 return this.fwidths;
50109 });
50110 });
50111 Clazz_declarePackage ("swingjs");
50112 Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () {
50113 c$ = Clazz_decorateAsClass (function () {
50114 this.isJS = false;
50115 Clazz_instantialize (this, arguments);
50116 }, swingjs, "JSThread", Thread, swingjs.api.JSFunction);
50117 Clazz_makeConstructor (c$, 
50118 function (group, name) {
50119 Clazz_superConstructor (this, swingjs.JSThread, [group, name]);
50120 {
50121 this.isJS = true;
50122 }}, "ThreadGroup,~S");
50123 Clazz_overrideMethod (c$, "run", 
50124 function () {
50125 this.run1 (0);
50126 });
50127 Clazz_defineMethod (c$, "start", 
50128 function () {
50129 {
50130 swingjs.JSToolkit.setTimeout(this, 1, 0);
50131 }});
50132 Clazz_defineMethod (c$, "sleepAndReturn", 
50133 function (delay, state) {
50134 if (!this.isJS) {
50135 Thread.sleep (delay);
50136 return false;
50137 }var me = this;
50138 var r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("me", me, "state", state)));
50139 {
50140 setTimeout(
50141 function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))},
50142 delay
50143 );
50144 }return true;
50145 }, "~N,~N");
50146 c$.$JSThread$1$ = function () {
50147 Clazz_pu$h(self.c$);
50148 c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable);
50149 Clazz_overrideMethod (c$, "run", 
50150 function () {
50151 this.f$.me.run1 (this.f$.state);
50152 });
50153 c$ = Clazz_p0p ();
50154 };
50155 Clazz_defineStatics (c$,
50156 "INIT", 0,
50157 "LOOP", 1,
50158 "DONE", 2);
50159 });
50160 Clazz_declarePackage ("swingjs");
50161 Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () {
50162 c$ = Clazz_decorateAsClass (function () {
50163 this.html5Applet = null;
50164 Clazz_instantialize (this, arguments);
50165 }, swingjs, "JSThreadGroup", ThreadGroup);
50166 Clazz_defineMethod (c$, "setHtmlApplet", 
50167 function (html5Applet) {
50168 this.html5Applet = html5Applet;
50169 }, "swingjs.api.HTML5Applet");
50170 Clazz_defineMethod (c$, "getHtmlApplet", 
50171 function () {
50172 return this.html5Applet;
50173 });
50174 });
50175 Clazz_declarePackage ("swingjs");
50176 Clazz_load (["java.applet.AppletContext", "$.AppletStub", "java.awt.Panel", "swingjs.api.JSInterface", "java.awt.Dimension"], "swingjs.JSAppletPanel", ["java.lang.InstantiationException", "java.net.URL", "java.awt.BorderLayout", "$.Font", "$.Toolkit", "javax.swing.JApplet", "jssun.applet.AppletEvent", "$.AppletEventMulticaster", "swingjs.JSAppletThread", "$.JSGraphics2D", "$.JSMouse", "$.JSThreadGroup", "$.JSToolkit", "$.JSUtil", "swingjs.api.Interface"], function () {
50177 c$ = Clazz_decorateAsClass (function () {
50178 this.params = null;
50179 this.html5Applet = null;
50180 this.fullName = null;
50181 this.appletCodeBase = null;
50182 this.appletIdiomaBase = null;
50183 this.appletDocumentBase = null;
50184 this.maximumSize = 2147483647;
50185 this.appletName = null;
50186 this.syncId = null;
50187 this.testAsync = false;
50188 this.async = false;
50189 this.strJavaVersion = null;
50190 this.strJavaVendor = null;
50191 this.display = null;
50192 this.canvas = null;
50193 this.jsgraphics = null;
50194 this.applet = null;
50195 this.defaultAppletSize = null;
50196 this.currentAppletSize = null;
50197 this.nextStatus = 0;
50198 this.status = 0;
50199 this.listeners = null;
50200 this.mouse = null;
50201 Clazz_instantialize (this, arguments);
50202 }, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]);
50203 Clazz_prepareFields (c$, function () {
50204 this.defaultAppletSize =  new java.awt.Dimension (10, 10);
50205 this.currentAppletSize =  new java.awt.Dimension (10, 10);
50206 });
50207 Clazz_makeConstructor (c$, 
50208 function (params) {
50209 Clazz_superConstructor (this, swingjs.JSAppletPanel, []);
50210 this.setPanel ();
50211 this.set (params);
50212 }, "java.util.Hashtable");
50213 Clazz_defineMethod (c$, "set", 
50214  function (params) {
50215 System.out.println ("JSAppletPanel initializing");
50216 this.params = params;
50217 this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0];
50218 this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0];
50219 this.syncId = this.getParameter ("syncId");
50220 this.fullName = this.htmlName + "__" + this.syncId + "__";
50221 params.put ("fullName", this.fullName);
50222 var o = params.get ("codePath");
50223 if (o == null) o = "../java/";
50224 this.appletCodeBase = o.toString ();
50225 this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma";
50226 o = params.get ("documentBase");
50227 this.appletDocumentBase = (o == null ? "" : o.toString ());
50228 if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100);
50229 this.async = (this.testAsync || params.containsKey ("async"));
50230 var applet = null;
50231 var javaver = "?";
50232 {
50233 if(self.Jmol) { applet =
50234 Jmol._applets[this.htmlName.split("_object")[0]]; javaver =
50235 Jmol._version; }
50236 }this.html5Applet = applet;
50237 this.strJavaVersion = javaver;
50238 this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)";
50239 this.display = params.get ("display");
50240 this.threadGroup =  new swingjs.JSThreadGroup (this.appletName);
50241 this.myThread =  new swingjs.JSAppletThread (this, this.threadGroup, this.appletName);
50242 (this.threadGroup).setHtmlApplet (this.html5Applet);
50243 {
50244 Jmol._applets[this.appletName + "_thread"] =
50245 java.lang.Thread.thisThread = this.myThread;
50246 }this.appContext = swingjs.JSToolkit.createNewAppContext ();
50247 java.awt.Toolkit.getDefaultToolkit ();
50248 try {
50249 java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false));
50250 } catch (e) {
50251 }
50252 System.out.println ("JSAppletPanel initialized");
50253 }, "java.util.Hashtable");
50254 Clazz_defineMethod (c$, "start", 
50255 function () {
50256 if (this.status == 0) this.myThread.start ();
50257  else this.showStatus ("already started");
50258 });
50259 Clazz_defineMethod (c$, "addAppletListener", 
50260 function (l) {
50261 this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l);
50262 }, "jssun.applet.AppletListener");
50263 Clazz_defineMethod (c$, "removeAppletListener", 
50264 function (l) {
50265 this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l);
50266 }, "jssun.applet.AppletListener");
50267 Clazz_defineMethod (c$, "dispatchAppletEvent", 
50268 function (id, argument) {
50269 if (this.listeners != null) {
50270 var evt =  new jssun.applet.AppletEvent (this, id, argument);
50271 this.listeners.appletStateChanged (evt);
50272 }}, "~N,~O");
50273 Clazz_defineMethod (c$, "getCode", 
50274  function () {
50275 return this.getParameter ("code");
50276 });
50277 Clazz_defineMethod (c$, "getCanvas", 
50278  function () {
50279 return (this.canvas == null ? (this.canvas = this.html5Applet._getHtml5Canvas ()) : this.canvas);
50280 });
50281 Clazz_overrideMethod (c$, "isActive", 
50282 function () {
50283 return true;
50284 });
50285 Clazz_overrideMethod (c$, "appletResize", 
50286 function (width, height) {
50287 var currentSize =  new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height);
50288 this.currentAppletSize.width = width;
50289 this.currentAppletSize.height = height;
50290 this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ());
50291 this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50292 this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50293 (this.applet.getContentPane ()).revalidate ();
50294 this.dispatchAppletEvent (51234, currentSize);
50295 }, "~N,~N");
50296 Clazz_overrideMethod (c$, "getDocumentBase", 
50297 function () {
50298 try {
50299 return  new java.net.URL (this.params.get ("documentBase"));
50300 } catch (e) {
50301 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50302 return null;
50303 } else {
50304 throw e;
50305 }
50306 }
50307 });
50308 Clazz_overrideMethod (c$, "getCodeBase", 
50309 function () {
50310 try {
50311 return  new java.net.URL (this.params.get ("codePath"));
50312 } catch (e) {
50313 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50314 return null;
50315 } else {
50316 throw e;
50317 }
50318 }
50319 });
50320 Clazz_overrideMethod (c$, "getParameter", 
50321 function (name) {
50322 var s = this.params.get (name);
50323 System.out.println ("get parameter: " + name + " = " + s);
50324 return (s == null ? null : "" + s);
50325 }, "~S");
50326 Clazz_overrideMethod (c$, "getAppletContext", 
50327 function () {
50328 return this;
50329 });
50330 Clazz_defineMethod (c$, "getHeight", 
50331 function () {
50332 return this.html5Applet._getHeight ();
50333 });
50334 Clazz_defineMethod (c$, "getWidth", 
50335 function () {
50336 return this.html5Applet._getWidth ();
50337 });
50338 Clazz_defineMethod (c$, "setBounds", 
50339 function (x, y, width, height) {
50340 this.reshape (x, y, width, height);
50341 this.currentAppletSize.width = width;
50342 this.currentAppletSize.height = height;
50343 }, "~N,~N,~N,~N");
50344 Clazz_overrideMethod (c$, "getImage", 
50345 function (url) {
50346 return null;
50347 }, "java.net.URL");
50348 Clazz_overrideMethod (c$, "getApplet", 
50349 function (name) {
50350 var applet = null;
50351 {
50352 applet = Jmol._applets[name]; applet && (applet =
50353 applet._applet);
50354 }return applet;
50355 }, "~S");
50356 Clazz_overrideMethod (c$, "getApplets", 
50357 function () {
50358 return null;
50359 });
50360 Clazz_defineMethod (c$, "showDocument", 
50361 function (url) {
50362 {
50363 window.open(url.toString());
50364 }}, "java.net.URL");
50365 Clazz_defineMethod (c$, "showDocument", 
50366 function (url, target) {
50367 {
50368 window.open(url.toString(), target);
50369 }}, "java.net.URL,~S");
50370 Clazz_defineMethod (c$, "showStatus", 
50371 function (status) {
50372 swingjs.JSToolkit.log (status);
50373 {
50374 Clazz._LoaderProgressMonitor.showStatus(status, true);
50375 }}, "~S");
50376 Clazz_overrideMethod (c$, "cacheFileByName", 
50377 function (fileName, isAdd) {
50378 return 0;
50379 }, "~S,~B");
50380 Clazz_overrideMethod (c$, "cachePut", 
50381 function (key, data) {
50382 }, "~S,~O");
50383 Clazz_overrideMethod (c$, "destroy", 
50384 function () {
50385 });
50386 Clazz_overrideMethod (c$, "getFullName", 
50387 function () {
50388 return this.fullName;
50389 });
50390 Clazz_overrideMethod (c$, "openFileAsyncSpecial", 
50391 function (fileName, flags) {
50392 }, "~S,~N");
50393 Clazz_defineMethod (c$, "processMouseEvent", 
50394 function (id, x, y, modifiers, time) {
50395 this.getMouse ().processEvent (id, x, y, modifiers, time);
50396 return false;
50397 }, "~N,~N,~N,~N,~N");
50398 Clazz_defineMethod (c$, "getMouse", 
50399  function () {
50400 return (this.mouse == null ? this.mouse =  new swingjs.JSMouse (this) : this.mouse);
50401 });
50402 Clazz_overrideMethod (c$, "processTwoPointGesture", 
50403 function (touches) {
50404 this.getMouse ().processTwoPointGesture (touches);
50405 }, "~A");
50406 Clazz_overrideMethod (c$, "setDisplay", 
50407 function (canvas) {
50408 this.canvas = canvas;
50409 }, "swingjs.api.HTML5Canvas");
50410 Clazz_overrideMethod (c$, "setScreenDimension", 
50411 function (width, height) {
50412 this.setGraphics (this.jsgraphics = null);
50413 if (this.applet != null) this.applet.resize (width, height);
50414 }, "~N,~N");
50415 Clazz_overrideMethod (c$, "setStatusDragDropped", 
50416 function (mode, x, y, fileName) {
50417 return false;
50418 }, "~N,~N,~N,~S");
50419 Clazz_overrideMethod (c$, "startHoverWatcher", 
50420 function (enable) {
50421 }, "~B");
50422 Clazz_overrideMethod (c$, "paint", 
50423 function (g) {
50424 this.applet.paint (this.setGraphics (g));
50425 }, "java.awt.Graphics");
50426 Clazz_defineMethod (c$, "setGraphics", 
50427  function (g) {
50428 return (g == null ? this.getGraphics () : g);
50429 }, "java.awt.Graphics");
50430 Clazz_overrideMethod (c$, "getGraphics", 
50431 function () {
50432 if (this.jsgraphics == null) {
50433 this.jsgraphics =  new swingjs.JSGraphics2D (this.getCanvas ());
50434 this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ());
50435 }return this.jsgraphics;
50436 });
50437 Clazz_defineMethod (c$, "showAppletStatus", 
50438  function (status) {
50439 this.getAppletContext ().showStatus (this.htmlName + " " + status);
50440 }, "~S");
50441 Clazz_defineMethod (c$, "showAppletException", 
50442  function (t) {
50443 {
50444 this.showAppletStatus("error " + (t.getMessage ?
50445 t.getMessage() : t)); t.printStackTrace &&
50446 t.printStackTrace();
50447 }this.repaint ();
50448 }, "Throwable");
50449 Clazz_defineMethod (c$, "run1", 
50450 function (mode) {
50451 var ok = false;
50452 switch (mode) {
50453 case 0:
50454 this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth ();
50455 this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight ();
50456 this.setLayout ( new java.awt.BorderLayout ());
50457 this.nextStatus = 1;
50458 ok = true;
50459 break;
50460 case 1:
50461 switch (this.nextStatus) {
50462 case 1:
50463 if (this.status != 0) {
50464 this.showAppletStatus ("notdisposed");
50465 this.status = 7;
50466 break;
50467 }System.out.println ("JSAppletPanel runloader");
50468 this.runLoader ();
50469 this.nextStatus = 2;
50470 ok = true;
50471 break;
50472 case 2:
50473 if (this.status != 1 && this.status != 5) {
50474 this.showAppletStatus ("notloaded");
50475 break;
50476 }System.out.println ("JSAppletPanel init");
50477 this.setFont ( new java.awt.Font ("Dialog", 0, 12));
50478 this.applet.resize (this.defaultAppletSize);
50479 this.applet.init ();
50480 this.validate ();
50481 this.status = 2;
50482 this.showAppletStatus ("initialized");
50483 this.nextStatus = 3;
50484 ok = true;
50485 break;
50486 case 3:
50487 if (this.status != 2 && this.status != 4) {
50488 this.showAppletStatus ("notstarted");
50489 this.status = 7;
50490 break;
50491 }this.applet.getRootPane ().addNotify ();
50492 System.out.println ("JSAppletPanel start" + this.currentAppletSize);
50493 this.applet.resize (this.currentAppletSize);
50494 this.applet.start ();
50495 this.status = 3;
50496 this.showAppletStatus ("started");
50497 this.nextStatus = 35;
50498 ok = true;
50499 break;
50500 case 35:
50501 swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this);
50502 break;
50503 case 4:
50504 if (this.status == 3) {
50505 this.status = 4;
50506 this.applet.setVisible (false);
50507 this.applet.stop ();
50508 this.showAppletStatus ("stopped");
50509 } else {
50510 this.showAppletStatus ("notstopped");
50511 this.status = 7;
50512 }break;
50513 case 5:
50514 if (this.status == 4 || this.status == 2) {
50515 this.status = 5;
50516 this.applet.destroy ();
50517 this.showAppletStatus ("destroyed");
50518 } else {
50519 this.showAppletStatus ("notdestroyed");
50520 this.status = 7;
50521 }break;
50522 case 75:
50523 if (this.status == 5 || this.status == 1) {
50524 this.showAppletStatus ("notdisposed");
50525 this.status = 7;
50526 } else {
50527 this.status = 0;
50528 this.removeChild (this.applet);
50529 this.applet = null;
50530 this.showAppletStatus ("disposed");
50531 }break;
50532 case 6:
50533 break;
50534 default:
50535 System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus);
50536 break;
50537 }
50538 break;
50539 default:
50540 System.out.println ("unrecognized JSAppletThread mode: " + mode);
50541 break;
50542 }
50543 return (ok ? 1 : 2);
50544 }, "~N");
50545 Clazz_defineMethod (c$, "runLoader", 
50546  function () {
50547 this.dispatchAppletEvent (51235, null);
50548 this.status = 1;
50549 var code = this.getCode ();
50550 try {
50551 if (code == null) {
50552 System.err.println ("runloader.err-- \"code\" must be specified.");
50553 throw  new InstantiationException ("\"code\" must be specified.");
50554 }this.applet = swingjs.JSToolkit.getInstance (code);
50555 if (this.applet == null) {
50556 System.out.println (code + " could not be launched");
50557 this.status = 7;
50558 } else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) {
50559 System.out.println (code + " is not a JApplet!?");
50560 this.status = 7;
50561 }} catch (e$$) {
50562 if (Clazz_exceptionOf (e$$, InstantiationException)) {
50563 var e = e$$;
50564 {
50565 this.status = 7;
50566 this.showAppletException (e);
50567 return;
50568 }
50569 } else if (Clazz_exceptionOf (e$$, Exception)) {
50570 var e = e$$;
50571 {
50572 this.status = 7;
50573 this.showAppletException (e);
50574 return;
50575 }
50576 } else if (Clazz_exceptionOf (e$$, ThreadDeath)) {
50577 var e = e$$;
50578 {
50579 this.status = 7;
50580 this.showAppletStatus ("death");
50581 return;
50582 }
50583 } else if (Clazz_exceptionOf (e$$, Error)) {
50584 var e = e$$;
50585 {
50586 this.status = 7;
50587 this.showAppletException (e);
50588 return;
50589 }
50590 } else {
50591 throw e$$;
50592 }
50593 } finally {
50594 this.dispatchAppletEvent (51236, null);
50595 }
50596 if (this.applet != null) {
50597 this.applet.setStub (this);
50598 this.applet.setVisible (false);
50599 this.add ("Center", this.applet);
50600 this.applet.setDispatcher ();
50601 this.applet.addNotify ();
50602 this.showAppletStatus ("loaded");
50603 this.validate ();
50604 }});
50605 Clazz_defineMethod (c$, "getUI", 
50606 function () {
50607 return null;
50608 });
50609 Clazz_overrideMethod (c$, "repaintImpl", 
50610 function (tm, x, y, width, height) {
50611 if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) {
50612 this.applet.getContentPane ().repaint (tm, x, y, width, height);
50613 }}, "~N,~N,~N,~N,~N");
50614 Clazz_defineStatics (c$,
50615 "APPLET_UNINITIALIZED", 0,
50616 "APPLET_LOAD", 1,
50617 "APPLET_INIT", 2,
50618 "APPLET_START", 3,
50619 "APPLET_READY", 35,
50620 "APPLET_STOP", 4,
50621 "APPLET_DESTROY", 5,
50622 "APPLET_QUIT", 6,
50623 "APPLET_ERROR", 7,
50624 "APPLET_DISPOSE", 75,
50625 "APPLET_RESIZE", 51234,
50626 "APPLET_LOADING", 51235,
50627 "APPLET_LOADING_COMPLETED", 51236);
50628 });
50629 Clazz_declarePackage ("swingjs");
50630 Clazz_load (["jssun.java2d.SunGraphics2D"], "swingjs.JSGraphics2D", ["java.util.HashMap", "java.awt.BasicStroke", "$.Rectangle", "$.RenderingHints", "$.Toolkit", "java.awt.geom.AffineTransform", "swingjs.JSToolkit", "swingjs.api.HTML5CanvasContext2D"], function () {
50631 c$ = Clazz_decorateAsClass (function () {
50632 this.constrainX = 0;
50633 this.constrainY = 0;
50634 this.windowWidth = 0;
50635 this.windowHeight = 0;
50636 this.canvas = null;
50637 this.ctx = null;
50638 this.gc = null;
50639 this.paintState = 0;
50640 this.compositeState = -2147483648;
50641 this.strokeState = 0;
50642 this.$transformState = 0;
50643 this.clipState = 0;
50644 this.isShifted = false;
50645 this.font = null;
50646 this.inPath = false;
50647 this.currentClip = null;
50648 Clazz_instantialize (this, arguments);
50649 }, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable);
50650 Clazz_makeConstructor (c$, 
50651 function (canvas) {
50652 Clazz_superConstructor (this, swingjs.JSGraphics2D, []);
50653 this.hints =  new java.awt.RenderingHints ( new java.util.HashMap ());
50654 this.canvas = canvas;
50655 this.ctx = this.canvas.getContext ("2d");
50656 this.$transform =  new java.awt.geom.AffineTransform ();
50657 {
50658 this.gc = SwingJS;
50659 }}, "~O");
50660 Clazz_overrideMethod (c$, "getDeviceConfiguration", 
50661 function () {
50662 return this.gc;
50663 });
50664 Clazz_overrideMethod (c$, "drawLine", 
50665 function (x0, y0, x1, y1) {
50666 var inPath = this.inPath;
50667 if (!inPath) this.ctx.beginPath ();
50668 this.ctx.moveTo (x0, y0);
50669 this.ctx.lineTo (x1, y1);
50670 if (!inPath) this.ctx.stroke ();
50671 }, "~N,~N,~N,~N");
50672 Clazz_defineMethod (c$, "drawCircle", 
50673 function (x, y, diameter) {
50674 this.drawArc (x, y, diameter, diameter, 0, 360);
50675 }, "~N,~N,~N");
50676 Clazz_overrideMethod (c$, "fillArc", 
50677 function (x, y, width, height, startAngle, arcAngle) {
50678 this.doArc (x, y, width, height, startAngle, arcAngle, true);
50679 }, "~N,~N,~N,~N,~N,~N");
50680 Clazz_overrideMethod (c$, "drawArc", 
50681 function (x, y, width, height, startAngle, arcAngle) {
50682 this.doArc (x, y, width, height, startAngle, arcAngle, false);
50683 }, "~N,~N,~N,~N,~N,~N");
50684 Clazz_defineMethod (c$, "save", 
50685  function () {
50686 this.ctx.save ();
50687 });
50688 Clazz_defineMethod (c$, "restore", 
50689  function () {
50690 this.ctx.restore ();
50691 });
50692 Clazz_defineMethod (c$, "doArc", 
50693  function (x, y, width, height, startAngle, arcAngle, fill) {
50694 var isCircle = (arcAngle - startAngle == 360);
50695 this.save ();
50696 this.ctx.translate (x, y);
50697 this.ctx.scale (Clazz_doubleToInt (width / height), height);
50698 this.ctx.beginPath ();
50699 if (fill) {
50700 }this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false);
50701 if (isCircle) this.ctx.closePath ();
50702 this.ctx.stroke ();
50703 this.restore ();
50704 }, "~N,~N,~N,~N,~N,~N,~B");
50705 Clazz_defineMethod (c$, "toRad", 
50706  function (a) {
50707 return a * 3.141592653589793 / 180;
50708 }, "~N");
50709 Clazz_defineMethod (c$, "drawPolygon", 
50710 function (ayPoints, axPoints, nPoints) {
50711 this.doPoly (ayPoints, axPoints, nPoints, false);
50712 }, "~A,~A,~N");
50713 Clazz_defineMethod (c$, "doPoly", 
50714  function (axPoints, ayPoints, nPoints, doFill) {
50715 this.ctx.beginPath ();
50716 this.ctx.moveTo (axPoints[0], ayPoints[0]);
50717 for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]);
50718
50719 if (doFill) this.ctx.fill ();
50720  else this.ctx.stroke ();
50721 }, "~A,~A,~N,~B");
50722 Clazz_overrideMethod (c$, "drawRect", 
50723 function (x, y, width, height) {
50724 this.ctx.beginPath ();
50725 this.ctx.rect (x, y, width, height);
50726 this.ctx.stroke ();
50727 }, "~N,~N,~N,~N");
50728 Clazz_defineMethod (c$, "background", 
50729 function (bgcolor) {
50730 this.backgroundColor = bgcolor;
50731 if (bgcolor == null) {
50732 if (!this.isShifted) this.ctx.translate (-0.5, -0.5);
50733 this.isShifted = true;
50734 return;
50735 }this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight);
50736 this.setGraphicsColor (bgcolor);
50737 this.fillRect (0, 0, this.windowWidth, this.windowHeight);
50738 }, "java.awt.Color");
50739 Clazz_defineMethod (c$, "fillCircle", 
50740 function (x, y, diameter) {
50741 var r = diameter / 2;
50742 this.ctx.beginPath ();
50743 this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false);
50744 this.ctx.fill ();
50745 }, "~N,~N,~N");
50746 Clazz_defineMethod (c$, "fillPolygon", 
50747 function (ayPoints, axPoints, nPoints) {
50748 this.doPoly (ayPoints, axPoints, nPoints, true);
50749 }, "~A,~A,~N");
50750 Clazz_overrideMethod (c$, "fillRect", 
50751 function (x, y, width, height) {
50752 this.ctx.fillRect (x, y, width, height);
50753 }, "~N,~N,~N,~N");
50754 Clazz_defineMethod (c$, "setGraphicsColor", 
50755 function (c) {
50756 var s = swingjs.JSToolkit.getCSSColor (c);
50757 {
50758 this.ctx.fillStyle = s; this.ctx.strokeStyle = s;
50759 }}, "java.awt.Color");
50760 Clazz_overrideMethod (c$, "setFont", 
50761 function (font) {
50762 this.font = font;
50763 if (this.ctx == null) return;
50764 var s = swingjs.JSToolkit.getCanvasFont (font);
50765 {
50766 this.ctx.font = s;
50767 }}, "java.awt.Font");
50768 Clazz_defineMethod (c$, "setStrokeBold", 
50769 function (tf) {
50770 this.setLineWidth (tf ? 2. : 1.);
50771 }, "~B");
50772 Clazz_defineMethod (c$, "setLineWidth", 
50773  function (d) {
50774 {
50775 this.ctx.lineWidth = d;
50776 }}, "~N");
50777 Clazz_defineMethod (c$, "setWindowParameters", 
50778 function (width, height) {
50779 this.windowWidth = width;
50780 this.windowHeight = height;
50781 }, "~N,~N");
50782 Clazz_defineMethod (c$, "canDoLineTo", 
50783 function () {
50784 return true;
50785 });
50786 Clazz_defineMethod (c$, "doStroke", 
50787 function (isBegin) {
50788 this.inPath = isBegin;
50789 if (isBegin) {
50790 this.ctx.beginPath ();
50791 } else {
50792 this.ctx.stroke ();
50793 }}, "~B");
50794 Clazz_defineMethod (c$, "lineTo", 
50795 function (x2, y2) {
50796 this.ctx.lineTo (x2, y2);
50797 }, "~N,~N");
50798 Clazz_overrideMethod (c$, "clip", 
50799 function (s) {
50800 this.doShape (s);
50801 this.ctx.clip ();
50802 }, "java.awt.Shape");
50803 Clazz_overrideMethod (c$, "draw", 
50804 function (s) {
50805 this.doShape (s);
50806 this.ctx.stroke ();
50807 }, "java.awt.Shape");
50808 Clazz_defineMethod (c$, "doShape", 
50809  function (s) {
50810 this.ctx.beginPath ();
50811 var pts =  Clazz_newDoubleArray (6, 0);
50812 var pi = s.getPathIterator (null);
50813 while (!pi.isDone ()) {
50814 switch (pi.currentSegment (pts)) {
50815 case 0:
50816 this.ctx.moveTo (pts[0], pts[1]);
50817 break;
50818 case 1:
50819 this.ctx.lineTo (pts[0], pts[1]);
50820 break;
50821 case 2:
50822 this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]);
50823 break;
50824 case 3:
50825 this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
50826 break;
50827 case 4:
50828 this.ctx.closePath ();
50829 break;
50830 }
50831 pi.next ();
50832 }
50833 return pi.getWindingRule ();
50834 }, "java.awt.Shape");
50835 Clazz_overrideMethod (c$, "fill", 
50836 function (s) {
50837 if (this.doShape (s) == 0) {
50838 this.ctx.fill("evenodd");
50839 } else this.ctx.fill ();
50840 }, "java.awt.Shape");
50841 Clazz_defineMethod (c$, "drawImage", 
50842 function (img, x, y, observer) {
50843 if (img != null) {
50844 var imgNode = this.getImageNode (img);
50845 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer));
50846 if (observer != null) this.observe (img, observer, imgNode != null);
50847 }return true;
50848 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
50849 Clazz_defineMethod (c$, "observe", 
50850  function (img, observer, isOK) {
50851 observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1);
50852 }, "java.awt.Image,java.awt.image.ImageObserver,~B");
50853 Clazz_defineMethod (c$, "drawImage", 
50854 function (img, x, y, width, height, observer) {
50855 if (img != null) {
50856 var imgNode = this.getImageNode (img);
50857 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height);
50858 if (observer != null) this.observe (img, observer, imgNode != null);
50859 }return true;
50860 }, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver");
50861 Clazz_defineMethod (c$, "drawImage", 
50862 function (img, x, y, bgcolor, observer) {
50863 swingjs.JSToolkit.notImplemented (null);
50864 return this.drawImage (img, x, y, null);
50865 }, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50866 Clazz_defineMethod (c$, "drawImage", 
50867 function (img, x, y, width, height, bgcolor, observer) {
50868 swingjs.JSToolkit.notImplemented (null);
50869 return this.drawImage (img, x, y, width, height, null);
50870 }, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50871 Clazz_defineMethod (c$, "drawImage", 
50872 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) {
50873 if (img != null) {
50874 var imgNode = this.getImageNode (img);
50875 if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1);
50876 if (observer != null) this.observe (img, observer, imgNode != null);
50877 }return true;
50878 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver");
50879 Clazz_defineMethod (c$, "getImageNode", 
50880  function (img) {
50881 var imgNode = null;
50882 {
50883 imgNode = img._imgNode || img._canvas;
50884 }if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img);
50885 return imgNode;
50886 }, "java.awt.Image");
50887 Clazz_defineMethod (c$, "drawImage", 
50888 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) {
50889 swingjs.JSToolkit.notImplemented (null);
50890 return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer);
50891 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50892 Clazz_defineMethod (c$, "drawImage", 
50893 function (img, xform, obs) {
50894 swingjs.JSToolkit.notImplemented (null);
50895 return false;
50896 }, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver");
50897 Clazz_overrideMethod (c$, "drawRenderedImage", 
50898 function (img, xform) {
50899 swingjs.JSToolkit.notImplemented (null);
50900 }, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform");
50901 Clazz_overrideMethod (c$, "drawRenderableImage", 
50902 function (img, xform) {
50903 swingjs.JSToolkit.notImplemented (null);
50904 }, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform");
50905 Clazz_overrideMethod (c$, "hit", 
50906 function (rect, s, onStroke) {
50907 swingjs.JSToolkit.notImplemented (null);
50908 return false;
50909 }, "java.awt.Rectangle,java.awt.Shape,~B");
50910 Clazz_overrideMethod (c$, "setPaint", 
50911 function (paint) {
50912 swingjs.JSToolkit.notImplemented (null);
50913 }, "java.awt.Paint");
50914 Clazz_overrideMethod (c$, "setStroke", 
50915 function (s) {
50916 if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return;
50917 var b = s;
50918 var dash = b.getDashArray ();
50919 var idash =  Clazz_newIntArray (dash == null ? 0 : dash.length, 0);
50920 for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]);
50921
50922 this.ctx.setLineDash (idash);
50923 this.setLineWidth (b.getLineWidth ());
50924 var lineCap;
50925 var lineJoin;
50926 var miterLimit = -1;
50927 switch (b.getEndCap ()) {
50928 case 0:
50929 lineCap = "butt";
50930 break;
50931 case 2:
50932 lineCap = "square";
50933 break;
50934 case 1:
50935 default:
50936 lineCap = "round";
50937 }
50938 switch (b.getLineJoin ()) {
50939 case 2:
50940 lineJoin = "bevel";
50941 break;
50942 case 0:
50943 lineJoin = "miter";
50944 miterLimit = b.getMiterLimit ();
50945 break;
50946 case 1:
50947 lineJoin = "round";
50948 }
50949 {
50950 this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if
50951 (miterLimit >= 0) this.ctx.miterLimit = miterLimit;
50952 }}, "java.awt.Stroke");
50953 Clazz_overrideMethod (c$, "setRenderingHint", 
50954 function (hintKey, hintValue) {
50955 this.hints.put (hintKey, hintValue);
50956 }, "java.awt.RenderingHints.Key,~O");
50957 Clazz_overrideMethod (c$, "getRenderingHint", 
50958 function (hintKey) {
50959 return this.hints.get (hintKey);
50960 }, "java.awt.RenderingHints.Key");
50961 Clazz_overrideMethod (c$, "setRenderingHints", 
50962 function (hints) {
50963 this.hints =  new java.awt.RenderingHints (hints);
50964 }, "java.util.Map");
50965 Clazz_overrideMethod (c$, "addRenderingHints", 
50966 function (hints) {
50967 for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ());
50968
50969 }, "java.util.Map");
50970 Clazz_overrideMethod (c$, "getRenderingHints", 
50971 function () {
50972 return this.hints;
50973 });
50974 Clazz_defineMethod (c$, "translate", 
50975 function (x, y) {
50976 this.ctx.translate (x, y);
50977 }, "~N,~N");
50978 Clazz_overrideMethod (c$, "scale", 
50979 function (sx, sy) {
50980 this.ctx.scale (sx, sy);
50981 }, "~N,~N");
50982 Clazz_overrideMethod (c$, "setBackground", 
50983 function (color) {
50984 this.background (color);
50985 }, "java.awt.Color");
50986 Clazz_overrideMethod (c$, "getBackground", 
50987 function () {
50988 return this.backgroundColor;
50989 });
50990 Clazz_overrideMethod (c$, "createSwingJS", 
50991 function () {
50992 return this.clone ();
50993 });
50994 Clazz_overrideMethod (c$, "clone", 
50995 function () {
50996 this.save ();
50997 return this.clone0 ();
50998 });
50999 Clazz_overrideMethod (c$, "dispose", 
51000 function () {
51001 if (this.compositeState >= 0) this.setComposite (null);
51002 this.restore ();
51003 });
51004 Clazz_overrideMethod (c$, "getColor", 
51005 function () {
51006 return this.foregroundColor;
51007 });
51008 Clazz_overrideMethod (c$, "setColor", 
51009 function (c) {
51010 this.foregroundColor = c;
51011 this.setGraphicsColor (c);
51012 }, "java.awt.Color");
51013 Clazz_overrideMethod (c$, "getFont", 
51014 function () {
51015 return this.font;
51016 });
51017 Clazz_defineMethod (c$, "getFontMetrics", 
51018 function (f) {
51019 return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
51020 }, "java.awt.Font");
51021 Clazz_overrideMethod (c$, "clipRect", 
51022 function (x, y, width, height) {
51023 this.ctx.beginPath ();
51024 this.ctx.rect (x, y, width, height);
51025 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51026 this.ctx.clip ();
51027 }, "~N,~N,~N,~N");
51028 Clazz_defineMethod (c$, "setClip", 
51029 function (x, y, width, height) {
51030 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51031 {
51032 if (arguments.length == 1) { setClip1(x); return; }
51033 }this.ctx.beginPath ();
51034 this.ctx.rect (x, y, width, height);
51035 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
51036 this.ctx.clip ();
51037 }, "~N,~N,~N,~N");
51038 Clazz_defineMethod (c$, "setClip1", 
51039 function (clip) {
51040 this.ctx.beginPath ();
51041 this.doShape (clip);
51042 this.ctx.clip ();
51043 }, "java.awt.Shape");
51044 Clazz_overrideMethod (c$, "clearRect", 
51045 function (x, y, width, height) {
51046 this.ctx.clearRect (x, y, width, height);
51047 }, "~N,~N,~N,~N");
51048 Clazz_overrideMethod (c$, "drawPolyline", 
51049 function (xPoints, yPoints, nPoints) {
51050 if (nPoints < 2) return;
51051 this.ctx.moveTo (xPoints[0], yPoints[0]);
51052 for (var i = 1; i < nPoints; i++) {
51053 this.ctx.lineTo (xPoints[i], yPoints[i]);
51054 }
51055 }, "~A,~A,~N");
51056 Clazz_overrideMethod (c$, "copyArea", 
51057 function (x, y, width, height, dx, dy) {
51058 swingjs.JSToolkit.notImplemented (null);
51059 }, "~N,~N,~N,~N,~N,~N");
51060 Clazz_overrideMethod (c$, "drawRoundRect", 
51061 function (x, y, width, height, arcWidth, arcHeight) {
51062 swingjs.JSToolkit.notImplemented (null);
51063 this.drawRect (x, y, width, height);
51064 }, "~N,~N,~N,~N,~N,~N");
51065 Clazz_overrideMethod (c$, "fillRoundRect", 
51066 function (x, y, width, height, arcWidth, arcHeight) {
51067 swingjs.JSToolkit.notImplemented (null);
51068 this.fillRect (x, y, width, height);
51069 }, "~N,~N,~N,~N,~N,~N");
51070 Clazz_overrideMethod (c$, "drawOval", 
51071 function (x, y, width, height) {
51072 swingjs.JSToolkit.notImplemented (null);
51073 }, "~N,~N,~N,~N");
51074 Clazz_overrideMethod (c$, "fillOval", 
51075 function (x, y, width, height) {
51076 swingjs.JSToolkit.notImplemented (null);
51077 }, "~N,~N,~N,~N");
51078 Clazz_overrideMethod (c$, "getClip", 
51079 function () {
51080 swingjs.JSToolkit.notImplemented (null);
51081 return null;
51082 });
51083 Clazz_defineMethod (c$, "drawString", 
51084 function (s, x, y) {
51085 this.ctx.fillText (s, x, y);
51086 }, "~S,~N,~N");
51087 Clazz_defineMethod (c$, "drawStringUnique", 
51088 function (s, x, y) {
51089 this.ctx.fillText (s, x, y);
51090 }, "~S,~N,~N");
51091 Clazz_overrideMethod (c$, "drawStringTrans", 
51092 function (str, x, y) {
51093 swingjs.JSToolkit.notImplemented (null);
51094 }, "~S,~N,~N");
51095 Clazz_defineMethod (c$, "drawString", 
51096 function (iterator, x, y) {
51097 swingjs.JSToolkit.notImplemented (null);
51098 }, "java.text.AttributedCharacterIterator,~N,~N");
51099 Clazz_overrideMethod (c$, "drawStringAttrTrans", 
51100 function (iterator, x, y) {
51101 swingjs.JSToolkit.notImplemented (null);
51102 }, "java.text.AttributedCharacterIterator,~N,~N");
51103 Clazz_overrideMethod (c$, "translateTrans", 
51104 function (tx, ty) {
51105 swingjs.JSToolkit.notImplemented (null);
51106 }, "~N,~N");
51107 Clazz_defineMethod (c$, "rotate", 
51108 function (theta) {
51109 swingjs.JSToolkit.notImplemented (null);
51110 }, "~N");
51111 Clazz_defineMethod (c$, "rotate", 
51112 function (theta, x, y) {
51113 swingjs.JSToolkit.notImplemented (null);
51114 }, "~N,~N,~N");
51115 Clazz_overrideMethod (c$, "shear", 
51116 function (shx, shy) {
51117 swingjs.JSToolkit.notImplemented (null);
51118 }, "~N,~N");
51119 Clazz_overrideMethod (c$, "transform", 
51120 function (xform) {
51121 swingjs.JSToolkit.notImplemented (null);
51122 }, "java.awt.geom.AffineTransform");
51123 Clazz_overrideMethod (c$, "setTransform", 
51124 function (Tx) {
51125 swingjs.JSToolkit.notImplemented (null);
51126 }, "java.awt.geom.AffineTransform");
51127 Clazz_overrideMethod (c$, "getTransform", 
51128 function () {
51129 swingjs.JSToolkit.notImplemented (null);
51130 return null;
51131 });
51132 Clazz_defineMethod (c$, "cloneTransform", 
51133 function () {
51134 swingjs.JSToolkit.notImplemented (null);
51135 return null;
51136 });
51137 Clazz_overrideMethod (c$, "getPaint", 
51138 function () {
51139 swingjs.JSToolkit.notImplemented (null);
51140 return null;
51141 });
51142 Clazz_overrideMethod (c$, "getStroke", 
51143 function () {
51144 swingjs.JSToolkit.notImplemented (null);
51145 return null;
51146 });
51147 Clazz_overrideMethod (c$, "getFontRenderContext", 
51148 function () {
51149 swingjs.JSToolkit.notImplemented (null);
51150 return null;
51151 });
51152 Clazz_overrideMethod (c$, "setPaintMode", 
51153 function () {
51154 swingjs.JSToolkit.notImplemented (null);
51155 });
51156 Clazz_overrideMethod (c$, "setXORMode", 
51157 function (c1) {
51158 swingjs.JSToolkit.notImplemented (null);
51159 }, "java.awt.Color");
51160 Clazz_defineMethod (c$, "getClipBounds", 
51161 function () {
51162 var r = null;
51163 {
51164 if (arguments.length == 1) r = arguments[0];
51165 }var clipRect = this.getClipBoundsImpl ();
51166 if (r == null) {
51167 r = clipRect;
51168 } else {
51169 r.x = clipRect.x;
51170 r.y = clipRect.y;
51171 r.width = clipRect.width;
51172 r.height = clipRect.height;
51173 }return r;
51174 });
51175 Clazz_defineMethod (c$, "getClipBoundsImpl", 
51176  function () {
51177 if (this.currentClip == null) {
51178 this.currentClip =  new java.awt.Rectangle (0, 0, this.windowWidth, this.windowHeight);
51179 }return this.currentClip;
51180 });
51181 Clazz_overrideMethod (c$, "setComposite", 
51182 function (comp) {
51183 var newRule = 0;
51184 var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState);
51185 if (!isValid) return;
51186 if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule;
51187 }, "java.awt.Composite");
51188 Clazz_defineMethod (c$, "drawImage", 
51189 function (img, op, x, y) {
51190 swingjs.JSToolkit.drawImageOp (this, img, op, x, y);
51191 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
51192 Clazz_defineMethod (c$, "setAlpha", 
51193 function (f) {
51194 {
51195 this.ctx.globalAlpha = f;
51196 }}, "~N");
51197 Clazz_defineStatics (c$,
51198 "saveLevel", 0);
51199 });
51200 Clazz_declarePackage ("swingjs");
51201 Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () {
51202 c$ = Clazz_decorateAsClass (function () {
51203 this.ap = null;
51204 Clazz_instantialize (this, arguments);
51205 }, swingjs, "JSAppletThread", swingjs.JSThread);
51206 Clazz_makeConstructor (c$, 
51207 function (ap, group, name) {
51208 Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]);
51209 this.ap = ap;
51210 }, "swingjs.JSAppletPanel,ThreadGroup,~S");
51211 Clazz_overrideMethod (c$, "run1", 
51212 function (mode) {
51213 mode = this.ap.run1 (mode);
51214 if (mode != 2) this.dispatchAndReturn (null, mode);
51215 }, "~N");
51216 Clazz_defineMethod (c$, "dispatchAndReturn", 
51217 function (r, mode) {
51218 var m = mode;
51219 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m))));
51220 }, "Runnable,~N");
51221 c$.$JSAppletThread$1$ = function () {
51222 Clazz_pu$h(self.c$);
51223 c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable);
51224 Clazz_overrideMethod (c$, "run", 
51225 function () {
51226 this.b$["swingjs.JSAppletThread"].run1 (this.f$.m);
51227 });
51228 c$ = Clazz_p0p ();
51229 };
51230 });
51231 Clazz_declarePackage ("swingjs");
51232 Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () {
51233 c$ = Clazz_decorateAsClass (function () {
51234 this.ap = null;
51235 this.isMouseDown = false;
51236 this.wheeling = false;
51237 this.xWhenPressed = 0;
51238 this.yWhenPressed = 0;
51239 this.modifiersWhenPressed10 = 0;
51240 Clazz_instantialize (this, arguments);
51241 }, swingjs, "JSMouse");
51242 Clazz_makeConstructor (c$, 
51243 function (ap) {
51244 this.ap = ap;
51245 }, "swingjs.JSAppletPanel");
51246 Clazz_defineMethod (c$, "processEvent", 
51247 function (id, x, y, modifiers, time) {
51248 if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers);
51249 switch (id) {
51250 case -1:
51251 this.wheeled (time, x, modifiers);
51252 break;
51253 case 501:
51254 this.xWhenPressed = x;
51255 this.yWhenPressed = y;
51256 this.modifiersWhenPressed10 = modifiers;
51257 this.pressed (time, x, y, modifiers, false);
51258 break;
51259 case 506:
51260 this.dragged (time, x, y, modifiers);
51261 break;
51262 case 504:
51263 this.entry (time, x, y, false);
51264 break;
51265 case 505:
51266 this.entry (time, x, y, true);
51267 break;
51268 case 503:
51269 this.moved (time, x, y, modifiers);
51270 break;
51271 case 502:
51272 this.released (time, x, y, modifiers);
51273 if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) {
51274 this.clicked (time, x, y, modifiers, 1);
51275 }break;
51276 default:
51277 return false;
51278 }
51279 return true;
51280 }, "~N,~N,~N,~N,~N");
51281 Clazz_defineMethod (c$, "processTwoPointGesture", 
51282 function (touches) {
51283 if (touches[0].length < 2) return;
51284 var t1 = touches[0];
51285 var t2 = touches[1];
51286 var t1first = t1[0];
51287 var t1last = t1[t2.length - 1];
51288 var x1first = t1first[0];
51289 var x1last = t1last[0];
51290 var dx1 = x1last - x1first;
51291 var y1first = t1first[1];
51292 var y1last = t1last[1];
51293 var dy1 = y1last - y1first;
51294 var v1 = JU.V3.new3 (dx1, dy1, 0);
51295 var d1 = v1.length ();
51296 var t2first = t2[0];
51297 var t2last = t2[t2.length - 1];
51298 var x2first = t2first[0];
51299 var x2last = t2last[0];
51300 var dx2 = x2last - x2first;
51301 var y2first = t2first[1];
51302 var y2last = t2last[1];
51303 var dy2 = y2last - y2first;
51304 var v2 = JU.V3.new3 (dx2, dy2, 0);
51305 var d2 = v2.length ();
51306 if (d1 < 1 || d2 < 1) return;
51307 v1.normalize ();
51308 v2.normalize ();
51309 var cos12 = (v1.dot (v2));
51310 if (cos12 > 0.8) {
51311 var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]);
51312 var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]);
51313 this.translateXYBy (deltaX, deltaY);
51314 } else if (cos12 < -0.8) {
51315 v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0);
51316 v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0);
51317 var dx = v2.length () - v1.length ();
51318 this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32);
51319 }}, "~A");
51320 Clazz_defineMethod (c$, "translateXYBy", 
51321  function (deltaX, deltaY) {
51322 }, "~N,~N");
51323 Clazz_defineMethod (c$, "mouseClicked", 
51324 function (e) {
51325 this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ());
51326 }, "java.awt.event.MouseEvent");
51327 Clazz_defineMethod (c$, "mouseEntered", 
51328 function (e) {
51329 this.entry (e.getWhen (), e.getX (), e.getY (), false);
51330 }, "java.awt.event.MouseEvent");
51331 Clazz_defineMethod (c$, "mouseExited", 
51332 function (e) {
51333 this.entry (e.getWhen (), e.getX (), e.getY (), true);
51334 }, "java.awt.event.MouseEvent");
51335 Clazz_defineMethod (c$, "mousePressed", 
51336 function (e) {
51337 this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ());
51338 }, "java.awt.event.MouseEvent");
51339 Clazz_defineMethod (c$, "mouseReleased", 
51340 function (e) {
51341 this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51342 }, "java.awt.event.MouseEvent");
51343 Clazz_defineMethod (c$, "mouseDragged", 
51344 function (e) {
51345 var modifiers = e.getModifiers ();
51346 if ((modifiers & 28) == 0) modifiers |= 16;
51347 this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers);
51348 }, "java.awt.event.MouseEvent");
51349 Clazz_defineMethod (c$, "mouseMoved", 
51350 function (e) {
51351 this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51352 }, "java.awt.event.MouseEvent");
51353 Clazz_defineMethod (c$, "mouseWheelMoved", 
51354 function (e) {
51355 e.consume ();
51356 this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ());
51357 }, "java.awt.event.MouseWheelEvent");
51358 Clazz_defineMethod (c$, "entry", 
51359  function (time, x, y, isExit) {
51360 this.wheeling = false;
51361 this.mouseEnterExit (time, x, y, isExit);
51362 }, "~N,~N,~N,~B");
51363 Clazz_defineMethod (c$, "clicked", 
51364  function (time, x, y, modifiers, clickCount) {
51365 this.mouseAction (500, time, x, y, 1, modifiers);
51366 }, "~N,~N,~N,~N,~N");
51367 Clazz_defineMethod (c$, "moved", 
51368  function (time, x, y, modifiers) {
51369 if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers));
51370  else this.mouseAction (503, time, x, y, 0, modifiers);
51371 }, "~N,~N,~N,~N");
51372 Clazz_defineMethod (c$, "wheeled", 
51373  function (time, rotation, modifiers) {
51374 this.wheeling = true;
51375 this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32);
51376 }, "~N,~N,~N");
51377 Clazz_defineMethod (c$, "pressed", 
51378  function (time, x, y, modifiers, isPopupTrigger) {
51379 this.isMouseDown = true;
51380 this.wheeling = false;
51381 this.mouseAction (501, time, x, y, 0, modifiers);
51382 }, "~N,~N,~N,~N,~B");
51383 Clazz_defineMethod (c$, "released", 
51384  function (time, x, y, modifiers) {
51385 this.isMouseDown = false;
51386 this.wheeling = false;
51387 this.mouseAction (502, time, x, y, 0, modifiers);
51388 }, "~N,~N,~N,~N");
51389 Clazz_defineMethod (c$, "dragged", 
51390  function (time, x, y, modifiers) {
51391 if (this.wheeling) return;
51392 if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2;
51393 this.mouseAction (506, time, x, y, 0, modifiers);
51394 }, "~N,~N,~N,~N");
51395 c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", 
51396  function (modifiers) {
51397 return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers;
51398 }, "~N");
51399 Clazz_defineMethod (c$, "getButton", 
51400  function (modifiers) {
51401 switch (modifiers & 28) {
51402 case 16:
51403 return 1;
51404 case 8:
51405 return 2;
51406 case 4:
51407 return 3;
51408 default:
51409 return 0;
51410 }
51411 }, "~N");
51412 Clazz_defineMethod (c$, "mouseEnterExit", 
51413  function (time, x, y, isExit) {
51414 }, "~N,~N,~N,~B");
51415 Clazz_defineMethod (c$, "mouseAction", 
51416  function (id, time, x, y, count, modifiers) {
51417 var popupTrigger = false;
51418 var button = this.getButton (modifiers);
51419 var source = this.ap.applet;
51420 var e =  new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button);
51421 java.awt.Toolkit.getEventQueue ().postEvent (e);
51422 }, "~N,~N,~N,~N,~N,~N");
51423 Clazz_defineStatics (c$,
51424 "MOUSE_LEFT", 16,
51425 "MOUSE_MIDDLE", 8,
51426 "MOUSE_RIGHT", 4,
51427 "MOUSE_WHEEL", 32,
51428 "MAC_COMMAND", 20,
51429 "BUTTON_MASK", 28);
51430 });
51431 Clazz_declarePackage ("swingjs");
51432 Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["swingjs.JSToolkit"], function () {
51433 c$ = Clazz_decorateAsClass (function () {
51434 this.target = null;
51435 this.ui = null;
51436 Clazz_instantialize (this, arguments);
51437 }, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer);
51438 Clazz_makeConstructor (c$, 
51439 function (target) {
51440 this.target = target;
51441 this.ui = swingjs.JSToolkit.getUI (target, false);
51442 }, "java.awt.Component");
51443 Clazz_overrideMethod (c$, "isObscured", 
51444 function () {
51445 return false;
51446 });
51447 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51448 function () {
51449 return false;
51450 });
51451 Clazz_overrideMethod (c$, "setVisible", 
51452 function (b) {
51453 }, "~B");
51454 Clazz_overrideMethod (c$, "setEnabled", 
51455 function (b) {
51456 }, "~B");
51457 Clazz_overrideMethod (c$, "paint", 
51458 function (g) {
51459 }, "java.awt.Graphics");
51460 Clazz_overrideMethod (c$, "repaint", 
51461 function (tm, x, y, width, height) {
51462 }, "~N,~N,~N,~N,~N");
51463 Clazz_overrideMethod (c$, "print", 
51464 function (g) {
51465 }, "java.awt.Graphics");
51466 Clazz_overrideMethod (c$, "setBounds", 
51467 function (x, y, width, height, op) {
51468 }, "~N,~N,~N,~N,~N");
51469 Clazz_overrideMethod (c$, "handleEvent", 
51470 function (e) {
51471 }, "java.awt.AWTEvent");
51472 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51473 function (e) {
51474 }, "java.awt.event.PaintEvent");
51475 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51476 function () {
51477 return null;
51478 });
51479 Clazz_overrideMethod (c$, "getPreferredSize", 
51480 function () {
51481 return null;
51482 });
51483 Clazz_overrideMethod (c$, "getMinimumSize", 
51484 function () {
51485 return null;
51486 });
51487 Clazz_overrideMethod (c$, "getColorModel", 
51488 function () {
51489 return null;
51490 });
51491 Clazz_overrideMethod (c$, "getToolkit", 
51492 function () {
51493 return null;
51494 });
51495 Clazz_overrideMethod (c$, "getGraphics", 
51496 function () {
51497 return null;
51498 });
51499 Clazz_overrideMethod (c$, "getFontMetrics", 
51500 function (font) {
51501 return null;
51502 }, "java.awt.Font");
51503 Clazz_overrideMethod (c$, "dispose", 
51504 function () {
51505 });
51506 Clazz_overrideMethod (c$, "setForeground", 
51507 function (c) {
51508 }, "java.awt.Color");
51509 Clazz_overrideMethod (c$, "setBackground", 
51510 function (c) {
51511 }, "java.awt.Color");
51512 Clazz_overrideMethod (c$, "setFont", 
51513 function (f) {
51514 }, "java.awt.Font");
51515 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51516 function () {
51517 });
51518 Clazz_overrideMethod (c$, "requestFocus", 
51519 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51520 return false;
51521 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51522 Clazz_overrideMethod (c$, "isFocusable", 
51523 function () {
51524 return false;
51525 });
51526 Clazz_defineMethod (c$, "createImage", 
51527 function (producer) {
51528 return null;
51529 }, "java.awt.image.ImageProducer");
51530 Clazz_defineMethod (c$, "createImage", 
51531 function (width, height) {
51532 return null;
51533 }, "~N,~N");
51534 Clazz_overrideMethod (c$, "createVolatileImage", 
51535 function (width, height) {
51536 return null;
51537 }, "~N,~N");
51538 Clazz_overrideMethod (c$, "prepareImage", 
51539 function (img, w, h, o) {
51540 return false;
51541 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51542 Clazz_overrideMethod (c$, "checkImage", 
51543 function (img, w, h, o) {
51544 return 0;
51545 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51546 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51547 function () {
51548 return null;
51549 });
51550 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51551 function () {
51552 return false;
51553 });
51554 Clazz_overrideMethod (c$, "getBackBuffer", 
51555 function () {
51556 return null;
51557 });
51558 Clazz_overrideMethod (c$, "destroyBuffers", 
51559 function () {
51560 });
51561 Clazz_overrideMethod (c$, "reparent", 
51562 function (newContainer) {
51563 }, "java.awt.peer.ContainerPeer");
51564 Clazz_overrideMethod (c$, "isReparentSupported", 
51565 function () {
51566 return false;
51567 });
51568 Clazz_overrideMethod (c$, "layout", 
51569 function () {
51570 });
51571 Clazz_overrideMethod (c$, "getBounds", 
51572 function () {
51573 return null;
51574 });
51575 });
51576 Clazz_declarePackage ("swingjs");
51577 Clazz_load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {
51578 c$ = Clazz_decorateAsClass (function () {
51579 this.window = null;
51580 this.isFrame = false;
51581 this.applet = null;
51582 this.graphics = null;
51583 this.font = null;
51584 Clazz_instantialize (this, arguments);
51585 }, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);
51586 Clazz_overrideMethod (c$, "setFrame", 
51587 function (target, isFrame) {
51588 this.isFrame = isFrame;
51589 this.window = target;
51590 var jc = this;
51591 jc.myThread = Thread.currentThread ();
51592 jc.threadGroup = jc.myThread.getThreadGroup ();
51593 this.applet = (jc.threadGroup).getHtmlApplet ();
51594 this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);
51595 return this;
51596 }, "java.awt.Window,~B");
51597 Clazz_overrideMethod (c$, "getGraphics", 
51598 function () {
51599 this.graphics.setFont (this.window.getFont ());
51600 return this.graphics;
51601 });
51602 Clazz_overrideMethod (c$, "getToolkit", 
51603 function () {
51604 return java.awt.Toolkit.getDefaultToolkit ();
51605 });
51606 Clazz_overrideMethod (c$, "getFontMetrics", 
51607 function (font) {
51608 if (!font.equals (this.font)) this.window.setFont (this.font = font);
51609 return this.graphics.getFontMetrics (font);
51610 }, "java.awt.Font");
51611 Clazz_overrideMethod (c$, "getInsets", 
51612 function () {
51613 return  new java.awt.Insets (0, 0, 0, 0);
51614 });
51615 Clazz_overrideMethod (c$, "beginValidate", 
51616 function () {
51617 });
51618 Clazz_overrideMethod (c$, "endValidate", 
51619 function () {
51620 });
51621 Clazz_overrideMethod (c$, "beginLayout", 
51622 function () {
51623 });
51624 Clazz_overrideMethod (c$, "endLayout", 
51625 function () {
51626 });
51627 Clazz_overrideMethod (c$, "isObscured", 
51628 function () {
51629 return false;
51630 });
51631 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51632 function () {
51633 return false;
51634 });
51635 Clazz_overrideMethod (c$, "setVisible", 
51636 function (b) {
51637 }, "~B");
51638 Clazz_overrideMethod (c$, "setEnabled", 
51639 function (b) {
51640 }, "~B");
51641 Clazz_overrideMethod (c$, "paint", 
51642 function (g) {
51643 }, "java.awt.Graphics");
51644 Clazz_overrideMethod (c$, "repaint", 
51645 function (tm, x, y, width, height) {
51646 }, "~N,~N,~N,~N,~N");
51647 Clazz_overrideMethod (c$, "print", 
51648 function (g) {
51649 }, "java.awt.Graphics");
51650 Clazz_overrideMethod (c$, "setBounds", 
51651 function (x, y, width, height, op) {
51652 }, "~N,~N,~N,~N,~N");
51653 Clazz_overrideMethod (c$, "handleEvent", 
51654 function (e) {
51655 }, "java.awt.AWTEvent");
51656 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51657 function (e) {
51658 }, "java.awt.event.PaintEvent");
51659 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51660 function () {
51661 return  new java.awt.Point ();
51662 });
51663 Clazz_overrideMethod (c$, "getPreferredSize", 
51664 function () {
51665 return null;
51666 });
51667 Clazz_overrideMethod (c$, "getMinimumSize", 
51668 function () {
51669 return null;
51670 });
51671 Clazz_overrideMethod (c$, "getColorModel", 
51672 function () {
51673 return null;
51674 });
51675 Clazz_overrideMethod (c$, "dispose", 
51676 function () {
51677 });
51678 Clazz_overrideMethod (c$, "setForeground", 
51679 function (c) {
51680 }, "java.awt.Color");
51681 Clazz_overrideMethod (c$, "setBackground", 
51682 function (c) {
51683 }, "java.awt.Color");
51684 Clazz_overrideMethod (c$, "setFont", 
51685 function (f) {
51686 this.font = f;
51687 }, "java.awt.Font");
51688 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51689 function () {
51690 });
51691 Clazz_overrideMethod (c$, "requestFocus", 
51692 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51693 return false;
51694 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51695 Clazz_overrideMethod (c$, "isFocusable", 
51696 function () {
51697 return false;
51698 });
51699 Clazz_defineMethod (c$, "createImage", 
51700 function (producer) {
51701 return null;
51702 }, "java.awt.image.ImageProducer");
51703 Clazz_defineMethod (c$, "createImage", 
51704 function (width, height) {
51705 return null;
51706 }, "~N,~N");
51707 Clazz_overrideMethod (c$, "createVolatileImage", 
51708 function (width, height) {
51709 return null;
51710 }, "~N,~N");
51711 Clazz_overrideMethod (c$, "prepareImage", 
51712 function (img, w, h, o) {
51713 return false;
51714 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51715 Clazz_overrideMethod (c$, "checkImage", 
51716 function (img, w, h, o) {
51717 return 0;
51718 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51719 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51720 function () {
51721 return null;
51722 });
51723 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51724 function () {
51725 return false;
51726 });
51727 Clazz_overrideMethod (c$, "getBackBuffer", 
51728 function () {
51729 return null;
51730 });
51731 Clazz_overrideMethod (c$, "destroyBuffers", 
51732 function () {
51733 });
51734 Clazz_overrideMethod (c$, "reparent", 
51735 function (newContainer) {
51736 }, "java.awt.peer.ContainerPeer");
51737 Clazz_overrideMethod (c$, "isReparentSupported", 
51738 function () {
51739 return false;
51740 });
51741 Clazz_overrideMethod (c$, "layout", 
51742 function () {
51743 });
51744 Clazz_overrideMethod (c$, "getBounds", 
51745 function () {
51746 return null;
51747 });
51748 Clazz_overrideMethod (c$, "toFront", 
51749 function () {
51750 });
51751 Clazz_overrideMethod (c$, "toBack", 
51752 function () {
51753 });
51754 Clazz_overrideMethod (c$, "updateAlwaysOnTopState", 
51755 function () {
51756 });
51757 Clazz_overrideMethod (c$, "updateFocusableWindowState", 
51758 function () {
51759 });
51760 Clazz_overrideMethod (c$, "requestWindowFocus", 
51761 function () {
51762 return false;
51763 });
51764 Clazz_overrideMethod (c$, "setModalBlocked", 
51765 function (blocker, blocked) {
51766 }, "java.awt.Dialog,~B");
51767 Clazz_overrideMethod (c$, "updateMinimumSize", 
51768 function () {
51769 });
51770 Clazz_overrideMethod (c$, "updateIconImages", 
51771 function () {
51772 });
51773 Clazz_overrideMethod (c$, "setOpacity", 
51774 function (opacity) {
51775 }, "~N");
51776 Clazz_overrideMethod (c$, "setOpaque", 
51777 function (isOpaque) {
51778 }, "~B");
51779 Clazz_overrideMethod (c$, "updateWindow", 
51780 function (backBuffer) {
51781 }, "java.awt.image.BufferedImage");
51782 Clazz_overrideMethod (c$, "repositionSecurityWarning", 
51783 function () {
51784 });
51785 Clazz_overrideMethod (c$, "setTitle", 
51786 function (title) {
51787 }, "~S");
51788 Clazz_overrideMethod (c$, "setMenuBar", 
51789 function (mb) {
51790 }, "~O");
51791 Clazz_overrideMethod (c$, "setResizable", 
51792 function (resizeable) {
51793 }, "~B");
51794 Clazz_overrideMethod (c$, "setState", 
51795 function (state) {
51796 }, "~N");
51797 Clazz_overrideMethod (c$, "getState", 
51798 function () {
51799 return 0;
51800 });
51801 Clazz_overrideMethod (c$, "setMaximizedBounds", 
51802 function (bounds) {
51803 }, "java.awt.Rectangle");
51804 Clazz_overrideMethod (c$, "setBoundsPrivate", 
51805 function (x, y, width, height) {
51806 }, "~N,~N,~N,~N");
51807 Clazz_overrideMethod (c$, "getBoundsPrivate", 
51808 function () {
51809 return null;
51810 });
51811 });
51812 Clazz_declarePackage ("swingjs");
51813 Clazz_load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () {
51814 c$ = Clazz_declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment);
51815 Clazz_makeConstructor (c$, 
51816 function () {
51817 Clazz_superConstructor (this, swingjs.JSGraphicsEnvironment, []);
51818 System.out.println ("JSGraphicsEnvironment initialized");
51819 });
51820 Clazz_overrideMethod (c$, "createGraphics", 
51821 function (img) {
51822 return this.createGraphicsSized (img, img.getWidth (), img.getHeight ());
51823 }, "java.awt.image.BufferedImage");
51824 Clazz_defineMethod (c$, "createGraphicsSized", 
51825 function (img, width, height) {
51826 var g = null;
51827 {
51828 g = img._g;
51829 }if (g == null) {
51830 var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ());
51831 {
51832 canvas.width = width;
51833 canvas.height = height;
51834 img._canvas = canvas;
51835 }g =  new swingjs.JSGraphics2D (canvas);
51836 {
51837 img._g = g;
51838 }}return g;
51839 }, "~O,~N,~N");
51840 Clazz_overrideMethod (c$, "getAllFonts", 
51841 function () {
51842 return null;
51843 });
51844 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51845 function () {
51846 return null;
51847 });
51848 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51849 function (l) {
51850 return null;
51851 }, "java.util.Locale");
51852 Clazz_overrideMethod (c$, "getDefaultScreenDevice", 
51853 function () {
51854 if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice");
51855 return swingjs.JSGraphicsEnvironment.device;
51856 });
51857 Clazz_defineStatics (c$,
51858 "device", null);
51859 });
51860 Clazz_declarePackage ("swingjs.plaf");
51861 Clazz_load (["javax.swing.LookAndFeel"], "swingjs.plaf.HTML5LookAndFeel", ["java.lang.Boolean", "$.Long", "java.awt.Color", "$.Dimension", "javax.swing.DefaultListCellRenderer", "$.UIDefaults", "javax.swing.UIDefaults.ActiveValue", "javax.swing.plaf.ColorUIResource", "$.DimensionUIResource", "$.FontUIResource", "$.InsetsUIResource"], function () {
51862 c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel);
51863 Clazz_overrideMethod (c$, "getDefaults", 
51864 function () {
51865 var table =  new javax.swing.UIDefaults (610, 0.75);
51866 this.initClassDefaults (table);
51867 this.initSystemColorDefaults (table);
51868 this.initComponentDefaults (table);
51869 return table;
51870 });
51871 Clazz_overrideMethod (c$, "initialize", 
51872 function () {
51873 });
51874 Clazz_defineMethod (c$, "installAWTEventListener", 
51875 function () {
51876 });
51877 Clazz_overrideMethod (c$, "uninitialize", 
51878 function () {
51879 });
51880 Clazz_defineMethod (c$, "initClassDefaults", 
51881 function (table) {
51882 var packageName = "swingjs.plaf.";
51883 var uiDefaults =  Clazz_newArray (-1, ["ButtonUI", "swingjs.plaf.JSButtonUI", "CheckBoxUI", "swingjs.plaf.JSCheckBoxUI", "ColorChooserUI", "swingjs.plaf.JSColorChooserUI", "FormattedTextFieldUI", "swingjs.plaf.JSFormattedTextFieldUI", "MenuBarUI", "swingjs.plaf.JSMenuBarUI", "MenuUI", "swingjs.plaf.JSMenuUI", "MenuItemUI", "swingjs.plaf.JSMenuItemUI", "CheckBoxMenuItemUI", "swingjs.plaf.JSCheckBoxMenuItemUI", "RadioButtonMenuItemUI", "swingjs.plaf.JSRadioButtonMenuItemUI", "RadioButtonUI", "swingjs.plaf.JSRadioButtonUI", "ToggleButtonUI", "swingjs.plaf.JSToggleButtonUI", "PopupMenuUI", "swingjs.plaf.JSPopupMenuUI", "ProgressBarUI", "swingjs.plaf.JSProgressBarUI", "ScrollBarUI", "swingjs.plaf.JSScrollBarUI", "ScrollPaneUI", "swingjs.plaf.JSScrollPaneUI", "SplitPaneUI", "swingjs.plaf.JSSplitPaneUI", "SliderUI", "swingjs.plaf.JSSliderUI", "SeparatorUI", "swingjs.plaf.JSSeparatorUI", "SpinnerUI", "swingjs.plaf.JSSpinnerUI", "ToolBarSeparatorUI", "swingjs.plaf.JSToolBarSeparatorUI", "PopupMenuSeparatorUI", "swingjs.plaf.JSPopupMenuSeparatorUI", "TabbedPaneUI", "swingjs.plaf.JSTabbedPaneUI", "TextAreaUI", "swingjs.plaf.JSTextAreaUI", "TextFieldUI", "swingjs.plaf.JSTextFieldUI", "PasswordFieldUI", "swingjs.plaf.JSPasswordFieldUI", "TextPaneUI", "swingjs.plaf.JSTextPaneUI", "EditorPaneUI", "swingjs.plaf.JSEditorPaneUI", "TreeUI", "swingjs.plaf.JSTreeUI", "LabelUI", "swingjs.plaf.JSLabelUI", "ListUI", "swingjs.plaf.JSListUI", "ToolBarUI", "swingjs.plaf.JSToolBarUI", "ToolTipUI", "swingjs.plaf.JSToolTipUI", "ComboBoxUI", "swingjs.plaf.JSComboBoxUI", "TableUI", "swingjs.plaf.JSTableUI", "TableHeaderUI", "swingjs.plaf.JSTableHeaderUI", "InternalFrameUI", "swingjs.plaf.JSInternalFrameUI", "DesktopPaneUI", "swingjs.plaf.JSDesktopPaneUI", "DesktopIconUI", "swingjs.plaf.JSDesktopIconUI", "OptionPaneUI", "swingjs.plaf.JSOptionPaneUI", "PanelUI", "swingjs.plaf.JSPanelUI", "ViewportUI", "swingjs.plaf.JSViewportUI", "RootPaneUI", "swingjs.plaf.JSRootPaneUI"]);
51884 table.putDefaults (uiDefaults);
51885 }, "javax.swing.UIDefaults");
51886 Clazz_defineMethod (c$, "initSystemColorDefaults", 
51887 function (table) {
51888 var defaultSystemColors =  Clazz_newArray (-1, ["window", "#FFFFFF", "windowText", "#333333", "menu", "#C0C0C0", "menuText", "#333333", "text", "#C0C0C0", "textText", "#333333", "control", "#EEEEEE", "controlText", "#333333", "scrollbar", "#E0E0E0", "info", "#FFFFE1", "infoText", "#000000"]);
51889 this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ());
51890 }, "javax.swing.UIDefaults");
51891 Clazz_defineMethod (c$, "loadSystemColors", 
51892 function (table, systemColors, useNative) {
51893 for (var i = 0; i < systemColors.length; i += 2) {
51894 var color = java.awt.Color.black;
51895 try {
51896 color = java.awt.Color.decode (systemColors[i + 1]);
51897 } catch (e) {
51898 if (Clazz_exceptionOf (e, NumberFormatException)) {
51899 e.printStackTrace ();
51900 } else {
51901 throw e;
51902 }
51903 }
51904 table.put (systemColors[i],  new javax.swing.plaf.ColorUIResource (color));
51905 }
51906 }, "javax.swing.UIDefaults,~A,~B");
51907 Clazz_defineMethod (c$, "initResourceBundle", 
51908  function (table) {
51909 }, "javax.swing.UIDefaults");
51910 Clazz_defineMethod (c$, "initComponentDefaults", 
51911 function (table) {
51912 this.initResourceBundle (table);
51913 var oneThousand =  new Long (1000);
51914 var twelve =  new Integer (12);
51915 var fontPlain =  new Integer (0);
51916 var serifPlain12 =  new javax.swing.plaf.FontUIResource ("Serif", 0, 12);
51917 var sansSerifPlain12 =  new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12);
51918 var dialogPlain12 =  new javax.swing.plaf.FontUIResource ("Dialog", 0, 12);
51919 var monospacedPlain12 =  new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12);
51920 var black =  new javax.swing.plaf.ColorUIResource (java.awt.Color.black);
51921 var white =  new javax.swing.plaf.ColorUIResource (java.awt.Color.white);
51922 var gray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.gray);
51923 var darkGray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray);
51924 var control = table.getColor ("control");
51925 var controlText = table.getColor ("controlText");
51926 var menu = table.getColor ("menu");
51927 var menuText = table.getColor ("menuText");
51928 var textText = table.getColor ("textText");
51929 var window = table.getColor ("window");
51930 var zeroInsets =  new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0);
51931 var twoInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2);
51932 var threeInsets =  new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3);
51933 var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null));
51934 var zero =  new Integer (0);
51935 var tabbedPaneTabInsets =  new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4);
51936 var tabbedPaneTabPadInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1);
51937 var tabbedPaneTabAreaInsets =  new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2);
51938 var tabbedPaneContentBorderInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3);
51939 var editorMargin = threeInsets;
51940 var four =  new Integer (4);
51941 var defaults =  Clazz_newArray (-1, ["*.font", dialogPlain12, "*.background", control, "*.foreground", controlText, "Button.margin",  new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.margin",  new javax.swing.plaf.InsetsUIResource (2, 14, 2, 14), "ToggleButton.textIconGap", four, "ToggleButton.textShiftOffset", zero, "RadioButton.margin", twoInsets, "RadioButton.textIconGap", four, "RadioButton.textShiftOffset", zero, "CheckBox.margin", twoInsets, "CheckBox.textIconGap", four, "CheckBox.textShiftOffset", zero, "ColorChooser.swatchesSwatchSize",  new java.awt.Dimension (10, 10), "ColorChooser.swatchesRecentSwatchSize",  new java.awt.Dimension (10, 10), "ColorChooser.swatchesDefaultRecentColor", control, "ComboBox.font", sansSerifPlain12, "ComboBox.background", window, "ComboBox.foreground", textText, "ComboBox.timeFactor", oneThousand, "ComboBox.isEnterSelectablePopup", Boolean.FALSE, "FileChooser.readOnly", Boolean.FALSE, "Label.border", null, "List.background", window, "List.foreground", textText, "List.cellRenderer", listCellRendererActiveValue, "List.timeFactor", oneThousand, "MenuBar.font", dialogPlain12, "MenuBar.background", menu, "MenuBar.foreground", menuText, "MenuItem.font", dialogPlain12, "MenuItem.background", menu, "MenuItem.foreground", menuText, "MenuItem.margin", twoInsets, "RadioButtonMenuItem.font", dialogPlain12, "RadioButtonMenuItem.background", menu, "RadioButtonMenuItem.foreground", menuText, "RadioButtonMenuItem.margin", twoInsets, "CheckBoxMenuItem.font", dialogPlain12, "CheckBoxMenuItem.background", menu, "CheckBoxMenuItem.foreground", menuText, "CheckBoxMenuItem.margin", twoInsets, "Menu.background", menu, "Menu.foreground", menuText, "Menu.margin", twoInsets, "PopupMenu.background", menu, "PopupMenu.foreground", menuText, "PopupMenu.consumeEventOnClose", Boolean.FALSE, "OptionPane.messageForeground", controlText, "Panel.font", dialogPlain12, "Panel.background", control, "Panel.foreground", textText, "ProgressBar.cellLength",  new Integer (1), "ProgressBar.cellSpacing", zero, "ProgressBar.repaintInterval",  new Integer (50), "ProgressBar.cycleTime",  new Integer (3000), "ProgressBar.horizontalSize",  new javax.swing.plaf.DimensionUIResource (146, 12), "ProgressBar.verticalSize",  new javax.swing.plaf.DimensionUIResource (12, 146), "ScrollBar.foreground", control, "ScrollBar.width",  new Integer (16), "Viewport.foreground", textText, "Slider.horizontalSize",  new java.awt.Dimension (200, 21), "Slider.verticalSize",  new java.awt.Dimension (21, 200), "Slider.minimumHorizontalSize",  new java.awt.Dimension (36, 21), "Slider.minimumVerticalSize",  new java.awt.Dimension (21, 36), "Spinner.font", monospacedPlain12, "Spinner.arrowButtonSize",  new java.awt.Dimension (16, 5), "Spinner.editorAlignment", new Integer (11), "SplitPane.background", control, "SplitPane.dividerSize",  new Integer (7), "SplitPaneDivider.draggingColor", darkGray, "TabbedPane.selected", null, "TabbedPane.textIconGap", four, "TabbedPane.tabsOverlapBorder", Boolean.FALSE, "TabbedPane.labelShift", new Integer (1), "TabbedPane.selectedLabelShift", new Integer (-1), "TabbedPane.tabInsets", tabbedPaneTabInsets, "TabbedPane.selectedTabPadInsets", tabbedPaneTabPadInsets, "TabbedPane.tabAreaInsets", tabbedPaneTabAreaInsets, "TabbedPane.contentBorderInsets", tabbedPaneContentBorderInsets, "TabbedPane.tabRunOverlay",  new Integer (2), "Table.background", window, "Table.dropLineShortColor", black, "Table.gridColor", gray, "Table.focusCellBackground", window, "Table.focusCellForeground", controlText, "TextField.font", sansSerifPlain12, "TextField.background", window, "TextField.foreground", textText, "TextField.margin", zeroInsets, "FormattedTextField.font", sansSerifPlain12, "FormattedTextField.background", window, "FormattedTextField.foreground", textText, "FormattedTextField.caretForeground", textText, "FormattedTextField.margin", zeroInsets, "PasswordField.font", monospacedPlain12, "PasswordField.background", window, "PasswordField.foreground", textText, "PasswordField.margin", zeroInsets, "PasswordField.echoChar", new Character ('*'), "TextArea.font", monospacedPlain12, "TextArea.background", window, "TextArea.foreground", textText, "TextArea.margin", zeroInsets, "TextPane.font", serifPlain12, "TextPane.background", white, "TextPane.foreground", textText, "TextPane.margin", editorMargin, "EditorPane.font", serifPlain12, "EditorPane.background", white, "EditorPane.foreground", textText, "EditorPane.margin", editorMargin, "TitledBorder.titleColor", controlText, "Tree.paintLines", Boolean.TRUE, "Tree.lineTypeDashed", Boolean.FALSE, "Tree.background", window, "Tree.foreground", textText, "Tree.hash", gray, "Tree.textForeground", textText, "Tree.textBackground", table.get ("text"), "Tree.leftChildIndent",  new Integer (7), "Tree.rightChildIndent",  new Integer (13), "Tree.rowHeight",  new Integer (16), "Tree.scrollsOnExpand", Boolean.TRUE, "Tree.timeFactor", oneThousand]);
51942 table.putDefaults (defaults);
51943 }, "javax.swing.UIDefaults");
51944 Clazz_overrideMethod (c$, "getName", 
51945 function () {
51946 return "SwingJS";
51947 });
51948 Clazz_overrideMethod (c$, "getID", 
51949 function () {
51950 return "SwingJS";
51951 });
51952 Clazz_overrideMethod (c$, "getDescription", 
51953 function () {
51954 return "SwingJS L&F";
51955 });
51956 Clazz_overrideMethod (c$, "isNativeLookAndFeel", 
51957 function () {
51958 return true;
51959 });
51960 Clazz_overrideMethod (c$, "isSupportedLookAndFeel", 
51961 function () {
51962 return true;
51963 });
51964 c$.$HTML5LookAndFeel$1$ = function () {
51965 Clazz_pu$h(self.c$);
51966 c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue);
51967 Clazz_overrideMethod (c$, "createValue", 
51968 function (table) {
51969 return  new javax.swing.DefaultListCellRenderer.UIResource ();
51970 }, "javax.swing.UIDefaults");
51971 c$ = Clazz_p0p ();
51972 };
51973 });
51974 Clazz_declarePackage ("swingjs.plaf");
51975 Clazz_load (["javax.swing.plaf.ComponentUI", "swingjs.plaf.JSEventHandler"], "swingjs.plaf.JSComponentUI", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Color", "$.Component", "$.Dimension", "$.Point", "$.Toolkit", "java.awt.event.FocusEvent", "swingjs.JSToolkit", "swingjs.api.DOMNode"], function () {
51976 c$ = Clazz_decorateAsClass (function () {
51977 this.id = null;
51978 this.c = null;
51979 this.outerNode = null;
51980 this.domNode = null;
51981 this.enableNode = null;
51982 this.textNode = null;
51983 this.valueNode = null;
51984 this.scrollNode = null;
51985 this.focusNode = null;
51986 this.components = null;
51987 this.num = 0;
51988 this.isTainted = true;
51989 this.x = 0;
51990 this.y = 0;
51991 this.preferredSize = null;
51992 this.isContainer = false;
51993 this.parent = null;
51994 this.currentText = null;
51995 this.scrollerNode = null;
51996 this.classID = null;
51997 this.document = null;
51998 this.body = null;
51999 this.needPreferred = false;
52000 Clazz_instantialize (this, arguments);
52001 }, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, swingjs.plaf.JSEventHandler);
52002 Clazz_makeConstructor (c$, 
52003 function () {
52004 Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []);
52005 this.setDoc ();
52006 });
52007 Clazz_defineMethod (c$, "setDoc", 
52008 function () {
52009 {
52010 this.document = document;
52011 this.body = document.body;
52012 }});
52013 Clazz_overrideMethod (c$, "installUI", 
52014 function (c) {
52015 }, "javax.swing.JComponent");
52016 Clazz_overrideMethod (c$, "uninstallUI", 
52017 function (c) {
52018 this.uninstallJSUI ();
52019 }, "javax.swing.JComponent");
52020 Clazz_defineMethod (c$, "$", 
52021 function (node) {
52022 return swingjs.JSToolkit.getJQuery ().$ (node);
52023 }, "swingjs.api.DOMNode");
52024 Clazz_defineMethod (c$, "setTainted", 
52025 function () {
52026 this.isTainted = true;
52027 });
52028 Clazz_defineMethod (c$, "set", 
52029 function (target) {
52030 this.c = target;
52031 this.newID ();
52032 if (this.needPreferred) this.getPreferredSize (this.c);
52033 this.installJSUI ();
52034 return this;
52035 }, "javax.swing.JComponent");
52036 Clazz_defineMethod (c$, "newID", 
52037 function () {
52038 this.classID = this.c.getUIClassID ();
52039 if (this.id == null) {
52040 this.num = ++swingjs.plaf.JSComponentUI.incr;
52041 this.id = this.c.getHTMLName (this.classID) + "_" + this.num;
52042 }});
52043 Clazz_defineMethod (c$, "setCssFont", 
52044 function (obj, font) {
52045 if (font != null) {
52046 var istyle = font.getStyle ();
52047 var name = font.getFamily ();
52048 if (name === "Dialog") name = "Arial";
52049 swingjs.api.DOMNode.setStyles (obj, ["font-family", name, "font-size", font.getSize () + "px", "font-style", ((istyle & 2) == 0 ? "normal" : "italic"), "font-weight", ((istyle & 1) == 0 ? "normal" : "bold")]);
52050 }if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ());
52051 this.setForeground (this.c.getForeground ());
52052 return obj;
52053 }, "swingjs.api.DOMNode,java.awt.Font");
52054 Clazz_defineMethod (c$, "createDOMObject", 
52055 function (key, id, attr) {
52056 var obj = swingjs.api.DOMNode.createElement (key, id);
52057 for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]);
52058
52059 if (!this.c.isEnabled ()) this.setEnabled (false);
52060 return obj;
52061 }, "~S,~S,~A");
52062 Clazz_defineMethod (c$, "bindMouse", 
52063 function (node) {
52064 swingjs.api.DOMNode.setAttr (node, "data-UI", this);
52065 }, "swingjs.api.DOMNode");
52066 Clazz_overrideMethod (c$, "handleJSEvent", 
52067 function (target, eventType, jQueryEvent) {
52068 return false;
52069 }, "~O,~N,~O");
52070 Clazz_defineMethod (c$, "wrap", 
52071 function (type, id, elements) {
52072 return this.append (this.createDOMObject (type, id + type, []), elements);
52073 }, "~S,~S,~A");
52074 Clazz_defineMethod (c$, "append", 
52075 function (obj, elements) {
52076 for (var i = 0; i < elements.length; i++) {
52077 obj.appendChild (elements[i]);
52078 }
52079 return obj;
52080 }, "swingjs.api.DOMNode,~A");
52081 Clazz_defineMethod (c$, "debugDump", 
52082 function (d) {
52083 System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML"));
52084 }, "swingjs.api.DOMNode");
52085 c$.vCenter = Clazz_defineMethod (c$, "vCenter", 
52086 function (obj, offset) {
52087 swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]);
52088 }, "swingjs.api.DOMNode,~N");
52089 Clazz_defineMethod (c$, "setHTMLSize", 
52090 function (obj, addCSS) {
52091 return this.setHTMLSize1 (obj, addCSS, true);
52092 }, "swingjs.api.DOMNode,~B");
52093 Clazz_defineMethod (c$, "setHTMLSize1", 
52094 function (node, addCSS, usePreferred) {
52095 if (node == null) return null;
52096 var h;
52097 var w;
52098 var w0 = null;
52099 var h0 = null;
52100 var parentNode = null;
52101 if (this.scrollerNode != null) {
52102 w = this.scrollerNode.c.getWidth ();
52103 h = this.scrollerNode.c.getHeight ();
52104 } else if (usePreferred && this.preferredSize != null) {
52105 w = this.preferredSize.width;
52106 h = this.preferredSize.height;
52107 } else {
52108 parentNode = swingjs.api.DOMNode.remove (node);
52109 {
52110 w0 = node.style.width;
52111 h0 = node.style.height;
52112 }swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]);
52113 var div;
52114 if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node;
52115  else div = this.wrap ("div", this.id + "_temp", [node]);
52116 swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]);
52117 this.body.appendChild (div);
52118 w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5));
52119 h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5));
52120 this.body.removeChild (div);
52121 }var size = this.getCSSDimension (w, h);
52122 if (addCSS) {
52123 swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]);
52124 swingjs.api.DOMNode.setSize (node, size.width, size.height);
52125 } else {
52126 swingjs.api.DOMNode.setStyles (node, ["position", null]);
52127 if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]);
52128 }if (parentNode != null) parentNode.appendChild (node);
52129 return size;
52130 }, "swingjs.api.DOMNode,~B,~B");
52131 Clazz_defineMethod (c$, "getCSSDimension", 
52132 function (w, h) {
52133 return  new java.awt.Dimension (w, h);
52134 }, "~N,~N");
52135 Clazz_defineMethod (c$, "setHTMLElement", 
52136 function () {
52137 if (!this.isTainted) return this.outerNode;
52138 var root = (this.isContainer ? this.c.getRootPane () : null);
52139 if (this.c === root) {
52140 this.isTainted = false;
52141 return this.outerNode;
52142 }this.domNode = this.getDOMObject ();
52143 if (this.outerNode == null) {
52144 this.outerNode = this.wrap ("div", this.id, [this.domNode]);
52145 if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode);
52146 }swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]);
52147 if (this.isContainer) {
52148 System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ());
52149 swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ());
52150 var children = (this.components == null ? this.c.getComponents () : this.components);
52151 for (var i = children.length; --i >= 0; ) {
52152 var ui = swingjs.JSToolkit.getUI (children[i], false);
52153 if (ui == null) {
52154 continue;
52155 }if (ui.outerNode == null) ui.setHTMLElement ();
52156 if (ui.outerNode == null) {
52157 System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ());
52158 } else {
52159 this.outerNode.appendChild (ui.outerNode);
52160 }ui.parent = this;
52161 }
52162 }this.isTainted = false;
52163 return this.outerNode;
52164 });
52165 Clazz_defineMethod (c$, "getPreferredSize", 
52166 function (c) {
52167 var d = this.setHTMLSize (this.getDOMObject (), false);
52168 return d;
52169 }, "javax.swing.JComponent");
52170 Clazz_defineMethod (c$, "paint", 
52171 function (g, c) {
52172 if (c.isOpaque ()) {
52173 g.setColor (c.getBackground ());
52174 g.fillRect (0, 0, c.getWidth (), c.getHeight ());
52175 }}, "java.awt.Graphics,javax.swing.JComponent");
52176 Clazz_overrideMethod (c$, "update", 
52177 function (g, c) {
52178 var testing = false;
52179 if (testing) {
52180 g.setColor (java.awt.Color.red);
52181 g.drawRect (0, 0, c.getWidth (), c.getHeight ());
52182 System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ());
52183 }this.setHTMLElement ();
52184 this.paint (g, c);
52185 }, "java.awt.Graphics,javax.swing.JComponent");
52186 Clazz_defineMethod (c$, "getMinimumSize", 
52187 function (c) {
52188 return this.getPreferredSize (c);
52189 }, "javax.swing.JComponent");
52190 Clazz_overrideMethod (c$, "getMaximumSize", 
52191 function (c) {
52192 return null;
52193 }, "javax.swing.JComponent");
52194 Clazz_overrideMethod (c$, "contains", 
52195 function (c, x, y) {
52196 return c.inside (x, y);
52197 }, "javax.swing.JComponent,~N,~N");
52198 c$.createUI = Clazz_overrideMethod (c$, "createUI", 
52199 function (c) {
52200 return null;
52201 }, "javax.swing.JComponent");
52202 Clazz_overrideMethod (c$, "getBaseline", 
52203 function (c, width, height) {
52204 if (c == null) {
52205 throw  new NullPointerException ("Component must be non-null");
52206 }if (width < 0 || height < 0) {
52207 throw  new IllegalArgumentException ("Width and height must be >= 0");
52208 }return -1;
52209 }, "javax.swing.JComponent,~N,~N");
52210 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
52211 function (c) {
52212 if (c == null) {
52213 throw  new NullPointerException ("Component must be non-null");
52214 }return java.awt.Component.BaselineResizeBehavior.OTHER;
52215 }, "javax.swing.JComponent");
52216 Clazz_defineMethod (c$, "getJSTextValue", 
52217 function () {
52218 return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value");
52219 });
52220 Clazz_defineMethod (c$, "notifyPropertyChanged", 
52221 function (prop) {
52222 var obj = null;
52223 var val = null;
52224 if (prop === "text") {
52225 val = (this.c).getText ();
52226 if (val.equals (this.currentText)) return;
52227 this.currentText = val;
52228 if (this.textNode != null) {
52229 prop = "innerHTML";
52230 obj = this.textNode;
52231 } else if (this.valueNode != null) {
52232 prop = "value";
52233 obj = this.valueNode;
52234 }} else if (prop === "preferredSize") {
52235 this.preferredSize = this.c.getPreferredSize ();
52236 this.getPreferredSize ();
52237 return;
52238 }if (obj == null) {
52239 System.out.println ("JSComponentUI: unrecognized prop: " + prop);
52240 } else {
52241 System.out.println ("JSComponentUI: setting " + this.id + " " + prop);
52242 this.setProp (obj, prop, val);
52243 }}, "~S");
52244 Clazz_defineMethod (c$, "setProp", 
52245 function (obj, prop, val) {
52246 return swingjs.api.DOMNode.setAttr (obj, prop, val);
52247 }, "swingjs.api.DOMNode,~S,~S");
52248 Clazz_overrideMethod (c$, "isObscured", 
52249 function () {
52250 swingjs.JSToolkit.notImplemented ("");
52251 return false;
52252 });
52253 Clazz_overrideMethod (c$, "canDetermineObscurity", 
52254 function () {
52255 swingjs.JSToolkit.notImplemented ("");
52256 return false;
52257 });
52258 Clazz_overrideMethod (c$, "setVisible", 
52259 function (b) {
52260 swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]);
52261 }, "~B");
52262 Clazz_overrideMethod (c$, "setEnabled", 
52263 function (b) {
52264 if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE"));
52265 }, "~B");
52266 Clazz_defineMethod (c$, "paint", 
52267 function (g) {
52268 }, "java.awt.Graphics");
52269 Clazz_overrideMethod (c$, "repaint", 
52270 function (tm, x, y, width, height) {
52271 }, "~N,~N,~N,~N,~N");
52272 Clazz_overrideMethod (c$, "print", 
52273 function (g) {
52274 swingjs.JSToolkit.notImplemented ("");
52275 }, "java.awt.Graphics");
52276 Clazz_overrideMethod (c$, "setBounds", 
52277 function (x, y, width, height, op) {
52278 switch (op) {
52279 case 2:
52280 case 3:
52281 case 4:
52282 if (this.scrollerNode != null) {
52283 width = Math.min (width, this.scrollerNode.c.getWidth ());
52284 height = Math.min (height, this.scrollerNode.c.getHeight ());
52285 }System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op);
52286 if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height);
52287 break;
52288 }
52289 }, "~N,~N,~N,~N,~N");
52290 Clazz_overrideMethod (c$, "handleEvent", 
52291 function (e) {
52292 swingjs.JSToolkit.notImplemented ("");
52293 }, "java.awt.AWTEvent");
52294 Clazz_overrideMethod (c$, "coalescePaintEvent", 
52295 function (e) {
52296 swingjs.JSToolkit.notImplemented ("");
52297 }, "java.awt.event.PaintEvent");
52298 Clazz_overrideMethod (c$, "getLocationOnScreen", 
52299 function () {
52300 var offset = this.$ (this.outerNode).offset ();
52301 return  new java.awt.Point (offset.left, offset.top);
52302 });
52303 Clazz_defineMethod (c$, "getPreferredSize", 
52304 function () {
52305 return this.getPreferredSize (this.c);
52306 });
52307 Clazz_defineMethod (c$, "getMinimumSize", 
52308 function () {
52309 swingjs.JSToolkit.notImplemented ("");
52310 return this.getPreferredSize (this.c);
52311 });
52312 Clazz_overrideMethod (c$, "getColorModel", 
52313 function () {
52314 return java.awt.Toolkit.getDefaultToolkit ().getColorModel ();
52315 });
52316 Clazz_overrideMethod (c$, "getToolkit", 
52317 function () {
52318 return java.awt.Toolkit.getDefaultToolkit ();
52319 });
52320 Clazz_overrideMethod (c$, "getGraphics", 
52321 function () {
52322 return null;
52323 });
52324 Clazz_overrideMethod (c$, "getFontMetrics", 
52325 function (font) {
52326 return this.c.getFontMetrics (font);
52327 }, "java.awt.Font");
52328 Clazz_overrideMethod (c$, "dispose", 
52329 function () {
52330 swingjs.JSToolkit.notImplemented ("");
52331 });
52332 Clazz_overrideMethod (c$, "setForeground", 
52333 function (color) {
52334 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]);
52335 }, "java.awt.Color");
52336 Clazz_overrideMethod (c$, "setBackground", 
52337 function (color) {
52338 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]);
52339 }, "java.awt.Color");
52340 Clazz_overrideMethod (c$, "setFont", 
52341 function (f) {
52342 if (this.domNode != null) this.setCssFont (this.domNode, f);
52343 }, "java.awt.Font");
52344 Clazz_overrideMethod (c$, "updateCursorImmediately", 
52345 function () {
52346 swingjs.JSToolkit.notImplemented ("");
52347 });
52348 Clazz_overrideMethod (c$, "requestFocus", 
52349 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
52350 if (this.focusNode == null) return false;
52351 this.$ (this.focusNode).focus ();
52352 if (this.textNode != null) this.$ (this.textNode).select ();
52353 return true;
52354 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
52355 Clazz_overrideMethod (c$, "isFocusable", 
52356 function () {
52357 return (this.focusNode != null);
52358 });
52359 Clazz_defineMethod (c$, "createImage", 
52360 function (producer) {
52361 swingjs.JSToolkit.notImplemented ("");
52362 return null;
52363 }, "java.awt.image.ImageProducer");
52364 Clazz_defineMethod (c$, "createImage", 
52365 function (width, height) {
52366 swingjs.JSToolkit.notImplemented ("");
52367 return null;
52368 }, "~N,~N");
52369 Clazz_overrideMethod (c$, "createVolatileImage", 
52370 function (width, height) {
52371 swingjs.JSToolkit.notImplemented ("");
52372 return null;
52373 }, "~N,~N");
52374 Clazz_overrideMethod (c$, "prepareImage", 
52375 function (img, w, h, o) {
52376 swingjs.JSToolkit.notImplemented ("");
52377 return false;
52378 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52379 Clazz_overrideMethod (c$, "checkImage", 
52380 function (img, w, h, o) {
52381 swingjs.JSToolkit.notImplemented ("");
52382 return 0;
52383 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52384 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
52385 function () {
52386 swingjs.JSToolkit.notImplemented ("");
52387 return null;
52388 });
52389 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
52390 function () {
52391 swingjs.JSToolkit.notImplemented ("");
52392 return false;
52393 });
52394 Clazz_overrideMethod (c$, "getBackBuffer", 
52395 function () {
52396 swingjs.JSToolkit.notImplemented ("");
52397 return null;
52398 });
52399 Clazz_overrideMethod (c$, "destroyBuffers", 
52400 function () {
52401 swingjs.JSToolkit.notImplemented ("");
52402 });
52403 Clazz_overrideMethod (c$, "reparent", 
52404 function (newContainer) {
52405 swingjs.JSToolkit.notImplemented ("");
52406 }, "java.awt.peer.ContainerPeer");
52407 Clazz_overrideMethod (c$, "isReparentSupported", 
52408 function () {
52409 swingjs.JSToolkit.notImplemented ("");
52410 return false;
52411 });
52412 Clazz_overrideMethod (c$, "layout", 
52413 function () {
52414 swingjs.JSToolkit.notImplemented ("");
52415 });
52416 Clazz_overrideMethod (c$, "getBounds", 
52417 function () {
52418 swingjs.JSToolkit.notImplemented ("");
52419 return null;
52420 });
52421 Clazz_defineMethod (c$, "hasFocus", 
52422 function () {
52423 return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement");
52424 });
52425 Clazz_defineMethod (c$, "notifyFocus", 
52426 function (focusGained) {
52427 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005));
52428 }, "~B");
52429 Clazz_defineStatics (c$,
52430 "incr", 0);
52431 });
52432 Clazz_declarePackage ("swingjs.plaf");
52433 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () {
52434 c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI);
52435 Clazz_makeConstructor (c$, 
52436 function () {
52437 Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []);
52438 this.isContainer = true;
52439 this.setDoc ();
52440 });
52441 Clazz_overrideMethod (c$, "getDOMObject", 
52442 function () {
52443 if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []);
52444 return this.domNode;
52445 });
52446 Clazz_overrideMethod (c$, "setHTMLSize", 
52447 function (obj, addCSS) {
52448 return  new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ());
52449 }, "swingjs.api.DOMNode,~B");
52450 Clazz_defineMethod (c$, "getPreferredSize", 
52451 function (c) {
52452 return null;
52453 }, "javax.swing.JComponent");
52454 Clazz_overrideMethod (c$, "installJSUI", 
52455 function () {
52456 javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font");
52457 });
52458 Clazz_overrideMethod (c$, "uninstallJSUI", 
52459 function () {
52460 });
52461 });
52462 Clazz_declarePackage ("swingjs.plaf");
52463 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {
52464 c$ = Clazz_decorateAsClass (function () {
52465 this.label = null;
52466 Clazz_instantialize (this, arguments);
52467 }, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI);
52468 Clazz_overrideMethod (c$, "getDOMObject", 
52469 function () {
52470 return this.getButtonObject ("radio");
52471 });
52472 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52473 function () {
52474 return "RadioButton.";
52475 });
52476 Clazz_overrideMethod (c$, "setHTMLSize", 
52477 function (obj, addCSS) {
52478 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);
52479 swingjs.api.DOMNode.setStyles (this.label, ["position", null]);
52480 var d = this.setHTMLSize1 (obj, addCSS, false);
52481 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52482 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);
52483 return d;
52484 }, "swingjs.api.DOMNode,~B");
52485 Clazz_defineMethod (c$, "getButtonObject", 
52486 function (myType) {
52487 var b = this.c;
52488 var isNew = false;
52489 var doAll = false;
52490 if (this.domNode == null) {
52491 doAll = true;
52492 if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();
52493 var bg = null;
52494 var name = this.id;
52495 isNew = true;
52496 if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {
52497 bg = (b.getModel ()).getGroup ();
52498 name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);
52499 if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);
52500  else isNew = false;
52501 }this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);
52502 this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);
52503 }if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");
52504 this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());
52505 var drad = this.setHTMLSize1 (this.domBtn, false, false);
52506 this.setHTMLSize1 (this.label, false, false);
52507 var obj = this.wrap ("div", "", [this.domBtn, this.label]);
52508 var dobj = this.setHTMLSize1 (obj, true, true);
52509 swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);
52510 swingjs.plaf.JSComponentUI.vCenter (this.label, -50);
52511 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);
52512 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52513 if (doAll) {
52514 obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);
52515 swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);
52516 } else {
52517 obj = this.domNode;
52518 obj.appendChild (this.domBtn);
52519 obj.appendChild (this.label);
52520 }return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);
52521 }, "~S");
52522 Clazz_defineStatics (c$,
52523 "groupNames", null);
52524 });
52525 Clazz_declarePackage ("swingjs.plaf");
52526 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () {
52527 c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI);
52528 Clazz_makeConstructor (c$, 
52529 function () {
52530 Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []);
52531 this.isContainer = true;
52532 this.setDoc ();
52533 });
52534 Clazz_overrideMethod (c$, "getDOMObject", 
52535 function () {
52536 return null;
52537 });
52538 Clazz_overrideMethod (c$, "installJSUI", 
52539 function () {
52540 });
52541 Clazz_overrideMethod (c$, "uninstallJSUI", 
52542 function () {
52543 });
52544 });
52545 Clazz_declarePackage ("swingjs.plaf");
52546 Clazz_load (["java.awt.event.FocusListener", "$.MouseListener", "$.MouseMotionListener", "java.beans.PropertyChangeListener", "javax.swing.event.ChangeListener", "jssun.swing.UIAction"], "swingjs.plaf.JSButtonListener", ["javax.swing.AbstractButton", "$.KeyStroke", "$.SwingUtilities", "javax.swing.plaf.ComponentInputMapUIResource", "swingjs.plaf.LazyActionMap"], function () {
52547 c$ = Clazz_decorateAsClass (function () {
52548 this.lastPressedTimestamp = -1;
52549 this.shouldDiscardRelease = false;
52550 this.btn = null;
52551 Clazz_instantialize (this, arguments);
52552 }, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]);
52553 c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", 
52554 function (map) {
52555 map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed"));
52556 map.put ( new swingjs.plaf.JSButtonListener.Actions ("released"));
52557 }, "swingjs.plaf.LazyActionMap");
52558 Clazz_makeConstructor (c$, 
52559 function (b) {
52560 this.btn = b;
52561 }, "javax.swing.AbstractButton");
52562 Clazz_overrideMethod (c$, "propertyChange", 
52563 function (e) {
52564 var prop = e.getPropertyName ();
52565 if (prop === "mnemonic") {
52566 this.updateMnemonicBinding (e.getSource ());
52567 } else if (prop === "contentAreaFilled") {
52568 this.checkOpacity (e.getSource ());
52569 } else if (prop === "text" || "font" === prop || "foreground" === prop) {
52570 var b = e.getSource ();
52571 (b.getUI ()).notifyPropertyChanged (prop);
52572 }}, "java.beans.PropertyChangeEvent");
52573 Clazz_defineMethod (c$, "checkOpacity", 
52574 function (b) {
52575 b.setOpaque (b.isContentAreaFilled ());
52576 }, "javax.swing.AbstractButton");
52577 Clazz_defineMethod (c$, "installKeyboardActions", 
52578 function (c) {
52579 var b = c;
52580 this.updateMnemonicBinding (b);
52581 swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap");
52582 var km = this.getInputMap (0, c);
52583 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km);
52584 }, "javax.swing.JComponent");
52585 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52586 function (c) {
52587 javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null);
52588 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null);
52589 javax.swing.SwingUtilities.replaceUIActionMap (c, null);
52590 }, "javax.swing.JComponent");
52591 Clazz_defineMethod (c$, "getInputMap", 
52592 function (condition, c) {
52593 return null;
52594 }, "~N,javax.swing.JComponent");
52595 Clazz_defineMethod (c$, "updateMnemonicBinding", 
52596 function (b) {
52597 var m = b.getMnemonic ();
52598 if (m != 0) {
52599 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52600 if (map == null) {
52601 map =  new javax.swing.plaf.ComponentInputMapUIResource (b);
52602 javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map);
52603 }map.clear ();
52604 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed");
52605 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released");
52606 map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released");
52607 } else {
52608 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52609 if (map != null) {
52610 map.clear ();
52611 }}}, "javax.swing.AbstractButton");
52612 Clazz_overrideMethod (c$, "stateChanged", 
52613 function (e) {
52614 var b = e.getSource ();
52615 b.repaint ();
52616 }, "javax.swing.event.ChangeEvent");
52617 Clazz_overrideMethod (c$, "focusGained", 
52618 function (e) {
52619 }, "java.awt.event.FocusEvent");
52620 Clazz_overrideMethod (c$, "focusLost", 
52621 function (e) {
52622 var b = e.getSource ();
52623 var model = b.getModel ();
52624 model.setArmed (false);
52625 model.setPressed (false);
52626 }, "java.awt.event.FocusEvent");
52627 Clazz_overrideMethod (c$, "mouseMoved", 
52628 function (e) {
52629 }, "java.awt.event.MouseEvent");
52630 Clazz_overrideMethod (c$, "mouseDragged", 
52631 function (e) {
52632 }, "java.awt.event.MouseEvent");
52633 Clazz_overrideMethod (c$, "mouseClicked", 
52634 function (e) {
52635 }, "java.awt.event.MouseEvent");
52636 Clazz_overrideMethod (c$, "mousePressed", 
52637 function (e) {
52638 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52639 var b = e.getSource ();
52640 if (!b.contains (e.getX (), e.getY ())) return;
52641 (b.getUI ()).verifyButtonClick (false);
52642 var multiClickThreshhold = b.getMultiClickThreshhold ();
52643 var lastTime = this.lastPressedTimestamp;
52644 var currentTime = this.lastPressedTimestamp = e.getWhen ();
52645 if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) {
52646 this.shouldDiscardRelease = true;
52647 return;
52648 }var model = b.getModel ();
52649 if (!model.isEnabled ()) {
52650 return;
52651 }if (!model.isArmed ()) {
52652 model.setArmed (true);
52653 }model.setPressed (true);
52654 if (!b.hasFocus () && b.isRequestFocusEnabled ()) {
52655 b.requestFocus ();
52656 }}}, "java.awt.event.MouseEvent");
52657 Clazz_overrideMethod (c$, "mouseReleased", 
52658 function (e) {
52659 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52660 if (this.shouldDiscardRelease) {
52661 this.shouldDiscardRelease = false;
52662 return;
52663 }var b = e.getSource ();
52664 if (!(b.getUI ()).verifyButtonClick (true)) return;
52665 var model = b.getModel ();
52666 model.setPressed (false);
52667 model.setArmed (false);
52668 }}, "java.awt.event.MouseEvent");
52669 Clazz_overrideMethod (c$, "mouseEntered", 
52670 function (e) {
52671 var b = e.getSource ();
52672 var model = b.getModel ();
52673 if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52674 model.setRollover (true);
52675 }if (model.isPressed ()) model.setArmed (true);
52676 }, "java.awt.event.MouseEvent");
52677 Clazz_overrideMethod (c$, "mouseExited", 
52678 function (e) {
52679 var b = e.getSource ();
52680 var model = b.getModel ();
52681 if (b.isRolloverEnabled ()) {
52682 model.setRollover (false);
52683 }model.setArmed (false);
52684 }, "java.awt.event.MouseEvent");
52685 Clazz_pu$h(self.c$);
52686 c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction);
52687 Clazz_overrideMethod (c$, "actionPerformed", 
52688 function (a) {
52689 var b = a.getSource ();
52690 var c = this.getName ();
52691 if (c === "pressed") {
52692 var d = b.getModel ();
52693 d.setArmed (true);
52694 d.setPressed (true);
52695 if (!b.hasFocus ()) {
52696 b.requestFocus ();
52697 }} else if (c === "released") {
52698 var d = b.getModel ();
52699 d.setPressed (false);
52700 d.setArmed (false);
52701 }}, "java.awt.event.ActionEvent");
52702 Clazz_defineMethod (c$, "isEnabled", 
52703 function (a) {
52704 if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) {
52705 return false;
52706 } else {
52707 return true;
52708 }}, "~O");
52709 Clazz_defineStatics (c$,
52710 "PRESS", "pressed",
52711 "RELEASE", "released");
52712 c$ = Clazz_p0p ();
52713 });
52714 Clazz_declarePackage ("swingjs.plaf");
52715 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {
52716 c$ = Clazz_decorateAsClass (function () {
52717 this.domBtn = null;
52718 this.shiftOffset = 0;
52719 this.defaultTextShiftOffset = 0;
52720 Clazz_instantialize (this, arguments);
52721 }, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);
52722 Clazz_overrideMethod (c$, "getDOMObject", 
52723 function () {
52724 if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);
52725 this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());
52726 return this.domNode;
52727 });
52728 Clazz_defineMethod (c$, "verifyButtonClick", 
52729 function (isRelease) {
52730 return true;
52731 }, "~B");
52732 Clazz_overrideMethod (c$, "installJSUI", 
52733 function () {
52734 this.installDefaults (this.c);
52735 this.installListeners (this.c);
52736 this.installKeyboardActions (this.c);
52737 });
52738 Clazz_overrideMethod (c$, "uninstallJSUI", 
52739 function () {
52740 this.uninstallKeyboardActions (this.c);
52741 this.uninstallListeners (this.c);
52742 });
52743 Clazz_defineMethod (c$, "installListeners", 
52744 function (b) {
52745 var listener =  new swingjs.plaf.JSButtonListener (b);
52746 if (listener != null) {
52747 b.addMouseListener (listener);
52748 b.addMouseMotionListener (listener);
52749 b.addFocusListener (listener);
52750 b.addPropertyChangeListener (listener);
52751 b.addChangeListener (listener);
52752 }}, "javax.swing.AbstractButton");
52753 Clazz_defineMethod (c$, "uninstallListeners", 
52754 function (b) {
52755 var listener = this.getButtonListener (b);
52756 if (listener != null) {
52757 b.removeMouseListener (listener);
52758 b.removeMouseMotionListener (listener);
52759 b.removeFocusListener (listener);
52760 b.removeChangeListener (listener);
52761 b.removePropertyChangeListener (listener);
52762 }}, "javax.swing.AbstractButton");
52763 Clazz_defineMethod (c$, "installKeyboardActions", 
52764 function (b) {
52765 var listener = this.getButtonListener (b);
52766 if (listener != null) {
52767 listener.installKeyboardActions (b);
52768 }}, "javax.swing.AbstractButton");
52769 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52770 function (b) {
52771 var listener = this.getButtonListener (b);
52772 if (listener != null) {
52773 listener.uninstallKeyboardActions (b);
52774 }}, "javax.swing.AbstractButton");
52775 Clazz_defineMethod (c$, "getButtonListener", 
52776 function (b) {
52777 var listeners = b.getMouseMotionListeners ();
52778 if (listeners != null) {
52779 for (var counter = 0; counter < listeners.length; counter++) {
52780 if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {
52781 return listeners[counter];
52782 }}
52783 }return null;
52784 }, "javax.swing.AbstractButton");
52785 Clazz_defineMethod (c$, "getPropertyPrefix", 
52786 function () {
52787 return "Button.";
52788 });
52789 Clazz_defineMethod (c$, "installDefaults", 
52790 function (b) {
52791 var pp = this.getPropertyPrefix ();
52792 this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");
52793 if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {
52794 b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));
52795 }javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");
52796 javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));
52797 }, "javax.swing.AbstractButton");
52798 });
52799 Clazz_declarePackage ("swingjs.plaf");
52800 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () {
52801 c$ = Clazz_decorateAsClass (function () {
52802 this.isDomChecked = false;
52803 Clazz_instantialize (this, arguments);
52804 }, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI);
52805 Clazz_overrideMethod (c$, "verifyButtonClick", 
52806 function (isRelease) {
52807 var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true);
52808 if (isRelease && this.isDomChecked == checked) return false;
52809 this.isDomChecked = checked;
52810 return true;
52811 }, "~B");
52812 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52813 function () {
52814 return "ToggleButton.";
52815 });
52816 });
52817 Clazz_declarePackage ("swingjs.plaf");
52818 Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () {
52819 c$ = Clazz_decorateAsClass (function () {
52820 this._loader = null;
52821 Clazz_instantialize (this, arguments);
52822 }, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource);
52823 c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", 
52824 function (c, loaderClass, defaultsKey) {
52825 var map = javax.swing.UIManager.get (defaultsKey);
52826 if (map == null) {
52827 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52828 }javax.swing.SwingUtilities.replaceUIActionMap (c, map);
52829 }, "javax.swing.JComponent,Class,~S");
52830 c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", 
52831 function (loaderClass, defaultsKey) {
52832 var map = javax.swing.UIManager.get (defaultsKey);
52833 if (map == null) {
52834 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52835 }return map;
52836 }, "Class,~S");
52837 Clazz_makeConstructor (c$, 
52838  function (loader) {
52839 Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []);
52840 this._loader = loader;
52841 }, "Class");
52842 Clazz_defineMethod (c$, "put", 
52843 function (action) {
52844 this.put (action.getValue ("Name"), action);
52845 }, "javax.swing.Action");
52846 Clazz_defineMethod (c$, "put", 
52847 function (key, action) {
52848 this.loadIfNecessary ();
52849 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]);
52850 }, "~O,javax.swing.Action");
52851 Clazz_defineMethod (c$, "get", 
52852 function (key) {
52853 this.loadIfNecessary ();
52854 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]);
52855 }, "~O");
52856 Clazz_defineMethod (c$, "remove", 
52857 function (key) {
52858 this.loadIfNecessary ();
52859 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]);
52860 }, "~O");
52861 Clazz_defineMethod (c$, "clear", 
52862 function () {
52863 this.loadIfNecessary ();
52864 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []);
52865 });
52866 Clazz_defineMethod (c$, "keys", 
52867 function () {
52868 this.loadIfNecessary ();
52869 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []);
52870 });
52871 Clazz_defineMethod (c$, "size", 
52872 function () {
52873 this.loadIfNecessary ();
52874 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []);
52875 });
52876 Clazz_defineMethod (c$, "allKeys", 
52877 function () {
52878 this.loadIfNecessary ();
52879 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []);
52880 });
52881 Clazz_defineMethod (c$, "setParent", 
52882 function (map) {
52883 this.loadIfNecessary ();
52884 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]);
52885 }, "javax.swing.ActionMap");
52886 Clazz_defineMethod (c$, "loadIfNecessary", 
52887  function () {
52888 if (this._loader != null) {
52889 {
52890 this._loader.loadActionMap(this);
52891 this._loader = null;
52892 }}});
52893 });
52894 })(Clazz
52895 ,Clazz.getClassName
52896 ,Clazz.newLongArray
52897 ,Clazz.doubleToByte
52898 ,Clazz.doubleToInt
52899 ,Clazz.doubleToLong
52900 ,Clazz.declarePackage
52901 ,Clazz.instanceOf
52902 ,Clazz.load
52903 ,Clazz.instantialize
52904 ,Clazz.decorateAsClass
52905 ,Clazz.floatToInt
52906 ,Clazz.floatToLong
52907 ,Clazz.makeConstructor
52908 ,Clazz.defineEnumConstant
52909 ,Clazz.exceptionOf
52910 ,Clazz.newIntArray
52911 ,Clazz.defineStatics
52912 ,Clazz.newFloatArray
52913 ,Clazz.declareType
52914 ,Clazz.prepareFields
52915 ,Clazz.superConstructor
52916 ,Clazz.newByteArray
52917 ,Clazz.declareInterface
52918 ,Clazz.p0p
52919 ,Clazz.pu$h
52920 ,Clazz.newShortArray
52921 ,Clazz.innerTypeInstance
52922 ,Clazz.isClassDefined
52923 ,Clazz.prepareCallback
52924 ,Clazz.newArray
52925 ,Clazz.castNullAs
52926 ,Clazz.floatToShort
52927 ,Clazz.superCall
52928 ,Clazz.decorateAsType
52929 ,Clazz.newBooleanArray
52930 ,Clazz.newCharArray
52931 ,Clazz.implementOf
52932 ,Clazz.newDoubleArray
52933 ,Clazz.overrideConstructor
52934 ,Clazz.clone
52935 ,Clazz.doubleToShort
52936 ,Clazz.getInheritedLevel
52937 ,Clazz.getParamsType
52938 ,Clazz.isAF
52939 ,Clazz.isAI
52940 ,Clazz.isAS
52941 ,Clazz.isASS
52942 ,Clazz.isAP
52943 ,Clazz.isAFloat
52944 ,Clazz.isAII
52945 ,Clazz.isAFF
52946 ,Clazz.isAFFF
52947 ,Clazz.tryToSearchAndExecute
52948 ,Clazz.getStackTrace
52949 ,Clazz.inheritArgs
52950 ,Clazz.alert
52951 ,Clazz.defineMethod
52952 ,Clazz.overrideMethod
52953 ,Clazz.declareAnonymous
52954 ,Clazz.checkPrivateMethod
52955 ,Clazz.cloneFinals
52956 );