JAL-1807 update
[jalviewjs.git] / site / swingjs / js / core2.js
1 // JSmolJavaExt.js
2  
3
4 // This library will be wrapped by an additional anonymous function using ANT in 
5 // build_03_tojs.xml. This task will also modify variable names. References 
6 // to Clazz._ will not be changed, but other Clazz_xxx will be changed to 
7 // (local scope) Clazz_xxx, allowing them to be further compressed using
8 // Google Closure Compiler in that same ANT task.
9
10 // BH 5/31/2015 5:53:04 PM Number.compareTo added
11 // BH 5/21/2015 5:46:30 PM Number("0xFFFFFFFF") is not -1
12 // BH 4/23/2015 9:08:59 AM xx.getComponentType() is nonfunctional. Array.newInstance now defines a wrapper for .getClass().getComponentType() that works  
13 // BH 4/12/2015 1:37:44 PM adding Math.rint = Math.round
14 // BH 1/16/2015 10:09:38 AM Chrome failure jqGrig due to new String("x").toString() not being a simple string
15 // BH 8/14/2014 6:49:22 PM Character class efficiencies
16 // BH 7/24/2014 9:02:18 AM most browsers do not support String.codePointAt()
17 // BH 7/11/2014 4:17:22 PM fix for Boolean.valueOf("false") not being false 
18 // BH 5/27/2014 6:29:59 AM ensure floats and doubles have decimal point in toString
19 // BH 4/1/2014 12:23:41 PM Encoding moved to Clazz._Encoding; 
20 // BH 4/1/2014 7:51:46 AM removing java.lang.B00lean
21 // BH 3/7/2014 9:17:10 AM removing Array.toString; moving that code here from j2sJmol.js
22 // BH 1/30/2014 9:04:25 AM adding Throwable.getStackTrace() as a STRING
23 // BH 12/4/2013 9:20:44 PM fix for reassigning Date.prototype.toString()
24 // BH 12/3/2013 11:43:10 AM bizarre Safari bug in reassigning Boolean (OK, I admit, we shouldn't have done that...) 
25 // BH 12/1/2013 6:50:16 AM evit Number.prototype.toString assignment removed!
26 // BH 11/30/2013 1:46:31 PM fixing Byte, Short, Long, Integer, Float, Double to reflect proper bounds and error conditions
27 // BH 11/29/2013 8:58:49 PM removing Boolean.toString(boolean)
28 // BH 11/4/2013 7:34:26 AM changing "var nativeClazz" to "var nativeClass" to avoid ANT replacement of "nativeClazz_" to "nativeClazz_"
29 // BH 10/19/2013 1:29:27 PM fixed String.$replace()
30 // BH 10/18/2013 6:09:23 PM fixed (Double|Float).valueOf(NaN).valueOf(), which should return NaN, not throw an error
31 // BH 10/12/2013 11:18:44 AM fixed bug in Double(String) and Float(String) that was returning typeof "string"
32 // BH 10/10/2013 2:40:20 PM  added Math.log10   
33 // BH 7/23/2013 7:24:01 AM fixing Number.shortValue() and Number.byteValue() for negative values
34 // BH 6/16/2013 1:31:30 PM adding /| in String.replace -- thank you David Koes
35 // BH 3/13/2013 12:49:23 PM setting Boolean.valueOf() "@" 
36 // BH 3/2/2013 10:46:45 PM removed Double.valueOf(String)
37 // BH 11/6/2012 8:26:33 PM added instanceof Int32Array in String.instantialize
38 // BH 10/13/2012 11:38:07 PM corrected Integer.parseInt to allow only +-0123456789; created Integer.parseIntRadix
39 // BH 11/1/2012 added Short
40 // BH 9/10/2012 6:27:21 AM added java.net.URL... classes
41 // BH 1/7/2013 7:40:06 AM added Clazz_dateToString
42
43 ;(function(Clazz) {
44
45 // moved here from package.js
46 // these classes will be created as objects prior to any others
47 // and are then available immediately
48
49         Clazz._Loader.registerPackages("java", [ "io", "lang", "lang.reflect", "util" ]);
50
51   var sJU = "java.util";
52
53   //var sJU = "JU";  
54         //Clazz._Loader.registerPackages (sJU, ["regex", "zip"]);
55         //var javautil = JU;
56
57   var javautil = java.util;
58
59         Clazz._Loader.ignore([
60                 "net.sf.j2s.ajax.HttpRequest",
61                 sJU + ".MapEntry.Type",
62                 //"java.net.UnknownServiceException",
63                 "java.lang.Runtime",
64                 "java.security.AccessController",
65                 "java.security.PrivilegedExceptionAction",
66                 "java.io.File",
67                 "java.io.FileInputStream",
68                 "java.io.FileWriter",
69                 "java.io.OutputStreamWriter",
70 //              sJU + ".Calendar", // bypassed in ModelCollection
71 //              "java.text.SimpleDateFormat", // not used
72 //              "java.text.DateFormat", // not used
73                 sJU + ".concurrent.Executors"
74         ])
75
76 Math.rint = Math.round;
77
78 Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});
79
80 if(Clazz._supportsNativeObject){
81         // Number and Array are special -- do not override prototype.toString -- "length - 2" here
82         for(var i=0;i<Clazz._extendedObjectMethods.length - 2;i++){
83                 var p=Clazz._extendedObjectMethods[i];
84                 Array.prototype[p] = Clazz._O.prototype[p];
85                 Number.prototype[p] = Clazz._O.prototype[p];
86         }
87 }
88
89 java.lang.Number=Number;
90 Number.__CLASS_NAME__="Number";
91 Clazz_implementOf(Number,java.io.Serializable);
92 Number.equals=Clazz._innerFunctions.equals;
93 Number.getName=Clazz._innerFunctions.getName;
94 Number.prototype.compareTo = function(x) { var a = this.value, b = x.value; return (a < b ? -1 : a == b ? 0 : 1) };
95
96 Clazz_defineMethod(Number,"shortValue",
97 function(){
98 var x = Math.round(this)&0xffff;
99 return (this < 0 && x > 0 ? x - 0x10000 : x);
100 });
101
102 Clazz_defineMethod(Number,"byteValue",
103 function(){
104 var x = Math.round(this)&0xff;
105 return (this < 0 && x > 0 ? x - 0x100 : x);
106 });
107
108 Clazz_defineMethod(Number,"intValue",
109 function(){
110 return Math.round(this)&0xffffffff;
111 });
112
113 Clazz_defineMethod(Number,"longValue",
114 function(){
115 return Math.round(this);
116 });
117
118 Clazz_defineMethod(Number,"floatValue",
119 function(){
120 return this.valueOf();
121 });
122 Clazz_defineMethod(Number,"doubleValue",
123 function(){
124 return parseFloat(this.valueOf());
125 });
126
127 Clazz_overrideMethod(Number,"hashCode",
128 function(){
129 return this.valueOf();
130 });
131
132 java.lang.Integer=Integer=function(){
133 Clazz_instantialize(this,arguments);
134 };
135 Clazz_decorateAsType(Integer,"Integer",Number,Comparable,null,true);
136 Integer.prototype.valueOf=function(){return 0;};
137 Integer.toString=Integer.prototype.toString=function(){
138 if(arguments.length!=0){
139 return""+arguments[0];
140 } else if(this===Integer){
141 return"class java.lang.Integer";
142 }
143 return""+this.valueOf();
144 };
145
146 /*
147
148 Clazz_makeConstructor(Integer,
149 function(){
150 this.valueOf=function(){
151 return 0;
152 };
153 });
154 */
155
156
157 Clazz_overrideConstructor(Integer, function(v){
158  v == null && (v = 0);
159  if (typeof v != "number")
160         v = Integer.parseIntRadix(v, 10);
161  this.valueOf=function(){return v;};
162 }); //BH
163 /*
164 Clazz_makeConstructor(Integer,
165 function(s){
166 var value=Integer.parseInt(s,10);
167 this.valueOf=function(){
168 return value;
169 };
170 },"String");
171 */
172 Integer.MIN_VALUE=Integer.prototype.MIN_VALUE=-0x80000000;
173 Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=0x7fffffff;
174 Integer.TYPE=Integer.prototype.TYPE=Integer;
175
176
177 Clazz_defineMethod(Integer,"bitCount",
178 function(i) {
179         i = i - ((i >>> 1) & 0x55555555);
180         i = (i & 0x33333333) + ((i >>> 2) & 0x33333333);
181         i = (i + (i >>> 4)) & 0x0f0f0f0f;
182         i = i + (i >>> 8);
183         i = i + (i >>> 16);
184         return i & 0x3f;
185 },"Number");
186 Integer.bitCount=Integer.prototype.bitCount;
187
188 Clazz_defineMethod(Integer,"numberOfLeadingZeros",
189 function(i) {
190  if (i == 0) return 32;
191  var n = 1;
192  if (i >>> 16 == 0) { n += 16; i <<= 16; }
193  if (i >>> 24 == 0) { n +=  8; i <<=  8; }
194  if (i >>> 28 == 0) { n +=  4; i <<=  4; }
195  if (i >>> 30 == 0) { n +=  2; i <<=  2; }
196  n -= i >>> 31;
197  return n;
198 },"Number");
199 Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;
200
201 Clazz_defineMethod(Integer,"numberOfTrailingZeros",
202 function(i) {
203         if (i == 0) return 32;
204         var n = 31;
205         var y = i <<16; if (y != 0) { n = n -16; i = y; }
206         y = i << 8; if (y != 0) { n = n - 8; i = y; }
207         y = i << 4; if (y != 0) { n = n - 4; i = y; }
208         y = i << 2; if (y != 0) { n = n - 2; i = y; }
209         return n - ((i << 1) >>> 31);
210 },"Number");
211 Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;
212
213 Clazz_defineMethod(Integer,"parseIntRadix",
214 function(s,radix){
215 if(s==null){
216 throw new NumberFormatException("null");
217 }if(radix<2){
218 throw new NumberFormatException("radix "+radix+" less than Character.MIN_RADIX");
219 }if(radix>36){
220 throw new NumberFormatException("radix "+radix+" greater than Character.MAX_RADIX");
221 }
222 if (radix == 10) {
223         for (var i = s.length; --i >= 0;) {
224                 var c = s.charCodeAt(i);
225                 if (c >= 48 && c <= 57) continue;
226                 if (i > 0 || c != 43 && c != 45)
227                         throw new NumberFormatException("Not a Number : "+s);
228
229         }
230 }
231 var i=parseInt(s,radix);
232 if(isNaN(i)){
233 throw new NumberFormatException("Not a Number : "+s);
234 }
235 return i;
236 },"String, Number");
237 Integer.parseIntRadix=Integer.prototype.parseIntRadix;
238
239 Clazz_defineMethod(Integer,"parseInt",
240 function(s){
241 return Integer.parseIntRadix(s,10);
242 },"String");
243 Integer.parseInt=Integer.prototype.parseInt;
244
245 /*
246 Clazz_defineMethod(Integer,"$valueOf",
247 function(s){
248 return new Integer(Integer.parseIntRadix(s,10));
249 },"String");
250 */
251
252 Clazz_overrideMethod(Integer,"$valueOf",
253 function(s){
254 return new Integer(s);
255 });
256
257 /*
258 Clazz_defineMethod(Integer,"$valueOf",
259 function(s,r){
260 return new Integer(Integer.parseIntRadix(s,r));
261 },"String, Number");
262 */
263
264 Integer.$valueOf=Integer.prototype.$valueOf;
265
266
267 Clazz_overrideMethod(Integer,"equals",
268 function(s){
269 if(s==null||!Clazz_instanceOf(s,Integer)){
270 return false;
271 }
272 return s.valueOf()==this.valueOf();
273 },"Object");
274 Integer.toHexString=Integer.prototype.toHexString=function(d){
275 if(d.valueOf)d=d.valueOf();
276 if (d < 0) {
277 var b = d & 0xFFFFFF;
278 var c = ((d>>24)&0xFF);
279 return c._numberToString(16) + (b = "000000" + b._numberToString(16)).substring(b.length - 6);
280 }
281 return d._numberToString(16);};
282 Integer.toOctalString=Integer.prototype.toOctalString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(8);};
283 Integer.toBinaryString=Integer.prototype.toBinaryString=function(d){if(d.valueOf)d=d.valueOf();return d._numberToString(2);};
284
285 Integer.decodeRaw=Clazz_defineMethod(Integer,"decodeRaw", function(n){
286 if (n.indexOf(".") >= 0)n = "";
287 var i = (n.startsWith("-") ? 1 : 0);
288 n = n.replace(/\#/, "0x").toLowerCase();
289 var radix=(n.startsWith("0x", i) ? 16 : n.startsWith("0", i) ? 8 : 10);
290 // The general problem with parseInt is that is not strict -- ParseInt("10whatever") == 10.
291 // Number is strict, but Number("055") does not work, though ParseInt("055", 8) does.
292 // need to make sure negative numbers are negative
293 n = Number(n) & 0xFFFFFFFF;
294 return (radix == 8 ? parseInt(n, 8) : n);
295 },"~S");
296
297 Integer.decode=Clazz_defineMethod(Integer,"decode", function(n){
298         n = Integer.decodeRaw(n);
299         if (isNaN(n) || n < Integer.MIN_VALUE|| n > Integer.MAX_VALUE)
300         throw new NumberFormatException("Invalid Integer");
301         return new Integer(n);
302 },"~S");
303
304 Clazz_overrideMethod(Integer,"hashCode",
305 function(){
306 return this.valueOf();
307 });
308
309 // Note that Long is problematic in JavaScript 
310
311 java.lang.Long=Long=function(){
312 Clazz_instantialize(this,arguments);
313 };
314 Clazz_decorateAsType(Long,"Long",Number,Comparable,null,true);
315 Long.prototype.valueOf=function(){return 0;};
316 Long.toString=Long.prototype.toString=function(){
317 if(arguments.length!=0){
318 return""+arguments[0];
319 }else if(this===Long){
320 return"class java.lang.Long";
321 }
322 return""+this.valueOf();
323 };
324
325 Clazz_overrideConstructor(Long, function(v){
326  v == null && (v = 0);
327  v = (typeof v == "number" ? Math.round(v) : Integer.parseIntRadix(v, 10));
328 this.valueOf=function(){return v;};
329 });
330
331 //Long.MIN_VALUE=Long.prototype.MIN_VALUE=-0x8000000000000000;
332 //Long.MAX_VALUE=Long.prototype.MAX_VALUE=0x7fffffffffffffff;
333 Long.TYPE=Long.prototype.TYPE=Long;
334
335 Clazz_defineMethod(Long,"parseLong",
336 function(s,radix){
337  return Integer.parseInt(s, radix || 10);
338 });
339
340 Long.parseLong=Long.prototype.parseLong;
341
342 Clazz_overrideMethod(Long,"$valueOf",
343 function(s){
344 return new Long(s);
345 });
346 /*
347 Clazz_defineMethod(Long,"$valueOf",
348 function(s){
349 return new Long(s);
350 },"Number");
351
352 Clazz_defineMethod(Long,"$valueOf",
353 function(s,r){
354 return new Long(Long.parseLong(s,r));
355 },"String, Number");
356 */
357 Long.$valueOf=Long.prototype.$valueOf;
358 Clazz_overrideMethod(Long,"equals",
359 function(s){
360 if(s==null||!Clazz_instanceOf(s,Long)){
361 return false;
362 }
363 return s.valueOf()==this.valueOf();
364 },"Object");
365 Long.toHexString=Long.prototype.toHexString=function(i){
366 return i.toString(16);
367 };
368 Long.toOctalString=Long.prototype.toOctalString=function(i){
369 return i.toString(8);
370 };
371 Long.toBinaryString=Long.prototype.toBinaryString=function(i){
372 return i.toString(2);
373 };
374
375
376 Long.decode=Clazz_defineMethod(Long,"decode",
377 function(n){
378         n = Integer.decodeRaw(n);
379         if (isNaN(n))
380                 throw new NumberFormatException("Invalid Long");
381         return new Long(n);
382 },"~S");
383
384 java.lang.Short = Short = function () {
385 Clazz_instantialize (this, arguments);
386 };
387 Clazz_decorateAsType (Short, "Short", Number, Comparable, null, true);
388 Short.prototype.valueOf = function () { return 0; };
389 Short.toString = Short.prototype.toString = function () {
390         if (arguments.length != 0) {
391                 return "" + arguments[0];
392         } else if (this === Short) {
393                 return "class java.lang.Short"; // Short.class.toString
394         }
395         return "" + this.valueOf ();
396 };
397
398 Clazz_overrideConstructor(Short,
399 function (v) {
400  v == null && (v = 0);
401  if (typeof v != "number")
402         v = Integer.parseIntRadix(v, 10);
403  v = v.shortValue();
404  this.valueOf = function () {return v;};
405 });
406
407
408 Short.MIN_VALUE = Short.prototype.MIN_VALUE = -32768;
409 Short.MAX_VALUE = Short.prototype.MAX_VALUE = 32767;
410 Short.TYPE = Short.prototype.TYPE = Short;
411
412 Clazz_defineMethod(Short, "parseShortRadix",
413 function (s, radix) {
414 return Integer.parseIntRadix(s, radix).shortValue();
415 }, "String, Number");
416 Short.parseShortRadix = Short.prototype.parseShortRadix;
417
418 Clazz_defineMethod(Short, "parseShort",
419 function (s) {
420 return Short.parseShortRadix (s, 10);
421 }, "String");
422
423 Short.parseShort = Short.prototype.parseShort;
424
425 /*
426 Clazz_defineMethod(Short, "$valueOf",
427 function (s) {
428 return new Short(Short.parseShort (s, 10));
429 }, "String");
430         */
431
432 Clazz_overrideMethod(Short, "$valueOf",
433 function (s) {
434 return new Short(s);
435 });
436
437 /*
438 Clazz_defineMethod(Short, "$valueOf",
439 function (s, r) {
440 return new Short(Short.parseShort (s, r));
441 }, "String, Number");
442         */
443
444 Short.$valueOf = Short.prototype.$valueOf;
445 Clazz_overrideMethod(Short, "equals",
446 function (s) {
447 if(s == null || !Clazz_instanceOf(s, Short) ){
448         return false;
449 }
450 return s.valueOf()  == this.valueOf();
451 }, "Object");
452 Short.toHexString = Short.prototype.toHexString = function (i) {
453         return i.toString (16);
454 };
455 Short.toOctalString = Short.prototype.toOctalString = function (i) {
456         return i.toString (8);
457 };
458 Short.toBinaryString = Short.prototype.toBinaryString = function (i) {
459         return i.toString (2);
460 };
461 Short.decode = Clazz_defineMethod(Short, "decode",
462 function(n){
463         n = Integer.decodeRaw(n);
464         if (isNaN(n) || n < -32768|| n > 32767)
465                 throw new NumberFormatException("Invalid Short");
466         return new Short(n);
467 }, "~S");
468
469 java.lang.Byte=Byte=function(){
470 Clazz_instantialize(this,arguments);
471 };
472 Clazz_decorateAsType(Byte,"Byte",Number,Comparable,null,true);
473 Byte.prototype.valueOf=function(){return 0;};
474 Byte.toString=Byte.prototype.toString=function(){
475 if(arguments.length!=0){
476 return""+arguments[0];
477 }else if(this===Byte){
478 return"class java.lang.Byte";
479 }
480 return""+this.valueOf();
481 };
482 Clazz_makeConstructor(Byte,
483 function(v){
484  if (typeof v != "number")
485          v = Integer.parseIntRadix(v, 10);
486  v = v.byteValue();
487 this.valueOf=function(){
488 return v;
489 };
490 });
491
492 Byte.serialVersionUID=Byte.prototype.serialVersionUID=-7183698231559129828;
493 Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;
494 Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;
495 Byte.SIZE=Byte.prototype.SIZE=8;
496 Byte.TYPE=Byte.prototype.TYPE=Byte;
497
498 Clazz_defineMethod(Byte,"parseByteRadix",
499 function(s,radix){
500  return Integer.parseIntRadix(s, radix).byteValue();
501 },"String, Number");
502 Byte.parseByteRadix=Byte.prototype.parseByteRadix;
503
504 Clazz_defineMethod(Byte,"parseByte",
505 function(s){
506 return Byte.parseByte(s,10);
507 },"String");
508
509 Byte.parseByte=Byte.prototype.parseByte;
510
511 Clazz_overrideMethod(Byte, "$valueOf",
512 function (s) {
513 return new Byte(s);
514 });
515
516 Byte.$valueOf=Byte.prototype.$valueOf;
517 Clazz_overrideMethod(Byte,"equals",
518 function(s){
519 if(s==null||!Clazz_instanceOf(s,Byte)){
520 return false;
521 }
522 return s.valueOf()==this.valueOf();
523 },"Object");
524 Byte.toHexString=Byte.prototype.toHexString=function(i){
525 return i.toString(16);
526 };
527 Byte.toOctalString=Byte.prototype.toOctalString=function(i){
528 return i.toString(8);
529 };
530 Byte.toBinaryString=Byte.prototype.toBinaryString=function(i){
531 return i.toString(2);
532 };
533 Byte.decode=Clazz_defineMethod(Byte,"decode",
534 function(n){
535         n = Integer.decodeRaw(n);
536         if (isNaN(n) || n < -128|| n > 127)
537                 throw new NumberFormatException("Invalid Byte");
538 return new Byte(n);
539 },"~S");
540
541 Clazz._floatToString = function(f) {
542  var s = ""+f
543  if (s.indexOf(".") < 0 && s.indexOf("e") < 0)
544          s += ".0";
545  return s;
546 }
547
548 java.lang.Float=Float=function(){
549 Clazz_instantialize(this,arguments);
550 };
551 Clazz_decorateAsType(Float,"Float",Number,Comparable,null,true);
552 Float.prototype.valueOf=function(){return 0;};
553 Float.toString=Float.prototype.toString=function(){
554 if(arguments.length!=0){
555 return Clazz._floatToString(arguments[0]);
556 }else if(this===Float){
557 return"class java.lang.Float";
558 }
559 return Clazz._floatToString(this.valueOf());
560 };
561
562 Clazz_overrideConstructor(Float, function(v){
563  v == null && (v = 0);
564  if (typeof v != "number") 
565         v = Number(v);
566  this.valueOf=function(){return v;}
567 });
568
569 Float.serialVersionUID=Float.prototype.serialVersionUID=-2671257302660747028;
570 Float.MIN_VALUE=Float.prototype.MIN_VALUE=3.4028235e+38;
571 Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4e-45;
572 Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
573 Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
574 Float.NaN=Number.NaN;
575 Float.TYPE=Float.prototype.TYPE=Float;
576
577 Clazz_defineMethod(Float,"parseFloat",
578 function(s){
579 if(s==null){
580 throw new NumberFormatException("null");
581 }
582 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
583 var floatVal=Number(s);
584 if(isNaN(floatVal)){
585 throw new NumberFormatException("Not a Number : "+s);
586 }
587 return floatVal;
588 },"String");
589 Float.parseFloat=Float.prototype.parseFloat;
590
591 Clazz_overrideMethod(Float,"$valueOf",
592 function(s){
593 return new Float(s);
594 });
595
596 Float.$valueOf=Float.prototype.$valueOf;
597
598 Clazz_defineMethod(Float,"isNaN",
599 function(num){
600 return isNaN(num);
601 },"Number");
602 Float.isNaN=Float.prototype.isNaN;
603 Clazz_defineMethod(Float,"isInfinite",
604 function(num){
605 return!isFinite(num);
606 },"Number");
607 Float.isInfinite=Float.prototype.isInfinite;
608
609 Clazz_overrideMethod(Float,"equals",
610 function(s){
611 if(s==null||!Clazz_instanceOf(s,Float)){
612 return false;
613 }
614 return s.valueOf()==this.valueOf();
615 },"Object");
616
617 java.lang.Double=Double=function(){
618 Clazz_instantialize(this,arguments);
619 };
620 Clazz_decorateAsType(Double,"Double",Number,Comparable,null,true);
621 Double.prototype.valueOf=function(){return 0;};
622 Double.toString=Double.prototype.toString=function(){
623 if(arguments.length!=0){
624 return Clazz._floatToString(arguments[0]);
625 }else if(this===Double){
626 return"class java.lang.Double";
627 }
628 return Clazz._floatToString(this.valueOf());
629 };
630
631 Clazz_overrideConstructor(Double, function(v){
632  v == null && (v = 0);
633  if (typeof v != "number") 
634         v = Double.parseDouble(v);
635  this.valueOf=function(){return v;};
636 }); // BH
637
638 Double.serialVersionUID=Double.prototype.serialVersionUID=-9172774392245257468;
639 Double.MIN_VALUE=Double.prototype.MIN_VALUE=4.9e-324;
640 Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157e+308;
641 Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;
642 Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;
643 Double.NaN=Number.NaN;
644 Double.TYPE=Double.prototype.TYPE=Double;
645
646 Clazz_defineMethod(Double,"isNaN",
647 function(num){
648 return isNaN(num);
649 },"Number");
650 Double.isNaN=Double.prototype.isNaN;
651 Clazz_defineMethod(Double,"isInfinite",
652 function(num){
653 return!isFinite(num);
654 },"Number");
655 Double.isInfinite=Double.prototype.isInfinite;
656
657 Clazz_defineMethod(Double,"parseDouble",
658 function(s){
659 if(s==null){
660 throw new NumberFormatException("null");
661 }
662 if (typeof s == "number")return s;  // important -- typeof NaN is "number" and is OK here
663 var doubleVal=Number(s);
664 if(isNaN(doubleVal)){
665 throw new NumberFormatException("Not a Number : "+s);
666 }
667 return doubleVal;
668 },"String");
669 Double.parseDouble=Double.prototype.parseDouble;
670
671 /*
672 Clazz_defineMethod(Double,"$valueOf",
673 function(s){
674 return new Double(this.parseDouble(s));
675 },"String");
676 */
677
678 Clazz_defineMethod(Double,"$valueOf",
679 function(v){
680 return new Double(v);
681 },"Number");
682
683 Double.$valueOf=Double.prototype.$valueOf;
684
685 Clazz_overrideMethod(Double,"equals",
686 function(s){
687 if(s==null||!Clazz_instanceOf(s,Double)){
688 return false;
689 }
690 return s.valueOf()==this.valueOf();
691 },"Object");
692
693
694 //java.lang.B00lean = Boolean; ?? BH why this?
695 Boolean = java.lang.Boolean = Boolean || function () {Clazz_instantialize (this, arguments);};
696 if (Clazz._supportsNativeObject) {
697         for (var i = 0; i < Clazz._extendedObjectMethods.length; i++) {
698                 var p = Clazz._extendedObjectMethods[i];
699                 Boolean.prototype[p] = Clazz._O.prototype[p];
700         }
701 }
702 Boolean.__CLASS_NAME__="Boolean";
703 Clazz_implementOf(Boolean,[java.io.Serializable,java.lang.Comparable]);
704 Boolean.equals=Clazz._innerFunctions.equals;
705 Boolean.getName=Clazz._innerFunctions.getName;
706 Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-3665804199014368530;
707
708 //Clazz_makeConstructor(Boolean,
709 //function(value){
710 //this.valueOf=function(){
711 //return value;
712 //};
713 //},"~B");
714
715 Clazz_overrideConstructor(Boolean,
716 function(s){
717         var b = ((typeof s == "string" ? Boolean.toBoolean(s) : s) ? true : false);
718         this.valueOf=function(){return b;};
719 },"~O");
720
721 Boolean.parseBoolean=Clazz_defineMethod(Boolean,"parseBoolean",
722 function(s){
723 return Boolean.toBoolean(s);
724 },"~S");
725 Clazz_defineMethod(Boolean,"booleanValue",
726 function(){
727 return this.valueOf();
728 });
729 Boolean.$valueOf=Clazz_overrideMethod(Boolean,"$valueOf",
730 function(b){
731 return((typeof b == "string"? "true".equalsIgnoreCase(b) : b)?Boolean.TRUE:Boolean.FALSE);
732 });
733
734 /*
735 Boolean.toString=Clazz_defineMethod(Boolean,"toString",
736 function(b){
737 return b?"true":"false";
738 },"~B");
739 */
740
741 Clazz_overrideMethod(Boolean,"toString",
742 function(){
743 return this.valueOf()?"true":"false";
744 });
745 Clazz_overrideMethod(Boolean,"hashCode",
746 function(){
747 return this.valueOf()?1231:1237;
748 });
749 Clazz_overrideMethod(Boolean,"equals",
750 function(obj){
751 if(Clazz_instanceOf(obj,Boolean)){
752 return this.booleanValue()==obj.booleanValue();
753 }return false;
754 },"~O");
755 Boolean.getBoolean=Clazz_defineMethod(Boolean,"getBoolean",
756 function(name){
757 var result=false;
758 try{
759 result=Boolean.toBoolean(System.getProperty(name));
760 }catch(e){
761 if(Clazz_instanceOf(e,IllegalArgumentException)){
762 }else if(Clazz_instanceOf(e,NullPointerException)){
763 }else{
764 throw e;
765 }
766 }
767 return result;
768 },"~S");
769 Clazz_overrideMethod(Boolean,"compareTo",
770 function(b){
771 return(b.value==this.value?0:(this.value?1:-1));
772 },"Boolean");
773 Boolean.toBoolean=Clazz_defineMethod(Boolean,"toBoolean",
774 ($fz=function(name){
775 return((name!=null)&&name.equalsIgnoreCase("true"));
776 },$fz.isPrivate=true,$fz),"~S");
777 Boolean.TRUE=Boolean.prototype.TRUE=new Boolean(true);
778 Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(false);
779 Boolean.TYPE=Boolean.prototype.TYPE=Boolean;
780
781
782 Clazz._Encoding=new Object();
783
784 (function(Encoding) {
785
786 Encoding.UTF8="utf-8";
787 Encoding.UTF16="utf-16";
788 Encoding.ASCII="ascii";
789
790
791 Encoding.guessEncoding=function(str){
792 if(str.charCodeAt(0)==0xEF&&str.charCodeAt(1)==0xBB&&str.charCodeAt(2)==0xBF){
793 return Encoding.UTF8;
794 }else if(str.charCodeAt(0)==0xFF&&str.charCodeAt(1)==0xFE){
795 return Encoding.UTF16;
796 }else{
797 return Encoding.ASCII;
798 }
799 };
800
801 Encoding.readUTF8=function(str){
802 var encoding=this.guessEncoding(str);
803 var startIdx=0;
804 if(encoding==Encoding.UTF8){
805 startIdx=3;
806 }else if(encoding==Encoding.UTF16){
807 startIdx=2;
808 }
809 var arrs=new Array();
810 for(var i=startIdx;i<str.length;i++){
811 var charCode=str.charCodeAt(i);
812 if(charCode<0x80){
813 arrs[arrs.length]=str.charAt(i);
814 }else if(charCode>0xc0&&charCode<0xe0){
815 var c1=charCode&0x1f;
816 i++;
817 var c2=str.charCodeAt(i)&0x3f;
818 var c=(c1<<6)+c2;
819 arrs[arrs.length]=String.fromCharCode(c);
820 }else if(charCode>=0xe0){
821 var c1=charCode&0x0f;
822 i++;
823 var c2=str.charCodeAt(i)&0x3f;
824 i++;
825 var c3=str.charCodeAt(i)&0x3f;
826 var c=(c1<<12)+(c2<<6)+c3;
827 arrs[arrs.length]=String.fromCharCode(c);
828 }
829 }
830 return arrs.join('');
831 };
832
833 Encoding.convert2UTF8=function(str){
834 var encoding=this.guessEncoding(str);
835 var startIdx=0;
836 if(encoding==Encoding.UTF8){
837 return str;
838 }else if(encoding==Encoding.UTF16){
839 startIdx=2;
840 }
841
842 var offset=0;
843 var arrs=new Array(offset+str.length-startIdx);
844
845 for(var i=startIdx;i<str.length;i++){
846 var charCode=str.charCodeAt(i);
847 if(charCode<0x80){
848 arrs[offset+i-startIdx]=str.charAt(i);
849 }else if(charCode<=0x07ff){
850 var c1=0xc0+((charCode&0x07c0)>>6);
851 var c2=0x80+(charCode&0x003f);
852 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2);
853 }else{
854 var c1=0xe0+((charCode&0xf000)>>12);
855 var c2=0x80+((charCode&0x0fc0)>>6);
856 var c3=0x80+(charCode&0x003f);
857 arrs[offset+i-startIdx]=String.fromCharCode(c1)+String.fromCharCode(c2)+String.fromCharCode(c3);
858 }
859 }
860 return arrs.join('');
861 };
862 Encoding.base64Chars=new Array(
863 'A','B','C','D','E','F','G','H',
864 'I','J','K','L','M','N','O','P',
865 'Q','R','S','T','U','V','W','X',
866 'Y','Z','a','b','c','d','e','f',
867 'g','h','i','j','k','l','m','n',
868 'o','p','q','r','s','t','u','v',
869 'w','x','y','z','0','1','2','3',
870 '4','5','6','7','8','9','+','/'
871 );
872 Encoding.encodeBase64=function(str){
873 if(str==null||str.length==0)return str;
874 var b64=Encoding.base64Chars;
875 var length=str.length;
876 var index=0;
877 var buf=[];
878 var c0,c1,c2;
879 while(index<length){
880 c0=str.charCodeAt(index++);
881 buf[buf.length]=b64[c0>>2];
882 if(index<length){
883 c1=str.charCodeAt(index++);
884 buf[buf.length]=b64[((c0<<4)&0x30)|(c1>>4)];
885 if(index<length){
886 c2=str.charCodeAt(index++);
887 buf[buf.length]=b64[((c1<<2)&0x3c)|(c2>>6)];
888 buf[buf.length]=b64[c2&0x3F];
889 }else{
890 buf[buf.length]=b64[((c1<<2)&0x3c)];
891 buf[buf.length]='=';
892 }
893 }else{
894 buf[buf.length]=b64[(c0<<4)&0x30];
895 buf[buf.length]='=';
896 buf[buf.length]='=';
897 }
898 }
899 return buf.join('');
900 };
901 Encoding.decodeBase64=function(str){
902 if(str==null||str.length==0)return str;
903 var b64=Encoding.base64Chars;
904 var xb64=Encoding.xBase64Chars;
905 if(Encoding.xBase64Chars==null){
906 xb64=new Object();
907 for(var i=0;i<b64.length;i++){
908 xb64[b64[i]]=i;
909 }
910 Encoding.xBase64Chars=xb64;
911 }
912 var length=str.length;
913 var index=0;
914 var buf=[];
915 var c0,c1,c2,c3;
916 var c=0;
917 while(index<length&&c++<60000){
918 c0=xb64[str.charAt(index++)];
919 c1=xb64[str.charAt(index++)];
920 c2=xb64[str.charAt(index++)];
921 c3=xb64[str.charAt(index++)];
922 buf[buf.length]=String.fromCharCode(((c0<<2)&0xff)|c1>>4);
923 if(c2!=null){
924 buf[buf.length]=String.fromCharCode(((c1<<4)&0xff)|c2>>2);
925 if(c3!=null){
926 buf[buf.length]=String.fromCharCode(((c2<<6)&0xff)|c3);
927 }
928 }
929 }
930 return buf.join('');
931 };
932
933 if(String.prototype.$replace==null){
934 java.lang.String=String;
935 if(Clazz._supportsNativeObject){
936 for(var i=0;i<Clazz._extendedObjectMethods.length;i++){
937 var p=Clazz._extendedObjectMethods[i];
938 if("to$tring"==p||"toString"==p||"equals"==p||"hashCode"==p){
939 continue;
940 }
941 String.prototype[p]=Clazz._O.prototype[p];
942 }
943 }
944
945 Clazz_implementOf(String,[java.io.Serializable,CharSequence,Comparable]);
946
947 String.getName=Clazz._innerFunctions.getName;
948
949 String.serialVersionUID=String.prototype.serialVersionUID=-6849794470754667710;
950
951
952 ;(function(sp) {
953
954 sp.$replace=function(c1,c2){
955         if (c1 == c2 || this.indexOf (c1) < 0) return "" + this;
956         if (c1.length == 1) {
957                 if ("\\$.*+|?^{}()[]".indexOf(c1) >= 0)         c1 = "\\" + c1;
958         } else {    
959                 c1=c1.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function($0,$1){return"\\"+$1;});
960         }
961         return this.replace(new RegExp(c1,"gm"),c2);
962 };
963 sp.$generateExpFunction=function(str){
964 var arr=[];
965 var orders=[];
966 var idx=0;
967 arr[0]="";
968 var i=0;
969 for(;i<str.length;i++){
970 var ch=str.charAt(i);
971 if(i!=str.length-1&&ch=='\\'){
972 i++;
973 var c=str.charAt(i);
974 if(c=='\\'){
975 arr[idx]+='\\';
976 }
977 arr[idx]+=c;
978 }else if(i!=str.length-1&&ch=='$'){
979 i++;
980 orders[idx]=parseInt(str.charAt(i));
981 idx++;
982 arr[idx]="";
983 }else if(ch=='\r'){
984 arr[idx]+="\\r";
985 }else if(ch=='\n'){
986 arr[idx]+="\\n";
987 }else if(ch=='\t'){
988 arr[idx]+="\\t";
989 }else if(ch=='\"'){
990 arr[idx]+="\\\"";
991 }else{
992 arr[idx]+=ch;
993 }
994 }
995 var funStr="f = function (";
996 var max=Math.max.apply({},orders);
997 for(i=0;i<=max;i++){
998 funStr+="$"+i;
999 if(i!=max){
1000 funStr+=", ";
1001 }
1002 }
1003 funStr+=") { return ";
1004 for(i=0;i<arr.length-1;i++){
1005 funStr+="\""+arr[i]+"\" + $"+orders[i]+" + ";
1006 }
1007 funStr+="\""+arr[i]+"\"; }";
1008 var f=null;
1009 eval(funStr)
1010 return f;
1011 };
1012
1013 sp.replaceAll=function(exp,str){
1014 var regExp=new RegExp(exp,"gm");
1015 return this.replace(regExp,this.$generateExpFunction(str));
1016 };
1017 sp.replaceFirst=function(exp,str){
1018 var regExp=new RegExp(exp,"m");
1019 return this.replace(regExp,this.$generateExpFunction(str));
1020 };
1021 sp.matches=function(exp){
1022 if(exp!=null){
1023 exp="^("+exp+")$";
1024 }
1025 var regExp=new RegExp(exp,"gm");
1026 var m=this.match(regExp);
1027 return m!=null&&m.length!=0;
1028 };
1029 sp.regionMatches=function(ignoreCase,toffset,
1030 other,ooffset,len){
1031
1032 if(typeof ignoreCase=="number"
1033 ||(ignoreCase!=true&&ignoreCase!=false)){
1034 len=ooffset;
1035 ooffset=other;
1036 other=toffset;
1037 toffset=ignoreCase;
1038 ignoreCase=false;
1039 }
1040 var to=toffset;
1041 var po=ooffset;
1042
1043 if((ooffset<0)||(toffset<0)||(toffset>this.length-len)||
1044 (ooffset>other.length-len)){
1045 return false;
1046 }
1047 var s1=this.substring(toffset,toffset+len);
1048 var s2=other.substring(ooffset,ooffset+len);
1049 if(ignoreCase){
1050 s1=s1.toLowerCase();
1051 s2=s2.toLowerCase();
1052 }
1053 return s1==s2;
1054 };
1055
1056
1057
1058 sp.$plit=function(regex,limit){
1059 if (!limit && regex == " ")
1060         return this.split(regex);
1061
1062 if(limit!=null&&limit>0){
1063 if(limit==1){
1064 return this;
1065 }
1066 var regExp=new RegExp("("+regex+")","gm");
1067 var count=1;
1068 var s=this.replace(regExp,function($0,$1){
1069 count++;
1070 if(count==limit){
1071 return"@@_@@";
1072 }else if(count>limit){
1073 return $0;
1074 }else{
1075 return $0;
1076 }
1077 });
1078 regExp=new RegExp(regex,"gm");
1079 var arr=this.split(regExp);
1080 if(arr.length>limit){
1081 arr[limit-1]=s.substring(s.indexOf("@@_@@")+5);
1082 arr.length=limit;
1083 }
1084 return arr;
1085 }else{
1086 var regExp=new RegExp(regex,"gm");
1087 return this.split(regExp);
1088 }
1089 };
1090 /*
1091 sp.trim=function(){
1092 var len=this.length;
1093 var st=0;
1094
1095 while((st<len)&&(this.charAt(st)<=' ')){
1096 st++;
1097 }
1098 while((st<len)&&(this.charAt(len-1)<=' ')){
1099 len--;
1100 }
1101 return((st>0)||(len<len))?this.substring(st,len):this;
1102 };
1103
1104
1105 */
1106
1107 if (!sp.trim)
1108 sp.trim=function(){
1109 return this.replace(/^\s+/g,'').replace(/\s+$/g,'');
1110 };
1111
1112 if (!sp.startsWith || !sp.endsWith) {
1113 var sn=function(s, prefix,toffset){
1114 var to=toffset;
1115 var po=0;
1116 var pc=prefix.length;
1117
1118 if((toffset<0)||(toffset>s.length-pc)){
1119 return false;
1120 }
1121 while(--pc>=0){
1122 if(s.charAt(to++)!=prefix.charAt(po++)){
1123 return false;
1124 }
1125 }
1126 return true;
1127 };
1128
1129 sp.startsWith=function(prefix){
1130 if(arguments.length==1){
1131 return sn(this,arguments[0],0);
1132 }else if(arguments.length==2){
1133 return sn(this,arguments[0],arguments[1]);
1134 }else{
1135 return false;
1136 }
1137 };
1138
1139 sp.endsWith=function(suffix){
1140 return sn(this, suffix,this.length-suffix.length);
1141 };
1142
1143 }
1144
1145 sp.equals=function(anObject){
1146 return this.valueOf()==anObject;
1147 };
1148
1149 sp.equalsIgnoreCase=function(anotherString){
1150 return(anotherString==null)?false:(this==anotherString
1151 ||this.toLowerCase()==anotherString.toLowerCase());
1152 };
1153
1154
1155 sp.hash=0;
1156
1157 sp.hashCode=function(){
1158 var h=this.hash;
1159 if(h==0){
1160 var off=0;
1161 var len=this.length;
1162 for(var i=0;i<len;i++){
1163 h=31*h+this.charCodeAt(off++);
1164 h&=0xffffffff;
1165 }
1166 this.hash=h;
1167 }
1168 return h;
1169 };
1170
1171 sp.getBytes=function(){
1172 if(arguments.length==4){
1173 return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);
1174 }
1175 var s=this;
1176 if(arguments.length==1){
1177 var cs=arguments[0].toString().toLowerCase();
1178 var charset=[
1179 "utf-8","UTF8","us-ascii","iso-8859-1","8859_1","gb2312","gb18030","gbk"
1180 ];
1181 var existed=false;
1182 for(var i=0;i<charset.length;i++){
1183 if(charset[i]==cs){
1184 existed=true;
1185 break;
1186 }
1187 }
1188 if(!existed){
1189 throw new java.io.UnsupportedEncodingException();
1190 }
1191 if(cs=="utf-8"||cs=="utf8"){
1192 s=Encoding.convert2UTF8(this);
1193 }
1194 }
1195 var arrs=new Array(s.length);
1196 var c=0,ii=0;
1197 for(var i=0;i<s.length;i++){
1198 c=s.charCodeAt(i);
1199 if(c>255){
1200 arrs[ii]=0x1a;
1201 arrs[ii+1]=c&0xff;
1202 arrs[ii+2]=(c&0xff00)>>8;
1203 ii+=2;
1204 }else{
1205 arrs[ii]=c;
1206 }
1207 ii++;
1208 }
1209 return arrs;
1210 };
1211
1212 /*
1213 sp.compareTo=function(anotherString){
1214 if(anotherString==null){
1215 throw new java.lang.NullPointerException();
1216 }
1217 var len1=this.length;
1218 var len2=anotherString.length;
1219 var n=Math.min(len1,len2);
1220 var k=0;
1221 while(k<n){
1222 var c1=this.charCodeAt(k);
1223 var c2=anotherString.charCodeAt(k);
1224 if(c1!=c2){
1225 return c1-c2;
1226 }
1227 k++;
1228 }
1229 return len1-len2;
1230 };
1231
1232 */
1233
1234 sp.contains = function(a) {return this.indexOf(a) >= 0}  // bh added
1235 sp.compareTo = function(a){return this > a ? 1 : this < a ? -1 : 0} // bh added
1236
1237
1238
1239 sp.toCharArray=function(){
1240 var result=new Array(this.length);
1241 for(var i=0;i<this.length;i++){
1242 result[i]=this.charAt(i);
1243 }
1244 return result;
1245 };
1246 String.value0f=String.valueOf;
1247 String.valueOf=function(o){
1248 if(o=="undefined"){
1249 return String.value0f();
1250 }
1251 if(o instanceof Array){
1252 if(arguments.length==1){
1253 return o.join('');
1254 }else{
1255 var off=arguments[1];
1256 var len=arguments[2];
1257 var oo=new Array(len);
1258 for(var i=0;i<len;i++){
1259 oo[i]=o[off+i];
1260 }
1261 return oo.join('');
1262 }
1263 }
1264 return""+o;
1265 };
1266
1267 sp.subSequence=function(beginIndex,endIndex){
1268 return this.substring(beginIndex,endIndex);
1269 };
1270
1271 sp.compareToIgnoreCase=function(str){
1272 if(str==null){
1273 throw new NullPointerException();
1274 }
1275 var s1=this.toUpperCase();
1276 var s2=str.toUpperCase();
1277 if(s1==s2){
1278 return 0;
1279 }else{
1280 var s1=this.toLowerCase();
1281 var s2=str.toLowerCase();
1282 if(s1==s2){
1283 return 0;
1284 }else if(s1>s2){
1285 return 1;
1286 }else{
1287 return-1;
1288 }
1289 }
1290 };
1291
1292 sp.contentEquals=function(sb){
1293 if(this.length!=sb.length()){
1294 return false;
1295 }
1296 var v=sb.getValue();
1297 var i=0;
1298 var j=0;
1299 var n=this.length;
1300 while(n--!=0){
1301 if(this.charCodeAt(i++)!=v[j++]){
1302 return false;
1303 }
1304 }
1305 return true;
1306 };
1307
1308 sp.getChars=function(srcBegin,srcEnd,dst,dstBegin){
1309 if(srcBegin<0){
1310 throw new StringIndexOutOfBoundsException(srcBegin);
1311 }
1312 if(srcEnd>this.length){
1313 throw new StringIndexOutOfBoundsException(srcEnd);
1314 }
1315 if(srcBegin>srcEnd){
1316 throw new StringIndexOutOfBoundsException(srcEnd-srcBegin);
1317 }
1318 if(dst==null){
1319 throw new NullPointerException();
1320 }
1321 for(var i=0;i<srcEnd-srcBegin;i++){
1322 dst[dstBegin+i]=this.charAt(srcBegin+i);
1323 }
1324 };
1325 sp.$concat=sp.concat;
1326 sp.concat=function(s){
1327 if(s==null){
1328 throw new NullPointerException();
1329 }
1330 return this.$concat(s);
1331 };
1332
1333 sp.$lastIndexOf=sp.lastIndexOf;
1334 sp.lastIndexOf=function(s,last){
1335 if(last!=null&&last+this.length<=0){
1336 return-1;
1337 }
1338 if(last!=null){
1339 return this.$lastIndexOf(s,last);
1340 }else{
1341 return this.$lastIndexOf(s);
1342 }
1343 };
1344
1345 sp.intern=function(){
1346 return this.valueOf();
1347 };
1348 String.copyValueOf=sp.copyValueOf=function(){
1349 if(arguments.length==1){
1350 return String.instantialize(arguments[0]);
1351 }else{
1352 return String.instantialize(arguments[0],arguments[1],arguments[2]);
1353 }
1354 };
1355
1356 sp.codePointAt || (sp.codePointAt = sp.charCodeAt); // Firefox only
1357
1358
1359 })(String.prototype);
1360
1361 /*
1362
1363 String.indexOf=function(source,sourceOffset,sourceCount,
1364 target,targetOffset,targetCount,fromIndex){
1365 if(fromIndex>=sourceCount){
1366 return(targetCount==0?sourceCount:-1);
1367 }
1368 if(fromIndex<0){
1369 fromIndex=0;
1370 }
1371 if(targetCount==0){
1372 return fromIndex;
1373 }
1374
1375 var first=target[targetOffset];
1376 var i=sourceOffset+fromIndex;
1377 var max=sourceOffset+(sourceCount-targetCount);
1378
1379 startSearchForFirstChar:
1380 while(true){
1381
1382 while(i<=max&&source[i]!=first){
1383 i++;
1384 }
1385 if(i>max){
1386 return-1;
1387 }
1388
1389
1390 var j=i+1;
1391 var end=j+targetCount-1;
1392 var k=targetOffset+1;
1393 while(j<end){
1394 if(source[j++]!=target[k++]){
1395 i++;
1396
1397 continue startSearchForFirstChar;
1398 }
1399 }
1400 return i-sourceOffset;
1401 }
1402 };
1403
1404
1405
1406 String.instantialize=function(){
1407 if(arguments.length==0){
1408 return new String();
1409 }else if(arguments.length==1){
1410 var x=arguments[0];
1411 if(typeof x=="string"||x instanceof String){
1412 return new String(x);
1413 }else if(x instanceof Array){
1414 if(x.length>0&&typeof x[0]=="number"){
1415 var arr=new Array(x.length);
1416 for(var i=0;i<x.length;i++){
1417 arr[i]=String.fromCharCode(x[i]&0xff);
1418 }
1419 return Encoding.readUTF8(arr.join(''));
1420 }
1421 return x.join('');
1422 }else if(x.__CLASS_NAME__=="StringBuffer"
1423 ||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1424 var value=x.shareValue();
1425 var length=x.length();
1426 var valueCopy=new Array(length);
1427 for(var i=0;i<length;i++){
1428 valueCopy[i]=value[i];
1429 }
1430 return valueCopy.join('')
1431
1432 }else{
1433 return""+x;
1434 }
1435 }else if(arguments.length==2){
1436 var x=arguments[0];
1437 var hibyte=arguments[1];
1438 if(typeof hibyte=="string"){
1439 return String.instantialize(x,0,x.length,hibyte);
1440 }else{
1441 return String.instantialize(x,hibyte,0,x.length);
1442 }
1443 }else if(arguments.length==3){
1444 var bytes=arguments[0];
1445 var offset=arguments[1];
1446 var length=arguments[2];
1447 if(arguments[2]instanceof Array){
1448 bytes=arguments[2];
1449 offset=arguments[0];
1450 length=arguments[1];
1451 }
1452 var arr=new Array(length);
1453 if(offset<0||length+offset>bytes.length){
1454 throw new IndexOutOfBoundsException();
1455 }
1456 if(length>0){
1457 var isChar=(bytes[offset].length!=null);
1458 if(isChar){
1459 for(var i=0;i<length;i++){
1460 arr[i]=bytes[offset+i];
1461 }
1462 }else{
1463 for(var i=0;i<length;i++){
1464 arr[i]=String.fromCharCode(bytes[offset+i]);
1465 }
1466 }
1467 }
1468 return arr.join('');
1469 }else if(arguments.length==4){
1470 var bytes=arguments[0];
1471 var y=arguments[3];
1472 if(typeof y=="string"||y instanceof String){
1473 var offset=arguments[1];
1474 var length=arguments[2];
1475 var arr=new Array(length);
1476 for(var i=0;i<length;i++){
1477 arr[i]=bytes[offset+i];
1478 if(typeof arr[i]=="number"){
1479 arr[i]=String.fromCharCode(arr[i]&0xff);
1480 }
1481 }
1482 var cs=y.toLowerCase();
1483 if(cs=="utf-8"||cs=="utf8"){
1484 return Encoding.readUTF8(arr.join(''));
1485 }else{
1486 return arr.join('');
1487 }
1488 }else{
1489 var count=arguments[3];
1490 var offset=arguments[2];
1491 var hibyte=arguments[1];
1492 var value=new Array(count);
1493 if(hibyte==0){
1494 for(var i=count;i-->0;){
1495 value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1496 }
1497 }else{
1498 hibyte<<=8;
1499 for(var i=count;i-->0;){
1500 value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1501 }
1502 }
1503 return value.join('');
1504 }
1505 }else{
1506 var s="";
1507 for(var i=0;i<arguments.length;i++){
1508 s+=arguments[i];
1509 }
1510 return s;
1511 }
1512 };
1513
1514
1515 */
1516
1517
1518 String.instantialize=function(){
1519 switch (arguments.length) {
1520 case 0:
1521         return new String();
1522 case 1:
1523         var x=arguments[0];
1524         if(typeof x=="string"||x instanceof String){
1525                 return new String(x);
1526         }
1527         if(x instanceof Array || x instanceof Int32Array){
1528                 if(x.length == 0)
1529                         return "";
1530                 if(typeof x[0]!="number")
1531                         return x.join('');
1532                 var arr=new Array(x.length);
1533                 for(var i=0;i<x.length;i++)
1534                         arr[i]=String.fromCharCode(x[i]&0xff);
1535                 return Encoding.readUTF8(arr.join(''));
1536         }
1537         if(x.__CLASS_NAME__=="StringBuffer"||x.__CLASS_NAME__=="java.lang.StringBuffer"){
1538                 var value=x.shareValue();
1539                 var length=x.length();
1540                 var valueCopy=new Array(length);
1541                 for(var i=0;i<length;i++){
1542                         valueCopy[i]=value[i];
1543                 }
1544                 return valueCopy.join('')
1545         }
1546         return""+x;
1547 case 2: 
1548         var x=arguments[0];
1549         var hibyte=arguments[1];
1550         if(typeof hibyte=="string"){
1551                 return String.instantialize(x,0,x.length,hibyte);
1552         }
1553         return String.instantialize(x,hibyte,0,x.length);
1554 case 3:
1555         var bytes=arguments[0];
1556         var offset=arguments[1];
1557         var length=arguments[2];
1558         if(arguments[2]instanceof Array){
1559                 bytes=arguments[2];
1560                 offset=arguments[0];
1561                 length=arguments[1];
1562         }
1563         var arr=new Array(length);
1564         if(offset<0||length+offset>bytes.length){
1565                 throw new IndexOutOfBoundsException();
1566         }
1567         if(length>0){
1568                 var isChar=(bytes[offset].length!=null);
1569                 if(isChar){
1570                         for(var i=0;i<length;i++){
1571                                 arr[i]=bytes[offset+i];
1572                         }
1573                 }else{
1574                         for(var i=0;i<length;i++){
1575                                 arr[i]=String.fromCharCode(bytes[offset+i]);
1576                         }
1577                 }
1578         }
1579         return arr.join('');
1580 case 4:
1581         var bytes=arguments[0];
1582         var y=arguments[3];
1583         if(typeof y=="string"||y instanceof String){
1584                 var offset=arguments[1];
1585                 var length=arguments[2];
1586                 var arr=new Array(length);
1587                 for(var i=0;i<length;i++){
1588                         arr[i]=bytes[offset+i];
1589                         if(typeof arr[i]=="number"){
1590                                 arr[i]=String.fromCharCode(arr[i]&0xff);
1591                         }
1592                 }
1593                 var cs=y.toLowerCase();
1594                 if(cs=="utf-8"||cs=="utf8"){
1595                         return Encoding.readUTF8(arr.join(''));
1596                 }
1597                 return arr.join('');
1598         }
1599         var count=arguments[3];
1600         var offset=arguments[2];
1601         var hibyte=arguments[1];
1602         var value=new Array(count);
1603         if(hibyte==0){
1604                 for(var i=count;i-->0;){
1605                         value[i]=String.fromCharCode(bytes[i+offset]&0xff);
1606                 }
1607         }else{
1608                 hibyte<<=8;
1609                 for(var i=count;i-->0;){
1610                         value[i]=String.fromCharCode(hibyte|(bytes[i+offset]&0xff));
1611                 }
1612         }
1613         return value.join('');
1614 default:
1615         var s="";
1616         for(var i=0;i<arguments.length;i++){
1617                 s+=arguments[i];
1618         }
1619         return s;
1620 }
1621 };
1622
1623 if(navigator.userAgent.toLowerCase().indexOf("chrome")!=-1){
1624         String.prototype.toString=function(){return this.valueOf();};
1625 }
1626
1627 }
1628
1629 })(Clazz._Encoding);
1630
1631
1632
1633 c$=Clazz_decorateAsClass(function(){
1634 this.value=0;
1635 Clazz_instantialize(this,arguments);
1636 },java.lang,"Character",null,[java.io.Serializable,Comparable]);
1637 Clazz_makeConstructor(c$,
1638 function(value){
1639 this.value=value;
1640 },"~N");
1641 Clazz_defineMethod(c$,"charValue",
1642 function(){
1643 return this.value;
1644 });
1645 Clazz_overrideMethod(c$,"hashCode",
1646 function(){
1647 return(this.value).charCodeAt(0);
1648 });
1649 Clazz_overrideMethod(c$,"equals",
1650 function(obj){
1651 if(Clazz_instanceOf(obj,Character)){
1652 return(this.value).charCodeAt(0)==((obj).charValue()).charCodeAt(0);
1653 }return false;
1654 },"~O");
1655 Clazz_overrideMethod(c$,"compareTo",
1656 function(c){
1657 return(this.value).charCodeAt(0)-(c.value).charCodeAt(0);
1658 },"Character");
1659 c$.toLowerCase=Clazz_defineMethod(c$,"toLowerCase",
1660 function(c){
1661 return(""+c).toLowerCase().charAt(0);
1662 },"~N");
1663 c$.toUpperCase=Clazz_defineMethod(c$,"toUpperCase",
1664 function(c){
1665 return(""+c).toUpperCase().charAt(0);
1666 },"~N");
1667 c$.isDigit=Clazz_defineMethod(c$,"isDigit",
1668 function(c){
1669 c = c.charCodeAt(0);
1670 return (48 <= c && c <= 57);
1671 },"~N");
1672 c$.isUpperCase=Clazz_defineMethod(c$,"isUpperCase",
1673 function(c){
1674 c = c.charCodeAt(0);
1675 return (65 <= c && c <= 90);
1676 },"~N");
1677 c$.isLowerCase=Clazz_defineMethod(c$,"isLowerCase",
1678 function(c){
1679 c = c.charCodeAt(0);
1680 return (97 <= c && c <= 122);
1681 },"~N");
1682 c$.isWhitespace=Clazz_defineMethod(c$,"isWhitespace",
1683 function(c){
1684 c = (c).charCodeAt(0);
1685 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd || c == 0x1680
1686         || c >= 0x2000 && c != 0x2007 && (c <= 0x200b || c == 0x2028 || c == 0x2029 || c == 0x3000));
1687 },"~N");
1688 c$.isLetter=Clazz_defineMethod(c$,"isLetter",
1689 function(c){
1690 c = c.charCodeAt(0);
1691 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
1692 },"~N");
1693 c$.isLetterOrDigit=Clazz_defineMethod(c$,"isLetterOrDigit",
1694 function(c){
1695 c = c.charCodeAt(0);
1696 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
1697 },"~N");
1698 c$.isSpaceChar=Clazz_defineMethod(c$,"isSpaceChar",
1699 function(c){
1700  var i = c.charCodeAt(0);
1701 if(i==0x20||i==0xa0||i==0x1680)return true;
1702 if(i<0x2000)return false;
1703 return i<=0x200b||i==0x2028||i==0x2029||i==0x202f||i==0x3000;
1704 },"~N");
1705 c$.digit=Clazz_defineMethod(c$,"digit",
1706 function(c,radix){
1707 var i = c.charCodeAt(0);
1708 if(radix >= 2 && radix <= 36){
1709         if(i < 128){
1710                 var result = -1;
1711                 if(48 <= i && i <= 57){
1712                 result = i - 48;
1713                 }else if(97 <= i && i <= 122){
1714                 result = i - 87;
1715                 }else if(65 <= i && i <= 90){
1716                 result=i-(55);
1717                 }
1718                 return (result < radix ? result : -1);
1719         }
1720 }
1721 return -1;
1722 },"~N,~N");
1723 Clazz_overrideMethod(c$,"toString",
1724 function(){
1725 var buf=[this.value];
1726 return String.valueOf(buf);
1727 });
1728 c$.toString=Clazz_overrideMethod(c$,"toString",
1729 function(c){
1730 {
1731 if(this===Character){
1732 return"class java.lang.Character";
1733 }
1734 }return String.valueOf(c);
1735 },"~N");
1736 Clazz_defineStatics(c$,
1737 "MIN_VALUE",'\u0000',
1738 "MAX_VALUE",'\uffff',
1739 "MIN_RADIX",2,
1740 "MAX_RADIX",36,
1741 "TYPE",null);
1742
1743 java.lang.Character.TYPE=java.lang.Character.prototype.TYPE=java.lang.Character;
1744
1745
1746
1747 Clazz._ArrayWrapper = function(a, type) {
1748  return {
1749    a: a,
1750    __CLASS_NAME__:"Array",
1751    superClazz: Array,
1752    getComponentType: function() {return type},
1753    instanceOf: function(o) { return  Clazz_instanceOf(type, o) },
1754    getName: function() { return this.__CLASS_NAME__ }
1755  };
1756 }
1757 c$=Clazz_declareType(java.lang.reflect,"Array");
1758 c$.newInstance=Clazz_defineMethod(c$,"newInstance",
1759 function(componentType,size){
1760 var a = Clazz_newArray(size);
1761  a.getClass = function() { return new Clazz._ArrayWrapper(this, componentType);};
1762 return a;
1763 },"Class,~N");
1764
1765 javautil.Date=Date;
1766 Date.TYPE="javautil.Date";
1767 Date.__CLASS_NAME__="Date";
1768 Clazz_implementOf(Date,[java.io.Serializable,java.lang.Comparable]);
1769
1770 Clazz_defineMethod(javautil.Date,"clone",
1771 function(){
1772 return new Date(this.getTime());
1773 });
1774
1775 Clazz_defineMethod(javautil.Date,"before",
1776 function(when){
1777 return this.getTime()<when.getTime();
1778 },"javautil.Date");
1779 Clazz_defineMethod(javautil.Date,"after",
1780 function(when){
1781 return this.getTime()>when.getTime();
1782 },"javautil.Date");
1783 Clazz_defineMethod(javautil.Date,"equals",
1784 function(obj){
1785 return Clazz_instanceOf(obj,javautil.Date)&&this.getTime()==(obj).getTime();
1786 },"Object");
1787 Clazz_defineMethod(javautil.Date,"compareTo",
1788 function(anotherDate){
1789 var thisTime=this.getTime();
1790 var anotherTime=anotherDate.getTime();
1791 return(thisTime<anotherTime?-1:(thisTime==anotherTime?0:1));
1792 },"javautil.Date");
1793 Clazz_defineMethod(javautil.Date,"compareTo",
1794 function(o){
1795 return this.compareTo(o);
1796 },"Object");
1797 Clazz_overrideMethod(javautil.Date,"hashCode",
1798 function(){
1799 var ht=this.getTime();
1800 return parseInt(ht)^parseInt((ht>>32));
1801 });
1802
1803 c$=Clazz_decorateAsClass(function(){
1804 this.source=null;
1805 Clazz_instantialize(this,arguments);
1806 },javautil,"EventObject",null,java.io.Serializable);
1807 Clazz_makeConstructor(c$,
1808 function(source){
1809 if(source!=null)this.source=source;
1810 else throw new IllegalArgumentException();
1811 },"~O");
1812 Clazz_defineMethod(c$,"getSource",
1813 function(){
1814 return this.source;
1815 });
1816 Clazz_overrideMethod(c$,"toString",
1817 function(){
1818 return this.getClass().getName()+"[source="+String.valueOf(this.source)+']';
1819 });
1820 Clazz_declareInterface(javautil,"EventListener");
1821
1822 c$=Clazz_decorateAsClass(function(){
1823 this.listener=null;
1824 Clazz_instantialize(this,arguments);
1825 },javautil,"EventListenerProxy",null,javautil.EventListener);
1826 Clazz_makeConstructor(c$,
1827 function(listener){
1828 this.listener=listener;
1829 },"javautil.EventListener");
1830 Clazz_defineMethod(c$,"getListener",
1831 function(){
1832 return this.listener;
1833 });
1834 Clazz_declareInterface(javautil,"Iterator");
1835
1836 Clazz_declareInterface(javautil,"ListIterator",javautil.Iterator);
1837 Clazz_declareInterface(javautil,"Enumeration");
1838 Clazz_declareInterface(javautil,"Collection",Iterable);
1839
1840 Clazz_declareInterface(javautil,"Set",javautil.Collection);
1841 Clazz_declareInterface(javautil,"Map");
1842 Clazz_declareInterface(javautil.Map,"Entry");
1843
1844 Clazz_declareInterface(javautil,"List",javautil.Collection);
1845
1846 Clazz_declareInterface(javautil,"Queue",javautil.Collection);
1847 Clazz_declareInterface(javautil,"RandomAccess");
1848 c$=Clazz_decorateAsClass(function(){
1849 this.detailMessage=null;
1850 this.cause=null;
1851 this.stackTrace=null;
1852 Clazz_instantialize(this,arguments);
1853 },java.lang,"Throwable",null,java.io.Serializable);
1854 Clazz_prepareFields(c$,function(){
1855 this.cause=this;
1856 //alert("e0 "+ arguments.callee.caller.caller.caller.caller.caller)
1857 });
1858 Clazz_makeConstructor(c$,
1859 function(){
1860 this.fillInStackTrace();
1861 });
1862 Clazz_makeConstructor(c$,
1863 function(message){
1864 this.fillInStackTrace();
1865 this.detailMessage=message;
1866 },"~S");
1867 Clazz_makeConstructor(c$,
1868 function(message,cause){
1869 this.fillInStackTrace();
1870 this.detailMessage=message;
1871 this.cause=cause;
1872 },"~S,Throwable");
1873 Clazz_makeConstructor(c$,
1874 function(cause){
1875 this.fillInStackTrace();
1876 this.detailMessage=(cause==null?null:cause.toString());
1877 this.cause=cause;
1878 },"Throwable");
1879 Clazz_defineMethod(c$,"getMessage",
1880 function(){
1881 return (this.message || this.detailMessage || this.toString());
1882 });
1883 Clazz_defineMethod(c$,"getLocalizedMessage",
1884 function(){
1885 return this.getMessage();
1886 });
1887 Clazz_defineMethod(c$,"getCause",
1888 function(){
1889 return(this.cause===this?null:this.cause);
1890 });
1891 Clazz_defineMethod(c$,"initCause",
1892 function(cause){
1893 if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");
1894 if(cause===this)throw new IllegalArgumentException("Self-causation not permitted");
1895 this.cause=cause;
1896 return this;
1897 },"Throwable");
1898 Clazz_overrideMethod(c$,"toString",
1899 function(){
1900 var s=this.getClass().getName();
1901 var message=this.message || this.detailMessage;
1902 return(message ? s+": "+message : s);
1903 });
1904 Clazz_defineMethod(c$,"printStackTrace",
1905 function(){
1906 System.err.println(this.getStackTrace ? this.getStackTrace() : this.message + " " + Clazz_getStackTrace());
1907 });
1908
1909 Clazz_defineMethod(c$,"getStackTrace",
1910 function(){
1911 var s = "" + this + "\n";
1912 for(var i=0;i<this.stackTrace.length;i++){
1913  var t=this.stackTrace[i];
1914         var x=t.methodName.indexOf("(");
1915         var n=t.methodName.substring(0,x).replace(/\s+/g,"");
1916         if(n!="construct"||t.nativeClazz==null
1917                  ||Clazz_getInheritedLevel(t.nativeClazz,Throwable)<0){
1918                                 s += t + "\n";
1919         }
1920 }
1921 return s;
1922 });
1923
1924
1925 Clazz_defineMethod(c$,"printStackTrace",
1926 function(s){
1927 this.printStackTrace();
1928 },"java.io.PrintStream");
1929 Clazz_defineMethod(c$,"printStackTrace",
1930 function(s){
1931 this.printStackTrace();
1932 },"java.io.PrintWriter");
1933 Clazz_defineMethod(c$,"fillInStackTrace",
1934 function(){
1935 this.stackTrace=new Array();
1936 var caller=arguments.callee.caller;
1937 var superCaller=null;
1938 var callerList=new Array();
1939 var index=Clazz._callingStackTraces.length-1;
1940 var noLooping=true;
1941 while(index>-1||caller!=null){
1942 var clazzName=null;
1943 var nativeClass=null;
1944 if(!noLooping||caller==Clazz_tryToSearchAndExecute||caller==Clazz_superCall||caller==null){
1945 if(index<0){
1946 break;
1947 }
1948 noLooping=true;
1949 superCaller=Clazz._callingStackTraces[index].caller;
1950 nativeClass=Clazz._callingStackTraces[index].owner;
1951 index--;
1952 }else{
1953 superCaller=caller;
1954 if(superCaller.claxxOwner!=null){
1955 nativeClass=superCaller.claxxOwner;
1956 }else if(superCaller.exClazz!=null){
1957 nativeClass=superCaller.exClazz;
1958 }
1959 }
1960 var st=new StackTraceElement(
1961 ((nativeClass!=null&&nativeClass.__CLASS_NAME__.length!=0)?
1962 nativeClass.__CLASS_NAME__:"anonymous"),
1963 ((superCaller.exName==null)?"anonymous":superCaller.exName)
1964 +" ("+Clazz_getParamsType(superCaller.arguments)+")",
1965 null,-1);
1966 st.nativeClazz=nativeClass;
1967 this.stackTrace[this.stackTrace.length]=st;
1968 for(var i=0;i<callerList.length;i++){
1969 if(callerList[i]==superCaller){
1970
1971 var st=new StackTraceElement("lost","missing",null,-3);
1972 st.nativeClazz=null;
1973 this.stackTrace[this.stackTrace.length]=st;
1974 noLooping=false;
1975
1976 }
1977 }
1978 if(superCaller!=null){
1979 callerList[callerList.length]=superCaller;
1980 }
1981 caller=superCaller.arguments.callee.caller;
1982 }
1983 Clazz._initializingException=false;
1984 return this;
1985 });
1986 Clazz_defineMethod(c$,"setStackTrace",
1987 function(stackTrace){
1988 var defensiveCopy=stackTrace.clone();
1989 for(var i=0;i<defensiveCopy.length;i++)if(defensiveCopy[i]==null)throw new NullPointerException("stackTrace["+i+"]");
1990
1991 this.stackTrace=defensiveCopy;
1992 },"~A");
1993
1994 c$=Clazz_decorateAsClass(function(){
1995 this.declaringClass=null;
1996 this.methodName=null;
1997 this.fileName=null;
1998 this.lineNumber=0;
1999 Clazz_instantialize(this,arguments);
2000 },java.lang,"StackTraceElement",null,java.io.Serializable);
2001 Clazz_makeConstructor(c$,
2002 function(cls,method,file,line){
2003 if(cls==null||method==null){
2004 throw new NullPointerException();
2005 }this.declaringClass=cls;
2006 this.methodName=method;
2007 this.fileName=file;
2008 this.lineNumber=line;
2009 },"~S,~S,~S,~N");
2010 Clazz_overrideMethod(c$,"equals",
2011 function(obj){
2012 if(!(Clazz_instanceOf(obj,StackTraceElement))){
2013 return false;
2014 }var castObj=obj;
2015 if((this.methodName==null)||(castObj.methodName==null)){
2016 return false;
2017 }if(!this.getMethodName().equals(castObj.getMethodName())){
2018 return false;
2019 }if(!this.getClassName().equals(castObj.getClassName())){
2020 return false;
2021 }var localFileName=this.getFileName();
2022 if(localFileName==null){
2023 if(castObj.getFileName()!=null){
2024 return false;
2025 }}else{
2026 if(!localFileName.equals(castObj.getFileName())){
2027 return false;
2028 }}if(this.getLineNumber()!=castObj.getLineNumber()){
2029 return false;
2030 }return true;
2031 },"~O");
2032 Clazz_defineMethod(c$,"getClassName",
2033 function(){
2034 return(this.declaringClass==null)?"<unknown class>":this.declaringClass;
2035 });
2036 Clazz_defineMethod(c$,"getFileName",
2037 function(){
2038 return this.fileName;
2039 });
2040 Clazz_defineMethod(c$,"getLineNumber",
2041 function(){
2042 return this.lineNumber;
2043 });
2044 Clazz_defineMethod(c$,"getMethodName",
2045 function(){
2046 return(this.methodName==null)?"<unknown method>":this.methodName;
2047 });
2048 Clazz_overrideMethod(c$,"hashCode",
2049 function(){
2050 if(this.methodName==null){
2051 return 0;
2052 }return this.methodName.hashCode()^this.declaringClass.hashCode();
2053 });
2054 Clazz_defineMethod(c$,"isNativeMethod",
2055 function(){
2056 return this.lineNumber==-2;
2057 });
2058 Clazz_overrideMethod(c$,"toString",
2059 function(){
2060 var buf=new StringBuilder(80);
2061 buf.append(this.getClassName());
2062 buf.append('.');
2063 buf.append(this.getMethodName());
2064 if(this.isNativeMethod()){
2065 buf.append("(Native Method)");
2066 }else{
2067 var fName=this.getFileName();
2068 if(fName==null){
2069 buf.append("(Unknown Source)");
2070 }else{
2071 var lineNum=this.getLineNumber();
2072 buf.append('(');
2073 buf.append(fName);
2074 if(lineNum>=0){
2075 buf.append(':');
2076 buf.append(lineNum);
2077 }buf.append(')');
2078 }}return buf.toString();
2079 });
2080 TypeError.prototype.getMessage || (TypeError.prototype.getMessage = function(){ return (this.message || this.toString()) + (this.getStackTrace ? this.getStackTrace() : Clazz_getStackTrace())});
2081 c$=Clazz_declareType(java.lang,"Error",Throwable);
2082
2083 c$=Clazz_declareType(java.lang,"LinkageError",Error);
2084
2085 c$=Clazz_declareType(java.lang,"IncompatibleClassChangeError",LinkageError);
2086
2087 c$=Clazz_declareType(java.lang,"AbstractMethodError",IncompatibleClassChangeError);
2088
2089 c$=Clazz_declareType(java.lang,"AssertionError",Error);
2090 Clazz_makeConstructor(c$,
2091 function(detailMessage){
2092 Clazz_superConstructor(this,AssertionError,[String.valueOf(detailMessage),(Clazz_instanceOf(detailMessage,Throwable)?detailMessage:null)]);
2093 },"~O");
2094 Clazz_makeConstructor(c$,
2095 function(detailMessage){
2096 this.construct("" + detailMessage);
2097 },"~B");
2098 Clazz_makeConstructor(c$,
2099 function(detailMessage){
2100 this.construct("" + detailMessage);
2101 },"~N");
2102
2103 c$=Clazz_declareType(java.lang,"ClassCircularityError",LinkageError);
2104
2105 c$=Clazz_declareType(java.lang,"ClassFormatError",LinkageError);
2106
2107 c$=Clazz_decorateAsClass(function(){
2108 this.exception=null;
2109 Clazz_instantialize(this,arguments);
2110 },java.lang,"ExceptionInInitializerError",LinkageError);
2111 Clazz_makeConstructor(c$,
2112 function(){
2113 Clazz_superConstructor(this,ExceptionInInitializerError);
2114 this.initCause(null);
2115 });
2116 Clazz_makeConstructor(c$,
2117 function(detailMessage){
2118 Clazz_superConstructor(this,ExceptionInInitializerError,[detailMessage]);
2119 this.initCause(null);
2120 },"~S");
2121 Clazz_makeConstructor(c$,
2122 function(exception){
2123 Clazz_superConstructor(this,ExceptionInInitializerError);
2124 this.exception=exception;
2125 this.initCause(exception);
2126 },"Throwable");
2127 Clazz_defineMethod(c$,"getException",
2128 function(){
2129 return this.exception;
2130 });
2131 Clazz_overrideMethod(c$,"getCause",
2132 function(){
2133 return this.exception;
2134 });
2135
2136 c$=Clazz_declareType(java.lang,"IllegalAccessError",IncompatibleClassChangeError);
2137
2138 c$=Clazz_declareType(java.lang,"InstantiationError",IncompatibleClassChangeError);
2139
2140 c$=Clazz_declareType(java.lang,"VirtualMachineError",Error);
2141
2142 c$=Clazz_declareType(java.lang,"InternalError",VirtualMachineError);
2143
2144 c$=Clazz_declareType(java.lang,"NoClassDefFoundError",LinkageError);
2145
2146 c$=Clazz_declareType(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);
2147
2148 c$=Clazz_declareType(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);
2149
2150 c$=Clazz_declareType(java.lang,"OutOfMemoryError",VirtualMachineError);
2151
2152 c$=Clazz_declareType(java.lang,"StackOverflowError",VirtualMachineError);
2153
2154 c$=Clazz_declareType(java.lang,"UnknownError",VirtualMachineError);
2155
2156 c$=Clazz_declareType(java.lang,"UnsatisfiedLinkError",LinkageError);
2157
2158 c$=Clazz_declareType(java.lang,"UnsupportedClassVersionError",ClassFormatError);
2159
2160 c$=Clazz_declareType(java.lang,"VerifyError",LinkageError);
2161
2162 c$=Clazz_declareType(java.lang,"ThreadDeath",Error);
2163 Clazz_makeConstructor(c$,
2164 function(){
2165 Clazz_superConstructor(this,ThreadDeath,[]);
2166 });
2167
2168 c$=Clazz_declareType(java.lang,"Exception",Throwable);
2169
2170 c$=Clazz_declareType(java.lang,"RuntimeException",Exception);
2171
2172 c$=Clazz_declareType(java.lang,"ArithmeticException",RuntimeException);
2173
2174 c$=Clazz_declareType(java.lang,"IndexOutOfBoundsException",RuntimeException);
2175
2176 c$=Clazz_declareType(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);
2177 Clazz_makeConstructor(c$,
2178 function(index){
2179 Clazz_superConstructor(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+index]);
2180 },"~N");
2181
2182 c$=Clazz_declareType(java.lang,"ArrayStoreException",RuntimeException);
2183
2184 c$=Clazz_declareType(java.lang,"ClassCastException",RuntimeException);
2185
2186 c$=Clazz_decorateAsClass(function(){
2187 this.ex=null;
2188 Clazz_instantialize(this,arguments);
2189 },java.lang,"ClassNotFoundException",Exception);
2190 Clazz_makeConstructor(c$,
2191 function(){
2192 Clazz_superConstructor(this,ClassNotFoundException,[Clazz_castNullAs("Throwable")]);
2193 });
2194 Clazz_makeConstructor(c$,
2195 function(detailMessage){
2196 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage,null]);
2197 },"~S");
2198 Clazz_makeConstructor(c$,
2199 function(detailMessage,exception){
2200 Clazz_superConstructor(this,ClassNotFoundException,[detailMessage]);
2201 this.ex=exception;
2202 },"~S,Throwable");
2203 Clazz_defineMethod(c$,"getException",
2204 function(){
2205 return this.ex;
2206 });
2207 Clazz_overrideMethod(c$,"getCause",
2208 function(){
2209 return this.ex;
2210 });
2211
2212 c$=Clazz_declareType(java.lang,"CloneNotSupportedException",Exception);
2213
2214 c$=Clazz_declareType(java.lang,"IllegalAccessException",Exception);
2215
2216 c$=Clazz_declareType(java.lang,"IllegalArgumentException",RuntimeException);
2217 Clazz_makeConstructor(c$,
2218 function(cause){
2219 Clazz_superConstructor(this,IllegalArgumentException,[(cause==null?null:cause.toString()),cause]);
2220 },"Throwable");
2221
2222 c$=Clazz_declareType(java.lang,"IllegalMonitorStateException",RuntimeException);
2223
2224 c$=Clazz_declareType(java.lang,"IllegalStateException",RuntimeException);
2225 Clazz_makeConstructor(c$,
2226 function(cause){
2227 Clazz_superConstructor(this,IllegalStateException,[(cause==null?null:cause.toString()),cause]);
2228 },"Throwable");
2229
2230 c$=Clazz_declareType(java.lang,"IllegalThreadStateException",IllegalArgumentException);
2231
2232 c$=Clazz_declareType(java.lang,"InstantiationException",Exception);
2233
2234 c$=Clazz_declareType(java.lang,"InterruptedException",Exception);
2235
2236 c$=Clazz_declareType(java.lang,"NegativeArraySizeException",RuntimeException);
2237
2238 c$=Clazz_declareType(java.lang,"NoSuchFieldException",Exception);
2239
2240 c$=Clazz_declareType(java.lang,"NoSuchMethodException",Exception);
2241
2242 c$=Clazz_declareType(java.lang,"NullPointerException",RuntimeException);
2243
2244 c$=Clazz_declareType(java.lang,"NumberFormatException",IllegalArgumentException);
2245
2246 c$=Clazz_declareType(java.lang,"SecurityException",RuntimeException);
2247 Clazz_makeConstructor(c$,
2248 function(cause){
2249 Clazz_superConstructor(this,SecurityException,[(cause==null?null:cause.toString()),cause]);
2250 },"Throwable");
2251
2252 c$=Clazz_declareType(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);
2253 Clazz_makeConstructor(c$,
2254 function(index){
2255 Clazz_superConstructor(this,StringIndexOutOfBoundsException,["String index out of range: "+index]);
2256 },"~N");
2257
2258 c$=Clazz_declareType(java.lang,"UnsupportedOperationException",RuntimeException);
2259 Clazz_makeConstructor(c$,
2260 function(){
2261 Clazz_superConstructor(this,UnsupportedOperationException,[]);
2262 });
2263 Clazz_makeConstructor(c$,
2264 function(cause){
2265 Clazz_superConstructor(this,UnsupportedOperationException,[(cause==null?null:cause.toString()),cause]);
2266 },"Throwable");
2267
2268 c$=Clazz_decorateAsClass(function(){
2269 this.target=null;
2270 Clazz_instantialize(this,arguments);
2271 },java.lang.reflect,"InvocationTargetException",Exception);
2272 Clazz_makeConstructor(c$,
2273 function(){
2274 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[Clazz_castNullAs("Throwable")]);
2275 });
2276 Clazz_makeConstructor(c$,
2277 function(exception){
2278 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[null,exception]);
2279 this.target=exception;
2280 },"Throwable");
2281 Clazz_makeConstructor(c$,
2282 function(exception,detailMessage){
2283 Clazz_superConstructor(this,java.lang.reflect.InvocationTargetException,[detailMessage,exception]);
2284 this.target=exception;
2285 },"Throwable,~S");
2286 Clazz_defineMethod(c$,"getTargetException",
2287 function(){
2288 return this.target;
2289 });
2290 Clazz_overrideMethod(c$,"getCause",
2291 function(){
2292 return this.target;
2293 });
2294
2295 c$=Clazz_decorateAsClass(function(){
2296 this.undeclaredThrowable=null;
2297 Clazz_instantialize(this,arguments);
2298 },java.lang.reflect,"UndeclaredThrowableException",RuntimeException);
2299 Clazz_makeConstructor(c$,
2300 function(exception){
2301 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException);
2302 this.undeclaredThrowable=exception;
2303 this.initCause(exception);
2304 },"Throwable");
2305 Clazz_makeConstructor(c$,
2306 function(exception,detailMessage){
2307 Clazz_superConstructor(this,java.lang.reflect.UndeclaredThrowableException,[detailMessage]);
2308 this.undeclaredThrowable=exception;
2309 this.initCause(exception);
2310 },"Throwable,~S");
2311 Clazz_defineMethod(c$,"getUndeclaredThrowable",
2312 function(){
2313 return this.undeclaredThrowable;
2314 });
2315 Clazz_overrideMethod(c$,"getCause",
2316 function(){
2317 return this.undeclaredThrowable;
2318 });
2319
2320 c$=Clazz_declareType(java.io,"IOException",Exception);
2321
2322
2323 c$=Clazz_declareType(java.io,"CharConversionException",java.io.IOException);
2324
2325 c$=Clazz_declareType(java.io,"EOFException",java.io.IOException);
2326
2327 c$=Clazz_declareType(java.io,"FileNotFoundException",java.io.IOException);
2328
2329 c$=Clazz_decorateAsClass(function(){
2330 this.bytesTransferred=0;
2331 Clazz_instantialize(this,arguments);
2332 },java.io,"InterruptedIOException",java.io.IOException);
2333
2334 c$=Clazz_declareType(java.io,"ObjectStreamException",java.io.IOException);
2335
2336 c$=Clazz_decorateAsClass(function(){
2337 this.classname=null;
2338 Clazz_instantialize(this,arguments);
2339 },java.io,"InvalidClassException",java.io.ObjectStreamException);
2340 Clazz_makeConstructor(c$,
2341 function(className,detailMessage){
2342 Clazz_superConstructor(this,java.io.InvalidClassException,[detailMessage]);
2343 this.classname=className;
2344 },"~S,~S");
2345 Clazz_defineMethod(c$,"getMessage",
2346 function(){
2347 var msg=Clazz_superCall(this,java.io.InvalidClassException,"getMessage",[]);
2348 if(this.classname!=null){
2349 msg=this.classname+';' + ' '+msg;
2350 }return msg;
2351 });
2352
2353 c$=Clazz_declareType(java.io,"InvalidObjectException",java.io.ObjectStreamException);
2354
2355 c$=Clazz_declareType(java.io,"NotActiveException",java.io.ObjectStreamException);
2356
2357 c$=Clazz_declareType(java.io,"NotSerializableException",java.io.ObjectStreamException);
2358
2359 c$=Clazz_decorateAsClass(function(){
2360 this.eof=false;
2361 this.length=0;
2362 Clazz_instantialize(this,arguments);
2363 },java.io,"OptionalDataException",java.io.ObjectStreamException);
2364
2365 c$=Clazz_declareType(java.io,"StreamCorruptedException",java.io.ObjectStreamException);
2366
2367 c$=Clazz_declareType(java.io,"SyncFailedException",java.io.IOException);
2368
2369 c$=Clazz_declareType(java.io,"UnsupportedEncodingException",java.io.IOException);
2370
2371 c$=Clazz_declareType(java.io,"UTFDataFormatException",java.io.IOException);
2372
2373 c$=Clazz_decorateAsClass(function(){
2374 this.detail=null;
2375 Clazz_instantialize(this,arguments);
2376 },java.io,"WriteAbortedException",java.io.ObjectStreamException);
2377 Clazz_makeConstructor(c$,
2378 function(detailMessage,rootCause){
2379 Clazz_superConstructor(this,java.io.WriteAbortedException,[detailMessage]);
2380 this.detail=rootCause;
2381 this.initCause(rootCause);
2382 },"~S,Exception");
2383 Clazz_defineMethod(c$,"getMessage",
2384 function(){
2385 var msg=Clazz_superCall(this,java.io.WriteAbortedException,"getMessage",[]);
2386 return (this.detail ? msg + "; "+this.detail.toString() : msg);
2387 });
2388 Clazz_overrideMethod(c$,"getCause",
2389 function(){
2390 return this.detail;
2391 });
2392
2393 c$=Clazz_declareType(javautil,"ConcurrentModificationException",RuntimeException);
2394 Clazz_makeConstructor(c$,
2395 function(){
2396 Clazz_superConstructor(this,javautil.ConcurrentModificationException,[]);
2397 });
2398
2399 c$=Clazz_declareType(javautil,"EmptyStackException",RuntimeException);
2400
2401 c$=Clazz_decorateAsClass(function(){
2402 this.className=null;
2403 this.key=null;
2404 Clazz_instantialize(this,arguments);
2405 },javautil,"MissingResourceException",RuntimeException);
2406 Clazz_makeConstructor(c$,
2407 function(detailMessage,className,resourceName){
2408 Clazz_superConstructor(this,javautil.MissingResourceException,[detailMessage]);
2409 this.className=className;
2410 this.key=resourceName;
2411 },"~S,~S,~S");
2412 Clazz_defineMethod(c$,"getClassName",
2413 function(){
2414 return this.className;
2415 });
2416 Clazz_defineMethod(c$,"getKey",
2417 function(){
2418 return this.key;
2419 });
2420
2421 c$=Clazz_declareType(javautil,"NoSuchElementException",RuntimeException);
2422
2423 c$=Clazz_declareType(javautil,"TooManyListenersException",Exception);
2424
2425 c$=Clazz_declareType(java.lang,"Void");
2426 Clazz_defineStatics(c$,
2427 "TYPE",null);
2428 {
2429 java.lang.Void.TYPE=java.lang.Void;
2430 }Clazz_declareInterface(java.lang.reflect,"GenericDeclaration");
2431 Clazz_declareInterface(java.lang.reflect,"AnnotatedElement");
2432
2433 c$=Clazz_declareType(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);
2434 Clazz_makeConstructor(c$,
2435 function(){
2436 });
2437 Clazz_defineMethod(c$,"isAccessible",
2438 function(){
2439 return false;
2440 });
2441 c$.setAccessible=Clazz_defineMethod(c$,"setAccessible",
2442 function(objects,flag){
2443 return;
2444 },"~A,~B");
2445 Clazz_defineMethod(c$,"setAccessible",
2446 function(flag){
2447 return;
2448 },"~B");
2449 Clazz_overrideMethod(c$,"isAnnotationPresent",
2450 function(annotationType){
2451 return false;
2452 },"Class");
2453 Clazz_overrideMethod(c$,"getDeclaredAnnotations",
2454 function(){
2455 return new Array(0);
2456 });
2457 Clazz_overrideMethod(c$,"getAnnotations",
2458 function(){
2459 return new Array(0);
2460 });
2461 Clazz_overrideMethod(c$,"getAnnotation",
2462 function(annotationType){
2463 return null;
2464 },"Class");
2465 c$.marshallArguments=Clazz_defineMethod(c$,"marshallArguments",
2466 function(parameterTypes,args){
2467 return null;
2468 },"~A,~A");
2469 Clazz_defineMethod(c$,"invokeV",
2470 function(receiver,args){
2471 return;
2472 },"~O,~A");
2473 Clazz_defineMethod(c$,"invokeL",
2474 function(receiver,args){
2475 return null;
2476 },"~O,~A");
2477 Clazz_defineMethod(c$,"invokeI",
2478 function(receiver,args){
2479 return 0;
2480 },"~O,~A");
2481 Clazz_defineMethod(c$,"invokeJ",
2482 function(receiver,args){
2483 return 0;
2484 },"~O,~A");
2485 Clazz_defineMethod(c$,"invokeF",
2486 function(receiver,args){
2487 return 0.0;
2488 },"~O,~A");
2489 Clazz_defineMethod(c$,"invokeD",
2490 function(receiver,args){
2491 return 0.0;
2492 },"~O,~A");
2493 c$.emptyArgs=c$.prototype.emptyArgs=new Array(0);
2494 Clazz_declareInterface(java.lang.reflect,"InvocationHandler");
2495 c$=Clazz_declareInterface(java.lang.reflect,"Member");
2496 Clazz_defineStatics(c$,
2497 "PUBLIC",0,
2498 "DECLARED",1);
2499
2500 c$=Clazz_declareType(java.lang.reflect,"Modifier");
2501 Clazz_makeConstructor(c$,
2502 function(){
2503 });
2504 c$.isAbstract=Clazz_defineMethod(c$,"isAbstract",
2505 function(modifiers){
2506 return((modifiers&1024)!=0);
2507 },"~N");
2508 c$.isFinal=Clazz_defineMethod(c$,"isFinal",
2509 function(modifiers){
2510 return((modifiers&16)!=0);
2511 },"~N");
2512 c$.isInterface=Clazz_defineMethod(c$,"isInterface",
2513 function(modifiers){
2514 return((modifiers&512)!=0);
2515 },"~N");
2516 c$.isNative=Clazz_defineMethod(c$,"isNative",
2517 function(modifiers){
2518 return((modifiers&256)!=0);
2519 },"~N");
2520 c$.isPrivate=Clazz_defineMethod(c$,"isPrivate",
2521 function(modifiers){
2522 return((modifiers&2)!=0);
2523 },"~N");
2524 c$.isProtected=Clazz_defineMethod(c$,"isProtected",
2525 function(modifiers){
2526 return((modifiers&4)!=0);
2527 },"~N");
2528 c$.isPublic=Clazz_defineMethod(c$,"isPublic",
2529 function(modifiers){
2530 return((modifiers&1)!=0);
2531 },"~N");
2532 c$.isStatic=Clazz_defineMethod(c$,"isStatic",
2533 function(modifiers){
2534 return((modifiers&8)!=0);
2535 },"~N");
2536 c$.isStrict=Clazz_defineMethod(c$,"isStrict",
2537 function(modifiers){
2538 return((modifiers&2048)!=0);
2539 },"~N");
2540 c$.isSynchronized=Clazz_defineMethod(c$,"isSynchronized",
2541 function(modifiers){
2542 return((modifiers&32)!=0);
2543 },"~N");
2544 c$.isTransient=Clazz_defineMethod(c$,"isTransient",
2545 function(modifiers){
2546 return((modifiers&128)!=0);
2547 },"~N");
2548 c$.isVolatile=Clazz_defineMethod(c$,"isVolatile",
2549 function(modifiers){
2550 return((modifiers&64)!=0);
2551 },"~N");
2552 c$.toString=Clazz_defineMethod(c$,"toString",
2553 function(modifiers){
2554 var sb=new Array(0);
2555 if(java.lang.reflect.Modifier.isPublic(modifiers))sb[sb.length]="public";
2556 if(java.lang.reflect.Modifier.isProtected(modifiers))sb[sb.length]="protected";
2557 if(java.lang.reflect.Modifier.isPrivate(modifiers))sb[sb.length]="private";
2558 if(java.lang.reflect.Modifier.isAbstract(modifiers))sb[sb.length]="abstract";
2559 if(java.lang.reflect.Modifier.isStatic(modifiers))sb[sb.length]="static";
2560 if(java.lang.reflect.Modifier.isFinal(modifiers))sb[sb.length]="final";
2561 if(java.lang.reflect.Modifier.isTransient(modifiers))sb[sb.length]="transient";
2562 if(java.lang.reflect.Modifier.isVolatile(modifiers))sb[sb.length]="volatile";
2563 if(java.lang.reflect.Modifier.isSynchronized(modifiers))sb[sb.length]="synchronized";
2564 if(java.lang.reflect.Modifier.isNative(modifiers))sb[sb.length]="native";
2565 if(java.lang.reflect.Modifier.isStrict(modifiers))sb[sb.length]="strictfp";
2566 if(java.lang.reflect.Modifier.isInterface(modifiers))sb[sb.length]="interface";
2567 if(sb.length>0){
2568 return sb.join(" ");
2569 }return"";
2570 },"~N");
2571 Clazz_defineStatics(c$,
2572 "PUBLIC",0x1,
2573 "PRIVATE",0x2,
2574 "PROTECTED",0x4,
2575 "STATIC",0x8,
2576 "FINAL",0x10,
2577 "SYNCHRONIZED",0x20,
2578 "VOLATILE",0x40,
2579 "TRANSIENT",0x80,
2580 "NATIVE",0x100,
2581 "INTERFACE",0x200,
2582 "ABSTRACT",0x400,
2583 "STRICT",0x800,
2584 "BRIDGE",0x40,
2585 "VARARGS",0x80,
2586 "SYNTHETIC",0x1000,
2587 "ANNOTATION",0x2000,
2588 "ENUM",0x4000);
2589
2590 c$=Clazz_decorateAsClass(function(){
2591 this.clazz=null;
2592 this.parameterTypes=null;
2593 this.exceptionTypes=null;
2594 this.modifiers=0;
2595 Clazz_instantialize(this,arguments);
2596 },java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2597 Clazz_makeConstructor(c$,
2598 function(declaringClass,parameterTypes,checkedExceptions,modifiers){
2599 Clazz_superConstructor(this,java.lang.reflect.Constructor,[]);
2600 this.clazz=declaringClass;
2601 this.parameterTypes=parameterTypes;
2602 this.exceptionTypes=checkedExceptions;
2603 this.modifiers=modifiers;
2604 },"Class,~A,~A,~N");
2605 Clazz_overrideMethod(c$,"getTypeParameters",
2606 function(){
2607 return null;
2608 });
2609 Clazz_defineMethod(c$,"toGenericString",
2610 function(){
2611 return null;
2612 });
2613 Clazz_defineMethod(c$,"getGenericParameterTypes",
2614 function(){
2615 return null;
2616 });
2617 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2618 function(){
2619 return null;
2620 });
2621 Clazz_defineMethod(c$,"getParameterAnnotations",
2622 function(){
2623 return null;
2624 });
2625 Clazz_defineMethod(c$,"isVarArgs",
2626 function(){
2627 return false;
2628 });
2629 Clazz_overrideMethod(c$,"isSynthetic",
2630 function(){
2631 return false;
2632 });
2633 Clazz_overrideMethod(c$,"equals",
2634 function(object){
2635 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Constructor)){
2636 var other=object;
2637 if(this.getDeclaringClass()===other.getDeclaringClass()){
2638 var params1=this.parameterTypes;
2639 var params2=other.parameterTypes;
2640 if(params1.length==params2.length){
2641 for(var i=0;i<params1.length;i++){
2642 if(params1[i]!==params2[i])return false;
2643 }
2644 return true;
2645 }}}return false;
2646 },"~O");
2647 Clazz_overrideMethod(c$,"getDeclaringClass",
2648 function(){
2649 return this.clazz;
2650 });
2651 Clazz_defineMethod(c$,"getExceptionTypes",
2652 function(){
2653 return this.exceptionTypes;
2654 });
2655 Clazz_overrideMethod(c$,"getModifiers",
2656 function(){
2657 return this.modifiers;
2658 });
2659 Clazz_overrideMethod(c$,"getName",
2660 function(){
2661 return this.getDeclaringClass().getName();
2662 });
2663 Clazz_defineMethod(c$,"getParameterTypes",
2664 function(){
2665 return this.parameterTypes;
2666 });
2667 Clazz_overrideMethod(c$,"hashCode",
2668 function(){
2669 return this.getDeclaringClass().getName().hashCode();
2670 });
2671 Clazz_defineMethod(c$,"newInstance",
2672 function(args){
2673 var instance=new this.clazz(Clazz_inheritArgs);
2674 Clazz_instantialize(instance,args);
2675 return instance;
2676 },"~A");
2677 Clazz_overrideMethod(c$,"toString",
2678 function(){
2679 return null;
2680 });
2681
2682 c$=Clazz_declareType(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);
2683 Clazz_overrideMethod(c$,"isSynthetic",
2684 function(){
2685 return false;
2686 });
2687 Clazz_defineMethod(c$,"toGenericString",
2688 function(){
2689 return null;
2690 });
2691 Clazz_defineMethod(c$,"isEnumConstant",
2692 function(){
2693 return false;
2694 });
2695 Clazz_defineMethod(c$,"getGenericType",
2696 function(){
2697 return null;
2698 });
2699 Clazz_overrideMethod(c$,"equals",
2700 function(object){
2701 return false;
2702 },"~O");
2703 Clazz_overrideMethod(c$,"getDeclaringClass",
2704 function(){
2705 return null;
2706 });
2707 Clazz_overrideMethod(c$,"getName",
2708 function(){
2709 return null;
2710 });
2711 Clazz_defineMethod(c$,"getType",
2712 function(){
2713 return null;
2714 });
2715 Clazz_overrideMethod(c$,"hashCode",
2716 function(){
2717 return 0;
2718 });
2719 Clazz_overrideMethod(c$,"toString",
2720 function(){
2721 return null;
2722 });
2723
2724 c$=Clazz_decorateAsClass(function(){
2725 this.clazz=null;
2726 this.name=null;
2727 this.returnType=null;
2728 this.parameterTypes=null;
2729 this.exceptionTypes=null;
2730 this.modifiers=0;
2731 Clazz_instantialize(this,arguments);
2732 },java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
2733 Clazz_makeConstructor(c$,
2734 function(declaringClass,name,parameterTypes,returnType,checkedExceptions,modifiers){
2735 Clazz_superConstructor(this,java.lang.reflect.Method,[]);
2736 this.clazz=declaringClass;
2737 this.name=name;
2738 this.parameterTypes=parameterTypes;
2739 this.returnType=returnType;
2740 this.exceptionTypes=checkedExceptions;
2741 this.modifiers=modifiers;
2742 },"Class,~S,~A,Class,~A,~N");
2743 Clazz_overrideMethod(c$,"getTypeParameters",
2744 function(){
2745 return null;
2746 });
2747 Clazz_defineMethod(c$,"toGenericString",
2748 function(){
2749 return null;
2750 });
2751 Clazz_defineMethod(c$,"getGenericParameterTypes",
2752 function(){
2753 return null;
2754 });
2755 Clazz_defineMethod(c$,"getGenericExceptionTypes",
2756 function(){
2757 return null;
2758 });
2759 Clazz_defineMethod(c$,"getGenericReturnType",
2760 function(){
2761 return null;
2762 });
2763 Clazz_defineMethod(c$,"getParameterAnnotations",
2764 function(){
2765 return null;
2766 });
2767 Clazz_defineMethod(c$,"isVarArgs",
2768 function(){
2769 return false;
2770 });
2771 Clazz_defineMethod(c$,"isBridge",
2772 function(){
2773 return false;
2774 });
2775 Clazz_overrideMethod(c$,"isSynthetic",
2776 function(){
2777 return false;
2778 });
2779 Clazz_defineMethod(c$,"getDefaultValue",
2780 function(){
2781 return null;
2782 });
2783 Clazz_overrideMethod(c$,"equals",
2784 function(object){
2785 if(object!=null&&Clazz_instanceOf(object,java.lang.reflect.Method)){
2786 var other=object;
2787 if((this.getDeclaringClass()===other.getDeclaringClass())&&(this.getName()===other.getName())){
2788 var params1=this.parameterTypes;
2789 var params2=other.parameterTypes;
2790 if(params1.length==params2.length){
2791 for(var i=0;i<params1.length;i++){
2792 if(params1[i]!==params2[i])return false;
2793 }
2794 return true;
2795 }}}return false;
2796 },"~O");
2797 Clazz_overrideMethod(c$,"getDeclaringClass",
2798 function(){
2799 return this.clazz;
2800 });
2801 Clazz_defineMethod(c$,"getExceptionTypes",
2802 function(){
2803 return this.exceptionTypes;
2804 });
2805 Clazz_overrideMethod(c$,"getModifiers",
2806 function(){
2807 return this.modifiers;
2808 });
2809 Clazz_overrideMethod(c$,"getName",
2810 function(){
2811 return this.name;
2812 });
2813 Clazz_defineMethod(c$,"getParameterTypes",
2814 function(){
2815 return this.parameterTypes; 
2816 });
2817 Clazz_defineMethod(c$,"getReturnType",
2818 function(){
2819 return this.returnType;
2820 });
2821 Clazz_overrideMethod(c$,"hashCode",
2822 function(){
2823 return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode();
2824 });
2825 Clazz_defineMethod(c$,"invoke",
2826 function(receiver,args){
2827 var m=this.clazz.prototype[this.getName()];
2828 if(m==null){
2829 m=this.clazz[this.getName()];
2830 }
2831 if(m!=null){
2832 m.apply(receiver,args);
2833 }else{
2834
2835 }
2836 },"~O,~A");
2837 Clazz_overrideMethod(c$,"toString",
2838 function(){
2839 return null;
2840 });
2841
2842 })(Clazz);
2843 Clazz_declarePackage ("java.awt");
2844 Clazz_load (["java.awt.Stroke"], "java.awt.BasicStroke", ["java.lang.Float", "$.IllegalArgumentException", "java.util.Arrays"], function () {
2845 c$ = Clazz_decorateAsClass (function () {
2846 this.width = 0;
2847 this.join = 0;
2848 this.cap = 0;
2849 this.miterlimit = 0;
2850 this.dash = null;
2851 this.dash_phase = 0;
2852 Clazz_instantialize (this, arguments);
2853 }, java.awt, "BasicStroke", null, java.awt.Stroke);
2854 Clazz_makeConstructor (c$, 
2855 function (width, cap, join, miterlimit, dash, dash_phase) {
2856 if (width < 0.0) {
2857 throw  new IllegalArgumentException ("negative width");
2858 }if (cap != 0 && cap != 1 && cap != 2) {
2859 throw  new IllegalArgumentException ("illegal end cap value");
2860 }if (join == 0) {
2861 if (miterlimit < 1.0) {
2862 throw  new IllegalArgumentException ("miter limit < 1");
2863 }} else if (join != 1 && join != 2) {
2864 throw  new IllegalArgumentException ("illegal line join value");
2865 }if (dash != null) {
2866 if (dash_phase < 0.0) {
2867 throw  new IllegalArgumentException ("negative dash phase");
2868 }var allzero = true;
2869 for (var i = 0; i < dash.length; i++) {
2870 var d = dash[i];
2871 if (d > 0.0) {
2872 allzero = false;
2873 } else if (d < 0.0) {
2874 throw  new IllegalArgumentException ("negative dash length");
2875 }}
2876 if (allzero) {
2877 throw  new IllegalArgumentException ("dash lengths all zero");
2878 }}this.width = width;
2879 this.cap = cap;
2880 this.join = join;
2881 this.miterlimit = miterlimit;
2882 if (dash != null) {
2883 this.dash = dash.clone ();
2884 }this.dash_phase = dash_phase;
2885 }, "~N,~N,~N,~N,~A,~N");
2886 Clazz_makeConstructor (c$, 
2887 function (width, cap, join, miterlimit) {
2888 this.construct (width, cap, join, miterlimit, null, 0.0);
2889 }, "~N,~N,~N,~N");
2890 Clazz_makeConstructor (c$, 
2891 function (width, cap, join) {
2892 this.construct (width, cap, join, 10.0, null, 0.0);
2893 }, "~N,~N,~N");
2894 Clazz_makeConstructor (c$, 
2895 function (width) {
2896 this.construct (width, 2, 0, 10.0, null, 0.0);
2897 }, "~N");
2898 Clazz_makeConstructor (c$, 
2899 function () {
2900 this.construct (1.0, 2, 0, 10.0, null, 0.0);
2901 });
2902 Clazz_overrideMethod (c$, "createStrokedShape", 
2903 function (s) {
2904 return s;
2905 }, "java.awt.Shape");
2906 Clazz_defineMethod (c$, "getLineWidth", 
2907 function () {
2908 return this.width;
2909 });
2910 Clazz_defineMethod (c$, "getEndCap", 
2911 function () {
2912 return this.cap;
2913 });
2914 Clazz_defineMethod (c$, "getLineJoin", 
2915 function () {
2916 return this.join;
2917 });
2918 Clazz_defineMethod (c$, "getMiterLimit", 
2919 function () {
2920 return this.miterlimit;
2921 });
2922 Clazz_defineMethod (c$, "getDashArray", 
2923 function () {
2924 if (this.dash == null) {
2925 return null;
2926 }return this.dash.clone ();
2927 });
2928 Clazz_defineMethod (c$, "getDashPhase", 
2929 function () {
2930 return this.dash_phase;
2931 });
2932 Clazz_overrideMethod (c$, "hashCode", 
2933 function () {
2934 var hash = Float.floatToIntBits (this.width);
2935 hash = hash * 31 + this.join;
2936 hash = hash * 31 + this.cap;
2937 hash = hash * 31 + Float.floatToIntBits (this.miterlimit);
2938 if (this.dash != null) {
2939 hash = hash * 31 + Float.floatToIntBits (this.dash_phase);
2940 for (var i = 0; i < this.dash.length; i++) {
2941 hash = hash * 31 + Float.floatToIntBits (this.dash[i]);
2942 }
2943 }return hash;
2944 });
2945 Clazz_overrideMethod (c$, "equals", 
2946 function (obj) {
2947 if (!(Clazz_instanceOf (obj, java.awt.BasicStroke))) {
2948 return false;
2949 }var bs = obj;
2950 if (this.width != bs.width) {
2951 return false;
2952 }if (this.join != bs.join) {
2953 return false;
2954 }if (this.cap != bs.cap) {
2955 return false;
2956 }if (this.miterlimit != bs.miterlimit) {
2957 return false;
2958 }if (this.dash != null) {
2959 if (this.dash_phase != bs.dash_phase) {
2960 return false;
2961 }if (!java.util.Arrays.equals (this.dash, bs.dash)) {
2962 return false;
2963 }} else if (bs.dash != null) {
2964 return false;
2965 }return true;
2966 }, "~O");
2967 Clazz_defineStatics (c$,
2968 "JOIN_MITER", 0,
2969 "JOIN_ROUND", 1,
2970 "JOIN_BEVEL", 2,
2971 "CAP_BUTT", 0,
2972 "CAP_ROUND", 1,
2973 "CAP_SQUARE", 2);
2974 });
2975 Clazz_declarePackage ("java.awt");
2976 Clazz_declareInterface (java.awt, "Stroke");
2977 Clazz_declarePackage ("java.util");
2978 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
2979 c$ = Clazz_decorateAsClass (function () {
2980 this.language = null;
2981 this.country = null;
2982 this.variant = null;
2983 this.hashCodeValue = 0;
2984 Clazz_instantialize (this, arguments);
2985 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
2986 Clazz_makeConstructor (c$, 
2987 function (language, country, variant) {
2988 this.language = language.intern ();
2989 this.country = country.intern ();
2990 this.variant = variant.intern ();
2991 }, "~S,~S,~S");
2992 Clazz_makeConstructor (c$, 
2993 function (language, country) {
2994 this.construct (language, country, "");
2995 }, "~S,~S");
2996 Clazz_makeConstructor (c$, 
2997 function (language) {
2998 this.construct (language, "", "");
2999 }, "~S");
3000 Clazz_makeConstructor (c$, 
3001  function (language, country, flag) {
3002 this.language = language;
3003 this.country = country;
3004 this.variant = "";
3005 }, "~S,~S,~B");
3006 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
3007  function (key, language, country) {
3008 var locale =  new java.util.Locale (language, country, false);
3009 java.util.Locale.cache.put (key, locale);
3010 return locale;
3011 }, "~S,~S,~S");
3012 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
3013 function (language, country, variant) {
3014 if (language == null || country == null || variant == null) {
3015 throw  new NullPointerException ();
3016 }var sb =  new StringBuilder ();
3017 sb.append (language).append ('_').append (country).append ('_').append (variant);
3018 var key = sb.toString ();
3019 var locale = java.util.Locale.cache.get (key);
3020 if (locale == null) {
3021 locale =  new java.util.Locale (language, country, variant);
3022 var l = java.util.Locale.cache.put (key, locale);
3023 if (l != null) {
3024 locale = l;
3025 }}return locale;
3026 }, "~S,~S,~S");
3027 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
3028 function () {
3029 if (java.util.Locale.defaultLocale == null) {
3030 var language;
3031 var country;
3032 var variant;
3033 language = "en";
3034 country = "";
3035 variant = "";
3036 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
3037 }return java.util.Locale.defaultLocale;
3038 });
3039 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
3040 function (newLocale) {
3041 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
3042 java.util.Locale.defaultLocale = newLocale;
3043 }, "java.util.Locale");
3044 Clazz_defineMethod (c$, "getLanguage", 
3045 function () {
3046 return this.language;
3047 });
3048 Clazz_defineMethod (c$, "getCountry", 
3049 function () {
3050 return this.country;
3051 });
3052 Clazz_defineMethod (c$, "getVariant", 
3053 function () {
3054 return this.variant;
3055 });
3056 Clazz_overrideMethod (c$, "toString", 
3057 function () {
3058 var l = this.language.length != 0;
3059 var c = this.country.length != 0;
3060 var v = this.variant.length != 0;
3061 var result =  new StringBuilder (this.language);
3062 if (c || (l && v)) {
3063 result.append ('_').append (this.country);
3064 }if (v && (l || c)) {
3065 result.append ('_').append (this.variant);
3066 }return result.toString ();
3067 });
3068 Clazz_defineMethod (c$, "getDisplayLanguage", 
3069 function () {
3070 return this.getDisplayLanguage (java.util.Locale.getDefault ());
3071 });
3072 Clazz_defineMethod (c$, "getDisplayLanguage", 
3073 function (inLocale) {
3074 return this.getDisplayString (this.language, inLocale, 0);
3075 }, "java.util.Locale");
3076 Clazz_defineMethod (c$, "getDisplayCountry", 
3077 function () {
3078 return this.getDisplayCountry (java.util.Locale.getDefault ());
3079 });
3080 Clazz_defineMethod (c$, "getDisplayCountry", 
3081 function (inLocale) {
3082 return this.getDisplayString (this.country, inLocale, 1);
3083 }, "java.util.Locale");
3084 Clazz_defineMethod (c$, "getDisplayString", 
3085  function (code, inLocale, type) {
3086 if (code.length == 0) {
3087 return "";
3088 }if (inLocale == null) {
3089 throw  new NullPointerException ();
3090 }return inLocale.toString ();
3091 }, "~S,java.util.Locale,~N");
3092 Clazz_defineMethod (c$, "getDisplayVariant", 
3093 function () {
3094 return this.getDisplayVariant (java.util.Locale.getDefault ());
3095 });
3096 Clazz_defineMethod (c$, "getDisplayVariant", 
3097 function (inLocale) {
3098 if (this.variant.length == 0) return "";
3099 return this.variant;
3100 }, "java.util.Locale");
3101 Clazz_defineMethod (c$, "getDisplayName", 
3102 function () {
3103 return this.getDisplayName (java.util.Locale.getDefault ());
3104 });
3105 Clazz_defineMethod (c$, "getDisplayName", 
3106 function (inLocale) {
3107 return inLocale.toString ();
3108 }, "java.util.Locale");
3109 Clazz_defineMethod (c$, "clone", 
3110 function () {
3111 try {
3112 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
3113 return that;
3114 } catch (e) {
3115 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3116 throw  new InternalError ();
3117 } else {
3118 throw e;
3119 }
3120 }
3121 });
3122 Clazz_overrideMethod (c$, "hashCode", 
3123 function () {
3124 var hc = this.hashCodeValue;
3125 if (hc == 0) {
3126 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
3127 this.hashCodeValue = hc;
3128 }return hc;
3129 });
3130 Clazz_overrideMethod (c$, "equals", 
3131 function (obj) {
3132 if (this === obj) return true;
3133 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
3134 var other = obj;
3135 return this.language === other.language && this.country === other.country && this.variant === other.variant;
3136 }, "~O");
3137 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
3138 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
3139 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
3140 Clazz_defineStatics (c$,
3141 "DISPLAY_LANGUAGE", 0,
3142 "DISPLAY_COUNTRY", 1,
3143 "defaultLocale", null);
3144 });
3145 Clazz_declarePackage ("java.util");
3146 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 () {
3147 c$ = Clazz_decorateAsClass (function () {
3148 this.parent = null;
3149 this.locale = null;
3150 this.expired = false;
3151 this.$keySet = null;
3152 Clazz_instantialize (this, arguments);
3153 }, java.util, "ResourceBundle");
3154 Clazz_makeConstructor (c$, 
3155 function () {
3156 });
3157 Clazz_defineMethod (c$, "getString", 
3158 function (key) {
3159 return this.getObject (key);
3160 }, "~S");
3161 Clazz_defineMethod (c$, "getStringArray", 
3162 function (key) {
3163 return this.getObject (key);
3164 }, "~S");
3165 Clazz_defineMethod (c$, "getObject", 
3166 function (key) {
3167 var obj = this.handleGetObject (key);
3168 if (obj == null) {
3169 if (this.parent != null) {
3170 obj = this.parent.getObject (key);
3171 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
3172 }return obj;
3173 }, "~S");
3174 Clazz_defineMethod (c$, "getLocale", 
3175 function () {
3176 return this.locale;
3177 });
3178 Clazz_defineMethod (c$, "setParent", 
3179 function (parent) {
3180 this.parent = parent;
3181 }, "java.util.ResourceBundle");
3182 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
3183 function (baseName, targetLocale, loader, control) {
3184 var n = 4;
3185 {
3186 n = arguments.length;
3187 }switch (n) {
3188 case 2:
3189 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
3190 control = targetLocale;
3191 targetLocale = null;
3192 }break;
3193 case 3:
3194 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
3195 control = loader;
3196 loader = null;
3197 }break;
3198 }
3199 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
3200 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3201 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
3202 }, "~S,~O,~O,java.util.ResourceBundle.Control");
3203 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
3204  function (baseName, locale, loader, control) {
3205 if (control == null) {
3206 throw  new NullPointerException ("ResourceBundle locale or control is null");
3207 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
3208 var bundle = null;
3209 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3210 if (bundleRef != null) {
3211 bundle = bundleRef;
3212 bundleRef = null;
3213 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
3214 return bundle;
3215 }var formats = control.getFormats (baseName);
3216 var baseBundle = null;
3217 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
3218 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
3219 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
3220 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3221 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
3222 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
3223 break;
3224 }if (isBaseBundle && baseBundle == null) {
3225 baseBundle = bundle;
3226 }}}
3227 if (bundle == null) {
3228 if (baseBundle == null) {
3229 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
3230 }bundle = baseBundle;
3231 }return bundle;
3232 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
3233 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
3234  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
3235 var targetLocale = candidateLocales.get (index);
3236 var parent = null;
3237 if (index != candidateLocales.size () - 1) {
3238 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
3239 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
3240 return baseBundle;
3241 }var expiredBundle = false;
3242 cacheKey.setLocale (targetLocale);
3243 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
3244 if (java.util.ResourceBundle.isValidBundle (bundle)) {
3245 expiredBundle = bundle.expired;
3246 if (!expiredBundle) {
3247 if (bundle.parent === parent) {
3248 return bundle;
3249 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3250 if (bundleRef != null && bundleRef === bundle) {
3251 java.util.ResourceBundle.cacheList.remove (cacheKey);
3252 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
3253 var constKey = cacheKey.clone ();
3254 try {
3255 try {
3256 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
3257 if (bundle != null) {
3258 if (bundle.parent == null) {
3259 bundle.setParent (parent);
3260 }bundle.locale = targetLocale;
3261 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
3262 return bundle;
3263 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
3264 } finally {
3265 }
3266 } finally {
3267 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
3268 Thread.currentThread ().interrupt ();
3269 }}
3270 }return parent;
3271 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
3272 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
3273  function (cacheKey, formats, control, reload) {
3274 var targetLocale = cacheKey.getLocale ();
3275 var bundle = null;
3276 var size = formats.size ();
3277 for (var i = 0; i < size; i++) {
3278 var format = formats.get (i);
3279 try {
3280 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
3281 } catch (e$$) {
3282 if (Clazz_exceptionOf (e$$, LinkageError)) {
3283 var error = e$$;
3284 {
3285 cacheKey.setCause (error);
3286 }
3287 } else if (Clazz_exceptionOf (e$$, Exception)) {
3288 var cause = e$$;
3289 {
3290 cacheKey.setCause (cause);
3291 }
3292 } else {
3293 throw e$$;
3294 }
3295 }
3296 if (bundle != null) {
3297 cacheKey.setFormat (format);
3298 bundle.locale = targetLocale;
3299 bundle.expired = false;
3300 break;
3301 }}
3302 return bundle;
3303 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
3304 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
3305  function (bundle) {
3306 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
3307 }, "java.util.ResourceBundle");
3308 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
3309  function (baseName, locale, cause) {
3310 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
3311 cause = null;
3312 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
3313 }, "~S,java.util.Locale,Throwable");
3314 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
3315  function (cacheKey, control) {
3316 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
3317 if (bundleRef == null) {
3318 return null;
3319 }var bundle = bundleRef;
3320 return bundle;
3321 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
3322 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
3323  function (cacheKey, bundle, control) {
3324 var key = cacheKey.clone ();
3325 java.util.ResourceBundle.cacheList.put (key, bundle);
3326 return bundle;
3327 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
3328 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
3329 function () {
3330 java.util.ResourceBundle.cacheList.clear ();
3331 });
3332 Clazz_defineMethod (c$, "containsKey", 
3333 function (key) {
3334 if (key == null) {
3335 throw  new NullPointerException ();
3336 }for (var rb = this; rb != null; rb = rb.parent) {
3337 if (rb.handleKeySet ().contains (key)) {
3338 return true;
3339 }}
3340 return false;
3341 }, "~S");
3342 Clazz_defineMethod (c$, "keySet", 
3343 function () {
3344 var keys =  new java.util.HashSet ();
3345 for (var rb = this; rb != null; rb = rb.parent) {
3346 keys.addAll (rb.handleKeySet ());
3347 }
3348 return keys;
3349 });
3350 Clazz_defineMethod (c$, "handleKeySet", 
3351 function () {
3352 if (this.$keySet == null) {
3353 {
3354 if (this.$keySet == null) {
3355 var keys =  new java.util.HashSet ();
3356 var enumKeys = this.getKeys ();
3357 while (enumKeys.hasMoreElements ()) {
3358 var key = enumKeys.nextElement ();
3359 if (this.handleGetObject (key) != null) {
3360 keys.add (key);
3361 }}
3362 this.$keySet = keys;
3363 }}}return this.$keySet;
3364 });
3365 c$.$ResourceBundle$1$ = function () {
3366 Clazz_pu$h(self.c$);
3367 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
3368 Clazz_defineMethod (c$, "getKeys", 
3369 function () {
3370 return null;
3371 });
3372 Clazz_defineMethod (c$, "handleGetObject", 
3373 function (key) {
3374 return null;
3375 }, "~S");
3376 Clazz_overrideMethod (c$, "toString", 
3377 function () {
3378 return "NONEXISTENT_BUNDLE";
3379 });
3380 c$ = Clazz_p0p ();
3381 };
3382 Clazz_pu$h(self.c$);
3383 c$ = Clazz_decorateAsClass (function () {
3384 this.name = null;
3385 this.locale = null;
3386 this.format = null;
3387 this.cause = null;
3388 this.hashCodeCache = 0;
3389 Clazz_instantialize (this, arguments);
3390 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
3391 Clazz_makeConstructor (c$, 
3392 function (a, b, c) {
3393 this.name = a;
3394 this.locale = b;
3395 if (this.name != null) this.calculateHashCode ();
3396 }, "~S,java.util.Locale,~O");
3397 Clazz_defineMethod (c$, "getName", 
3398 function () {
3399 return this.name;
3400 });
3401 Clazz_defineMethod (c$, "getLocale", 
3402 function () {
3403 return this.locale;
3404 });
3405 Clazz_defineMethod (c$, "setLocale", 
3406 function (a) {
3407 if (!this.locale.equals (a)) {
3408 this.locale = a;
3409 this.calculateHashCode ();
3410 }return this;
3411 }, "java.util.Locale");
3412 Clazz_overrideMethod (c$, "equals", 
3413 function (a) {
3414 if (this === a) {
3415 return true;
3416 }try {
3417 var b = a;
3418 if (this.hashCodeCache != b.hashCodeCache) {
3419 return false;
3420 }if (!this.name.equals (b.name)) {
3421 return false;
3422 }if (!this.locale.equals (b.locale)) {
3423 return false;
3424 }return true;
3425 } catch (e$$) {
3426 if (Clazz_exceptionOf (e$$, NullPointerException)) {
3427 var e = e$$;
3428 {
3429 }
3430 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
3431 var e = e$$;
3432 {
3433 }
3434 } else {
3435 throw e$$;
3436 }
3437 }
3438 return false;
3439 }, "~O");
3440 Clazz_overrideMethod (c$, "hashCode", 
3441 function () {
3442 return this.hashCodeCache;
3443 });
3444 Clazz_defineMethod (c$, "calculateHashCode", 
3445  function () {
3446 this.hashCodeCache = this.name.hashCode () << 3;
3447 this.hashCodeCache ^= this.locale.hashCode ();
3448 });
3449 Clazz_defineMethod (c$, "clone", 
3450 function () {
3451 try {
3452 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
3453 a.cause = null;
3454 return a;
3455 } catch (e) {
3456 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
3457 throw  new InternalError ();
3458 } else {
3459 throw e;
3460 }
3461 }
3462 });
3463 Clazz_defineMethod (c$, "setFormat", 
3464 function (a) {
3465 this.format = a;
3466 }, "~S");
3467 Clazz_defineMethod (c$, "setCause", 
3468  function (a) {
3469 if (this.cause == null) {
3470 this.cause = a;
3471 } else {
3472 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
3473 this.cause = a;
3474 }}}, "Throwable");
3475 Clazz_defineMethod (c$, "getCause", 
3476  function () {
3477 return this.cause;
3478 });
3479 Clazz_overrideMethod (c$, "toString", 
3480 function () {
3481 var a = this.locale.toString ();
3482 if (a.length == 0) {
3483 if (this.locale.getVariant ().length != 0) {
3484 a = "__" + this.locale.getVariant ();
3485 } else {
3486 a = "\"\"";
3487 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
3488 });
3489 c$ = Clazz_p0p ();
3490 Clazz_pu$h(self.c$);
3491 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
3492 Clazz_makeConstructor (c$, 
3493 function () {
3494 });
3495 c$.getControl = Clazz_defineMethod (c$, "getControl", 
3496 function (a) {
3497 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3498 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
3499 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3500 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
3501 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3502 return java.util.ResourceBundle.Control.INSTANCE;
3503 }throw  new IllegalArgumentException ();
3504 }, "java.util.List");
3505 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
3506 function (a) {
3507 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
3508 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
3509 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
3510 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
3511 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
3512 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
3513 }throw  new IllegalArgumentException ();
3514 }, "java.util.List");
3515 Clazz_defineMethod (c$, "getFormats", 
3516 function (a) {
3517 if (a == null) {
3518 throw  new NullPointerException ();
3519 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
3520 }, "~S");
3521 Clazz_defineMethod (c$, "getCandidateLocales", 
3522 function (a, b) {
3523 if (a == null) {
3524 throw  new NullPointerException ();
3525 }var c = b.getLanguage ();
3526 var d = b.getCountry ();
3527 var e = b.getVariant ();
3528 var f =  new java.util.ArrayList (4);
3529 if (e.length > 0) {
3530 f.add (b);
3531 }if (d.length > 0) {
3532 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
3533 }if (c.length > 0) {
3534 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
3535 }f.add (java.util.Locale.ROOT);
3536 return f;
3537 }, "~S,java.util.Locale");
3538 Clazz_defineMethod (c$, "getFallbackLocale", 
3539 function (a, b) {
3540 if (a == null) {
3541 throw  new NullPointerException ();
3542 }var c = java.util.Locale.getDefault ();
3543 return b.equals (c) ? null : c;
3544 }, "~S,java.util.Locale");
3545 Clazz_defineMethod (c$, "newBundle", 
3546 function (a, b, c, d, e) {
3547 var f = this.toBundleName (a, b);
3548 var g = null;
3549 if (c.equals ("java.class")) {
3550 g = swingjs.api.Interface.getInstance (f, false);
3551 } else if (c.equals ("java.properties")) {
3552 var h = this.toResourceName0 (f, "properties");
3553 if (h == null) {
3554 return null;
3555 }var i = swingjs.JSToolkit.getJavaResource (h);
3556 var j = null;
3557 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
3558 if (j != null) {
3559 try {
3560 g = this.newPropertyBundle (j);
3561 } finally {
3562 j.close ();
3563 }
3564 }} else {
3565 throw  new IllegalArgumentException ("unknown format: " + c);
3566 }return g;
3567 }, "~S,java.util.Locale,~S,~O,~B");
3568 Clazz_defineMethod (c$, "newPropertyBundle", 
3569  function (a) {
3570 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
3571 }, "java.io.InputStream");
3572 Clazz_defineMethod (c$, "getTimeToLive", 
3573 function (a, b) {
3574 if (a == null || b == null) {
3575 throw  new NullPointerException ();
3576 }return -2;
3577 }, "~S,java.util.Locale");
3578 Clazz_defineMethod (c$, "toBundleName", 
3579 function (a, b) {
3580 if (b === java.util.Locale.ROOT) {
3581 return a;
3582 }var c = b.getLanguage ();
3583 var d = b.getCountry ();
3584 var e = b.getVariant ();
3585 if (c === "" && d === "" && e === "") {
3586 return a;
3587 }var f =  new StringBuilder (a);
3588 f.append ('_');
3589 if (e !== "") {
3590 f.append (c).append ('_').append (d).append ('_').append (e);
3591 } else if (d !== "") {
3592 f.append (c).append ('_').append (d);
3593 } else {
3594 f.append (c);
3595 }return f.toString ();
3596 }, "~S,java.util.Locale");
3597 Clazz_defineMethod (c$, "toResourceName", 
3598 function (a, b) {
3599 var c =  new StringBuilder (a.length + 1 + b.length);
3600 c.append (a.$replace ('.', '/')).append ('.').append (b);
3601 return c.toString ();
3602 }, "~S,~S");
3603 Clazz_defineMethod (c$, "toResourceName0", 
3604  function (a, b) {
3605 if (a.contains ("://")) {
3606 return null;
3607 } else {
3608 return this.toResourceName (a, b);
3609 }}, "~S,~S");
3610 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
3611 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
3612 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
3613 Clazz_defineStatics (c$,
3614 "TTL_DONT_CACHE", -1,
3615 "TTL_NO_EXPIRATION_CONTROL", -2);
3616 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
3617 c$ = Clazz_p0p ();
3618 Clazz_pu$h(self.c$);
3619 c$ = Clazz_decorateAsClass (function () {
3620 this.formats = null;
3621 Clazz_instantialize (this, arguments);
3622 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
3623 Clazz_makeConstructor (c$, 
3624 function (a) {
3625 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
3626 this.formats = a;
3627 }, "java.util.List");
3628 Clazz_overrideMethod (c$, "getFormats", 
3629 function (a) {
3630 if (a == null) {
3631 throw  new NullPointerException ();
3632 }return this.formats;
3633 }, "~S");
3634 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3635 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3636 c$ = Clazz_p0p ();
3637 Clazz_pu$h(self.c$);
3638 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
3639 Clazz_overrideMethod (c$, "getFallbackLocale", 
3640 function (a, b) {
3641 if (a == null || b == null) {
3642 throw  new NullPointerException ();
3643 }return null;
3644 }, "~S,java.util.Locale");
3645 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
3646 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
3647 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
3648 c$ = Clazz_p0p ();
3649 Clazz_defineStatics (c$,
3650 "INITIAL_CACHE_SIZE", 32);
3651 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));
3652 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
3653 });
3654 Clazz_declarePackage ("JU");
3655 Clazz_load (["javajs.api.GenericLineReader"], "JU.Rdr", ["java.io.BufferedInputStream", "$.BufferedReader", "$.ByteArrayInputStream", "$.InputStreamReader", "$.StringReader", "JU.AU", "$.Base64", "$.Encoding", "$.SB"], function () {
3656 c$ = Clazz_decorateAsClass (function () {
3657 this.reader = null;
3658 Clazz_instantialize (this, arguments);
3659 }, JU, "Rdr", null, javajs.api.GenericLineReader);
3660 Clazz_makeConstructor (c$, 
3661 function (reader) {
3662 this.reader = reader;
3663 }, "java.io.BufferedReader");
3664 Clazz_overrideMethod (c$, "readNextLine", 
3665 function () {
3666 return this.reader.readLine ();
3667 });
3668 c$.readCifData = Clazz_defineMethod (c$, "readCifData", 
3669 function (parser, br) {
3670 return parser.set (null, br).getAllCifData ();
3671 }, "javajs.api.GenericCifDataParser,java.io.BufferedReader");
3672 c$.fixUTF = Clazz_defineMethod (c$, "fixUTF", 
3673 function (bytes) {
3674 var encoding = JU.Rdr.getUTFEncoding (bytes);
3675 if (encoding !== JU.Encoding.NONE) try {
3676 var s =  String.instantialize (bytes, encoding.name ().$replace ('_', '-'));
3677 switch (encoding) {
3678 case JU.Encoding.UTF8:
3679 case JU.Encoding.UTF_16BE:
3680 case JU.Encoding.UTF_16LE:
3681 s = s.substring (1);
3682 break;
3683 default:
3684 break;
3685 }
3686 return s;
3687 } catch (e) {
3688 if (Clazz_exceptionOf (e, java.io.UnsupportedEncodingException)) {
3689 System.out.println (e);
3690 } else {
3691 throw e;
3692 }
3693 }
3694 return  String.instantialize (bytes);
3695 }, "~A");
3696 c$.getUTFEncoding = Clazz_defineMethod (c$, "getUTFEncoding", 
3697  function (bytes) {
3698 if (bytes.length >= 3 && bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) return JU.Encoding.UTF8;
3699 if (bytes.length >= 4 && bytes[0] == 0 && bytes[1] == 0 && bytes[2] == 0xFE && bytes[3] == 0xFF) return JU.Encoding.UTF_32BE;
3700 if (bytes.length >= 4 && bytes[0] == 0xFF && bytes[1] == 0xFE && bytes[2] == 0 && bytes[3] == 0) return JU.Encoding.UTF_32LE;
3701 if (bytes.length >= 2 && bytes[0] == 0xFF && bytes[1] == 0xFE) return JU.Encoding.UTF_16LE;
3702 if (bytes.length >= 2 && bytes[0] == 0xFE && bytes[1] == 0xFF) return JU.Encoding.UTF_16BE;
3703 return JU.Encoding.NONE;
3704 }, "~A");
3705 c$.getUTFEncodingForStream = Clazz_defineMethod (c$, "getUTFEncodingForStream", 
3706  function (is) {
3707 {
3708 is.resetStream();
3709 }var abMagic =  Clazz_newByteArray (4, 0);
3710 abMagic[3] = 1;
3711 try {
3712 is.mark (5);
3713 } catch (e) {
3714 if (Clazz_exceptionOf (e, Exception)) {
3715 return JU.Encoding.NONE;
3716 } else {
3717 throw e;
3718 }
3719 }
3720 is.read (abMagic, 0, 4);
3721 is.reset ();
3722 return JU.Rdr.getUTFEncoding (abMagic);
3723 }, "java.io.BufferedInputStream");
3724 c$.isBase64 = Clazz_defineMethod (c$, "isBase64", 
3725 function (sb) {
3726 return (sb.indexOf (";base64,") == 0);
3727 }, "JU.SB");
3728 c$.isCompoundDocumentS = Clazz_defineMethod (c$, "isCompoundDocumentS", 
3729 function (is) {
3730 return JU.Rdr.isCompoundDocumentB (JU.Rdr.getMagic (is, 8));
3731 }, "java.io.InputStream");
3732 c$.isCompoundDocumentB = Clazz_defineMethod (c$, "isCompoundDocumentB", 
3733 function (bytes) {
3734 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);
3735 }, "~A");
3736 c$.isGzipS = Clazz_defineMethod (c$, "isGzipS", 
3737 function (is) {
3738 return JU.Rdr.isGzipB (JU.Rdr.getMagic (is, 2));
3739 }, "java.io.InputStream");
3740 c$.isGzipB = Clazz_defineMethod (c$, "isGzipB", 
3741 function (bytes) {
3742 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x1F && bytes[1] == 0x8B);
3743 }, "~A");
3744 c$.isPickleS = Clazz_defineMethod (c$, "isPickleS", 
3745 function (is) {
3746 return JU.Rdr.isPickleB (JU.Rdr.getMagic (is, 2));
3747 }, "java.io.InputStream");
3748 c$.isPickleB = Clazz_defineMethod (c$, "isPickleB", 
3749 function (bytes) {
3750 return (bytes != null && bytes.length >= 2 && bytes[0] == 0x7D && bytes[1] == 0x71);
3751 }, "~A");
3752 c$.isPngZipStream = Clazz_defineMethod (c$, "isPngZipStream", 
3753 function (is) {
3754 return JU.Rdr.isPngZipB (JU.Rdr.getMagic (is, 55));
3755 }, "java.io.InputStream");
3756 c$.isPngZipB = Clazz_defineMethod (c$, "isPngZipB", 
3757 function (bytes) {
3758 return (bytes[50] == 0 && bytes[51] == 0x50 && bytes[52] == 0x4E && bytes[53] == 0x47 && bytes[54] == 0x4A);
3759 }, "~A");
3760 c$.isZipS = Clazz_defineMethod (c$, "isZipS", 
3761 function (is) {
3762 return JU.Rdr.isZipB (JU.Rdr.getMagic (is, 4));
3763 }, "java.io.InputStream");
3764 c$.isZipB = Clazz_defineMethod (c$, "isZipB", 
3765 function (bytes) {
3766 return (bytes.length >= 4 && bytes[0] == 0x50 && bytes[1] == 0x4B && bytes[2] == 0x03 && bytes[3] == 0x04);
3767 }, "~A");
3768 c$.getMagic = Clazz_defineMethod (c$, "getMagic", 
3769  function (is, n) {
3770 var abMagic =  Clazz_newByteArray (n, 0);
3771 {
3772 is.resetStream();
3773 }try {
3774 is.mark (n + 1);
3775 is.read (abMagic, 0, n);
3776 } catch (e) {
3777 if (Clazz_exceptionOf (e, java.io.IOException)) {
3778 } else {
3779 throw e;
3780 }
3781 }
3782 try {
3783 is.reset ();
3784 } catch (e) {
3785 if (Clazz_exceptionOf (e, java.io.IOException)) {
3786 } else {
3787 throw e;
3788 }
3789 }
3790 return abMagic;
3791 }, "java.io.InputStream,~N");
3792 c$.getBIS = Clazz_defineMethod (c$, "getBIS", 
3793 function (bytes) {
3794 return  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (bytes));
3795 }, "~A");
3796 c$.getBR = Clazz_defineMethod (c$, "getBR", 
3797 function (string) {
3798 return  new java.io.BufferedReader ( new java.io.StringReader (string));
3799 }, "~S");
3800 c$.getUnzippedInputStream = Clazz_defineMethod (c$, "getUnzippedInputStream", 
3801 function (jzt, bis) {
3802 while (JU.Rdr.isGzipS (bis)) bis =  new java.io.BufferedInputStream (JU.Rdr.newGZIPInputStream (jzt, bis));
3803
3804 return bis;
3805 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
3806 c$.getBytesFromSB = Clazz_defineMethod (c$, "getBytesFromSB", 
3807 function (sb) {
3808 return (JU.Rdr.isBase64 (sb) ? JU.Base64.decodeBase64 (sb.substring (8)) : sb.toBytes (0, -1));
3809 }, "JU.SB");
3810 c$.getStreamAsBytes = Clazz_defineMethod (c$, "getStreamAsBytes", 
3811 function (bis, out) {
3812 var buf =  Clazz_newByteArray (1024, 0);
3813 var bytes = (out == null ?  Clazz_newByteArray (4096, 0) : null);
3814 var len = 0;
3815 var totalLen = 0;
3816 while ((len = bis.read (buf, 0, 1024)) > 0) {
3817 totalLen += len;
3818 if (out == null) {
3819 if (totalLen >= bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3820 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3821 } else {
3822 out.write (buf, 0, len);
3823 }}
3824 bis.close ();
3825 if (out == null) {
3826 return JU.AU.arrayCopyByte (bytes, totalLen);
3827 }return totalLen + " bytes";
3828 }, "java.io.BufferedInputStream,JU.OC");
3829 c$.getBufferedReader = Clazz_defineMethod (c$, "getBufferedReader", 
3830 function (bis, charSet) {
3831 if (JU.Rdr.getUTFEncodingForStream (bis) === JU.Encoding.NONE) return  new java.io.BufferedReader ( new java.io.InputStreamReader (bis, (charSet == null ? "UTF-8" : charSet)));
3832 var bytes = JU.Rdr.getLimitedStreamBytes (bis, -1);
3833 bis.close ();
3834 return JU.Rdr.getBR (charSet == null ? JU.Rdr.fixUTF (bytes) :  String.instantialize (bytes, charSet));
3835 }, "java.io.BufferedInputStream,~S");
3836 c$.getLimitedStreamBytes = Clazz_defineMethod (c$, "getLimitedStreamBytes", 
3837 function (is, n) {
3838 var buflen = (n > 0 && n < 1024 ? n : 1024);
3839 var buf =  Clazz_newByteArray (buflen, 0);
3840 var bytes =  Clazz_newByteArray (n < 0 ? 4096 : n, 0);
3841 var len = 0;
3842 var totalLen = 0;
3843 if (n < 0) n = 2147483647;
3844 while (totalLen < n && (len = is.read (buf, 0, buflen)) > 0) {
3845 totalLen += len;
3846 if (totalLen > bytes.length) bytes = JU.AU.ensureLengthByte (bytes, totalLen * 2);
3847 System.arraycopy (buf, 0, bytes, totalLen - len, len);
3848 if (n != 2147483647 && totalLen + buflen > bytes.length) buflen = bytes.length - totalLen;
3849 }
3850 if (totalLen == bytes.length) return bytes;
3851 buf =  Clazz_newByteArray (totalLen, 0);
3852 System.arraycopy (bytes, 0, buf, 0, totalLen);
3853 return buf;
3854 }, "java.io.InputStream,~N");
3855 c$.StreamToUTF8String = Clazz_defineMethod (c$, "StreamToUTF8String", 
3856 function (bis) {
3857 var data =  new Array (1);
3858 try {
3859 JU.Rdr.readAllAsString (JU.Rdr.getBufferedReader (bis, "UTF-8"), -1, true, data, 0);
3860 } catch (e) {
3861 if (Clazz_exceptionOf (e, java.io.IOException)) {
3862 } else {
3863 throw e;
3864 }
3865 }
3866 return data[0];
3867 }, "java.io.BufferedInputStream");
3868 c$.readAllAsString = Clazz_defineMethod (c$, "readAllAsString", 
3869 function (br, nBytesMax, allowBinary, data, i) {
3870 try {
3871 var sb = JU.SB.newN (8192);
3872 var line;
3873 if (nBytesMax < 0) {
3874 line = br.readLine ();
3875 if (allowBinary || line != null && line.indexOf ('\0') < 0 && (line.length != 4 || line.charCodeAt (0) != 65533 || line.indexOf ("PNG") != 1)) {
3876 sb.append (line).appendC ('\n');
3877 while ((line = br.readLine ()) != null) sb.append (line).appendC ('\n');
3878
3879 }} else {
3880 var n = 0;
3881 var len;
3882 while (n < nBytesMax && (line = br.readLine ()) != null) {
3883 if (nBytesMax - n < (len = line.length) + 1) line = line.substring (0, nBytesMax - n - 1);
3884 sb.append (line).appendC ('\n');
3885 n += len + 1;
3886 }
3887 }br.close ();
3888 data[i] = sb.toString ();
3889 return true;
3890 } catch (ioe) {
3891 if (Clazz_exceptionOf (ioe, Exception)) {
3892 data[i] = ioe.toString ();
3893 return false;
3894 } else {
3895 throw ioe;
3896 }
3897 }
3898 }, "java.io.BufferedReader,~N,~B,~A,~N");
3899 c$.getPngZipPointAndCount = Clazz_defineMethod (c$, "getPngZipPointAndCount", 
3900 function (bis, pt_count) {
3901 bis.mark (75);
3902 try {
3903 var data = JU.Rdr.getLimitedStreamBytes (bis, 74);
3904 bis.reset ();
3905 var pt = 0;
3906 for (var i = 64, f = 1; --i > 54; f *= 10) pt += (data[i] - 48) * f;
3907
3908 var n = 0;
3909 for (var i = 74, f = 1; --i > 64; f *= 10) n += (data[i] - 48) * f;
3910
3911 pt_count[0] = pt;
3912 pt_count[1] = n;
3913 } catch (e) {
3914 pt_count[1] = 0;
3915 }
3916 }, "java.io.BufferedInputStream,~A");
3917 c$.getPngZipStream = Clazz_defineMethod (c$, "getPngZipStream", 
3918 function (bis, asNewStream) {
3919 if (!JU.Rdr.isPngZipStream (bis)) return bis;
3920 var data =  Clazz_newByteArray (0, 0);
3921 bis.mark (75);
3922 try {
3923 var pt_count =  Clazz_newIntArray (2, 0);
3924 JU.Rdr.getPngZipPointAndCount (bis, pt_count);
3925 if (pt_count[1] != 0) {
3926 var pt = pt_count[0];
3927 while (pt > 0) pt -= bis.skip (pt);
3928
3929 if (!asNewStream) return bis;
3930 data = JU.Rdr.getLimitedStreamBytes (bis, pt_count[1]);
3931 }} catch (e) {
3932 } finally {
3933 try {
3934 if (asNewStream) bis.close ();
3935 } catch (e) {
3936 if (Clazz_exceptionOf (e, Exception)) {
3937 } else {
3938 throw e;
3939 }
3940 }
3941 }
3942 return JU.Rdr.getBIS (data);
3943 }, "java.io.BufferedInputStream,~B");
3944 c$.readFileAsMap = Clazz_defineMethod (c$, "readFileAsMap", 
3945 function (jzt, is, bdata, name) {
3946 jzt.readFileAsMap (is, bdata, name);
3947 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,java.util.Map,~S");
3948 c$.getZipDirectoryAsStringAndClose = Clazz_defineMethod (c$, "getZipDirectoryAsStringAndClose", 
3949 function (jzt, t) {
3950 return jzt.getZipDirectoryAsStringAndClose (t);
3951 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
3952 c$.newGZIPInputStream = Clazz_defineMethod (c$, "newGZIPInputStream", 
3953 function (jzt, bis) {
3954 return jzt.newGZIPInputStream (bis);
3955 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream");
3956 c$.newZipInputStream = Clazz_defineMethod (c$, "newZipInputStream", 
3957 function (jzt, $in) {
3958 return jzt.newZipInputStream ($in);
3959 }, "javajs.api.GenericZipTools,java.io.InputStream");
3960 c$.getZipFileDirectory = Clazz_defineMethod (c$, "getZipFileDirectory", 
3961 function (jzt, bis, subFileList, listPtr, asBufferedInputStream) {
3962 return jzt.getZipFileDirectory (jzt, bis, subFileList, listPtr, asBufferedInputStream);
3963 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N,~B");
3964 c$.getZipDirectoryAndClose = Clazz_defineMethod (c$, "getZipDirectoryAndClose", 
3965 function (jzt, t, manifestID) {
3966 return jzt.getZipDirectoryAndClose (t, manifestID);
3967 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~S");
3968 c$.getAllZipData = Clazz_defineMethod (c$, "getAllZipData", 
3969 function (jzt, bis, subFileList, replace, string, fileData) {
3970 jzt.getAllZipData (bis, subFileList, replace, string, fileData);
3971 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~S,~S,java.util.Map");
3972 c$.getZipFileContentsAsBytes = Clazz_defineMethod (c$, "getZipFileContentsAsBytes", 
3973 function (jzt, bis, subFileList, i) {
3974 return jzt.getZipFileContentsAsBytes (bis, subFileList, i);
3975 }, "javajs.api.GenericZipTools,java.io.BufferedInputStream,~A,~N");
3976 c$.addZipEntry = Clazz_defineMethod (c$, "addZipEntry", 
3977 function (jzt, zos, fileName) {
3978 jzt.addZipEntry (zos, fileName);
3979 }, "javajs.api.GenericZipTools,~O,~S");
3980 c$.closeZipEntry = Clazz_defineMethod (c$, "closeZipEntry", 
3981 function (jzt, zos) {
3982 jzt.closeZipEntry (zos);
3983 }, "javajs.api.GenericZipTools,~O");
3984 c$.getZipOutputStream = Clazz_defineMethod (c$, "getZipOutputStream", 
3985 function (jzt, bos) {
3986 return jzt.getZipOutputStream (bos);
3987 }, "javajs.api.GenericZipTools,~O");
3988 c$.getCrcValue = Clazz_defineMethod (c$, "getCrcValue", 
3989 function (jzt, bytes) {
3990 return jzt.getCrcValue (bytes);
3991 }, "javajs.api.GenericZipTools,~A");
3992 c$.getZipRoot = Clazz_defineMethod (c$, "getZipRoot", 
3993 function (fileName) {
3994 var pt = fileName.indexOf ("|");
3995 return (pt < 0 ? fileName : fileName.substring (0, pt));
3996 }, "~S");
3997 });
3998 Clazz_declarePackage ("javajs.api");
3999 Clazz_declareInterface (javajs.api, "GenericLineReader");
4000 Clazz_load (["java.io.FilterInputStream"], "java.io.BufferedInputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException"], function () {
4001 c$ = Clazz_decorateAsClass (function () {
4002 this.buf = null;
4003 this.count = 0;
4004 this.pos = 0;
4005 this.markpos = -1;
4006 this.marklimit = 0;
4007 Clazz_instantialize (this, arguments);
4008 }, java.io, "BufferedInputStream", java.io.FilterInputStream);
4009 Clazz_defineMethod (c$, "getInIfOpen", 
4010  function () {
4011 var input = this.$in;
4012 if (input == null) throw  new java.io.IOException ("Stream closed");
4013 return input;
4014 });
4015 Clazz_defineMethod (c$, "getBufIfOpen", 
4016  function () {
4017 var buffer = this.buf;
4018 if (buffer == null) throw  new java.io.IOException ("Stream closed");
4019 return buffer;
4020 });
4021 Clazz_overrideMethod (c$, "resetStream", 
4022 function () {
4023 });
4024 Clazz_makeConstructor (c$, 
4025 function ($in) {
4026 Clazz_superConstructor (this, java.io.BufferedInputStream, [$in]);
4027 this.buf =  Clazz_newByteArray (8192, 0);
4028 }, "java.io.InputStream");
4029 Clazz_defineMethod (c$, "fill", 
4030  function () {
4031 var buffer = this.getBufIfOpen ();
4032 if (this.markpos < 0) this.pos = 0;
4033  else if (this.pos >= buffer.length) if (this.markpos > 0) {
4034 var sz = this.pos - this.markpos;
4035 System.arraycopy (buffer, this.markpos, buffer, 0, sz);
4036 this.pos = sz;
4037 this.markpos = 0;
4038 } else if (buffer.length >= this.marklimit) {
4039 this.markpos = -1;
4040 this.pos = 0;
4041 } else {
4042 var nsz = this.pos * 2;
4043 if (nsz > this.marklimit) nsz = this.marklimit;
4044 var nbuf =  Clazz_newByteArray (nsz, 0);
4045 System.arraycopy (buffer, 0, nbuf, 0, this.pos);
4046 buffer = this.buf = nbuf;
4047 }this.count = this.pos;
4048 var n = this.getInIfOpen ().read (buffer, this.pos, buffer.length - this.pos);
4049 if (n > 0) this.count = n + this.pos;
4050 });
4051 Clazz_overrideMethod (c$, "readByteAsInt", 
4052 function () {
4053 if (this.pos >= this.count) {
4054 this.fill ();
4055 if (this.pos >= this.count) return -1;
4056 }return this.getBufIfOpen ()[this.pos++] & 0xff;
4057 });
4058 Clazz_defineMethod (c$, "read1", 
4059  function (b, off, len) {
4060 var avail = this.count - this.pos;
4061 if (avail <= 0) {
4062 if (len >= this.getBufIfOpen ().length && this.markpos < 0) {
4063 return this.getInIfOpen ().read (b, off, len);
4064 }this.fill ();
4065 avail = this.count - this.pos;
4066 if (avail <= 0) return -1;
4067 }var cnt = (avail < len) ? avail : len;
4068 System.arraycopy (this.getBufIfOpen (), this.pos, b, off, cnt);
4069 this.pos += cnt;
4070 return cnt;
4071 }, "~A,~N,~N");
4072 Clazz_overrideMethod (c$, "read", 
4073 function (b, off, len) {
4074 if (arguments.length == 1) {
4075   off = 0;
4076   len  = b.length;
4077 }
4078 this.getBufIfOpen ();
4079 if ((off | len | (off + len) | (b.length - (off + len))) < 0) {
4080 throw  new IndexOutOfBoundsException ();
4081 } else if (len == 0) {
4082 return 0;
4083 }var n = 0;
4084 for (; ; ) {
4085 var nread = this.read1 (b, off + n, len - n);
4086 if (nread <= 0) return (n == 0) ? nread : n;
4087 n += nread;
4088 if (n >= len) return n;
4089 var input = this.$in;
4090 if (input != null && input.available () <= 0) return n;
4091 }
4092 }, "~A,~N,~N");
4093 Clazz_overrideMethod (c$, "skip", 
4094 function (n) {
4095 this.getBufIfOpen ();
4096 if (n <= 0) {
4097 return 0;
4098 }var avail = this.count - this.pos;
4099 if (avail <= 0) {
4100 if (this.markpos < 0) return this.getInIfOpen ().skip (n);
4101 this.fill ();
4102 avail = this.count - this.pos;
4103 if (avail <= 0) return 0;
4104 }var skipped = (avail < n) ? avail : n;
4105 this.pos += skipped;
4106 return skipped;
4107 }, "~N");
4108 Clazz_overrideMethod (c$, "available", 
4109 function () {
4110 var n = this.count - this.pos;
4111 var avail = this.getInIfOpen ().available ();
4112 return n > (2147483647 - avail) ? 2147483647 : n + avail;
4113 });
4114 Clazz_overrideMethod (c$, "mark", 
4115 function (readlimit) {
4116 this.marklimit = readlimit;
4117 this.markpos = this.pos;
4118 }, "~N");
4119 Clazz_overrideMethod (c$, "reset", 
4120 function () {
4121 this.getBufIfOpen ();
4122 if (this.markpos < 0) throw  new java.io.IOException ("Resetting to invalid mark");
4123 this.pos = this.markpos;
4124 });
4125 Clazz_overrideMethod (c$, "markSupported", 
4126 function () {
4127 return true;
4128 });
4129 Clazz_overrideMethod (c$, "close", 
4130 function () {
4131 var input = this.$in;
4132 this.$in = null;
4133 if (input != null) input.close ();
4134 return;
4135 });
4136 Clazz_defineStatics (c$,
4137 "DEFAULT_BUFFER_SIZE", 8192);
4138 });
4139 Clazz_load (["java.io.InputStream"], "java.io.FilterInputStream", null, function () {
4140 c$ = Clazz_decorateAsClass (function () {
4141 this.$in = null;
4142 Clazz_instantialize (this, arguments);
4143 }, java.io, "FilterInputStream", java.io.InputStream);
4144 Clazz_makeConstructor (c$, 
4145 function ($in) {
4146 Clazz_superConstructor (this, java.io.FilterInputStream, []);
4147 this.$in = $in;
4148 }, "java.io.InputStream");
4149 Clazz_defineMethod (c$, "readByteAsInt", 
4150 function () {
4151 return this.$in.readByteAsInt ();
4152 });
4153 Clazz_defineMethod (c$, "read", 
4154 function (b, off, len) {
4155     if (arguments.length == 1) { off = 0; len = b.length; }
4156 return this.$in.read (b, off, len);
4157 }, "~A,~N,~N");
4158 Clazz_defineMethod (c$, "skip", 
4159 function (n) {
4160 return this.$in.skip (n);
4161 }, "~N");
4162 Clazz_defineMethod (c$, "available", 
4163 function () {
4164 return this.$in.available ();
4165 });
4166 Clazz_defineMethod (c$, "close", 
4167 function () {
4168 this.$in.close ();
4169 });
4170 Clazz_defineMethod (c$, "mark", 
4171 function (readlimit) {
4172 this.$in.mark (readlimit);
4173 }, "~N");
4174 Clazz_defineMethod (c$, "reset", 
4175 function () {
4176 this.$in.reset ();
4177 });
4178 Clazz_defineMethod (c$, "markSupported", 
4179 function () {
4180 return this.$in.markSupported ();
4181 });
4182 });
4183 Clazz_load (null, "java.io.InputStream", ["java.io.IOException", "java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4184 c$ = Clazz_declareType (java.io, "InputStream");
4185 Clazz_defineMethod (c$, "read", 
4186 function (b, off, len) {
4187 if (b == null) {
4188 throw  new NullPointerException ();
4189
4190     if (arguments.length == 1) { off = 0; len = b.length; }
4191
4192 if (off < 0 || len < 0 || len > b.length - off) {
4193 throw  new IndexOutOfBoundsException ();
4194 } else if (len == 0) {
4195 return 0;
4196 }var c = this.readByteAsInt ();
4197 if (c == -1) {
4198 return -1;
4199 }b[off] = c;
4200 var i = 1;
4201 try {
4202 for (; i < len; i++) {
4203 c = this.readByteAsInt ();
4204 if (c == -1) {
4205 break;
4206 }b[off + i] = c;
4207 }
4208 } catch (ee) {
4209 if (Clazz_exceptionOf (ee, java.io.IOException)) {
4210 } else {
4211 throw ee;
4212 }
4213 }
4214 return i;
4215 }, "~A,~N,~N");
4216 Clazz_defineMethod (c$, "skip", 
4217 function (n) {
4218 var remaining = n;
4219 var nr;
4220 if (java.io.InputStream.skipBuffer == null) java.io.InputStream.skipBuffer =  Clazz_newByteArray (2048, 0);
4221 var localSkipBuffer = java.io.InputStream.skipBuffer;
4222 if (n <= 0) {
4223 return 0;
4224 }while (remaining > 0) {
4225 nr = this.read (localSkipBuffer, 0, Math.min (2048, remaining));
4226 if (nr < 0) {
4227 break;
4228 }remaining -= nr;
4229 }
4230 return n - remaining;
4231 }, "~N");
4232 Clazz_defineMethod (c$, "available", 
4233 function () {
4234 return 0;
4235 });
4236 Clazz_defineMethod (c$, "close", 
4237 function () {
4238 });
4239 Clazz_defineMethod (c$, "mark", 
4240 function (readlimit) {
4241 }, "~N");
4242 Clazz_defineMethod (c$, "reset", 
4243 function () {
4244 throw  new java.io.IOException ("mark/reset not supported");
4245 });
4246 Clazz_defineMethod (c$, "markSupported", 
4247 function () {
4248 return false;
4249 });
4250 Clazz_defineMethod (c$, "resetStream", 
4251 function () {
4252 });
4253 Clazz_defineStatics (c$,
4254 "SKIP_BUFFER_SIZE", 2048,
4255 "skipBuffer", null);
4256 });
4257 Clazz_load (["java.io.Reader"], "java.io.BufferedReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException", "JU.SB"], function () {
4258 c$ = Clazz_decorateAsClass (function () {
4259 this.$in = null;
4260 this.cb = null;
4261 this.nChars = 0;
4262 this.nextChar = 0;
4263 this.markedChar = -1;
4264 this.readAheadLimit = 0;
4265 this.skipLF = false;
4266 this.markedSkipLF = false;
4267 Clazz_instantialize (this, arguments);
4268 }, java.io, "BufferedReader", java.io.Reader);
4269 Clazz_defineMethod (c$, "setSize", 
4270  function (sz) {
4271 if (sz <= 0) throw  new IllegalArgumentException ("Buffer size <= 0");
4272 this.cb =  Clazz_newCharArray (sz, '\0');
4273 this.nextChar = this.nChars = 0;
4274 }, "~N");
4275 Clazz_makeConstructor (c$, 
4276 function ($in) {
4277 Clazz_superConstructor (this, java.io.BufferedReader, [$in]);
4278 this.$in = $in;
4279 this.setSize (8192);
4280 }, "java.io.Reader");
4281 Clazz_defineMethod (c$, "ensureOpen", 
4282  function () {
4283 if (this.$in == null) throw  new java.io.IOException ("Stream closed");
4284 });
4285 Clazz_defineMethod (c$, "fill", 
4286  function () {
4287 var dst;
4288 if (this.markedChar <= -1) {
4289 dst = 0;
4290 } else {
4291 var delta = this.nextChar - this.markedChar;
4292 if (delta >= this.readAheadLimit) {
4293 this.markedChar = -2;
4294 this.readAheadLimit = 0;
4295 dst = 0;
4296 } else {
4297 if (this.readAheadLimit <= this.cb.length) {
4298 System.arraycopy (this.cb, this.markedChar, this.cb, 0, delta);
4299 this.markedChar = 0;
4300 dst = delta;
4301 } else {
4302 var ncb =  Clazz_newCharArray (this.readAheadLimit, '\0');
4303 System.arraycopy (this.cb, this.markedChar, ncb, 0, delta);
4304 this.cb = ncb;
4305 this.markedChar = 0;
4306 dst = delta;
4307 }this.nextChar = this.nChars = delta;
4308 }}var n;
4309 do {
4310 n = this.$in.read (this.cb, dst, this.cb.length - dst);
4311 } while (n == 0);
4312 if (n > 0) {
4313 this.nChars = dst + n;
4314 this.nextChar = dst;
4315 }});
4316 Clazz_defineMethod (c$, "read1", 
4317  function (cbuf, off, len) {
4318 if (this.nextChar >= this.nChars) {
4319 if (len >= this.cb.length && this.markedChar <= -1 && !this.skipLF) {
4320 return this.$in.read (cbuf, off, len);
4321 }this.fill ();
4322 }if (this.nextChar >= this.nChars) return -1;
4323 if (this.skipLF) {
4324 this.skipLF = false;
4325 if (this.cb[this.nextChar] == '\n') {
4326 this.nextChar++;
4327 if (this.nextChar >= this.nChars) this.fill ();
4328 if (this.nextChar >= this.nChars) return -1;
4329 }}var n = Math.min (len, this.nChars - this.nextChar);
4330 System.arraycopy (this.cb, this.nextChar, cbuf, off, n);
4331 this.nextChar += n;
4332 return n;
4333 }, "~A,~N,~N");
4334 Clazz_defineMethod (c$, "read", 
4335 function (cbuf, off, len) {
4336 {
4337 this.ensureOpen ();
4338 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4339 throw  new IndexOutOfBoundsException ();
4340 } else if (len == 0) {
4341 return 0;
4342 }var n = this.read1 (cbuf, off, len);
4343 if (n <= 0) return n;
4344 while ((n < len) && this.$in.ready ()) {
4345 var n1 = this.read1 (cbuf, off + n, len - n);
4346 if (n1 <= 0) break;
4347 n += n1;
4348 }
4349 return n;
4350 }}, "~A,~N,~N");
4351 Clazz_defineMethod (c$, "readLine1", 
4352  function (ignoreLF) {
4353 var s = null;
4354 var startChar;
4355 {
4356 this.ensureOpen ();
4357 var omitLF = ignoreLF || this.skipLF;
4358 for (; ; ) {
4359 if (this.nextChar >= this.nChars) this.fill ();
4360 if (this.nextChar >= this.nChars) {
4361 if (s != null && s.length () > 0) return s.toString ();
4362 return null;
4363 }var eol = false;
4364 var c = String.fromCharCode (0);
4365 var i;
4366 if (omitLF && (this.cb[this.nextChar] == '\n')) this.nextChar++;
4367 this.skipLF = false;
4368 omitLF = false;
4369 charLoop : for (i = this.nextChar; i < this.nChars; i++) {
4370 c = this.cb[i];
4371 if ((c == '\n') || (c == '\r')) {
4372 eol = true;
4373 break charLoop;
4374 }}
4375 startChar = this.nextChar;
4376 this.nextChar = i;
4377 if (eol) {
4378 var str;
4379 if (s == null) {
4380 str =  String.instantialize (this.cb, startChar, i - startChar);
4381 } else {
4382 s.appendCB (this.cb, startChar, i - startChar);
4383 str = s.toString ();
4384 }this.nextChar++;
4385 if (c == '\r') {
4386 this.skipLF = true;
4387 }return str;
4388 }if (s == null) s = JU.SB.newN (80);
4389 s.appendCB (this.cb, startChar, i - startChar);
4390 }
4391 }}, "~B");
4392 Clazz_defineMethod (c$, "readLine", 
4393 function () {
4394 return this.readLine1 (false);
4395 });
4396 Clazz_overrideMethod (c$, "skip", 
4397 function (n) {
4398 if (n < 0) {
4399 throw  new IllegalArgumentException ("skip value is negative");
4400 }{
4401 this.ensureOpen ();
4402 var r = n;
4403 while (r > 0) {
4404 if (this.nextChar >= this.nChars) this.fill ();
4405 if (this.nextChar >= this.nChars) break;
4406 if (this.skipLF) {
4407 this.skipLF = false;
4408 if (this.cb[this.nextChar] == '\n') {
4409 this.nextChar++;
4410 }}var d = this.nChars - this.nextChar;
4411 if (r <= d) {
4412 this.nextChar += r;
4413 r = 0;
4414 break;
4415 }r -= d;
4416 this.nextChar = this.nChars;
4417 }
4418 return n - r;
4419 }}, "~N");
4420 Clazz_defineMethod (c$, "ready", 
4421 function () {
4422 {
4423 this.ensureOpen ();
4424 if (this.skipLF) {
4425 if (this.nextChar >= this.nChars && this.$in.ready ()) {
4426 this.fill ();
4427 }if (this.nextChar < this.nChars) {
4428 if (this.cb[this.nextChar] == '\n') this.nextChar++;
4429 this.skipLF = false;
4430 }}return (this.nextChar < this.nChars) || this.$in.ready ();
4431 }});
4432 Clazz_overrideMethod (c$, "markSupported", 
4433 function () {
4434 return true;
4435 });
4436 Clazz_overrideMethod (c$, "mark", 
4437 function (readAheadLimit) {
4438 if (readAheadLimit < 0) {
4439 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4440 }{
4441 this.ensureOpen ();
4442 this.readAheadLimit = readAheadLimit;
4443 this.markedChar = this.nextChar;
4444 this.markedSkipLF = this.skipLF;
4445 }}, "~N");
4446 Clazz_overrideMethod (c$, "reset", 
4447 function () {
4448 {
4449 this.ensureOpen ();
4450 if (this.markedChar < 0) throw  new java.io.IOException ((this.markedChar == -2) ? "Mark invalid" : "Stream not marked");
4451 this.nextChar = this.markedChar;
4452 this.skipLF = this.markedSkipLF;
4453 }});
4454 Clazz_defineMethod (c$, "close", 
4455 function () {
4456 {
4457 if (this.$in == null) return;
4458 this.$in.close ();
4459 this.$in = null;
4460 this.cb = null;
4461 }});
4462 Clazz_defineStatics (c$,
4463 "INVALIDATED", -2,
4464 "UNMARKED", -1,
4465 "DEFAULT_CHAR_BUFFER_SIZE", 8192,
4466 "DEFAULT_EXPECTED_LINE_LENGTH", 80);
4467 });
4468 Clazz_load (["java.io.InputStream"], "java.io.ByteArrayInputStream", ["java.lang.IndexOutOfBoundsException", "$.NullPointerException"], function () {
4469 c$ = Clazz_decorateAsClass (function () {
4470 this.buf = null;
4471 this.pos = 0;
4472 this.$mark = 0;
4473 this.count = 0;
4474 Clazz_instantialize (this, arguments);
4475 }, java.io, "ByteArrayInputStream", java.io.InputStream);
4476 Clazz_makeConstructor (c$, 
4477 function (buf) {
4478 Clazz_superConstructor (this, java.io.ByteArrayInputStream, []);
4479 this.buf = buf;
4480 this.pos = 0;
4481 this.count = buf.length;
4482 }, "~A");
4483 Clazz_overrideMethod (c$, "readByteAsInt", 
4484 function () {
4485 return (this.pos < this.count) ? (this.buf[this.pos++] & 0xff) : -1;
4486 });
4487 Clazz_overrideMethod (c$, "read", 
4488 function (b, off, len) {
4489 if (b == null) {
4490 throw  new NullPointerException ();
4491 }
4492     if (arguments.length == 1) { off = 0; len = b.length; }
4493
4494 if (off < 0 || len < 0 || len > b.length - off) {
4495 throw  new IndexOutOfBoundsException ();
4496 }if (this.pos >= this.count) {
4497 return -1;
4498 }var avail = this.count - this.pos;
4499 if (len > avail) {
4500 len = avail;
4501 }if (len <= 0) {
4502 return 0;
4503 }System.arraycopy (this.buf, this.pos, b, off, len);
4504 this.pos += len;
4505 return len;
4506 }, "~A,~N,~N");
4507 Clazz_overrideMethod (c$, "skip", 
4508 function (n) {
4509 var k = this.count - this.pos;
4510 if (n < k) {
4511 k = n < 0 ? 0 : n;
4512 }this.pos += k;
4513 return k;
4514 }, "~N");
4515 Clazz_overrideMethod (c$, "available", 
4516 function () {
4517 return this.count - this.pos;
4518 });
4519 Clazz_overrideMethod (c$, "markSupported", 
4520 function () {
4521 return true;
4522 });
4523 Clazz_overrideMethod (c$, "mark", 
4524 function (readAheadLimit) {
4525 this.$mark = this.pos;
4526 }, "~N");
4527 Clazz_overrideMethod (c$, "resetStream", 
4528 function () {
4529 });
4530 Clazz_overrideMethod (c$, "reset", 
4531 function () {
4532 this.pos = this.$mark;
4533 });
4534 Clazz_overrideMethod (c$, "close", 
4535 function () {
4536 });
4537 });
4538 Clazz_load (["java.io.Closeable"], "java.io.Reader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.NullPointerException"], function () {
4539 c$ = Clazz_decorateAsClass (function () {
4540 this.lock = null;
4541 this.skipBuffer = null;
4542 Clazz_instantialize (this, arguments);
4543 }, java.io, "Reader", null, java.io.Closeable);
4544 Clazz_makeConstructor (c$, 
4545 function (lock) {
4546 if (lock == null) {
4547 throw  new NullPointerException ();
4548 }this.lock = lock;
4549 }, "~O");
4550 Clazz_defineMethod (c$, "skip", 
4551 function (n) {
4552 if (n < 0) throw  new IllegalArgumentException ("skip value is negative");
4553 var nn = Math.min (n, 8192);
4554 {
4555 if ((this.skipBuffer == null) || (this.skipBuffer.length < nn)) this.skipBuffer =  Clazz_newCharArray (nn, '\0');
4556 var r = n;
4557 while (r > 0) {
4558 var nc = this.read (this.skipBuffer, 0, Math.min (r, nn));
4559 if (nc == -1) break;
4560 r -= nc;
4561 }
4562 return n - r;
4563 }}, "~N");
4564 Clazz_defineMethod (c$, "ready", 
4565 function () {
4566 return false;
4567 });
4568 Clazz_defineMethod (c$, "markSupported", 
4569 function () {
4570 return false;
4571 });
4572 Clazz_defineMethod (c$, "mark", 
4573 function (readAheadLimit) {
4574 throw  new java.io.IOException ("mark() not supported");
4575 }, "~N");
4576 Clazz_defineMethod (c$, "reset", 
4577 function () {
4578 throw  new java.io.IOException ("reset() not supported");
4579 });
4580 Clazz_defineStatics (c$,
4581 "MAX_SKIP_BUFFE_SIZE", 8192);
4582 });
4583 Clazz_load (["java.io.Reader"], "java.io.StringReader", ["java.io.IOException", "java.lang.IllegalArgumentException", "$.IndexOutOfBoundsException"], function () {
4584 c$ = Clazz_decorateAsClass (function () {
4585 this.str = null;
4586 this.length = 0;
4587 this.next = 0;
4588 this.$mark = 0;
4589 Clazz_instantialize (this, arguments);
4590 }, java.io, "StringReader", java.io.Reader);
4591 Clazz_makeConstructor (c$, 
4592 function (s) {
4593 Clazz_superConstructor (this, java.io.StringReader, [s]);
4594 this.str = s;
4595 this.length = s.length;
4596 }, "~S");
4597 Clazz_defineMethod (c$, "ensureOpen", 
4598  function () {
4599 if (this.str == null) throw  new java.io.IOException ("Stream closed");
4600 });
4601 Clazz_overrideMethod (c$, "read", 
4602 function (cbuf, off, len) {
4603 {
4604 this.ensureOpen ();
4605 if ((off < 0) || (off > cbuf.length) || (len < 0) || ((off + len) > cbuf.length) || ((off + len) < 0)) {
4606 throw  new IndexOutOfBoundsException ();
4607 } else if (len == 0) {
4608 return 0;
4609 }if (this.next >= this.length) return -1;
4610 var n = Math.min (this.length - this.next, len);
4611 this.str.getChars (this.next, this.next + n, cbuf, off);
4612 this.next += n;
4613 return n;
4614 }}, "~A,~N,~N");
4615 Clazz_overrideMethod (c$, "skip", 
4616 function (ns) {
4617 {
4618 this.ensureOpen ();
4619 if (this.next >= this.length) return 0;
4620 var n = Math.min (this.length - this.next, ns);
4621 n = Math.max (-this.next, n);
4622 this.next += n;
4623 return n;
4624 }}, "~N");
4625 Clazz_overrideMethod (c$, "ready", 
4626 function () {
4627 {
4628 this.ensureOpen ();
4629 return true;
4630 }});
4631 Clazz_overrideMethod (c$, "markSupported", 
4632 function () {
4633 return true;
4634 });
4635 Clazz_overrideMethod (c$, "mark", 
4636 function (readAheadLimit) {
4637 if (readAheadLimit < 0) {
4638 throw  new IllegalArgumentException ("Read-ahead limit < 0");
4639 }{
4640 this.ensureOpen ();
4641 this.$mark = this.next;
4642 }}, "~N");
4643 Clazz_overrideMethod (c$, "reset", 
4644 function () {
4645 {
4646 this.ensureOpen ();
4647 this.next = this.$mark;
4648 }});
4649 Clazz_overrideMethod (c$, "close", 
4650 function () {
4651 this.str = null;
4652 });
4653 });
4654 Clazz_declarePackage ("JU");
4655 Clazz_load (null, "JU.Base64", ["JU.SB"], function () {
4656 c$ = Clazz_declareType (JU, "Base64");
4657 c$.getBytes64 = Clazz_defineMethod (c$, "getBytes64", 
4658 function (bytes) {
4659 return JU.Base64.getBase64 (bytes).toBytes (0, -1);
4660 }, "~A");
4661 c$.getBase64 = Clazz_defineMethod (c$, "getBase64", 
4662 function (bytes) {
4663 var nBytes = bytes.length;
4664 var sout =  new JU.SB ();
4665 if (nBytes == 0) return sout;
4666 for (var i = 0, nPad = 0; i < nBytes && nPad == 0; ) {
4667 if (i % 75 == 0 && i != 0) sout.append ("\r\n");
4668 nPad = (i + 2 == nBytes ? 1 : i + 1 == nBytes ? 2 : 0);
4669 var outbytes = ((bytes[i++] << 16) & 0xFF0000) | ((nPad == 2 ? 0 : bytes[i++] << 8) & 0x00FF00) | ((nPad >= 1 ? 0 : bytes[i++]) & 0x0000FF);
4670 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 18) & 0x3F));
4671 sout.appendC (JU.Base64.base64.charAt ((outbytes >> 12) & 0x3F));
4672 sout.appendC (nPad == 2 ? '=' : JU.Base64.base64.charAt ((outbytes >> 6) & 0x3F));
4673 sout.appendC (nPad >= 1 ? '=' : JU.Base64.base64.charAt (outbytes & 0x3F));
4674 }
4675 return sout;
4676 }, "~A");
4677 c$.decodeBase64 = Clazz_defineMethod (c$, "decodeBase64", 
4678 function (strBase64) {
4679 var nBytes = 0;
4680 var ch;
4681 var pt0 = strBase64.indexOf (";base64,") + 1;
4682 if (pt0 > 0) pt0 += 7;
4683 var chars64 = strBase64.toCharArray ();
4684 var len64 = chars64.length;
4685 if (len64 == 0) return  Clazz_newByteArray (0, 0);
4686 for (var i = len64; --i >= pt0; ) nBytes += ((ch = (chars64[i]).charCodeAt (0) & 0x7F) == 65 || JU.Base64.decode64[ch] > 0 ? 3 : 0);
4687
4688 nBytes = nBytes >> 2;
4689 var bytes =  Clazz_newByteArray (nBytes, 0);
4690 var offset = 18;
4691 for (var i = pt0, pt = 0, b = 0; i < len64; i++) {
4692 if (JU.Base64.decode64[ch = (chars64[i]).charCodeAt (0) & 0x7F] > 0 || ch == 65 || ch == 61) {
4693 b |= JU.Base64.decode64[ch] << offset;
4694 offset -= 6;
4695 if (offset < 0) {
4696 bytes[pt++] = ((b & 0xFF0000) >> 16);
4697 if (pt < nBytes) bytes[pt++] = ((b & 0xFF00) >> 8);
4698 if (pt < nBytes) bytes[pt++] = (b & 0xFF);
4699 offset = 18;
4700 b = 0;
4701 }}}
4702 return bytes;
4703 }, "~S");
4704 Clazz_defineStatics (c$,
4705 "base64", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
4706 "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]));
4707 });
4708 Clazz_declarePackage ("JU");
4709 Clazz_load (["java.lang.Enum"], "JU.Encoding", null, function () {
4710 c$ = Clazz_declareType (JU, "Encoding", Enum);
4711 Clazz_defineEnumConstant (c$, "NONE", 0, []);
4712 Clazz_defineEnumConstant (c$, "UTF8", 1, []);
4713 Clazz_defineEnumConstant (c$, "UTF_16BE", 2, []);
4714 Clazz_defineEnumConstant (c$, "UTF_16LE", 3, []);
4715 Clazz_defineEnumConstant (c$, "UTF_32BE", 4, []);
4716 Clazz_defineEnumConstant (c$, "UTF_32LE", 5, []);
4717 });
4718 Clazz_declarePackage ("java.util");
4719 Clazz_load (["java.lang.RuntimeException"], "java.util.MissingResourceException", null, function () {
4720 c$ = Clazz_decorateAsClass (function () {
4721 this.className = null;
4722 this.key = null;
4723 Clazz_instantialize (this, arguments);
4724 }, java.util, "MissingResourceException", RuntimeException);
4725 Clazz_makeConstructor (c$, 
4726 function (s, className, key) {
4727 Clazz_superConstructor (this, java.util.MissingResourceException, [s]);
4728 this.className = className;
4729 this.key = key;
4730 }, "~S,~S,~S");
4731 Clazz_makeConstructor (c$, 
4732 function (message, className, key, cause) {
4733 Clazz_superConstructor (this, java.util.MissingResourceException, [message, cause]);
4734 this.className = className;
4735 this.key = key;
4736 }, "~S,~S,~S,Throwable");
4737 Clazz_defineMethod (c$, "getClassName", 
4738 function () {
4739 return this.className;
4740 });
4741 Clazz_defineMethod (c$, "getKey", 
4742 function () {
4743 return this.key;
4744 });
4745 });
4746 Clazz_declarePackage ("jssun.misc");
4747 Clazz_load (null, "jssun.misc.MessageUtils", ["java.lang.Character", "$.StringBuffer"], function () {
4748 c$ = Clazz_declareType (jssun.misc, "MessageUtils");
4749 Clazz_makeConstructor (c$, 
4750 function () {
4751 });
4752 c$.subst = Clazz_defineMethod (c$, "subst", 
4753 function (patt, arg) {
4754 var args =  Clazz_newArray (-1, [arg]);
4755 return jssun.misc.MessageUtils.subst (patt, args);
4756 }, "~S,~S");
4757 c$.subst = Clazz_defineMethod (c$, "subst", 
4758 function (patt, arg1, arg2) {
4759 var args =  Clazz_newArray (-1, [arg1, arg2]);
4760 return jssun.misc.MessageUtils.subst (patt, args);
4761 }, "~S,~S,~S");
4762 c$.subst = Clazz_defineMethod (c$, "subst", 
4763 function (patt, arg1, arg2, arg3) {
4764 var args =  Clazz_newArray (-1, [arg1, arg2, arg3]);
4765 return jssun.misc.MessageUtils.subst (patt, args);
4766 }, "~S,~S,~S,~S");
4767 c$.subst = Clazz_defineMethod (c$, "subst", 
4768 function (patt, args) {
4769 var result =  new StringBuffer ();
4770 var len = patt.length;
4771 for (var i = 0; i >= 0 && i < len; i++) {
4772 var ch = patt.charAt (i);
4773 if (ch == '%') {
4774 if (i != len) {
4775 var index = Character.digit (patt.charAt (i + 1), 10);
4776 if (index == -1) {
4777 result.append (patt.charAt (i + 1));
4778 i++;
4779 } else if (index < args.length) {
4780 result.append (args[index]);
4781 i++;
4782 }}} else {
4783 result.append (ch);
4784 }}
4785 return result.toString ();
4786 }, "~S,~A");
4787 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4788 function (propName, arg) {
4789 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg);
4790 }, "~S,~S");
4791 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4792 function (propName, arg1, arg2) {
4793 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2);
4794 }, "~S,~S,~S");
4795 c$.substProp = Clazz_defineMethod (c$, "substProp", 
4796 function (propName, arg1, arg2, arg3) {
4797 return jssun.misc.MessageUtils.subst (System.getProperty (propName), arg1, arg2, arg3);
4798 }, "~S,~S,~S,~S");
4799 c$.toStderr = Clazz_defineMethod (c$, "toStderr", 
4800 function (msg) {
4801 {
4802 System.out.println(msg);
4803 }}, "~S");
4804 c$.toStdout = Clazz_defineMethod (c$, "toStdout", 
4805 function (msg) {
4806 {
4807 System.out.println(msg);
4808 }}, "~S");
4809 c$.err = Clazz_defineMethod (c$, "err", 
4810 function (s) {
4811 jssun.misc.MessageUtils.toStderr (s + "\n");
4812 }, "~S");
4813 c$.out = Clazz_defineMethod (c$, "out", 
4814 function (s) {
4815 jssun.misc.MessageUtils.toStdout (s + "\n");
4816 }, "~S");
4817 c$.where = Clazz_defineMethod (c$, "where", 
4818 function () {
4819 {
4820 System.out.println(Clazz_getStackTrace());
4821 }});
4822 });
4823 Clazz_declarePackage ("java.awt");
4824 Clazz_load (["java.awt.geom.Dimension2D"], "java.awt.Dimension", null, function () {
4825 c$ = Clazz_decorateAsClass (function () {
4826 this.width = 0;
4827 this.height = 0;
4828 Clazz_instantialize (this, arguments);
4829 }, java.awt, "Dimension", java.awt.geom.Dimension2D);
4830 Clazz_makeConstructor (c$, 
4831 function () {
4832 this.construct (0, 0);
4833 });
4834 Clazz_makeConstructor (c$, 
4835 function (d) {
4836 this.construct (d.width, d.height);
4837 }, "java.awt.Dimension");
4838 Clazz_makeConstructor (c$, 
4839 function (width, height) {
4840 Clazz_superConstructor (this, java.awt.Dimension, []);
4841 this.width = width;
4842 this.height = height;
4843 }, "~N,~N");
4844 Clazz_overrideMethod (c$, "getWidth", 
4845 function () {
4846 return this.width;
4847 });
4848 Clazz_overrideMethod (c$, "getHeight", 
4849 function () {
4850 return this.height;
4851 });
4852 Clazz_defineMethod (c$, "setSize", 
4853 function (width, height) {
4854 this.width = Clazz_doubleToInt (Math.ceil (width));
4855 this.height = Clazz_doubleToInt (Math.ceil (height));
4856 }, "~N,~N");
4857 Clazz_defineMethod (c$, "getSize", 
4858 function () {
4859 return  new java.awt.Dimension (this.width, this.height);
4860 });
4861 Clazz_defineMethod (c$, "setSize", 
4862 function (d) {
4863 this.setSize (d.width, d.height);
4864 }, "java.awt.Dimension");
4865 Clazz_defineMethod (c$, "setSize", 
4866 function (width, height) {
4867 this.width = width;
4868 this.height = height;
4869 }, "~N,~N");
4870 Clazz_overrideMethod (c$, "equals", 
4871 function (obj) {
4872 if (Clazz_instanceOf (obj, java.awt.Dimension)) {
4873 var d = obj;
4874 return (this.width == d.width) && (this.height == d.height);
4875 }return false;
4876 }, "~O");
4877 Clazz_overrideMethod (c$, "hashCode", 
4878 function () {
4879 var sum = this.width + this.height;
4880 return Clazz_doubleToInt (sum * (sum + 1) / 2) + this.width;
4881 });
4882 Clazz_overrideMethod (c$, "toString", 
4883 function () {
4884 return this.getClass ().getName () + "[width=" + this.width + ",height=" + this.height + "]";
4885 });
4886 });
4887 Clazz_declarePackage ("java.awt.geom");
4888 Clazz_load (null, "java.awt.geom.Dimension2D", ["java.lang.InternalError"], function () {
4889 c$ = Clazz_declareType (java.awt.geom, "Dimension2D", null, Cloneable);
4890 Clazz_makeConstructor (c$, 
4891 function () {
4892 });
4893 Clazz_defineMethod (c$, "setSize", 
4894 function (d) {
4895 this.setSize (d.getWidth (), d.getHeight ());
4896 }, "java.awt.geom.Dimension2D");
4897 Clazz_defineMethod (c$, "clone", 
4898 function () {
4899 try {
4900 return Clazz_superCall (this, java.awt.geom.Dimension2D, "clone", []);
4901 } catch (e) {
4902 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
4903 throw  new InternalError ();
4904 } else {
4905 throw e;
4906 }
4907 }
4908 });
4909 });
4910 Clazz_declarePackage ("java.awt");
4911 Clazz_load (["java.awt.Container"], "java.awt.Panel", ["java.awt.FlowLayout"], function () {
4912 c$ = Clazz_declareType (java.awt, "Panel", java.awt.Container);
4913 Clazz_makeConstructor (c$, 
4914 function () {
4915 Clazz_superConstructor (this, java.awt.Panel, []);
4916 this.setPanel ();
4917 });
4918 Clazz_defineMethod (c$, "setPanel", 
4919 function () {
4920 this.setAppContext ();
4921 this.setLayout ( new java.awt.FlowLayout ());
4922 });
4923 Clazz_makeConstructor (c$, 
4924 function (layout) {
4925 Clazz_superConstructor (this, java.awt.Panel, []);
4926 if (layout == null) layout =  new java.awt.FlowLayout ();
4927 this.setAppContext ();
4928 this.setLayout (layout);
4929 }, "java.awt.LayoutManager");
4930 Clazz_overrideMethod (c$, "constructComponentName", 
4931 function () {
4932 {
4933 return "panel" + java.awt.Panel.nameCounter++;
4934 }});
4935 Clazz_defineMethod (c$, "addNotify", 
4936 function () {
4937 if (this.peer == null) this.peer = this.getToolkit ().createPanel (this);
4938 Clazz_superCall (this, java.awt.Panel, "addNotify", []);
4939 });
4940 Clazz_defineStatics (c$,
4941 "base", "panel",
4942 "nameCounter", 0);
4943 });
4944 Clazz_load(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){
4945 c$=Clazz_decorateAsClass(function(){
4946 this.firstIndex=0;
4947 this.lastIndex=0;
4948 this.array=null;
4949 Clazz_instantialize(this,arguments);
4950 },java.util,"ArrayList",java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);
4951
4952 Clazz_overrideConstructor(c$,
4953 function(){
4954 this.setup(0);
4955 });
4956
4957 Clazz_defineMethod(c$, "setup",
4958 function(capacity){
4959 //Clazz_superConstructor(this,java.util.ArrayList,[]);
4960 this.firstIndex=this.lastIndex=0;
4961 try{
4962 this.array=this.newElementArray(capacity);
4963 }catch(e){
4964 if(Clazz_instanceOf(e,NegativeArraySizeException)){
4965 throw new IllegalArgumentException();
4966 }else{
4967 throw e;
4968 }
4969 }
4970 },"~N");
4971 /*
4972 Clazz_makeConstructor(c$,
4973 function(collection){
4974 Clazz_superConstructor(this,java.util.ArrayList,[]);
4975 var size=collection.size();
4976 this.firstIndex=this.lastIndex=0;
4977 this.array=this.newElementArray(size+(Math.floor(size/10)));
4978 this.addAll(collection);
4979 },"java.util.Collection");
4980
4981 */
4982
4983 Clazz_defineMethod(c$,"newElementArray",
4984 ($fz=function(size){
4985 return new Array(size);
4986 },$fz.isPrivate=true,$fz),"~N");
4987
4988 Clazz_overrideMethod(c$,"add",
4989 function(location,object){
4990
4991 if (arguments.length == 1) {
4992         // coming from Java methods, e.g. Collections.list()
4993         // location is actually the object
4994         return this.add1(location);
4995 }
4996 var size=this.size();
4997 if(0<location&&location<size){
4998 if(this.firstIndex==0&&this.lastIndex==this.array.length){
4999 this.growForInsert(location,1);
5000 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex==this.array.length){
5001 System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,location);
5002 }else{
5003 var index=location+this.firstIndex;
5004 System.arraycopy(this.array,index,this.array,index+1,size-location);
5005 this.lastIndex++;
5006 }this.array[location+this.firstIndex]=object;
5007 }else if(location==0){
5008 if(this.firstIndex==0){
5009 this.growAtFront(1);
5010 }this.array[--this.firstIndex]=object;
5011 }else if(location==size){
5012 if(this.lastIndex==this.array.length){
5013 this.growAtEnd(1);
5014 }this.array[this.lastIndex++]=object;
5015 }else{
5016 throw new IndexOutOfBoundsException();
5017 }this.modCount++;
5018 },"~N,~O");
5019
5020 Clazz_overrideMethod(c$,"add1",
5021 function(object){
5022 if(this.lastIndex==this.array.length){
5023 this.growAtEnd(1);
5024 }this.array[this.lastIndex++]=object;
5025 this.modCount++;
5026 return true;
5027 },"~O");
5028
5029 /* BH disallow addAll(int,List)
5030  * 
5031 Clazz_defineMethod(c$,"addAll",
5032 function(location,collection){
5033 var size=this.size();
5034 if(location<0||location>size){
5035 throw new IndexOutOfBoundsException();
5036 }var growSize=collection.size();
5037 if(0<location&&location<size){
5038 if(this.array.length-size<growSize){
5039 this.growForInsert(location,growSize);
5040 }else if((location<Math.floor(size/2)&&this.firstIndex>0)||this.lastIndex>this.array.length-growSize){
5041 var newFirst=this.firstIndex-growSize;
5042 if(newFirst<0){
5043 var index=location+this.firstIndex;
5044 System.arraycopy(this.array,index,this.array,index-newFirst,size-location);
5045 this.lastIndex-=newFirst;
5046 newFirst=0;
5047 }System.arraycopy(this.array,this.firstIndex,this.array,newFirst,location);
5048 this.firstIndex=newFirst;
5049 }else{
5050 var index=location+this.firstIndex;
5051 System.arraycopy(this.array,index,this.array,index+growSize,size-location);
5052 this.lastIndex+=growSize;
5053 }}else if(location==0){
5054 this.growAtFront(growSize);
5055 this.firstIndex-=growSize;
5056 }else if(location==size){
5057 if(this.lastIndex>this.array.length-growSize){
5058 this.growAtEnd(growSize);
5059 }this.lastIndex+=growSize;
5060 }if(growSize>0){
5061 var it=collection.iterator();
5062 var index=location+this.firstIndex;
5063 var end=index+growSize;
5064 while(index<end){
5065 this.array[index++]=it.next();
5066 }
5067 this.modCount++;
5068 return true;
5069 }return false;
5070 },"~N,java.util.Collection");
5071
5072  */
5073
5074 Clazz_overrideMethod(c$,"addAll",
5075 function(collection){
5076 var growSize=collection.size();
5077 if(growSize>0){
5078         if(this.lastIndex>this.array.length-growSize){
5079                 this.growAtEnd(growSize);
5080 }
5081 var it=collection.iterator();
5082 var end=this.lastIndex+growSize;
5083 while(this.lastIndex<end){
5084         this.array[this.lastIndex++]=it.next();
5085 }
5086 this.modCount++;
5087 return true;
5088 }return false;
5089 },"java.util.Collection");
5090
5091 Clazz_overrideMethod(c$,"clear",
5092 function(){
5093 if(this.firstIndex!=this.lastIndex){
5094 this.fill(this.firstIndex,this.lastIndex);
5095 this.firstIndex=this.lastIndex=0;
5096 this.modCount++;
5097 }});
5098
5099 Clazz_defineMethod(c$,"fill", function(i1, i2) { // BH
5100 for (var i = i2; --i >= i1;)
5101 this.array[i] = null;
5102 },"~N,~N");
5103
5104 Clazz_defineMethod(c$,"clone",
5105 function(){
5106 try{
5107 var newList=Clazz_superCall(this,java.util.ArrayList,"clone",[]);
5108 newList.array=this.array.clone();
5109 return newList;
5110 }catch(e){
5111 if(Clazz_instanceOf(e,CloneNotSupportedException)){
5112 return null;
5113 }else{
5114 throw e;
5115 }
5116 }
5117 });
5118 Clazz_overrideMethod(c$,"contains",
5119 function(object){
5120 if(object!=null){
5121 for(var i=this.firstIndex;i<this.lastIndex;i++){
5122 if(object.equals(this.array[i])){
5123 return true;
5124 }}
5125 }else{
5126 for(var i=this.firstIndex;i<this.lastIndex;i++){
5127 if(this.array[i]==null){
5128 return true;
5129 }}
5130 }return false;
5131 },"~O");
5132 Clazz_defineMethod(c$,"ensureCapacity",
5133 function(minimumCapacity){
5134 if(this.array.length<minimumCapacity){
5135 if(this.firstIndex>0){
5136 this.growAtFront(minimumCapacity-this.array.length);
5137 }else{
5138 this.growAtEnd(minimumCapacity-this.array.length);
5139 }}},"~N");
5140 Clazz_overrideMethod(c$,"get",
5141 function(location){
5142 if(0<=location&&location<this.size()){
5143 return this.array[this.firstIndex+location];
5144 }throw new IndexOutOfBoundsException();
5145 },"~N");
5146
5147
5148 Clazz_defineMethod(c$,"growAtEnd",
5149 ($fz=function(required){
5150 var size=this.size();
5151 if(this.firstIndex>=required-(this.array.length-this.lastIndex)){
5152         var newLast=this.lastIndex-this.firstIndex;
5153         if(size>0){
5154                 System.arraycopy(this.array,this.firstIndex,this.array,0,size);
5155                 var start=newLast<this.firstIndex?this.firstIndex:newLast;
5156                 this.fill(start,this.array.length);
5157         }
5158         this.firstIndex=0;
5159         this.lastIndex=newLast;
5160 }else{
5161         var increment=Math.floor(size/2);
5162         if(required>increment){
5163                 increment=required;
5164         }
5165         if(increment<12){
5166                 increment=12;
5167         }
5168         var newArray=this.newElementArray(size+increment);
5169         if(size>0){
5170                 System.arraycopy(this.array,this.firstIndex,newArray,this.firstIndex,size);
5171         }
5172         this.array=newArray;
5173 }
5174
5175 },$fz.isPrivate=true,$fz),"~N");
5176 Clazz_defineMethod(c$,"growAtFront",
5177 ($fz=function(required){
5178 var size=this.size();
5179 if(this.array.length-this.lastIndex>=required){
5180 var newFirst=this.array.length-size;
5181 if(size>0){
5182 System.arraycopy(this.array,this.firstIndex,this.array,newFirst,size);
5183 var length=this.firstIndex+size>newFirst?newFirst:this.firstIndex+size;
5184 this.fill(this.firstIndex,length);
5185 }this.firstIndex=newFirst;
5186 this.lastIndex=this.array.length;
5187 }else{
5188 var increment=Math.floor(size/2);
5189 if(required>increment){
5190 increment=required;
5191 }if(increment<12){
5192 increment=12;
5193 }var newArray=this.newElementArray(size+increment);
5194 if(size>0){
5195 System.arraycopy(this.array,this.firstIndex,newArray,newArray.length-size,size);
5196 }this.firstIndex=newArray.length-size;
5197 this.lastIndex=newArray.length;
5198 this.array=newArray;
5199 }},$fz.isPrivate=true,$fz),"~N");
5200 Clazz_defineMethod(c$,"growForInsert",
5201 ($fz=function(location,required){
5202 var size=this.size();
5203 var increment=Math.floor(size/2);
5204 if(required>increment){
5205 increment=required;
5206 }if(increment<12){
5207 increment=12;
5208 }var newArray=this.newElementArray(size+increment);
5209 if(location<Math.floor(size/2)){
5210 var newFirst=newArray.length-(size+required);
5211 System.arraycopy(this.array,location,newArray,location+increment,size-location);
5212 System.arraycopy(this.array,this.firstIndex,newArray,newFirst,location);
5213 this.firstIndex=newFirst;
5214 this.lastIndex=newArray.length;
5215 }else{
5216 System.arraycopy(this.array,this.firstIndex,newArray,0,location);
5217 System.arraycopy(this.array,location,newArray,location+required,size-location);
5218 this.firstIndex=0;
5219 this.lastIndex+=required;
5220 }this.array=newArray;
5221 },$fz.isPrivate=true,$fz),"~N,~N");
5222 Clazz_overrideMethod(c$,"indexOf",
5223 function(object){
5224 if(object!=null){
5225 for(var i=this.firstIndex;i<this.lastIndex;i++){
5226 if(object.equals(this.array[i])){
5227 return i-this.firstIndex;
5228 }}
5229 }else{
5230 for(var i=this.firstIndex;i<this.lastIndex;i++){
5231 if(this.array[i]==null){
5232 return i-this.firstIndex;
5233 }}
5234 }return-1;
5235 },"~O");
5236 Clazz_overrideMethod(c$,"isEmpty",
5237 function(){
5238 return this.lastIndex==this.firstIndex;
5239 });
5240 Clazz_overrideMethod(c$,"lastIndexOf",
5241 function(object){
5242 if(object!=null){
5243 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5244 if(object.equals(this.array[i])){
5245 return i-this.firstIndex;
5246 }}
5247 }else{
5248 for(var i=this.lastIndex-1;i>=this.firstIndex;i--){
5249 if(this.array[i]==null){
5250 return i-this.firstIndex;
5251 }}
5252 }return-1;
5253 },"~O");
5254 Clazz_overrideMethod(c$,"remove",
5255 function(location){
5256 var result;
5257 var size=this.size();
5258 if(0<=location&&location<size){
5259 if(location==size-1){
5260 result=this.array[--this.lastIndex];
5261 this.array[this.lastIndex]=null;
5262 }else if(location==0){
5263 result=this.array[this.firstIndex];
5264 this.array[this.firstIndex++]=null;
5265 }else{
5266 var elementIndex=this.firstIndex+location;
5267 result=this.array[elementIndex];
5268 if(location<Math.floor(size/2)){
5269 System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,location);
5270 this.array[this.firstIndex++]=null;
5271 }else{
5272 System.arraycopy(this.array,elementIndex+1,this.array,elementIndex,size-location-1);
5273 this.array[--this.lastIndex]=null;
5274 }}}else{
5275 throw new IndexOutOfBoundsException();
5276 }this.modCount++;
5277 return result;
5278 },"~N"); 
5279
5280 Clazz_defineMethod(c$, "removeObject", function(o) {
5281         var i = this.indexOf(o);
5282         if (i < 0)return null;
5283         return this.remove(i);
5284 }, "~O");
5285
5286 Clazz_overrideMethod(c$,"removeRange",
5287 function(start,end){
5288 if(start>=0&&start<=end&&end<=this.size()){
5289 if(start==end){
5290 return;
5291 }var size=this.size();
5292 if(end==size){
5293         this.fill(this.firstIndex+start,this.lastIndex);
5294 this.lastIndex=this.firstIndex+start;
5295 }else if(start==0){
5296         this.fill(this.firstIndex,this.firstIndex+end);
5297 this.firstIndex+=end;
5298 }else{
5299 System.arraycopy(this.array,this.firstIndex+end,this.array,this.firstIndex+start,size-end);
5300 var newLast=this.lastIndex+start-end;
5301 this.fill(newLast,this.lastIndex);
5302 this.lastIndex=newLast;
5303 }this.modCount++;
5304 }else{
5305 throw new IndexOutOfBoundsException();
5306 }},"~N,~N");
5307 Clazz_overrideMethod(c$,"set",
5308 function(location,object){
5309 if(0<=location&&location<this.size()){
5310 var result=this.array[this.firstIndex+location];
5311 this.array[this.firstIndex+location]=object;
5312 return result;
5313 }throw new IndexOutOfBoundsException();
5314 },"~N,~O");
5315 Clazz_overrideMethod(c$,"size",
5316 function(){
5317 return this.lastIndex-this.firstIndex;
5318 });
5319 /*
5320 Clazz_defineMethod(c$,"toArray",
5321 function(){
5322 var size=this.size();
5323 var result=new Array(size);
5324 System.arraycopy(this.array,this.firstIndex,result,0,size);
5325 return result;
5326 });
5327 */
5328
5329 Clazz_overrideMethod(c$,"toArray",
5330 function(contents){
5331 var size=this.size();
5332 if(!contents || size>contents.length)
5333         contents= new Array(size);
5334 System.arraycopy(this.array,this.firstIndex,contents,0,size);
5335 if(size<contents.length){
5336 contents[size]=null;
5337 }return contents;
5338 },"~O");
5339 Clazz_defineMethod(c$,"trimToSize",
5340 function(){
5341 var size=this.size();
5342 var newArray=this.newElementArray(size);
5343 System.arraycopy(this.array,this.firstIndex,newArray,0,size);
5344 this.array=newArray;
5345 this.firstIndex=0;
5346 this.lastIndex=this.array.length;
5347 });
5348 });
5349 // BH 8/25/2014 1:10:59 AM  - removed indirect access/inner class business.
5350
5351 Clazz_load(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess","$.NoSuchElementException"],"java.util.AbstractList",["java.lang.IllegalArgumentException","$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){
5352 c$=Clazz_decorateAsClass(function(){
5353 this.modCount=0;
5354
5355
5356
5357 //if(!Clazz_isClassDefined("java.util.AbstractList.SimpleListIterator")){
5358 //java.util.AbstractList.$AbstractList$SimpleListIterator$();
5359 //}
5360 //if(!Clazz_isClassDefined("java.util.AbstractList.FullListIterator")){
5361 //java.util.AbstractList.$AbstractList$FullListIterator$();
5362 //}
5363
5364
5365
5366 Clazz_instantialize(this,arguments);
5367 },java.util,"AbstractList",java.util.AbstractCollection,java.util.List);
5368 Clazz_defineMethod(c$,"add",
5369 function(location,object){
5370 throw new UnsupportedOperationException();
5371 },"~N,~O");
5372 Clazz_defineMethod(c$,"add",
5373 function(object){
5374 this.add(this.size(),object);
5375 return true;
5376 },"~O");
5377 Clazz_defineMethod(c$,"addAll",
5378 function(location,collection){
5379 var it=collection.iterator();
5380 while(it.hasNext()){
5381 this.add(location++,it.next());
5382 }
5383 return!collection.isEmpty();
5384 },"~N,java.util.Collection");
5385 Clazz_overrideMethod(c$,"clear",
5386 function(){
5387 this.removeRange(0,this.size());
5388 });
5389 Clazz_overrideMethod(c$,"equals",
5390 function(object){
5391 if(this===object){
5392 return true;
5393 }if(Clazz_instanceOf(object,java.util.List)){
5394 var list=object;
5395 if(list.size()!=this.size()){
5396 return false;
5397 }var it1=this.iterator();
5398 var it2=list.iterator();
5399 while(it1.hasNext()){
5400 var e1=it1.next();
5401 var e2=it2.next();
5402 if(!(e1==null?e2==null:e1.equals(e2))){
5403 return false;
5404 }}
5405 return true;
5406 }return false;
5407 },"~O");
5408 Clazz_overrideMethod(c$,"hashCode",
5409 function(){
5410 var result=1;
5411 var it=this.iterator();
5412 while(it.hasNext()){
5413 var object=it.next();
5414 result=(31*result)+(object==null?0:object.hashCode());
5415 }
5416 return result;
5417 });
5418 Clazz_overrideMethod(c$,"indexOf",
5419 function(object){
5420 var it=this.listIterator();
5421 if(object!=null){
5422 while(it.hasNext()){
5423 if(object.equals(it.next())){
5424 return it.previousIndex();
5425 }}
5426 }else{
5427 while(it.hasNext()){
5428 if(it.next()==null){
5429 return it.previousIndex();
5430 }}
5431 }return-1;
5432 },"~O");
5433 Clazz_overrideMethod(c$,"iterator",
5434 function(){
5435 return new java.util.AbstractListSimpleListIterator(this); // Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null);
5436 });
5437 Clazz_overrideMethod(c$,"lastIndexOf",
5438 function(object){
5439 var it=this.listIterator(this.size());
5440 if(object!=null){
5441 while(it.hasPrevious()){
5442 if(object.equals(it.previous())){
5443 return it.nextIndex();
5444 }}
5445 }else{
5446 while(it.hasPrevious()){
5447 if(it.previous()==null){
5448 return it.nextIndex();
5449 }}
5450 }return-1;
5451 },"~O");
5452 //Clazz_defineMethod(c$,"listIterator",
5453 //function(){
5454 //return this.listIterator(0);
5455 //});
5456 Clazz_defineMethod(c$,"listIterator",
5457 function(location){
5458 location || (location = 0);
5459 return new java.util.AbstractListFullListIterator(this, location);//Clazz_innerTypeInstance(java.util.AbstractList.FullListIterator,this,null,location);
5460 },"~N");
5461 Clazz_defineMethod(c$,"remove",
5462 function(location){
5463 throw new UnsupportedOperationException();
5464 },"~N");
5465 Clazz_defineMethod(c$,"removeRange",
5466 function(start,end){
5467 var it=this.listIterator(start);
5468 for(var i=start;i<end;i++){
5469 it.next();
5470 it.remove();
5471 }
5472 },"~N,~N");
5473 Clazz_overrideMethod(c$,"set",
5474 function(location,object){
5475 throw new UnsupportedOperationException();
5476 },"~N,~O");
5477 Clazz_overrideMethod(c$,"subList",
5478 function(start,end){
5479 if(0<=start&&end<=this.size()){
5480 if(start<=end){
5481 if(Clazz_instanceOf(this,java.util.RandomAccess)){
5482 return new java.util.AbstractList.SubAbstractListRandomAccess(this,start,end);
5483 }return new java.util.AbstractList.SubAbstractList(this,start,end);
5484 }throw new IllegalArgumentException();
5485 }throw new IndexOutOfBoundsException();
5486 },"~N,~N");
5487
5488
5489
5490 //c$.$AbstractList$SimpleListIterator$=function(){
5491
5492 Clazz_pu$h(self.c$);
5493
5494 c$=Clazz_decorateAsClass(function(){
5495 //Clazz_prepareCallback(this,arguments);
5496 this.pos=-1;
5497 this.expectedModCount=0;
5498 this.lastPosition=-1;
5499 Clazz_instantialize(this,arguments);
5500 },java.util,"AbstractListSimpleListIterator",null,java.util.Iterator);
5501
5502
5503 Clazz_makeConstructor(c$,
5504 function(a){
5505 this._list = a;
5506 this.expectedModCount=a.modCount;
5507 }, "java.util.AbstractList");
5508
5509 Clazz_overrideMethod(c$,"hasNext",
5510 function(){
5511 return this.pos+1<this._list.size();
5512 });
5513 Clazz_overrideMethod(c$,"next",
5514 function(){
5515 if(this.expectedModCount==this._list.modCount){
5516 try{
5517 var a=this._list.get(this.pos+1);
5518 this.lastPosition=++this.pos;
5519 return a;
5520 }catch(e){
5521 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5522 throw new java.util.NoSuchElementException();
5523 }else{
5524 throw e;
5525 }
5526 }
5527 }throw new java.util.ConcurrentModificationException();
5528 });
5529 Clazz_overrideMethod(c$,"remove",
5530 function(){
5531 if(this.expectedModCount==this._list.modCount){
5532 try{
5533 this._list.remove(this.lastPosition);
5534 }catch(e){
5535 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5536 throw new IllegalStateException();
5537 }else{
5538 throw e;
5539 }
5540 }
5541 if(this._list.modCount!=this.expectedModCount){
5542 this.expectedModCount++;
5543 }if(this.pos==this.lastPosition){
5544 this.pos--;
5545 }this.lastPosition=-1;
5546 }else{
5547 throw new java.util.ConcurrentModificationException();
5548 }});
5549
5550 c$=Clazz_p0p();
5551 //};
5552
5553
5554 //c$.$AbstractList$FullListIterator$=function(){
5555 Clazz_pu$h(self.c$);
5556 c$=Clazz_decorateAsClass(function(){
5557 //Clazz_prepareCallback(this,arguments);
5558 Clazz_instantialize(this,arguments);
5559 },java.util,"AbstractListFullListIterator",java.util.AbstractListSimpleListIterator,java.util.ListIterator);
5560
5561 //,Clazz_innerTypeInstance(java.util.AbstractList.SimpleListIterator,this,null,Clazz_inheritArgs));
5562
5563 Clazz_makeConstructor(c$,
5564 function(a,b){
5565 Clazz_superConstructor(this,java.util.AbstractListFullListIterator,[a]);
5566 if(0<=b&&b<=this._list.size()){
5567 this.pos=b-1;
5568 }else{
5569 throw new IndexOutOfBoundsException();
5570 }},"java.util.AbstractList,~N");
5571 Clazz_overrideMethod(c$,"add",
5572 function(a){
5573 if(this.expectedModCount==this._list.modCount){
5574 try{
5575 this._list.add(this.pos+1,a);
5576 }catch(e){
5577 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5578 throw new java.util.NoSuchElementException();
5579 }else{
5580 throw e;
5581 }
5582 }
5583 this.pos++;
5584 this.lastPosition=-1;
5585 if(this._list.modCount!=this.expectedModCount){
5586 this.expectedModCount++;
5587 }}else{
5588 throw new java.util.ConcurrentModificationException();
5589 }},"~O");
5590 Clazz_overrideMethod(c$,"hasPrevious",
5591 function(){
5592 return this.pos>=0;
5593 });
5594 Clazz_overrideMethod(c$,"nextIndex",
5595 function(){
5596 return this.pos+1;
5597 });
5598 Clazz_overrideMethod(c$,"previous",
5599 function(){
5600 if(this.expectedModCount==this._list.modCount){
5601 try{
5602 var a=this._list.get(this.pos);
5603 this.lastPosition=this.pos;
5604 this.pos--;
5605 return a;
5606 }catch(e){
5607 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5608 throw new java.util.NoSuchElementException();
5609 }else{
5610 throw e;
5611 }
5612 }
5613 }throw new java.util.ConcurrentModificationException();
5614 });
5615 Clazz_overrideMethod(c$,"previousIndex",
5616 function(){
5617 return this.pos;
5618 });
5619 Clazz_overrideMethod(c$,"set",
5620 function(a){
5621 if(this.expectedModCount==this._list.modCount){
5622 try{
5623 this._list.set(this.lastPosition,a);
5624 }catch(e){
5625 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
5626 throw new IllegalStateException();
5627 }else{
5628 throw e;
5629 }
5630 }
5631 }else{
5632 throw new java.util.ConcurrentModificationException();
5633 }},"~O");
5634 c$=Clazz_p0p();
5635 //};
5636
5637
5638
5639
5640 Clazz_pu$h(self.c$);
5641 c$=Clazz_declareType(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);
5642 c$=Clazz_p0p();
5643
5644
5645
5646
5647 Clazz_pu$h(self.c$);
5648 c$=Clazz_decorateAsClass(function(){
5649 this.fullList=null;
5650 this.offset=0;
5651 this.$size=0;
5652 Clazz_instantialize(this,arguments);
5653 },java.util.AbstractList,"SubAbstractList",java.util.AbstractList);
5654 Clazz_makeConstructor(c$,
5655 function(a,b,c){
5656 Clazz_superConstructor(this,java.util.AbstractList.SubAbstractList);
5657 this.fullList=a;
5658 this.modCount=this.fullList.modCount;
5659 this.offset=b;
5660 this.$size=c-b;
5661 },"java.util.AbstractList,~N,~N");
5662 Clazz_defineMethod(c$,"add",
5663 function(a,b){
5664 if(this.modCount==this.fullList.modCount){
5665 if(0<=a&&a<=this.$size){
5666 this.fullList.add(a+this.offset,b);
5667 this.$size++;
5668 this.modCount=this.fullList.modCount;
5669 }else{
5670 throw new IndexOutOfBoundsException();
5671 }}else{
5672 throw new java.util.ConcurrentModificationException();
5673 }},"~N,~O");
5674 Clazz_defineMethod(c$,"addAll",
5675 function(a,b){
5676 if(this.modCount==this.fullList.modCount){
5677 if(0<=a&&a<=this.$size){
5678 var c=this.fullList.addAll(a+this.offset,b);
5679 if(c){
5680 this.$size+=b.size();
5681 this.modCount=this.fullList.modCount;
5682 }return c;
5683 }throw new IndexOutOfBoundsException();
5684 }throw new java.util.ConcurrentModificationException();
5685 },"~N,java.util.Collection");
5686 Clazz_defineMethod(c$,"addAll",
5687 function(a){
5688 if(this.modCount==this.fullList.modCount){
5689 var b=this.fullList.addAll(this.offset+this.$size,a);
5690 if(b){
5691 this.$size+=a.size();
5692 this.modCount=this.fullList.modCount;
5693 }return b;
5694 }throw new java.util.ConcurrentModificationException();
5695 },"java.util.Collection");
5696 Clazz_defineMethod(c$,"get",
5697 function(a){
5698 if(this.modCount==this.fullList.modCount){
5699 if(0<=a&&a<this.$size){
5700 return this.fullList.get(a+this.offset);
5701 }throw new IndexOutOfBoundsException();
5702 }throw new java.util.ConcurrentModificationException();
5703 },"~N");
5704 Clazz_overrideMethod(c$,"iterator",
5705 function(){
5706 return this.listIterator(0);
5707 });
5708 Clazz_defineMethod(c$,"listIterator",
5709 function(a){
5710 if(this.modCount==this.fullList.modCount){
5711 if(0<=a&&a<=this.$size){
5712 return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);
5713 }throw new IndexOutOfBoundsException();
5714 }throw new java.util.ConcurrentModificationException();
5715 },"~N");
5716 Clazz_defineMethod(c$,"remove",
5717 function(a){
5718 if(this.modCount==this.fullList.modCount){
5719 if(0<=a&&a<this.$size){
5720 var b=this.fullList.remove(a+this.offset);
5721 this.$size--;
5722 this.modCount=this.fullList.modCount;
5723 return b;
5724 }throw new IndexOutOfBoundsException();
5725 }throw new java.util.ConcurrentModificationException();
5726 },"~N");
5727 Clazz_defineMethod(c$,"removeRange",
5728 function(a,b){
5729 if(a!=b){
5730 if(this.modCount==this.fullList.modCount){
5731 this.fullList.removeRange(a+this.offset,b+this.offset);
5732 this.$size-=b-a;
5733 this.modCount=this.fullList.modCount;
5734 }else{
5735 throw new java.util.ConcurrentModificationException();
5736 }}},"~N,~N");
5737 Clazz_defineMethod(c$,"set",
5738 function(a,b){
5739 if(this.modCount==this.fullList.modCount){
5740 if(0<=a&&a<this.$size){
5741 return this.fullList.set(a+this.offset,b);
5742 }throw new IndexOutOfBoundsException();
5743 }throw new java.util.ConcurrentModificationException();
5744 },"~N,~O");
5745 Clazz_overrideMethod(c$,"size",
5746 function(){
5747 return this.$size;
5748 });
5749 Clazz_defineMethod(c$,"sizeChanged",
5750 function(a){
5751 if(a){
5752 this.$size++;
5753 }else{
5754 this.$size--;
5755 }this.modCount=this.fullList.modCount;
5756 },"~B");
5757 Clazz_pu$h(self.c$);
5758 c$=Clazz_decorateAsClass(function(){
5759 this.subList=null;
5760 this.iterator=null;
5761 this.start=0;
5762 this.end=0;
5763 Clazz_instantialize(this,arguments);
5764 },java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);
5765 Clazz_makeConstructor(c$,
5766 function(a,b,c,d){
5767 this.iterator=a;
5768 this.subList=b;
5769 this.start=c;
5770 this.end=this.start+d;
5771 },"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");
5772 Clazz_defineMethod(c$,"add",
5773 function(a){
5774 this.iterator.add(a);
5775 this.subList.sizeChanged(true);
5776 this.end++;
5777 },"~O");
5778 Clazz_overrideMethod(c$,"hasNext",
5779 function(){
5780 return this.iterator.nextIndex()<this.end;
5781 });
5782 Clazz_overrideMethod(c$,"hasPrevious",
5783 function(){
5784 return this.iterator.previousIndex()>=this.start;
5785 });
5786 Clazz_defineMethod(c$,"next",
5787 function(){
5788 if(this.iterator.nextIndex()<this.end){
5789 return this.iterator.next();
5790 }throw new java.util.NoSuchElementException();
5791 });
5792 Clazz_defineMethod(c$,"nextIndex",
5793 function(){
5794 return this.iterator.nextIndex()-this.start;
5795 });
5796 Clazz_defineMethod(c$,"previous",
5797 function(){
5798 if(this.iterator.previousIndex()>=this.start){
5799 return this.iterator.previous();
5800 }throw new java.util.NoSuchElementException();
5801 });
5802 Clazz_defineMethod(c$,"previousIndex",
5803 function(){
5804 var a=this.iterator.previousIndex();
5805 if(a>=this.start){
5806 return a-this.start;
5807 }return-1;
5808 });
5809 Clazz_defineMethod(c$,"remove",
5810 function(){
5811 this.iterator.remove();
5812 this.subList.sizeChanged(false);
5813 this.end--;
5814 });
5815 Clazz_defineMethod(c$,"set",
5816 function(a){
5817 this.iterator.set(a);
5818 },"~O");
5819 c$=Clazz_p0p();
5820 c$=Clazz_p0p();
5821 });
5822 // 4/23/2015 1:20:24 PM BH removing need for array.getClass().getComponentType()
5823
5824 Clazz_load(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],function(){
5825 c$=Clazz_declareType(java.util,"AbstractCollection",null,java.util.Collection);
5826 Clazz_makeConstructor(c$,
5827 function(){
5828 });
5829 Clazz_overrideMethod(c$,"add",
5830 function(object){
5831 throw new UnsupportedOperationException();
5832 },"~O");
5833 Clazz_overrideMethod(c$,"addAll",
5834 function(collection){
5835 var result=false;
5836 var it=collection.iterator();
5837 while(it.hasNext()){
5838 if(this.add(it.next())){
5839 result=true;
5840 }}
5841 return result;
5842 },"java.util.Collection");
5843 Clazz_overrideMethod(c$,"clear",
5844 function(){
5845 var it=this.iterator();
5846 while(it.hasNext()){
5847 it.next();
5848 it.remove();
5849 }
5850 });
5851 Clazz_overrideMethod(c$,"contains",
5852 function(object){
5853 var it=this.iterator();
5854 if(object!=null){
5855 while(it.hasNext()){
5856 if(object.equals(it.next())){
5857 return true;
5858 }}
5859 }else{
5860 while(it.hasNext()){
5861 if(it.next()==null){
5862 return true;
5863 }}
5864 }return false;
5865 },"~O");
5866 Clazz_overrideMethod(c$,"containsAll",
5867 function(collection){
5868 var it=collection.iterator();
5869 while(it.hasNext()){
5870 if(!this.contains(it.next())){
5871 return false;
5872 }}
5873 return true;
5874 },"java.util.Collection");
5875 Clazz_overrideMethod(c$,"isEmpty",
5876 function(){
5877 return this.size()==0;
5878 });
5879 Clazz_overrideMethod(c$,"remove",
5880 function(object){
5881 var it=this.iterator();
5882 if(object!=null){
5883 while(it.hasNext()){
5884 if(object.equals(it.next())){
5885 it.remove();
5886 return true;
5887 }}
5888 }else{
5889 while(it.hasNext()){
5890 if(it.next()==null){
5891 it.remove();
5892 return true;
5893 }}
5894 }return false;
5895 },"~O");
5896 Clazz_overrideMethod(c$,"removeAll",
5897 function(collection){
5898 var result=false;
5899 var it=this.iterator();
5900 while(it.hasNext()){
5901 if(collection.contains(it.next())){
5902 it.remove();
5903 result=true;
5904 }}
5905 return result;
5906 },"java.util.Collection");
5907 Clazz_overrideMethod(c$,"retainAll",
5908 function(collection){
5909 var result=false;
5910 var it=this.iterator();
5911 while(it.hasNext()){
5912 if(!collection.contains(it.next())){
5913 it.remove();
5914 result=true;
5915 }}
5916 return result;
5917 },"java.util.Collection");
5918 Clazz_defineMethod(c$,"toArray",
5919 function(){
5920 var size=this.size();
5921 var index=0;
5922 var it=this.iterator();
5923 var array=new Array(size);
5924 while(index<size){
5925 array[index++]=it.next();
5926 }
5927 return array;
5928 });
5929 Clazz_defineMethod(c$,"toArray",
5930 function(contents){
5931 var size=this.size();
5932 var index=0;
5933 // if(size>contents.length){  // BH unnec
5934 //var ct=contents.getClass().getComponentType();
5935 //contents=java.lang.reflect.Array.newInstance(ct,size);
5936 //}
5937 for(var entry,$entry=this.iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
5938 contents[index++]=entry;
5939 }
5940 if(index<contents.length){
5941 contents[index]=null;
5942 }return contents;
5943 },"~A");
5944 Clazz_overrideMethod(c$,"toString",
5945 function(){
5946 if(this.isEmpty()){
5947 return"[]";
5948 }var buffer=new StringBuilder(this.size()*16);
5949 buffer.append('[');
5950 var it=this.iterator();
5951 while(it.hasNext()){
5952 var next=it.next();
5953 if(next!==this){
5954 buffer.append(next);
5955 }else{
5956 buffer.append("(this Collection)");
5957 }if(it.hasNext()){
5958 buffer.append(", ");
5959 }}
5960 buffer.append(']');
5961 return buffer.toString();
5962 });
5963 });
5964 Clazz_declarePackage ("java.awt");
5965 Clazz_load (null, "java.awt.ComponentOrientation", ["java.util.Locale"], function () {
5966 c$ = Clazz_decorateAsClass (function () {
5967 this.orientation = 0;
5968 Clazz_instantialize (this, arguments);
5969 }, java.awt, "ComponentOrientation");
5970 Clazz_defineMethod (c$, "isHorizontal", 
5971 function () {
5972 return (this.orientation & 2) != 0;
5973 });
5974 Clazz_defineMethod (c$, "isLeftToRight", 
5975 function () {
5976 return (this.orientation & 4) != 0;
5977 });
5978 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
5979 function (locale) {
5980 var lang = locale.getLanguage ();
5981 if ("iw".equals (lang) || "ar".equals (lang) || "fa".equals (lang) || "ur".equals (lang)) {
5982 return java.awt.ComponentOrientation.RIGHT_TO_LEFT;
5983 } else {
5984 return java.awt.ComponentOrientation.LEFT_TO_RIGHT;
5985 }}, "java.util.Locale");
5986 c$.getOrientation = Clazz_defineMethod (c$, "getOrientation", 
5987 function (bdl) {
5988 var result = null;
5989 try {
5990 result = bdl.getObject ("Orientation");
5991 } catch (e) {
5992 if (Clazz_exceptionOf (e, Exception)) {
5993 } else {
5994 throw e;
5995 }
5996 }
5997 if (result == null) {
5998 result = java.awt.ComponentOrientation.getOrientation (bdl.getLocale ());
5999 }if (result == null) {
6000 result = java.awt.ComponentOrientation.getOrientation (java.util.Locale.getDefault ());
6001 }return result;
6002 }, "java.util.ResourceBundle");
6003 Clazz_makeConstructor (c$, 
6004  function (value) {
6005 this.orientation = value;
6006 }, "~N");
6007 Clazz_defineStatics (c$,
6008 "UNK_BIT", 1,
6009 "HORIZ_BIT", 2,
6010 "LTR_BIT", 4);
6011 c$.LEFT_TO_RIGHT = c$.prototype.LEFT_TO_RIGHT =  new java.awt.ComponentOrientation (6);
6012 c$.RIGHT_TO_LEFT = c$.prototype.RIGHT_TO_LEFT =  new java.awt.ComponentOrientation (2);
6013 c$.UNKNOWN = c$.prototype.UNKNOWN =  new java.awt.ComponentOrientation (7);
6014 });
6015 Clazz_declarePackage ("java.security");
6016 Clazz_load (["java.security.AccessControlContext"], "java.security.AccessController", null, function () {
6017 c$ = Clazz_declareType (java.security, "AccessController", null, java.security.AccessControlContext);
6018 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6019 function (action) {
6020 return action.run ();
6021 }, "java.security.PrivilegedAction");
6022 c$.getContext = Clazz_defineMethod (c$, "getContext", 
6023 function () {
6024 return  new java.security.AccessController ();
6025 });
6026 Clazz_overrideMethod (c$, "checkPermission", 
6027 function (perm) {
6028 return true;
6029 }, "~O");
6030 c$.doPrivileged = Clazz_defineMethod (c$, "doPrivileged", 
6031 function (action, context) {
6032 return action.run ();
6033 }, "java.security.PrivilegedAction,java.security.AccessControlContext");
6034 });
6035 Clazz_declarePackage ("java.security");
6036 Clazz_declareInterface (java.security, "AccessControlContext");
6037 // BH minor efficiencies only
6038
6039 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(){
6040 c$=Clazz_decorateAsClass(function(){
6041 this.elementCount=0;
6042 this.elementData=null;
6043 this.loadFactor=0;
6044 this.threshold=0;
6045 this.modCount=0;
6046 Clazz_instantialize(this,arguments);
6047 },java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);
6048 Clazz_defineMethod(c$,"newElementArray",
6049 function(s){
6050 return new Array(s);
6051 },"~N");
6052 //Clazz_makeConstructor(c$,
6053 //function(){
6054 //this.construct(16);
6055 //});
6056 //Clazz_makeConstructor(c$,
6057 //function(capacity){
6058 //Clazz_superConstructor(this,java.util.HashMap,[]);
6059 //if(capacity>=0){
6060 //this.elementCount=0;
6061 //this.elementData=this.newElementArray(capacity==0?1:capacity);
6062 //this.loadFactor=0.75;
6063 //this.computeMaxSize();
6064 //}else{
6065 //throw new IllegalArgumentException();
6066 //}},"~N");
6067 Clazz_makeConstructor(c$,
6068 function(){
6069 this.construct(16);
6070 });
6071 Clazz_makeConstructor(c$,
6072 function(capacity){
6073 Clazz_superConstructor(this,java.util.HashMap,[]);
6074 if(capacity>=0){
6075 this.elementCount=0;
6076 this.elementData=this.newElementArray(capacity==0?1:capacity);
6077 this.loadFactor=0.75;
6078 this.computeMaxSize();
6079 }else{
6080 throw new IllegalArgumentException();
6081 }},"~N");
6082 Clazz_makeConstructor(c$,
6083 function(capacity,loadFactor){
6084 Clazz_superConstructor(this,java.util.HashMap,[]);
6085 if(capacity>=0&&loadFactor>0){
6086 this.elementCount=0;
6087 this.elementData=this.newElementArray(capacity==0?1:capacity);
6088 this.loadFactor=loadFactor;
6089 this.computeMaxSize();
6090 }else{
6091 throw new IllegalArgumentException();
6092 }},"~N,~N");
6093 Clazz_makeConstructor(c$,
6094 function(map){
6095 this.construct(map.size()<6?11:map.size()*2);
6096 Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6097 },"java.util.Map");
6098
6099
6100 /*
6101 Clazz_makeConstructor(c$,
6102 function(capacity,loadFactor){
6103 this.doConstruct(capacity,loadFactor);
6104 },"~N,~N");
6105
6106 Clazz_defineMethod(c$, "doConstruct",
6107 function(capacity,loadFactor) {
6108 capacity || (capacity = 16);
6109 loadFactor || (loadFactor = 0.75);
6110 if (typeof capacity != "number") {
6111  var map = capacity;
6112  this.loadFactor=loadFactor;
6113  this.elementData=this.newElementArray(map.size()<6?11:map.size()*2);
6114  this.computeMaxSize();
6115  this.putAllHM(map);
6116  return;
6117 }
6118
6119 //Clazz_superConstructor(this,java.util.HashMap,[]);
6120 if(capacity>=0&&loadFactor>0){
6121 this.elementData=this.newElementArray(capacity==0?1:capacity);
6122 this.loadFactor=loadFactor;
6123 this.computeMaxSize();
6124 }else{
6125 throw new IllegalArgumentException();
6126 }
6127 },"~N,~N");
6128
6129 //Clazz_makeConstructor(c$,
6130 //function(map){
6131 //this.construct(map.size()<6?11:map.size()*2);
6132 //Clazz_superCall(this,java.util.HashMap,"putAll",[map]);
6133 //},"java.util.Map");
6134
6135 */
6136 Clazz_overrideMethod(c$,"clear",
6137 function(){
6138 if(this.elementCount>0){
6139 this.elementCount=0;
6140 java.util.Arrays.fill(this.elementData,null);
6141 this.modCount++;
6142 }});
6143 Clazz_defineMethod(c$,"clone",
6144 function(){
6145   return this.cloneHM();
6146 });
6147
6148 Clazz_defineMethod(c$,"cloneHM",
6149 function(){
6150 try{
6151 var map=this.cloneAM();//Clazz_superCall(this,java.util.HashMap,"clone",[]);
6152 map.elementData=this.newElementArray(this.elementData.length);
6153 var entry;
6154 for(var i=0;i<this.elementData.length;i++){
6155 if((entry=this.elementData[i])!=null){
6156 map.elementData[i]=entry.clone();
6157 }}
6158 return map;
6159 }catch(e){
6160 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6161 return null;
6162 }else{
6163 throw e;
6164 }
6165 }
6166 });
6167
6168 Clazz_defineMethod(c$,"computeMaxSize",
6169 ($fz=function(){
6170 this.threshold=Math.round((this.elementData.length*this.loadFactor));
6171 },$fz.isPrivate=true,$fz));
6172 Clazz_overrideMethod(c$,"containsKey",
6173 function(key){
6174 return this.getEntry(key)!=null;
6175 },"~O");
6176 Clazz_defineMethod(c$,"keysEqual",
6177 function(k1,entry){
6178 var k1Hash=k1==null?0:k1.hashCode();
6179 if(k1Hash!=entry.origKeyHash){
6180 return false;
6181 }if(k1==null&&entry.key==null){
6182 return true;
6183 }return k1.equals(entry.key);
6184 },"~O,java.util.HashMap.Entry");
6185 Clazz_overrideMethod(c$,"containsValue",
6186 function(value){
6187 if(value!=null){
6188 for(var i=this.elementData.length;--i>=0;){
6189 var entry=this.elementData[i];
6190 while(entry!=null){
6191 if(value.equals(entry.value)){
6192 return true;
6193 }entry=entry.next;
6194 }
6195 }
6196 }else{
6197 for(var i=this.elementData.length;--i>=0;){
6198 var entry=this.elementData[i];
6199 while(entry!=null){
6200 if(entry.value==null){
6201 return true;
6202 }entry=entry.next;
6203 }
6204 }
6205 }return false;
6206 },"~O");
6207 Clazz_overrideMethod(c$,"entrySet",
6208 function(){
6209 return new java.util.HashMap.HashMapEntrySet(this);
6210 });
6211 Clazz_overrideMethod(c$,"get",
6212 function(key){
6213 var m=this.getEntry(key);
6214 if(m!=null){
6215 return m.value;
6216 }return null;
6217 },"~O");
6218 Clazz_defineMethod(c$,"getEntry",
6219 function(key){
6220 var index=this.getModuloHash(key);
6221 return this.findEntry(key,index);
6222 },"~O");
6223 Clazz_defineMethod(c$,"getModuloHash",
6224 function(key){
6225 if(key==null){
6226 return 0;
6227 }return(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6228 },"~O");
6229 Clazz_defineMethod(c$,"findEntry",
6230 function(key,index){
6231 var m;
6232 m=this.elementData[index];
6233 if(key!=null){
6234 while(m!=null&&!this.keysEqual(key,m)){
6235 m=m.next;
6236 }
6237 }else{
6238 while(m!=null&&m.key!=null){
6239 m=m.next;
6240 }
6241 }return m;
6242 },"~O,~N");
6243 Clazz_overrideMethod(c$,"isEmpty",
6244 function(){
6245 return this.elementCount==0;
6246 });
6247 Clazz_overrideMethod(c$,"keySet",
6248 function(){
6249 if(this.$keySet==null){
6250 this.$keySet=((Clazz_isClassDefined("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$()),Clazz_innerTypeInstance(java.util.HashMap$1,this,null));
6251 }return this.$keySet;
6252 });
6253 Clazz_overrideMethod(c$,"put",
6254 function(key,value){
6255 var index=this.getModuloHash(key);
6256 var entry=this.findEntry(key,index);
6257 if(entry==null){
6258 this.modCount++;
6259 if(++this.elementCount>this.threshold){
6260 this.rehash();
6261 index=key==null?0:(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6262 }entry=this.createEntry(key,index,value);
6263 return null;
6264 }var result=entry.value;
6265 entry.value=value;
6266 return result;
6267 },"~O,~O");
6268 Clazz_defineMethod(c$,"createEntry",
6269 function(key,index,value){
6270 var entry=new java.util.HashMap.Entry(key,value);
6271 entry.next=this.elementData[index];
6272 this.elementData[index]=entry;
6273 return entry;
6274 },"~O,~N,~O");
6275 Clazz_defineMethod(c$,"putAll",
6276 function(map){
6277 if(!map.isEmpty()){
6278 var capacity=this.elementCount+map.size();
6279 if(capacity>this.threshold){
6280 this.rehash(capacity);
6281 }
6282 this.putAllHM(map);
6283
6284 }},"java.util.Map");
6285 Clazz_defineMethod(c$,"rehash",
6286 function(capacity){
6287 var length=(capacity==0?1:capacity<<1);
6288 var newData=this.newElementArray(length);
6289 for(var i=0;i<this.elementData.length;i++){
6290 var entry=this.elementData[i];
6291 while(entry!=null){
6292 var key=entry.key;
6293 var index=key==null?0:(key.hashCode()&0x7FFFFFFF)%length;
6294 var next=entry.next;
6295 entry.next=newData[index];
6296 newData[index]=entry;
6297 entry=next;
6298 }
6299 }
6300 this.elementData=newData;
6301 this.computeMaxSize();
6302 },"~N");
6303 Clazz_defineMethod(c$,"rehash",
6304 function(){
6305 this.rehash(this.elementData.length);
6306 });
6307 Clazz_overrideMethod(c$,"remove",
6308 function(key){
6309 var entry=this.removeEntry(key);
6310 if(entry!=null){
6311 return entry.value;
6312 }return null;
6313 },"~O");
6314 Clazz_defineMethod(c$,"removeEntry",
6315 function(key){
6316 var index=0;
6317 var entry;
6318 var last=null;
6319 if(key!=null){
6320 index=(key.hashCode()&0x7FFFFFFF)%this.elementData.length;
6321 entry=this.elementData[index];
6322 while(entry!=null&&!this.keysEqual(key,entry)){
6323 last=entry;
6324 entry=entry.next;
6325 }
6326 }else{
6327 entry=this.elementData[0];
6328 while(entry!=null&&entry.key!=null){
6329 last=entry;
6330 entry=entry.next;
6331 }
6332 }if(entry==null){
6333 return null;
6334 }if(last==null){
6335 this.elementData[index]=entry.next;
6336 }else{
6337 last.next=entry.next;
6338 }this.modCount++;
6339 this.elementCount--;
6340 return entry;
6341 },"~O");
6342 Clazz_overrideMethod(c$,"size",
6343 function(){
6344 return this.elementCount;
6345 });
6346 Clazz_overrideMethod(c$,"values",
6347 function(){
6348 if(this.valuesCollection==null){
6349 this.valuesCollection=((Clazz_isClassDefined("java.util.HashMap$2")?0:java.util.HashMap.$HashMap$2$()),Clazz_innerTypeInstance(java.util.HashMap$2,this,null));
6350 }return this.valuesCollection;
6351 });
6352 c$.$HashMap$1$=function(){
6353 Clazz_pu$h(self.c$);
6354 c$=Clazz_declareAnonymous(java.util,"HashMap$1",java.util.AbstractSet);
6355 Clazz_overrideMethod(c$,"contains",
6356 function(object){
6357 return this.b$["java.util.HashMap"].containsKey(object);
6358 },"~O");
6359 Clazz_overrideMethod(c$,"size",
6360 function(){
6361 return this.b$["java.util.HashMap"].size();
6362 });
6363 Clazz_overrideMethod(c$,"clear",
6364 function(){
6365 this.b$["java.util.HashMap"].clear();
6366 });
6367 Clazz_overrideMethod(c$,"remove",
6368 function(key){
6369 if(this.b$["java.util.HashMap"].containsKey(key)){
6370 this.b$["java.util.HashMap"].remove(key);
6371 return true;
6372 }return false;
6373 },"~O");
6374 Clazz_overrideMethod(c$,"iterator",
6375 function(){
6376 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"]);
6377 });
6378 c$=Clazz_p0p();
6379 };
6380 c$.$HashMap$1$1$=function(){
6381 Clazz_pu$h(self.c$);
6382 c$=Clazz_declareAnonymous(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);
6383 Clazz_overrideMethod(c$,"get",
6384 function(entry){
6385 return entry.key;
6386 },"java.util.MapEntry");
6387 c$=Clazz_p0p();
6388 };
6389 c$.$HashMap$2$=function(){
6390 Clazz_pu$h(self.c$);
6391 c$=Clazz_declareAnonymous(java.util,"HashMap$2",java.util.AbstractCollection);
6392 Clazz_overrideMethod(c$,"contains",
6393 function(object){
6394 return this.b$["java.util.HashMap"].containsValue(object);
6395 },"~O");
6396 Clazz_overrideMethod(c$,"size",
6397 function(){
6398 return this.b$["java.util.HashMap"].size();
6399 });
6400 Clazz_overrideMethod(c$,"clear",
6401 function(){
6402 this.b$["java.util.HashMap"].clear();
6403 });
6404 Clazz_overrideMethod(c$,"iterator",
6405 function(){
6406 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"]);
6407 });
6408 c$=Clazz_p0p();
6409 };
6410 c$.$HashMap$2$1$=function(){
6411 Clazz_pu$h(self.c$);
6412 c$=Clazz_declareAnonymous(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);
6413 Clazz_overrideMethod(c$,"get",
6414 function(entry){
6415 return entry.value;
6416 },"java.util.MapEntry");
6417 c$=Clazz_p0p();
6418 };
6419 Clazz_pu$h(self.c$);
6420 c$=Clazz_decorateAsClass(function(){
6421 this.origKeyHash=0;
6422 this.next=null;
6423 Clazz_instantialize(this,arguments);
6424 },java.util.HashMap,"Entry",java.util.MapEntry);
6425 Clazz_makeConstructor(c$,
6426 function(a,b){
6427 Clazz_superConstructor(this,java.util.HashMap.Entry,[a,b]);
6428 this.origKeyHash=(a==null?0:a.hashCode());
6429 },"~O,~O");
6430 Clazz_defineMethod(c$,"clone",
6431 function(){
6432 var a=Clazz_superCall(this,java.util.HashMap.Entry,"clone",[]);
6433 if(this.next!=null){
6434 a.next=this.next.clone();
6435 }return a;
6436 });
6437 c$=Clazz_p0p();
6438 Clazz_pu$h(self.c$);
6439 c$=Clazz_decorateAsClass(function(){
6440 this.position=0;
6441 this.expectedModCount=0;
6442 this.type=null;
6443 this.canRemove=false;
6444 this.entry=null;
6445 this.lastEntry=null;
6446 this.associatedMap=null;
6447 Clazz_instantialize(this,arguments);
6448 },java.util.HashMap,"HashMapIterator",null,java.util.Iterator);
6449 Clazz_makeConstructor(c$,
6450 function(a,b){
6451 this.associatedMap=b;
6452 this.type=a;
6453 this.expectedModCount=b.modCount;
6454 },"java.util.MapEntry.Type,java.util.HashMap");
6455 Clazz_overrideMethod(c$,"hasNext",
6456 function(){
6457 if(this.entry!=null){
6458 return true;
6459 }while(this.position<this.associatedMap.elementData.length){
6460 if(this.associatedMap.elementData[this.position]==null){
6461 this.position++;
6462 }else{
6463 return true;
6464 }}
6465 return false;
6466 });
6467 Clazz_defineMethod(c$,"checkConcurrentMod",
6468 function(){
6469 if(this.expectedModCount!=this.associatedMap.modCount){
6470 throw new java.util.ConcurrentModificationException();
6471 }});
6472 Clazz_overrideMethod(c$,"next",
6473 function(){
6474 this.checkConcurrentMod();
6475 if(!this.hasNext()){
6476 throw new java.util.NoSuchElementException();
6477 }var a;
6478 if(this.entry==null){
6479 a=this.lastEntry=this.associatedMap.elementData[this.position++];
6480 this.entry=this.lastEntry.next;
6481 }else{
6482 if(this.lastEntry.next!==this.entry){
6483 this.lastEntry=this.lastEntry.next;
6484 }a=this.entry;
6485 this.entry=this.entry.next;
6486 }this.canRemove=true;
6487 return this.type.get(a);
6488 });
6489 Clazz_overrideMethod(c$,"remove",
6490 function(){
6491 this.checkConcurrentMod();
6492 if(!this.canRemove){
6493 throw new IllegalStateException();
6494 }this.canRemove=false;
6495 this.associatedMap.modCount++;
6496 if(this.lastEntry.next===this.entry){
6497 while(this.associatedMap.elementData[--this.position]==null){
6498 ;}
6499 this.associatedMap.elementData[this.position]=this.associatedMap.elementData[this.position].next;
6500 this.entry=null;
6501 }else{
6502 this.lastEntry.next=this.entry;
6503 }this.associatedMap.elementCount--;
6504 this.expectedModCount++;
6505 });
6506 c$=Clazz_p0p();
6507 Clazz_pu$h(self.c$);
6508 c$=Clazz_decorateAsClass(function(){
6509 this.associatedMap=null;
6510 Clazz_instantialize(this,arguments);
6511 },java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);
6512 Clazz_makeConstructor(c$,
6513 function(a){
6514 Clazz_superConstructor(this,java.util.HashMap.HashMapEntrySet,[]);
6515 this.associatedMap=a;
6516 },"java.util.HashMap");
6517 Clazz_defineMethod(c$,"hashMap",
6518 function(){
6519 return this.associatedMap;
6520 });
6521 Clazz_overrideMethod(c$,"size",
6522 function(){
6523 return this.associatedMap.elementCount;
6524 });
6525 Clazz_overrideMethod(c$,"clear",
6526 function(){
6527 this.associatedMap.clear();
6528 });
6529 Clazz_overrideMethod(c$,"remove",
6530 function(a){
6531 if(this.contains(a)){
6532 this.associatedMap.remove((a).getKey());
6533 return true;
6534 }return false;
6535 },"~O");
6536 Clazz_overrideMethod(c$,"contains",
6537 function(a){
6538 if(Clazz_instanceOf(a,java.util.Map.Entry)){
6539 var b=this.associatedMap.getEntry((a).getKey());
6540 return a.equals(b);
6541 }return false;
6542 },"~O");
6543 Clazz_overrideMethod(c$,"iterator",
6544 function(){
6545 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);
6546 });
6547 c$.$HashMap$HashMapEntrySet$1$=function(){
6548 Clazz_pu$h(self.c$);
6549 c$=Clazz_declareAnonymous(java.util,"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);
6550 Clazz_overrideMethod(c$,"get",
6551 function(a){
6552 return a;
6553 },"java.util.MapEntry");
6554 c$=Clazz_p0p();
6555 };
6556 c$=Clazz_p0p();
6557 Clazz_defineStatics(c$,
6558 "DEFAULT_SIZE",16);
6559 });
6560 Clazz_load(["java.util.Map"],"java.util.MapEntry",null,function(){
6561 c$=Clazz_decorateAsClass(function(){
6562 this.key=null;
6563 this.value=null;
6564 Clazz_instantialize(this,arguments);
6565 },java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);
6566 Clazz_makeConstructor(c$,
6567 function(theKey){
6568 this.key=theKey;
6569 },"~O");
6570 Clazz_makeConstructor(c$,
6571 function(theKey,theValue){
6572 this.key=theKey;
6573 this.value=theValue;
6574 },"~O,~O");
6575 Clazz_defineMethod(c$,"clone",
6576 function(){
6577 try{
6578 return Clazz_superCall(this,java.util.MapEntry,"clone",[]);
6579 }catch(e){
6580 if(Clazz_instanceOf(e,CloneNotSupportedException)){
6581 return null;
6582 }else{
6583 throw e;
6584 }
6585 }
6586 });
6587 Clazz_overrideMethod(c$,"equals",
6588 function(object){
6589 if(this===object){
6590 return true;
6591 }if(Clazz_instanceOf(object,java.util.Map.Entry)){
6592 var entry=object;
6593 return(this.key==null?entry.getKey()==null:this.key.equals(entry.getKey()))&&(this.value==null?entry.getValue()==null:this.value.equals(entry.getValue()));
6594 }return false;
6595 },"~O");
6596 Clazz_overrideMethod(c$,"getKey",
6597 function(){
6598 return this.key;
6599 });
6600 Clazz_overrideMethod(c$,"getValue",
6601 function(){
6602 return this.value;
6603 });
6604 Clazz_overrideMethod(c$,"hashCode",
6605 function(){
6606 return(this.key==null?0:this.key.hashCode())^(this.value==null?0:this.value.hashCode());
6607 });
6608 Clazz_overrideMethod(c$,"setValue",
6609 function(object){
6610 var result=this.value;
6611 this.value=object;
6612 return result;
6613 },"~O");
6614 Clazz_overrideMethod(c$,"toString",
6615 function(){
6616 return this.key+"="+this.value;
6617 });
6618 Clazz_declareInterface(java.util.MapEntry,"Type");
6619 });
6620 Clazz_load(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){
6621 c$=Clazz_declareType(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);
6622 Clazz_overrideMethod(c$,"equals",
6623 function(object){
6624 if(this===object){
6625 return true;
6626 }if(Clazz_instanceOf(object,java.util.Set)){
6627 var s=object;
6628 return this.size()==s.size()&&this.containsAll(s);
6629 }return false;
6630 },"~O");
6631 Clazz_overrideMethod(c$,"hashCode",
6632 function(){
6633 var result=0;
6634 var it=this.iterator();
6635 while(it.hasNext()){
6636 var next=it.next();
6637 result+=next==null?0:next.hashCode();
6638 }
6639 return result;
6640 });
6641 Clazz_overrideMethod(c$,"removeAll",
6642 function(collection){
6643 var result=false;
6644 if(this.size()<=collection.size()){
6645 var it=this.iterator();
6646 while(it.hasNext()){
6647 if(collection.contains(it.next())){
6648 it.remove();
6649 result=true;
6650 }}
6651 }else{
6652 var it=collection.iterator();
6653 while(it.hasNext()){
6654 result=this.remove(it.next())||result;
6655 }
6656 }return result;
6657 },"java.util.Collection");
6658 });
6659 Clazz_load(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){
6660 c$=Clazz_decorateAsClass(function(){
6661 this.$keySet=null;
6662 this.valuesCollection=null;
6663 Clazz_instantialize(this,arguments);
6664 },java.util,"AbstractMap",null,java.util.Map);
6665 Clazz_makeConstructor(c$,
6666 function(){
6667 });
6668 Clazz_overrideMethod(c$,"clear",
6669 function(){
6670 this.entrySet().clear();
6671 });
6672 Clazz_overrideMethod(c$,"containsKey",
6673 function(key){
6674 var it=this.entrySet().iterator();
6675 if(key!=null){
6676 while(it.hasNext()){
6677 if(key.equals(it.next().getKey())){
6678 return true;
6679 }}
6680 }else{
6681 while(it.hasNext()){
6682 if(it.next().getKey()==null){
6683 return true;
6684 }}
6685 }return false;
6686 },"~O");
6687 Clazz_overrideMethod(c$,"containsValue",
6688 function(value){
6689 var it=this.entrySet().iterator();
6690 if(value!=null){
6691 while(it.hasNext()){
6692 if(value.equals(it.next().getValue())){
6693 return true;
6694 }}
6695 }else{
6696 while(it.hasNext()){
6697 if(it.next().getValue()==null){
6698 return true;
6699 }}
6700 }return false;
6701 },"~O");
6702 Clazz_overrideMethod(c$,"equals",
6703 function(object){
6704 if(this===object){
6705 return true;
6706 }if(Clazz_instanceOf(object,java.util.Map)){
6707 var map=object;
6708 if(this.size()!=map.size()){
6709 return false;
6710 }var objectSet=map.entrySet();
6711 var it=this.entrySet().iterator();
6712 while(it.hasNext()){
6713 if(!objectSet.contains(it.next())){
6714 return false;
6715 }}
6716 return true;
6717 }return false;
6718 },"~O");
6719 Clazz_overrideMethod(c$,"get",
6720 function(key){
6721 var it=this.entrySet().iterator();
6722 if(key!=null){
6723 while(it.hasNext()){
6724 var entry=it.next();
6725 if(key.equals(entry.getKey())){
6726 return entry.getValue();
6727 }}
6728 }else{
6729 while(it.hasNext()){
6730 var entry=it.next();
6731 if(entry.getKey()==null){
6732 return entry.getValue();
6733 }}
6734 }return null;
6735 },"~O");
6736 Clazz_overrideMethod(c$,"hashCode",
6737 function(){
6738 var result=0;
6739 var it=this.entrySet().iterator();
6740 while(it.hasNext()){
6741 result+=it.next().hashCode();
6742 }
6743 return result;
6744 });
6745 Clazz_overrideMethod(c$,"isEmpty",
6746 function(){
6747 return this.size()==0;
6748 });
6749 Clazz_overrideMethod(c$,"keySet",
6750 function(){
6751 if(this.$keySet==null){
6752 this.$keySet=((Clazz_isClassDefined("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1,this,null));
6753 }return this.$keySet;
6754 });
6755 Clazz_overrideMethod(c$,"put",
6756 function(key,value){
6757 throw new UnsupportedOperationException();
6758 },"~O,~O");
6759 Clazz_overrideMethod(c$,"putAll",
6760 function(map){
6761   this.putAllAM(map);
6762 },"java.util.Map");
6763
6764 Clazz_overrideMethod(c$,"putAllAM",
6765 function(map){
6766 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
6767 this.put(entry.getKey(),entry.getValue());
6768 }
6769 },"java.util.Map");
6770
6771 Clazz_overrideMethod(c$,"remove",
6772 function(key){
6773 var it=this.entrySet().iterator();
6774 if(key!=null){
6775 while(it.hasNext()){
6776 var entry=it.next();
6777 if(key.equals(entry.getKey())){
6778 it.remove();
6779 return entry.getValue();
6780 }}
6781 }else{
6782 while(it.hasNext()){
6783 var entry=it.next();
6784 if(entry.getKey()==null){
6785 it.remove();
6786 return entry.getValue();
6787 }}
6788 }return null;
6789 },"~O");
6790 Clazz_overrideMethod(c$,"size",
6791 function(){
6792 return this.entrySet().size();
6793 });
6794 Clazz_overrideMethod(c$,"toString",
6795 function(){
6796 if(this.isEmpty()){
6797 return"{}";
6798 }var buffer=new StringBuilder(this.size()*28);
6799 buffer.append('{');
6800 var it=this.entrySet().iterator();
6801 while(it.hasNext()){
6802 var entry=it.next();
6803 var key=entry.getKey();
6804 if(key!==this){
6805 buffer.append(key);
6806 }else{
6807 buffer.append("(this Map)");
6808 }buffer.append('=');
6809 var value=entry.getValue();
6810 if(value!==this){
6811 buffer.append(value);
6812 }else{
6813 buffer.append("(this Map)");
6814 }if(it.hasNext()){
6815 buffer.append(", ");
6816 }}
6817 buffer.append('}');
6818 return buffer.toString();
6819 });
6820 Clazz_overrideMethod(c$,"values",
6821 function(){
6822 if(this.valuesCollection==null){
6823 this.valuesCollection=((Clazz_isClassDefined("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$()),Clazz_innerTypeInstance(java.util.AbstractMap$2,this,null));
6824 }return this.valuesCollection;
6825 });
6826 Clazz_defineMethod(c$,"clone",
6827 function(){
6828 return  this.cloneAM();
6829 });
6830
6831 Clazz_defineMethod(c$,"cloneAM",
6832 function(){
6833 var result = Clazz_clone(this);
6834 //var result=Clazz_superCall(this,java.util.AbstractMap,"clone",[]);
6835 result.$keySet=null;
6836 result.valuesCollection=null;
6837 return result;
6838 });
6839
6840 c$.$AbstractMap$1$=function(){
6841 Clazz_pu$h(self.c$);
6842 c$=Clazz_declareAnonymous(java.util,"AbstractMap$1",java.util.AbstractSet);
6843 Clazz_overrideMethod(c$,"contains",
6844 function(object){
6845 return this.b$["java.util.AbstractMap"].containsKey(object);
6846 },"~O");
6847 Clazz_overrideMethod(c$,"size",
6848 function(){
6849 return this.b$["java.util.AbstractMap"].size();
6850 });
6851 Clazz_overrideMethod(c$,"iterator",
6852 function(){
6853 return((Clazz_isClassDefined("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$1$1,this,null));
6854 });
6855 c$=Clazz_p0p();
6856 };
6857 c$.$AbstractMap$1$1$=function(){
6858 Clazz_pu$h(self.c$);
6859 c$=Clazz_decorateAsClass(function(){
6860 Clazz_prepareCallback(this,arguments);
6861 this.setIterator=null;
6862 Clazz_instantialize(this,arguments);
6863 },java.util,"AbstractMap$1$1",null,java.util.Iterator);
6864 Clazz_prepareFields(c$,function(){
6865 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6866 });
6867 Clazz_overrideMethod(c$,"hasNext",
6868 function(){
6869 return this.setIterator.hasNext();
6870 });
6871 Clazz_overrideMethod(c$,"next",
6872 function(){
6873 return this.setIterator.next().getKey();
6874 });
6875 Clazz_overrideMethod(c$,"remove",
6876 function(){
6877 this.setIterator.remove();
6878 });
6879 c$=Clazz_p0p();
6880 };
6881 c$.$AbstractMap$2$=function(){
6882 Clazz_pu$h(self.c$);
6883 c$=Clazz_declareAnonymous(java.util,"AbstractMap$2",java.util.AbstractCollection);
6884 Clazz_overrideMethod(c$,"size",
6885 function(){
6886 return this.b$["java.util.AbstractMap"].size();
6887 });
6888 Clazz_overrideMethod(c$,"contains",
6889 function(object){
6890 return this.b$["java.util.AbstractMap"].containsValue(object);
6891 },"~O");
6892 Clazz_overrideMethod(c$,"iterator",
6893 function(){
6894 return((Clazz_isClassDefined("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$()),Clazz_innerTypeInstance(java.util.AbstractMap$2$1,this,null));
6895 });
6896 c$=Clazz_p0p();
6897 };
6898 c$.$AbstractMap$2$1$=function(){
6899 Clazz_pu$h(self.c$);
6900 c$=Clazz_decorateAsClass(function(){
6901 Clazz_prepareCallback(this,arguments);
6902 this.setIterator=null;
6903 Clazz_instantialize(this,arguments);
6904 },java.util,"AbstractMap$2$1",null,java.util.Iterator);
6905 Clazz_prepareFields(c$,function(){
6906 this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator();
6907 });
6908 Clazz_overrideMethod(c$,"hasNext",
6909 function(){
6910 return this.setIterator.hasNext();
6911 });
6912 Clazz_overrideMethod(c$,"next",
6913 function(){
6914 return this.setIterator.next().getValue();
6915 });
6916 Clazz_overrideMethod(c$,"remove",
6917 function(){
6918 this.setIterator.remove();
6919 });
6920 c$=Clazz_p0p();
6921 };
6922 });
6923 Clazz_declarePackage ("java.awt.image");
6924 c$ = Clazz_declareInterface (java.awt.image, "ImageObserver");
6925 Clazz_defineStatics (c$,
6926 "WIDTH", 1,
6927 "HEIGHT", 2,
6928 "PROPERTIES", 4,
6929 "SOMEBITS", 8,
6930 "FRAMEBITS", 16,
6931 "ALLBITS", 32,
6932 "ERROR", 64,
6933 "ABORT", 128);
6934 // BH removed inner class 
6935 Clazz_load(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException"],function(){
6936 c$=Clazz_decorateAsClass(function(){
6937 this.$name=null;
6938 this.$ordinal=0;
6939 Clazz_instantialize(this,arguments);
6940 },java.lang,"Enum",null,[java.io.Serializable,Comparable]);
6941 Clazz_makeConstructor(c$,
6942 function(name,ordinal){
6943 this.$name=name;
6944 this.$ordinal=ordinal;
6945 },"~S,~N");
6946 Clazz_defineMethod(c$,"name",
6947 function(){
6948 return this.$name;
6949 });
6950 Clazz_defineMethod(c$,"ordinal",
6951 function(){
6952 return this.$ordinal;
6953 });
6954 Clazz_overrideMethod(c$,"toString",
6955 function(){
6956 return this.$name;
6957 });
6958 Clazz_overrideMethod(c$,"equals",
6959 function(other){
6960 return this===other;
6961 },"~O");
6962 Clazz_overrideMethod(c$,"hashCode",
6963 function(){
6964 return this.$ordinal+(this.$name==null?0:this.$name.hashCode());
6965 });
6966 Clazz_overrideMethod(c$,"clone",
6967 function(){
6968 throw new CloneNotSupportedException(("KA004"));
6969 });
6970 Clazz_overrideMethod(c$,"compareTo",
6971 function(o){
6972 return this.$ordinal-o.$ordinal;
6973 },"~O");
6974 Clazz_defineMethod(c$,"getDeclaringClass",
6975 function(){
6976 var myClass=this.getClass();
6977 var mySuperClass=myClass.getSuperclass();
6978 if(Enum===mySuperClass){
6979 return myClass;
6980 }return mySuperClass;
6981 });
6982 c$.$valueOf=Clazz_defineMethod(c$,"$valueOf",
6983 function(enumType,name){
6984 if((enumType==null)||(name==null)){
6985 throw new NullPointerException(("KA001"));
6986 }var values=Enum.getValues(enumType);
6987 if(values==null){
6988 throw new IllegalArgumentException(("KA005"));
6989 }for(var enumConst,$enumConst=0,$$enumConst=values;$enumConst<$$enumConst.length&&((enumConst=$$enumConst[$enumConst])||true);$enumConst++){
6990 if(enumConst.$name.equals(name)){
6991 return enumConst;
6992 }}
6993 throw new IllegalArgumentException(("KA006"));
6994 },"Class,~S");
6995 c$.getValues=Clazz_defineMethod(c$,"getValues",
6996 function(enumType){
6997 return enumType.values();
6998 },"Class");
6999
7000 //c$.$Enum$1$=function(){
7001 //Clazz_pu$h(self.c$);
7002
7003 //c$=Clazz_declareAnonymous(null,"Enum$1",null,java.security.PrivilegedExceptionAction);
7004 //Clazz_overrideMethod(c$,"run",
7005 //function(){
7006 //var valsMethod=this.f$.enumType.getMethod("values",null);
7007 //valsMethod.setAccessible(true);
7008 //return valsMethod;
7009 //});
7010 //c$=Clazz_p0p();
7011 //};
7012
7013
7014 });
7015 Clazz_declarePackage ("java.applet");
7016 Clazz_declareInterface (java.applet, "AppletStub");
7017 Clazz_declarePackage ("java.applet");
7018 Clazz_declareInterface (java.applet, "AppletContext");
7019 Clazz_declarePackage ("javajs.api");
7020 Clazz_declareInterface (javajs.api, "JSInterface");
7021 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){
7022 c$=Clazz_declareType(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);
7023 Clazz_makeConstructor(c$,
7024 function(seq){
7025 Clazz_superConstructor(this,StringBuilder,[seq.toString()]);
7026 },"CharSequence");
7027 Clazz_defineMethod(c$,"append",
7028 function(b){
7029 this.append0(b?"true":"false");
7030 return this;
7031 },"~B");
7032 Clazz_defineMethod(c$,"append",
7033 function(c){
7034 this.append0(c);
7035 return this;
7036 },"~N");
7037 Clazz_defineMethod(c$,"append",
7038 function(i){
7039 this.append0(Integer.toString(i));
7040 return this;
7041 },"~N");
7042 Clazz_defineMethod(c$,"append",
7043 function(lng){
7044 this.append0(Long.toString(lng));
7045 return this;
7046 },"~N");
7047 Clazz_defineMethod(c$,"append",
7048 function(f){
7049 this.append0(Float.toString(f));
7050 return this;
7051 },"~N");
7052 Clazz_defineMethod(c$,"append",
7053 function(d){
7054 this.append0(Double.toString(d));
7055 return this;
7056 },"~N");
7057 Clazz_defineMethod(c$,"append",
7058 function(obj){
7059 if(obj==null){
7060 this.appendNull();
7061 }else{
7062 this.append0(obj.toString());
7063 }return this;
7064 },"~O");
7065 Clazz_defineMethod(c$,"append",
7066 function(str){
7067 this.append0(str);
7068 return this;
7069 },"~S");
7070 Clazz_defineMethod(c$,"append",
7071 function(sb){
7072 if(sb==null){
7073 this.appendNull();
7074 }else{
7075 this.append0(sb.getValue(),0,sb.length());
7076 }return this;
7077 },"StringBuffer");
7078 Clazz_defineMethod(c$,"append",
7079 function(ch){
7080 this.append0(ch);
7081 return this;
7082 },"~A");
7083 Clazz_defineMethod(c$,"append",
7084 function(str,offset,len){
7085 this.append0(str,offset,len);
7086 return this;
7087 },"~A,~N,~N");
7088 Clazz_defineMethod(c$,"append",
7089 function(csq){
7090 if(csq==null){
7091 this.appendNull();
7092 }else{
7093 this.append0(csq.toString());
7094 }return this;
7095 },"CharSequence");
7096 Clazz_defineMethod(c$,"append",
7097 function(csq,start,end){
7098 this.append0(csq,start,end);
7099 return this;
7100 },"CharSequence,~N,~N");
7101 Clazz_defineMethod(c$,"$delete",
7102 function(start,end){
7103 this.delete0(start,end);
7104 return this;
7105 },"~N,~N");
7106 Clazz_defineMethod(c$,"deleteCharAt",
7107 function(index){
7108 this.deleteCharAt0(index);
7109 return this;
7110 },"~N");
7111 Clazz_defineMethod(c$,"insert",
7112 function(offset,b){
7113 this.insert0(offset,b?"true":"false");
7114 return this;
7115 },"~N,~B");
7116 Clazz_defineMethod(c$,"insert",
7117 function(offset,c){
7118 this.insert0(offset,c);
7119 return this;
7120 },"~N,~N");
7121 Clazz_defineMethod(c$,"insert",
7122 function(offset,i){
7123 this.insert0(offset,Integer.toString(i));
7124 return this;
7125 },"~N,~N");
7126 Clazz_defineMethod(c$,"insert",
7127 function(offset,l){
7128 this.insert0(offset,Long.toString(l));
7129 return this;
7130 },"~N,~N");
7131 Clazz_defineMethod(c$,"insert",
7132 function(offset,f){
7133 this.insert0(offset,Float.toString(f));
7134 return this;
7135 },"~N,~N");
7136 Clazz_defineMethod(c$,"insert",
7137 function(offset,d){
7138 this.insert0(offset,Double.toString(d));
7139 return this;
7140 },"~N,~N");
7141 Clazz_defineMethod(c$,"insert",
7142 function(offset,obj){
7143 this.insert0(offset,obj==null?"null":obj.toString());
7144 return this;
7145 },"~N,~O");
7146 Clazz_defineMethod(c$,"insert",
7147 function(offset,str){
7148 this.insert0(offset,str);
7149 return this;
7150 },"~N,~S");
7151 Clazz_defineMethod(c$,"insert",
7152 function(offset,ch){
7153 this.insert0(offset,ch);
7154 return this;
7155 },"~N,~A");
7156 Clazz_defineMethod(c$,"insert",
7157 function(offset,str,strOffset,strLen){
7158 this.insert0(offset,str,strOffset,strLen);
7159 return this;
7160 },"~N,~A,~N,~N");
7161 Clazz_defineMethod(c$,"insert",
7162 function(offset,s){
7163 this.insert0(offset,s==null?"null":s.toString());
7164 return this;
7165 },"~N,CharSequence");
7166 Clazz_defineMethod(c$,"insert",
7167 function(offset,s,start,end){
7168 this.insert0(offset,s,start,end);
7169 return this;
7170 },"~N,CharSequence,~N,~N");
7171 Clazz_defineMethod(c$,"replace",
7172 function(start,end,str){
7173 this.replace0(start,end,str);
7174 return this;
7175 },"~N,~N,~S");
7176 Clazz_defineMethod(c$,"reverse",
7177 function(){
7178 this.reverse0();
7179 return this;
7180 });
7181 });
7182 Clazz_load(null,"java.lang.AbstractStringBuilder",["java.io.InvalidObjectException","java.lang.ArrayIndexOutOfBoundsException","$.IndexOutOfBoundsException","$.NegativeArraySizeException","$.NullPointerException","$.StringIndexOutOfBoundsException"],function(){
7183 c$=Clazz_decorateAsClass(function(){
7184 this.value=null;
7185 this.count=0;
7186 this.shared=false;
7187 Clazz_instantialize(this,arguments);
7188 },java.lang,"AbstractStringBuilder");
7189 Clazz_defineMethod(c$,"getValue",
7190 function(){
7191 return this.value;
7192 });
7193 Clazz_defineMethod(c$,"shareValue",
7194 function(){
7195 this.shared=true;
7196 return this.value;
7197 });
7198 Clazz_defineMethod(c$,"set",
7199 function(val,len){
7200 if(val==null)val=Clazz_newArray(0,'\0');
7201 if(val.length<len)throw new java.io.InvalidObjectException(("K0199"));
7202 this.shared=false;
7203 this.value=val;
7204 this.count=len;
7205 },"~A,~N");
7206 Clazz_makeConstructor(c$,
7207 function(){
7208 this.value=Clazz_newArray(16,'\0');
7209 });
7210 Clazz_makeConstructor(c$,
7211 function(capacity){
7212 if(capacity<0)throw new NegativeArraySizeException();
7213 this.value=Clazz_newArray(capacity,'\0');
7214 },"~N");
7215 Clazz_makeConstructor(c$,
7216 function(string){
7217 this.count=string.length;
7218 this.shared=false;
7219 this.value=Clazz_newArray(this.count+16,'\0');
7220 string.getChars(0,this.count,this.value,0);
7221 },"~S");
7222 Clazz_defineMethod(c$,"enlargeBuffer",
7223 ($fz=function(min){
7224 var twice=(this.value.length<<1)+2;
7225 var newData=Clazz_newArray(min>twice?min:twice,'\0');
7226 System.arraycopy(this.value,0,newData,0,this.count);
7227 this.value=newData;
7228 this.shared=false;
7229 },$fz.isPrivate=true,$fz),"~N");
7230 Clazz_defineMethod(c$,"appendNull",
7231 function(){
7232 var newSize=this.count+4;
7233 if(newSize>this.value.length){
7234 this.enlargeBuffer(newSize);
7235 }else if(this.shared){
7236 this.value=this.value.clone();
7237 this.shared=false;
7238 }this.value[this.count++]='n';
7239 this.value[this.count++]='u';
7240 this.value[this.count++]='l';
7241 this.value[this.count++]='l';
7242 });
7243 Clazz_defineMethod(c$,"append0",
7244 function(chars){
7245 var newSize=this.count+chars.length;
7246 if(newSize>this.value.length){
7247 this.enlargeBuffer(newSize);
7248 }else if(this.shared){
7249 this.value=this.value.clone();
7250 this.shared=false;
7251 }System.arraycopy(chars,0,this.value,this.count,chars.length);
7252 this.count=newSize;
7253 },"~A");
7254 Clazz_defineMethod(c$,"append0",
7255 function(chars,start,length){
7256 if(chars==null){
7257 throw new NullPointerException();
7258 }if(start>=0&&0<=length&&length<=chars.length-start){
7259 var newSize=this.count+length;
7260 if(newSize>this.value.length){
7261 this.enlargeBuffer(newSize);
7262 }else if(this.shared){
7263 this.value=this.value.clone();
7264 this.shared=false;
7265 }System.arraycopy(chars,start,this.value,this.count,length);
7266 this.count=newSize;
7267 }else{
7268 throw new ArrayIndexOutOfBoundsException();
7269 }},"~A,~N,~N");
7270 Clazz_defineMethod(c$,"append0",
7271 function(ch){
7272 if(this.count==this.value.length){
7273 this.enlargeBuffer(this.count+1);
7274 }if(this.shared){
7275 this.value=this.value.clone();
7276 this.shared=false;
7277 }this.value[this.count++]=ch;
7278 },"~N");
7279 Clazz_defineMethod(c$,"append0",
7280 function(string){
7281 if(string==null){
7282 this.appendNull();
7283 return;
7284 }var adding=string.length;
7285 var newSize=this.count+adding;
7286 if(newSize>this.value.length){
7287 this.enlargeBuffer(newSize);
7288 }else if(this.shared){
7289 this.value=this.value.clone();
7290 this.shared=false;
7291 }string.getChars(0,adding,this.value,this.count);
7292 this.count=newSize;
7293 },"~S");
7294 Clazz_defineMethod(c$,"append0",
7295 function(s,start,end){
7296 if(s==null)s="null";
7297 if(start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7298 this.append0(s.subSequence(start,end).toString());
7299 },"CharSequence,~N,~N");
7300 Clazz_defineMethod(c$,"capacity",
7301 function(){
7302 return this.value.length;
7303 });
7304 Clazz_defineMethod(c$,"charAt",
7305 function(index){
7306 if(index<0||index>=this.count)throw new StringIndexOutOfBoundsException(index);
7307 return this.value[index];
7308 },"~N");
7309 Clazz_defineMethod(c$,"delete0",
7310 function(start,end){
7311 if(start>=0){
7312 if(end>this.count){
7313 end=this.count;
7314 }if(end==start){
7315 return;
7316 }if(end>start){
7317 var length=this.count-end;
7318 if(length>0){
7319 if(!this.shared){
7320 System.arraycopy(this.value,end,this.value,start,length);
7321 }else{
7322 var newData=Clazz_newArray(this.value.length,'\0');
7323 System.arraycopy(this.value,0,newData,0,start);
7324 System.arraycopy(this.value,end,newData,start,length);
7325 this.value=newData;
7326 this.shared=false;
7327 }}this.count-=end-start;
7328 return;
7329 }}throw new StringIndexOutOfBoundsException();
7330 },"~N,~N");
7331 Clazz_defineMethod(c$,"deleteCharAt0",
7332 function(location){
7333 if(0>location||location>=this.count)throw new StringIndexOutOfBoundsException(location);
7334 var length=this.count-location-1;
7335 if(length>0){
7336 if(!this.shared){
7337 System.arraycopy(this.value,location+1,this.value,location,length);
7338 }else{
7339 var newData=Clazz_newArray(this.value.length,'\0');
7340 System.arraycopy(this.value,0,newData,0,location);
7341 System.arraycopy(this.value,location+1,newData,location,length);
7342 this.value=newData;
7343 this.shared=false;
7344 }}this.count--;
7345 },"~N");
7346 Clazz_defineMethod(c$,"ensureCapacity",
7347 function(min){
7348 if(min>this.value.length){
7349 this.enlargeBuffer(min);
7350 }},"~N");
7351 Clazz_defineMethod(c$,"getChars",
7352 function(start,end,dest,destStart){
7353 if(start>this.count||end>this.count||start>end){
7354 throw new StringIndexOutOfBoundsException();
7355 }System.arraycopy(this.value,start,dest,destStart,end-start);
7356 },"~N,~N,~A,~N");
7357 Clazz_defineMethod(c$,"insert0",
7358 function(index,chars){
7359 if(0>index||index>this.count){
7360 throw new StringIndexOutOfBoundsException(index);
7361 }if(chars.length!=0){
7362 this.move(chars.length,index);
7363 System.arraycopy(chars,0,this.value,index,chars.length);
7364 this.count+=chars.length;
7365 }},"~N,~A");
7366 Clazz_defineMethod(c$,"insert0",
7367 function(index,chars,start,length){
7368 if(0<=index&&index<=this.count){
7369 if(start>=0&&0<=length&&length<=chars.length-start){
7370 if(length!=0){
7371 this.move(length,index);
7372 System.arraycopy(chars,start,this.value,index,length);
7373 this.count+=length;
7374 }return;
7375 }throw new StringIndexOutOfBoundsException("offset "+start+", len "+length+", array.length "+chars.length);
7376 }throw new StringIndexOutOfBoundsException(index);
7377 },"~N,~A,~N,~N");
7378 Clazz_defineMethod(c$,"insert0",
7379 function(index,ch){
7380 if(0>index||index>this.count){
7381 throw new ArrayIndexOutOfBoundsException(index);
7382 }this.move(1,index);
7383 this.value[index]=ch;
7384 this.count++;
7385 },"~N,~N");
7386 Clazz_defineMethod(c$,"insert0",
7387 function(index,string){
7388 if(0<=index&&index<=this.count){
7389 if(string==null)string="null";
7390 var min=string.length;
7391 if(min!=0){
7392 this.move(min,index);
7393 string.getChars(0,min,this.value,index);
7394 this.count+=min;
7395 }}else{
7396 throw new StringIndexOutOfBoundsException(index);
7397 }},"~N,~S");
7398 Clazz_defineMethod(c$,"insert0",
7399 function(index,s,start,end){
7400 if(s==null)s="null";
7401 if(index<0||index>this.count||start<0||end<0||start>end||end>s.length())throw new IndexOutOfBoundsException();
7402 this.insert0(index,s.subSequence(start,end).toString());
7403 },"~N,CharSequence,~N,~N");
7404 Clazz_defineMethod(c$,"length",
7405 function(){
7406 return this.count;
7407 });
7408 Clazz_defineMethod(c$,"move",
7409 ($fz=function(size,index){
7410 var newSize;
7411 if(this.value.length-this.count>=size){
7412 if(!this.shared){
7413 System.arraycopy(this.value,index,this.value,index+size,this.count-index);
7414 return;
7415 }newSize=this.value.length;
7416 }else{
7417 var a=this.count+size;
7418 var b=(this.value.length<<1)+2;
7419 newSize=a>b?a:b;
7420 }var newData=Clazz_newArray(newSize,'\0');
7421 System.arraycopy(this.value,0,newData,0,index);
7422 System.arraycopy(this.value,index,newData,index+size,this.count-index);
7423 this.value=newData;
7424 this.shared=false;
7425 },$fz.isPrivate=true,$fz),"~N,~N");
7426 Clazz_defineMethod(c$,"replace0",
7427 function(start,end,string){
7428 if(start>=0){
7429 if(end>this.count)end=this.count;
7430 if(end>start){
7431 var stringLength=string.length;
7432 var diff=end-start-stringLength;
7433 if(diff>0){
7434 if(!this.shared){
7435 System.arraycopy(this.value,end,this.value,start+stringLength,this.count-end);
7436 }else{
7437 var newData=Clazz_newArray(this.value.length,'\0');
7438 System.arraycopy(this.value,0,newData,0,start);
7439 System.arraycopy(this.value,end,newData,start+stringLength,this.count-end);
7440 this.value=newData;
7441 this.shared=false;
7442 }}else if(diff<0){
7443 this.move(-diff,end);
7444 }else if(this.shared){
7445 this.value=this.value.clone();
7446 this.shared=false;
7447 }string.getChars(0,stringLength,this.value,start);
7448 this.count-=diff;
7449 return;
7450 }if(start==end){
7451 if(string==null)throw new NullPointerException();
7452 this.insert0(start,string);
7453 return;
7454 }}throw new StringIndexOutOfBoundsException();
7455 },"~N,~N,~S");
7456 Clazz_defineMethod(c$,"reverse0",
7457 function(){
7458 if(this.count<2){
7459 return;
7460 }if(!this.shared){
7461 for(var i=0,end=this.count,mid=Math.floor(this.count/2);i<mid;i++){
7462 var temp=this.value[--end];
7463 this.value[end]=this.value[i];
7464 this.value[i]=temp;
7465 }
7466 }else{
7467 var newData=Clazz_newArray(this.value.length,'\0');
7468 for(var i=0,end=this.count;i<this.count;i++){
7469 newData[--end]=this.value[i];
7470 }
7471 this.value=newData;
7472 this.shared=false;
7473 }});
7474 Clazz_defineMethod(c$,"setCharAt",
7475 function(index,ch){
7476 if(0>index||index>=this.count){
7477 throw new StringIndexOutOfBoundsException(index);
7478 }if(this.shared){
7479 this.value=this.value.clone();
7480 this.shared=false;
7481 }this.value[index]=ch;
7482 },"~N,~N");
7483 Clazz_defineMethod(c$,"setLength",
7484 function(length){
7485 if(length<0)throw new StringIndexOutOfBoundsException(length);
7486 if(this.count<length){
7487 if(length>this.value.length){
7488 this.enlargeBuffer(length);
7489 }else{
7490 if(this.shared){
7491 var newData=Clazz_newArray(this.value.length,'\0');
7492 System.arraycopy(this.value,0,newData,0,this.count);
7493 this.value=newData;
7494 this.shared=false;
7495 }else{
7496 for(var i=this.count;i<length;i++){
7497 this.value[i]=String.fromCharCode(0);
7498 }
7499 }}}this.count=length;
7500 },"~N");
7501 Clazz_defineMethod(c$,"substring",
7502 function(start){
7503 if(0<=start&&start<=this.count){
7504 if(start==this.count)return"";
7505 this.shared=true;
7506 return String.instantialize(start,this.count-start,this.value);
7507 }throw new StringIndexOutOfBoundsException(start);
7508 },"~N");
7509 Clazz_defineMethod(c$,"substring",
7510 function(start,end){
7511 if(0<=start&&start<=end&&end<=this.count){
7512 if(start==end)return"";
7513 this.shared=true;
7514 return String.instantialize(this.value,start,end-start);
7515 }throw new StringIndexOutOfBoundsException();
7516 },"~N,~N");
7517 Clazz_overrideMethod(c$,"toString",
7518 function(){
7519 if(this.count==0)return"";
7520 if(this.count>=256&&this.count<=(this.value.length>>1))return String.instantialize(this.value,0,this.count);
7521 this.shared=true;
7522 return String.instantialize(0,this.count,this.value);
7523 });
7524 Clazz_defineMethod(c$,"subSequence",
7525 function(start,end){
7526 return this.substring(start,end);
7527 },"~N,~N");
7528 Clazz_defineMethod(c$,"indexOf",
7529 function(string){
7530 return this.indexOf(string,0);
7531 },"~S");
7532 Clazz_defineMethod(c$,"indexOf",
7533 function(subString,start){
7534 if(start<0)start=0;
7535 var subCount=subString.length;
7536 if(subCount>0){
7537 if(subCount+start>this.count)return-1;
7538 var firstChar=subString.charAt(0);
7539 while(true){
7540 var i=start;
7541 var found=false;
7542 for(;i<this.count;i++)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7543 found=true;
7544 break;
7545 }
7546 if(!found||subCount+i>this.count)return-1;
7547 var o1=i;
7548 var o2=0;
7549 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7550 }
7551 if(o2==subCount)return i;
7552 start=i+1;
7553 }
7554 }return(start<this.count||start==0)?start:this.count;
7555 },"~S,~N");
7556 Clazz_defineMethod(c$,"lastIndexOf",
7557 function(string){
7558 return this.lastIndexOf(string,this.count);
7559 },"~S");
7560 Clazz_defineMethod(c$,"lastIndexOf",
7561 function(subString,start){
7562 var subCount=subString.length;
7563 if(subCount<=this.count&&start>=0){
7564 if(subCount>0){
7565 if(start>this.count-subCount)start=this.count-subCount;
7566 var firstChar=subString.charAt(0);
7567 while(true){
7568 var i=start;
7569 var found=false;
7570 for(;i>=0;--i)if((this.value[i]).charCodeAt(0)==(firstChar).charCodeAt(0)){
7571 found=true;
7572 break;
7573 }
7574 if(!found)return-1;
7575 var o1=i;
7576 var o2=0;
7577 while(++o2<subCount&&(this.value[++o1]).charCodeAt(0)==(subString.charAt(o2)).charCodeAt(0)){
7578 }
7579 if(o2==subCount)return i;
7580 start=i-1;
7581 }
7582 }return start<this.count?start:this.count;
7583 }return-1;
7584 },"~S,~N");
7585 Clazz_defineMethod(c$,"trimToSize",
7586 function(){
7587 if(this.count<this.value.length){
7588 var newValue=Clazz_newArray(this.count,'\0');
7589 System.arraycopy(this.value,0,newValue,0,this.count);
7590 this.value=newValue;
7591 this.shared=false;
7592 }});
7593 Clazz_defineStatics(c$,
7594 "INITIAL_CAPACITY",16);
7595 });
7596 // BH adjusted to have only one sort method.
7597 // BH -- added Java 6  copyOfRange
7598
7599 Clazz_load(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){
7600 c$=Clazz_declareType(java.util,"Arrays");
7601
7602 c$.copyOfRange = Clazz_defineMethod (c$, "copyOfRange", 
7603 function (original, from, to) {
7604 to = Math.min(original.length, to);
7605 var newLength = to - from;
7606 if (newLength < 0) throw  new IllegalArgumentException (from + " > " + to);
7607 if (original.slice)
7608   return original.slice(from, to);
7609   // MSIE and Chrome do not have Int32Array.slice()
7610 var c = Clazz_newIntArray(newLength, 0);
7611 for (var i = 0; i < newLength; i++)
7612   c[i] = original[from++];
7613 return c;  
7614 }, "~A,~N,~N");
7615
7616 c$.sort=Clazz_overrideMethod(c$,"sort",
7617 function(a,c,d,e){
7618   switch (arguments.length) {
7619   case 1:
7620     var aux=a.sort(function(o1,o2){
7621       if(typeof o1=="string"||o1 instanceof Comparable){
7622         return o1.compareTo(o2);
7623       }
7624       return o1-o2;
7625       });
7626     for(var i=0;i<a.length;i++){
7627       a[i]=aux[i];
7628     }
7629     return;
7630   case 2:
7631     var aux=a.sort(function(o1,o2){
7632       if(c!=null){
7633         return c.compare(o1,o2);
7634       }else if(typeof o1=="string"||o1 instanceof Comparable){
7635         return o1.compareTo(o2);
7636       }
7637       return o1-o2;
7638       });
7639     for(var i=0;i<a.length;i++){
7640       a[i]=aux[i];
7641     }
7642     return;
7643   case 3:
7644     var fromIndex = c;
7645     var toIndex = d;
7646     this.rangeCheck(a.length,fromIndex,toIndex);
7647     var aux=new Array();
7648     for(var i=fromIndex;i<toIndex;i++){
7649       aux[i-fromIndex]=a[i];
7650     }
7651     aux=aux.sort(function(o1,o2){
7652       if(typeof o1=="string"||o1 instanceof Comparable){
7653         return o1.compareTo(o2);
7654       }
7655       return o1-o2;
7656       });
7657     for(var i=fromIndex;i<toIndex;i++){
7658       a[i]=aux[i-fromIndex];
7659     }
7660     return;
7661   case 4:  
7662     var fromIndex = c;
7663     var toIndex = d;
7664     c = e;
7665     this.rangeCheck(a.length,fromIndex,toIndex);
7666     var aux=new Array();
7667     for(var i=fromIndex;i<toIndex;i++){
7668       aux[i-fromIndex]=a[i];
7669     }
7670     aux=aux.sort(function(o1,o2){
7671       if(c!=null){
7672         return c.compare(o1,o2);
7673       }else if(typeof o1=="string"||o1 instanceof Comparable){
7674         return o1.compareTo(o2);
7675       }
7676       return o1-o2;
7677       });
7678     for(var i=fromIndex;i<toIndex;i++){
7679       a[i]=aux[i-fromIndex];
7680     }
7681   }
7682 });
7683
7684 c$.rangeCheck=Clazz_defineMethod(c$,"rangeCheck",
7685 ($fz=function(arrayLen,fromIndex,toIndex){
7686 if(fromIndex>toIndex)throw new IllegalArgumentException("fromIndex("+fromIndex+") > toIndex("+toIndex+")");
7687 if(fromIndex<0)throw new ArrayIndexOutOfBoundsException(fromIndex);
7688 if(toIndex>arrayLen)throw new ArrayIndexOutOfBoundsException(toIndex);
7689 },$fz.isPrivate=true,$fz),"~N,~N,~N");
7690 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7691 function(a,key){
7692 var low=0;
7693 var high=a.length-1;
7694 while(low<=high){
7695 var mid=(low+high)>>1;
7696 var midVal=a[mid];
7697 if(midVal<key)low=mid+1;
7698 else if(midVal>key)high=mid-1;
7699 else return mid;
7700 }
7701 return-(low+1);
7702 },"~A,~N");
7703 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7704 function(a,key){
7705 var low=0;
7706 var high=a.length-1;
7707 while(low<=high){
7708 var mid=(low+high)>>1;
7709 var midVal=a[mid];
7710 var cmp=(midVal).compareTo(key);
7711 if(cmp<0)low=mid+1;
7712 else if(cmp>0)high=mid-1;
7713 else return mid;
7714 }
7715 return-(low+1);
7716 },"~A,~O");
7717 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
7718 function(a,key,c){
7719 if(c==null)return java.util.Arrays.binarySearch(a,key);
7720 var low=0;
7721 var high=a.length-1;
7722 while(low<=high){
7723 var mid=(low+high)>>1;
7724 var midVal=a[mid];
7725 var cmp=c.compare(midVal,key);
7726 if(cmp<0)low=mid+1;
7727 else if(cmp>0)high=mid-1;
7728 else return mid;
7729 }
7730 return-(low+1);
7731 },"~A,~O,java.util.Comparator");
7732 c$.equals=Clazz_defineMethod(c$,"equals",
7733 function(a,a2){
7734 if(a===a2)return true;
7735 if(a==null||a2==null)return false;
7736 var length=a.length;
7737 if(a2.length!=length)return false;
7738 for(var i=0;i<length;i++){
7739 var o1=a[i];
7740 var o2=a2[i];
7741 {
7742 if(!(o1==null?o2==null:(o1.equals==null?o1==o2:o1.equals(o2))))return false;
7743 }}
7744 return true;
7745 },"~A,~A");
7746
7747 c$.fill=Clazz_overrideMethod(c$,"fill",
7748 function(a,fromIndex,toIndex,val){
7749 if (arguments.length == 2) {
7750                 val = fromIndex;
7751                 fromIndex = 0;
7752                 toIndex = a.length;
7753         }       
7754         java.util.Arrays.rangeCheck(a.length,fromIndex,toIndex);
7755         for(var i=fromIndex;i<toIndex;i++)a[i]=val;
7756 });
7757
7758 c$.asList=Clazz_defineMethod(c$,"asList",
7759 function(a){
7760 return new java.util.Arrays.ArrayList(arguments.length == 1 && Clazz_getClassName(a) == "Array" ? a : arguments); // BH must be T...
7761 },"~A");
7762 Clazz_pu$h(self.c$);
7763 c$=Clazz_decorateAsClass(function(){
7764 this.a=null;
7765 Clazz_instantialize(this,arguments);
7766 },java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);
7767 Clazz_makeConstructor(c$,
7768 function(a){
7769 Clazz_superConstructor(this,java.util.Arrays.ArrayList,[]);
7770 if(a==null)throw new NullPointerException();
7771 this.a=a;
7772 },"~A");
7773 Clazz_overrideMethod(c$,"size",
7774 function(){
7775 return this.a.length;
7776 });
7777 Clazz_defineMethod(c$,"toArray",
7778 function(){
7779 return this.a.clone();
7780 });
7781 Clazz_overrideMethod(c$,"get",
7782 function(a){
7783 return this.a[a];
7784 },"~N");
7785 Clazz_overrideMethod(c$,"set",
7786 function(a,b){
7787 var c=this.a[a];
7788 this.a[a]=b;
7789 return c;
7790 },"~N,~O");
7791 Clazz_overrideMethod(c$,"indexOf",
7792 function(a){
7793 if(a==null){
7794 for(var b=0;b<this.a.length;b++)if(this.a[b]==null)return b;
7795
7796 }else{
7797 for(var b=0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;
7798
7799 }return-1;
7800 },"~O");
7801 Clazz_overrideMethod(c$,"contains",
7802 function(a){
7803 return this.indexOf(a)!=-1;
7804 },"~O");
7805 c$=Clazz_p0p();
7806 Clazz_defineStatics(c$,
7807 "INSERTIONSORT_THRESHOLD",7);
7808 });
7809 Clazz_declarePackage ("java.util");
7810 Clazz_load (["java.util.HashMap"], "java.util.Locale", ["java.lang.InternalError", "$.NullPointerException", "$.StringBuilder"], function () {
7811 c$ = Clazz_decorateAsClass (function () {
7812 this.language = null;
7813 this.country = null;
7814 this.variant = null;
7815 this.hashCodeValue = 0;
7816 Clazz_instantialize (this, arguments);
7817 }, java.util, "Locale", null, [Cloneable, java.io.Serializable]);
7818 Clazz_makeConstructor (c$, 
7819 function (language, country, variant) {
7820 this.language = language.intern ();
7821 this.country = country.intern ();
7822 this.variant = variant.intern ();
7823 }, "~S,~S,~S");
7824 Clazz_makeConstructor (c$, 
7825 function (language, country) {
7826 this.construct (language, country, "");
7827 }, "~S,~S");
7828 Clazz_makeConstructor (c$, 
7829 function (language) {
7830 this.construct (language, "", "");
7831 }, "~S");
7832 Clazz_makeConstructor (c$, 
7833  function (language, country, flag) {
7834 this.language = language;
7835 this.country = country;
7836 this.variant = "";
7837 }, "~S,~S,~B");
7838 c$.createSingleton = Clazz_defineMethod (c$, "createSingleton", 
7839  function (key, language, country) {
7840 var locale =  new java.util.Locale (language, country, false);
7841 java.util.Locale.cache.put (key, locale);
7842 return locale;
7843 }, "~S,~S,~S");
7844 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
7845 function (language, country, variant) {
7846 if (language == null || country == null || variant == null) {
7847 throw  new NullPointerException ();
7848 }var sb =  new StringBuilder ();
7849 sb.append (language).append ('_').append (country).append ('_').append (variant);
7850 var key = sb.toString ();
7851 var locale = java.util.Locale.cache.get (key);
7852 if (locale == null) {
7853 locale =  new java.util.Locale (language, country, variant);
7854 var l = java.util.Locale.cache.put (key, locale);
7855 if (l != null) {
7856 locale = l;
7857 }}return locale;
7858 }, "~S,~S,~S");
7859 c$.getDefault = Clazz_defineMethod (c$, "getDefault", 
7860 function () {
7861 if (java.util.Locale.defaultLocale == null) {
7862 var language;
7863 var country;
7864 var variant;
7865 language = "en";
7866 country = "";
7867 variant = "";
7868 java.util.Locale.defaultLocale = java.util.Locale.getInstance (language, country, variant);
7869 }return java.util.Locale.defaultLocale;
7870 });
7871 c$.setDefault = Clazz_defineMethod (c$, "setDefault", 
7872 function (newLocale) {
7873 if (newLocale == null) throw  new NullPointerException ("Can't set default locale to NULL");
7874 java.util.Locale.defaultLocale = newLocale;
7875 }, "java.util.Locale");
7876 Clazz_defineMethod (c$, "getLanguage", 
7877 function () {
7878 return this.language;
7879 });
7880 Clazz_defineMethod (c$, "getCountry", 
7881 function () {
7882 return this.country;
7883 });
7884 Clazz_defineMethod (c$, "getVariant", 
7885 function () {
7886 return this.variant;
7887 });
7888 Clazz_overrideMethod (c$, "toString", 
7889 function () {
7890 var l = this.language.length != 0;
7891 var c = this.country.length != 0;
7892 var v = this.variant.length != 0;
7893 var result =  new StringBuilder (this.language);
7894 if (c || (l && v)) {
7895 result.append ('_').append (this.country);
7896 }if (v && (l || c)) {
7897 result.append ('_').append (this.variant);
7898 }return result.toString ();
7899 });
7900 Clazz_defineMethod (c$, "getDisplayLanguage", 
7901 function () {
7902 return this.getDisplayLanguage (java.util.Locale.getDefault ());
7903 });
7904 Clazz_defineMethod (c$, "getDisplayLanguage", 
7905 function (inLocale) {
7906 return this.getDisplayString (this.language, inLocale, 0);
7907 }, "java.util.Locale");
7908 Clazz_defineMethod (c$, "getDisplayCountry", 
7909 function () {
7910 return this.getDisplayCountry (java.util.Locale.getDefault ());
7911 });
7912 Clazz_defineMethod (c$, "getDisplayCountry", 
7913 function (inLocale) {
7914 return this.getDisplayString (this.country, inLocale, 1);
7915 }, "java.util.Locale");
7916 Clazz_defineMethod (c$, "getDisplayString", 
7917  function (code, inLocale, type) {
7918 if (code.length == 0) {
7919 return "";
7920 }if (inLocale == null) {
7921 throw  new NullPointerException ();
7922 }return inLocale.toString ();
7923 }, "~S,java.util.Locale,~N");
7924 Clazz_defineMethod (c$, "getDisplayVariant", 
7925 function () {
7926 return this.getDisplayVariant (java.util.Locale.getDefault ());
7927 });
7928 Clazz_defineMethod (c$, "getDisplayVariant", 
7929 function (inLocale) {
7930 if (this.variant.length == 0) return "";
7931 return this.variant;
7932 }, "java.util.Locale");
7933 Clazz_defineMethod (c$, "getDisplayName", 
7934 function () {
7935 return this.getDisplayName (java.util.Locale.getDefault ());
7936 });
7937 Clazz_defineMethod (c$, "getDisplayName", 
7938 function (inLocale) {
7939 return inLocale.toString ();
7940 }, "java.util.Locale");
7941 Clazz_defineMethod (c$, "clone", 
7942 function () {
7943 try {
7944 var that = Clazz_superCall (this, java.util.Locale, "clone", []);
7945 return that;
7946 } catch (e) {
7947 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
7948 throw  new InternalError ();
7949 } else {
7950 throw e;
7951 }
7952 }
7953 });
7954 Clazz_overrideMethod (c$, "hashCode", 
7955 function () {
7956 var hc = this.hashCodeValue;
7957 if (hc == 0) {
7958 hc = (this.language.hashCode () << 8) ^ this.country.hashCode () ^ (this.variant.hashCode () << 4);
7959 this.hashCodeValue = hc;
7960 }return hc;
7961 });
7962 Clazz_overrideMethod (c$, "equals", 
7963 function (obj) {
7964 if (this === obj) return true;
7965 if (!(Clazz_instanceOf (obj, java.util.Locale))) return false;
7966 var other = obj;
7967 return this.language === other.language && this.country === other.country && this.variant === other.variant;
7968 }, "~O");
7969 c$.cache = c$.prototype.cache =  new java.util.HashMap (32);
7970 c$.ENGLISH = c$.prototype.ENGLISH = java.util.Locale.createSingleton ("en__", "en", "");
7971 c$.ROOT = c$.prototype.ROOT = java.util.Locale.createSingleton ("__", "", "");
7972 Clazz_defineStatics (c$,
7973 "DISPLAY_LANGUAGE", 0,
7974 "DISPLAY_COUNTRY", 1,
7975 "defaultLocale", null);
7976 });
7977 Clazz_declarePackage ("java.awt.event");
7978 Clazz_load (["java.util.EventListener"], "java.awt.event.ActionListener", null, function () {
7979 Clazz_declareInterface (java.awt.event, "ActionListener", java.util.EventListener);
7980 });
7981 Clazz_declarePackage ("java.awt.event");
7982 Clazz_load (["java.util.EventListener"], "java.awt.event.AdjustmentListener", null, function () {
7983 Clazz_declareInterface (java.awt.event, "AdjustmentListener", java.util.EventListener);
7984 });
7985 Clazz_declarePackage ("java.awt.event");
7986 Clazz_load (["java.util.EventListener"], "java.awt.event.ComponentListener", null, function () {
7987 Clazz_declareInterface (java.awt.event, "ComponentListener", java.util.EventListener);
7988 });
7989 Clazz_declarePackage ("java.awt.event");
7990 Clazz_load (["java.util.EventListener"], "java.awt.event.ContainerListener", null, function () {
7991 Clazz_declareInterface (java.awt.event, "ContainerListener", java.util.EventListener);
7992 });
7993 Clazz_declarePackage ("java.awt.event");
7994 Clazz_load (["java.util.EventListener"], "java.awt.event.FocusListener", null, function () {
7995 Clazz_declareInterface (java.awt.event, "FocusListener", java.util.EventListener);
7996 });
7997 Clazz_declarePackage ("java.awt.event");
7998 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyBoundsListener", null, function () {
7999 Clazz_declareInterface (java.awt.event, "HierarchyBoundsListener", java.util.EventListener);
8000 });
8001 Clazz_declarePackage ("java.awt.event");
8002 Clazz_load (["java.util.EventListener"], "java.awt.event.HierarchyListener", null, function () {
8003 Clazz_declareInterface (java.awt.event, "HierarchyListener", java.util.EventListener);
8004 });
8005 Clazz_declarePackage ("java.awt.event");
8006 Clazz_load (["java.util.EventListener"], "java.awt.event.InputMethodListener", null, function () {
8007 Clazz_declareInterface (java.awt.event, "InputMethodListener", java.util.EventListener);
8008 });
8009 Clazz_declarePackage ("java.awt.event");
8010 Clazz_load (["java.util.EventListener"], "java.awt.event.ItemListener", null, function () {
8011 Clazz_declareInterface (java.awt.event, "ItemListener", java.util.EventListener);
8012 });
8013 Clazz_declarePackage ("java.awt.event");
8014 Clazz_load (["java.util.EventListener"], "java.awt.event.KeyListener", null, function () {
8015 Clazz_declareInterface (java.awt.event, "KeyListener", java.util.EventListener);
8016 });
8017 Clazz_declarePackage ("java.awt.event");
8018 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseListener", null, function () {
8019 Clazz_declareInterface (java.awt.event, "MouseListener", java.util.EventListener);
8020 });
8021 Clazz_declarePackage ("java.awt.event");
8022 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseMotionListener", null, function () {
8023 Clazz_declareInterface (java.awt.event, "MouseMotionListener", java.util.EventListener);
8024 });
8025 Clazz_declarePackage ("java.awt.event");
8026 Clazz_load (["java.util.EventListener"], "java.awt.event.MouseWheelListener", null, function () {
8027 Clazz_declareInterface (java.awt.event, "MouseWheelListener", java.util.EventListener);
8028 });
8029 Clazz_declarePackage ("java.awt.event");
8030 Clazz_load (["java.util.EventListener"], "java.awt.event.TextListener", null, function () {
8031 Clazz_declareInterface (java.awt.event, "TextListener", java.util.EventListener);
8032 });
8033 Clazz_declarePackage ("java.awt.event");
8034 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowFocusListener", null, function () {
8035 Clazz_declareInterface (java.awt.event, "WindowFocusListener", java.util.EventListener);
8036 });
8037 Clazz_declarePackage ("java.awt.event");
8038 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowListener", null, function () {
8039 Clazz_declareInterface (java.awt.event, "WindowListener", java.util.EventListener);
8040 });
8041 Clazz_declarePackage ("java.awt.event");
8042 Clazz_load (["java.util.EventListener"], "java.awt.event.WindowStateListener", null, function () {
8043 Clazz_declareInterface (java.awt.event, "WindowStateListener", java.util.EventListener);
8044 });
8045 Clazz_declarePackage ("java.awt");
8046 Clazz_load (null, "java.awt.Cursor", ["java.lang.IllegalArgumentException"], function () {
8047 c$ = Clazz_decorateAsClass (function () {
8048 this.type = 0;
8049 this.name = null;
8050 Clazz_instantialize (this, arguments);
8051 }, java.awt, "Cursor");
8052 c$.getPredefinedCursor = Clazz_defineMethod (c$, "getPredefinedCursor", 
8053 function (type) {
8054 if (type < 0 || type > 13) {
8055 throw  new IllegalArgumentException ("illegal cursor type");
8056 }var c = java.awt.Cursor.predefinedPrivate[type];
8057 if (c == null) {
8058 java.awt.Cursor.predefinedPrivate[type] = c =  new java.awt.Cursor (type);
8059 }if (java.awt.Cursor.predefined[type] == null) {
8060 java.awt.Cursor.predefined[type] = c;
8061 }return c;
8062 }, "~N");
8063 c$.getSystemCustomCursor = Clazz_defineMethod (c$, "getSystemCustomCursor", 
8064 function (name) {
8065 return null;
8066 }, "~S");
8067 c$.getDefaultCursor = Clazz_defineMethod (c$, "getDefaultCursor", 
8068 function () {
8069 return java.awt.Cursor.getPredefinedCursor (0);
8070 });
8071 Clazz_makeConstructor (c$, 
8072 function (type) {
8073 if (type < 0 || type > 13) {
8074 throw  new IllegalArgumentException ("illegal cursor type");
8075 }this.type = type;
8076 this.name = "TODO_CURSOR";
8077 }, "~N");
8078 Clazz_makeConstructor (c$, 
8079 function (name) {
8080 this.type = -1;
8081 this.name = name;
8082 }, "~S");
8083 Clazz_defineMethod (c$, "getType", 
8084 function () {
8085 return this.type;
8086 });
8087 Clazz_defineMethod (c$, "getName", 
8088 function () {
8089 return this.name;
8090 });
8091 Clazz_overrideMethod (c$, "toString", 
8092 function () {
8093 return this.getClass ().getName () + "[" + this.getName () + "]";
8094 });
8095 Clazz_defineStatics (c$,
8096 "DEFAULT_CURSOR", 0,
8097 "CROSSHAIR_CURSOR", 1,
8098 "TEXT_CURSOR", 2,
8099 "WAIT_CURSOR", 3,
8100 "SW_RESIZE_CURSOR", 4,
8101 "SE_RESIZE_CURSOR", 5,
8102 "NW_RESIZE_CURSOR", 6,
8103 "NE_RESIZE_CURSOR", 7,
8104 "N_RESIZE_CURSOR", 8,
8105 "S_RESIZE_CURSOR", 9,
8106 "W_RESIZE_CURSOR", 10,
8107 "E_RESIZE_CURSOR", 11,
8108 "HAND_CURSOR", 12,
8109 "MOVE_CURSOR", 13);
8110 c$.predefined = c$.prototype.predefined =  new Array (14);
8111 c$.predefinedPrivate = c$.prototype.predefinedPrivate =  new Array (14);
8112 Clazz_defineStatics (c$,
8113 "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"])]),
8114 "CUSTOM_CURSOR", -1);
8115 });
8116 Clazz_declarePackage ("java.awt");
8117 Clazz_load (["java.lang.Error"], "java.awt.AWTError", null, function () {
8118 c$ = Clazz_declareType (java.awt, "AWTError", Error);
8119 });
8120 Clazz_declarePackage ("java.awt");
8121 Clazz_load (null, "java.awt.Insets", ["java.lang.InternalError"], function () {
8122 c$ = Clazz_decorateAsClass (function () {
8123 this.top = 0;
8124 this.left = 0;
8125 this.bottom = 0;
8126 this.right = 0;
8127 Clazz_instantialize (this, arguments);
8128 }, java.awt, "Insets", null, [Cloneable, java.io.Serializable]);
8129 Clazz_makeConstructor (c$, 
8130 function (top, left, bottom, right) {
8131 this.top = top;
8132 this.left = left;
8133 this.bottom = bottom;
8134 this.right = right;
8135 }, "~N,~N,~N,~N");
8136 Clazz_defineMethod (c$, "set", 
8137 function (top, left, bottom, right) {
8138 this.top = top;
8139 this.left = left;
8140 this.bottom = bottom;
8141 this.right = right;
8142 }, "~N,~N,~N,~N");
8143 Clazz_overrideMethod (c$, "equals", 
8144 function (obj) {
8145 if (Clazz_instanceOf (obj, java.awt.Insets)) {
8146 var insets = obj;
8147 return ((this.top == insets.top) && (this.left == insets.left) && (this.bottom == insets.bottom) && (this.right == insets.right));
8148 }return false;
8149 }, "~O");
8150 Clazz_overrideMethod (c$, "hashCode", 
8151 function () {
8152 var sum1 = this.left + this.bottom;
8153 var sum2 = this.right + this.top;
8154 var val1 = Clazz_doubleToInt (sum1 * (sum1 + 1) / 2) + this.left;
8155 var val2 = Clazz_doubleToInt (sum2 * (sum2 + 1) / 2) + this.top;
8156 var sum3 = val1 + val2;
8157 return Clazz_doubleToInt (sum3 * (sum3 + 1) / 2) + val2;
8158 });
8159 Clazz_overrideMethod (c$, "toString", 
8160 function () {
8161 return this.getClass ().getName () + "[top=" + this.top + ",left=" + this.left + ",bottom=" + this.bottom + ",right=" + this.right + "]";
8162 });
8163 Clazz_defineMethod (c$, "clone", 
8164 function () {
8165 try {
8166 return Clazz_superCall (this, java.awt.Insets, "clone", []);
8167 } catch (e) {
8168 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8169 throw  new InternalError ();
8170 } else {
8171 throw e;
8172 }
8173 }
8174 });
8175 });
8176 Clazz_declarePackage ("java.awt");
8177 Clazz_load (["java.util.Map", "$.HashMap"], "java.awt.RenderingHints", ["java.lang.IllegalArgumentException", "$.InternalError", "java.util.Collections"], function () {
8178 c$ = Clazz_decorateAsClass (function () {
8179 this.hintmap = null;
8180 Clazz_instantialize (this, arguments);
8181 }, java.awt, "RenderingHints", null, [java.util.Map, Cloneable]);
8182 Clazz_prepareFields (c$, function () {
8183 this.hintmap =  new java.util.HashMap (7);
8184 });
8185 Clazz_overrideMethod (c$, "size", 
8186 function () {
8187 return this.hintmap.size ();
8188 });
8189 Clazz_overrideMethod (c$, "isEmpty", 
8190 function () {
8191 return this.hintmap.isEmpty ();
8192 });
8193 Clazz_overrideMethod (c$, "containsKey", 
8194 function (key) {
8195 return this.hintmap.containsKey (key);
8196 }, "~O");
8197 Clazz_overrideMethod (c$, "containsValue", 
8198 function (value) {
8199 return this.hintmap.containsValue (value);
8200 }, "~O");
8201 Clazz_overrideMethod (c$, "get", 
8202 function (key) {
8203 return this.hintmap.get (key);
8204 }, "~O");
8205 Clazz_overrideMethod (c$, "put", 
8206 function (key, value) {
8207 if (!(key).isCompatibleValue (value)) {
8208 throw  new IllegalArgumentException (value + " incompatible with " + key);
8209 }return this.hintmap.put (key, value);
8210 }, "~O,~O");
8211 Clazz_defineMethod (c$, "add", 
8212 function (hints) {
8213 this.hintmap.putAll (hints.hintmap);
8214 }, "java.awt.RenderingHints");
8215 Clazz_overrideMethod (c$, "clear", 
8216 function () {
8217 this.hintmap.clear ();
8218 });
8219 Clazz_overrideMethod (c$, "remove", 
8220 function (key) {
8221 return this.hintmap.remove (key);
8222 }, "~O");
8223 Clazz_overrideMethod (c$, "putAll", 
8224 function (m) {
8225 if (java.awt.RenderingHints.isInstance (m)) {
8226 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.hintmap.put (entry.getKey (), entry.getValue ());
8227
8228 } else {
8229 for (var entry, $entry = m.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) this.put (entry.getKey (), entry.getValue ());
8230
8231 }}, "java.util.Map");
8232 Clazz_overrideMethod (c$, "keySet", 
8233 function () {
8234 return this.hintmap.keySet ();
8235 });
8236 Clazz_overrideMethod (c$, "values", 
8237 function () {
8238 return this.hintmap.values ();
8239 });
8240 Clazz_overrideMethod (c$, "entrySet", 
8241 function () {
8242 return java.util.Collections.unmodifiableMap (this.hintmap).entrySet ();
8243 });
8244 Clazz_overrideMethod (c$, "equals", 
8245 function (o) {
8246 if (Clazz_instanceOf (o, java.awt.RenderingHints)) {
8247 return this.hintmap.equals ((o).hintmap);
8248 } else if (Clazz_instanceOf (o, java.util.Map)) {
8249 return this.hintmap.equals (o);
8250 }return false;
8251 }, "~O");
8252 Clazz_overrideMethod (c$, "hashCode", 
8253 function () {
8254 return this.hintmap.hashCode ();
8255 });
8256 Clazz_overrideMethod (c$, "clone", 
8257 function () {
8258 var rh;
8259 try {
8260 {
8261 rh = Clazz_clone(this);
8262 if (this.hintmap != null) { rh.hintmap =
8263 this.hintmap.cloneHM(); }
8264 }} catch (e) {
8265 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
8266 throw  new InternalError ();
8267 } else {
8268 throw e;
8269 }
8270 }
8271 return rh;
8272 });
8273 Clazz_overrideMethod (c$, "toString", 
8274 function () {
8275 if (this.hintmap == null) {
8276 return this.getClass ().getName () + "@" + Integer.toHexString (this.hashCode ()) + " (0 hints)";
8277 }return this.hintmap.toString ();
8278 });
8279 Clazz_pu$h(self.c$);
8280 c$ = Clazz_decorateAsClass (function () {
8281 this.privatekey = 0;
8282 Clazz_instantialize (this, arguments);
8283 }, java.awt.RenderingHints, "Key");
8284 Clazz_defineMethod (c$, "getIdentity", 
8285  function () {
8286 return this.getClass ().getName () + "@" + Integer.toHexString (System.identityHashCode (this.getClass ())) + ":" + Integer.toHexString (this.privatekey);
8287 });
8288 Clazz_defineMethod (c$, "recordIdentity", 
8289  function (a) {
8290 var b = a.getIdentity ();
8291 var c = java.awt.RenderingHints.Key.identitymap.get (b);
8292 if (c != null) {
8293 var d = c;
8294 if (d != null && d.getClass () === a.getClass ()) {
8295 throw  new IllegalArgumentException (b + " already registered");
8296 }}java.awt.RenderingHints.Key.identitymap.put (b, a);
8297 }, "java.awt.RenderingHints.Key");
8298 Clazz_makeConstructor (c$, 
8299 function (a) {
8300 this.privatekey = a;
8301 this.recordIdentity (this);
8302 }, "~N");
8303 Clazz_defineMethod (c$, "intKey", 
8304 function () {
8305 return this.privatekey;
8306 });
8307 Clazz_overrideMethod (c$, "equals", 
8308 function (a) {
8309 return this === a;
8310 }, "~O");
8311 c$.identitymap = c$.prototype.identitymap =  new java.util.HashMap (17);
8312 c$ = Clazz_p0p ();
8313 Clazz_pu$h(self.c$);
8314 c$ = Clazz_decorateAsClass (function () {
8315 this.description = null;
8316 Clazz_instantialize (this, arguments);
8317 }, java.awt.RenderingHints, "SunKey", java.awt.RenderingHints.Key);
8318 Clazz_makeConstructor (c$, 
8319 function (a, b) {
8320 Clazz_superConstructor (this, java.awt.RenderingHints.SunKey, [a]);
8321 this.description = b;
8322 }, "~N,~S");
8323 Clazz_defineMethod (c$, "getIndex", 
8324 function () {
8325 return this.privatekey;
8326 });
8327 Clazz_overrideMethod (c$, "toString", 
8328 function () {
8329 return this.description;
8330 });
8331 Clazz_overrideMethod (c$, "isCompatibleValue", 
8332 function (a) {
8333 if (Clazz_instanceOf (a, java.awt.RenderingHints.Value)) {
8334 return (a).isCompatibleKey (this);
8335 }return false;
8336 }, "~O");
8337 c$ = Clazz_p0p ();
8338 Clazz_pu$h(self.c$);
8339 c$ = Clazz_decorateAsClass (function () {
8340 this.myKey = null;
8341 this.index = 0;
8342 this.description = null;
8343 Clazz_instantialize (this, arguments);
8344 }, java.awt.RenderingHints, "Value");
8345 c$.register = Clazz_defineMethod (c$, "register", 
8346  function (a, b) {
8347 var c = a.getIndex ();
8348 var d = b.getIndex ();
8349 if (java.awt.RenderingHints.Value.ValueObjects[c][d] != null) {
8350 throw  new InternalError ("duplicate index: " + d);
8351 }java.awt.RenderingHints.Value.ValueObjects[c][d] = b;
8352 }, "java.awt.RenderingHints.SunKey,java.awt.RenderingHints.Value");
8353 c$.get = Clazz_defineMethod (c$, "get", 
8354 function (a, b) {
8355 return java.awt.RenderingHints.Value.ValueObjects[a][b];
8356 }, "~N,~N");
8357 Clazz_makeConstructor (c$, 
8358 function (a, b, c) {
8359 this.myKey = a;
8360 this.index = b;
8361 this.description = c;
8362 java.awt.RenderingHints.Value.register (a, this);
8363 }, "java.awt.RenderingHints.SunKey,~N,~S");
8364 Clazz_defineMethod (c$, "getIndex", 
8365 function () {
8366 return this.index;
8367 });
8368 Clazz_overrideMethod (c$, "toString", 
8369 function () {
8370 return this.description;
8371 });
8372 Clazz_defineMethod (c$, "isCompatibleKey", 
8373 function (a) {
8374 return this.myKey === a;
8375 }, "java.awt.RenderingHints.SunKey");
8376 Clazz_overrideMethod (c$, "hashCode", 
8377 function () {
8378 return this.description.hashCode ();
8379 });
8380 Clazz_overrideMethod (c$, "equals", 
8381 function (a) {
8382 return this === a;
8383 }, "~O");
8384 c$.ValueObjects = c$.prototype.ValueObjects =  Clazz_newArray (9, 8, null);
8385 c$ = Clazz_p0p ();
8386 Clazz_pu$h(self.c$);
8387 c$ = Clazz_declareType (java.awt.RenderingHints, "LCDContrastKey", java.awt.RenderingHints.SunKey);
8388 Clazz_overrideMethod (c$, "isCompatibleValue", 
8389 function (a) {
8390 if (Clazz_instanceOf (a, Integer)) {
8391 var b = (a).intValue ();
8392 return b >= 100 && b <= 250;
8393 }return false;
8394 }, "~O");
8395 c$ = Clazz_p0p ();
8396 Clazz_defineStatics (c$,
8397 "NUM_KEYS", 9,
8398 "VALS_PER_KEY", 8,
8399 "INTKEY_RENDERING", 0,
8400 "INTVAL_RENDER_DEFAULT", 0,
8401 "INTVAL_RENDER_SPEED", 1,
8402 "INTVAL_RENDER_QUALITY", 2,
8403 "INTKEY_ANTIALIASING", 1,
8404 "INTVAL_ANTIALIAS_DEFAULT", 0,
8405 "INTVAL_ANTIALIAS_OFF", 1,
8406 "INTVAL_ANTIALIAS_ON", 2,
8407 "INTKEY_TEXT_ANTIALIASING", 2,
8408 "INTVAL_TEXT_ANTIALIAS_DEFAULT", 0,
8409 "INTVAL_TEXT_ANTIALIAS_OFF", 1,
8410 "INTVAL_TEXT_ANTIALIAS_ON", 2,
8411 "INTVAL_TEXT_ANTIALIAS_GASP", 3,
8412 "INTVAL_TEXT_ANTIALIAS_LCD_HRGB", 4,
8413 "INTVAL_TEXT_ANTIALIAS_LCD_HBGR", 5,
8414 "INTVAL_TEXT_ANTIALIAS_LCD_VRGB", 6,
8415 "INTVAL_TEXT_ANTIALIAS_LCD_VBGR", 7,
8416 "INTKEY_FRACTIONALMETRICS", 3,
8417 "INTVAL_FRACTIONALMETRICS_DEFAULT", 0,
8418 "INTVAL_FRACTIONALMETRICS_OFF", 1,
8419 "INTVAL_FRACTIONALMETRICS_ON", 2,
8420 "INTKEY_DITHERING", 4,
8421 "INTVAL_DITHER_DEFAULT", 0,
8422 "INTVAL_DITHER_DISABLE", 1,
8423 "INTVAL_DITHER_ENABLE", 2,
8424 "INTKEY_INTERPOLATION", 5,
8425 "INTVAL_INTERPOLATION_NEAREST_NEIGHBOR", 0,
8426 "INTVAL_INTERPOLATION_BILINEAR", 1,
8427 "INTVAL_INTERPOLATION_BICUBIC", 2,
8428 "INTKEY_ALPHA_INTERPOLATION", 6,
8429 "INTVAL_ALPHA_INTERPOLATION_DEFAULT", 0,
8430 "INTVAL_ALPHA_INTERPOLATION_SPEED", 1,
8431 "INTVAL_ALPHA_INTERPOLATION_QUALITY", 2,
8432 "INTKEY_COLOR_RENDERING", 7,
8433 "INTVAL_COLOR_RENDER_DEFAULT", 0,
8434 "INTVAL_COLOR_RENDER_SPEED", 1,
8435 "INTVAL_COLOR_RENDER_QUALITY", 2,
8436 "INTKEY_STROKE_CONTROL", 8,
8437 "INTVAL_STROKE_DEFAULT", 0,
8438 "INTVAL_STROKE_NORMALIZE", 1,
8439 "INTVAL_STROKE_PURE", 2,
8440 "INTKEY_AATEXT_LCD_CONTRAST", 100);
8441 c$.KEY_RENDERING = c$.prototype.KEY_RENDERING =  new java.awt.RenderingHints.SunKey (0, "Global rendering quality key");
8442 c$.VALUE_RENDER_SPEED = c$.prototype.VALUE_RENDER_SPEED =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 1, "Fastest rendering methods");
8443 c$.VALUE_RENDER_QUALITY = c$.prototype.VALUE_RENDER_QUALITY =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 2, "Highest quality rendering methods");
8444 c$.VALUE_RENDER_DEFAULT = c$.prototype.VALUE_RENDER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_RENDERING, 0, "Default rendering methods");
8445 c$.KEY_ANTIALIASING = c$.prototype.KEY_ANTIALIASING =  new java.awt.RenderingHints.SunKey (1, "Global antialiasing enable key");
8446 c$.VALUE_ANTIALIAS_ON = c$.prototype.VALUE_ANTIALIAS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 2, "Antialiased rendering mode");
8447 c$.VALUE_ANTIALIAS_OFF = c$.prototype.VALUE_ANTIALIAS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 1, "Nonantialiased rendering mode");
8448 c$.VALUE_ANTIALIAS_DEFAULT = c$.prototype.VALUE_ANTIALIAS_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_ANTIALIASING, 0, "Default antialiasing rendering mode");
8449 c$.KEY_FRACTIONALMETRICS = c$.prototype.KEY_FRACTIONALMETRICS =  new java.awt.RenderingHints.SunKey (3, "Fractional metrics enable key");
8450 c$.VALUE_FRACTIONALMETRICS_ON = c$.prototype.VALUE_FRACTIONALMETRICS_ON =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 2, "Fractional text metrics mode");
8451 c$.VALUE_FRACTIONALMETRICS_OFF = c$.prototype.VALUE_FRACTIONALMETRICS_OFF =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_FRACTIONALMETRICS, 1, "Integer text metrics mode");
8452 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");
8453 c$.KEY_DITHERING = c$.prototype.KEY_DITHERING =  new java.awt.RenderingHints.SunKey (4, "Dithering quality key");
8454 c$.VALUE_DITHER_ENABLE = c$.prototype.VALUE_DITHER_ENABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 2, "Dithered rendering mode");
8455 c$.VALUE_DITHER_DISABLE = c$.prototype.VALUE_DITHER_DISABLE =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 1, "Nondithered rendering mode");
8456 c$.VALUE_DITHER_DEFAULT = c$.prototype.VALUE_DITHER_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_DITHERING, 0, "Default dithering mode");
8457 c$.KEY_INTERPOLATION = c$.prototype.KEY_INTERPOLATION =  new java.awt.RenderingHints.SunKey (5, "Image interpolation method key");
8458 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");
8459 c$.VALUE_INTERPOLATION_BILINEAR = c$.prototype.VALUE_INTERPOLATION_BILINEAR =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 1, "Bilinear image interpolation mode");
8460 c$.VALUE_INTERPOLATION_BICUBIC = c$.prototype.VALUE_INTERPOLATION_BICUBIC =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_INTERPOLATION, 2, "Bicubic image interpolation mode");
8461 c$.KEY_ALPHA_INTERPOLATION = c$.prototype.KEY_ALPHA_INTERPOLATION =  new java.awt.RenderingHints.SunKey (6, "Alpha blending interpolation method key");
8462 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");
8463 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");
8464 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");
8465 c$.KEY_COLOR_RENDERING = c$.prototype.KEY_COLOR_RENDERING =  new java.awt.RenderingHints.SunKey (7, "Color rendering quality key");
8466 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");
8467 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");
8468 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");
8469 c$.KEY_STROKE_CONTROL = c$.prototype.KEY_STROKE_CONTROL =  new java.awt.RenderingHints.SunKey (8, "Stroke normalization control key");
8470 c$.VALUE_STROKE_DEFAULT = c$.prototype.VALUE_STROKE_DEFAULT =  new java.awt.RenderingHints.Value (java.awt.RenderingHints.KEY_STROKE_CONTROL, 0, "Default stroke normalization");
8471 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");
8472 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");
8473 c$.KEY_TEXT_ANTIALIASING = c$.prototype.KEY_TEXT_ANTIALIASING =  new java.awt.RenderingHints.SunKey (2, "Text-specific antialiasing enable key");
8474 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");
8475 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");
8476 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");
8477 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");
8478 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");
8479 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");
8480 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");
8481 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");
8482 c$.KEY_TEXT_ANTIALIAS_LCD_CONTRAST = c$.prototype.KEY_TEXT_ANTIALIAS_LCD_CONTRAST =  new java.awt.RenderingHints.LCDContrastKey (100, "Text-specific LCD contrast key");
8483 c$.KEY_TEXT_LCD_CONTRAST = c$.prototype.KEY_TEXT_LCD_CONTRAST = java.awt.RenderingHints.KEY_TEXT_ANTIALIAS_LCD_CONTRAST;
8484 });
8485 //BH note: a declared static superclass must come before a static class referencing it
8486
8487 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(){
8488 c$=Clazz_declareType(java.util,"Collections");
8489 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8490 function(list,object){
8491 if(list==null){
8492 throw new NullPointerException();
8493 }if(list.isEmpty()){
8494 return-1;
8495 }var key=object;
8496 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8497 var it=list.listIterator();
8498 while(it.hasNext()){
8499 var result;
8500 if((result=key.compareTo(it.next()))<=0){
8501 if(result==0){
8502 return it.previousIndex();
8503 }return-it.previousIndex()-1;
8504 }}
8505 return-list.size()-1;
8506 }var low=0;
8507 var mid=list.size();
8508 var high=mid-1;
8509 var result=-1;
8510 while(low<=high){
8511 mid=(low+high)>>1;
8512 if((result=key.compareTo(list.get(mid)))>0){
8513 low=mid+1;
8514 }else if(result==0){
8515 return mid;
8516 }else{
8517 high=mid-1;
8518 }}
8519 return-mid-(result<0?1:2);
8520 },"java.util.List,~O");
8521 c$.binarySearch=Clazz_defineMethod(c$,"binarySearch",
8522 function(list,object,comparator){
8523 if(comparator==null){
8524 return java.util.Collections.binarySearch(list,object);
8525 }if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8526 var it=list.listIterator();
8527 while(it.hasNext()){
8528 var result;
8529 if((result=comparator.compare(object,it.next()))<=0){
8530 if(result==0){
8531 return it.previousIndex();
8532 }return-it.previousIndex()-1;
8533 }}
8534 return-list.size()-1;
8535 }var low=0;
8536 var mid=list.size();
8537 var high=mid-1;
8538 var result=-1;
8539 while(low<=high){
8540 mid=(low+high)>>1;
8541 if((result=comparator.compare(object,list.get(mid)))>0){
8542 low=mid+1;
8543 }else if(result==0){
8544 return mid;
8545 }else{
8546 high=mid-1;
8547 }}
8548 return-mid-(result<0?1:2);
8549 },"java.util.List,~O,java.util.Comparator");
8550 c$.copy=Clazz_defineMethod(c$,"copy",
8551 function(destination,source){
8552 if(destination.size()<source.size()){
8553 throw new ArrayIndexOutOfBoundsException();
8554 }var srcIt=source.iterator();
8555 var destIt=destination.listIterator();
8556 while(srcIt.hasNext()){
8557 try{
8558 destIt.next();
8559 }catch(e){
8560 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
8561 throw new ArrayIndexOutOfBoundsException();
8562 }else{
8563 throw e;
8564 }
8565 }
8566 destIt.set(srcIt.next());
8567 }
8568 },"java.util.List,java.util.List");
8569 c$.enumeration=Clazz_defineMethod(c$,"enumeration",
8570 function(collection){
8571 var c=collection;
8572
8573 if (!Clazz_isClassDefined("java.util.Collections$1"))
8574         java.util.Collections.$Collections$1$(c);
8575
8576 var x = Clazz_innerTypeInstance(java.util.Collections$1,this,null);
8577
8578 return x;
8579 },"java.util.Collection");
8580
8581 c$.fill=Clazz_defineMethod(c$,"fill",
8582 function(list,object){
8583 var it=list.listIterator();
8584 while(it.hasNext()){
8585 it.next();
8586 it.set(object);
8587 }
8588 },"java.util.List,~O");
8589 c$.max=Clazz_defineMethod(c$,"max",
8590 function(collection){
8591 var it=collection.iterator();
8592 var max=it.next();
8593 while(it.hasNext()){
8594 var next=it.next();
8595 if(max.compareTo(next)<0){
8596 max=next;
8597 }}
8598 return max;
8599 },"java.util.Collection");
8600 c$.max=Clazz_defineMethod(c$,"max",
8601 function(collection,comparator){
8602 var it=collection.iterator();
8603 var max=it.next();
8604 while(it.hasNext()){
8605 var next=it.next();
8606 if(comparator.compare(max,next)<0){
8607 max=next;
8608 }}
8609 return max;
8610 },"java.util.Collection,java.util.Comparator");
8611 c$.min=Clazz_defineMethod(c$,"min",
8612 function(collection){
8613 var it=collection.iterator();
8614 var min=it.next();
8615 while(it.hasNext()){
8616 var next=it.next();
8617 if(min.compareTo(next)>0){
8618 min=next;
8619 }}
8620 return min;
8621 },"java.util.Collection");
8622 c$.min=Clazz_defineMethod(c$,"min",
8623 function(collection,comparator){
8624 var it=collection.iterator();
8625 var min=it.next();
8626 while(it.hasNext()){
8627 var next=it.next();
8628 if(comparator.compare(min,next)>0){
8629 min=next;
8630 }}
8631 return min;
8632 },"java.util.Collection,java.util.Comparator");
8633 c$.nCopies=Clazz_defineMethod(c$,"nCopies",
8634 function(length,object){
8635 return new java.util.Collections.CopiesList(length,object);
8636 },"~N,~O");
8637 c$.reverse=Clazz_defineMethod(c$,"reverse",
8638 function(list){
8639 var size=list.size();
8640 var front=list.listIterator();
8641 var back=list.listIterator(size);
8642 for(var i=0;i<Math.floor(size/2);i++){
8643 var frontNext=front.next();
8644 var backPrev=back.previous();
8645 front.set(backPrev);
8646 back.set(frontNext);
8647 }
8648 },"java.util.List");
8649 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8650 function(){
8651 return new java.util.Collections.ReverseComparator();
8652 });
8653 c$.reverseOrder=Clazz_defineMethod(c$,"reverseOrder",
8654 function(c){
8655 if(c==null){
8656 return java.util.Collections.reverseOrder();
8657 }return new java.util.Collections.ReverseComparatorWithComparator(c);
8658 },"java.util.Comparator");
8659 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8660 function(list){
8661 java.util.Collections.shuffle(list,new java.util.Random());
8662 },"java.util.List");
8663 c$.shuffle=Clazz_defineMethod(c$,"shuffle",
8664 function(list,random){
8665 if(!(Clazz_instanceOf(list,java.util.RandomAccess))){
8666 var array=list.toArray();
8667 for(var i=array.length-1;i>0;i--){
8668 var index=random.nextInt()%(i+1);
8669 if(index<0){
8670 index=-index;
8671 }var temp=array[i];
8672 array[i]=array[index];
8673 array[index]=temp;
8674 }
8675 var i=0;
8676 var it=list.listIterator();
8677 while(it.hasNext()){
8678 it.next();
8679 it.set(array[i++]);
8680 }
8681 }else{
8682 var rawList=list;
8683 for(var i=rawList.size()-1;i>0;i--){
8684 var index=random.nextInt()%(i+1);
8685 if(index<0){
8686 index=-index;
8687 }rawList.set(index,rawList.set(i,rawList.get(index)));
8688 }
8689 }},"java.util.List,java.util.Random");
8690 c$.singleton=Clazz_defineMethod(c$,"singleton",
8691 function(object){
8692 return new java.util.Collections.SingletonSet(object);
8693 },"~O");
8694 c$.singletonList=Clazz_defineMethod(c$,"singletonList",
8695 function(object){
8696 return new java.util.Collections.SingletonList(object);
8697 },"~O");
8698 c$.singletonMap=Clazz_defineMethod(c$,"singletonMap",
8699 function(key,value){
8700 return new java.util.Collections.SingletonMap(key,value);
8701 },"~O,~O");
8702 c$.sort=Clazz_defineMethod(c$,"sort",
8703 function(list){
8704 var array=list.toArray();
8705 java.util.Arrays.sort(array);
8706 var i=0;
8707 var it=list.listIterator();
8708 while(it.hasNext()){
8709 it.next();
8710 it.set(array[i++]);
8711 }
8712 },"java.util.List");
8713 c$.sort=Clazz_defineMethod(c$,"sort",
8714 function(list,comparator){
8715 var array=list.toArray(new Array(list.size()));
8716 java.util.Arrays.sort(array,comparator);
8717 var i=0;
8718 var it=list.listIterator();
8719 while(it.hasNext()){
8720 it.next();
8721 it.set(array[i++]);
8722 }
8723 },"java.util.List,java.util.Comparator");
8724 c$.swap=Clazz_defineMethod(c$,"swap",
8725 function(list,index1,index2){
8726 if(list==null){
8727 throw new NullPointerException();
8728 }if(index1==index2){
8729 return;
8730 }var rawList=list;
8731 rawList.set(index2,rawList.set(index1,rawList.get(index2)));
8732 },"java.util.List,~N,~N");
8733 c$.replaceAll=Clazz_defineMethod(c$,"replaceAll",
8734 function(list,obj,obj2){
8735 var index;
8736 var found=false;
8737 while((index=list.indexOf(obj))>-1){
8738 found=true;
8739 list.set(index,obj2);
8740 }
8741 return found;
8742 },"java.util.List,~O,~O");
8743 c$.rotate=Clazz_defineMethod(c$,"rotate",
8744 function(lst,dist){
8745 var list=lst;
8746 var size=list.size();
8747 if(size==0){
8748 return;
8749 }var normdist;
8750 if(dist>0){
8751 normdist=dist%size;
8752 }else{
8753 normdist=size-((dist%size)*(-1));
8754 }if(normdist==0||normdist==size){
8755 return;
8756 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8757 var temp=list.get(0);
8758 var index=0;
8759 var beginIndex=0;
8760 for(var i=0;i<size;i++){
8761 index=(index+normdist)%size;
8762 temp=list.set(index,temp);
8763 if(index==beginIndex){
8764 index=++beginIndex;
8765 temp=list.get(beginIndex);
8766 }}
8767 }else{
8768 var divideIndex=(size-normdist)%size;
8769 var sublist1=list.subList(0,divideIndex);
8770 var sublist2=list.subList(divideIndex,size);
8771 java.util.Collections.reverse(sublist1);
8772 java.util.Collections.reverse(sublist2);
8773 java.util.Collections.reverse(list);
8774 }},"java.util.List,~N");
8775 c$.indexOfSubList=Clazz_defineMethod(c$,"indexOfSubList",
8776 function(list,sublist){
8777 var size=list.size();
8778 var sublistSize=sublist.size();
8779 if(sublistSize>size){
8780 return-1;
8781 }if(sublistSize==0){
8782 return 0;
8783 }var firstObj=sublist.get(0);
8784 var index=list.indexOf(firstObj);
8785 if(index==-1){
8786 return-1;
8787 }while(index<size&&(size-index>=sublistSize)){
8788 var listIt=list.listIterator(index);
8789 if((firstObj==null)?listIt.next()==null:firstObj.equals(listIt.next())){
8790 var sublistIt=sublist.listIterator(1);
8791 var difFound=false;
8792 while(sublistIt.hasNext()){
8793 var element=sublistIt.next();
8794 if(!listIt.hasNext()){
8795 return-1;
8796 }if((element==null)?listIt.next()!=null:!element.equals(listIt.next())){
8797 difFound=true;
8798 break;
8799 }}
8800 if(!difFound){
8801 return index;
8802 }}index++;
8803 }
8804 return-1;
8805 },"java.util.List,java.util.List");
8806 c$.lastIndexOfSubList=Clazz_defineMethod(c$,"lastIndexOfSubList",
8807 function(list,sublist){
8808 var sublistSize=sublist.size();
8809 var size=list.size();
8810 if(sublistSize>size){
8811 return-1;
8812 }if(sublistSize==0){
8813 return size;
8814 }var lastObj=sublist.get(sublistSize-1);
8815 var index=list.lastIndexOf(lastObj);
8816 while((index>-1)&&(index+1>=sublistSize)){
8817 var listIt=list.listIterator(index+1);
8818 if((lastObj==null)?listIt.previous()==null:lastObj.equals(listIt.previous())){
8819 var sublistIt=sublist.listIterator(sublistSize-1);
8820 var difFound=false;
8821 while(sublistIt.hasPrevious()){
8822 var element=sublistIt.previous();
8823 if(!listIt.hasPrevious()){
8824 return-1;
8825 }if((element==null)?listIt.previous()!=null:!element.equals(listIt.previous())){
8826 difFound=true;
8827 break;
8828 }}
8829 if(!difFound){
8830 return listIt.nextIndex();
8831 }}index--;
8832 }
8833 return-1;
8834 },"java.util.List,java.util.List");
8835 c$.list=Clazz_defineMethod(c$,"list",
8836 function(enumeration){
8837 var list=new java.util.ArrayList();
8838 while(enumeration.hasMoreElements()){
8839 list.add(enumeration.nextElement());
8840 }
8841 return list;
8842 },"java.util.Enumeration");
8843 c$.synchronizedCollection=Clazz_defineMethod(c$,"synchronizedCollection",
8844 function(collection){
8845 if(collection==null){
8846 throw new NullPointerException();
8847 }return new java.util.Collections.SynchronizedCollection(collection);
8848 },"java.util.Collection");
8849 c$.synchronizedList=Clazz_defineMethod(c$,"synchronizedList",
8850 function(list){
8851 if(list==null){
8852 throw new NullPointerException();
8853 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8854 return new java.util.Collections.SynchronizedRandomAccessList(list);
8855 }return new java.util.Collections.SynchronizedList(list);
8856 },"java.util.List");
8857 c$.synchronizedMap=Clazz_defineMethod(c$,"synchronizedMap",
8858 function(map){
8859 if(map==null){
8860 throw new NullPointerException();
8861 }return new java.util.Collections.SynchronizedMap(map);
8862 },"java.util.Map");
8863 c$.synchronizedSet=Clazz_defineMethod(c$,"synchronizedSet",
8864 function(set){
8865 if(set==null){
8866 throw new NullPointerException();
8867 }return new java.util.Collections.SynchronizedSet(set);
8868 },"java.util.Set");
8869 c$.synchronizedSortedMap=Clazz_defineMethod(c$,"synchronizedSortedMap",
8870 function(map){
8871 if(map==null){
8872 throw new NullPointerException();
8873 }return new java.util.Collections.SynchronizedSortedMap(map);
8874 },"java.util.SortedMap");
8875 c$.synchronizedSortedSet=Clazz_defineMethod(c$,"synchronizedSortedSet",
8876 function(set){
8877 if(set==null){
8878 throw new NullPointerException();
8879 }return new java.util.Collections.SynchronizedSortedSet(set);
8880 },"java.util.SortedSet");
8881 c$.unmodifiableCollection=Clazz_defineMethod(c$,"unmodifiableCollection",
8882 function(collection){
8883 if(collection==null){
8884 throw new NullPointerException();
8885 }return new java.util.Collections.UnmodifiableCollection(collection);
8886 },"java.util.Collection");
8887 c$.unmodifiableList=Clazz_defineMethod(c$,"unmodifiableList",
8888 function(list){
8889 if(list==null){
8890 throw new NullPointerException();
8891 }if(Clazz_instanceOf(list,java.util.RandomAccess)){
8892 return new java.util.Collections.UnmodifiableRandomAccessList(list);
8893 }return new java.util.Collections.UnmodifiableList(list);
8894 },"java.util.List");
8895 c$.unmodifiableMap=Clazz_defineMethod(c$,"unmodifiableMap",
8896 function(map){
8897 if(map==null){
8898 throw new NullPointerException();
8899 }return new java.util.Collections.UnmodifiableMap(map);
8900 },"java.util.Map");
8901 c$.unmodifiableSet=Clazz_defineMethod(c$,"unmodifiableSet",
8902 function(set){
8903 if(set==null){
8904 throw new NullPointerException();
8905 }return new java.util.Collections.UnmodifiableSet(set);
8906 },"java.util.Set");
8907 c$.unmodifiableSortedMap=Clazz_defineMethod(c$,"unmodifiableSortedMap",
8908 function(map){
8909 if(map==null){
8910 throw new NullPointerException();
8911 }return new java.util.Collections.UnmodifiableSortedMap(map);
8912 },"java.util.SortedMap");
8913 c$.unmodifiableSortedSet=Clazz_defineMethod(c$,"unmodifiableSortedSet",
8914 function(set){
8915 if(set==null){
8916 throw new NullPointerException();
8917 }return new java.util.Collections.UnmodifiableSortedSet(set);
8918 },"java.util.SortedSet");
8919 c$.frequency=Clazz_defineMethod(c$,"frequency",
8920 function(c,o){
8921 if(c==null){
8922 throw new NullPointerException();
8923 }if(c.isEmpty()){
8924 return 0;
8925 }
8926 var result=0;
8927 var itr=c.iterator();
8928 while(itr.hasNext()){
8929 var e=itr.next();
8930 if(o==null?e==null:o.equals(e)){
8931 result++;
8932 }}
8933 return result;
8934 },"java.util.Collection,~O");
8935
8936 c$.emptyList=Clazz_defineMethod(c$,"emptyList",
8937 function(){
8938 return java.util.Collections.EMPTY_LIST;
8939 });
8940 c$.emptySet=Clazz_defineMethod(c$,"emptySet",
8941 function(){
8942 return java.util.Collections.EMPTY_SET;
8943 });
8944 c$.emptyMap=Clazz_defineMethod(c$,"emptyMap",
8945 function(){
8946 return java.util.Collections.EMPTY_MAP;
8947 });
8948 c$.checkedCollection=Clazz_defineMethod(c$,"checkedCollection",
8949 function(c,type){
8950 return new java.util.Collections.CheckedCollection(c,type);
8951 },"java.util.Collection,Class");
8952 c$.checkedMap=Clazz_defineMethod(c$,"checkedMap",
8953 function(m,keyType,valueType){
8954 return new java.util.Collections.CheckedMap(m,keyType,valueType);
8955 },"java.util.Map,Class,Class");
8956 c$.checkedList=Clazz_defineMethod(c$,"checkedList",
8957 function(list,type){
8958 if(Clazz_instanceOf(list,java.util.RandomAccess)){
8959 return new java.util.Collections.CheckedRandomAccessList(list,type);
8960 }return new java.util.Collections.CheckedList(list,type);
8961 },"java.util.List,Class");
8962 c$.checkedSet=Clazz_defineMethod(c$,"checkedSet",
8963 function(s,type){
8964 return new java.util.Collections.CheckedSet(s,type);
8965 },"java.util.Set,Class");
8966 c$.checkedSortedMap=Clazz_defineMethod(c$,"checkedSortedMap",
8967 function(m,keyType,valueType){
8968 return new java.util.Collections.CheckedSortedMap(m,keyType,valueType);
8969 },"java.util.SortedMap,Class,Class");
8970 c$.checkedSortedSet=Clazz_defineMethod(c$,"checkedSortedSet",
8971 function(s,type){
8972 return new java.util.Collections.CheckedSortedSet(s,type);
8973 },"java.util.SortedSet,Class");
8974 c$.addAll=Clazz_defineMethod(c$,"addAll",
8975 function(c,a){
8976 var modified=false;
8977 for(var i=0;i<a.length;i++){
8978 modified=new Boolean(modified|c.add(a[i])).valueOf();
8979 }
8980 return modified;
8981 },"java.util.Collection,~A");
8982 c$.disjoint=Clazz_defineMethod(c$,"disjoint",
8983 function(c1,c2){
8984 if((Clazz_instanceOf(c1,java.util.Set))&&!(Clazz_instanceOf(c2,java.util.Set))||(c2.size())>c1.size()){
8985 var tmp=c1;
8986 c1=c2;
8987 c2=tmp;
8988 }var it=c1.iterator();
8989 while(it.hasNext()){
8990 if(c2.contains(it.next())){
8991 return false;
8992 }}
8993 return true;
8994 },"java.util.Collection,java.util.Collection");
8995 c$.checkType=Clazz_defineMethod(c$,"checkType",
8996 function(obj,type){
8997 if(!type.isInstance(obj)){
8998 throw new ClassCastException("Attempt to insert "+obj.getClass()+" element into collection with element type "+type);
8999 }return obj;
9000 },"~O,Class");
9001
9002 c$.$Collections$1$=function(c){
9003 Clazz_pu$h(self.c$);
9004 c$=Clazz_decorateAsClass(function(){
9005 Clazz_prepareCallback(this,arguments);
9006 this.it=null;
9007 Clazz_instantialize(this,arguments);
9008 },java.util,"Collections$1",null,java.util.Enumeration);
9009
9010 Clazz_prepareFields(c$,function(){
9011 this.it=c.iterator();
9012 });
9013
9014 Clazz_defineMethod(c$,"hasMoreElements",
9015 function(){
9016 return this.it.hasNext();
9017 });
9018 Clazz_defineMethod(c$,"nextElement",
9019 function(){
9020 return this.it.next();
9021 });
9022 c$=Clazz_p0p();
9023 };
9024
9025 Clazz_pu$h(self.c$);
9026 c$=Clazz_decorateAsClass(function(){
9027 this.n=0;
9028 this.element=null;
9029 Clazz_instantialize(this,arguments);
9030 },java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);
9031 Clazz_makeConstructor(c$,
9032 function(a,b){
9033 Clazz_superConstructor(this,java.util.Collections.CopiesList,[]);
9034 if(a<0){
9035 throw new IllegalArgumentException();
9036 }this.n=a;
9037 this.element=b;
9038 },"~N,~O");
9039 Clazz_overrideMethod(c$,"contains",
9040 function(a){
9041 return this.element==null?a==null:this.element.equals(a);
9042 },"~O");
9043 Clazz_overrideMethod(c$,"size",
9044 function(){
9045 return this.n;
9046 });
9047 Clazz_overrideMethod(c$,"get",
9048 function(a){
9049 if(0<=a&&a<this.n){
9050 return this.element;
9051 }throw new IndexOutOfBoundsException();
9052 },"~N");
9053 c$=Clazz_p0p();
9054 Clazz_pu$h(self.c$);
9055 c$=Clazz_declareType(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);
9056 Clazz_overrideMethod(c$,"contains",
9057 function(a){
9058 return false;
9059 },"~O");
9060 Clazz_overrideMethod(c$,"size",
9061 function(){
9062 return 0;
9063 });
9064 Clazz_overrideMethod(c$,"get",
9065 function(a){
9066 throw new IndexOutOfBoundsException();
9067 },"~N");
9068 c$=Clazz_p0p();
9069 Clazz_pu$h(self.c$);
9070 c$=Clazz_declareType(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);
9071 Clazz_overrideMethod(c$,"contains",
9072 function(a){
9073 return false;
9074 },"~O");
9075 Clazz_overrideMethod(c$,"size",
9076 function(){
9077 return 0;
9078 });
9079 Clazz_overrideMethod(c$,"iterator",
9080 function(){
9081 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));
9082 });
9083 c$.$Collections$EmptySet$1$=function(){
9084 Clazz_pu$h(self.c$);
9085 c$=Clazz_declareAnonymous(java.util,"Collections$EmptySet$1",null,java.util.Iterator);
9086 Clazz_overrideMethod(c$,"hasNext",
9087 function(){
9088 return false;
9089 });
9090 Clazz_overrideMethod(c$,"next",
9091 function(){
9092 throw new java.util.NoSuchElementException();
9093 });
9094 Clazz_overrideMethod(c$,"remove",
9095 function(){
9096 throw new UnsupportedOperationException();
9097 });
9098 c$=Clazz_p0p();
9099 };
9100 c$=Clazz_p0p();
9101 Clazz_pu$h(self.c$);
9102 c$=Clazz_declareType(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
9103 Clazz_overrideMethod(c$,"containsKey",
9104 function(a){
9105 return false;
9106 },"~O");
9107 Clazz_overrideMethod(c$,"containsValue",
9108 function(a){
9109 return false;
9110 },"~O");
9111 Clazz_overrideMethod(c$,"entrySet",
9112 function(){
9113 return java.util.Collections.EMPTY_SET;
9114 });
9115 Clazz_overrideMethod(c$,"get",
9116 function(a){
9117 return null;
9118 },"~O");
9119 Clazz_overrideMethod(c$,"keySet",
9120 function(){
9121 return java.util.Collections.EMPTY_SET;
9122 });
9123 Clazz_overrideMethod(c$,"values",
9124 function(){
9125 return java.util.Collections.EMPTY_LIST;
9126 });
9127 c$=Clazz_p0p();
9128 Clazz_pu$h(self.c$);
9129 c$=Clazz_declareType(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);
9130 Clazz_overrideMethod(c$,"compare",
9131 function(a,b){
9132 var c=b;
9133 return c.compareTo(a);
9134 },"~O,~O");
9135 c$=Clazz_p0p();
9136 Clazz_pu$h(self.c$);
9137 c$=Clazz_decorateAsClass(function(){
9138 this.comparator=null;
9139 Clazz_instantialize(this,arguments);
9140 },java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);
9141 Clazz_makeConstructor(c$,
9142 function(a){
9143 this.comparator=a;
9144 },"java.util.Comparator");
9145 Clazz_defineMethod(c$,"compare",
9146 function(a,b){
9147 return this.comparator.compare(b,a);
9148 },"~O,~O");
9149 c$=Clazz_p0p();
9150 Clazz_pu$h(self.c$);
9151 c$=Clazz_decorateAsClass(function(){
9152 this.element=null;
9153 Clazz_instantialize(this,arguments);
9154 },java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);
9155 Clazz_makeConstructor(c$,
9156 function(a){
9157 Clazz_superConstructor(this,java.util.Collections.SingletonSet,[]);
9158 this.element=a;
9159 },"~O");
9160 Clazz_overrideMethod(c$,"contains",
9161 function(a){
9162 return this.element==null?a==null:this.element.equals(a);
9163 },"~O");
9164 Clazz_overrideMethod(c$,"size",
9165 function(){
9166 return 1;
9167 });
9168 Clazz_overrideMethod(c$,"iterator",
9169 function(){
9170 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));
9171 });
9172 c$.$Collections$SingletonSet$1$=function(){
9173 Clazz_pu$h(self.c$);
9174 c$=Clazz_decorateAsClass(function(){
9175 Clazz_prepareCallback(this,arguments);
9176 this.$hasNext=true;
9177 Clazz_instantialize(this,arguments);
9178 },java.util,"Collections$SingletonSet$1",null,java.util.Iterator);
9179 Clazz_overrideMethod(c$,"hasNext",
9180 function(){
9181 return this.$hasNext;
9182 });
9183 Clazz_overrideMethod(c$,"next",
9184 function(){
9185 if(this.$hasNext){
9186 this.$hasNext=false;
9187 return this.b$["java.util.Collections.SingletonSet"].element;
9188 }throw new java.util.NoSuchElementException();
9189 });
9190 Clazz_overrideMethod(c$,"remove",
9191 function(){
9192 throw new UnsupportedOperationException();
9193 });
9194 c$=Clazz_p0p();
9195 };
9196 c$=Clazz_p0p();
9197 Clazz_pu$h(self.c$);
9198 c$=Clazz_decorateAsClass(function(){
9199 this.element=null;
9200 Clazz_instantialize(this,arguments);
9201 },java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);
9202 Clazz_makeConstructor(c$,
9203 function(a){
9204 Clazz_superConstructor(this,java.util.Collections.SingletonList,[]);
9205 this.element=a;
9206 },"~O");
9207 Clazz_overrideMethod(c$,"contains",
9208 function(a){
9209 return this.element==null?a==null:this.element.equals(a);
9210 },"~O");
9211 Clazz_overrideMethod(c$,"get",
9212 function(a){
9213 if(a==0){
9214 return this.element;
9215 }throw new IndexOutOfBoundsException();
9216 },"~N");
9217 Clazz_overrideMethod(c$,"size",
9218 function(){
9219 return 1;
9220 });
9221 c$=Clazz_p0p();
9222 Clazz_pu$h(self.c$);
9223 c$=Clazz_decorateAsClass(function(){
9224 this.k=null;
9225 this.v=null;
9226 Clazz_instantialize(this,arguments);
9227 },java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);
9228 Clazz_makeConstructor(c$,
9229 function(a,b){
9230 Clazz_superConstructor(this,java.util.Collections.SingletonMap,[]);
9231 this.k=a;
9232 this.v=b;
9233 },"~O,~O");
9234 Clazz_overrideMethod(c$,"containsKey",
9235 function(a){
9236 return this.k==null?a==null:this.k.equals(a);
9237 },"~O");
9238 Clazz_overrideMethod(c$,"containsValue",
9239 function(a){
9240 return this.v==null?a==null:this.v.equals(a);
9241 },"~O");
9242 Clazz_overrideMethod(c$,"get",
9243 function(a){
9244 if(this.containsKey(a)){
9245 return this.v;
9246 }return null;
9247 },"~O");
9248 Clazz_overrideMethod(c$,"size",
9249 function(){
9250 return 1;
9251 });
9252 Clazz_overrideMethod(c$,"entrySet",
9253 function(){
9254 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));
9255 });
9256 c$.$Collections$SingletonMap$1$=function(){
9257 Clazz_pu$h(self.c$);
9258 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);
9259 Clazz_overrideMethod(c$,"contains",
9260 function(a){
9261 if(Clazz_instanceOf(a,java.util.Map.Entry)){
9262 var b=a;
9263 return this.b$["java.util.Collections.SingletonMap"].containsKey(b.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(b.getValue());
9264 }return false;
9265 },"~O");
9266 Clazz_overrideMethod(c$,"size",
9267 function(){
9268 return 1;
9269 });
9270 Clazz_overrideMethod(c$,"iterator",
9271 function(){
9272 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));
9273 });
9274 c$=Clazz_p0p();
9275 };
9276 c$.$Collections$SingletonMap$1$1$=function(){
9277 Clazz_pu$h(self.c$);
9278 c$=Clazz_decorateAsClass(function(){
9279 Clazz_prepareCallback(this,arguments);
9280 this.$hasNext=true;
9281 Clazz_instantialize(this,arguments);
9282 },java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);
9283 Clazz_overrideMethod(c$,"hasNext",
9284 function(){
9285 return this.$hasNext;
9286 });
9287 Clazz_overrideMethod(c$,"next",
9288 function(){
9289 if(this.$hasNext){
9290 this.$hasNext=false;
9291 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));
9292 }throw new java.util.NoSuchElementException();
9293 });
9294 Clazz_overrideMethod(c$,"remove",
9295 function(){
9296 throw new UnsupportedOperationException();
9297 });
9298 c$=Clazz_p0p();
9299 };
9300 c$.$Collections$SingletonMap$1$1$1$=function(){
9301 Clazz_pu$h(self.c$);
9302 c$=Clazz_declareAnonymous(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);
9303 Clazz_overrideMethod(c$,"equals",
9304 function(a){
9305 return this.b$["java.util.Collections$SingletonMap$1"].contains(a);
9306 },"~O");
9307 Clazz_overrideMethod(c$,"getKey",
9308 function(){
9309 return this.b$["java.util.Collections.SingletonMap"].k;
9310 });
9311 Clazz_overrideMethod(c$,"getValue",
9312 function(){
9313 return this.b$["java.util.Collections.SingletonMap"].v;
9314 });
9315 Clazz_overrideMethod(c$,"hashCode",
9316 function(){
9317 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());
9318 });
9319 Clazz_overrideMethod(c$,"setValue",
9320 function(a){
9321 throw new UnsupportedOperationException();
9322 },"~O");
9323 c$=Clazz_p0p();
9324 };
9325 c$=Clazz_p0p();
9326 Clazz_pu$h(self.c$);
9327 c$=Clazz_decorateAsClass(function(){
9328 this.c=null;
9329 this.mutex=null;
9330 Clazz_instantialize(this,arguments);
9331 },java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);
9332 Clazz_makeConstructor(c$,
9333 function(a){
9334 this.c=a;
9335 this.mutex=this;
9336 },"java.util.Collection");
9337 Clazz_makeConstructor(c$,
9338 function(a,b){
9339 this.c=a;
9340 this.mutex=b;
9341 },"java.util.Collection,~O");
9342 Clazz_defineMethod(c$,"add",
9343 function(a){
9344 {
9345 return this.c.add(a);
9346 }},"~O");
9347 Clazz_defineMethod(c$,"addAll",
9348 function(a){
9349 {
9350 return this.c.addAll(a);
9351 }},"java.util.Collection");
9352 Clazz_defineMethod(c$,"clear",
9353 function(){
9354 {
9355 this.c.clear();
9356 }});
9357 Clazz_defineMethod(c$,"contains",
9358 function(a){
9359 {
9360 return this.c.contains(a);
9361 }},"~O");
9362 Clazz_defineMethod(c$,"containsAll",
9363 function(a){
9364 {
9365 return this.c.containsAll(a);
9366 }},"java.util.Collection");
9367 Clazz_defineMethod(c$,"isEmpty",
9368 function(){
9369 {
9370 return this.c.isEmpty();
9371 }});
9372 Clazz_defineMethod(c$,"iterator",
9373 function(){
9374 {
9375 return this.c.iterator();
9376 }});
9377 Clazz_defineMethod(c$,"remove",
9378 function(a){
9379 {
9380 return this.c.remove(a);
9381 }},"~O");
9382 Clazz_defineMethod(c$,"removeAll",
9383 function(a){
9384 {
9385 return this.c.removeAll(a);
9386 }},"java.util.Collection");
9387 Clazz_defineMethod(c$,"retainAll",
9388 function(a){
9389 {
9390 return this.c.retainAll(a);
9391 }},"java.util.Collection");
9392 Clazz_defineMethod(c$,"size",
9393 function(){
9394 {
9395 return this.c.size();
9396 }});
9397 Clazz_defineMethod(c$,"toArray",
9398 function(){
9399 {
9400 return this.c.toArray();
9401 }});
9402 Clazz_defineMethod(c$,"toString",
9403 function(){
9404 {
9405 return this.c.toString();
9406 }});
9407 Clazz_defineMethod(c$,"toArray",
9408 function(a){
9409 {
9410 return this.c.toArray(a);
9411 }},"~A");
9412 c$=Clazz_p0p();
9413
9414
9415 Clazz_pu$h(self.c$);
9416 c$=Clazz_decorateAsClass(function(){
9417 this.list=null;
9418 Clazz_instantialize(this,arguments);
9419 },java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);
9420 Clazz_makeConstructor(c$,
9421 function(a){
9422 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a]);
9423 this.list=a;
9424 },"java.util.List");
9425 Clazz_makeConstructor(c$,
9426 function(a,b){
9427 Clazz_superConstructor(this,java.util.Collections.SynchronizedList,[a,b]);
9428 this.list=a;
9429 },"java.util.List,~O");
9430 Clazz_defineMethod(c$,"add",
9431 function(a,b){
9432 {
9433 this.list.add(a,b);
9434 }},"~N,~O");
9435 Clazz_defineMethod(c$,"addAll",
9436 function(a,b){
9437 {
9438 return this.list.addAll(a,b);
9439 }},"~N,java.util.Collection");
9440 Clazz_overrideMethod(c$,"equals",
9441 function(a){
9442 {
9443 return this.list.equals(a);
9444 }},"~O");
9445 Clazz_defineMethod(c$,"get",
9446 function(a){
9447 {
9448 return this.list.get(a);
9449 }},"~N");
9450 Clazz_overrideMethod(c$,"hashCode",
9451 function(){
9452 {
9453 return this.list.hashCode();
9454 }});
9455 Clazz_defineMethod(c$,"indexOf",
9456 function(a){
9457 {
9458 return this.list.indexOf(a);
9459 }},"~O");
9460 Clazz_defineMethod(c$,"lastIndexOf",
9461 function(a){
9462 {
9463 return this.list.lastIndexOf(a);
9464 }},"~O");
9465 //Clazz_defineMethod(c$,"listIterator",
9466 //function(){
9467 //{
9468 //return this.list.listIterator();
9469 //}});
9470 Clazz_defineMethod(c$,"listIterator",
9471 function(a){
9472 {
9473 a || (a = 0);
9474 return this.list.listIterator(a);
9475 }},"~N");
9476 Clazz_defineMethod(c$,"remove",
9477 function(a){
9478 {
9479 return this.list.remove(a);
9480 }},"~N");
9481 Clazz_defineMethod(c$,"set",
9482 function(a,b){
9483 {
9484 return this.list.set(a,b);
9485 }},"~N,~O");
9486 Clazz_defineMethod(c$,"subList",
9487 function(a,b){
9488 {
9489 return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex);
9490 }},"~N,~N");
9491 c$=Clazz_p0p();
9492
9493
9494
9495 Clazz_pu$h(self.c$);
9496 c$=Clazz_declareType(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);
9497 Clazz_overrideMethod(c$,"subList",
9498 function(a,b){
9499 {
9500 return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex);
9501 }},"~N,~N");
9502 c$=Clazz_p0p();
9503
9504
9505
9506
9507 Clazz_pu$h(self.c$);
9508 c$=Clazz_decorateAsClass(function(){
9509 this.m=null;
9510 this.mutex=null;
9511 Clazz_instantialize(this,arguments);
9512 },java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
9513 Clazz_makeConstructor(c$,
9514 function(a){
9515 this.m=a;
9516 this.mutex=this;
9517 },"java.util.Map");
9518 Clazz_makeConstructor(c$,
9519 function(a,b){
9520 this.m=a;
9521 this.mutex=b;
9522 },"java.util.Map,~O");
9523 Clazz_defineMethod(c$,"clear",
9524 function(){
9525 {
9526 this.m.clear();
9527 }});
9528 Clazz_defineMethod(c$,"containsKey",
9529 function(a){
9530 {
9531 return this.m.containsKey(a);
9532 }},"~O");
9533 Clazz_defineMethod(c$,"containsValue",
9534 function(a){
9535 {
9536 return this.m.containsValue(a);
9537 }},"~O");
9538 Clazz_defineMethod(c$,"entrySet",
9539 function(){
9540 {
9541 return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex);
9542 }});
9543 Clazz_overrideMethod(c$,"equals",
9544 function(a){
9545 {
9546 return this.m.equals(a);
9547 }},"~O");
9548 Clazz_defineMethod(c$,"get",
9549 function(a){
9550 {
9551 return this.m.get(a);
9552 }},"~O");
9553 Clazz_overrideMethod(c$,"hashCode",
9554 function(){
9555 {
9556 return this.m.hashCode();
9557 }});
9558 Clazz_defineMethod(c$,"isEmpty",
9559 function(){
9560 {
9561 return this.m.isEmpty();
9562 }});
9563 Clazz_defineMethod(c$,"keySet",
9564 function(){
9565 {
9566 return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex);
9567 }});
9568 Clazz_defineMethod(c$,"put",
9569 function(a,b){
9570 {
9571 return this.m.put(a,b);
9572 }},"~O,~O");
9573 Clazz_defineMethod(c$,"putAll",
9574 function(a){
9575 {
9576 this.m.putAll(a);
9577 }},"java.util.Map");
9578 Clazz_defineMethod(c$,"remove",
9579 function(a){
9580 {
9581 return this.m.remove(a);
9582 }},"~O");
9583 Clazz_defineMethod(c$,"size",
9584 function(){
9585 {
9586 return this.m.size();
9587 }});
9588 Clazz_defineMethod(c$,"values",
9589 function(){
9590 {
9591 return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex);
9592 }});
9593 Clazz_defineMethod(c$,"toString",
9594 function(){
9595 {
9596 return this.m.toString();
9597 }});
9598 c$=Clazz_p0p();
9599 Clazz_pu$h(self.c$);
9600 c$=Clazz_declareType(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);
9601 Clazz_overrideMethod(c$,"equals",
9602 function(a){
9603 {
9604 return this.c.equals(a);
9605 }},"~O");
9606 Clazz_overrideMethod(c$,"hashCode",
9607 function(){
9608 {
9609 return this.c.hashCode();
9610 }});
9611 c$=Clazz_p0p();
9612 Clazz_pu$h(self.c$);
9613 c$=Clazz_decorateAsClass(function(){
9614 this.sm=null;
9615 Clazz_instantialize(this,arguments);
9616 },java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);
9617 Clazz_makeConstructor(c$,
9618 function(a){
9619 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a]);
9620 this.sm=a;
9621 },"java.util.SortedMap");
9622 Clazz_makeConstructor(c$,
9623 function(a,b){
9624 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedMap,[a,b]);
9625 this.sm=a;
9626 },"java.util.SortedMap,~O");
9627 Clazz_defineMethod(c$,"comparator",
9628 function(){
9629 {
9630 return this.sm.comparator();
9631 }});
9632 Clazz_defineMethod(c$,"firstKey",
9633 function(){
9634 {
9635 return this.sm.firstKey();
9636 }});
9637 Clazz_defineMethod(c$,"headMap",
9638 function(a){
9639 {
9640 return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex);
9641 }},"~O");
9642 Clazz_defineMethod(c$,"lastKey",
9643 function(){
9644 {
9645 return this.sm.lastKey();
9646 }});
9647 Clazz_defineMethod(c$,"subMap",
9648 function(a,b){
9649 {
9650 return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,b),this.mutex);
9651 }},"~O,~O");
9652 Clazz_defineMethod(c$,"tailMap",
9653 function(a){
9654 {
9655 return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex);
9656 }},"~O");
9657 c$=Clazz_p0p();
9658 Clazz_pu$h(self.c$);
9659 c$=Clazz_decorateAsClass(function(){
9660 this.ss=null;
9661 Clazz_instantialize(this,arguments);
9662 },java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);
9663 Clazz_makeConstructor(c$,
9664 function(a){
9665 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a]);
9666 this.ss=a;
9667 },"java.util.SortedSet");
9668 Clazz_makeConstructor(c$,
9669 function(a,b){
9670 Clazz_superConstructor(this,java.util.Collections.SynchronizedSortedSet,[a,b]);
9671 this.ss=a;
9672 },"java.util.SortedSet,~O");
9673 Clazz_defineMethod(c$,"comparator",
9674 function(){
9675 {
9676 return this.ss.comparator();
9677 }});
9678 Clazz_defineMethod(c$,"first",
9679 function(){
9680 {
9681 return this.ss.first();
9682 }});
9683 Clazz_defineMethod(c$,"headSet",
9684 function(a){
9685 {
9686 return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex);
9687 }},"~O");
9688 Clazz_defineMethod(c$,"last",
9689 function(){
9690 {
9691 return this.ss.last();
9692 }});
9693 Clazz_defineMethod(c$,"subSet",
9694 function(a,b){
9695 {
9696 return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex);
9697 }},"~O,~O");
9698 Clazz_defineMethod(c$,"tailSet",
9699 function(a){
9700 {
9701 return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex);
9702 }},"~O");
9703 c$=Clazz_p0p();
9704 Clazz_pu$h(self.c$);
9705 c$=Clazz_decorateAsClass(function(){
9706 this.c=null;
9707 Clazz_instantialize(this,arguments);
9708 },java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);
9709 Clazz_makeConstructor(c$,
9710 function(a){
9711 this.c=a;
9712 },"java.util.Collection");
9713 Clazz_overrideMethod(c$,"add",
9714 function(a){
9715 throw new UnsupportedOperationException();
9716 },"~O");
9717 Clazz_overrideMethod(c$,"addAll",
9718 function(a){
9719 throw new UnsupportedOperationException();
9720 },"java.util.Collection");
9721 Clazz_overrideMethod(c$,"clear",
9722 function(){
9723 throw new UnsupportedOperationException();
9724 });
9725 Clazz_defineMethod(c$,"contains",
9726 function(a){
9727 return this.c.contains(a);
9728 },"~O");
9729 Clazz_defineMethod(c$,"containsAll",
9730 function(a){
9731 return this.c.containsAll(a);
9732 },"java.util.Collection");
9733 Clazz_defineMethod(c$,"isEmpty",
9734 function(){
9735 return this.c.isEmpty();
9736 });
9737 Clazz_defineMethod(c$,"iterator",
9738 function(){
9739 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));
9740 });
9741 Clazz_overrideMethod(c$,"remove",
9742 function(a){
9743 throw new UnsupportedOperationException();
9744 },"~O");
9745 Clazz_overrideMethod(c$,"removeAll",
9746 function(a){
9747 throw new UnsupportedOperationException();
9748 },"java.util.Collection");
9749 Clazz_overrideMethod(c$,"retainAll",
9750 function(a){
9751 throw new UnsupportedOperationException();
9752 },"java.util.Collection");
9753 Clazz_defineMethod(c$,"size",
9754 function(){
9755 return this.c.size();
9756 });
9757 Clazz_defineMethod(c$,"toArray",
9758 function(){
9759 return this.c.toArray();
9760 });
9761 Clazz_defineMethod(c$,"toArray",
9762 function(a){
9763 return this.c.toArray(a);
9764 },"~A");
9765 Clazz_defineMethod(c$,"toString",
9766 function(){
9767 return this.c.toString();
9768 });
9769 c$.$Collections$UnmodifiableCollection$1$=function(){
9770 Clazz_pu$h(self.c$);
9771 c$=Clazz_decorateAsClass(function(){
9772 Clazz_prepareCallback(this,arguments);
9773 this.iterator=null;
9774 Clazz_instantialize(this,arguments);
9775 },java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);
9776 Clazz_prepareFields(c$,function(){
9777 this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator();
9778 });
9779 Clazz_defineMethod(c$,"hasNext",
9780 function(){
9781 return this.iterator.hasNext();
9782 });
9783 Clazz_defineMethod(c$,"next",
9784 function(){
9785 return this.iterator.next();
9786 });
9787 Clazz_overrideMethod(c$,"remove",
9788 function(){
9789 throw new UnsupportedOperationException();
9790 });
9791 c$=Clazz_p0p();
9792 };
9793 c$=Clazz_p0p();
9794
9795 //BH note: a declared static superclass must come before a static class referencing it
9796
9797 Clazz_pu$h(self.c$);
9798 c$=Clazz_decorateAsClass(function(){
9799 this.list=null;
9800 Clazz_instantialize(this,arguments);
9801 },java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);
9802 Clazz_makeConstructor(c$,
9803 function(a){
9804 Clazz_superConstructor(this,java.util.Collections.UnmodifiableList,[a]);
9805 this.list=a;
9806 },"java.util.List");
9807 Clazz_defineMethod(c$,"add",
9808 function(a,b){
9809 throw new UnsupportedOperationException();
9810 },"~N,~O");
9811 Clazz_defineMethod(c$,"addAll",
9812 function(a,b){
9813 throw new UnsupportedOperationException();
9814 },"~N,java.util.Collection");
9815 Clazz_overrideMethod(c$,"equals",
9816 function(a){
9817 return this.list.equals(a);
9818 },"~O");
9819 Clazz_defineMethod(c$,"get",
9820 function(a){
9821 return this.list.get(a);
9822 },"~N");
9823 Clazz_overrideMethod(c$,"hashcode",
9824 function(){
9825 return this.list.hashCode();
9826 });
9827 Clazz_defineMethod(c$,"indexOf",
9828 function(a){
9829 return this.list.indexOf(a);
9830 },"~O");
9831 Clazz_defineMethod(c$,"lastIndexOf",
9832 function(a){
9833 return this.list.lastIndexOf(a);
9834 },"~O");
9835 //Clazz_defineMethod(c$,"listIterator",
9836 //function(){
9837 //return this.listIterator(0);
9838 //});
9839 Clazz_defineMethod(c$,"listIterator",
9840 function(a){
9841 a || (a = 0);
9842 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));
9843 },"~N");
9844 Clazz_defineMethod(c$,"remove",
9845 function(a){
9846 throw new UnsupportedOperationException();
9847 },"~N");
9848 Clazz_overrideMethod(c$,"set",
9849 function(a,b){
9850 throw new UnsupportedOperationException();
9851 },"~N,~O");
9852 Clazz_defineMethod(c$,"subList",
9853 function(a,b){
9854 return new java.util.Collections.UnmodifiableList(this.list.subList(a,b));
9855 },"~N,~N");
9856 c$.$Collections$UnmodifiableList$1$=function(){
9857 Clazz_pu$h(self.c$);
9858 c$=Clazz_decorateAsClass(function(){
9859 Clazz_prepareCallback(this,arguments);
9860 this.iterator=null;
9861 Clazz_instantialize(this,arguments);
9862 },java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
9863 Clazz_prepareFields(c$,function(){
9864 this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location);
9865 });
9866 Clazz_overrideMethod(c$,"add",
9867 function(b){
9868 throw new UnsupportedOperationException();
9869 },"~O");
9870 Clazz_defineMethod(c$,"hasNext",
9871 function(){
9872 return this.iterator.hasNext();
9873 });
9874 Clazz_defineMethod(c$,"hasPrevious",
9875 function(){
9876 return this.iterator.hasPrevious();
9877 });
9878 Clazz_defineMethod(c$,"next",
9879 function(){
9880 return this.iterator.next();
9881 });
9882 Clazz_defineMethod(c$,"nextIndex",
9883 function(){
9884 return this.iterator.nextIndex();
9885 });
9886 Clazz_defineMethod(c$,"previous",
9887 function(){
9888 return this.iterator.previous();
9889 });
9890 Clazz_defineMethod(c$,"previousIndex",
9891 function(){
9892 return this.iterator.previousIndex();
9893 });
9894 Clazz_overrideMethod(c$,"remove",
9895 function(){
9896 throw new UnsupportedOperationException();
9897 });
9898 Clazz_overrideMethod(c$,"set",
9899 function(b){
9900 throw new UnsupportedOperationException();
9901 },"~O");
9902 c$=Clazz_p0p();
9903 };
9904 c$=Clazz_p0p();
9905
9906
9907
9908
9909 Clazz_pu$h(self.c$);
9910 c$=Clazz_declareType(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);
9911 Clazz_overrideMethod(c$,"subList",
9912 function(a,b){
9913 return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,b));
9914 },"~N,~N");
9915 c$=Clazz_p0p();
9916
9917
9918 Clazz_pu$h(self.c$);
9919 c$=Clazz_declareType(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);
9920 Clazz_overrideMethod(c$,"equals",
9921 function(a){
9922 return this.c.equals(a);
9923 },"~O");
9924 Clazz_overrideMethod(c$,"hashCode",
9925 function(){
9926 return this.c.hashCode();
9927 });
9928 c$=Clazz_p0p();
9929
9930
9931 Clazz_pu$h(self.c$);
9932 c$=Clazz_decorateAsClass(function(){
9933 this.m=null;
9934 Clazz_instantialize(this,arguments);
9935 },java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);
9936 Clazz_makeConstructor(c$,
9937 function(a){
9938 this.m=a;
9939 },"java.util.Map");
9940 Clazz_overrideMethod(c$,"clear",
9941 function(){
9942 throw new UnsupportedOperationException();
9943 });
9944 Clazz_defineMethod(c$,"containsKey",
9945 function(a){
9946 return this.m.containsKey(a);
9947 },"~O");
9948 Clazz_defineMethod(c$,"containsValue",
9949 function(a){
9950 return this.m.containsValue(a);
9951 },"~O");
9952 Clazz_defineMethod(c$,"entrySet",
9953 function(){
9954 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet());
9955 });
9956 Clazz_overrideMethod(c$,"equals",
9957 function(a){
9958 return this.m.equals(a);
9959 },"~O");
9960 Clazz_defineMethod(c$,"get",
9961 function(a){
9962 return this.m.get(a);
9963 },"~O");
9964 Clazz_overrideMethod(c$,"hashcode",
9965 function(){
9966 return this.m.hashCode();
9967 });
9968 Clazz_defineMethod(c$,"isEmpty",
9969 function(){
9970 return this.m.isEmpty();
9971 });
9972 Clazz_defineMethod(c$,"keySet",
9973 function(){
9974 return new java.util.Collections.UnmodifiableSet(this.m.keySet());
9975 });
9976 Clazz_overrideMethod(c$,"put",
9977 function(a,b){
9978 throw new UnsupportedOperationException();
9979 },"~O,~O");
9980 Clazz_overrideMethod(c$,"putAll",
9981 function(a){
9982 throw new UnsupportedOperationException();
9983 },"java.util.Map");
9984 Clazz_overrideMethod(c$,"remove",
9985 function(a){
9986 throw new UnsupportedOperationException();
9987 },"~O");
9988 Clazz_defineMethod(c$,"size",
9989 function(){
9990 return this.m.size();
9991 });
9992 Clazz_defineMethod(c$,"values",
9993 function(){
9994 return new java.util.Collections.UnmodifiableCollection(this.m.values());
9995 });
9996 Clazz_defineMethod(c$,"toString",
9997 function(){
9998 return this.m.toString();
9999 });
10000
10001
10002
10003
10004
10005
10006
10007 Clazz_pu$h(self.c$);
10008 c$=Clazz_declareType(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);
10009 Clazz_overrideMethod(c$,"iterator",
10010 function(){
10011 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));
10012 });
10013 Clazz_defineMethod(c$,"toArray",
10014 function(){
10015 var a=this.c.size();
10016 var b=new Array(a);
10017 var c=this.iterator();
10018 for(var d=a;--d>=0;){
10019 b[d]=c.next();
10020 }
10021 return b;
10022 });
10023 Clazz_defineMethod(c$,"toArray",
10024 function(a){
10025 var b=this.c.size();
10026 var c=0;
10027 var d=this.iterator();
10028 if(b>a.length){
10029 var e=a.getClass().getComponentType();
10030 a=java.lang.reflect.Array.newInstance(e,b);
10031 }while(c<b){
10032 a[c++]=d.next();
10033 }
10034 if(c<a.length){
10035 a[c]=null;
10036 }return a;
10037 },"~A");
10038 c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){
10039 Clazz_pu$h(self.c$);
10040 c$=Clazz_decorateAsClass(function(){
10041 Clazz_prepareCallback(this,arguments);
10042 this.iterator=null;
10043 Clazz_instantialize(this,arguments);
10044 },java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);
10045 Clazz_prepareFields(c$,function(){
10046 this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator();
10047 });
10048 Clazz_defineMethod(c$,"hasNext",
10049 function(){
10050 return this.iterator.hasNext();
10051 });
10052 Clazz_defineMethod(c$,"next",
10053 function(){
10054 return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next());
10055 });
10056 Clazz_overrideMethod(c$,"remove",
10057 function(){
10058 throw new UnsupportedOperationException();
10059 });
10060 c$=Clazz_p0p();
10061 };
10062 Clazz_pu$h(self.c$);
10063 c$=Clazz_decorateAsClass(function(){
10064 this.mapEntry=null;
10065 Clazz_instantialize(this,arguments);
10066 },java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);
10067 Clazz_makeConstructor(c$,
10068 function(a){
10069 this.mapEntry=a;
10070 },"java.util.Map.Entry");
10071 Clazz_overrideMethod(c$,"equals",
10072 function(a){
10073 return this.mapEntry.equals(a);
10074 },"~O");
10075 Clazz_defineMethod(c$,"getKey",
10076 function(){
10077 return this.mapEntry.getKey();
10078 });
10079 Clazz_defineMethod(c$,"getValue",
10080 function(){
10081 return this.mapEntry.getValue();
10082 });
10083 Clazz_overrideMethod(c$,"hashcode",
10084 function(){
10085 return this.mapEntry.hashCode();
10086 });
10087 Clazz_overrideMethod(c$,"setValue",
10088 function(a){
10089 throw new UnsupportedOperationException();
10090 },"~O");
10091 Clazz_defineMethod(c$,"toString",
10092 function(){
10093 return this.mapEntry.toString();
10094 });
10095 c$=Clazz_p0p();
10096 c$=Clazz_p0p();
10097 c$=Clazz_p0p();
10098
10099
10100
10101 Clazz_pu$h(self.c$);
10102 c$=Clazz_decorateAsClass(function(){
10103 this.sm=null;
10104 Clazz_instantialize(this,arguments);
10105 },java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);
10106 Clazz_makeConstructor(c$,
10107 function(a){
10108 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedMap,[a]);
10109 this.sm=a;
10110 },"java.util.SortedMap");
10111 Clazz_defineMethod(c$,"comparator",
10112 function(){
10113 return this.sm.comparator();
10114 });
10115 Clazz_defineMethod(c$,"firstKey",
10116 function(){
10117 return this.sm.firstKey();
10118 });
10119 Clazz_defineMethod(c$,"headMap",
10120 function(a){
10121 return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a));
10122 },"~O");
10123 Clazz_defineMethod(c$,"lastKey",
10124 function(){
10125 return this.sm.lastKey();
10126 });
10127 Clazz_defineMethod(c$,"subMap",
10128 function(a,b){
10129 return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,b));
10130 },"~O,~O");
10131 Clazz_defineMethod(c$,"tailMap",
10132 function(a){
10133 return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a));
10134 },"~O");
10135 c$=Clazz_p0p();
10136 Clazz_pu$h(self.c$);
10137 c$=Clazz_decorateAsClass(function(){
10138 this.ss=null;
10139 Clazz_instantialize(this,arguments);
10140 },java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);
10141 Clazz_makeConstructor(c$,
10142 function(a){
10143 Clazz_superConstructor(this,java.util.Collections.UnmodifiableSortedSet,[a]);
10144 this.ss=a;
10145 },"java.util.SortedSet");
10146 Clazz_defineMethod(c$,"comparator",
10147 function(){
10148 return this.ss.comparator();
10149 });
10150 Clazz_defineMethod(c$,"first",
10151 function(){
10152 return this.ss.first();
10153 });
10154 Clazz_defineMethod(c$,"headSet",
10155 function(a){
10156 return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a));
10157 },"~O");
10158 Clazz_defineMethod(c$,"last",
10159 function(){
10160 return this.ss.last();
10161 });
10162 Clazz_defineMethod(c$,"subSet",
10163 function(a,b){
10164 return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b));
10165 },"~O,~O");
10166 Clazz_defineMethod(c$,"tailSet",
10167 function(a){
10168 return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a));
10169 },"~O");
10170 c$=Clazz_p0p();
10171 Clazz_pu$h(self.c$);
10172 c$=Clazz_decorateAsClass(function(){
10173 this.c=null;
10174 this.type=null;
10175 Clazz_instantialize(this,arguments);
10176 },java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);
10177 Clazz_makeConstructor(c$,
10178 function(a,b){
10179 if(a==null||b==null){
10180 throw new NullPointerException();
10181 }this.c=a;
10182 this.type=b;
10183 },"java.util.Collection,Class");
10184 Clazz_defineMethod(c$,"size",
10185 function(){
10186 return this.c.size();
10187 });
10188 Clazz_defineMethod(c$,"isEmpty",
10189 function(){
10190 return this.c.isEmpty();
10191 });
10192 Clazz_defineMethod(c$,"contains",
10193 function(a){
10194 return this.c.contains(a);
10195 },"~O");
10196 Clazz_defineMethod(c$,"iterator",
10197 function(){
10198 var a=this.c.iterator();
10199 if(Clazz_instanceOf(a,java.util.ListIterator)){
10200 a=new java.util.Collections.CheckedListIterator(a,this.type);
10201 }return a;
10202 });
10203 Clazz_defineMethod(c$,"toArray",
10204 function(){
10205 return this.c.toArray();
10206 });
10207 Clazz_defineMethod(c$,"toArray",
10208 function(a){
10209 return this.c.toArray(a);
10210 },"~A");
10211 Clazz_defineMethod(c$,"add",
10212 function(a){
10213 return this.c.add(java.util.Collections.checkType(a,this.type));
10214 },"~O");
10215 Clazz_defineMethod(c$,"remove",
10216 function(a){
10217 return this.c.remove(a);
10218 },"~O");
10219 Clazz_defineMethod(c$,"containsAll",
10220 function(a){
10221 return this.c.containsAll(a);
10222 },"java.util.Collection");
10223 Clazz_overrideMethod(c$,"addAll",
10224 function(a){
10225 var b=a.size();
10226 if(b==0){
10227 return false;
10228 }var c=new Array(b);
10229 var d=a.iterator();
10230 for(var e=0;e<b;e++){
10231 c[e]=java.util.Collections.checkType(d.next(),this.type);
10232 }
10233 var f=false;
10234 for(var g=0;g<b;g++){
10235 f=new Boolean(f|this.c.add(c[g])).valueOf();
10236 }
10237 return f;
10238 },"java.util.Collection");
10239 Clazz_defineMethod(c$,"removeAll",
10240 function(a){
10241 return this.c.removeAll(a);
10242 },"java.util.Collection");
10243 Clazz_defineMethod(c$,"retainAll",
10244 function(a){
10245 return this.c.retainAll(a);
10246 },"java.util.Collection");
10247 Clazz_defineMethod(c$,"clear",
10248 function(){
10249 this.c.clear();
10250 });
10251 Clazz_defineMethod(c$,"toString",
10252 function(){
10253 return this.c.toString();
10254 });
10255 c$=Clazz_p0p();
10256 Clazz_pu$h(self.c$);
10257 c$=Clazz_decorateAsClass(function(){
10258 this.i=null;
10259 this.type=null;
10260 Clazz_instantialize(this,arguments);
10261 },java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);
10262 Clazz_makeConstructor(c$,
10263 function(a,b){
10264 this.i=a;
10265 this.type=b;
10266 },"java.util.ListIterator,Class");
10267 Clazz_defineMethod(c$,"hasNext",
10268 function(){
10269 return this.i.hasNext();
10270 });
10271 Clazz_defineMethod(c$,"next",
10272 function(){
10273 return this.i.next();
10274 });
10275 Clazz_defineMethod(c$,"remove",
10276 function(){
10277 this.i.remove();
10278 });
10279 Clazz_defineMethod(c$,"hasPrevious",
10280 function(){
10281 return this.i.hasPrevious();
10282 });
10283 Clazz_defineMethod(c$,"previous",
10284 function(){
10285 return this.i.previous();
10286 });
10287 Clazz_defineMethod(c$,"nextIndex",
10288 function(){
10289 return this.i.nextIndex();
10290 });
10291 Clazz_defineMethod(c$,"previousIndex",
10292 function(){
10293 return this.i.previousIndex();
10294 });
10295 Clazz_defineMethod(c$,"set",
10296 function(a){
10297 this.i.set(java.util.Collections.checkType(a,this.type));
10298 },"~O");
10299 Clazz_defineMethod(c$,"add",
10300 function(a){
10301 this.i.add(java.util.Collections.checkType(a,this.type));
10302 },"~O");
10303 c$=Clazz_p0p();
10304 Clazz_pu$h(self.c$);
10305 c$=Clazz_decorateAsClass(function(){
10306 this.l=null;
10307 Clazz_instantialize(this,arguments);
10308 },java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);
10309 Clazz_makeConstructor(c$,
10310 function(a,b){
10311 Clazz_superConstructor(this,java.util.Collections.CheckedList,[a,b]);
10312 this.l=a;
10313 },"java.util.List,Class");
10314 Clazz_defineMethod(c$,"addAll",
10315 function(a,b){
10316 var c=b.size();
10317 if(c==0){
10318 return false;
10319 }var d=new Array(c);
10320 var e=b.iterator();
10321 for(var f=0;f<c;f++){
10322 d[f]=java.util.Collections.checkType(e.next(),this.type);
10323 }
10324 return this.l.addAll(a,java.util.Arrays.asList(d));
10325 },"~N,java.util.Collection");
10326 Clazz_defineMethod(c$,"get",
10327 function(a){
10328 return this.l.get(a);
10329 },"~N");
10330 Clazz_defineMethod(c$,"set",
10331 function(a,b){
10332 return this.l.set(a,java.util.Collections.checkType(b,this.type));
10333 },"~N,~O");
10334 Clazz_defineMethod(c$,"add",
10335 function(a,b){
10336 this.l.add(a,java.util.Collections.checkType(b,this.type));
10337 },"~N,~O");
10338 Clazz_defineMethod(c$,"remove",
10339 function(a){
10340 return this.l.remove(a);
10341 },"~N");
10342 Clazz_defineMethod(c$,"indexOf",
10343 function(a){
10344 return this.l.indexOf(a);
10345 },"~O");
10346 Clazz_defineMethod(c$,"lastIndexOf",
10347 function(a){
10348 return this.l.lastIndexOf(a);
10349 },"~O");
10350 //Clazz_defineMethod(c$,"listIterator",
10351 //function(){
10352 //return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type);
10353 //});
10354 Clazz_defineMethod(c$,"listIterator",
10355 function(a){
10356 a || (a = 0);
10357 return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type);
10358 },"~N");
10359 Clazz_defineMethod(c$,"subList",
10360 function(a,b){
10361 return java.util.Collections.checkedList(this.l.subList(a,b),this.type);
10362 },"~N,~N");
10363 Clazz_overrideMethod(c$,"equals",
10364 function(a){
10365 return this.l.equals(a);
10366 },"~O");
10367 Clazz_overrideMethod(c$,"hashcode",
10368 function(){
10369 return this.l.hashCode();
10370 });
10371 c$=Clazz_p0p();
10372 Clazz_pu$h(self.c$);
10373 c$=Clazz_declareType(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);
10374 c$=Clazz_p0p();
10375 Clazz_pu$h(self.c$);
10376 c$=Clazz_declareType(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);
10377 Clazz_overrideMethod(c$,"equals",
10378 function(a){
10379 return this.c.equals(a);
10380 },"~O");
10381 Clazz_overrideMethod(c$,"hashCode",
10382 function(){
10383 return this.c.hashCode();
10384 });
10385 c$=Clazz_p0p();
10386 Clazz_pu$h(self.c$);
10387 c$=Clazz_decorateAsClass(function(){
10388 this.m=null;
10389 this.keyType=null;
10390 this.valueType=null;
10391 Clazz_instantialize(this,arguments);
10392 },java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);
10393 Clazz_makeConstructor(c$,
10394 ($fz=function(a,b,c){
10395 if(a==null||b==null||c==null){
10396 throw new NullPointerException();
10397 }this.m=a;
10398 this.keyType=b;
10399 this.valueType=c;
10400 },$fz.isPrivate=true,$fz),"java.util.Map,Class,Class");
10401 Clazz_defineMethod(c$,"size",
10402 function(){
10403 return this.m.size();
10404 });
10405 Clazz_defineMethod(c$,"isEmpty",
10406 function(){
10407 return this.m.isEmpty();
10408 });
10409 Clazz_defineMethod(c$,"containsKey",
10410 function(a){
10411 return this.m.containsKey(a);
10412 },"~O");
10413 Clazz_defineMethod(c$,"containsValue",
10414 function(a){
10415 return this.m.containsValue(a);
10416 },"~O");
10417 Clazz_defineMethod(c$,"get",
10418 function(a){
10419 return this.m.get(a);
10420 },"~O");
10421 Clazz_defineMethod(c$,"put",
10422 function(a,b){
10423 return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType));
10424 },"~O,~O");
10425 Clazz_defineMethod(c$,"remove",
10426 function(a){
10427 return this.m.remove(a);
10428 },"~O");
10429 Clazz_overrideMethod(c$,"putAll",
10430 function(a){
10431 var b=a.size();
10432 if(b==0){
10433 return;
10434 }var c=new Array(b);
10435 var d=a.entrySet().iterator();
10436 for(var e=0;e<b;e++){
10437 var f=d.next();
10438 java.util.Collections.checkType(f.getKey(),this.keyType);
10439 java.util.Collections.checkType(f.getValue(),this.valueType);
10440 c[e]=f;
10441 }
10442 for(var f=0;f<b;f++){
10443 this.m.put(c[f].getKey(),c[f].getValue());
10444 }
10445 },"java.util.Map");
10446 Clazz_defineMethod(c$,"clear",
10447 function(){
10448 this.m.clear();
10449 });
10450 Clazz_defineMethod(c$,"keySet",
10451 function(){
10452 return this.m.keySet();
10453 });
10454 Clazz_defineMethod(c$,"values",
10455 function(){
10456 return this.m.values();
10457 });
10458 Clazz_defineMethod(c$,"entrySet",
10459 function(){
10460 return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType);
10461 });
10462 Clazz_overrideMethod(c$,"equals",
10463 function(a){
10464 return this.m.equals(a);
10465 },"~O");
10466 Clazz_overrideMethod(c$,"hashcode",
10467 function(){
10468 return this.m.hashCode();
10469 });
10470 Clazz_defineMethod(c$,"toString",
10471 function(){
10472 return this.m.toString();
10473 });
10474 Clazz_pu$h(self.c$);
10475 c$=Clazz_decorateAsClass(function(){
10476 this.e=null;
10477 this.valueType=null;
10478 Clazz_instantialize(this,arguments);
10479 },java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);
10480 Clazz_makeConstructor(c$,
10481 function(a,b){
10482 if(a==null){
10483 throw new NullPointerException();
10484 }this.e=a;
10485 this.valueType=b;
10486 },"java.util.Map.Entry,Class");
10487 Clazz_defineMethod(c$,"getKey",
10488 function(){
10489 return this.e.getKey();
10490 });
10491 Clazz_defineMethod(c$,"getValue",
10492 function(){
10493 return this.e.getValue();
10494 });
10495 Clazz_defineMethod(c$,"setValue",
10496 function(a){
10497 return this.e.setValue(java.util.Collections.checkType(a,this.valueType));
10498 },"~O");
10499 Clazz_overrideMethod(c$,"equals",
10500 function(a){
10501 return this.e.equals(a);
10502 },"~O");
10503 Clazz_overrideMethod(c$,"hashcode",
10504 function(){
10505 return this.e.hashCode();
10506 });
10507 c$=Clazz_p0p();
10508 Clazz_pu$h(self.c$);
10509 c$=Clazz_decorateAsClass(function(){
10510 this.s=null;
10511 this.valueType=null;
10512 Clazz_instantialize(this,arguments);
10513 },java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);
10514 Clazz_makeConstructor(c$,
10515 function(a,b){
10516 this.s=a;
10517 this.valueType=b;
10518 },"java.util.Set,Class");
10519 Clazz_defineMethod(c$,"iterator",
10520 function(){
10521 return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType);
10522 });
10523 Clazz_defineMethod(c$,"toArray",
10524 function(){
10525 var a=this.size();
10526 var b=new Array(a);
10527 var c=this.iterator();
10528 for(var d=0;d<a;d++){
10529 b[d]=c.next();
10530 }
10531 return b;
10532 });
10533 Clazz_defineMethod(c$,"toArray",
10534 function(a){
10535 var b=this.size();
10536 if(a.length<b){
10537 var c=a.getClass().getComponentType();
10538 a=java.lang.reflect.Array.newInstance(c,b);
10539 }var c=this.iterator();
10540 for(var d=0;d<b;d++){
10541 a[d]=c.next();
10542 }
10543 if(b<a.length){
10544 a[b]=null;
10545 }return a;
10546 },"~A");
10547 Clazz_defineMethod(c$,"retainAll",
10548 function(a){
10549 return this.s.retainAll(a);
10550 },"java.util.Collection");
10551 Clazz_defineMethod(c$,"removeAll",
10552 function(a){
10553 return this.s.removeAll(a);
10554 },"java.util.Collection");
10555 Clazz_defineMethod(c$,"containsAll",
10556 function(a){
10557 return this.s.containsAll(a);
10558 },"java.util.Collection");
10559 Clazz_overrideMethod(c$,"addAll",
10560 function(a){
10561 throw new UnsupportedOperationException();
10562 },"java.util.Collection");
10563 Clazz_defineMethod(c$,"remove",
10564 function(a){
10565 return this.s.remove(a);
10566 },"~O");
10567 Clazz_defineMethod(c$,"contains",
10568 function(a){
10569 return this.s.contains(a);
10570 },"~O");
10571 Clazz_overrideMethod(c$,"add",
10572 function(a){
10573 throw new UnsupportedOperationException();
10574 },"java.util.Map.Entry");
10575 Clazz_defineMethod(c$,"isEmpty",
10576 function(){
10577 return this.s.isEmpty();
10578 });
10579 Clazz_defineMethod(c$,"clear",
10580 function(){
10581 this.s.clear();
10582 });
10583 Clazz_defineMethod(c$,"size",
10584 function(){
10585 return this.s.size();
10586 });
10587 Clazz_overrideMethod(c$,"hashcode",
10588 function(){
10589 return this.s.hashCode();
10590 });
10591 Clazz_overrideMethod(c$,"equals",
10592 function(a){
10593 return this.s.equals(a);
10594 },"~O");
10595 Clazz_pu$h(self.c$);
10596 c$=Clazz_decorateAsClass(function(){
10597 this.i=null;
10598 this.valueType=null;
10599 Clazz_instantialize(this,arguments);
10600 },java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
10601 Clazz_makeConstructor(c$,
10602 function(a,b){
10603 this.i=a;
10604 this.valueType=b;
10605 },"java.util.Iterator,Class");
10606 Clazz_defineMethod(c$,"hasNext",
10607 function(){
10608 return this.i.hasNext();
10609 });
10610 Clazz_defineMethod(c$,"remove",
10611 function(){
10612 this.i.remove();
10613 });
10614 Clazz_defineMethod(c$,"next",
10615 function(){
10616 return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType);
10617 });
10618 c$=Clazz_p0p();
10619 c$=Clazz_p0p();
10620 c$=Clazz_p0p();
10621 Clazz_pu$h(self.c$);
10622 c$=Clazz_decorateAsClass(function(){
10623 this.ss=null;
10624 Clazz_instantialize(this,arguments);
10625 },java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);
10626 Clazz_makeConstructor(c$,
10627 function(a,b){
10628 Clazz_superConstructor(this,java.util.Collections.CheckedSortedSet,[a,b]);
10629 this.ss=a;
10630 },"java.util.SortedSet,Class");
10631 Clazz_defineMethod(c$,"comparator",
10632 function(){
10633 return this.ss.comparator();
10634 });
10635 Clazz_defineMethod(c$,"subSet",
10636 function(a,b){
10637 return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type);
10638 },"~O,~O");
10639 Clazz_defineMethod(c$,"headSet",
10640 function(a){
10641 return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type);
10642 },"~O");
10643 Clazz_defineMethod(c$,"tailSet",
10644 function(a){
10645 return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type);
10646 },"~O");
10647 Clazz_defineMethod(c$,"first",
10648 function(){
10649 return this.ss.first();
10650 });
10651 Clazz_defineMethod(c$,"last",
10652 function(){
10653 return this.ss.last();
10654 });
10655 c$=Clazz_p0p();
10656 Clazz_pu$h(self.c$);
10657 c$=Clazz_decorateAsClass(function(){
10658 this.sm=null;
10659 Clazz_instantialize(this,arguments);
10660 },java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);
10661 Clazz_makeConstructor(c$,
10662 function(a,b,c){
10663 Clazz_superConstructor(this,java.util.Collections.CheckedSortedMap,[a,b,c]);
10664 this.sm=a;
10665 },"java.util.SortedMap,Class,Class");
10666 Clazz_defineMethod(c$,"comparator",
10667 function(){
10668 return this.sm.comparator();
10669 });
10670 Clazz_defineMethod(c$,"subMap",
10671 function(a,b){
10672 return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType);
10673 },"~O,~O");
10674 Clazz_defineMethod(c$,"headMap",
10675 function(a){
10676 return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType);
10677 },"~O");
10678 Clazz_defineMethod(c$,"tailMap",
10679 function(a){
10680 return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType);
10681 },"~O");
10682 Clazz_defineMethod(c$,"firstKey",
10683 function(){
10684 return this.sm.firstKey();
10685 });
10686 Clazz_defineMethod(c$,"lastKey",
10687 function(){
10688 return this.sm.lastKey();
10689 });
10690 c$=Clazz_p0p();
10691 c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList();
10692 c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet();
10693 c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap();
10694 });
10695 Clazz_load(["java.util.Map"],"java.util.SortedMap",null,function(){
10696 Clazz_declareInterface(java.util,"SortedMap",java.util.Map);
10697 });
10698 Clazz_load(["java.util.Set"],"java.util.SortedSet",null,function(){
10699 Clazz_declareInterface(java.util,"SortedSet",java.util.Set);
10700 });
10701 Clazz_load(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){
10702 c$=Clazz_decorateAsClass(function(){
10703 this.haveNextNextGaussian=false;
10704 this.seed=0;
10705 this.nextNextGaussian=0;
10706 Clazz_instantialize(this,arguments);
10707 },java.util,"Random",null,java.io.Serializable);
10708 Clazz_makeConstructor(c$,
10709 function(){
10710 this.setSeed(System.currentTimeMillis());
10711 });
10712 Clazz_makeConstructor(c$,
10713 function(seed){
10714 this.setSeed(seed);
10715 },"~N");
10716 Clazz_defineMethod(c$,"next",
10717 function(bits){
10718 this.seed=(this.seed*25214903917+0xb)&(281474976710655);
10719 return(this.seed>>>(48-bits));
10720 },"~N");
10721 Clazz_defineMethod(c$,"nextBoolean",
10722 function(){
10723 return Math.random()>0.5;
10724 });
10725 Clazz_defineMethod(c$,"nextBytes",
10726 function(buf){
10727 for(var i=0;i<bytes.length;i++){
10728 bytes[i]=Math.round(0x100*Math.random());
10729 }
10730 },"~A");
10731 Clazz_defineMethod(c$,"nextDouble",
10732 function(){
10733 return Math.random();
10734 });
10735 Clazz_defineMethod(c$,"nextFloat",
10736 function(){
10737 return Math.random();
10738 });
10739 Clazz_defineMethod(c$,"nextGaussian",
10740 function(){
10741 if(this.haveNextNextGaussian){
10742 this.haveNextNextGaussian=false;
10743 return this.nextNextGaussian;
10744 }var v1;
10745 var v2;
10746 var s;
10747 do{
10748 v1=2*this.nextDouble()-1;
10749 v2=2*this.nextDouble()-1;
10750 s=v1*v1+v2*v2;
10751 }while(s>=1);
10752 var norm=Math.sqrt(-2*Math.log(s)/s);
10753 this.nextNextGaussian=v2*norm;
10754 this.haveNextNextGaussian=true;
10755 return v1*norm;
10756 });
10757 Clazz_defineMethod(c$,"nextInt",
10758 function(){
10759 return Math.ceil(0xffff*Math.random())-0x8000;
10760 });
10761 Clazz_defineMethod(c$,"nextInt",
10762 function(n){
10763 if(n>0){
10764 n = Math.min(n, 31);
10765 return Math.floor((2 << (n - 1)) * Math.random())
10766
10767 /*
10768 if((n&-n)==n){
10769 return((n*this.next(31))>>31);
10770 }var bits;
10771 var val;
10772 do{
10773 bits=this.next(31);
10774 val=bits%n;
10775 }while(bits-val+(n-1)<0);
10776
10777
10778 return val;
10779
10780 */
10781 }
10782 throw new IllegalArgumentException();
10783 },"~N");
10784 Clazz_defineMethod(c$,"nextLong",
10785 function(){
10786 return Math.ceil(0xffffffff*Math.random())-0x80000000;
10787 });
10788 Clazz_defineMethod(c$,"setSeed",
10789 function(seed){
10790 Math.seedrandom(seed);
10791 //this.seed=(seed^25214903917)&(281474976710655);
10792 //this.haveNextNextGaussian=false;
10793 },"~N");
10794 Clazz_defineStatics(c$,
10795 "multiplier",0x5deece66d);
10796 });
10797
10798 // seedrandom.js
10799 // Author: David Bau 3/11/2010
10800 //
10801 // Defines a method Math.seedrandom() that, when called, substitutes
10802 // an explicitly seeded RC4-based algorithm for Math.random().  Also
10803 // supports automatic seeding from local or network sources of entropy.
10804 //
10805 // Usage:
10806 //
10807 //   <script src=http://davidbau.com/encode/seedrandom-min.js></script>
10808 //
10809 //   Math.seedrandom('yipee'); Sets Math.random to a function that is
10810 //                             initialized using the given explicit seed.
10811 //
10812 //   Math.seedrandom();        Sets Math.random to a function that is
10813 //                             seeded using the current time, dom state,
10814 //                             and other accumulated local entropy.
10815 //                             The generated seed string is returned.
10816 //
10817 //   Math.seedrandom('yowza', true);
10818 //                             Seeds using the given explicit seed mixed
10819 //                             together with accumulated entropy.
10820 //
10821 //   <script src="http://bit.ly/srandom-512"></script>
10822 //                             Seeds using physical random bits downloaded
10823 //                             from random.org.
10824 //
10825 // Examples:
10826 //
10827 //   Math.seedrandom("hello");            // Use "hello" as the seed.
10828 //   document.write(Math.random());       // Always 0.5463663768140734
10829 //   document.write(Math.random());       // Always 0.43973793770592234
10830 //   var rng1 = Math.random;              // Remember the current prng.
10831 //
10832 //   var autoseed = Math.seedrandom();    // New prng with an automatic seed.
10833 //   document.write(Math.random());       // Pretty much unpredictable.
10834 //
10835 //   Math.random = rng1;                  // Continue "hello" prng sequence.
10836 //   document.write(Math.random());       // Always 0.554769432473455
10837 //
10838 //   Math.seedrandom(autoseed);           // Restart at the previous seed.
10839 //   document.write(Math.random());       // Repeat the 'unpredictable' value.
10840 //
10841 // Notes:
10842 //
10843 // Each time seedrandom('arg') is called, entropy from the passed seed
10844 // is accumulated in a pool to help generate future seeds for the
10845 // zero-argument form of Math.seedrandom, so entropy can be injected over
10846 // time by calling seedrandom with explicit data repeatedly.
10847 //
10848 // On speed - This javascript implementation of Math.random() is about
10849 // 3-10x slower than the built-in Math.random() because it is not native
10850 // code, but this is typically fast enough anyway.  Seeding is more expensive,
10851 // especially if you use auto-seeding.  Some details (timings on Chrome 4):
10852 //
10853 // Our Math.random()            - avg less than 0.002 milliseconds per call
10854 // seedrandom('explicit')       - avg less than 0.5 milliseconds per call
10855 // seedrandom('explicit', true) - avg less than 2 milliseconds per call
10856 // seedrandom()                 - avg about 38 milliseconds per call
10857 //
10858 // LICENSE (BSD):
10859 //
10860 // Copyright 2010 David Bau, all rights reserved.
10861 //
10862 // Redistribution and use in source and binary forms, with or without
10863 // modification, are permitted provided that the following conditions are met:
10864 //
10865 //   1. Redistributions of source code must retain the above copyright
10866 //      notice, this list of conditions and the following disclaimer.
10867 //
10868 //   2. Redistributions in binary form must reproduce the above copyright
10869 //      notice, this list of conditions and the following disclaimer in the
10870 //      documentation and/or other materials provided with the distribution.
10871 //
10872 //   3. Neither the name of this module nor the names of its contributors may
10873 //      be used to endorse or promote products derived from this software
10874 //      without specific prior written permission.
10875 //
10876 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
10877 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
10878 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
10879 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
10880 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
10881 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10882 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10883 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
10884 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
10885 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
10886 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10887 //
10888 /**
10889  * All code is in an anonymous closure to keep the global namespace clean.
10890  *
10891  * @param {number=} overflow
10892  * @param {number=} startdenom
10893  */
10894 (function (pool, math, width, chunks, significance, overflow, startdenom) {
10895
10896 var copyright = "Copyright 2010 David Bau, all rights reserved. (BSD)"
10897 //
10898 // seedrandom()
10899 // This is the seedrandom function described above.
10900 //
10901 math['seedrandom'] = function seedrandom(seed, use_entropy) {
10902   var key = [];
10903   var arc4;
10904
10905   // Flatten the seed string or build one from local entropy if needed.
10906   seed = mixkey(flatten(
10907     use_entropy ? [seed, pool] :
10908     arguments.length ? seed :
10909     [new Date().getTime(), pool, window], 3), key);
10910
10911   // Use the seed to initialize an ARC4 generator.
10912   arc4 = new ARC4(key);
10913
10914   // Mix the randomness into accumulated entropy.
10915   mixkey(arc4.S, pool);
10916
10917   // Override Math.random
10918
10919   // This function returns a random double in [0, 1) that contains
10920   // randomness in every bit of the mantissa of the IEEE 754 value.
10921
10922   math['random'] = function random() {  // Closure to return a random double:
10923     var n = arc4.g(chunks);             // Start with a numerator n < 2 ^ 48
10924     var d = startdenom;                 //   and denominator d = 2 ^ 48.
10925     var x = 0;                          //   and no 'extra last byte'.
10926     while (n < significance) {          // Fill up all significant digits by
10927       n = (n + x) * width;              //   shifting numerator and
10928       d *= width;                       //   denominator and generating a
10929       x = arc4.g(1);                    //   new least-significant-byte.
10930     }
10931     while (n >= overflow) {             // To avoid rounding up, before adding
10932       n /= 2;                           //   last byte, shift everything
10933       d /= 2;                           //   right using integer math until
10934       x >>>= 1;                         //   we have exactly the desired bits.
10935     }
10936     return (n + x) / d;                 // Form the number within [0, 1).
10937   };
10938
10939   // Return the seed that was used
10940   return seed;
10941 };
10942
10943 //
10944 // ARC4
10945 //
10946 // An ARC4 implementation.  The constructor takes a key in the form of
10947 // an array of at most (width) integers that should be 0 <= x < (width).
10948 //
10949 // The g(count) method returns a pseudorandom integer that concatenates
10950 // the next (count) outputs from ARC4.  Its return value is a number x
10951 // that is in the range 0 <= x < (width ^ count).
10952 //
10953 /** @constructor */
10954 function ARC4(key) {
10955   var t, u, me = this, keylen = key.length;
10956   var i = 0, j = me.i = me.j = me.m = 0;
10957   me.S = [];
10958   me.c = [];
10959
10960   // The empty key [] is treated as [0].
10961   if (!keylen) { key = [keylen++]; }
10962
10963   // Set up S using the standard key scheduling algorithm.
10964   while (i < width) { me.S[i] = i++; }
10965   for (i = 0; i < width; i++) {
10966     t = me.S[i];
10967     j = lowbits(j + t + key[i % keylen]);
10968     u = me.S[j];
10969     me.S[i] = u;
10970     me.S[j] = t;
10971   }
10972
10973   // The "g" method returns the next (count) outputs as one number.
10974   me.g = function getnext(count) {
10975     var s = me.S;
10976     var i = lowbits(me.i + 1); var t = s[i];
10977     var j = lowbits(me.j + t); var u = s[j];
10978     s[i] = u;
10979     s[j] = t;
10980     var r = s[lowbits(t + u)];
10981     while (--count) {
10982       i = lowbits(i + 1); t = s[i];
10983       j = lowbits(j + t); u = s[j];
10984       s[i] = u;
10985       s[j] = t;
10986       r = r * width + s[lowbits(t + u)];
10987     }
10988     me.i = i;
10989     me.j = j;
10990     return r;
10991   };
10992   // For robust unpredictability discard an initial batch of values.
10993   // See http://www.rsa.com/rsalabs/node.asp?id=2009
10994   me.g(width);
10995 }
10996
10997 //
10998 // flatten()
10999 // Converts an object tree to nested arrays of strings.
11000 //
11001 /** @param {Object=} result
11002   * @param {string=} prop */
11003 function flatten(obj, depth, result, prop) {
11004   result = [];
11005   if (depth && typeof(obj) == 'object') {
11006     for (prop in obj) {
11007       if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
11008         try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
11009       }
11010     }
11011   }
11012   return result.length ? result : '' + obj;
11013 }
11014
11015 //
11016 // mixkey()
11017 // Mixes a string seed into a key that is an array of integers, and
11018 // returns a shortened string seed that is equivalent to the result key.
11019 //
11020 /** @param {number=} smear
11021   * @param {number=} j */
11022 function mixkey(seed, key, smear, j) {
11023   seed += '';                         // Ensure the seed is a string
11024   smear = 0;
11025   for (j = 0; j < seed.length; j++) {
11026     key[lowbits(j)] =
11027       lowbits((smear ^= key[lowbits(j)] * 19) + seed.charCodeAt(j));
11028   }
11029   seed = '';
11030   for (j in key) { seed += String.fromCharCode(key[j]); }
11031   return seed;
11032 }
11033
11034 //
11035 // lowbits()
11036 // A quick "n mod width" for width a power of 2.
11037 //
11038 function lowbits(n) { return n & (width - 1); }
11039
11040 //
11041 // The following constants are related to IEEE 754 limits.
11042 //
11043 startdenom = math.pow(width, chunks);
11044 significance = math.pow(2, significance);
11045 overflow = significance * 2;
11046
11047 //
11048 // When seedrandom.js is loaded, we immediately mix a few bits
11049 // from the built-in RNG into the entropy pool.  Because we do
11050 // not want to intefere with determinstic PRNG state later,
11051 // seedrandom will not call math.random on its own again after
11052 // initialization.
11053 //
11054 mixkey(math.random(), pool);
11055
11056 // End anonymous scope, and pass initial values.
11057 })(
11058   [],   // pool: entropy pool starts empty
11059   Math, // math: package containing random, pow, and seedrandom
11060   256,  // width: each RC4 output is 0 <= x < 256
11061   6,    // chunks: at least six RC4 outputs for each double
11062   52    // significance: there are 52 significant digits in a double
11063 );
11064
11065 Clazz_declarePackage ("java.awt.event");
11066 Clazz_load (["java.util.EventListenerProxy", "java.awt.event.AWTEventListener"], "java.awt.event.AWTEventListenerProxy", null, function () {
11067 c$ = Clazz_decorateAsClass (function () {
11068 this.eventMask = 0;
11069 Clazz_instantialize (this, arguments);
11070 }, java.awt.event, "AWTEventListenerProxy", java.util.EventListenerProxy, java.awt.event.AWTEventListener);
11071 Clazz_makeConstructor (c$, 
11072 function (eventMask, listener) {
11073 Clazz_superConstructor (this, java.awt.event.AWTEventListenerProxy, [listener]);
11074 this.eventMask = eventMask;
11075 }, "~N,java.awt.event.AWTEventListener");
11076 Clazz_defineMethod (c$, "eventDispatched", 
11077 function (evt) {
11078 (this.getListener ()).eventDispatched (evt);
11079 }, "java.awt.AWTEvent");
11080 Clazz_defineMethod (c$, "getEventMask", 
11081 function () {
11082 return this.eventMask;
11083 });
11084 });
11085 Clazz_declarePackage ("java.beans");
11086 Clazz_load (["java.beans.ChangeListenerMap"], "java.beans.PropertyChangeSupport", ["java.lang.Boolean", "$.NullPointerException", "java.beans.IndexedPropertyChangeEvent", "$.PropertyChangeEvent", "$.PropertyChangeListenerProxy"], function () {
11087 c$ = Clazz_decorateAsClass (function () {
11088 this.map = null;
11089 this.source = null;
11090 Clazz_instantialize (this, arguments);
11091 }, java.beans, "PropertyChangeSupport");
11092 Clazz_prepareFields (c$, function () {
11093 this.map =  new java.beans.PropertyChangeSupport.PropertyChangeListenerMap ();
11094 });
11095 Clazz_makeConstructor (c$, 
11096 function (sourceBean) {
11097 if (sourceBean == null) {
11098 throw  new NullPointerException ();
11099 }this.source = sourceBean;
11100 }, "~O");
11101 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11102 function (listener) {
11103 this.addPropertyChangeListener1 (listener);
11104 }, "java.beans.PropertyChangeListener");
11105 Clazz_defineMethod (c$, "addPropertyChangeListener1", 
11106 function (listener) {
11107 if (listener == null) {
11108 return;
11109 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11110 var proxy = listener;
11111 this.addPropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11112 } else {
11113 this.map.add (null, listener);
11114 }}, "java.beans.PropertyChangeListener");
11115 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11116 function (listener) {
11117 if (listener == null) {
11118 return;
11119 }if (Clazz_instanceOf (listener, java.beans.PropertyChangeListenerProxy)) {
11120 var proxy = listener;
11121 this.removePropertyChangeListener (proxy.getPropertyName (), proxy.getListener ());
11122 } else {
11123 this.map.remove (null, listener);
11124 }}, "java.beans.PropertyChangeListener");
11125 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11126 function () {
11127 return this.map.getListeners ();
11128 });
11129 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11130 function (propertyName, listener) {
11131 {
11132 if (arguments.length == 1) {
11133 this.addPropertyChangeListener1(propertyName);
11134 return;
11135 }
11136 }this.addPropertyChangeListener2 (propertyName, listener);
11137 }, "~S,java.beans.PropertyChangeListener");
11138 Clazz_defineMethod (c$, "addPropertyChangeListener2", 
11139 function (propertyName, listener) {
11140 if (listener == null || propertyName == null) {
11141 return;
11142 }listener = this.map.extract (listener);
11143 if (listener != null) {
11144 this.map.add (propertyName, listener);
11145 }}, "~S,java.beans.PropertyChangeListener");
11146 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11147 function (propertyName, listener) {
11148 if (listener == null || propertyName == null) {
11149 return;
11150 }listener = this.map.extract (listener);
11151 if (listener != null) {
11152 this.map.remove (propertyName, listener);
11153 }}, "~S,java.beans.PropertyChangeListener");
11154 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11155 function (propertyName) {
11156 return this.map.getListeners (propertyName);
11157 }, "~S");
11158 Clazz_defineMethod (c$, "firePropertyChange", 
11159 function (propertyName, oldValue, newValue) {
11160 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11161 return;
11162 }this.firePropertyChangeEvt ( new java.beans.PropertyChangeEvent (this.source, propertyName, oldValue, newValue));
11163 }, "~S,~O,~O");
11164 Clazz_defineMethod (c$, "firePropertyChange", 
11165 function (propertyName, oldValue, newValue) {
11166 if (oldValue == newValue) {
11167 return;
11168 }this.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11169 }, "~S,~N,~N");
11170 Clazz_defineMethod (c$, "firePropertyChange", 
11171 function (propertyName, oldValue, newValue) {
11172 if (oldValue == newValue) {
11173 return;
11174 }this.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11175 }, "~S,~B,~B");
11176 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
11177 function (evt) {
11178 var oldValue = evt.getOldValue ();
11179 var newValue = evt.getNewValue ();
11180 var propertyName = evt.getPropertyName ();
11181 if (oldValue != null && newValue != null && oldValue.equals (newValue)) {
11182 return;
11183 }var common = this.map.get (null);
11184 var named = (propertyName != null) ? this.map.get (propertyName) : null;
11185 this.fire (common, evt);
11186 this.fire (named, evt);
11187 }, "java.beans.PropertyChangeEvent");
11188 Clazz_defineMethod (c$, "fire", 
11189  function (listeners, event) {
11190 if (listeners != null) {
11191 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11192 listener.propertyChange (event);
11193 }
11194 }}, "~A,java.beans.PropertyChangeEvent");
11195 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11196 function (propertyName, index, oldValue, newValue) {
11197 this.firePropertyChangeEvt ( new java.beans.IndexedPropertyChangeEvent (this.source, propertyName, oldValue, newValue, index));
11198 }, "~S,~N,~O,~O");
11199 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11200 function (propertyName, index, oldValue, newValue) {
11201 if (oldValue == newValue) {
11202 return;
11203 }this.fireIndexedPropertyChange (propertyName, index, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
11204 }, "~S,~N,~N,~N");
11205 Clazz_defineMethod (c$, "fireIndexedPropertyChange", 
11206 function (propertyName, index, oldValue, newValue) {
11207 if (oldValue == newValue) {
11208 return;
11209 }this.fireIndexedPropertyChange (propertyName, index, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
11210 }, "~S,~N,~B,~B");
11211 Clazz_defineMethod (c$, "hasListeners", 
11212 function (propertyName) {
11213 return this.map.hasListeners (propertyName);
11214 }, "~S");
11215 Clazz_pu$h(self.c$);
11216 c$ = Clazz_declareType (java.beans.PropertyChangeSupport, "PropertyChangeListenerMap", java.beans.ChangeListenerMap);
11217 Clazz_overrideMethod (c$, "newArray", 
11218 function (a) {
11219 return (0 < a) ?  new Array (a) : java.beans.PropertyChangeSupport.PropertyChangeListenerMap.EMPTY;
11220 }, "~N");
11221 Clazz_overrideMethod (c$, "newProxy", 
11222 function (a, b) {
11223 return  new java.beans.PropertyChangeListenerProxy (a, b);
11224 }, "~S,java.beans.PropertyChangeListener");
11225 Clazz_defineStatics (c$,
11226 "EMPTY",  Clazz_newArray (-1, []));
11227 c$ = Clazz_p0p ();
11228 });
11229 Clazz_declarePackage ("java.beans");
11230 Clazz_load (null, "java.beans.ChangeListenerMap", ["java.util.ArrayList", "$.Collections", "$.EventListenerProxy", "$.HashMap"], function () {
11231 c$ = Clazz_decorateAsClass (function () {
11232 this.map = null;
11233 Clazz_instantialize (this, arguments);
11234 }, java.beans, "ChangeListenerMap");
11235 Clazz_defineMethod (c$, "add", 
11236 function (name, listener) {
11237 if (this.map == null) {
11238 this.map =  new java.util.HashMap ();
11239 }var array = this.map.get (name);
11240 var size = (array != null) ? array.length : 0;
11241 var clone = this.newArray (size + 1);
11242 clone[size] = listener;
11243 if (array != null) {
11244 System.arraycopy (array, 0, clone, 0, size);
11245 }this.map.put (name, clone);
11246 }, "~S,~O");
11247 Clazz_defineMethod (c$, "remove", 
11248 function (name, listener) {
11249 if (this.map != null) {
11250 var array = this.map.get (name);
11251 if (array != null) {
11252 for (var i = 0; i < array.length; i++) {
11253 if (listener.equals (array[i])) {
11254 var size = array.length - 1;
11255 if (size > 0) {
11256 var clone = this.newArray (size);
11257 System.arraycopy (array, 0, clone, 0, i);
11258 System.arraycopy (array, i + 1, clone, i, size - i);
11259 this.map.put (name, clone);
11260 } else {
11261 this.map.remove (name);
11262 if (this.map.isEmpty ()) {
11263 this.map = null;
11264 }}break;
11265 }}
11266 }}}, "~S,~O");
11267 Clazz_defineMethod (c$, "get", 
11268 function (name) {
11269 return (this.map != null) ? this.map.get (name) : null;
11270 }, "~S");
11271 Clazz_defineMethod (c$, "set", 
11272 function (name, listeners) {
11273 if (listeners != null) {
11274 if (this.map == null) {
11275 this.map =  new java.util.HashMap ();
11276 }this.map.put (name, listeners);
11277 } else if (this.map != null) {
11278 this.map.remove (name);
11279 if (this.map.isEmpty ()) {
11280 this.map = null;
11281 }}}, "~S,~A");
11282 Clazz_defineMethod (c$, "getListeners", 
11283 function () {
11284 if (this.map == null) {
11285 return this.newArray (0);
11286 }var list =  new java.util.ArrayList ();
11287 var listeners = this.map.get (null);
11288 if (listeners != null) {
11289 for (var listener, $listener = 0, $$listener = listeners; $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11290 list.add (listener);
11291 }
11292 }for (var entry, $entry = this.map.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
11293 var name = entry.getKey ();
11294 if (name != null) {
11295 for (var listener, $listener = 0, $$listener = entry.getValue (); $listener < $$listener.length && ((listener = $$listener[$listener]) || true); $listener++) {
11296 list.add (this.newProxy (name, listener));
11297 }
11298 }}
11299 return list.toArray (this.newArray (list.size ()));
11300 });
11301 Clazz_defineMethod (c$, "getListeners", 
11302 function (name) {
11303 if (name != null) {
11304 var listeners = this.get (name);
11305 if (listeners != null) {
11306 return listeners.clone ();
11307 }}return this.newArray (0);
11308 }, "~S");
11309 Clazz_defineMethod (c$, "hasListeners", 
11310 function (name) {
11311 if (this.map == null) {
11312 return false;
11313 }var array = this.map.get (null);
11314 return (array != null) || ((name != null) && (null != this.map.get (name)));
11315 }, "~S");
11316 Clazz_defineMethod (c$, "getEntries", 
11317 function () {
11318 return (this.map != null) ? this.map.entrySet () : java.util.Collections.emptySet ();
11319 });
11320 Clazz_defineMethod (c$, "extract", 
11321 function (listener) {
11322 while (Clazz_instanceOf (listener, java.util.EventListenerProxy)) {
11323 var proxy = listener;
11324 listener = proxy.getListener ();
11325 }
11326 return listener;
11327 }, "~O");
11328 });
11329 Clazz_declarePackage ("java.beans");
11330 Clazz_load (["java.beans.PropertyChangeEvent"], "java.beans.IndexedPropertyChangeEvent", null, function () {
11331 c$ = Clazz_decorateAsClass (function () {
11332 this.index = 0;
11333 Clazz_instantialize (this, arguments);
11334 }, java.beans, "IndexedPropertyChangeEvent", java.beans.PropertyChangeEvent);
11335 Clazz_makeConstructor (c$, 
11336 function (source, propertyName, oldValue, newValue, index) {
11337 Clazz_superConstructor (this, java.beans.IndexedPropertyChangeEvent, [source, propertyName, oldValue, newValue]);
11338 this.index = index;
11339 }, "~O,~S,~O,~O,~N");
11340 Clazz_defineMethod (c$, "getIndex", 
11341 function () {
11342 return this.index;
11343 });
11344 });
11345 Clazz_declarePackage ("java.beans");
11346 Clazz_load (["java.util.EventObject"], "java.beans.PropertyChangeEvent", null, function () {
11347 c$ = Clazz_decorateAsClass (function () {
11348 this.propertyName = null;
11349 this.newValue = null;
11350 this.oldValue = null;
11351 this.propagationId = null;
11352 Clazz_instantialize (this, arguments);
11353 }, java.beans, "PropertyChangeEvent", java.util.EventObject);
11354 Clazz_makeConstructor (c$, 
11355 function (source, propertyName, oldValue, newValue) {
11356 Clazz_superConstructor (this, java.beans.PropertyChangeEvent, [source]);
11357 this.propertyName = propertyName;
11358 this.newValue = newValue;
11359 this.oldValue = oldValue;
11360 }, "~O,~S,~O,~O");
11361 Clazz_defineMethod (c$, "getPropertyName", 
11362 function () {
11363 return this.propertyName;
11364 });
11365 Clazz_defineMethod (c$, "getNewValue", 
11366 function () {
11367 return this.newValue;
11368 });
11369 Clazz_defineMethod (c$, "getOldValue", 
11370 function () {
11371 return this.oldValue;
11372 });
11373 Clazz_defineMethod (c$, "setPropagationId", 
11374 function (propagationId) {
11375 this.propagationId = propagationId;
11376 }, "~O");
11377 Clazz_defineMethod (c$, "getPropagationId", 
11378 function () {
11379 return this.propagationId;
11380 });
11381 });
11382 Clazz_declarePackage ("java.beans");
11383 Clazz_load (["java.util.EventListenerProxy", "java.beans.PropertyChangeListener"], "java.beans.PropertyChangeListenerProxy", null, function () {
11384 c$ = Clazz_decorateAsClass (function () {
11385 this.propertyName = null;
11386 Clazz_instantialize (this, arguments);
11387 }, java.beans, "PropertyChangeListenerProxy", java.util.EventListenerProxy, java.beans.PropertyChangeListener);
11388 Clazz_makeConstructor (c$, 
11389 function (propertyName, listener) {
11390 Clazz_superConstructor (this, java.beans.PropertyChangeListenerProxy, [listener]);
11391 this.propertyName = propertyName;
11392 }, "~S,java.beans.PropertyChangeListener");
11393 Clazz_defineMethod (c$, "propertyChange", 
11394 function (evt) {
11395 (this.getListener ()).propertyChange (evt);
11396 }, "java.beans.PropertyChangeEvent");
11397 Clazz_defineMethod (c$, "getPropertyName", 
11398 function () {
11399 return this.propertyName;
11400 });
11401 });
11402 Clazz_declarePackage ("java.beans");
11403 Clazz_load (["java.util.EventListener"], "java.beans.PropertyChangeListener", null, function () {
11404 Clazz_declareInterface (java.beans, "PropertyChangeListener", java.util.EventListener);
11405 });
11406 Clazz_declarePackage ("java.security");
11407 Clazz_declareInterface (java.security, "PrivilegedAction");
11408 Clazz_declarePackage ("java.awt");
11409 Clazz_load (["java.awt.geom.Point2D"], "java.awt.Point", null, function () {
11410 c$ = Clazz_decorateAsClass (function () {
11411 this.x = 0;
11412 this.y = 0;
11413 Clazz_instantialize (this, arguments);
11414 }, java.awt, "Point", java.awt.geom.Point2D);
11415 Clazz_makeConstructor (c$, 
11416 function () {
11417 this.construct (0, 0);
11418 });
11419 Clazz_makeConstructor (c$, 
11420 function (p) {
11421 this.construct (p.x, p.y);
11422 }, "java.awt.Point");
11423 Clazz_makeConstructor (c$, 
11424 function (x, y) {
11425 Clazz_superConstructor (this, java.awt.Point, []);
11426 this.x = x;
11427 this.y = y;
11428 }, "~N,~N");
11429 Clazz_overrideMethod (c$, "getX", 
11430 function () {
11431 return this.x;
11432 });
11433 Clazz_overrideMethod (c$, "getY", 
11434 function () {
11435 return this.y;
11436 });
11437 Clazz_defineMethod (c$, "getLocation", 
11438 function () {
11439 return  new java.awt.Point (this.x, this.y);
11440 });
11441 Clazz_defineMethod (c$, "setLocation", 
11442 function (p) {
11443 this.setLocation (p.x, p.y);
11444 }, "java.awt.Point");
11445 Clazz_defineMethod (c$, "setLocation", 
11446 function (x, y) {
11447 this.x = Clazz_doubleToInt (Math.floor (x + 0.5));
11448 this.y = Clazz_doubleToInt (Math.floor (y + 0.5));
11449 }, "~N,~N");
11450 Clazz_defineMethod (c$, "move", 
11451 function (x, y) {
11452 this.x = x;
11453 this.y = y;
11454 }, "~N,~N");
11455 Clazz_defineMethod (c$, "translate", 
11456 function (dx, dy) {
11457 this.x += dx;
11458 this.y += dy;
11459 }, "~N,~N");
11460 Clazz_defineMethod (c$, "equals", 
11461 function (obj) {
11462 if (Clazz_instanceOf (obj, java.awt.Point)) {
11463 var pt = obj;
11464 return (this.x == pt.x) && (this.y == pt.y);
11465 }return Clazz_superCall (this, java.awt.Point, "equals", [obj]);
11466 }, "~O");
11467 Clazz_overrideMethod (c$, "toString", 
11468 function () {
11469 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + "]";
11470 });
11471 });
11472 Clazz_declarePackage ("jssun.awt");
11473 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 () {
11474 c$ = Clazz_decorateAsClass (function () {
11475 this.table = null;
11476 this.threadGroup = null;
11477 this.changeSupport = null;
11478 this.$isDisposed = false;
11479 this.mostRecentKeyValue = null;
11480 this.shadowMostRecentKeyValue = null;
11481 Clazz_instantialize (this, arguments);
11482 }, jssun.awt, "AppContext");
11483 Clazz_prepareFields (c$, function () {
11484 this.table =  new java.util.HashMap ();
11485 });
11486 c$.getAppContexts = Clazz_defineMethod (c$, "getAppContexts", 
11487 function () {
11488 return  new java.util.HashSet (jssun.awt.AppContext.threadGroup2appContext.values ());
11489 });
11490 Clazz_defineMethod (c$, "isDisposed", 
11491 function () {
11492 return this.$isDisposed;
11493 });
11494 Clazz_makeConstructor (c$, 
11495 function (threadGroup) {
11496 jssun.awt.AppContext.numAppContexts++;
11497 this.threadGroup = threadGroup;
11498 jssun.awt.AppContext.threadGroup2appContext.put (threadGroup, this);
11499 }, "ThreadGroup");
11500 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
11501 function () {
11502 var currentThread = Thread.currentThread ();
11503 var appContext = null;
11504 var recent = jssun.awt.AppContext.mostRecentThreadAppContext;
11505 if ((recent != null) && (recent.thread === currentThread)) {
11506 appContext = recent.appContext;
11507 } else {
11508 var currentThreadGroup = currentThread.getThreadGroup ();
11509 var threadGroup = currentThreadGroup;
11510 appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11511 while (appContext == null) {
11512 threadGroup = threadGroup.getParent ();
11513 if (threadGroup == null) {
11514 return null;
11515 }appContext = jssun.awt.AppContext.threadGroup2appContext.get (threadGroup);
11516 }
11517 for (var tg = currentThreadGroup; tg !== threadGroup; tg = tg.getParent ()) {
11518 jssun.awt.AppContext.threadGroup2appContext.put (tg, appContext);
11519 }
11520 jssun.awt.AppContext.mostRecentThreadAppContext =  new jssun.awt.MostRecentThreadAppContext (currentThread, appContext);
11521 }return appContext;
11522 });
11523 c$.isMainContext = Clazz_defineMethod (c$, "isMainContext", 
11524 function (ctx) {
11525 return false;
11526 }, "jssun.awt.AppContext");
11527 Clazz_defineMethod (c$, "dispose", 
11528 function () {
11529 });
11530 Clazz_defineMethod (c$, "get", 
11531 function (key) {
11532 {
11533 var recent = this.mostRecentKeyValue;
11534 if ((recent != null) && (recent.key === key)) {
11535 return recent.value;
11536 }var value = this.table.get (key);
11537 if (this.mostRecentKeyValue == null) {
11538 this.mostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11539 this.shadowMostRecentKeyValue =  new jssun.awt.MostRecentKeyValue (key, value);
11540 } else {
11541 var auxKeyValue = this.mostRecentKeyValue;
11542 this.shadowMostRecentKeyValue.setPair (key, value);
11543 this.mostRecentKeyValue = this.shadowMostRecentKeyValue;
11544 this.shadowMostRecentKeyValue = auxKeyValue;
11545 }return value;
11546 }}, "~O");
11547 Clazz_defineMethod (c$, "put", 
11548 function (key, value) {
11549 {
11550 var recent = this.mostRecentKeyValue;
11551 if ((recent != null) && (recent.key === key)) recent.value = value;
11552 return this.table.put (key, value);
11553 }}, "~O,~O");
11554 Clazz_defineMethod (c$, "remove", 
11555 function (key) {
11556 {
11557 var recent = this.mostRecentKeyValue;
11558 if ((recent != null) && (recent.key === key)) recent.value = null;
11559 return this.table.remove (key);
11560 }}, "~O");
11561 Clazz_defineMethod (c$, "getThreadGroup", 
11562 function () {
11563 return this.threadGroup;
11564 });
11565 Clazz_overrideMethod (c$, "toString", 
11566 function () {
11567 return this.getClass ().getName () + "[threadGroup=" + this.threadGroup.getName () + "]";
11568 });
11569 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11570 function () {
11571 if (this.changeSupport == null) {
11572 return  new Array (0);
11573 }return this.changeSupport.getPropertyChangeListeners ();
11574 });
11575 Clazz_defineMethod (c$, "addPropertyChangeListener", 
11576 function (propertyName, listener) {
11577 if (listener == null) {
11578 return;
11579 }if (this.changeSupport == null) {
11580 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
11581 }this.changeSupport.addPropertyChangeListener (propertyName, listener);
11582 }, "~S,java.beans.PropertyChangeListener");
11583 Clazz_defineMethod (c$, "removePropertyChangeListener", 
11584 function (propertyName, listener) {
11585 if (listener == null || this.changeSupport == null) {
11586 return;
11587 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
11588 }, "~S,java.beans.PropertyChangeListener");
11589 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
11590 function (propertyName) {
11591 if (this.changeSupport == null) {
11592 return  new Array (0);
11593 }return this.changeSupport.getPropertyChangeListeners (propertyName);
11594 }, "~S");
11595 c$.EVENT_QUEUE_KEY = c$.prototype.EVENT_QUEUE_KEY =  new StringBuffer ("EventQueue");
11596 c$.threadGroup2appContext = c$.prototype.threadGroup2appContext = java.util.Collections.synchronizedMap ( new java.util.IdentityHashMap ());
11597 Clazz_defineStatics (c$,
11598 "DISPOSED_PROPERTY_NAME", "disposed",
11599 "GUI_DISPOSED", "guidisposed",
11600 "numAppContexts", 0,
11601 "mostRecentThreadAppContext", null);
11602 c$ = Clazz_decorateAsClass (function () {
11603 this.thread = null;
11604 this.appContext = null;
11605 Clazz_instantialize (this, arguments);
11606 }, jssun.awt, "MostRecentThreadAppContext");
11607 Clazz_makeConstructor (c$, 
11608 function (key, value) {
11609 this.thread = key;
11610 this.appContext = value;
11611 }, "Thread,jssun.awt.AppContext");
11612 c$ = Clazz_decorateAsClass (function () {
11613 this.key = null;
11614 this.value = null;
11615 Clazz_instantialize (this, arguments);
11616 }, jssun.awt, "MostRecentKeyValue");
11617 Clazz_makeConstructor (c$, 
11618 function (k, v) {
11619 this.key = k;
11620 this.value = v;
11621 }, "~O,~O");
11622 Clazz_defineMethod (c$, "setPair", 
11623 function (k, v) {
11624 this.key = k;
11625 this.value = v;
11626 }, "~O,~O");
11627 });
11628 Clazz_load(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){
11629 c$=Clazz_declareType(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);
11630 Clazz_makeConstructor(c$,
11631 function(cs){
11632 if(cs==null){
11633 throw new NullPointerException();
11634 }
11635 Clazz_superConstructor(this,StringBuffer,[cs.toString()]);
11636 },"CharSequence");
11637 Clazz_defineMethod(c$,"append",
11638 function(b){
11639 return this.append(b?"true":"false");
11640 },"~B");
11641 Clazz_defineMethod(c$,"append",
11642 function(ch){
11643 this.append0(ch);
11644 return this;
11645 },"~N");
11646 Clazz_defineMethod(c$,"append",
11647 function(d){
11648 return this.append(Double.toString(d));
11649 },"~N");
11650 Clazz_defineMethod(c$,"append",
11651 function(obj){
11652 if(obj==null){
11653 this.appendNull();
11654 }else{
11655 this.append0(obj.toString());
11656 }return this;
11657 },"~O");
11658 Clazz_defineMethod(c$,"append",
11659 function(string){
11660 this.append0(string);
11661 return this;
11662 },"~S");
11663 Clazz_defineMethod(c$,"append",
11664 function(sb){
11665 if(sb==null){
11666 this.appendNull();
11667 }else{
11668 {
11669 this.append0(sb.getValue(),0,sb.length());
11670 }}return this;
11671 },"StringBuffer");
11672 Clazz_defineMethod(c$,"append",
11673 function(chars){
11674 this.append0(chars);
11675 return this;
11676 },"~A");
11677 Clazz_defineMethod(c$,"append",
11678 function(chars,start,length){
11679 this.append0(chars,start,length);
11680 return this;
11681 },"~A,~N,~N");
11682 Clazz_defineMethod(c$,"append",
11683 function(s){
11684 if(s==null){
11685 this.appendNull();
11686 }else{
11687 this.append0(s.toString());
11688 }return this;
11689 },"CharSequence");
11690 Clazz_defineMethod(c$,"append",
11691 function(s,start,end){
11692 this.append0(s,start,end);
11693 return this;
11694 },"CharSequence,~N,~N");
11695 Clazz_defineMethod(c$,"appendCodePoint",
11696 function(codePoint){
11697 return this.append(Character.toChars(codePoint));
11698 },"~N");
11699 Clazz_defineMethod(c$,"$delete",
11700 function(start,end){
11701 this.delete0(start,end);
11702 return this;
11703 },"~N,~N");
11704 Clazz_defineMethod(c$,"deleteCharAt",
11705 function(location){
11706 this.deleteCharAt0(location);
11707 return this;
11708 },"~N");
11709 Clazz_defineMethod(c$,"insert",
11710 function(index,ch){
11711 this.insert0(index,ch);
11712 return this;
11713 },"~N,~N");
11714 Clazz_defineMethod(c$,"insert",
11715 function(index,b){
11716 return this.insert(index,b?"true":"false");
11717 },"~N,~B");
11718 Clazz_defineMethod(c$,"insert",
11719 function(index,i){
11720 return this.insert(index,Integer.toString(i));
11721 },"~N,~N");
11722 Clazz_defineMethod(c$,"insert",
11723 function(index,l){
11724 return this.insert(index,Long.toString(l));
11725 },"~N,~N");
11726 Clazz_defineMethod(c$,"insert",
11727 function(index,d){
11728 return this.insert(index,Double.toString(d));
11729 },"~N,~N");
11730 Clazz_defineMethod(c$,"insert",
11731 function(index,f){
11732 return this.insert(index,Float.toString(f));
11733 },"~N,~N");
11734 Clazz_defineMethod(c$,"insert",
11735 function(index,obj){
11736 return this.insert(index,obj==null?"null":obj.toString());
11737 },"~N,~O");
11738 Clazz_defineMethod(c$,"insert",
11739 function(index,string){
11740 this.insert0(index,string);
11741 return this;
11742 },"~N,~S");
11743 Clazz_defineMethod(c$,"insert",
11744 function(index,chars){
11745 this.insert0(index,chars);
11746 return this;
11747 },"~N,~A");
11748 Clazz_defineMethod(c$,"insert",
11749 function(index,chars,start,length){
11750 this.insert0(index,chars,start,length);
11751 return this;
11752 },"~N,~A,~N,~N");
11753 Clazz_defineMethod(c$,"insert",
11754 function(index,s){
11755 this.insert0(index,s==null?"null":s.toString());
11756 return this;
11757 },"~N,CharSequence");
11758 Clazz_defineMethod(c$,"insert",
11759 function(index,s,start,end){
11760 this.insert0(index,s,start,end);
11761 return this;
11762 },"~N,CharSequence,~N,~N");
11763 Clazz_defineMethod(c$,"replace",
11764 function(start,end,string){
11765 this.replace0(start,end,string);
11766 return this;
11767 },"~N,~N,~S");
11768 Clazz_defineMethod(c$,"reverse",
11769 function(){
11770 this.reverse0();
11771 return this;
11772 });
11773 Clazz_overrideMethod(c$,"subSequence",
11774 function(start,end){
11775 return Clazz_superCall(this,StringBuffer,"substring",[start,end]);
11776 },"~N,~N");
11777 });
11778 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(){
11779 c$=Clazz_decorateAsClass(function(){
11780 this.elementData=null;
11781 this.$size=0;
11782 this.threshold=0;
11783 this.modCount=0;
11784 Clazz_instantialize(this,arguments);
11785 },java.util,"IdentityHashMap",java.util.AbstractMap,[java.util.Map,java.io.Serializable,Cloneable]);
11786 Clazz_makeConstructor(c$,
11787 function(){
11788 this.construct(21);
11789 });
11790 Clazz_makeConstructor(c$,
11791 function(maxSize){
11792 Clazz_superConstructor(this,java.util.IdentityHashMap,[]);
11793 if(maxSize>=0){
11794 this.$size=0;
11795 this.threshold=this.getThreshold(maxSize);
11796 this.elementData=this.newElementArray(this.computeElementArraySize());
11797 }else{
11798 throw new IllegalArgumentException();
11799 }},"~N");
11800 Clazz_defineMethod(c$,"getThreshold",
11801 ($fz=function(maxSize){
11802 return maxSize>3?maxSize:3;
11803 },$fz.isPrivate=true,$fz),"~N");
11804 Clazz_defineMethod(c$,"computeElementArraySize",
11805 ($fz=function(){
11806 return(Math.floor((this.threshold*10000)/7500))*2;
11807 },$fz.isPrivate=true,$fz));
11808 Clazz_defineMethod(c$,"newElementArray",
11809 ($fz=function(s){
11810 return new Array(s);
11811 },$fz.isPrivate=true,$fz),"~N");
11812 Clazz_makeConstructor(c$,
11813 function(map){
11814 this.construct(map.size()<6?11:map.size()*2);
11815 this.putAllImpl(map);
11816 },"java.util.Map");
11817 Clazz_defineMethod(c$,"massageValue",
11818 ($fz=function(value){
11819 return((value===java.util.IdentityHashMap.NULL_OBJECT)?null:value);
11820 },$fz.isPrivate=true,$fz),"~O");
11821 Clazz_overrideMethod(c$,"clear",
11822 function(){
11823 this.$size=0;
11824 for(var i=0;i<this.elementData.length;i++){
11825 this.elementData[i]=null;
11826 }
11827 this.modCount++;
11828 });
11829 Clazz_overrideMethod(c$,"containsKey",
11830 function(key){
11831 if(key==null){
11832 key=java.util.IdentityHashMap.NULL_OBJECT;
11833 }var index=this.findIndex(key,this.elementData);
11834 return this.elementData[index]===key;
11835 },"~O");
11836 Clazz_overrideMethod(c$,"containsValue",
11837 function(value){
11838 if(value==null){
11839 value=java.util.IdentityHashMap.NULL_OBJECT;
11840 }for(var i=1;i<this.elementData.length;i=i+2){
11841 if(this.elementData[i]===value){
11842 return true;
11843 }}
11844 return false;
11845 },"~O");
11846 Clazz_overrideMethod(c$,"get",
11847 function(key){
11848 if(key==null){
11849 key=java.util.IdentityHashMap.NULL_OBJECT;
11850 }var index=this.findIndex(key,this.elementData);
11851 if(this.elementData[index]===key){
11852 var result=this.elementData[index+1];
11853 return this.massageValue(result);
11854 }return null;
11855 },"~O");
11856 Clazz_defineMethod(c$,"getEntry",
11857 ($fz=function(key){
11858 if(key==null){
11859 key=java.util.IdentityHashMap.NULL_OBJECT;
11860 }var index=this.findIndex(key,this.elementData);
11861 if(this.elementData[index]===key){
11862 return this.getEntry(index);
11863 }return null;
11864 },$fz.isPrivate=true,$fz),"~O");
11865 Clazz_defineMethod(c$,"getEntry",
11866 ($fz=function(index){
11867 var key=this.elementData[index];
11868 var value=this.elementData[index+1];
11869 if(key===java.util.IdentityHashMap.NULL_OBJECT){
11870 key=null;
11871 }if(value===java.util.IdentityHashMap.NULL_OBJECT){
11872 value=null;
11873 }return new java.util.IdentityHashMap.IdentityHashMapEntry(key,value);
11874 },$fz.isPrivate=true,$fz),"~N");
11875 Clazz_defineMethod(c$,"findIndex",
11876 ($fz=function(key,array){
11877 var length=array.length;
11878 var index=this.getModuloHash(key,length);
11879 var last=(index+length-2)%length;
11880 while(index!=last){
11881 if(array[index]===key||(array[index]==null)){
11882 break;
11883 }index=(index+2)%length;
11884 }
11885 return index;
11886 },$fz.isPrivate=true,$fz),"~O,~A");
11887 Clazz_defineMethod(c$,"getModuloHash",
11888 ($fz=function(key,length){
11889 return((System.identityHashCode(key)&0x7FFFFFFF)%(Math.floor(length/2)))*2;
11890 },$fz.isPrivate=true,$fz),"~O,~N");
11891 Clazz_overrideMethod(c$,"put",
11892 function(key,value){
11893 var _key=key;
11894 var _value=value;
11895 if(_key==null){
11896 _key=java.util.IdentityHashMap.NULL_OBJECT;
11897 }if(_value==null){
11898 _value=java.util.IdentityHashMap.NULL_OBJECT;
11899 }var index=this.findIndex(_key,this.elementData);
11900 if(this.elementData[index]!==_key){
11901 this.modCount++;
11902 if(++this.$size>this.threshold){
11903 this.rehash();
11904 index=this.findIndex(_key,this.elementData);
11905 }this.elementData[index]=_key;
11906 this.elementData[index+1]=null;
11907 }var result=this.elementData[index+1];
11908 this.elementData[index+1]=_value;
11909 return this.massageValue(result);
11910 },"~O,~O");
11911 Clazz_overrideMethod(c$,"putAll",
11912 function(map){
11913 this.putAllImpl(map);
11914 },"java.util.Map");
11915 Clazz_defineMethod(c$,"rehash",
11916 ($fz=function(){
11917 var newlength=this.elementData.length<<1;
11918 if(newlength==0){
11919 newlength=1;
11920 }var newData=this.newElementArray(newlength);
11921 for(var i=0;i<this.elementData.length;i=i+2){
11922 var key=this.elementData[i];
11923 if(key!=null){
11924 var index=this.findIndex(key,newData);
11925 newData[index]=key;
11926 newData[index+1]=this.elementData[i+1];
11927 }}
11928 this.elementData=newData;
11929 this.computeMaxSize();
11930 },$fz.isPrivate=true,$fz));
11931 Clazz_defineMethod(c$,"computeMaxSize",
11932 ($fz=function(){
11933 this.threshold=(Math.floor((Math.floor(this.elementData.length/ 2)) * 7500 /10000));
11934 },$fz.isPrivate=true,$fz));
11935 Clazz_overrideMethod(c$,"remove",
11936 function(key){
11937 if(key==null){
11938 key=java.util.IdentityHashMap.NULL_OBJECT;
11939 }var hashedOk;
11940 var index;
11941 var next;
11942 var hash;
11943 var result;
11944 var object;
11945 index=next=this.findIndex(key,this.elementData);
11946 if(this.elementData[index]!==key){
11947 return null;
11948 }result=this.elementData[index+1];
11949 var length=this.elementData.length;
11950 while(true){
11951 next=(next+2)%length;
11952 object=this.elementData[next];
11953 if(object==null){
11954 break;
11955 }hash=this.getModuloHash(object,length);
11956 hashedOk=hash>index;
11957 if(next<index){
11958 hashedOk=hashedOk||(hash<=next);
11959 }else{
11960 hashedOk=hashedOk&&(hash<=next);
11961 }if(!hashedOk){
11962 this.elementData[index]=object;
11963 this.elementData[index+1]=this.elementData[next+1];
11964 index=next;
11965 }}
11966 this.$size--;
11967 this.modCount++;
11968 this.elementData[index]=null;
11969 this.elementData[index+1]=null;
11970 return this.massageValue(result);
11971 },"~O");
11972 Clazz_overrideMethod(c$,"entrySet",
11973 function(){
11974 return new java.util.IdentityHashMap.IdentityHashMapEntrySet(this);
11975 });
11976 Clazz_overrideMethod(c$,"keySet",
11977 function(){
11978 if(this.$keySet==null){
11979 this.$keySet=((Clazz_isClassDefined("java.util.IdentityHashMap$1")?0:java.util.IdentityHashMap.$IdentityHashMap$1$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$1,this,null));
11980 }return this.$keySet;
11981 });
11982 Clazz_overrideMethod(c$,"values",
11983 function(){
11984 if(this.valuesCollection==null){
11985 this.valuesCollection=((Clazz_isClassDefined("java.util.IdentityHashMap$2")?0:java.util.IdentityHashMap.$IdentityHashMap$2$()),Clazz_innerTypeInstance(java.util.IdentityHashMap$2,this,null));
11986 }return this.valuesCollection;
11987 });
11988 Clazz_overrideMethod(c$,"equals",
11989 function(object){
11990 if(this===object){
11991 return true;
11992 }if(Clazz_instanceOf(object,java.util.Map)){
11993 var map=object;
11994 if(this.size()!=map.size()){
11995 return false;
11996 }var set=this.entrySet();
11997 return set.equals(map.entrySet());
11998 }return false;
11999 },"~O");
12000 Clazz_defineMethod(c$,"clone",
12001 function(){
12002 try{
12003 return Clazz_superCall(this,java.util.IdentityHashMap,"clone",[]);
12004 }catch(e){
12005 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12006 return null;
12007 }else{
12008 throw e;
12009 }
12010 }
12011 });
12012 Clazz_overrideMethod(c$,"isEmpty",
12013 function(){
12014 return this.$size==0;
12015 });
12016 Clazz_overrideMethod(c$,"size",
12017 function(){
12018 return this.$size;
12019 });
12020 Clazz_defineMethod(c$,"putAllImpl",
12021 ($fz=function(map){
12022 if(map.entrySet()!=null){
12023 Clazz_superCall(this,java.util.IdentityHashMap,"putAll",[map]);
12024 }},$fz.isPrivate=true,$fz),"java.util.Map");
12025 c$.$IdentityHashMap$1$=function(){
12026 Clazz_pu$h(self.c$);
12027 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1",java.util.AbstractSet);
12028 Clazz_overrideMethod(c$,"contains",
12029 function(object){
12030 return this.b$["java.util.IdentityHashMap"].containsKey(object);
12031 },"~O");
12032 Clazz_overrideMethod(c$,"size",
12033 function(){
12034 return this.b$["java.util.IdentityHashMap"].size();
12035 });
12036 Clazz_overrideMethod(c$,"clear",
12037 function(){
12038 this.b$["java.util.IdentityHashMap"].clear();
12039 });
12040 Clazz_overrideMethod(c$,"remove",
12041 function(key){
12042 if(this.b$["java.util.IdentityHashMap"].containsKey(key)){
12043 this.b$["java.util.IdentityHashMap"].remove(key);
12044 return true;
12045 }return false;
12046 },"~O");
12047 Clazz_overrideMethod(c$,"iterator",
12048 function(){
12049 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"]);
12050 });
12051 c$=Clazz_p0p();
12052 };
12053 c$.$IdentityHashMap$1$1$=function(){
12054 Clazz_pu$h(self.c$);
12055 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$1$1",null,java.util.MapEntry.Type);
12056 Clazz_overrideMethod(c$,"get",
12057 function(entry){
12058 return entry.key;
12059 },"java.util.MapEntry");
12060 c$=Clazz_p0p();
12061 };
12062 c$.$IdentityHashMap$2$=function(){
12063 Clazz_pu$h(self.c$);
12064 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2",java.util.AbstractCollection);
12065 Clazz_overrideMethod(c$,"contains",
12066 function(object){
12067 return this.b$["java.util.IdentityHashMap"].containsValue(object);
12068 },"~O");
12069 Clazz_overrideMethod(c$,"size",
12070 function(){
12071 return this.b$["java.util.IdentityHashMap"].size();
12072 });
12073 Clazz_overrideMethod(c$,"clear",
12074 function(){
12075 this.b$["java.util.IdentityHashMap"].clear();
12076 });
12077 Clazz_overrideMethod(c$,"iterator",
12078 function(){
12079 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"]);
12080 });
12081 Clazz_overrideMethod(c$,"remove",
12082 function(object){
12083 var it=this.iterator();
12084 while(it.hasNext()){
12085 if(object===it.next()){
12086 it.remove();
12087 return true;
12088 }}
12089 return false;
12090 },"~O");
12091 c$=Clazz_p0p();
12092 };
12093 c$.$IdentityHashMap$2$1$=function(){
12094 Clazz_pu$h(self.c$);
12095 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$2$1",null,java.util.MapEntry.Type);
12096 Clazz_overrideMethod(c$,"get",
12097 function(entry){
12098 return entry.value;
12099 },"java.util.MapEntry");
12100 c$=Clazz_p0p();
12101 };
12102 Clazz_pu$h(self.c$);
12103 c$=Clazz_declareType(java.util.IdentityHashMap,"IdentityHashMapEntry",java.util.MapEntry);
12104 Clazz_overrideMethod(c$,"equals",
12105 function(a){
12106 if(this===a){
12107 return true;
12108 }if(Clazz_instanceOf(a,java.util.Map.Entry)){
12109 var b=a;
12110 return(this.key===b.getKey())&&(this.value===b.getValue());
12111 }return false;
12112 },"~O");
12113 Clazz_overrideMethod(c$,"hashCode",
12114 function(){
12115 return System.identityHashCode(this.key)^System.identityHashCode(this.value);
12116 });
12117 Clazz_overrideMethod(c$,"toString",
12118 function(){
12119 return this.key+"="+this.value;
12120 });
12121 c$=Clazz_p0p();
12122 Clazz_pu$h(self.c$);
12123 c$=Clazz_decorateAsClass(function(){
12124 this.position=0;
12125 this.lastPosition=0;
12126 this.associatedMap=null;
12127 this.expectedModCount=0;
12128 this.type=null;
12129 this.canRemove=false;
12130 Clazz_instantialize(this,arguments);
12131 },java.util.IdentityHashMap,"IdentityHashMapIterator",null,java.util.Iterator);
12132 Clazz_makeConstructor(c$,
12133 function(a,b){
12134 this.associatedMap=b;
12135 this.type=a;
12136 this.expectedModCount=b.modCount;
12137 },"java.util.MapEntry.Type,java.util.IdentityHashMap");
12138 Clazz_overrideMethod(c$,"hasNext",
12139 function(){
12140 while(this.position<this.associatedMap.elementData.length){
12141 if(this.associatedMap.elementData[this.position]==null){
12142 this.position+=2;
12143 }else{
12144 return true;
12145 }}
12146 return false;
12147 });
12148 Clazz_defineMethod(c$,"checkConcurrentMod",
12149 function(){
12150 if(this.expectedModCount!=this.associatedMap.modCount){
12151 throw new java.util.ConcurrentModificationException();
12152 }});
12153 Clazz_overrideMethod(c$,"next",
12154 function(){
12155 this.checkConcurrentMod();
12156 if(!this.hasNext()){
12157 throw new java.util.NoSuchElementException();
12158 }var a=this.associatedMap.getEntry(this.position);
12159 this.lastPosition=this.position;
12160 this.position+=2;
12161 this.canRemove=true;
12162 return this.type.get(a);
12163 });
12164 Clazz_overrideMethod(c$,"remove",
12165 function(){
12166 this.checkConcurrentMod();
12167 if(!this.canRemove){
12168 throw new IllegalStateException();
12169 }this.canRemove=false;
12170 this.associatedMap.remove(this.associatedMap.elementData[this.lastPosition]);
12171 this.position=this.lastPosition;
12172 this.expectedModCount++;
12173 });
12174 c$=Clazz_p0p();
12175 Clazz_pu$h(self.c$);
12176 c$=Clazz_decorateAsClass(function(){
12177 this.associatedMap=null;
12178 Clazz_instantialize(this,arguments);
12179 },java.util.IdentityHashMap,"IdentityHashMapEntrySet",java.util.AbstractSet);
12180 Clazz_makeConstructor(c$,
12181 function(a){
12182 Clazz_superConstructor(this,java.util.IdentityHashMap.IdentityHashMapEntrySet,[]);
12183 this.associatedMap=a;
12184 },"java.util.IdentityHashMap");
12185 Clazz_defineMethod(c$,"hashMap",
12186 function(){
12187 return this.associatedMap;
12188 });
12189 Clazz_overrideMethod(c$,"size",
12190 function(){
12191 return this.associatedMap.$size;
12192 });
12193 Clazz_overrideMethod(c$,"clear",
12194 function(){
12195 this.associatedMap.clear();
12196 });
12197 Clazz_overrideMethod(c$,"remove",
12198 function(a){
12199 if(this.contains(a)){
12200 this.associatedMap.remove((a).getKey());
12201 return true;
12202 }return false;
12203 },"~O");
12204 Clazz_overrideMethod(c$,"contains",
12205 function(a){
12206 if(Clazz_instanceOf(a,java.util.Map.Entry)){
12207 var b=this.associatedMap.getEntry((a).getKey());
12208 return b!=null&&b.equals(a);
12209 }return false;
12210 },"~O");
12211 Clazz_overrideMethod(c$,"iterator",
12212 function(){
12213 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);
12214 });
12215 c$.$IdentityHashMap$IdentityHashMapEntrySet$1$=function(){
12216 Clazz_pu$h(self.c$);
12217 c$=Clazz_declareAnonymous(java.util,"IdentityHashMap$IdentityHashMapEntrySet$1",null,java.util.MapEntry.Type);
12218 Clazz_overrideMethod(c$,"get",
12219 function(a){
12220 return a;
12221 },"java.util.MapEntry");
12222 c$=Clazz_p0p();
12223 };
12224 c$=Clazz_p0p();
12225 Clazz_defineStatics(c$,
12226 "DEFAULT_MAX_SIZE",21,
12227 "loadFactor",7500);
12228 c$.NULL_OBJECT=c$.prototype.NULL_OBJECT=new Clazz._O();
12229 });
12230 Clazz_load(["java.util.AbstractSet","$.Set"],"java.util.HashSet",["java.util.HashMap"],function(){
12231 c$=Clazz_decorateAsClass(function(){
12232 this.backingMap=null;
12233 Clazz_instantialize(this,arguments);
12234 },java.util,"HashSet",java.util.AbstractSet,[java.util.Set,Cloneable,java.io.Serializable]);
12235
12236
12237 Clazz_makeConstructor(c$,
12238 function(){
12239 this.construct(new java.util.HashMap());
12240 });
12241 Clazz_makeConstructor(c$,
12242 function(capacity){
12243 this.construct(new java.util.HashMap(capacity));
12244 },"~N");
12245 Clazz_makeConstructor(c$,
12246 function(capacity,loadFactor){
12247 this.construct(new java.util.HashMap(capacity,loadFactor));
12248 },"~N,~N");
12249 Clazz_makeConstructor(c$,
12250 function(collection){
12251 this.construct(new java.util.HashMap(collection.size()<6?11:collection.size()*2));
12252 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
12253 this.add(e);
12254 }
12255 },"java.util.Collection");
12256 Clazz_makeConstructor(c$,
12257 function(backingMap){
12258 Clazz_superConstructor(this,java.util.HashSet,[]);
12259 this.backingMap=backingMap;
12260 },"java.util.HashMap");
12261
12262 Clazz_overrideMethod(c$,"add",
12263 function(object){
12264 return this.backingMap.put(object,this)==null;
12265 },"~O");
12266 Clazz_overrideMethod(c$,"clear",
12267 function(){
12268 this.backingMap.clear();
12269 });
12270 Clazz_defineMethod(c$,"clone",
12271 function(){
12272 try{
12273 var clone=this.cloneHM();
12274 clone.backingMap=this.backingMap.clone();
12275 return clone;
12276 }catch(e){
12277 if(Clazz_instanceOf(e,CloneNotSupportedException)){
12278 return null;
12279 }else{
12280 throw e;
12281 }
12282 }
12283 });
12284 Clazz_overrideMethod(c$,"contains",
12285 function(object){
12286 return this.backingMap.containsKey(object);
12287 },"~O");
12288 Clazz_overrideMethod(c$,"isEmpty",
12289 function(){
12290 return this.backingMap.isEmpty();
12291 });
12292 Clazz_defineMethod(c$,"iterator",
12293 function(){
12294 return this.backingMap.keySet().iterator();
12295 });
12296 Clazz_overrideMethod(c$,"remove",
12297 function(object){
12298 return this.backingMap.remove(object)!=null;
12299 },"~O");
12300 Clazz_overrideMethod(c$,"size",
12301 function(){
12302 return this.backingMap.size();
12303 });
12304 Clazz_defineMethod(c$,"createBackingMap",
12305 function(capacity,loadFactor){
12306 return new java.util.HashMap(capacity,loadFactor);
12307 },"~N,~N");
12308 });
12309 Clazz_declarePackage ("jssun.awt");
12310 Clazz_declareInterface (jssun.awt, "ComponentFactory");
12311 Clazz_declarePackage ("jssun.awt");
12312 Clazz_declareInterface (jssun.awt, "WindowClosingListener");
12313 Clazz_declarePackage ("jssun.awt");
12314 Clazz_declareInterface (jssun.awt, "WindowClosingSupport");
12315 Clazz_declarePackage ("java.awt");
12316 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 () {
12317 c$ = Clazz_decorateAsClass (function () {
12318 this.warningString = null;
12319 this.icons = null;
12320 this.temporaryLostComponent = null;
12321 this.syncLWRequests = false;
12322 this.beforeFirstShow = true;
12323 this.state = 0;
12324 this.alwaysOnTop = false;
12325 this.ownedWindowList = null;
12326 this.showWithParent = false;
12327 this.modalBlocker = null;
12328 this.modalExclusionType = null;
12329 this.windowListener = null;
12330 this.windowStateListener = null;
12331 this.windowFocusListener = null;
12332 this.focusableWindowState = true;
12333 this.isInShow = false;
12334 this.opacity = 1.0;
12335 this.shape = null;
12336 this.isTrayIconWindow = false;
12337 this.opaque = true;
12338 Clazz_instantialize (this, arguments);
12339 }, java.awt, "Window", java.awt.Container);
12340 Clazz_prepareFields (c$, function () {
12341 this.ownedWindowList =  new java.util.Vector ();
12342 });
12343 Clazz_makeConstructor (c$, 
12344 function (gc) {
12345 Clazz_superConstructor (this, java.awt.Window, []);
12346 this.init (gc);
12347 }, "java.awt.GraphicsConfiguration");
12348 Clazz_defineMethod (c$, "init", 
12349  function (gc) {
12350 this.syncLWRequests = java.awt.Window.systemSyncLWRequests;
12351 this.addToWindowList ();
12352 this.cursor = java.awt.Cursor.getPredefinedCursor (0);
12353 this.visible = false;
12354 this.setLayout ( new java.awt.BorderLayout ());
12355 this.modalExclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12356 }, "java.awt.GraphicsConfiguration");
12357 Clazz_makeConstructor (c$, 
12358 function () {
12359 Clazz_superConstructor (this, java.awt.Window, []);
12360 this.init (null);
12361 });
12362 Clazz_makeConstructor (c$, 
12363 function (owner) {
12364 Clazz_superConstructor (this, java.awt.Window, []);
12365 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12366 this.ownedInit (owner);
12367 }, "java.awt.Frame");
12368 Clazz_makeConstructor (c$, 
12369 function (owner) {
12370 Clazz_superConstructor (this, java.awt.Window, []);
12371 this.init (owner == null ? null : owner.getGraphicsConfiguration ());
12372 this.ownedInit (owner);
12373 }, "java.awt.Window");
12374 Clazz_makeConstructor (c$, 
12375 function (owner, gc) {
12376 this.construct (gc);
12377 this.ownedInit (owner);
12378 }, "java.awt.Window,java.awt.GraphicsConfiguration");
12379 Clazz_defineMethod (c$, "ownedInit", 
12380  function (owner) {
12381 this.parent = owner;
12382 if (owner != null) {
12383 owner.addOwnedWindow (this);
12384 }}, "java.awt.Window");
12385 Clazz_overrideMethod (c$, "constructComponentName", 
12386 function () {
12387 {
12388 return "win" + java.awt.Window.nameCounter++;
12389 }});
12390 Clazz_defineMethod (c$, "getIconImages", 
12391 function () {
12392 var icons = this.icons;
12393 if (icons == null || icons.size () == 0) {
12394 return  new java.util.ArrayList ();
12395 }return  new java.util.ArrayList (icons);
12396 });
12397 Clazz_defineMethod (c$, "setIconImages", 
12398 function (icons) {
12399 this.icons = (icons == null) ?  new java.util.ArrayList () :  new java.util.ArrayList (icons);
12400 this.firePropertyChangeObject ("iconImage", null, null);
12401 }, "java.util.List");
12402 Clazz_defineMethod (c$, "setIconImage", 
12403 function (image) {
12404 var imageList =  new java.util.ArrayList ();
12405 if (image != null) {
12406 imageList.add (image);
12407 }this.setIconImages (imageList);
12408 }, "java.awt.Image");
12409 Clazz_defineMethod (c$, "addNotify", 
12410 function () {
12411 var parent = this.parent;
12412 if (parent != null && parent.getPeer () == null) {
12413 parent.addNotify ();
12414 }if (this.peer == null) {
12415 this.peer = this.getToolkit ().createWindow (this);
12416 }{
12417 java.awt.Window.allWindows.add (this);
12418 }Clazz_superCall (this, java.awt.Window, "addNotify", []);
12419 });
12420 Clazz_defineMethod (c$, "removeNotify", 
12421 function () {
12422 {
12423 java.awt.Window.allWindows.remove (this);
12424 }Clazz_superCall (this, java.awt.Window, "removeNotify", []);
12425 });
12426 Clazz_defineMethod (c$, "pack", 
12427 function () {
12428 var parent = this.parent;
12429 if (parent != null && parent.getPeer () == null) {
12430 parent.addNotify ();
12431 }if (this.peer == null) {
12432 this.addNotify ();
12433 }var newSize = this.getPreferredSize ();
12434 if (this.peer != null) {
12435 this.setClientSize (newSize.width, newSize.height);
12436 }if (this.beforeFirstShow) {
12437 this.isPacked = true;
12438 }this.validate ();
12439 });
12440 Clazz_defineMethod (c$, "setMinimumSize", 
12441 function (minimumSize) {
12442 {
12443 Clazz_superCall (this, java.awt.Window, "setMinimumSize", [minimumSize]);
12444 var size = this.getSize ();
12445 if (this.isMinimumSizeSet ()) {
12446 if (size.width < minimumSize.width || size.height < minimumSize.height) {
12447 var nw = Math.max (this.width, minimumSize.width);
12448 var nh = Math.max (this.height, minimumSize.height);
12449 this.setSize (nw, nh);
12450 }}}}, "java.awt.Dimension");
12451 Clazz_defineMethod (c$, "reshape", 
12452 function (x, y, width, height) {
12453 if (this.isMinimumSizeSet ()) {
12454 var minSize = this.getMinimumSize ();
12455 if (width < minSize.width) {
12456 width = minSize.width;
12457 }if (height < minSize.height) {
12458 height = minSize.height;
12459 }}Clazz_superCall (this, java.awt.Window, "reshape", [x, y, width, height]);
12460 }, "~N,~N,~N,~N");
12461 Clazz_defineMethod (c$, "setClientSize", 
12462 function (w, h) {
12463 {
12464 this.setBounds (this.x, this.y, w, h);
12465 }}, "~N,~N");
12466 c$.closeSplashScreen = Clazz_defineMethod (c$, "closeSplashScreen", 
12467 function () {
12468 });
12469 Clazz_defineMethod (c$, "show", 
12470 function () {
12471 this.validate ();
12472 this.isInShow = true;
12473 if (this.visible) {
12474 this.toFront ();
12475 } else {
12476 this.beforeFirstShow = false;
12477 java.awt.Window.closeSplashScreen ();
12478 Clazz_superCall (this, java.awt.Window, "show", []);
12479 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12480 var child = this.ownedWindowList.elementAt (i);
12481 if ((child != null) && child.showWithParent) {
12482 child.show ();
12483 child.showWithParent = false;
12484 }}
12485 if (!this.isModalBlocked ()) {
12486 this.updateChildrenBlocking ();
12487 } else {
12488 this.modalBlocker.toFront_NoClientCode ();
12489 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12490 java.awt.Window.updateChildFocusableWindowState (this);
12491 }}this.isInShow = false;
12492 if ((this.state & 1) == 0) {
12493 this.postWindowEvent (200);
12494 this.state |= 1;
12495 }});
12496 c$.updateChildFocusableWindowState = Clazz_defineMethod (c$, "updateChildFocusableWindowState", 
12497 function (w) {
12498 for (var i = 0; i < w.ownedWindowList.size (); i++) {
12499 var child = w.ownedWindowList.elementAt (i);
12500 if (child != null) {
12501 java.awt.Window.updateChildFocusableWindowState (child);
12502 }}
12503 }, "java.awt.Window");
12504 Clazz_defineMethod (c$, "postWindowEvent", 
12505 function (id) {
12506 if (this.windowListener != null || (this.eventMask & 64) != 0 || java.awt.Toolkit.enabledOnToolkit (64)) {
12507 var e =  new java.awt.event.WindowEvent (this, id);
12508 java.awt.Toolkit.getEventQueue ().postEvent (e);
12509 }}, "~N");
12510 Clazz_defineMethod (c$, "hide", 
12511 function () {
12512 {
12513 for (var i = 0; i < this.ownedWindowList.size (); i++) {
12514 var child = this.ownedWindowList.elementAt (i);
12515 if ((child != null) && child.visible) {
12516 child.hide ();
12517 child.showWithParent = true;
12518 }}
12519 }Clazz_superCall (this, java.awt.Window, "hide", []);
12520 });
12521 Clazz_overrideMethod (c$, "clearMostRecentFocusOwnerOnHide", 
12522 function () {
12523 });
12524 Clazz_defineMethod (c$, "dispose", 
12525 function () {
12526 this.doDispose ();
12527 });
12528 Clazz_defineMethod (c$, "disposeImpl", 
12529 function () {
12530 this.dispose ();
12531 });
12532 Clazz_defineMethod (c$, "doDispose", 
12533 function () {
12534 if (!Clazz_isClassDefined ("java.awt.Window$1DisposeAction")) {
12535 java.awt.Window.$Window$1DisposeAction$ ();
12536 }
12537 var action = Clazz_innerTypeInstance (java.awt.Window$1DisposeAction, this, null);
12538 action.run ();
12539 this.postWindowEvent (202);
12540 });
12541 Clazz_overrideMethod (c$, "adjustListeningChildrenOnParent", 
12542 function (mask, num) {
12543 }, "~N,~N");
12544 Clazz_overrideMethod (c$, "adjustDecendantsOnParent", 
12545 function (num) {
12546 }, "~N");
12547 Clazz_defineMethod (c$, "toFront", 
12548 function () {
12549 this.toFront_NoClientCode ();
12550 });
12551 Clazz_defineMethod (c$, "toFront_NoClientCode", 
12552 function () {
12553 if (this.visible) {
12554 }});
12555 Clazz_defineMethod (c$, "toBack", 
12556 function () {
12557 this.toBack_NoClientCode ();
12558 });
12559 Clazz_defineMethod (c$, "toBack_NoClientCode", 
12560 function () {
12561 if (this.isAlwaysOnTop ()) {
12562 try {
12563 this.setAlwaysOnTop (false);
12564 } catch (e) {
12565 if (Clazz_exceptionOf (e, SecurityException)) {
12566 } else {
12567 throw e;
12568 }
12569 }
12570 }if (this.visible) {
12571 }});
12572 Clazz_overrideMethod (c$, "getToolkit", 
12573 function () {
12574 return java.awt.Toolkit.getDefaultToolkit ();
12575 });
12576 Clazz_defineMethod (c$, "getWarningString", 
12577 function () {
12578 return this.warningString;
12579 });
12580 Clazz_overrideMethod (c$, "getLocale", 
12581 function () {
12582 if (this.locale == null) {
12583 return java.util.Locale.getDefault ();
12584 }return this.locale;
12585 });
12586 Clazz_defineMethod (c$, "setCursor", 
12587 function (cursor) {
12588 if (cursor == null) {
12589 cursor = java.awt.Cursor.getPredefinedCursor (0);
12590 }Clazz_superCall (this, java.awt.Window, "setCursor", [cursor]);
12591 }, "java.awt.Cursor");
12592 Clazz_defineMethod (c$, "getOwner", 
12593 function () {
12594 return this.getOwner_NoClientCode ();
12595 });
12596 Clazz_defineMethod (c$, "getOwner_NoClientCode", 
12597 function () {
12598 return this.parent;
12599 });
12600 Clazz_defineMethod (c$, "getOwnedWindows", 
12601 function () {
12602 return this.getOwnedWindows_NoClientCode ();
12603 });
12604 Clazz_defineMethod (c$, "getOwnedWindows_NoClientCode", 
12605 function () {
12606 var realCopy;
12607 {
12608 var fullSize = this.ownedWindowList.size ();
12609 var realSize = 0;
12610 var fullCopy =  new Array (fullSize);
12611 for (var i = 0; i < fullSize; i++) {
12612 fullCopy[realSize] = this.ownedWindowList.elementAt (i);
12613 if (fullCopy[realSize] != null) {
12614 realSize++;
12615 }}
12616 if (fullSize != realSize) {
12617 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12618 } else {
12619 realCopy = fullCopy;
12620 }}return realCopy;
12621 });
12622 Clazz_defineMethod (c$, "isModalBlocked", 
12623 function () {
12624 return this.modalBlocker != null;
12625 });
12626 Clazz_defineMethod (c$, "setModalBlocked", 
12627 function (blocker, blocked, peerCall) {
12628 }, "java.awt.Dialog,~B,~B");
12629 Clazz_defineMethod (c$, "getModalBlocker", 
12630 function () {
12631 return this.modalBlocker;
12632 });
12633 c$.getAllWindows = Clazz_defineMethod (c$, "getAllWindows", 
12634 function () {
12635 {
12636 var v =  new java.util.ArrayList ();
12637 v.addAll (java.awt.Window.allWindows);
12638 return v;
12639 }});
12640 c$.getAllUnblockedWindows = Clazz_defineMethod (c$, "getAllUnblockedWindows", 
12641 function () {
12642 {
12643 var unblocked =  new java.util.ArrayList ();
12644 for (var i = 0; i < java.awt.Window.allWindows.size (); i++) {
12645 var w = java.awt.Window.allWindows.get (i);
12646 if (!w.isModalBlocked ()) {
12647 unblocked.add (w);
12648 }}
12649 return unblocked;
12650 }});
12651 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12652  function (appContext) {
12653 {
12654 var realCopy;
12655 var windowList = appContext.get (java.awt.Window);
12656 if (windowList != null) {
12657 var fullSize = windowList.size ();
12658 var realSize = 0;
12659 var fullCopy =  new Array (fullSize);
12660 for (var i = 0; i < fullSize; i++) {
12661 var w = windowList.get (i);
12662 if (w != null) {
12663 fullCopy[realSize++] = w;
12664 }}
12665 if (fullSize != realSize) {
12666 realCopy = java.util.Arrays.copyOf (fullCopy, realSize);
12667 } else {
12668 realCopy = fullCopy;
12669 }} else {
12670 realCopy =  new Array (0);
12671 }return realCopy;
12672 }}, "jssun.awt.AppContext");
12673 c$.getWindows = Clazz_defineMethod (c$, "getWindows", 
12674 function () {
12675 return java.awt.Window.getWindows (jssun.awt.AppContext.getAppContext ());
12676 });
12677 c$.getOwnerlessWindows = Clazz_defineMethod (c$, "getOwnerlessWindows", 
12678 function () {
12679 var allWindows = java.awt.Window.getWindows ();
12680 var ownerlessCount = 0;
12681 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12682 if (w.getOwner () == null) {
12683 ownerlessCount++;
12684 }}
12685 var ownerless =  new Array (ownerlessCount);
12686 var c = 0;
12687 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
12688 if (w.getOwner () == null) {
12689 ownerless[c++] = w;
12690 }}
12691 return ownerless;
12692 });
12693 Clazz_defineMethod (c$, "getDocumentRoot", 
12694 function () {
12695 {
12696 var w = this;
12697 while (w.getOwner () != null) {
12698 w = w.getOwner ();
12699 }
12700 return w;
12701 }});
12702 Clazz_defineMethod (c$, "setModalExclusionType", 
12703 function (exclusionType) {
12704 if (exclusionType == null) {
12705 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12706 }if (!java.awt.Toolkit.getDefaultToolkit ().isModalExclusionTypeSupported (exclusionType)) {
12707 exclusionType = java.awt.Dialog.ModalExclusionType.NO_EXCLUDE;
12708 }if (this.modalExclusionType === exclusionType) {
12709 return;
12710 }this.modalExclusionType = exclusionType;
12711 }, "java.awt.Dialog.ModalExclusionType");
12712 Clazz_defineMethod (c$, "getModalExclusionType", 
12713 function () {
12714 return this.modalExclusionType;
12715 });
12716 Clazz_defineMethod (c$, "isModalExcluded", 
12717 function (exclusionType) {
12718 if ((this.modalExclusionType != null) && this.modalExclusionType.compareTo (exclusionType) >= 0) {
12719 return true;
12720 }var owner = this.getOwner_NoClientCode ();
12721 return (owner != null) && owner.isModalExcluded (exclusionType);
12722 }, "java.awt.Dialog.ModalExclusionType");
12723 Clazz_defineMethod (c$, "updateChildrenBlocking", 
12724 function () {
12725 });
12726 Clazz_defineMethod (c$, "addWindowListener", 
12727 function (l) {
12728 if (l == null) {
12729 return;
12730 }this.newEventsOnly = true;
12731 this.windowListener = java.awt.AWTEventMulticaster.add (this.windowListener, l);
12732 }, "java.awt.event.WindowListener");
12733 Clazz_defineMethod (c$, "addWindowStateListener", 
12734 function (l) {
12735 if (l == null) {
12736 return;
12737 }this.windowStateListener = java.awt.AWTEventMulticaster.add (this.windowStateListener, l);
12738 this.newEventsOnly = true;
12739 }, "java.awt.event.WindowStateListener");
12740 Clazz_defineMethod (c$, "addWindowFocusListener", 
12741 function (l) {
12742 if (l == null) {
12743 return;
12744 }this.windowFocusListener = java.awt.AWTEventMulticaster.add (this.windowFocusListener, l);
12745 this.newEventsOnly = true;
12746 }, "java.awt.event.WindowFocusListener");
12747 Clazz_defineMethod (c$, "removeWindowListener", 
12748 function (l) {
12749 if (l == null) {
12750 return;
12751 }this.windowListener = java.awt.AWTEventMulticaster.remove (this.windowListener, l);
12752 }, "java.awt.event.WindowListener");
12753 Clazz_defineMethod (c$, "removeWindowStateListener", 
12754 function (l) {
12755 if (l == null) {
12756 return;
12757 }this.windowStateListener = java.awt.AWTEventMulticaster.remove (this.windowStateListener, l);
12758 }, "java.awt.event.WindowStateListener");
12759 Clazz_defineMethod (c$, "removeWindowFocusListener", 
12760 function (l) {
12761 if (l == null) {
12762 return;
12763 }this.windowFocusListener = java.awt.AWTEventMulticaster.remove (this.windowFocusListener, l);
12764 }, "java.awt.event.WindowFocusListener");
12765 Clazz_defineMethod (c$, "getWindowListeners", 
12766 function () {
12767 return (this.getListeners (java.awt.event.WindowListener));
12768 });
12769 Clazz_defineMethod (c$, "getWindowFocusListeners", 
12770 function () {
12771 return (this.getListeners (java.awt.event.WindowFocusListener));
12772 });
12773 Clazz_defineMethod (c$, "getWindowStateListeners", 
12774 function () {
12775 return (this.getListeners (java.awt.event.WindowStateListener));
12776 });
12777 Clazz_defineMethod (c$, "getListeners", 
12778 function (listenerType) {
12779 var l = null;
12780 if (listenerType === java.awt.event.WindowFocusListener) {
12781 l = this.windowFocusListener;
12782 } else if (listenerType === java.awt.event.WindowStateListener) {
12783 l = this.windowStateListener;
12784 } else if (listenerType === java.awt.event.WindowListener) {
12785 l = this.windowListener;
12786 } else {
12787 return Clazz_superCall (this, java.awt.Window, "getListeners", [listenerType]);
12788 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
12789 }, "Class");
12790 Clazz_defineMethod (c$, "eventEnabled", 
12791 function (e) {
12792 switch (e.id) {
12793 case 200:
12794 case 201:
12795 case 202:
12796 case 203:
12797 case 204:
12798 case 205:
12799 case 206:
12800 if ((this.eventMask & 64) != 0 || this.windowListener != null) {
12801 return true;
12802 }return false;
12803 case 207:
12804 case 208:
12805 if ((this.eventMask & 524288) != 0 || this.windowFocusListener != null) {
12806 return true;
12807 }return false;
12808 case 209:
12809 if ((this.eventMask & 262144) != 0 || this.windowStateListener != null) {
12810 return true;
12811 }return false;
12812 default:
12813 break;
12814 }
12815 return Clazz_superCall (this, java.awt.Window, "eventEnabled", [e]);
12816 }, "java.awt.AWTEvent");
12817 Clazz_overrideMethod (c$, "processEvent", 
12818 function (e) {
12819 if (Clazz_instanceOf (e, java.awt.event.WindowEvent)) {
12820 switch (e.getID ()) {
12821 case 200:
12822 case 201:
12823 case 202:
12824 case 203:
12825 case 204:
12826 case 205:
12827 case 206:
12828 this.processWindowEvent (e);
12829 break;
12830 case 207:
12831 case 208:
12832 this.processWindowFocusEvent (e);
12833 break;
12834 case 209:
12835 this.processWindowStateEvent (e);
12836 default:
12837 break;
12838 }
12839 return;
12840 }this.processEventCont (e);
12841 }, "java.awt.AWTEvent");
12842 Clazz_defineMethod (c$, "processWindowEvent", 
12843 function (e) {
12844 var listener = this.windowListener;
12845 if (listener != null) {
12846 switch (e.getID ()) {
12847 case 200:
12848 listener.windowOpened (e);
12849 break;
12850 case 201:
12851 listener.windowClosing (e);
12852 break;
12853 case 202:
12854 listener.windowClosed (e);
12855 break;
12856 case 203:
12857 listener.windowIconified (e);
12858 break;
12859 case 204:
12860 listener.windowDeiconified (e);
12861 break;
12862 case 205:
12863 listener.windowActivated (e);
12864 break;
12865 case 206:
12866 listener.windowDeactivated (e);
12867 break;
12868 default:
12869 break;
12870 }
12871 }}, "java.awt.event.WindowEvent");
12872 Clazz_defineMethod (c$, "processWindowFocusEvent", 
12873 function (e) {
12874 var listener = this.windowFocusListener;
12875 if (listener != null) {
12876 switch (e.getID ()) {
12877 case 207:
12878 listener.windowGainedFocus (e);
12879 break;
12880 case 208:
12881 listener.windowLostFocus (e);
12882 break;
12883 default:
12884 break;
12885 }
12886 }}, "java.awt.event.WindowEvent");
12887 Clazz_defineMethod (c$, "processWindowStateEvent", 
12888 function (e) {
12889 var listener = this.windowStateListener;
12890 if (listener != null) {
12891 switch (e.getID ()) {
12892 case 209:
12893 listener.windowStateChanged (e);
12894 break;
12895 default:
12896 break;
12897 }
12898 }}, "java.awt.event.WindowEvent");
12899 Clazz_overrideMethod (c$, "preProcessKeyEvent", 
12900 function (e) {
12901 }, "java.awt.event.KeyEvent");
12902 Clazz_overrideMethod (c$, "postProcessKeyEvent", 
12903 function (e) {
12904 }, "java.awt.event.KeyEvent");
12905 Clazz_defineMethod (c$, "setAlwaysOnTop", 
12906 function (alwaysOnTop) {
12907 var oldAlwaysOnTop;
12908 {
12909 oldAlwaysOnTop = this.alwaysOnTop;
12910 this.alwaysOnTop = alwaysOnTop;
12911 }if (oldAlwaysOnTop != alwaysOnTop) {
12912 if (this.isAlwaysOnTopSupported ()) {
12913 }this.firePropertyChangeBool ("alwaysOnTop", oldAlwaysOnTop, alwaysOnTop);
12914 }}, "~B");
12915 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
12916 function () {
12917 return java.awt.Toolkit.getDefaultToolkit ().isAlwaysOnTopSupported ();
12918 });
12919 Clazz_defineMethod (c$, "isAlwaysOnTop", 
12920 function () {
12921 return this.alwaysOnTop;
12922 });
12923 Clazz_defineMethod (c$, "isActive", 
12924 function () {
12925 return false;
12926 });
12927 Clazz_defineMethod (c$, "isFocused", 
12928 function () {
12929 return swingjs.JSToolkit.isFocused (this);
12930 });
12931 Clazz_overrideMethod (c$, "getFocusTraversalKeys", 
12932 function (id) {
12933 return null;
12934 }, "~N");
12935 Clazz_defineMethod (c$, "setFocusCycleRoot", 
12936 function (focusCycleRoot) {
12937 }, "~B");
12938 Clazz_defineMethod (c$, "isFocusCycleRoot", 
12939 function () {
12940 return true;
12941 });
12942 Clazz_overrideMethod (c$, "getFocusCycleRootAncestor", 
12943 function () {
12944 return null;
12945 });
12946 Clazz_defineMethod (c$, "isFocusableWindow", 
12947 function () {
12948 if (!this.getFocusableWindowState ()) {
12949 return false;
12950 }if (Clazz_instanceOf (this, java.awt.Frame) || Clazz_instanceOf (this, java.awt.Dialog)) {
12951 return true;
12952 }for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
12953 if (Clazz_instanceOf (owner, java.awt.Frame) || Clazz_instanceOf (owner, java.awt.Dialog)) {
12954 return owner.isShowing ();
12955 }}
12956 return false;
12957 });
12958 Clazz_defineMethod (c$, "getFocusableWindowState", 
12959 function () {
12960 return this.focusableWindowState;
12961 });
12962 Clazz_defineMethod (c$, "setFocusableWindowState", 
12963 function (focusableWindowState) {
12964 var oldFocusableWindowState;
12965 {
12966 oldFocusableWindowState = this.focusableWindowState;
12967 this.focusableWindowState = focusableWindowState;
12968 }this.firePropertyChangeBool ("focusableWindowState", oldFocusableWindowState, focusableWindowState);
12969 if (oldFocusableWindowState && !focusableWindowState && this.isFocused ()) {
12970 for (var owner = this.getOwner (); owner != null; owner = owner.getOwner ()) {
12971 }
12972 }}, "~B");
12973 Clazz_defineMethod (c$, "dispatchEventImpl", 
12974 function (e) {
12975 if (e.getID () == 101) {
12976 this.invalidate ();
12977 this.validate ();
12978 }Clazz_superCall (this, java.awt.Window, "dispatchEventImpl", [e]);
12979 }, "java.awt.AWTEvent");
12980 Clazz_overrideMethod (c$, "postEvent", 
12981 function (e) {
12982 if (this.handleEvent (e)) {
12983 e.consume ();
12984 return true;
12985 }return false;
12986 }, "java.awt.Event");
12987 Clazz_defineMethod (c$, "isShowing", 
12988 function () {
12989 return this.visible;
12990 });
12991 Clazz_defineMethod (c$, "applyResourceBundle", 
12992 function (rb) {
12993 this.applyComponentOrientation (java.awt.ComponentOrientation.getOrientation (rb));
12994 }, "java.util.ResourceBundle");
12995 Clazz_defineMethod (c$, "applyResourceBundle", 
12996 function (rbName) {
12997 this.applyResourceBundle (java.util.ResourceBundle.getBundle (rbName));
12998 }, "~S");
12999 Clazz_defineMethod (c$, "addOwnedWindow", 
13000 function (weakWindow) {
13001 if (weakWindow != null) {
13002 {
13003 if (!this.ownedWindowList.contains (weakWindow)) {
13004 this.ownedWindowList.addElement (weakWindow);
13005 }}}}, "java.awt.Window");
13006 Clazz_defineMethod (c$, "removeOwnedWindow", 
13007 function (weakWindow) {
13008 if (weakWindow != null) {
13009 this.ownedWindowList.removeElement (weakWindow);
13010 }}, "java.awt.Window");
13011 Clazz_defineMethod (c$, "connectOwnedWindow", 
13012 function (child) {
13013 child.parent = this;
13014 this.addOwnedWindow (child);
13015 }, "java.awt.Window");
13016 Clazz_defineMethod (c$, "addToWindowList", 
13017  function () {
13018 var windowList = this.appContext.get (java.awt.Window);
13019 if (windowList == null) {
13020 windowList =  new java.util.Vector ();
13021 this.appContext.put (java.awt.Window, windowList);
13022 }windowList.add (this);
13023 });
13024 c$.removeFromWindowList = Clazz_defineMethod (c$, "removeFromWindowList", 
13025  function (context, w) {
13026 {
13027 var windowList = context.get (java.awt.Window);
13028 if (windowList != null) {
13029 windowList.remove (w);
13030 }}}, "jssun.awt.AppContext,java.awt.Window");
13031 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
13032 function () {
13033 if (this.graphicsConfig == null) this.graphicsConfig = swingjs.JSToolkit.getGraphicsConfiguration ();
13034 return this.graphicsConfig;
13035 });
13036 Clazz_overrideMethod (c$, "resetGC", 
13037 function () {
13038 });
13039 Clazz_defineMethod (c$, "setLocationRelativeTo", 
13040 function (c) {
13041 var root = null;
13042 if (c != null) {
13043 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) {
13044 root = c;
13045 } else {
13046 var parent;
13047 for (parent = c.getParent (); parent != null; parent = parent.getParent ()) {
13048 if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
13049 root = parent;
13050 break;
13051 }}
13052 }}if ((c != null && !c.isShowing ()) || root == null || !root.isShowing ()) {
13053 var paneSize = this.getSize ();
13054 var centerPoint = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ().getCenterPoint ();
13055 this.setLocation (centerPoint.x - Clazz_doubleToInt (paneSize.width / 2), centerPoint.y - Clazz_doubleToInt (paneSize.height / 2));
13056 } else {
13057 var invokerSize = c.getSize ();
13058 var invokerScreenLocation = c.getLocationOnScreen ();
13059 var windowBounds = this.getBounds ();
13060 var dx = invokerScreenLocation.x + ((invokerSize.width - windowBounds.width) >> 1);
13061 var dy = invokerScreenLocation.y + ((invokerSize.height - windowBounds.height) >> 1);
13062 var ss = root.getGraphicsConfiguration ().getBounds ();
13063 if (dy + windowBounds.height > ss.y + ss.height) {
13064 dy = ss.y + ss.height - windowBounds.height;
13065 if (invokerScreenLocation.x - ss.x + Clazz_doubleToInt (invokerSize.width / 2) < Clazz_doubleToInt (ss.width / 2)) {
13066 dx = invokerScreenLocation.x + invokerSize.width;
13067 } else {
13068 dx = invokerScreenLocation.x - windowBounds.width;
13069 }}if (dx + windowBounds.width > ss.x + ss.width) {
13070 dx = ss.x + ss.width - windowBounds.width;
13071 }if (dx < ss.x) dx = ss.x;
13072 if (dy < ss.y) dy = ss.y;
13073 this.setLocation (dx, dy);
13074 }}, "java.awt.Component");
13075 Clazz_defineMethod (c$, "deliverMouseWheelToAncestor", 
13076 function (e) {
13077 }, "java.awt.event.MouseWheelEvent");
13078 Clazz_overrideMethod (c$, "dispatchMouseWheelToAncestor", 
13079 function (e) {
13080 return false;
13081 }, "java.awt.event.MouseWheelEvent");
13082 Clazz_defineMethod (c$, "getTemporaryLostComponent", 
13083 function () {
13084 return this.temporaryLostComponent;
13085 });
13086 Clazz_defineMethod (c$, "setTemporaryLostComponent", 
13087 function (component) {
13088 var previousComp = this.temporaryLostComponent;
13089 if (component == null || component.canBeFocusOwner ()) {
13090 this.temporaryLostComponent = component;
13091 } else {
13092 this.temporaryLostComponent = null;
13093 }return previousComp;
13094 }, "java.awt.Component");
13095 Clazz_defineMethod (c$, "canContainFocusOwner", 
13096 function (focusOwnerCandidate) {
13097 return Clazz_superCall (this, java.awt.Window, "canContainFocusOwner", [focusOwnerCandidate]) && this.isFocusableWindow ();
13098 }, "java.awt.Component");
13099 Clazz_defineMethod (c$, "setBounds", 
13100 function (r) {
13101 this.setBounds (r.x, r.y, r.width, r.height);
13102 }, "java.awt.Rectangle");
13103 Clazz_overrideMethod (c$, "isRecursivelyVisible", 
13104 function () {
13105 return this.visible;
13106 });
13107 Clazz_defineMethod (c$, "getOpacity", 
13108 function () {
13109 {
13110 return this.opacity;
13111 }});
13112 Clazz_defineMethod (c$, "setOpacity", 
13113 function (opacity) {
13114 {
13115 if (opacity < 0.0 || opacity > 1.0) {
13116 throw  new IllegalArgumentException ("The value of opacity should be in the range [0.0f .. 1.0f].");
13117 }this.opacity = opacity;
13118 }}, "~N");
13119 Clazz_defineMethod (c$, "getShape", 
13120 function () {
13121 {
13122 return this.shape;
13123 }});
13124 Clazz_defineMethod (c$, "setShape", 
13125 function (shape) {
13126 {
13127 this.shape = shape;
13128 }}, "java.awt.Shape");
13129 Clazz_defineMethod (c$, "setOpaque", 
13130 function (opaque) {
13131 {
13132 java.awt.Window.setLayersOpaque (this, opaque);
13133 this.opaque = opaque;
13134 var peer = this.getPeer ();
13135 if (peer != null) {
13136 peer.setOpaque (opaque);
13137 }}}, "~B");
13138 c$.setLayersOpaque = Clazz_defineMethod (c$, "setLayersOpaque", 
13139  function (component, isOpaque) {
13140 if (Clazz_instanceOf (component, javax.swing.RootPaneContainer)) {
13141 var rpc = component;
13142 var root = rpc.getRootPane ();
13143 var lp = root.getLayeredPane ();
13144 var c = root.getContentPane ();
13145 var content = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
13146 lp.setOpaque (isOpaque);
13147 root.setOpaque (isOpaque);
13148 root.setDoubleBuffered (isOpaque);
13149 if (content != null) {
13150 content.setOpaque (isOpaque);
13151 content.setDoubleBuffered (isOpaque);
13152 var numChildren = content.getComponentCount ();
13153 if (numChildren > 0) {
13154 var child = content.getComponent (0);
13155 if (Clazz_instanceOf (child, javax.swing.RootPaneContainer)) {
13156 java.awt.Window.setLayersOpaque (child, isOpaque);
13157 }}}}var bg = component.getBackground ();
13158 var hasTransparentBg = java.awt.Window.TRANSPARENT_BACKGROUND_COLOR.equals (bg);
13159 var container = null;
13160 if (Clazz_instanceOf (component, java.awt.Container)) {
13161 container = component;
13162 }if (isOpaque) {
13163 if (hasTransparentBg) {
13164 var newColor = null;
13165 if (container != null && container.preserveBackgroundColor != null) {
13166 newColor = container.preserveBackgroundColor;
13167 } else {
13168 newColor =  new java.awt.Color (255, 255, 255);
13169 }component.setBackground (newColor);
13170 }} else {
13171 if (!hasTransparentBg && container != null) {
13172 container.preserveBackgroundColor = bg;
13173 }component.setBackground (java.awt.Window.TRANSPARENT_BACKGROUND_COLOR);
13174 }}, "java.awt.Component,~B");
13175 Clazz_overrideMethod (c$, "getContainer", 
13176 function () {
13177 return null;
13178 });
13179 Clazz_overrideMethod (c$, "mixOnReshaping", 
13180 function () {
13181 });
13182 Clazz_overrideMethod (c$, "getLocationOnWindow", 
13183 function () {
13184 return  new java.awt.Point (0, 0);
13185 });
13186 c$.$Window$1DisposeAction$ = function () {
13187 Clazz_pu$h(self.c$);
13188 c$ = Clazz_decorateAsClass (function () {
13189 Clazz_prepareCallback (this, arguments);
13190 Clazz_instantialize (this, arguments);
13191 }, java.awt, "Window$1DisposeAction", null, Runnable);
13192 Clazz_overrideMethod (c$, "run", 
13193 function () {
13194 var a;
13195 {
13196 a =  new Array (this.b$["java.awt.Window"].ownedWindowList.size ());
13197 this.b$["java.awt.Window"].ownedWindowList.copyInto (a);
13198 }for (var b = 0; b < a.length; b++) {
13199 var c = (((a[b])));
13200 if (c != null) {
13201 c.disposeImpl ();
13202 }}
13203 this.b$["java.awt.Window"].hide ();
13204 this.b$["java.awt.Window"].beforeFirstShow = true;
13205 this.b$["java.awt.Window"].removeNotify ();
13206 this.b$["java.awt.Window"].clearCurrentFocusCycleRootOnHide ();
13207 });
13208 c$ = Clazz_p0p ();
13209 };
13210 Clazz_defineStatics (c$,
13211 "systemSyncLWRequests", false,
13212 "OPENED", 0x01,
13213 "base", "win",
13214 "nameCounter", 0);
13215 c$.allWindows = c$.prototype.allWindows =  new java.util.ArrayList ();
13216 c$.TRANSPARENT_BACKGROUND_COLOR = c$.prototype.TRANSPARENT_BACKGROUND_COLOR =  new java.awt.Color (0, 0, 0, 0);
13217 c$ = Clazz_decorateAsClass (function () {
13218 this.focusRoot = null;
13219 this.focusOwner = null;
13220 Clazz_instantialize (this, arguments);
13221 }, java.awt, "FocusManager");
13222 });
13223 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(){
13224 c$=Clazz_decorateAsClass(function(){
13225 this.elementCount=0;
13226 this.elementData=null;
13227 this.capacityIncrement=0;
13228 Clazz_instantialize(this,arguments);
13229 },java.util,"Vector",java.util.AbstractList,[java.util.List,java.util.RandomAccess,Cloneable,java.io.Serializable]);
13230 Clazz_makeConstructor(c$,
13231 function(){
13232 this.construct(10,0);
13233 });
13234 Clazz_makeConstructor(c$,
13235 function(capacity){
13236 this.construct(capacity,0);
13237 },"~N");
13238 Clazz_makeConstructor(c$,
13239 function(capacity,capacityIncrement){
13240 Clazz_superConstructor(this,java.util.Vector,[]);
13241 this.elementCount=0;
13242 try{
13243 this.elementData=this.newElementArray(capacity);
13244 }catch(e){
13245 if(Clazz_instanceOf(e,NegativeArraySizeException)){
13246 throw new IllegalArgumentException();
13247 }else{
13248 throw e;
13249 }
13250 }
13251 this.capacityIncrement=capacityIncrement;
13252 },"~N,~N");
13253 Clazz_makeConstructor(c$,
13254 function(collection){
13255 this.construct(collection.size(),0);
13256 var it=collection.iterator();
13257 while(it.hasNext()){
13258 this.elementData[this.elementCount++]=it.next();
13259 }
13260 },"java.util.Collection");
13261 Clazz_defineMethod(c$,"newElementArray",
13262 ($fz=function(size){
13263 return new Array(size);
13264 },$fz.isPrivate=true,$fz),"~N");
13265 Clazz_defineMethod(c$,"add",
13266 function(location,object){
13267 this.insertElementAt(object,location);
13268 },"~N,~O");
13269 Clazz_defineMethod(c$,"add",
13270 function(object){
13271 this.addElement(object);
13272 return true;
13273 },"~O");
13274 Clazz_defineMethod(c$,"addAll",
13275 function(location,collection){
13276 if(0<=location&&location<=this.elementCount){
13277 var size=collection.size();
13278 if(size==0){
13279 return false;
13280 }var required=size-(this.elementData.length-this.elementCount);
13281 if(required>0){
13282 this.growBy(required);
13283 }var count=this.elementCount-location;
13284 if(count>0){
13285 System.arraycopy(this.elementData,location,this.elementData,location+size,count);
13286 }var it=collection.iterator();
13287 while(it.hasNext()){
13288 this.elementData[location++]=it.next();
13289 }
13290 this.elementCount+=size;
13291 this.modCount++;
13292 return true;
13293 }throw new ArrayIndexOutOfBoundsException(location);
13294 },"~N,java.util.Collection");
13295 Clazz_defineMethod(c$,"addAll",
13296 function(collection){
13297 return this.addAll(this.elementCount,collection);
13298 },"java.util.Collection");
13299 Clazz_defineMethod(c$,"addElement",
13300 function(object){
13301 if(this.elementCount==this.elementData.length){
13302 this.growByOne();
13303 }this.elementData[this.elementCount++]=object;
13304 this.modCount++;
13305 },"~O");
13306 Clazz_defineMethod(c$,"capacity",
13307 function(){
13308 return this.elementData.length;
13309 });
13310 Clazz_overrideMethod(c$,"clear",
13311 function(){
13312 this.removeAllElements();
13313 });
13314 Clazz_defineMethod(c$,"clone",
13315 function(){
13316 try{
13317 var vector=Clazz_superCall(this,java.util.Vector,"clone",[]);
13318 vector.elementData=this.elementData.clone();
13319 return vector;
13320 }catch(e){
13321 if(Clazz_instanceOf(e,CloneNotSupportedException)){
13322 return null;
13323 }else{
13324 throw e;
13325 }
13326 }
13327 });
13328 Clazz_overrideMethod(c$,"contains",
13329 function(object){
13330 return this.indexOf(object,0)!=-1;
13331 },"~O");
13332 Clazz_defineMethod(c$,"copyInto",
13333 function(elements){
13334 System.arraycopy(this.elementData,0,elements,0,this.elementCount);
13335 },"~A");
13336 Clazz_defineMethod(c$,"elementAt",
13337 function(location){
13338 if(location<this.elementCount){
13339 return this.elementData[location];
13340 }throw new ArrayIndexOutOfBoundsException(location);
13341 },"~N");
13342 Clazz_defineMethod(c$,"elements",
13343 function(){
13344 return((Clazz_isClassDefined("java.util.Vector$1")?0:java.util.Vector.$Vector$1$()),Clazz_innerTypeInstance(java.util.Vector$1,this,null));
13345 });
13346 Clazz_defineMethod(c$,"ensureCapacity",
13347 function(minimumCapacity){
13348 if(this.elementData.length<minimumCapacity){
13349 var next=(this.capacityIncrement<=0?this.elementData.length:this.capacityIncrement)+this.elementData.length;
13350 this.grow(minimumCapacity>next?minimumCapacity:next);
13351 }},"~N");
13352 Clazz_overrideMethod(c$,"equals",
13353 function(object){
13354 if(this===object){
13355 return true;
13356 }if(Clazz_instanceOf(object,java.util.List)){
13357 var list=object;
13358 if(list.size()!=this.size()){
13359 return false;
13360 }var index=0;
13361 var it=list.iterator();
13362 while(it.hasNext()){
13363 var e1=this.elementData[index++];
13364 var e2=it.next();
13365 if(!(e1==null?e2==null:e1.equals(e2))){
13366 return false;
13367 }}
13368 return true;
13369 }return false;
13370 },"~O");
13371 Clazz_defineMethod(c$,"firstElement",
13372 function(){
13373 if(this.elementCount>0){
13374 return this.elementData[0];
13375 }throw new java.util.NoSuchElementException();
13376 });
13377 Clazz_overrideMethod(c$,"get",
13378 function(location){
13379 return this.elementAt(location);
13380 },"~N");
13381 Clazz_defineMethod(c$,"grow",
13382 ($fz=function(newCapacity){
13383 var newData=this.newElementArray(newCapacity);
13384 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13385 this.elementData=newData;
13386 },$fz.isPrivate=true,$fz),"~N");
13387 Clazz_defineMethod(c$,"growByOne",
13388 ($fz=function(){
13389 var adding=0;
13390 if(this.capacityIncrement<=0){
13391 if((adding=this.elementData.length)==0){
13392 adding=1;
13393 }}else{
13394 adding=this.capacityIncrement;
13395 }var newData=this.newElementArray(this.elementData.length+adding);
13396 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13397 this.elementData=newData;
13398 },$fz.isPrivate=true,$fz));
13399 Clazz_defineMethod(c$,"growBy",
13400 ($fz=function(required){
13401 var adding=0;
13402 if(this.capacityIncrement<=0){
13403 if((adding=this.elementData.length)==0){
13404 adding=required;
13405 }while(adding<required){
13406 adding+=adding;
13407 }
13408 }else{
13409 adding=(Math.floor(required/this.capacityIncrement))*this.capacityIncrement;
13410 if(adding<required){
13411 adding+=this.capacityIncrement;
13412 }}var newData=this.newElementArray(this.elementData.length+adding);
13413 System.arraycopy(this.elementData,0,newData,0,this.elementCount);
13414 this.elementData=newData;
13415 },$fz.isPrivate=true,$fz),"~N");
13416 Clazz_overrideMethod(c$,"hashCode",
13417 function(){
13418 var result=1;
13419 for(var i=0;i<this.elementCount;i++){
13420 result=(31*result)+(this.elementData[i]==null?0:this.elementData[i].hashCode());
13421 }
13422 return result;
13423 });
13424 Clazz_defineMethod(c$,"indexOf",
13425 function(object){
13426 return this.indexOf(object,0);
13427 },"~O");
13428 Clazz_defineMethod(c$,"indexOf",
13429 function(object,location){
13430 if(object!=null){
13431 for(var i=location;i<this.elementCount;i++){
13432 if(object.equals(this.elementData[i])){
13433 return i;
13434 }}
13435 }else{
13436 for(var i=location;i<this.elementCount;i++){
13437 if(this.elementData[i]==null){
13438 return i;
13439 }}
13440 }return-1;
13441 },"~O,~N");
13442 Clazz_defineMethod(c$,"insertElementAt",
13443 function(object,location){
13444 if(0<=location&&location<=this.elementCount){
13445 if(this.elementCount==this.elementData.length){
13446 this.growByOne();
13447 }var count=this.elementCount-location;
13448 if(count>0){
13449 System.arraycopy(this.elementData,location,this.elementData,location+1,count);
13450 }this.elementData[location]=object;
13451 this.elementCount++;
13452 this.modCount++;
13453 }else{
13454 throw new ArrayIndexOutOfBoundsException(location);
13455 }},"~O,~N");
13456 Clazz_overrideMethod(c$,"isEmpty",
13457 function(){
13458 return this.elementCount==0;
13459 });
13460 Clazz_defineMethod(c$,"lastElement",
13461 function(){
13462 try{
13463 return this.elementData[this.elementCount-1];
13464 }catch(e){
13465 if(Clazz_instanceOf(e,IndexOutOfBoundsException)){
13466 throw new java.util.NoSuchElementException();
13467 }else{
13468 throw e;
13469 }
13470 }
13471 });
13472 Clazz_defineMethod(c$,"lastIndexOf",
13473 function(object){
13474 return this.lastIndexOf(object,this.elementCount-1);
13475 },"~O");
13476 Clazz_defineMethod(c$,"lastIndexOf",
13477 function(object,location){
13478 if(location<this.elementCount){
13479 if(object!=null){
13480 for(var i=location;i>=0;i--){
13481 if(object.equals(this.elementData[i])){
13482 return i;
13483 }}
13484 }else{
13485 for(var i=location;i>=0;i--){
13486 if(this.elementData[i]==null){
13487 return i;
13488 }}
13489 }return-1;
13490 }throw new ArrayIndexOutOfBoundsException(location);
13491 },"~O,~N");
13492 Clazz_defineMethod(c$,"remove",
13493 function(location){
13494 if(location<this.elementCount){
13495 var result=this.elementData[location];
13496 this.elementCount--;
13497 var size=this.elementCount-location;
13498 if(size>0){
13499 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13500 }this.elementData[this.elementCount]=null;
13501 this.modCount++;
13502 return result;
13503 }throw new ArrayIndexOutOfBoundsException(location);
13504 },"~N");
13505 Clazz_defineMethod(c$,"remove",
13506 function(object){
13507 return this.removeElement(object);
13508 },"~O");
13509 Clazz_defineMethod(c$,"removeAllElements",
13510 function(){
13511 java.util.Arrays.fill(this.elementData,0,this.elementCount,null);
13512 this.modCount++;
13513 this.elementCount=0;
13514 });
13515 Clazz_defineMethod(c$,"removeElement",
13516 function(object){
13517 var index;
13518 if((index=this.indexOf(object,0))==-1){
13519 return false;
13520 }this.removeElementAt(index);
13521 return true;
13522 },"~O");
13523 Clazz_defineMethod(c$,"removeElementAt",
13524 function(location){
13525 if(0<=location&&location<this.elementCount){
13526 this.elementCount--;
13527 var size=this.elementCount-location;
13528 if(size>0){
13529 System.arraycopy(this.elementData,location+1,this.elementData,location,size);
13530 }this.elementData[this.elementCount]=null;
13531 this.modCount++;
13532 }else{
13533 throw new ArrayIndexOutOfBoundsException(location);
13534 }},"~N");
13535 Clazz_overrideMethod(c$,"removeRange",
13536 function(start,end){
13537 if(start>=0&&start<=end&&end<=this.size()){
13538 if(start==end){
13539 return;
13540 }if(end!=this.elementCount){
13541 System.arraycopy(this.elementData,end,this.elementData,start,this.elementCount-end);
13542 var newCount=this.elementCount-(end-start);
13543 java.util.Arrays.fill(this.elementData,newCount,this.elementCount,null);
13544 this.elementCount=newCount;
13545 }else{
13546 java.util.Arrays.fill(this.elementData,start,this.elementCount,null);
13547 this.elementCount=start;
13548 }this.modCount++;
13549 }else{
13550 throw new IndexOutOfBoundsException();
13551 }},"~N,~N");
13552 Clazz_overrideMethod(c$,"set",
13553 function(location,object){
13554 if(location<this.elementCount){
13555 var result=this.elementData[location];
13556 this.elementData[location]=object;
13557 return result;
13558 }throw new ArrayIndexOutOfBoundsException(location);
13559 },"~N,~O");
13560 Clazz_defineMethod(c$,"setElementAt",
13561 function(object,location){
13562 if(location<this.elementCount){
13563 this.elementData[location]=object;
13564 }else{
13565 throw new ArrayIndexOutOfBoundsException(location);
13566 }},"~O,~N");
13567 Clazz_defineMethod(c$,"setSize",
13568 function(length){
13569 if(length==this.elementCount){
13570 return;
13571 }this.ensureCapacity(length);
13572 if(this.elementCount>length){
13573 java.util.Arrays.fill(this.elementData,length,this.elementCount,null);
13574 }this.elementCount=length;
13575 this.modCount++;
13576 },"~N");
13577 Clazz_overrideMethod(c$,"size",
13578 function(){
13579 return this.elementCount;
13580 });
13581 Clazz_overrideMethod(c$,"subList",
13582 function(start,end){
13583 return new java.util.Collections.SynchronizedRandomAccessList(Clazz_superCall(this,java.util.Vector,"subList",[start,end]),this);
13584 },"~N,~N");
13585 Clazz_defineMethod(c$,"toArray",
13586 function(){
13587 var result=new Array(this.elementCount);
13588 System.arraycopy(this.elementData,0,result,0,this.elementCount);
13589 return result;
13590 });
13591 Clazz_defineMethod(c$,"toArray",
13592 function(contents){
13593 if(this.elementCount>contents.length){
13594 var ct=contents.getClass().getComponentType();
13595 contents=java.lang.reflect.Array.newInstance(ct,this.elementCount);
13596 }System.arraycopy(this.elementData,0,contents,0,this.elementCount);
13597 if(this.elementCount<contents.length){
13598 contents[this.elementCount]=null;
13599 }return contents;
13600 },"~A");
13601 Clazz_overrideMethod(c$,"toString",
13602 function(){
13603 if(this.elementCount==0){
13604 return"[]";
13605 }var length=this.elementCount-1;
13606 var buffer=new StringBuffer(this.size()*16);
13607 buffer.append('[');
13608 for(var i=0;i<length;i++){
13609 if(this.elementData[i]===this){
13610 buffer.append("(this Collection)");
13611 }else{
13612 buffer.append(this.elementData[i]);
13613 }buffer.append(", ");
13614 }
13615 if(this.elementData[length]===this){
13616 buffer.append("(this Collection)");
13617 }else{
13618 buffer.append(this.elementData[length]);
13619 }buffer.append(']');
13620 return buffer.toString();
13621 });
13622 Clazz_defineMethod(c$,"trimToSize",
13623 function(){
13624 if(this.elementData.length!=this.elementCount){
13625 this.grow(this.elementCount);
13626 }});
13627 c$.$Vector$1$=function(){
13628 Clazz_pu$h(self.c$);
13629 c$=Clazz_decorateAsClass(function(){
13630 Clazz_prepareCallback(this,arguments);
13631 this.pos=0;
13632 Clazz_instantialize(this,arguments);
13633 },java.util,"Vector$1",null,java.util.Enumeration);
13634 Clazz_overrideMethod(c$,"hasMoreElements",
13635 function(){
13636 return this.pos<this.b$["java.util.Vector"].elementCount;
13637 });
13638 Clazz_overrideMethod(c$,"nextElement",
13639 function(){
13640 {
13641 if(this.pos<this.b$["java.util.Vector"].elementCount){
13642 return this.b$["java.util.Vector"].elementData[this.pos++];
13643 }}throw new java.util.NoSuchElementException();
13644 });
13645 c$=Clazz_p0p();
13646 };
13647 Clazz_defineStatics(c$,
13648 "DEFAULT_SIZE",10);
13649 });
13650 Clazz_declarePackage ("java.awt");
13651 Clazz_load (["java.awt.Paint"], "java.awt.Color", ["java.lang.IllegalArgumentException", "java.awt.ColorPaintContext"], function () {
13652 c$ = Clazz_decorateAsClass (function () {
13653 this.value = 0;
13654 this.frgbvalue = null;
13655 this.falpha = 0.0;
13656 this.context = null;
13657 Clazz_instantialize (this, arguments);
13658 }, java.awt, "Color", null, java.awt.Paint);
13659 c$.testColorValueRange = Clazz_defineMethod (c$, "testColorValueRange", 
13660  function (r, g, b, a) {
13661 var rangeError = false;
13662 var badComponentString = "";
13663 if (a < 0 || a > 255) {
13664 rangeError = true;
13665 badComponentString = badComponentString + " Alpha";
13666 }if (r < 0 || r > 255) {
13667 rangeError = true;
13668 badComponentString = badComponentString + " Red";
13669 }if (g < 0 || g > 255) {
13670 rangeError = true;
13671 badComponentString = badComponentString + " Green";
13672 }if (b < 0 || b > 255) {
13673 rangeError = true;
13674 badComponentString = badComponentString + " Blue";
13675 }if (rangeError == true) {
13676 throw  new IllegalArgumentException ("Color parameter outside of expected range:" + badComponentString);
13677 }}, "~N,~N,~N,~N");
13678 Clazz_makeConstructor (c$, 
13679 function () {
13680 {
13681 var a = arguments;
13682 switch(a.length) {
13683 case 0:
13684 break;
13685 case 1:
13686 this.value = (a[0].value ? a[0].value : 0xff000000 | a[0]);
13687 break;
13688 case 2:
13689 this.value = (a[1] ? a[0] : 0xff000000 | a[0]);
13690 break;
13691 case 3:
13692 this.setColor4(a[0], a[1], a[2], 255);
13693 break;
13694 case 4:
13695 this.setColor4(a[0], a[1], a[2], a[3]);
13696 break;
13697 }
13698 return this;
13699 }});
13700 Clazz_defineMethod (c$, "setColor4", 
13701  function (r, g, b, a) {
13702 this.value = ((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0);
13703 java.awt.Color.testColorValueRange (r, g, b, a);
13704 }, "~N,~N,~N,~N");
13705 Clazz_defineMethod (c$, "setFloat", 
13706  function (r, g, b, f) {
13707 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));
13708 this.frgbvalue =  Clazz_newFloatArray (3, 0);
13709 this.frgbvalue[0] = r;
13710 this.frgbvalue[1] = g;
13711 this.frgbvalue[2] = b;
13712 this.falpha = f;
13713 }, "~N,~N,~N,~N");
13714 c$.getColorF4 = Clazz_defineMethod (c$, "getColorF4", 
13715 function (r, g, b, a) {
13716 var c =  new java.awt.Color ();
13717 c.setFloat (r, g, b, a);
13718 return c;
13719 }, "~N,~N,~N,~N");
13720 Clazz_defineMethod (c$, "getRed", 
13721 function () {
13722 return (this.getRGB () >> 16) & 0xFF;
13723 });
13724 Clazz_defineMethod (c$, "getGreen", 
13725 function () {
13726 return (this.getRGB () >> 8) & 0xFF;
13727 });
13728 Clazz_defineMethod (c$, "getBlue", 
13729 function () {
13730 return (this.getRGB () >> 0) & 0xFF;
13731 });
13732 Clazz_defineMethod (c$, "getAlpha", 
13733 function () {
13734 return (this.getRGB () >> 24) & 0xff;
13735 });
13736 Clazz_defineMethod (c$, "getRGB", 
13737 function () {
13738 return this.value;
13739 });
13740 Clazz_defineMethod (c$, "brighter", 
13741 function () {
13742 var r = this.getRed ();
13743 var g = this.getGreen ();
13744 var b = this.getBlue ();
13745 var i = Clazz_doubleToInt (3.333333333333333);
13746 if (r == 0 && g == 0 && b == 0) {
13747 return  new java.awt.Color (i, i, i);
13748 }if (r > 0 && r < i) r = i;
13749 if (g > 0 && g < i) g = i;
13750 if (b > 0 && b < i) b = i;
13751 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));
13752 });
13753 Clazz_defineMethod (c$, "darker", 
13754 function () {
13755 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));
13756 });
13757 Clazz_overrideMethod (c$, "hashCode", 
13758 function () {
13759 return this.value;
13760 });
13761 Clazz_overrideMethod (c$, "equals", 
13762 function (obj) {
13763 return Clazz_instanceOf (obj, java.awt.Color) && (obj).getRGB () == this.getRGB ();
13764 }, "~O");
13765 Clazz_overrideMethod (c$, "toString", 
13766 function () {
13767 return this.getClass ().getName () + "[r=" + this.getRed () + ",g=" + this.getGreen () + ",b=" + this.getBlue () + "]";
13768 });
13769 c$.decode = Clazz_defineMethod (c$, "decode", 
13770 function (nm) {
13771 var intval = Integer.decode (nm);
13772 var i = intval.intValue ();
13773 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13774 }, "~S");
13775 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13776 function (nm) {
13777 return java.awt.Color.getColor (nm, null);
13778 }, "~S");
13779 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13780 function (nm, v) {
13781 var intval = Integer.getInteger (nm);
13782 if (intval == null) {
13783 return v;
13784 }var i = intval.intValue ();
13785 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF);
13786 }, "~S,java.awt.Color");
13787 c$.getColor = Clazz_defineMethod (c$, "getColor", 
13788 function (nm, v) {
13789 var intval = Integer.getInteger (nm);
13790 var i = (intval != null) ? intval.intValue () : v;
13791 return  new java.awt.Color ((i >> 16) & 0xFF, (i >> 8) & 0xFF, (i >> 0) & 0xFF);
13792 }, "~S,~N");
13793 c$.HSBtoRGB = Clazz_defineMethod (c$, "HSBtoRGB", 
13794 function (hue, saturation, brightness) {
13795 var r = 0;
13796 var g = 0;
13797 var b = 0;
13798 if (saturation == 0) {
13799 r = g = b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13800 } else {
13801 var h = (hue - Math.floor (hue)) * 6.0;
13802 var f = h - java.lang.Math.floor (h);
13803 var p = brightness * (1.0 - saturation);
13804 var q = brightness * (1.0 - saturation * f);
13805 var t = brightness * (1.0 - (saturation * (1.0 - f)));
13806 switch (Clazz_floatToInt (h)) {
13807 case 0:
13808 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13809 g = Clazz_floatToInt (t * 255.0 + 0.5);
13810 b = Clazz_floatToInt (p * 255.0 + 0.5);
13811 break;
13812 case 1:
13813 r = Clazz_floatToInt (q * 255.0 + 0.5);
13814 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13815 b = Clazz_floatToInt (p * 255.0 + 0.5);
13816 break;
13817 case 2:
13818 r = Clazz_floatToInt (p * 255.0 + 0.5);
13819 g = Clazz_floatToInt (brightness * 255.0 + 0.5);
13820 b = Clazz_floatToInt (t * 255.0 + 0.5);
13821 break;
13822 case 3:
13823 r = Clazz_floatToInt (p * 255.0 + 0.5);
13824 g = Clazz_floatToInt (q * 255.0 + 0.5);
13825 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13826 break;
13827 case 4:
13828 r = Clazz_floatToInt (t * 255.0 + 0.5);
13829 g = Clazz_floatToInt (p * 255.0 + 0.5);
13830 b = Clazz_floatToInt (brightness * 255.0 + 0.5);
13831 break;
13832 case 5:
13833 r = Clazz_floatToInt (brightness * 255.0 + 0.5);
13834 g = Clazz_floatToInt (p * 255.0 + 0.5);
13835 b = Clazz_floatToInt (q * 255.0 + 0.5);
13836 break;
13837 }
13838 }return 0xff000000 | (r << 16) | (g << 8) | (b << 0);
13839 }, "~N,~N,~N");
13840 c$.RGBtoHSB = Clazz_defineMethod (c$, "RGBtoHSB", 
13841 function (r, g, b, hsbvals) {
13842 var hue;
13843 var saturation;
13844 var brightness;
13845 if (hsbvals == null) {
13846 hsbvals =  Clazz_newFloatArray (3, 0);
13847 }var cmax = (r > g) ? r : g;
13848 if (b > cmax) cmax = b;
13849 var cmin = (r < g) ? r : g;
13850 if (b < cmin) cmin = b;
13851 brightness = (cmax) / 255.0;
13852 if (cmax != 0) saturation = ((cmax - cmin)) / (cmax);
13853  else saturation = 0;
13854 if (saturation == 0) hue = 0;
13855  else {
13856 var redc = ((cmax - r)) / ((cmax - cmin));
13857 var greenc = ((cmax - g)) / ((cmax - cmin));
13858 var bluec = ((cmax - b)) / ((cmax - cmin));
13859 if (r == cmax) hue = bluec - greenc;
13860  else if (g == cmax) hue = 2.0 + redc - bluec;
13861  else hue = 4.0 + greenc - redc;
13862 hue = hue / 6.0;
13863 if (hue < 0) hue = hue + 1.0;
13864 }hsbvals[0] = hue;
13865 hsbvals[1] = saturation;
13866 hsbvals[2] = brightness;
13867 return hsbvals;
13868 }, "~N,~N,~N,~A");
13869 c$.getHSBColor = Clazz_defineMethod (c$, "getHSBColor", 
13870 function (h, s, b) {
13871 return  new java.awt.Color (java.awt.Color.HSBtoRGB (h, s, b));
13872 }, "~N,~N,~N");
13873 Clazz_defineMethod (c$, "getRGBComponents", 
13874 function (compArray) {
13875 var f;
13876 if (compArray == null) {
13877 f =  Clazz_newFloatArray (4, 0);
13878 } else {
13879 f = compArray;
13880 }if (this.frgbvalue == null) {
13881 f[0] = (this.getRed ()) / 255;
13882 f[1] = (this.getGreen ()) / 255;
13883 f[2] = (this.getBlue ()) / 255;
13884 f[3] = (this.getAlpha ()) / 255;
13885 } else {
13886 f[0] = this.frgbvalue[0];
13887 f[1] = this.frgbvalue[1];
13888 f[2] = this.frgbvalue[2];
13889 f[3] = this.falpha;
13890 }return f;
13891 }, "~A");
13892 Clazz_defineMethod (c$, "getRGBColorComponents", 
13893 function (compArray) {
13894 var f;
13895 if (compArray == null) {
13896 f =  Clazz_newFloatArray (3, 0);
13897 } else {
13898 f = compArray;
13899 }if (this.frgbvalue == null) {
13900 f[0] = (this.getRed ()) / 255;
13901 f[1] = (this.getGreen ()) / 255;
13902 f[2] = (this.getBlue ()) / 255;
13903 } else {
13904 f[0] = this.frgbvalue[0];
13905 f[1] = this.frgbvalue[1];
13906 f[2] = this.frgbvalue[2];
13907 }return f;
13908 }, "~A");
13909 Clazz_overrideMethod (c$, "createContext", 
13910 function (cm, r, r2d, xform, hints) {
13911 if (this.context == null || this.context.getRGB () != this.getRGB ()) {
13912 this.context =  new java.awt.ColorPaintContext (this.getRGB (), cm);
13913 }return this.context;
13914 }, "java.awt.image.ColorModel,java.awt.Rectangle,java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform,java.awt.RenderingHints");
13915 Clazz_overrideMethod (c$, "getTransparency", 
13916 function () {
13917 var alpha = this.getAlpha ();
13918 if (alpha == 0xff) {
13919 return 1;
13920 } else if (alpha == 0) {
13921 return 2;
13922 } else {
13923 return 3;
13924 }});
13925 c$.white = c$.prototype.white =  new java.awt.Color (255, 255, 255);
13926 c$.WHITE = c$.prototype.WHITE = java.awt.Color.white;
13927 c$.lightGray = c$.prototype.lightGray =  new java.awt.Color (192, 192, 192);
13928 c$.LIGHT_GRAY = c$.prototype.LIGHT_GRAY = java.awt.Color.lightGray;
13929 c$.gray = c$.prototype.gray =  new java.awt.Color (128, 128, 128);
13930 c$.GRAY = c$.prototype.GRAY = java.awt.Color.gray;
13931 c$.darkGray = c$.prototype.darkGray =  new java.awt.Color (64, 64, 64);
13932 c$.DARK_GRAY = c$.prototype.DARK_GRAY = java.awt.Color.darkGray;
13933 c$.black = c$.prototype.black =  new java.awt.Color (0, 0, 0);
13934 c$.BLACK = c$.prototype.BLACK = java.awt.Color.black;
13935 c$.red = c$.prototype.red =  new java.awt.Color (255, 0, 0);
13936 c$.RED = c$.prototype.RED = java.awt.Color.red;
13937 c$.pink = c$.prototype.pink =  new java.awt.Color (255, 175, 175);
13938 c$.PINK = c$.prototype.PINK = java.awt.Color.pink;
13939 c$.orange = c$.prototype.orange =  new java.awt.Color (255, 200, 0);
13940 c$.ORANGE = c$.prototype.ORANGE = java.awt.Color.orange;
13941 c$.yellow = c$.prototype.yellow =  new java.awt.Color (255, 255, 0);
13942 c$.YELLOW = c$.prototype.YELLOW = java.awt.Color.yellow;
13943 c$.green = c$.prototype.green =  new java.awt.Color (0, 255, 0);
13944 c$.GREEN = c$.prototype.GREEN = java.awt.Color.green;
13945 c$.magenta = c$.prototype.magenta =  new java.awt.Color (255, 0, 255);
13946 c$.MAGENTA = c$.prototype.MAGENTA = java.awt.Color.magenta;
13947 c$.cyan = c$.prototype.cyan =  new java.awt.Color (0, 255, 255);
13948 c$.CYAN = c$.prototype.CYAN = java.awt.Color.cyan;
13949 c$.blue = c$.prototype.blue =  new java.awt.Color (0, 0, 255);
13950 c$.BLUE = c$.prototype.BLUE = java.awt.Color.blue;
13951 Clazz_defineStatics (c$,
13952 "FACTOR", 0.7);
13953 });
13954 Clazz_declarePackage ("java.awt");
13955 Clazz_load (["java.awt.Transparency"], "java.awt.Paint", null, function () {
13956 Clazz_declareInterface (java.awt, "Paint", java.awt.Transparency);
13957 });
13958 Clazz_declarePackage ("java.awt");
13959 c$ = Clazz_declareInterface (java.awt, "Transparency");
13960 Clazz_defineStatics (c$,
13961 "OPAQUE", 1,
13962 "BITMASK", 2,
13963 "TRANSLUCENT", 3);
13964 Clazz_declarePackage ("java.awt");
13965 Clazz_load (["java.awt.PaintContext"], "java.awt.ColorPaintContext", ["java.awt.image.ColorModel"], function () {
13966 c$ = Clazz_decorateAsClass (function () {
13967 this.color = 0;
13968 Clazz_instantialize (this, arguments);
13969 }, java.awt, "ColorPaintContext", null, java.awt.PaintContext);
13970 Clazz_makeConstructor (c$, 
13971 function (color, cm) {
13972 this.color = color;
13973 }, "~N,java.awt.image.ColorModel");
13974 Clazz_overrideMethod (c$, "dispose", 
13975 function () {
13976 });
13977 Clazz_defineMethod (c$, "getRGB", 
13978 function () {
13979 return this.color;
13980 });
13981 Clazz_overrideMethod (c$, "getColorModel", 
13982 function () {
13983 return java.awt.image.ColorModel.getRGBdefault ();
13984 });
13985 });
13986 Clazz_declarePackage ("java.awt");
13987 Clazz_declareInterface (java.awt, "PaintContext");
13988 Clazz_declarePackage ("java.awt.image");
13989 Clazz_load (["java.awt.Transparency", "java.awt.color.ColorSpace"], "java.awt.image.ColorModel", ["java.lang.IllegalArgumentException", "$.NullPointerException", "$.UnsupportedOperationException", "JU.AU"], function () {
13990 c$ = Clazz_decorateAsClass (function () {
13991 this.pixel_bits = 0;
13992 this.nBits = null;
13993 this.transparency = 3;
13994 this.supportsAlpha = true;
13995 this.$isAlphaPremultiplied = false;
13996 this.numComponents = -1;
13997 this.numColorComponents = -1;
13998 this.colorSpace = null;
13999 this.colorSpaceType = 5;
14000 this.maxBits = 0;
14001 this.is_sRGB = true;
14002 this.transferType = 0;
14003 Clazz_instantialize (this, arguments);
14004 }, java.awt.image, "ColorModel", null, java.awt.Transparency);
14005 Clazz_prepareFields (c$, function () {
14006 this.colorSpace = java.awt.color.ColorSpace.getInstance (1000);
14007 });
14008 c$.getRGBdefault = Clazz_defineMethod (c$, "getRGBdefault", 
14009 function () {
14010 if (java.awt.image.ColorModel.RGBdefault == null) {
14011 java.awt.image.ColorModel.RGBdefault =  new java.awt.image.DirectColorModel (32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000);
14012 }return java.awt.image.ColorModel.RGBdefault;
14013 });
14014 Clazz_makeConstructor (c$, 
14015 function (bits) {
14016 this.pixel_bits = bits;
14017 if (bits < 1) {
14018 throw  new IllegalArgumentException ("Number of bits must be > 0");
14019 }this.numComponents = 4;
14020 this.numColorComponents = 3;
14021 this.maxBits = bits;
14022 this.transferType = java.awt.image.ColorModel.getDefaultTransferType (bits);
14023 }, "~N");
14024 Clazz_makeConstructor (c$, 
14025 function (pixel_bits, bits, cspace, hasAlpha, isAlphaPremultiplied, transparency, transferType) {
14026 this.colorSpace = cspace;
14027 this.colorSpaceType = cspace.getType ();
14028 this.numColorComponents = cspace.getNumComponents ();
14029 this.numComponents = this.numColorComponents + (hasAlpha ? 1 : 0);
14030 this.supportsAlpha = hasAlpha;
14031 if (bits.length < this.numComponents) {
14032 throw  new IllegalArgumentException ("Number of color/alpha components should be " + this.numComponents + " but length of bits array is " + bits.length);
14033 }if (transparency < 1 || transparency > 3) {
14034 throw  new IllegalArgumentException ("Unknown transparency: " + transparency);
14035 }if (this.supportsAlpha == false) {
14036 this.$isAlphaPremultiplied = false;
14037 this.transparency = 1;
14038 } else {
14039 this.$isAlphaPremultiplied = isAlphaPremultiplied;
14040 this.transparency = transparency;
14041 }this.nBits = bits.clone ();
14042 this.pixel_bits = pixel_bits;
14043 if (pixel_bits <= 0) {
14044 throw  new IllegalArgumentException ("Number of pixel bits must be > 0");
14045 }this.maxBits = 0;
14046 for (var i = 0; i < bits.length; i++) {
14047 if (bits[i] < 0) {
14048 throw  new IllegalArgumentException ("Number of bits must be >= 0");
14049 }if (this.maxBits < bits[i]) {
14050 this.maxBits = bits[i];
14051 }}
14052 if (this.maxBits == 0) {
14053 throw  new IllegalArgumentException ("There must be at least one component with > 0 pixel bits.");
14054 }if (cspace !== java.awt.color.ColorSpace.getInstance (1000)) {
14055 this.is_sRGB = false;
14056 }this.transferType = transferType;
14057 }, "~N,~A,java.awt.color.ColorSpace,~B,~B,~N,~N");
14058 Clazz_defineMethod (c$, "hasAlpha", 
14059 function () {
14060 return this.supportsAlpha;
14061 });
14062 Clazz_defineMethod (c$, "isAlphaPremultiplied", 
14063 function () {
14064 return this.$isAlphaPremultiplied;
14065 });
14066 Clazz_defineMethod (c$, "getTransferType", 
14067 function () {
14068 return this.transferType;
14069 });
14070 Clazz_defineMethod (c$, "getPixelSize", 
14071 function () {
14072 return this.pixel_bits;
14073 });
14074 Clazz_defineMethod (c$, "getComponentSize", 
14075 function (componentIdx) {
14076 if (this.nBits == null) {
14077 throw  new NullPointerException ("Number of bits array is null.");
14078 }return this.nBits[componentIdx];
14079 }, "~N");
14080 Clazz_defineMethod (c$, "getComponentSize", 
14081 function () {
14082 if (this.nBits != null) {
14083 return this.nBits.clone ();
14084 }return null;
14085 });
14086 Clazz_overrideMethod (c$, "getTransparency", 
14087 function () {
14088 return this.transparency;
14089 });
14090 Clazz_defineMethod (c$, "getNumComponents", 
14091 function () {
14092 return this.numComponents;
14093 });
14094 Clazz_defineMethod (c$, "getNumColorComponents", 
14095 function () {
14096 return this.numColorComponents;
14097 });
14098 Clazz_defineMethod (c$, "getRGB", 
14099 function (pixel) {
14100 return (this.getAlpha (pixel) << 24) | (this.getRed (pixel) << 16) | (this.getGreen (pixel) << 8) | (this.getBlue (pixel) << 0);
14101 }, "~N");
14102 Clazz_defineMethod (c$, "getRed", 
14103 function (inData) {
14104 var pixel = 0;
14105 var length = 0;
14106 var idata = inData;
14107 pixel = idata[0];
14108 length = idata.length;
14109 if (length == 1) {
14110 return this.getRed (pixel);
14111 } else {
14112 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14113 }}, "~O");
14114 Clazz_defineMethod (c$, "getGreen", 
14115 function (inData) {
14116 var pixel = 0;
14117 var length = 0;
14118 var idata = inData;
14119 pixel = idata[0];
14120 length = idata.length;
14121 if (length == 1) {
14122 return this.getGreen (pixel);
14123 } else {
14124 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14125 }}, "~O");
14126 Clazz_defineMethod (c$, "getBlue", 
14127 function (inData) {
14128 var pixel = 0;
14129 var length = 0;
14130 var idata = inData;
14131 pixel = idata[0];
14132 length = idata.length;
14133 if (length == 1) {
14134 return this.getBlue (pixel);
14135 } else {
14136 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14137 }}, "~O");
14138 Clazz_defineMethod (c$, "getAlpha", 
14139 function (inData) {
14140 var pixel = 0;
14141 var length = 0;
14142 var idata = inData;
14143 pixel = idata[0];
14144 length = idata.length;
14145 if (length == 1) {
14146 return this.getAlpha (pixel);
14147 } else {
14148 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14149 }}, "~O");
14150 Clazz_defineMethod (c$, "getRGB", 
14151 function (inData) {
14152 return (this.getAlpha (inData) << 24) | (this.getRed (inData) << 16) | (this.getGreen (inData) << 8) | (this.getBlue (inData) << 0);
14153 }, "~O");
14154 Clazz_defineMethod (c$, "getDataElements", 
14155 function (rgb, pixel) {
14156 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14157 }, "~N,~O");
14158 Clazz_defineMethod (c$, "getComponents", 
14159 function (pixel, components, offset) {
14160 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14161 }, "~N,~A,~N");
14162 Clazz_defineMethod (c$, "getComponents", 
14163 function (pixel, components, offset) {
14164 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14165 }, "~O,~A,~N");
14166 Clazz_defineMethod (c$, "getUnnormalizedComponents", 
14167 function (normComponents, normOffset, components, offset) {
14168 if (this.colorSpace == null) {
14169 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14170 }if (this.nBits == null) {
14171 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14172 }if ((normComponents.length - normOffset) < this.numComponents) {
14173 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14174 }if (components == null) {
14175 components =  Clazz_newIntArray (offset + this.numComponents, 0);
14176 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14177 var normAlpha = normComponents[normOffset + this.numColorComponents];
14178 for (var i = 0; i < this.numColorComponents; i++) {
14179 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) * normAlpha + 0.5);
14180 }
14181 components[offset + this.numColorComponents] = Clazz_floatToInt (normAlpha * ((1 << this.nBits[this.numColorComponents]) - 1) + 0.5);
14182 } else {
14183 for (var i = 0; i < this.numComponents; i++) {
14184 components[offset + i] = Clazz_floatToInt (normComponents[normOffset + i] * ((1 << this.nBits[i]) - 1) + 0.5);
14185 }
14186 }return components;
14187 }, "~A,~N,~A,~N");
14188 Clazz_defineMethod (c$, "getNormalizedComponents", 
14189 function (components, offset, normComponents, normOffset) {
14190 if (this.colorSpace == null) {
14191 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14192 }if (this.nBits == null) {
14193 throw  new UnsupportedOperationException ("This method is not supported.  Unable to determine #bits per component.");
14194 }if ((components.length - offset) < this.numComponents) {
14195 throw  new IllegalArgumentException ("Incorrect number of components.  Expecting " + this.numComponents);
14196 }if (normComponents == null) {
14197 normComponents =  Clazz_newFloatArray (this.numComponents + normOffset, 0);
14198 }if (this.supportsAlpha && this.$isAlphaPremultiplied) {
14199 var normAlpha = components[offset + this.numColorComponents];
14200 normAlpha /= ((1 << this.nBits[this.numColorComponents]) - 1);
14201 if (normAlpha != 0.0) {
14202 for (var i = 0; i < this.numColorComponents; i++) {
14203 normComponents[normOffset + i] = (components[offset + i]) / (normAlpha * (((1 << this.nBits[i]) - 1)));
14204 }
14205 } else {
14206 for (var i = 0; i < this.numColorComponents; i++) {
14207 normComponents[normOffset + i] = 0.0;
14208 }
14209 }normComponents[normOffset + this.numColorComponents] = normAlpha;
14210 } else {
14211 for (var i = 0; i < this.numComponents; i++) {
14212 normComponents[normOffset + i] = (components[offset + i]) / (((1 << this.nBits[i]) - 1));
14213 }
14214 }return normComponents;
14215 }, "~A,~N,~A,~N");
14216 Clazz_defineMethod (c$, "getDataElement", 
14217 function (components, offset) {
14218 return this.getDataElementInt (components, offset);
14219 }, "~A,~N");
14220 Clazz_defineMethod (c$, "getDataElementInt", 
14221 function (components, offset) {
14222 throw  new UnsupportedOperationException ("This method is not supported by this color model.");
14223 }, "~A,~N");
14224 Clazz_defineMethod (c$, "getDataElement", 
14225 function (normComponents, normOffset) {
14226 if (JU.AU.isAI (normComponents)) {
14227 var ints = normComponents;
14228 return this.getDataElementInt (ints, normOffset);
14229 }var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14230 return this.getDataElement (components, 0);
14231 }, "~A,~N");
14232 Clazz_defineMethod (c$, "getDataElements", 
14233 function (normComponents, normOffset, obj) {
14234 var components = this.getUnnormalizedComponents (normComponents, normOffset, null, 0);
14235 return this.getDataElements (components, 0, obj);
14236 }, "~A,~N,~O");
14237 Clazz_defineMethod (c$, "getNormalizedComponents", 
14238 function (pixel, normComponents, normOffset) {
14239 var components = this.getComponents (pixel, null, 0);
14240 return this.getNormalizedComponents (components, 0, normComponents, normOffset);
14241 }, "~O,~A,~N");
14242 Clazz_overrideMethod (c$, "equals", 
14243 function (obj) {
14244 if (!(Clazz_instanceOf (obj, java.awt.image.ColorModel))) {
14245 return false;
14246 }var cm = obj;
14247 if (this === cm) {
14248 return true;
14249 }if (this.supportsAlpha != cm.hasAlpha () || this.$isAlphaPremultiplied != cm.isAlphaPremultiplied () || this.pixel_bits != cm.getPixelSize () || this.transparency != cm.getTransparency () || this.numComponents != cm.getNumComponents ()) {
14250 return false;
14251 }var nb = cm.getComponentSize ();
14252 if ((this.nBits != null) && (nb != null)) {
14253 for (var i = 0; i < this.numComponents; i++) {
14254 if (this.nBits[i] != nb[i]) {
14255 return false;
14256 }}
14257 } else {
14258 return ((this.nBits == null) && (nb == null));
14259 }return true;
14260 }, "~O");
14261 Clazz_overrideMethod (c$, "hashCode", 
14262 function () {
14263 var result = 0;
14264 result = (this.supportsAlpha ? 2 : 3) + (this.$isAlphaPremultiplied ? 4 : 5) + this.pixel_bits * 6 + this.transparency * 7 + this.numComponents * 8;
14265 if (this.nBits != null) {
14266 for (var i = 0; i < this.numComponents; i++) {
14267 result = result + this.nBits[i] * (i + 9);
14268 }
14269 }return result;
14270 });
14271 Clazz_defineMethod (c$, "getColorSpace", 
14272 function () {
14273 return this.colorSpace;
14274 });
14275 Clazz_defineMethod (c$, "isCompatibleRaster", 
14276 function (raster) {
14277 throw  new UnsupportedOperationException ("This method has not been implemented for this ColorModel.");
14278 }, "java.awt.image.Raster");
14279 Clazz_defineMethod (c$, "createCompatibleWritableRaster", 
14280 function (w, h) {
14281 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14282 }, "~N,~N");
14283 Clazz_defineMethod (c$, "createCompatibleSampleModel", 
14284 function (w, h) {
14285 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14286 }, "~N,~N");
14287 Clazz_defineMethod (c$, "isCompatibleSampleModel", 
14288 function (sm) {
14289 throw  new UnsupportedOperationException ("This method is not supported by this color model");
14290 }, "java.awt.image.SampleModel");
14291 Clazz_overrideMethod (c$, "finalize", 
14292 function () {
14293 });
14294 Clazz_defineMethod (c$, "getAlphaRaster", 
14295 function (raster) {
14296 return null;
14297 }, "java.awt.image.WritableRaster");
14298 Clazz_overrideMethod (c$, "toString", 
14299 function () {
14300 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);
14301 });
14302 c$.getDefaultTransferType = Clazz_defineMethod (c$, "getDefaultTransferType", 
14303 function (pixel_bits) {
14304 if (pixel_bits <= 8) {
14305 return 0;
14306 }return 3;
14307 }, "~N");
14308 c$.isLinearRGBspace = Clazz_defineMethod (c$, "isLinearRGBspace", 
14309 function (cs) {
14310 return false;
14311 }, "java.awt.color.ColorSpace");
14312 c$.isLinearGRAYspace = Clazz_defineMethod (c$, "isLinearGRAYspace", 
14313 function (cs) {
14314 return false;
14315 }, "java.awt.color.ColorSpace");
14316 Clazz_defineStatics (c$,
14317 "RGBdefault", null,
14318 "l8Tos8", null,
14319 "s8Tol8", null,
14320 "l16Tos8", null,
14321 "s8Tol16", null,
14322 "g8Tos8Map", null,
14323 "lg16Toog8Map", null,
14324 "g16Tos8Map", null,
14325 "lg16Toog16Map", null);
14326 });
14327 Clazz_declarePackage ("java.awt.color");
14328 Clazz_load (null, "java.awt.color.ColorSpace", ["java.lang.IllegalArgumentException"], function () {
14329 c$ = Clazz_decorateAsClass (function () {
14330 this.type = 0;
14331 this.numComponents = 0;
14332 this.compName = null;
14333 Clazz_instantialize (this, arguments);
14334 }, java.awt.color, "ColorSpace");
14335 Clazz_makeConstructor (c$, 
14336 function (type, numcomponents) {
14337 this.type = type;
14338 this.numComponents = numcomponents;
14339 }, "~N,~N");
14340 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
14341 function (colorspace) {
14342 var theColorSpace;
14343 switch (colorspace) {
14344 default:
14345 case 1000:
14346 if (java.awt.color.ColorSpace.sRGBspace == null) {
14347 java.awt.color.ColorSpace.sRGBspace =  new java.awt.color.ColorSpace (5, 3);
14348 }theColorSpace = java.awt.color.ColorSpace.sRGBspace;
14349 break;
14350 }
14351 return theColorSpace;
14352 }, "~N");
14353 Clazz_defineMethod (c$, "isCS_sRGB", 
14354 function () {
14355 return (this === java.awt.color.ColorSpace.sRGBspace);
14356 });
14357 Clazz_defineMethod (c$, "toRGB", 
14358 function (colorvalue) {
14359 return colorvalue;
14360 }, "~A");
14361 Clazz_defineMethod (c$, "fromRGB", 
14362 function (rgbvalue) {
14363 return rgbvalue;
14364 }, "~A");
14365 Clazz_defineMethod (c$, "getType", 
14366 function () {
14367 return this.type;
14368 });
14369 Clazz_defineMethod (c$, "getNumComponents", 
14370 function () {
14371 return this.numComponents;
14372 });
14373 Clazz_defineMethod (c$, "getName", 
14374 function (idx) {
14375 if ((idx < 0) || (idx > this.numComponents - 1)) {
14376 throw  new IllegalArgumentException ("Component index out of range: " + idx);
14377 }if (this.compName == null) {
14378 switch (this.type) {
14379 case 0:
14380 this.compName =  Clazz_newArray (-1, ["X", "Y", "Z"]);
14381 break;
14382 case 1:
14383 this.compName =  Clazz_newArray (-1, ["L", "a", "b"]);
14384 break;
14385 case 2:
14386 this.compName =  Clazz_newArray (-1, ["L", "u", "v"]);
14387 break;
14388 case 3:
14389 this.compName =  Clazz_newArray (-1, ["Y", "Cb", "Cr"]);
14390 break;
14391 case 4:
14392 this.compName =  Clazz_newArray (-1, ["Y", "x", "y"]);
14393 break;
14394 case 5:
14395 this.compName =  Clazz_newArray (-1, ["Red", "Green", "Blue"]);
14396 break;
14397 case 6:
14398 this.compName =  Clazz_newArray (-1, ["Gray"]);
14399 break;
14400 case 7:
14401 this.compName =  Clazz_newArray (-1, ["Hue", "Saturation", "Value"]);
14402 break;
14403 case 8:
14404 this.compName =  Clazz_newArray (-1, ["Hue", "Lightness", "Saturation"]);
14405 break;
14406 case 9:
14407 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow", "Black"]);
14408 break;
14409 case 11:
14410 this.compName =  Clazz_newArray (-1, ["Cyan", "Magenta", "Yellow"]);
14411 break;
14412 default:
14413 var tmp =  new Array (this.numComponents);
14414 for (var i = 0; i < tmp.length; i++) {
14415 tmp[i] = "Unnamed color component(" + i + ")";
14416 }
14417 this.compName = tmp;
14418 }
14419 }return this.compName[idx];
14420 }, "~N");
14421 Clazz_defineMethod (c$, "getMinValue", 
14422 function (component) {
14423 if ((component < 0) || (component > this.numComponents - 1)) {
14424 throw  new IllegalArgumentException ("Component index out of range: " + component);
14425 }return 0.0;
14426 }, "~N");
14427 Clazz_defineMethod (c$, "getMaxValue", 
14428 function (component) {
14429 if ((component < 0) || (component > this.numComponents - 1)) {
14430 throw  new IllegalArgumentException ("Component index out of range: " + component);
14431 }return 1.0;
14432 }, "~N");
14433 Clazz_defineStatics (c$,
14434 "sRGBspace", null,
14435 "TYPE_XYZ", 0,
14436 "TYPE_Lab", 1,
14437 "TYPE_Luv", 2,
14438 "TYPE_YCbCr", 3,
14439 "TYPE_Yxy", 4,
14440 "TYPE_RGB", 5,
14441 "TYPE_GRAY", 6,
14442 "TYPE_HSV", 7,
14443 "TYPE_HLS", 8,
14444 "TYPE_CMYK", 9,
14445 "TYPE_CMY", 11,
14446 "TYPE_2CLR", 12,
14447 "TYPE_3CLR", 13,
14448 "TYPE_4CLR", 14,
14449 "TYPE_5CLR", 15,
14450 "TYPE_6CLR", 16,
14451 "TYPE_7CLR", 17,
14452 "TYPE_8CLR", 18,
14453 "TYPE_9CLR", 19,
14454 "TYPE_ACLR", 20,
14455 "TYPE_BCLR", 21,
14456 "TYPE_CCLR", 22,
14457 "TYPE_DCLR", 23,
14458 "TYPE_ECLR", 24,
14459 "TYPE_FCLR", 25,
14460 "CS_sRGB", 1000,
14461 "CS_LINEAR_RGB", 1004,
14462 "CS_CIEXYZ", 1001,
14463 "CS_PYCC", 1002,
14464 "CS_GRAY", 1003);
14465 });
14466 Clazz_declarePackage ("java.util");
14467 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 () {
14468 c$ = Clazz_decorateAsClass (function () {
14469 this.parent = null;
14470 this.locale = null;
14471 this.expired = false;
14472 this.$keySet = null;
14473 Clazz_instantialize (this, arguments);
14474 }, java.util, "ResourceBundle");
14475 Clazz_makeConstructor (c$, 
14476 function () {
14477 });
14478 Clazz_defineMethod (c$, "getString", 
14479 function (key) {
14480 return this.getObject (key);
14481 }, "~S");
14482 Clazz_defineMethod (c$, "getStringArray", 
14483 function (key) {
14484 return this.getObject (key);
14485 }, "~S");
14486 Clazz_defineMethod (c$, "getObject", 
14487 function (key) {
14488 var obj = this.handleGetObject (key);
14489 if (obj == null) {
14490 if (this.parent != null) {
14491 obj = this.parent.getObject (key);
14492 }if (obj == null) throw  new java.util.MissingResourceException ("Can't find resource for bundle " + this.getClass ().getName () + ", key " + key, this.getClass ().getName (), key);
14493 }return obj;
14494 }, "~S");
14495 Clazz_defineMethod (c$, "getLocale", 
14496 function () {
14497 return this.locale;
14498 });
14499 Clazz_defineMethod (c$, "setParent", 
14500 function (parent) {
14501 this.parent = parent;
14502 }, "java.util.ResourceBundle");
14503 c$.getBundle = Clazz_defineMethod (c$, "getBundle", 
14504 function (baseName, targetLocale, loader, control) {
14505 var n = 4;
14506 {
14507 n = arguments.length;
14508 }switch (n) {
14509 case 2:
14510 if ((Clazz_instanceOf (targetLocale, java.util.ResourceBundle.Control))) {
14511 control = targetLocale;
14512 targetLocale = null;
14513 }break;
14514 case 3:
14515 if ((Clazz_instanceOf (loader, java.util.ResourceBundle.Control))) {
14516 control = loader;
14517 loader = null;
14518 }break;
14519 }
14520 if (targetLocale == null) targetLocale = java.util.Locale.getDefault ();
14521 if (control == null) control = java.util.ResourceBundle.Control.getControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14522 return java.util.ResourceBundle.getBundleImpl (baseName, targetLocale, loader, control);
14523 }, "~S,~O,~O,java.util.ResourceBundle.Control");
14524 c$.getBundleImpl = Clazz_defineMethod (c$, "getBundleImpl", 
14525  function (baseName, locale, loader, control) {
14526 if (control == null) {
14527 throw  new NullPointerException ("ResourceBundle locale or control is null");
14528 }var cacheKey =  new java.util.ResourceBundle.CacheKey (baseName, locale, loader);
14529 var bundle = null;
14530 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14531 if (bundleRef != null) {
14532 bundle = bundleRef;
14533 bundleRef = null;
14534 }if (java.util.ResourceBundle.isValidBundle (bundle)) {
14535 return bundle;
14536 }var formats = control.getFormats (baseName);
14537 var baseBundle = null;
14538 for (var targetLocale = locale; targetLocale != null; targetLocale = control.getFallbackLocale (baseName, targetLocale)) {
14539 var candidateLocales = control.getCandidateLocales (baseName, targetLocale);
14540 bundle = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, 0, control, baseBundle);
14541 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14542 var isBaseBundle = java.util.Locale.ROOT.equals (bundle.locale);
14543 if (!isBaseBundle || bundle.locale.equals (locale) || (candidateLocales.size () == 1 && bundle.locale.equals (candidateLocales.get (0)))) {
14544 break;
14545 }if (isBaseBundle && baseBundle == null) {
14546 baseBundle = bundle;
14547 }}}
14548 if (bundle == null) {
14549 if (baseBundle == null) {
14550 java.util.ResourceBundle.throwMissingResourceException (baseName, locale, cacheKey.getCause ());
14551 }bundle = baseBundle;
14552 }return bundle;
14553 }, "~S,java.util.Locale,~O,java.util.ResourceBundle.Control");
14554 c$.findBundle = Clazz_defineMethod (c$, "findBundle", 
14555  function (cacheKey, candidateLocales, formats, index, control, baseBundle) {
14556 var targetLocale = candidateLocales.get (index);
14557 var parent = null;
14558 if (index != candidateLocales.size () - 1) {
14559 parent = java.util.ResourceBundle.findBundle (cacheKey, candidateLocales, formats, index + 1, control, baseBundle);
14560 } else if (baseBundle != null && java.util.Locale.ROOT.equals (targetLocale)) {
14561 return baseBundle;
14562 }var expiredBundle = false;
14563 cacheKey.setLocale (targetLocale);
14564 var bundle = java.util.ResourceBundle.findBundleInCache (cacheKey, control);
14565 if (java.util.ResourceBundle.isValidBundle (bundle)) {
14566 expiredBundle = bundle.expired;
14567 if (!expiredBundle) {
14568 if (bundle.parent === parent) {
14569 return bundle;
14570 }var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14571 if (bundleRef != null && bundleRef === bundle) {
14572 java.util.ResourceBundle.cacheList.remove (cacheKey);
14573 }}}if (bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE) {
14574 var constKey = cacheKey.clone ();
14575 try {
14576 try {
14577 bundle = java.util.ResourceBundle.loadBundle (cacheKey, formats, control, expiredBundle);
14578 if (bundle != null) {
14579 if (bundle.parent == null) {
14580 bundle.setParent (parent);
14581 }bundle.locale = targetLocale;
14582 bundle = java.util.ResourceBundle.putBundleInCache (cacheKey, bundle, control);
14583 return bundle;
14584 }java.util.ResourceBundle.putBundleInCache (cacheKey, java.util.ResourceBundle.NONEXISTENT_BUNDLE, control);
14585 } finally {
14586 }
14587 } finally {
14588 if (Clazz_instanceOf (constKey.getCause (), InterruptedException)) {
14589 Thread.currentThread ().interrupt ();
14590 }}
14591 }return parent;
14592 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.List,~N,java.util.ResourceBundle.Control,java.util.ResourceBundle");
14593 c$.loadBundle = Clazz_defineMethod (c$, "loadBundle", 
14594  function (cacheKey, formats, control, reload) {
14595 var targetLocale = cacheKey.getLocale ();
14596 var bundle = null;
14597 var size = formats.size ();
14598 for (var i = 0; i < size; i++) {
14599 var format = formats.get (i);
14600 try {
14601 bundle = control.newBundle (cacheKey.getName (), targetLocale, format, null, reload);
14602 } catch (e$$) {
14603 if (Clazz_exceptionOf (e$$, LinkageError)) {
14604 var error = e$$;
14605 {
14606 cacheKey.setCause (error);
14607 }
14608 } else if (Clazz_exceptionOf (e$$, Exception)) {
14609 var cause = e$$;
14610 {
14611 cacheKey.setCause (cause);
14612 }
14613 } else {
14614 throw e$$;
14615 }
14616 }
14617 if (bundle != null) {
14618 cacheKey.setFormat (format);
14619 bundle.locale = targetLocale;
14620 bundle.expired = false;
14621 break;
14622 }}
14623 return bundle;
14624 }, "java.util.ResourceBundle.CacheKey,java.util.List,java.util.ResourceBundle.Control,~B");
14625 c$.isValidBundle = Clazz_defineMethod (c$, "isValidBundle", 
14626  function (bundle) {
14627 return bundle != null && bundle !== java.util.ResourceBundle.NONEXISTENT_BUNDLE;
14628 }, "java.util.ResourceBundle");
14629 c$.throwMissingResourceException = Clazz_defineMethod (c$, "throwMissingResourceException", 
14630  function (baseName, locale, cause) {
14631 if (Clazz_instanceOf (cause, java.util.MissingResourceException)) {
14632 cause = null;
14633 }throw  new java.util.MissingResourceException ("Can't find bundle for base name " + baseName + ", locale " + locale, baseName + "_" + locale, "", cause);
14634 }, "~S,java.util.Locale,Throwable");
14635 c$.findBundleInCache = Clazz_defineMethod (c$, "findBundleInCache", 
14636  function (cacheKey, control) {
14637 var bundleRef = java.util.ResourceBundle.cacheList.get (cacheKey);
14638 if (bundleRef == null) {
14639 return null;
14640 }var bundle = bundleRef;
14641 return bundle;
14642 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle.Control");
14643 c$.putBundleInCache = Clazz_defineMethod (c$, "putBundleInCache", 
14644  function (cacheKey, bundle, control) {
14645 var key = cacheKey.clone ();
14646 java.util.ResourceBundle.cacheList.put (key, bundle);
14647 return bundle;
14648 }, "java.util.ResourceBundle.CacheKey,java.util.ResourceBundle,java.util.ResourceBundle.Control");
14649 c$.clearCache = Clazz_defineMethod (c$, "clearCache", 
14650 function () {
14651 java.util.ResourceBundle.cacheList.clear ();
14652 });
14653 Clazz_defineMethod (c$, "containsKey", 
14654 function (key) {
14655 if (key == null) {
14656 throw  new NullPointerException ();
14657 }for (var rb = this; rb != null; rb = rb.parent) {
14658 if (rb.handleKeySet ().contains (key)) {
14659 return true;
14660 }}
14661 return false;
14662 }, "~S");
14663 Clazz_defineMethod (c$, "keySet", 
14664 function () {
14665 var keys =  new java.util.HashSet ();
14666 for (var rb = this; rb != null; rb = rb.parent) {
14667 keys.addAll (rb.handleKeySet ());
14668 }
14669 return keys;
14670 });
14671 Clazz_defineMethod (c$, "handleKeySet", 
14672 function () {
14673 if (this.$keySet == null) {
14674 {
14675 if (this.$keySet == null) {
14676 var keys =  new java.util.HashSet ();
14677 var enumKeys = this.getKeys ();
14678 while (enumKeys.hasMoreElements ()) {
14679 var key = enumKeys.nextElement ();
14680 if (this.handleGetObject (key) != null) {
14681 keys.add (key);
14682 }}
14683 this.$keySet = keys;
14684 }}}return this.$keySet;
14685 });
14686 c$.$ResourceBundle$1$ = function () {
14687 Clazz_pu$h(self.c$);
14688 c$ = Clazz_declareAnonymous (java.util, "ResourceBundle$1", java.util.ResourceBundle);
14689 Clazz_defineMethod (c$, "getKeys", 
14690 function () {
14691 return null;
14692 });
14693 Clazz_defineMethod (c$, "handleGetObject", 
14694 function (key) {
14695 return null;
14696 }, "~S");
14697 Clazz_overrideMethod (c$, "toString", 
14698 function () {
14699 return "NONEXISTENT_BUNDLE";
14700 });
14701 c$ = Clazz_p0p ();
14702 };
14703 Clazz_pu$h(self.c$);
14704 c$ = Clazz_decorateAsClass (function () {
14705 this.name = null;
14706 this.locale = null;
14707 this.format = null;
14708 this.cause = null;
14709 this.hashCodeCache = 0;
14710 Clazz_instantialize (this, arguments);
14711 }, java.util.ResourceBundle, "CacheKey", null, Cloneable);
14712 Clazz_makeConstructor (c$, 
14713 function (a, b, c) {
14714 this.name = a;
14715 this.locale = b;
14716 if (this.name != null) this.calculateHashCode ();
14717 }, "~S,java.util.Locale,~O");
14718 Clazz_defineMethod (c$, "getName", 
14719 function () {
14720 return this.name;
14721 });
14722 Clazz_defineMethod (c$, "getLocale", 
14723 function () {
14724 return this.locale;
14725 });
14726 Clazz_defineMethod (c$, "setLocale", 
14727 function (a) {
14728 if (!this.locale.equals (a)) {
14729 this.locale = a;
14730 this.calculateHashCode ();
14731 }return this;
14732 }, "java.util.Locale");
14733 Clazz_overrideMethod (c$, "equals", 
14734 function (a) {
14735 if (this === a) {
14736 return true;
14737 }try {
14738 var b = a;
14739 if (this.hashCodeCache != b.hashCodeCache) {
14740 return false;
14741 }if (!this.name.equals (b.name)) {
14742 return false;
14743 }if (!this.locale.equals (b.locale)) {
14744 return false;
14745 }return true;
14746 } catch (e$$) {
14747 if (Clazz_exceptionOf (e$$, NullPointerException)) {
14748 var e = e$$;
14749 {
14750 }
14751 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
14752 var e = e$$;
14753 {
14754 }
14755 } else {
14756 throw e$$;
14757 }
14758 }
14759 return false;
14760 }, "~O");
14761 Clazz_overrideMethod (c$, "hashCode", 
14762 function () {
14763 return this.hashCodeCache;
14764 });
14765 Clazz_defineMethod (c$, "calculateHashCode", 
14766  function () {
14767 this.hashCodeCache = this.name.hashCode () << 3;
14768 this.hashCodeCache ^= this.locale.hashCode ();
14769 });
14770 Clazz_defineMethod (c$, "clone", 
14771 function () {
14772 try {
14773 var a = Clazz_superCall (this, java.util.ResourceBundle.CacheKey, "clone", []);
14774 a.cause = null;
14775 return a;
14776 } catch (e) {
14777 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
14778 throw  new InternalError ();
14779 } else {
14780 throw e;
14781 }
14782 }
14783 });
14784 Clazz_defineMethod (c$, "setFormat", 
14785 function (a) {
14786 this.format = a;
14787 }, "~S");
14788 Clazz_defineMethod (c$, "setCause", 
14789  function (a) {
14790 if (this.cause == null) {
14791 this.cause = a;
14792 } else {
14793 if (Clazz_instanceOf (this.cause, ClassNotFoundException)) {
14794 this.cause = a;
14795 }}}, "Throwable");
14796 Clazz_defineMethod (c$, "getCause", 
14797  function () {
14798 return this.cause;
14799 });
14800 Clazz_overrideMethod (c$, "toString", 
14801 function () {
14802 var a = this.locale.toString ();
14803 if (a.length == 0) {
14804 if (this.locale.getVariant ().length != 0) {
14805 a = "__" + this.locale.getVariant ();
14806 } else {
14807 a = "\"\"";
14808 }}return "CacheKey[" + this.name + ", lc=" + a + "(format=" + this.format + ")]";
14809 });
14810 c$ = Clazz_p0p ();
14811 Clazz_pu$h(self.c$);
14812 c$ = Clazz_declareType (java.util.ResourceBundle, "Control");
14813 Clazz_makeConstructor (c$, 
14814 function () {
14815 });
14816 c$.getControl = Clazz_defineMethod (c$, "getControl", 
14817 function (a) {
14818 if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14819 return java.util.ResourceBundle.SingleFormatControl.PROPERTIES_ONLY;
14820 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14821 return java.util.ResourceBundle.SingleFormatControl.CLASS_ONLY;
14822 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14823 return java.util.ResourceBundle.Control.INSTANCE;
14824 }throw  new IllegalArgumentException ();
14825 }, "java.util.List");
14826 c$.getNoFallbackControl = Clazz_defineMethod (c$, "getNoFallbackControl", 
14827 function (a) {
14828 if (a.equals (java.util.ResourceBundle.Control.FORMAT_DEFAULT)) {
14829 return java.util.ResourceBundle.NoFallbackControl.NO_FALLBACK;
14830 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_PROPERTIES)) {
14831 return java.util.ResourceBundle.NoFallbackControl.PROPERTIES_ONLY_NO_FALLBACK;
14832 }if (a.equals (java.util.ResourceBundle.Control.FORMAT_CLASS)) {
14833 return java.util.ResourceBundle.NoFallbackControl.CLASS_ONLY_NO_FALLBACK;
14834 }throw  new IllegalArgumentException ();
14835 }, "java.util.List");
14836 Clazz_defineMethod (c$, "getFormats", 
14837 function (a) {
14838 if (a == null) {
14839 throw  new NullPointerException ();
14840 }return java.util.ResourceBundle.Control.FORMAT_DEFAULT;
14841 }, "~S");
14842 Clazz_defineMethod (c$, "getCandidateLocales", 
14843 function (a, b) {
14844 if (a == null) {
14845 throw  new NullPointerException ();
14846 }var c = b.getLanguage ();
14847 var d = b.getCountry ();
14848 var e = b.getVariant ();
14849 var f =  new java.util.ArrayList (4);
14850 if (e.length > 0) {
14851 f.add (b);
14852 }if (d.length > 0) {
14853 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, d, ""));
14854 }if (c.length > 0) {
14855 f.add ((f.size () == 0) ? b : java.util.Locale.getInstance (c, "", ""));
14856 }f.add (java.util.Locale.ROOT);
14857 return f;
14858 }, "~S,java.util.Locale");
14859 Clazz_defineMethod (c$, "getFallbackLocale", 
14860 function (a, b) {
14861 if (a == null) {
14862 throw  new NullPointerException ();
14863 }var c = java.util.Locale.getDefault ();
14864 return b.equals (c) ? null : c;
14865 }, "~S,java.util.Locale");
14866 Clazz_defineMethod (c$, "newBundle", 
14867 function (a, b, c, d, e) {
14868 var f = this.toBundleName (a, b);
14869 var g = null;
14870 if (c.equals ("java.class")) {
14871 g = swingjs.api.Interface.getInstance (f, false);
14872 } else if (c.equals ("java.properties")) {
14873 var h = this.toResourceName0 (f, "properties");
14874 if (h == null) {
14875 return null;
14876 }var i = swingjs.JSToolkit.getJavaResource (h);
14877 var j = null;
14878 j = (i == null ? null :  new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (i.getBytes ())));
14879 if (j != null) {
14880 try {
14881 g = this.newPropertyBundle (j);
14882 } finally {
14883 j.close ();
14884 }
14885 }} else {
14886 throw  new IllegalArgumentException ("unknown format: " + c);
14887 }return g;
14888 }, "~S,java.util.Locale,~S,~O,~B");
14889 Clazz_defineMethod (c$, "newPropertyBundle", 
14890  function (a) {
14891 return (swingjs.api.Interface.getInstance ("java.util.PropertyResourceBundle", false)).setStream (a);
14892 }, "java.io.InputStream");
14893 Clazz_defineMethod (c$, "getTimeToLive", 
14894 function (a, b) {
14895 if (a == null || b == null) {
14896 throw  new NullPointerException ();
14897 }return -2;
14898 }, "~S,java.util.Locale");
14899 Clazz_defineMethod (c$, "toBundleName", 
14900 function (a, b) {
14901 if (b === java.util.Locale.ROOT) {
14902 return a;
14903 }var c = b.getLanguage ();
14904 var d = b.getCountry ();
14905 var e = b.getVariant ();
14906 if (c === "" && d === "" && e === "") {
14907 return a;
14908 }var f =  new StringBuilder (a);
14909 f.append ('_');
14910 if (e !== "") {
14911 f.append (c).append ('_').append (d).append ('_').append (e);
14912 } else if (d !== "") {
14913 f.append (c).append ('_').append (d);
14914 } else {
14915 f.append (c);
14916 }return f.toString ();
14917 }, "~S,java.util.Locale");
14918 Clazz_defineMethod (c$, "toResourceName", 
14919 function (a, b) {
14920 var c =  new StringBuilder (a.length + 1 + b.length);
14921 c.append (a.$replace ('.', '/')).append ('.').append (b);
14922 return c.toString ();
14923 }, "~S,~S");
14924 Clazz_defineMethod (c$, "toResourceName0", 
14925  function (a, b) {
14926 if (a.contains ("://")) {
14927 return null;
14928 } else {
14929 return this.toResourceName (a, b);
14930 }}, "~S,~S");
14931 c$.FORMAT_DEFAULT = c$.prototype.FORMAT_DEFAULT = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class", "java.properties"]));
14932 c$.FORMAT_CLASS = c$.prototype.FORMAT_CLASS = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.class"]));
14933 c$.FORMAT_PROPERTIES = c$.prototype.FORMAT_PROPERTIES = java.util.Collections.unmodifiableList (java.util.Arrays.asList (["java.properties"]));
14934 Clazz_defineStatics (c$,
14935 "TTL_DONT_CACHE", -1,
14936 "TTL_NO_EXPIRATION_CONTROL", -2);
14937 c$.INSTANCE = c$.prototype.INSTANCE =  new java.util.ResourceBundle.Control ();
14938 c$ = Clazz_p0p ();
14939 Clazz_pu$h(self.c$);
14940 c$ = Clazz_decorateAsClass (function () {
14941 this.formats = null;
14942 Clazz_instantialize (this, arguments);
14943 }, java.util.ResourceBundle, "SingleFormatControl", java.util.ResourceBundle.Control);
14944 Clazz_makeConstructor (c$, 
14945 function (a) {
14946 Clazz_superConstructor (this, java.util.ResourceBundle.SingleFormatControl, []);
14947 this.formats = a;
14948 }, "java.util.List");
14949 Clazz_overrideMethod (c$, "getFormats", 
14950 function (a) {
14951 if (a == null) {
14952 throw  new NullPointerException ();
14953 }return this.formats;
14954 }, "~S");
14955 c$.PROPERTIES_ONLY = c$.prototype.PROPERTIES_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14956 c$.CLASS_ONLY = c$.prototype.CLASS_ONLY =  new java.util.ResourceBundle.SingleFormatControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
14957 c$ = Clazz_p0p ();
14958 Clazz_pu$h(self.c$);
14959 c$ = Clazz_declareType (java.util.ResourceBundle, "NoFallbackControl", java.util.ResourceBundle.SingleFormatControl);
14960 Clazz_overrideMethod (c$, "getFallbackLocale", 
14961 function (a, b) {
14962 if (a == null || b == null) {
14963 throw  new NullPointerException ();
14964 }return null;
14965 }, "~S,java.util.Locale");
14966 c$.NO_FALLBACK = c$.prototype.NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_DEFAULT);
14967 c$.PROPERTIES_ONLY_NO_FALLBACK = c$.prototype.PROPERTIES_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_PROPERTIES);
14968 c$.CLASS_ONLY_NO_FALLBACK = c$.prototype.CLASS_ONLY_NO_FALLBACK =  new java.util.ResourceBundle.NoFallbackControl (java.util.ResourceBundle.Control.FORMAT_CLASS);
14969 c$ = Clazz_p0p ();
14970 Clazz_defineStatics (c$,
14971 "INITIAL_CACHE_SIZE", 32);
14972 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));
14973 c$.cacheList = c$.prototype.cacheList =  new java.util.HashMap (32);
14974 });
14975 Clazz_declarePackage ("java.applet");
14976 Clazz_load (["java.awt.Panel"], "java.applet.Applet", ["java.net.URL", "java.util.Locale"], function () {
14977 c$ = Clazz_decorateAsClass (function () {
14978 this.stub = null;
14979 Clazz_instantialize (this, arguments);
14980 }, java.applet, "Applet", java.awt.Panel);
14981 Clazz_makeConstructor (c$, 
14982 function () {
14983 Clazz_superConstructor (this, java.applet.Applet, []);
14984 this.setPanel ();
14985 });
14986 Clazz_defineMethod (c$, "setStub", 
14987 function (stub) {
14988 this.stub = stub;
14989 }, "java.applet.AppletStub");
14990 Clazz_defineMethod (c$, "isActive", 
14991 function () {
14992 if (this.stub != null) {
14993 return this.stub.isActive ();
14994 } else {
14995 return false;
14996 }});
14997 Clazz_defineMethod (c$, "getDocumentBase", 
14998 function () {
14999 return this.stub.getDocumentBase ();
15000 });
15001 Clazz_defineMethod (c$, "getCodeBase", 
15002 function () {
15003 return this.stub.getCodeBase ();
15004 });
15005 Clazz_defineMethod (c$, "getParameter", 
15006 function (name) {
15007 return this.stub.getParameter (name);
15008 }, "~S");
15009 Clazz_defineMethod (c$, "getAppletContext", 
15010 function () {
15011 return this.stub.getAppletContext ();
15012 });
15013 Clazz_defineMethod (c$, "resize", 
15014 function (width, height) {
15015 var d = this.size ();
15016 if ((d.width != width) || (d.height != height)) {
15017 Clazz_superCall (this, java.applet.Applet, "resize", [width, height]);
15018 if (this.stub != null) {
15019 this.stub.appletResize (width, height);
15020 }}}, "~N,~N");
15021 Clazz_defineMethod (c$, "resize", 
15022 function (d) {
15023 this.resize (d.width, d.height);
15024 }, "java.awt.Dimension");
15025 Clazz_defineMethod (c$, "showStatus", 
15026 function (msg) {
15027 this.getAppletContext ().showStatus (msg);
15028 }, "~S");
15029 Clazz_defineMethod (c$, "getImage", 
15030 function (url) {
15031 return this.getAppletContext ().getImage (url);
15032 }, "java.net.URL");
15033 Clazz_defineMethod (c$, "getImage", 
15034 function (url, name) {
15035 try {
15036 return this.getImage ( new java.net.URL (url, name));
15037 } catch (e) {
15038 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
15039 return null;
15040 } else {
15041 throw e;
15042 }
15043 }
15044 }, "java.net.URL,~S");
15045 Clazz_defineMethod (c$, "getAppletInfo", 
15046 function () {
15047 return null;
15048 });
15049 Clazz_defineMethod (c$, "getLocale", 
15050 function () {
15051 var locale = Clazz_superCall (this, java.applet.Applet, "getLocale", []);
15052 if (locale == null) {
15053 return java.util.Locale.getDefault ();
15054 }return locale;
15055 });
15056 Clazz_defineMethod (c$, "getParameterInfo", 
15057 function () {
15058 return null;
15059 });
15060 Clazz_defineMethod (c$, "init", 
15061 function () {
15062 });
15063 Clazz_defineMethod (c$, "start", 
15064 function () {
15065 });
15066 Clazz_defineMethod (c$, "stop", 
15067 function () {
15068 });
15069 Clazz_defineMethod (c$, "destroy", 
15070 function () {
15071 });
15072 });
15073 Clazz_declarePackage ("java.net");
15074 Clazz_load (["java.util.Hashtable"], "java.net.URL", ["java.io.IOException", "java.lang.Character", "$.Error", "java.net.MalformedURLException"], function () {
15075 c$ = Clazz_decorateAsClass (function () {
15076 this.protocol = null;
15077 this.host = null;
15078 this.port = -1;
15079 this.file = null;
15080 this.query = null;
15081 this.authority = null;
15082 this.path = null;
15083 this.userInfo = null;
15084 this.ref = null;
15085 this.handler = null;
15086 this.$hashCode = -1;
15087 Clazz_instantialize (this, arguments);
15088 }, java.net, "URL", null, java.io.Serializable);
15089 Clazz_makeConstructor (c$, 
15090 function (context, spec, handler) {
15091 {
15092 switch (arguments.length) {
15093 case 1:
15094 spec = context;context = handler = null;
15095 break;
15096 case 2:
15097 handler = null;
15098 break;
15099 case 3:
15100 if (context == null || Clazz_instanceOf(context, java.net.URL))
15101 break;
15102 default:
15103 alert("java.net.URL constructor format not supported");
15104 break;
15105 }
15106 context && context.valueOf && context.valueOf() == null && (context = null);
15107 }var original = spec;
15108 var i;
15109 var limit;
15110 var c;
15111 var start = 0;
15112 var newProtocol = null;
15113 var aRef = false;
15114 var isRelative = false;
15115 try {
15116 limit = spec.length;
15117 while ((limit > 0) && (spec.charAt (limit - 1) <= ' ')) {
15118 limit--;
15119 }
15120 while ((start < limit) && (spec.charAt (start) <= ' ')) {
15121 start++;
15122 }
15123 if (spec.regionMatches (true, start, "url:", 0, 4)) {
15124 start += 4;
15125 }if (start < spec.length && spec.charAt (start) == '#') {
15126 aRef = true;
15127 }for (i = start; !aRef && (i < limit) && ((c = spec.charCodeAt (i)) != 47); i++) {
15128 if (c == 58) {
15129 var s = spec.substring (start, i).toLowerCase ();
15130 if (this.isValidProtocol (s)) {
15131 newProtocol = s;
15132 start = i + 1;
15133 }break;
15134 }}
15135 this.protocol = newProtocol;
15136 if ((context != null) && ((newProtocol == null) || newProtocol.equalsIgnoreCase (context.protocol))) {
15137 if (handler == null) {
15138 handler = context.handler;
15139 }if (context.path != null && context.path.startsWith ("/")) newProtocol = null;
15140 if (newProtocol == null) {
15141 this.protocol = context.protocol;
15142 this.authority = context.authority;
15143 this.userInfo = context.userInfo;
15144 this.host = context.host;
15145 this.port = context.port;
15146 this.file = context.file;
15147 this.path = context.path;
15148 isRelative = true;
15149 }}if (this.protocol == null) {
15150 throw  new java.net.MalformedURLException ("no protocol: " + original);
15151 }if (handler == null && (handler = java.net.URL.getURLStreamHandler (this.protocol)) == null) {
15152 throw  new java.net.MalformedURLException ("unknown protocol: " + this.protocol);
15153 }this.handler = handler;
15154 i = spec.indexOf ('#', start);
15155 if (i >= 0) {
15156 this.ref = spec.substring (i + 1, limit);
15157 limit = i;
15158 }if (isRelative && start == limit) {
15159 this.query = context.query;
15160 if (this.ref == null) {
15161 this.ref = context.ref;
15162 }}handler.parseURL (this, spec, start, limit);
15163 } catch (e$$) {
15164 if (Clazz_exceptionOf (e$$, java.net.MalformedURLException)) {
15165 var e = e$$;
15166 {
15167 throw e;
15168 }
15169 } else if (Clazz_exceptionOf (e$$, Exception)) {
15170 var e = e$$;
15171 {
15172 var exception =  new java.net.MalformedURLException (e.getMessage ());
15173 exception.initCause (e);
15174 throw exception;
15175 }
15176 } else {
15177 throw e$$;
15178 }
15179 }
15180 }, "java.net.URL,~S,java.net.URLStreamHandler");
15181 Clazz_defineMethod (c$, "isValidProtocol", 
15182  function (protocol) {
15183 var len = protocol.length;
15184 if (len < 1) return false;
15185 var c = protocol.charAt (0);
15186 if (!Character.isLetter (c)) return false;
15187 for (var i = 1; i < len; i++) {
15188 c = protocol.charAt (i);
15189 if (!Character.isLetterOrDigit (c) && c != '.' && c != '+' && c != '-') {
15190 return false;
15191 }}
15192 return true;
15193 }, "~S");
15194 Clazz_defineMethod (c$, "set5", 
15195 function (protocol, host, port, file, ref) {
15196 {
15197 this.protocol = protocol;
15198 this.host = host;
15199 this.authority = port == -1 ? host : host + ":" + port;
15200 this.port = port;
15201 this.file = file;
15202 this.ref = ref;
15203 this.$hashCode = -1;
15204 var q = file.lastIndexOf ('?');
15205 if (q != -1) {
15206 this.query = file.substring (q + 1);
15207 this.path = file.substring (0, q);
15208 } else this.path = file;
15209 }}, "~S,~S,~N,~S,~S");
15210 Clazz_defineMethod (c$, "set", 
15211 function (protocol, host, port, authority, userInfo, path, query, ref) {
15212 {
15213 this.protocol = protocol;
15214 this.host = host;
15215 this.port = port;
15216 this.file = query == null ? path : path + "?" + query;
15217 this.userInfo = userInfo;
15218 this.path = path;
15219 this.ref = ref;
15220 this.$hashCode = -1;
15221 this.query = query;
15222 this.authority = authority;
15223 }}, "~S,~S,~N,~S,~S,~S,~S,~S");
15224 Clazz_defineMethod (c$, "getQuery", 
15225 function () {
15226 return this.query;
15227 });
15228 Clazz_defineMethod (c$, "getPath", 
15229 function () {
15230 return this.path;
15231 });
15232 Clazz_defineMethod (c$, "getUserInfo", 
15233 function () {
15234 return this.userInfo;
15235 });
15236 Clazz_defineMethod (c$, "getAuthority", 
15237 function () {
15238 return this.authority;
15239 });
15240 Clazz_defineMethod (c$, "getPort", 
15241 function () {
15242 return this.port;
15243 });
15244 Clazz_defineMethod (c$, "getDefaultPort", 
15245 function () {
15246 return this.handler.getDefaultPort ();
15247 });
15248 Clazz_defineMethod (c$, "getProtocol", 
15249 function () {
15250 return this.protocol;
15251 });
15252 Clazz_defineMethod (c$, "getHost", 
15253 function () {
15254 return this.host;
15255 });
15256 Clazz_defineMethod (c$, "getFile", 
15257 function () {
15258 return this.file;
15259 });
15260 Clazz_defineMethod (c$, "getRef", 
15261 function () {
15262 return this.ref;
15263 });
15264 Clazz_overrideMethod (c$, "equals", 
15265 function (obj) {
15266 if (!(Clazz_instanceOf (obj, java.net.URL))) return false;
15267 var u2 = obj;
15268 return this.handler.equals2 (this, u2);
15269 }, "~O");
15270 Clazz_overrideMethod (c$, "hashCode", 
15271 function () {
15272 if (this.$hashCode != -1) return this.$hashCode;
15273 this.$hashCode = this.handler.hashCode (this);
15274 return this.$hashCode;
15275 });
15276 Clazz_defineMethod (c$, "sameFile", 
15277 function (other) {
15278 return this.handler.sameFile (this, other);
15279 }, "java.net.URL");
15280 Clazz_overrideMethod (c$, "toString", 
15281 function () {
15282 return this.toExternalForm ();
15283 });
15284 Clazz_defineMethod (c$, "toExternalForm", 
15285 function () {
15286 return this.handler.toExternalForm (this);
15287 });
15288 Clazz_defineMethod (c$, "openConnection", 
15289 function () {
15290 return this.handler.openConnection (this);
15291 });
15292 Clazz_defineMethod (c$, "openStream", 
15293 function () {
15294 return this.openConnection ().getInputStream ();
15295 });
15296 Clazz_defineMethod (c$, "getContent", 
15297 function () {
15298 return this.openConnection ().getInputStream ();
15299 });
15300 c$.setURLStreamHandlerFactory = Clazz_defineMethod (c$, "setURLStreamHandlerFactory", 
15301 function (fac) {
15302 {
15303 if (java.net.URL.factory != null) {
15304 throw  new Error ("factory already defined");
15305 }var security = System.getSecurityManager ();
15306 if (security != null) {
15307 security.checkSetFactory ();
15308 }java.net.URL.handlers.clear ();
15309 java.net.URL.factory = fac;
15310 }}, "java.net.URLStreamHandlerFactory");
15311 c$.getURLStreamHandler = Clazz_defineMethod (c$, "getURLStreamHandler", 
15312 function (protocol) {
15313 var handler = java.net.URL.handlers.get (protocol);
15314 if (handler == null) {
15315 if (java.net.URL.factory != null) {
15316 handler = java.net.URL.factory.createURLStreamHandler (protocol);
15317 }}return handler;
15318 }, "~S");
15319 Clazz_defineStatics (c$,
15320 "factory", null);
15321 c$.handlers = c$.prototype.handlers =  new java.util.Hashtable ();
15322 c$.streamHandlerLock = c$.prototype.streamHandlerLock =  new Clazz._O ();
15323 });
15324
15325 // modified by Bob Hanson 3/21/2014 6:44:21 AM  to reduce this.b$[....] phrases to simply this.h$
15326 // BH added ability to use a non-Java key for HTML elements, for example.
15327 // BH 8/24/2014 8:48:58 PM all synchronization and inner classes removed
15328
15329
15330 Clazz_load([],"java.util.HashtableIterator",[],function(){
15331 c$=Clazz_decorateAsClass(function(){
15332 this.position=0;
15333 this.expectedModCount=0;
15334 this.type=null;
15335 this.lastEntry=null;
15336 this.lastPosition=0;
15337 this.canRemove=false;
15338 Clazz_instantialize(this,arguments);
15339 },java.util,"HashtableIterator",null,java.util.Iterator);
15340 Clazz_makeConstructor(c$,
15341 function(a){
15342 this.type=a;
15343 this.h$ = a.h$;
15344 this.position=this.h$.lastSlot;
15345 this.expectedModCount=this.h$.modCount;
15346 },"java.util.AbstractSet");
15347 Clazz_overrideMethod(c$,"hasNext",
15348 function(){
15349 if(this.lastEntry&&this.lastEntry.next){
15350 return true;
15351 }while(this.position>=this.h$.firstSlot){
15352 if(this.h$.elementData[this.position]==null){
15353 this.position--;
15354 }else{
15355 return true;
15356 }}
15357 return false;
15358 });
15359 Clazz_overrideMethod(c$,"next",
15360 function(){
15361 if(this.expectedModCount==this.h$.modCount){
15362 if(this.lastEntry){
15363 this.lastEntry=this.lastEntry.next;
15364 }if(this.lastEntry==null){
15365 while(this.position>=this.h$.firstSlot&&(this.lastEntry=this.h$.elementData[this.position])==null){
15366 this.position--;
15367 }
15368 if(this.lastEntry){
15369 this.lastPosition=this.position;
15370 this.position--;
15371 }}if(this.lastEntry){
15372 this.canRemove=true;
15373 return this.type.get(this.lastEntry);
15374 }throw new java.util.NoSuchElementException();
15375 }throw new java.util.ConcurrentModificationException();
15376 });
15377 Clazz_overrideMethod(c$,"remove",
15378 function(){
15379 if(this.expectedModCount==this.h$.modCount){
15380 if(this.canRemove){
15381 this.canRemove=false;
15382 {
15383 var a=false;
15384 var b=this.h$.elementData[this.lastPosition];
15385 if(b===this.lastEntry){
15386 this.h$.elementData[this.lastPosition]=b.next;
15387 a=true;
15388 }else{
15389 while(b&&b.next!==this.lastEntry){
15390 b=b.next;
15391 }
15392 if(b){
15393 b.next=this.lastEntry.next;
15394 a=true;
15395 }}if(a){
15396 this.h$.modCount++;
15397 this.h$.elementCount--;
15398 this.expectedModCount++;
15399 return;
15400 }}}else{
15401 throw new IllegalStateException();
15402 }}throw new java.util.ConcurrentModificationException();
15403 });
15404 });
15405
15406
15407
15408 ////////////////////////////
15409
15410
15411 Clazz_load([],"java.util.HashtableEnumerator",[],function(){
15412 c$=Clazz_decorateAsClass(function(){
15413 this.key=false;
15414 this.start=0;
15415 this.entry=null;
15416 Clazz_instantialize(this,arguments);
15417 },java.util,"HashtableEnumerator",null,java.util.Enumeration);
15418
15419 Clazz_makeConstructor(c$,
15420 function(a, b){
15421 this.key = a;
15422 this.h$ = b;
15423 if (this.h$)this.start=this.h$.lastSlot+1;
15424 },"~B,java.util.Hashtable");
15425 Clazz_overrideMethod(c$,"hasMoreElements",
15426 function(){
15427 if (!this.h$)return false;
15428 if(this.entry)return true;
15429
15430 while(--this.start>=this.h$.firstSlot){
15431 if(this.h$.elementData[this.start]){
15432 this.entry=this.h$.elementData[this.start];
15433 return true;
15434 }}
15435 return false;
15436 });
15437 Clazz_overrideMethod(c$,"nextElement",
15438 function(){
15439 if(this.hasMoreElements()){
15440 var a=this.key?this.entry.key:this.entry.value;
15441 this.entry=this.entry.next;
15442 return a;
15443 }
15444 throw new java.util.NoSuchElementException();
15445 });
15446 });
15447
15448 ////////////////////////////
15449
15450 Clazz_load([],"java.util.HashtableEntrySet",[],function(){
15451 c$=Clazz_decorateAsClass(function(){
15452 Clazz_instantialize(this,arguments);
15453 },java.util,"HashtableEntrySet",java.util.AbstractSet);
15454
15455 Clazz_makeConstructor(c$,
15456 function(a){
15457 this.h$ = a;
15458 },"java.util.Hashtable");
15459 Clazz_overrideMethod(c$,"size",
15460 function(){
15461 return this.h$.elementCount;
15462 });
15463 Clazz_overrideMethod(c$,"clear",
15464 function(){
15465 this.h$.clear();
15466 });
15467 Clazz_overrideMethod(c$,"remove",
15468 function(object){
15469 if(this.contains(object)){
15470 this.h$.remove((object).getKey());
15471 return true;
15472 }return false;
15473 },"~O");
15474 Clazz_defineMethod(c$,"contains",
15475 function(object){
15476 var entry=this.h$.getEntry((object).getKey());
15477 return object.equals(entry);
15478 },"~O");
15479
15480 Clazz_overrideMethod(c$,"get",
15481 function(entry){
15482 return entry;
15483 },"java.util.MapEntry");
15484
15485 Clazz_defineMethod(c$,"iterator",
15486 function(){
15487 return new java.util.HashtableIterator(this);
15488 });
15489 });
15490
15491
15492 ////////////////////////////
15493
15494 Clazz_load([],"java.util.HashtableKeySet",[],function(){
15495 c$=Clazz_decorateAsClass(function(){
15496 Clazz_instantialize(this,arguments);
15497 },java.util,"HashtableKeySet",java.util.AbstractSet);
15498
15499 Clazz_makeConstructor(c$,
15500 function(a){
15501 this.h$ = a;
15502 },"java.util.Hashtable");
15503
15504 Clazz_overrideMethod(c$,"contains",
15505 function(object){
15506 return this.h$.containsKey(object);
15507 },"~O");
15508 Clazz_overrideMethod(c$,"size",
15509 function(){
15510 return this.h$.elementCount;
15511 });
15512 Clazz_overrideMethod(c$,"clear",
15513 function(){
15514 this.h$.clear();
15515 });
15516 Clazz_overrideMethod(c$,"remove",
15517 function(key){
15518 if(this.h$.containsKey(key)){
15519 this.h$.remove(key);
15520 return true;
15521 }return false;
15522 },"~O");
15523
15524 Clazz_overrideMethod(c$,"get",
15525 function(entry){
15526 return entry.key;
15527 },"java.util.MapEntry");
15528
15529 Clazz_overrideMethod(c$,"iterator",
15530 function(){
15531 return new java.util.HashtableIterator(this);
15532 });
15533 });
15534
15535 ////////////////////////////
15536
15537 Clazz_load([],"java.util.HashtableValueCollection",[],function(){
15538 c$=Clazz_decorateAsClass(function(){
15539 Clazz_instantialize(this,arguments);
15540 },java.util,"HashtableValueCollection",null,java.util.AbstractCollection);
15541
15542 Clazz_makeConstructor(c$,
15543 function(a){
15544 this.h$ = a;
15545 },"java.util.Hashtable");
15546 Clazz_overrideMethod(c$,"contains",
15547 function(object){
15548 return this.h$.contains(object);
15549 },"~O");
15550 Clazz_overrideMethod(c$,"size",
15551 function(){
15552 return this.h$.elementCount;
15553 });
15554 Clazz_overrideMethod(c$,"clear",
15555 function(){
15556 this.h$.clear();
15557 });
15558
15559 Clazz_overrideMethod(c$,"get",
15560 function(entry){
15561 return entry.value;
15562 },"java.util.MapEntry");
15563
15564 Clazz_overrideMethod(c$,"iterator",
15565 function(){
15566 return new java.util.HashtableIterator(this);
15567 });
15568 });
15569 ////////////////////////////
15570
15571
15572 Clazz_load(["java.util.MapEntry"],"java.util.HashtableEntry",[],function(){
15573 c$=Clazz_decorateAsClass(function(){
15574 this.next=null;
15575 this.hashcode=0;
15576 Clazz_instantialize(this,arguments);
15577 },java.util,"HashtableEntry",java.util.MapEntry);
15578 Clazz_overrideConstructor(c$,
15579 function(a,b){
15580 this.key = a;
15581 this.value = b;
15582 this.hashcode=a.hashCode();
15583 });
15584 Clazz_defineMethod(c$,"clone",
15585 function(){
15586 var a=Clazz_superCall(this,java.util.HashtableEntry,"clone",[]);
15587 if(this.next!=null){
15588 a.next=this.next.clone();
15589 }
15590 return a;
15591 });
15592 Clazz_overrideMethod(c$,"setValue",
15593 function(a){
15594 if(a==null){
15595 throw new NullPointerException();
15596 }var b=this.value;
15597 this.value=a;
15598 return b;
15599 },"~O");
15600 Clazz_defineMethod(c$,"getKeyHash",
15601 function(){
15602 return this.key.hashCode();
15603 });
15604 Clazz_defineMethod(c$,"equalsKey",
15605 function(a,b){
15606 return this.hashcode==(!a.hashCode || a.hashCode())&&this.key.equals(a);
15607 },"~O,~N");
15608 Clazz_overrideMethod(c$,"toString",
15609 function(){
15610 return this.key+"="+this.value;
15611 });
15612 });
15613
15614
15615
15616 ////////////////////////////
15617
15618
15619 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(){
15620 c$=Clazz_decorateAsClass(function(){
15621 this.elementCount=0;
15622 this.elementData=null;
15623 this.loadFactor=0;
15624 this.threshold=0;
15625 this.firstSlot=0;
15626 this.lastSlot=-1;
15627 this.modCount=0;
15628 Clazz_instantialize(this,arguments);
15629 },java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);   
15630 c$.newEntry=Clazz_defineMethod(c$,"newEntry",
15631 ($fz=function(key,value,hash){
15632 return new java.util.HashtableEntry(key,value);
15633 },$fz.isPrivate=true,$fz),"~O,~O,~N");
15634 Clazz_overrideConstructor(c$,
15635 function(){
15636 this.elementCount=0;
15637 this.elementData=this.newElementArray(11);
15638 this.firstSlot=this.elementData.length;
15639 this.loadFactor=0.75;
15640 this.computeMaxSize();
15641 });
15642 Clazz_defineMethod(c$,"newElementArray",
15643 ($fz=function(size){
15644 return new Array(size);
15645 },$fz.isPrivate=true,$fz),"~N");
15646 Clazz_overrideMethod(c$,"clear",
15647 function(){
15648 this.elementCount=0;
15649 for (var i = this.elementData.length; --i >= 0;)
15650           this.elementData[i] = null;
15651 this.modCount++;
15652 });
15653 Clazz_defineMethod(c$,"clone",
15654 function(){
15655 try{
15656 var hashtable=Clazz_superCall(this,java.util.Hashtable,"clone",[]);
15657 hashtable.elementData=this.elementData.clone();
15658 var entry;
15659 for(var i=this.elementData.length;--i>=0;){
15660 if((entry=this.elementData[i])){
15661 hashtable.elementData[i]=entry.clone();
15662 }}
15663 return hashtable;
15664 }catch(e){
15665 if(Clazz_instanceOf(e,CloneNotSupportedException)){
15666 return null;
15667 }else{
15668 throw e;
15669 }
15670 }
15671 });
15672 Clazz_defineMethod(c$,"computeMaxSize",
15673 ($fz=function(){
15674 this.threshold=Math.round((this.elementData.length*this.loadFactor));
15675 },$fz.isPrivate=true,$fz));
15676 Clazz_defineMethod(c$,"contains",
15677 function(value){
15678 if(value==null){
15679 throw new NullPointerException();
15680 }for(var i=this.elementData.length;--i>=0;){
15681 var entry=this.elementData[i];
15682 while(entry){
15683 if(value.equals(entry.value)){
15684 return true;
15685 }entry=entry.next;
15686 }
15687 }
15688 return false;
15689 },"~O");
15690 Clazz_overrideMethod(c$,"containsKey",
15691 function(key){
15692         if(!key.hashCode)  {
15693           key.hashCode = function(){return 1};
15694           if (!key.equals)
15695                 key.equals = function(a) {return this == a};
15696         }
15697 return this.getEntry(key)!=null ;
15698 },"~O");
15699 Clazz_overrideMethod(c$,"containsValue",
15700 function(value){
15701 return this.contains(value);
15702 },"~O");
15703 Clazz_overrideMethod(c$,"elements",
15704 function(){
15705 if(this.elementCount==0){
15706 return java.util.Hashtable.EMPTY_ENUMERATION;
15707 }
15708 return new java.util.HashtableEnumerator(false, this);
15709 });
15710 Clazz_overrideMethod(c$,"entrySet",
15711 function(){
15712 return new java.util.HashtableEntrySet(this);
15713 });
15714 Clazz_overrideMethod(c$,"equals",
15715 function(object){
15716 if(this===object){
15717 return true;
15718 }if(Clazz_instanceOf(object,java.util.Map)){
15719 var map=object;
15720 if(this.size()!=map.size()){
15721 return false;
15722 }var entries=this.entrySet();
15723 for(var e,$e=map.entrySet().iterator();$e.hasNext()&&((e=$e.next())||true);){
15724 if(!entries.contains(e)){
15725 return false;
15726 }}
15727 return true;
15728 }return false;
15729 },"~O");
15730 Clazz_overrideMethod(c$,"get",
15731 function(key){
15732         if(!key.hashCode) { 
15733           key.hashCode = function(){return 1};
15734         if (!key.equals)
15735                 key.equals = function(a) {return this == a};
15736         }
15737 var hash=key.hashCode();
15738 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15739 var entry=this.elementData[index];
15740 while(entry){
15741 if(entry.equalsKey(key,hash)){
15742 return entry.value;
15743 }entry=entry.next;
15744 }
15745 return null;
15746 },"~O");
15747 Clazz_defineMethod(c$,"getEntry",
15748 function(key){
15749 var hash=key.hashCode();
15750 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15751 var entry=this.elementData[index];
15752 while(entry){
15753 if(entry.equalsKey(key,hash)){
15754 return entry;
15755 }entry=entry.next;
15756 }
15757 return null;
15758 },"~O");
15759 Clazz_overrideMethod(c$,"hashCode",
15760 function(){
15761 var result=0;
15762 var it=this.entrySet().iterator();
15763 while(it.hasNext()){
15764 var entry=it.next();
15765 var key=entry.getKey();
15766 var value=entry.getValue();
15767 var hash=(key!==this?key.hashCode():0)^(value!==this?(value!=null?value.hashCode():0):0);
15768 result+=hash;
15769 }
15770 return result;
15771 });
15772 Clazz_overrideMethod(c$,"isEmpty",
15773 function(){
15774 return this.elementCount==0;
15775 });
15776 Clazz_overrideMethod(c$,"keys",
15777 function(){
15778 if(this.elementCount==0){
15779 return java.util.Hashtable.EMPTY_ENUMERATION;
15780 }
15781 return new java.util.HashtableEnumerator(true, this); 
15782 });
15783 Clazz_overrideMethod(c$,"keySet",
15784 function(){
15785 return new java.util.HashtableKeySet(this);
15786 });
15787 Clazz_overrideMethod(c$,"put",
15788 function(key,value){
15789 if(key!=null&&value!=null){
15790         if(!key.hashCode)  {
15791           key.hashCode = function(){return 1};
15792           if (!key.equals)
15793                 key.equals = function(a) {return this == a};
15794         }
15795         var hash=key.hashCode();
15796         var index=(hash&0x7FFFFFFF)%this.elementData.length;
15797         var entry=this.elementData[index];
15798         while(entry!=null&&!entry.equalsKey(key,hash)){
15799         entry=entry.next;
15800 }
15801 if(entry==null){
15802 this.modCount++;
15803 if(++this.elementCount>this.threshold){
15804 this.rehash();
15805 index=(hash&0x7FFFFFFF)%this.elementData.length;
15806 }if(index<this.firstSlot){
15807 this.firstSlot=index;
15808 }if(index>this.lastSlot){
15809 this.lastSlot=index;
15810 }
15811
15812 entry=java.util.Hashtable.newEntry(key,value,hash);
15813 entry.next=this.elementData[index];
15814 this.elementData[index]=entry;
15815 return null;
15816 }var result=entry.value;
15817 entry.value=value;
15818 return result;
15819 }throw new NullPointerException();
15820 },"~O,~O");
15821 Clazz_overrideMethod(c$,"putAll",
15822 function(map){
15823 for(var entry,$entry=map.entrySet().iterator();$entry.hasNext()&&((entry=$entry.next())||true);){
15824 this.put(entry.getKey(),entry.getValue());
15825 }
15826 },"java.util.Map");
15827
15828 Clazz_defineMethod(c$,"rehash",
15829 function(){
15830 var length=(this.elementData.length<<1)+1;
15831 if(length==0){
15832 length=1;
15833 }var newFirst=length;
15834 var newLast=-1;
15835 var newData=this.newElementArray(length);
15836 for(var i=this.lastSlot+1;--i>=this.firstSlot;){
15837 var entry=this.elementData[i];
15838 while(entry!=null){
15839 var index=(entry.getKeyHash()&0x7FFFFFFF)%length;
15840 if(index<newFirst){
15841 newFirst=index;
15842 }if(index>newLast){
15843 newLast=index;
15844 }var next=entry.next;
15845 entry.next=newData[index];
15846 newData[index]=entry;
15847 entry=next;
15848 }
15849 }
15850 this.firstSlot=newFirst;
15851 this.lastSlot=newLast;
15852 this.elementData=newData;
15853 this.computeMaxSize();
15854 });
15855 Clazz_overrideMethod(c$,"remove",
15856 function(key){
15857 var hash=key.hashCode();
15858 var index=(hash&0x7FFFFFFF)%this.elementData.length;
15859 var last=null;
15860 var entry=this.elementData[index];
15861 while(entry!=null&&!entry.equalsKey(key,hash)){
15862 last=entry;
15863 entry=entry.next;
15864 }
15865 if(entry!=null){
15866 this.modCount++;
15867 if(last==null){
15868 this.elementData[index]=entry.next;
15869 }else{
15870 last.next=entry.next;
15871 }this.elementCount--;
15872 var result=entry.value;
15873 entry.value=null;
15874 return result;
15875 }return null;
15876 },"~O");
15877 Clazz_overrideMethod(c$,"size",
15878 function(){
15879 return this.elementCount;
15880 });
15881 Clazz_overrideMethod(c$,"toString",
15882 function(){
15883 if(this.isEmpty()){
15884 return"{}";
15885 }var buffer=new StringBuilder(this.size()*28);
15886 buffer.append('{');
15887 for(var i=this.lastSlot;i>=this.firstSlot;i--){
15888 var entry=this.elementData[i];
15889 while(entry!=null){
15890 if(entry.key!==this){
15891 buffer.append(entry.key);
15892 }else{
15893 buffer.append("(this Map)");
15894 }buffer.append('=');
15895 if(entry.value!==this){
15896 buffer.append(entry.value);
15897 }else{
15898 buffer.append("(this Map)");
15899 }buffer.append(", ");
15900 entry=entry.next;
15901 }
15902 }
15903 if(this.elementCount>0){
15904 buffer.setLength(buffer.length()-2);
15905 }buffer.append('}');
15906 return buffer.toString();
15907 });
15908 Clazz_overrideMethod(c$,"values",
15909 function(){
15910 return new java.util.HashtableValueCollection(this);
15911 });
15912 java.util.Hashtable.EMPTY_ENUMERATION = new java.util.HashtableEnumerator();
15913 });
15914 c$=Clazz_declareType(java.util,"Dictionary");
15915 Clazz_makeConstructor(c$,
15916 function(){
15917 });
15918 Clazz_declarePackage ("java.net");
15919 Clazz_load (["java.io.IOException"], "java.net.MalformedURLException", null, function () {
15920 c$ = Clazz_declareType (java.net, "MalformedURLException", java.io.IOException);
15921 Clazz_makeConstructor (c$, 
15922 function () {
15923 Clazz_superConstructor (this, java.net.MalformedURLException, []);
15924 });
15925 });
15926 Clazz_declarePackage ("java.awt");
15927 Clazz_load (null, "java.awt.GraphicsEnvironment", ["swingjs.JSToolkit"], function () {
15928 c$ = Clazz_declareType (java.awt, "GraphicsEnvironment");
15929 Clazz_makeConstructor (c$, 
15930 function () {
15931 });
15932 c$.getLocalGraphicsEnvironment = Clazz_defineMethod (c$, "getLocalGraphicsEnvironment", 
15933 function () {
15934 if (java.awt.GraphicsEnvironment.localEnv == null) {
15935 java.awt.GraphicsEnvironment.localEnv = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsEnvironment");
15936 }return java.awt.GraphicsEnvironment.localEnv;
15937 });
15938 c$.isHeadless = Clazz_defineMethod (c$, "isHeadless", 
15939 function () {
15940 return false;
15941 });
15942 c$.getHeadlessProperty = Clazz_defineMethod (c$, "getHeadlessProperty", 
15943  function () {
15944 return false;
15945 });
15946 c$.checkHeadless = Clazz_defineMethod (c$, "checkHeadless", 
15947 function () {
15948 });
15949 Clazz_defineMethod (c$, "isHeadlessInstance", 
15950 function () {
15951 return java.awt.GraphicsEnvironment.getHeadlessProperty ();
15952 });
15953 Clazz_defineMethod (c$, "registerFont", 
15954 function (font) {
15955 return true;
15956 }, "java.awt.Font");
15957 Clazz_defineMethod (c$, "preferLocaleFonts", 
15958 function () {
15959 });
15960 Clazz_defineMethod (c$, "preferProportionalFonts", 
15961 function () {
15962 });
15963 Clazz_defineMethod (c$, "getCenterPoint", 
15964 function () {
15965 return null;
15966 });
15967 Clazz_defineStatics (c$,
15968 "localEnv", null);
15969 });
15970 Clazz_declarePackage ("java.awt.event");
15971 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.WindowEvent", ["java.awt.Window", "jssun.awt.AppContext", "$.SunToolkit"], function () {
15972 c$ = Clazz_decorateAsClass (function () {
15973 this.opposite = null;
15974 this.oldState = 0;
15975 this.newState = 0;
15976 Clazz_instantialize (this, arguments);
15977 }, java.awt.event, "WindowEvent", java.awt.event.ComponentEvent);
15978 Clazz_makeConstructor (c$, 
15979 function (source, id, opposite, oldState, newState) {
15980 Clazz_superConstructor (this, java.awt.event.WindowEvent, [source, id]);
15981 this.opposite = opposite;
15982 this.oldState = oldState;
15983 this.newState = newState;
15984 }, "java.awt.Window,~N,java.awt.Window,~N,~N");
15985 Clazz_makeConstructor (c$, 
15986 function (source, id, opposite) {
15987 this.construct (source, id, opposite, 0, 0);
15988 }, "java.awt.Window,~N,java.awt.Window");
15989 Clazz_makeConstructor (c$, 
15990 function (source, id, oldState, newState) {
15991 this.construct (source, id, null, oldState, newState);
15992 }, "java.awt.Window,~N,~N,~N");
15993 Clazz_makeConstructor (c$, 
15994 function (source, id) {
15995 this.construct (source, id, null, 0, 0);
15996 }, "java.awt.Window,~N");
15997 Clazz_defineMethod (c$, "getWindow", 
15998 function () {
15999 return (Clazz_instanceOf (this.source, java.awt.Window)) ? this.source : null;
16000 });
16001 Clazz_defineMethod (c$, "getOppositeWindow", 
16002 function () {
16003 if (this.opposite == null) {
16004 return null;
16005 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
16006 });
16007 Clazz_defineMethod (c$, "getOldState", 
16008 function () {
16009 return this.oldState;
16010 });
16011 Clazz_defineMethod (c$, "getNewState", 
16012 function () {
16013 return this.newState;
16014 });
16015 Clazz_overrideMethod (c$, "paramString", 
16016 function () {
16017 var typeStr;
16018 switch (this.id) {
16019 case 200:
16020 typeStr = "WINDOW_OPENED";
16021 break;
16022 case 201:
16023 typeStr = "WINDOW_CLOSING";
16024 break;
16025 case 202:
16026 typeStr = "WINDOW_CLOSED";
16027 break;
16028 case 203:
16029 typeStr = "WINDOW_ICONIFIED";
16030 break;
16031 case 204:
16032 typeStr = "WINDOW_DEICONIFIED";
16033 break;
16034 case 205:
16035 typeStr = "WINDOW_ACTIVATED";
16036 break;
16037 case 206:
16038 typeStr = "WINDOW_DEACTIVATED";
16039 break;
16040 case 207:
16041 typeStr = "WINDOW_GAINED_FOCUS";
16042 break;
16043 case 208:
16044 typeStr = "WINDOW_LOST_FOCUS";
16045 break;
16046 case 209:
16047 typeStr = "WINDOW_STATE_CHANGED";
16048 break;
16049 default:
16050 typeStr = "unknown type";
16051 }
16052 typeStr += ",opposite=" + this.getOppositeWindow () + ",oldState=" + this.oldState + ",newState=" + this.newState;
16053 return typeStr;
16054 });
16055 Clazz_defineStatics (c$,
16056 "WINDOW_FIRST", 200,
16057 "WINDOW_OPENED", 200,
16058 "WINDOW_CLOSING", 201,
16059 "WINDOW_CLOSED", 202,
16060 "WINDOW_ICONIFIED", 203,
16061 "WINDOW_DEICONIFIED", 204,
16062 "WINDOW_ACTIVATED", 205,
16063 "WINDOW_DEACTIVATED", 206,
16064 "WINDOW_GAINED_FOCUS", 207,
16065 "WINDOW_LOST_FOCUS", 208,
16066 "WINDOW_STATE_CHANGED", 209,
16067 "WINDOW_LAST", 209);
16068 });
16069 Clazz_declarePackage ("javax.swing");
16070 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 () {
16071 c$ = Clazz_decorateAsClass (function () {
16072 this.isAlignmentXSet = false;
16073 this.alignmentX = 0;
16074 this.isAlignmentYSet = false;
16075 this.alignmentY = 0;
16076 this.ui = null;
16077 this.listenerList = null;
16078 this.clientProperties = null;
16079 this.autoscrolls = false;
16080 this.border = null;
16081 this.flags = 0;
16082 this.verifyInputWhenFocusTarget = true;
16083 this.paintingChild = null;
16084 this.popupMenu = null;
16085 this.focusInputMap = null;
16086 this.ancestorInputMap = null;
16087 this.windowInputMap = null;
16088 this.actionMap = null;
16089 if (!Clazz_isClassDefined ("javax.swing.JComponent.ActionStandin")) {
16090 javax.swing.JComponent.$JComponent$ActionStandin$ ();
16091 }
16092 Clazz_instantialize (this, arguments);
16093 }, javax.swing, "JComponent", java.awt.Container);
16094 Clazz_prepareFields (c$, function () {
16095 this.listenerList =  new javax.swing.event.EventListenerList ();
16096 });
16097 c$.safelyGetGraphics = Clazz_defineMethod (c$, "safelyGetGraphics", 
16098 function (c, root) {
16099 {
16100 javax.swing.JComponent.componentObtainingGraphicsFrom = root;
16101 var g = c.getGraphics ();
16102 javax.swing.JComponent.componentObtainingGraphicsFrom = null;
16103 return g;
16104 }}, "java.awt.Component,java.awt.Component");
16105 c$.getGraphicsInvoked = Clazz_defineMethod (c$, "getGraphicsInvoked", 
16106 function (root) {
16107 if (!javax.swing.JComponent.isComponentObtainingGraphicsFrom (root)) {
16108 var rootPane = (root).getRootPane ();
16109 if (rootPane != null) {
16110 rootPane.disableTrueDoubleBuffering ();
16111 }}}, "java.awt.Component");
16112 c$.isComponentObtainingGraphicsFrom = Clazz_defineMethod (c$, "isComponentObtainingGraphicsFrom", 
16113  function (c) {
16114 {
16115 return (javax.swing.JComponent.componentObtainingGraphicsFrom === c);
16116 }}, "java.awt.Component");
16117 c$.getManagingFocusForwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusForwardTraversalKeys", 
16118 function () {
16119 {
16120 if (javax.swing.JComponent.managingFocusForwardTraversalKeys == null) {
16121 javax.swing.JComponent.managingFocusForwardTraversalKeys =  new java.util.HashSet (1);
16122 javax.swing.JComponent.managingFocusForwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 2));
16123 }}return javax.swing.JComponent.managingFocusForwardTraversalKeys;
16124 });
16125 c$.getManagingFocusBackwardTraversalKeys = Clazz_defineMethod (c$, "getManagingFocusBackwardTraversalKeys", 
16126 function () {
16127 {
16128 if (javax.swing.JComponent.managingFocusBackwardTraversalKeys == null) {
16129 javax.swing.JComponent.managingFocusBackwardTraversalKeys =  new java.util.HashSet (1);
16130 javax.swing.JComponent.managingFocusBackwardTraversalKeys.add (javax.swing.KeyStroke.getKeyStroke (9, 3));
16131 }}return javax.swing.JComponent.managingFocusBackwardTraversalKeys;
16132 });
16133 c$.fetchRectangle = Clazz_defineMethod (c$, "fetchRectangle", 
16134  function () {
16135 {
16136 var rect;
16137 var size = javax.swing.JComponent.tempRectangles.size ();
16138 if (size > 0) {
16139 rect = javax.swing.JComponent.tempRectangles.remove (size - 1);
16140 } else {
16141 rect =  new java.awt.Rectangle (0, 0, 0, 0);
16142 }return rect;
16143 }});
16144 c$.recycleRectangle = Clazz_defineMethod (c$, "recycleRectangle", 
16145  function (rect) {
16146 {
16147 javax.swing.JComponent.tempRectangles.add (rect);
16148 }}, "java.awt.Rectangle");
16149 Clazz_defineMethod (c$, "setInheritsPopupMenu", 
16150 function (value) {
16151 var oldValue = this.getFlag (23);
16152 this.setFlag (23, value);
16153 this.firePropertyChangeBool ("inheritsPopupMenu", oldValue, value);
16154 }, "~B");
16155 Clazz_defineMethod (c$, "getInheritsPopupMenu", 
16156 function () {
16157 return this.getFlag (23);
16158 });
16159 Clazz_defineMethod (c$, "setComponentPopupMenu", 
16160 function (popup) {
16161 if (popup != null) {
16162 this.enableEvents (16);
16163 }var oldPopup = this.popupMenu;
16164 this.popupMenu = popup;
16165 this.firePropertyChangeObject ("componentPopupMenu", oldPopup, popup);
16166 }, "javax.swing.JPopupMenu");
16167 Clazz_defineMethod (c$, "getComponentPopupMenu", 
16168 function () {
16169 if (!this.getInheritsPopupMenu ()) {
16170 return this.popupMenu;
16171 }if (this.popupMenu == null) {
16172 var parent = this.getParent ();
16173 while (parent != null) {
16174 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16175 return (parent).getComponentPopupMenu ();
16176 }if (Clazz_instanceOf (parent, java.awt.Window) || Clazz_instanceOf (parent, java.applet.Applet)) {
16177 break;
16178 }parent = parent.getParent ();
16179 }
16180 return null;
16181 }return this.popupMenu;
16182 });
16183 Clazz_makeConstructor (c$, 
16184 function () {
16185 Clazz_superConstructor (this, javax.swing.JComponent);
16186 this.enableEvents (8);
16187 Clazz_superCall (this, javax.swing.JComponent, "setLocale", [javax.swing.JComponent.getDefaultLocale ()]);
16188 });
16189 Clazz_defineMethod (c$, "updateUI", 
16190 function () {
16191 });
16192 Clazz_defineMethod (c$, "setUI", 
16193 function (newUI) {
16194 this.uninstallUIAndProperties ();
16195 this.ui = newUI;
16196 if (this.ui != null) {
16197 this.ui.installUI (this);
16198 }this.revalidate ();
16199 this.repaint ();
16200 }, "javax.swing.plaf.ComponentUI");
16201 Clazz_defineMethod (c$, "getUI", 
16202 function () {
16203 return this.ui;
16204 });
16205 Clazz_defineMethod (c$, "uninstallUIAndProperties", 
16206  function () {
16207 if (this.ui != null) {
16208 this.ui.uninstallUI (this);
16209 }});
16210 Clazz_defineMethod (c$, "getUIClassID", 
16211 function () {
16212 return "ComponentUI";
16213 });
16214 Clazz_defineMethod (c$, "getComponentGraphics", 
16215 function (g) {
16216 var componentGraphics = g;
16217 componentGraphics.setColor (this.getForeground ());
16218 componentGraphics.setFont (this.getFont ());
16219 return componentGraphics;
16220 }, "java.awt.Graphics");
16221 Clazz_defineMethod (c$, "paintComponent", 
16222 function (g) {
16223 if (this.ui != null) {
16224 var scratchGraphics = (g == null) ? null : g.createSwingJS ();
16225 try {
16226 this.ui.update (scratchGraphics, this);
16227 } finally {
16228 scratchGraphics.dispose ();
16229 }
16230 }}, "java.awt.Graphics");
16231 Clazz_defineMethod (c$, "paintChildren", 
16232 function (g) {
16233 var isJComponent;
16234 var sg = g;
16235 {
16236 var i = this.getComponentCount () - 1;
16237 if (i < 0) {
16238 return;
16239 }if (this.paintingChild != null && (Clazz_instanceOf (this.paintingChild, javax.swing.JComponent))) {
16240 for (; i >= 0; i--) {
16241 if (this.getComponent (i) === this.paintingChild) {
16242 break;
16243 }}
16244 }var tmpRect = javax.swing.JComponent.fetchRectangle ();
16245 for (; i >= 0; i--) {
16246 var comp = this.getComponent (i);
16247 isJComponent = (Clazz_instanceOf (comp, javax.swing.JComponent));
16248 if (comp != null && (isJComponent || javax.swing.JComponent.isLightweightComponent (comp)) && (comp.isVisible () == true)) {
16249 var cr = comp.getBounds (tmpRect);
16250 var cg = sg.create4 (cr.x, cr.y, cr.width, cr.height);
16251 cg.setColor (comp.getForeground ());
16252 cg.setFont (comp.getFont ());
16253 var shouldSetFlagBack = false;
16254 try {
16255 if (isJComponent) {
16256 (comp).paint (cg);
16257 } else {
16258 comp.paint (cg);
16259 }} finally {
16260 cg.dispose ();
16261 if (shouldSetFlagBack) {
16262 (comp).setFlag (1, false);
16263 (comp).setFlag (2, false);
16264 }}
16265 }}
16266 javax.swing.JComponent.recycleRectangle (tmpRect);
16267 }}, "java.awt.Graphics");
16268 Clazz_defineMethod (c$, "paintBorder", 
16269 function (g) {
16270 var border = this.getBorder ();
16271 if (border != null) {
16272 border.paintBorder (this, g, 0, 0, this.getWidth (), this.getHeight ());
16273 }}, "java.awt.Graphics");
16274 Clazz_overrideMethod (c$, "update", 
16275 function (g) {
16276 this.paint (g);
16277 }, "java.awt.Graphics");
16278 Clazz_overrideMethod (c$, "paint", 
16279 function (g) {
16280 var shouldClearPaintFlags = false;
16281 if ((this.getWidth () <= 0) || (this.getHeight () <= 0)) {
16282 return;
16283 }var componentGraphics = this.getComponentGraphics (g);
16284 var co = componentGraphics.createSwingJS ();
16285 try {
16286 if (this.getParent () != null && !(Clazz_instanceOf (this.getParent (), javax.swing.JComponent))) {
16287 this.adjustPaintFlags ();
16288 shouldClearPaintFlags = true;
16289 }this.paintComponent (co);
16290 this.paintBorder (co);
16291 this.paintChildren (co);
16292 } finally {
16293 co.dispose ();
16294 if (shouldClearPaintFlags) {
16295 this.setFlag (1, false);
16296 this.setFlag (2, false);
16297 this.setFlag (11, false);
16298 this.setFlag (12, false);
16299 }}
16300 }, "java.awt.Graphics");
16301 Clazz_defineMethod (c$, "paintForceDoubleBuffered", 
16302 function (g) {
16303 var rm = javax.swing.RepaintManager.currentManager (this);
16304 var clip = g.getClipBounds ();
16305 rm.beginPaint ();
16306 this.setFlag (13, true);
16307 try {
16308 rm.paint (this, this, g, clip.x, clip.y, clip.width, clip.height);
16309 } finally {
16310 rm.endPaint ();
16311 this.setFlag (13, false);
16312 }
16313 }, "java.awt.Graphics");
16314 Clazz_defineMethod (c$, "isPainting", 
16315 function () {
16316 var component = this;
16317 while (component != null) {
16318 if (Clazz_instanceOf (component, javax.swing.JComponent) && (component).getFlag (1)) {
16319 return true;
16320 }component = component.getParent ();
16321 }
16322 return false;
16323 });
16324 Clazz_defineMethod (c$, "adjustPaintFlags", 
16325  function () {
16326 var jparent = null;
16327 var parent;
16328 for (parent = this.getParent (); parent != null; parent = parent.getParent ()) {
16329 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16330 jparent = parent;
16331 if (jparent.getFlag (1)) this.setFlag (1, true);
16332 if (jparent.getFlag (2)) this.setFlag (2, true);
16333 if (jparent.getFlag (11)) this.setFlag (11, true);
16334 if (jparent.getFlag (12)) this.setFlag (12, true);
16335 break;
16336 }}
16337 });
16338 Clazz_overrideMethod (c$, "printAll", 
16339 function (g) {
16340 this.setFlag (12, true);
16341 try {
16342 this.print (g);
16343 } finally {
16344 this.setFlag (12, false);
16345 }
16346 }, "java.awt.Graphics");
16347 Clazz_overrideMethod (c$, "print", 
16348 function (g) {
16349 this.setFlag (11, true);
16350 this.firePropertyChangeBool ("paintingForPrint", false, true);
16351 try {
16352 this.paint (g);
16353 } finally {
16354 this.setFlag (11, false);
16355 this.firePropertyChangeBool ("paintingForPrint", true, false);
16356 }
16357 }, "java.awt.Graphics");
16358 Clazz_defineMethod (c$, "printComponent", 
16359 function (g) {
16360 this.paintComponent (g);
16361 }, "java.awt.Graphics");
16362 Clazz_defineMethod (c$, "printChildren", 
16363 function (g) {
16364 this.paintChildren (g);
16365 }, "java.awt.Graphics");
16366 Clazz_defineMethod (c$, "printBorder", 
16367 function (g) {
16368 this.paintBorder (g);
16369 }, "java.awt.Graphics");
16370 Clazz_defineMethod (c$, "isPaintingTile", 
16371 function () {
16372 return this.getFlag (2);
16373 });
16374 Clazz_defineMethod (c$, "isPaintingForPrint", 
16375 function () {
16376 return this.getFlag (11);
16377 });
16378 Clazz_defineMethod (c$, "isManagingFocus", 
16379 function () {
16380 return false;
16381 });
16382 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16383  function () {
16384 this.registerNextFocusableComponent (this.getNextFocusableComponent ());
16385 });
16386 Clazz_defineMethod (c$, "registerNextFocusableComponent", 
16387  function (nextFocusableComponent) {
16388 if (nextFocusableComponent == null) {
16389 return;
16390 }}, "java.awt.Component");
16391 Clazz_defineMethod (c$, "deregisterNextFocusableComponent", 
16392  function () {
16393 var nextFocusableComponent = this.getNextFocusableComponent ();
16394 if (nextFocusableComponent == null) {
16395 return;
16396 }var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16397 if (nearestRoot == null) {
16398 return;
16399 }});
16400 Clazz_defineMethod (c$, "setNextFocusableComponent", 
16401 function (aComponent) {
16402 var displayable = this.isDisplayable ();
16403 if (displayable) {
16404 this.deregisterNextFocusableComponent ();
16405 }this.putClientProperty ("nextFocus", aComponent);
16406 if (displayable) {
16407 this.registerNextFocusableComponent (aComponent);
16408 }}, "java.awt.Component");
16409 Clazz_defineMethod (c$, "getNextFocusableComponent", 
16410 function () {
16411 return this.getClientProperty ("nextFocus");
16412 });
16413 Clazz_defineMethod (c$, "setRequestFocusEnabled", 
16414 function (requestFocusEnabled) {
16415 this.setFlag (22, !requestFocusEnabled);
16416 }, "~B");
16417 Clazz_defineMethod (c$, "isRequestFocusEnabled", 
16418 function () {
16419 return !this.getFlag (22);
16420 });
16421 Clazz_defineMethod (c$, "requestFocus", 
16422 function (temporary) {
16423 Clazz_superCall (this, javax.swing.JComponent, "requestFocus", []);
16424 return true;
16425 }, "~B");
16426 Clazz_defineMethod (c$, "requestFocusInWindow", 
16427 function (temporary) {
16428 return Clazz_superCall (this, javax.swing.JComponent, "requestFocusInWindow", []);
16429 }, "~B");
16430 Clazz_defineMethod (c$, "grabFocus", 
16431 function () {
16432 this.requestFocus ();
16433 });
16434 Clazz_defineMethod (c$, "setVerifyInputWhenFocusTarget", 
16435 function (verifyInputWhenFocusTarget) {
16436 var oldVerifyInputWhenFocusTarget = this.verifyInputWhenFocusTarget;
16437 this.verifyInputWhenFocusTarget = verifyInputWhenFocusTarget;
16438 this.firePropertyChangeBool ("verifyInputWhenFocusTarget", oldVerifyInputWhenFocusTarget, verifyInputWhenFocusTarget);
16439 }, "~B");
16440 Clazz_defineMethod (c$, "getVerifyInputWhenFocusTarget", 
16441 function () {
16442 return this.verifyInputWhenFocusTarget;
16443 });
16444 Clazz_overrideMethod (c$, "getFontMetrics", 
16445 function (font) {
16446 return jssun.font.FontDesignMetrics.getMetrics (font);
16447 }, "java.awt.Font");
16448 Clazz_overrideMethod (c$, "getPreferredSize", 
16449 function () {
16450 return this.getPrefSizeJComp ();
16451 });
16452 Clazz_defineMethod (c$, "getPrefSizeJComp", 
16453 function () {
16454 var size = (this.isPreferredSizeSet () || this.ui == null ? null : this.ui.getPreferredSize (this));
16455 return (size == null ? this.preferredSize () : size);
16456 });
16457 Clazz_defineMethod (c$, "getMaximumSize", 
16458 function () {
16459 if (this.isMaximumSizeSet ()) {
16460 return Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16461 }var size = null;
16462 if (this.ui != null) {
16463 size = this.ui.getMaximumSize (this);
16464 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMaximumSize", []);
16465 });
16466 Clazz_defineMethod (c$, "getMinimumSize", 
16467 function () {
16468 if (this.isMinimumSizeSet ()) {
16469 return Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16470 }var size = null;
16471 if (this.ui != null) {
16472 size = this.ui.getMinimumSize (this);
16473 }return (size != null) ? size : Clazz_superCall (this, javax.swing.JComponent, "getMinimumSize", []);
16474 });
16475 Clazz_overrideMethod (c$, "contains", 
16476 function (x, y) {
16477 return (this.ui != null) ? this.ui.contains (this, x, y) : this.inside (x, y);
16478 }, "~N,~N");
16479 Clazz_defineMethod (c$, "setBorder", 
16480 function (border) {
16481 var oldBorder = this.border;
16482 this.border = border;
16483 this.firePropertyChangeObject ("border", oldBorder, border);
16484 if (border !== oldBorder) {
16485 if (border == null || oldBorder == null || !(border.getBorderInsets (this).equals (oldBorder.getBorderInsets (this)))) {
16486 this.revalidate ();
16487 }this.repaint ();
16488 }}, "javax.swing.border.Border");
16489 Clazz_defineMethod (c$, "getBorder", 
16490 function () {
16491 return this.border;
16492 });
16493 Clazz_defineMethod (c$, "getInsets", 
16494 function () {
16495 if (this.border != null) {
16496 return this.border.getBorderInsets (this);
16497 }return Clazz_superCall (this, javax.swing.JComponent, "getInsets", []);
16498 });
16499 Clazz_defineMethod (c$, "getInsets", 
16500 function (insets) {
16501 if (insets == null) {
16502 insets =  new java.awt.Insets (0, 0, 0, 0);
16503 }if (this.border != null) {
16504 if (Clazz_instanceOf (this.border, javax.swing.border.AbstractBorder)) {
16505 return (this.border).getBorderInsets (this, insets);
16506 } else {
16507 return this.border.getBorderInsets (this);
16508 }} else {
16509 insets.left = insets.top = insets.right = insets.bottom = 0;
16510 return insets;
16511 }}, "java.awt.Insets");
16512 Clazz_defineMethod (c$, "getAlignmentY", 
16513 function () {
16514 if (this.isAlignmentYSet) {
16515 return this.alignmentY;
16516 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentY", []);
16517 });
16518 Clazz_defineMethod (c$, "setAlignmentY", 
16519 function (alignmentY) {
16520 this.alignmentY = alignmentY > 1.0 ? 1.0 : alignmentY < 0.0 ? 0.0 : alignmentY;
16521 this.isAlignmentYSet = true;
16522 }, "~N");
16523 Clazz_defineMethod (c$, "getAlignmentX", 
16524 function () {
16525 if (this.isAlignmentXSet) {
16526 return this.alignmentX;
16527 }return Clazz_superCall (this, javax.swing.JComponent, "getAlignmentX", []);
16528 });
16529 Clazz_defineMethod (c$, "setAlignmentX", 
16530 function (alignmentX) {
16531 this.alignmentX = alignmentX > 1.0 ? 1.0 : alignmentX < 0.0 ? 0.0 : alignmentX;
16532 this.isAlignmentXSet = true;
16533 }, "~N");
16534 Clazz_defineMethod (c$, "setInputVerifier", 
16535 function (inputVerifier) {
16536 var oldInputVerifier = this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16537 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER, inputVerifier);
16538 this.firePropertyChangeObject ("inputVerifier", oldInputVerifier, inputVerifier);
16539 }, "javax.swing.InputVerifier");
16540 Clazz_defineMethod (c$, "getInputVerifier", 
16541 function () {
16542 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_INPUT_VERIFIER);
16543 });
16544 Clazz_defineMethod (c$, "registerKeyboardAction", 
16545 function (anAction, aCommand, aKeyStroke, aCondition) {
16546 var inputMap = this.getInputMap (aCondition, true);
16547 if (inputMap != null) {
16548 var actionMap = this.getActionMap (true);
16549 var action = Clazz_innerTypeInstance (javax.swing.JComponent.ActionStandin, this, null, anAction, aCommand);
16550 inputMap.put (aKeyStroke, action);
16551 if (actionMap != null) {
16552 actionMap.put (action, action);
16553 }}}, "java.awt.event.ActionListener,~S,javax.swing.KeyStroke,~N");
16554 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16555  function (onlyIfNew) {
16556 var inputMap = this.getInputMap (2, false);
16557 var strokes;
16558 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16559 if (inputMap != null) {
16560 strokes = inputMap.allKeys ();
16561 if (strokes != null) {
16562 for (var counter = strokes.length - 1; counter >= 0; counter--) {
16563 if (!onlyIfNew || registered == null || registered.get (strokes[counter]) == null) {
16564 this.registerWithKeyboardManager (strokes[counter]);
16565 }if (registered != null) {
16566 registered.remove (strokes[counter]);
16567 }}
16568 }} else {
16569 strokes = null;
16570 }if (registered != null && registered.size () > 0) {
16571 var keys = registered.keys ();
16572 while (keys.hasMoreElements ()) {
16573 var ks = keys.nextElement ();
16574 this.unregisterWithKeyboardManager (ks);
16575 }
16576 registered.clear ();
16577 }if (strokes != null && strokes.length > 0) {
16578 if (registered == null) {
16579 registered =  new java.util.Hashtable (strokes.length);
16580 this.putClientProperty ("_WhenInFocusedWindow", registered);
16581 }for (var counter = strokes.length - 1; counter >= 0; counter--) {
16582 registered.put (strokes[counter], strokes[counter]);
16583 }
16584 } else {
16585 this.putClientProperty ("_WhenInFocusedWindow", null);
16586 }}, "~B");
16587 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16588  function () {
16589 var registered = this.getClientProperty ("_WhenInFocusedWindow");
16590 if (registered != null && registered.size () > 0) {
16591 var keys = registered.keys ();
16592 while (keys.hasMoreElements ()) {
16593 var ks = keys.nextElement ();
16594 this.unregisterWithKeyboardManager (ks);
16595 }
16596 }this.putClientProperty ("_WhenInFocusedWindow", null);
16597 });
16598 Clazz_defineMethod (c$, "componentInputMapChanged", 
16599 function (inputMap) {
16600 var km = this.getInputMap (2, false);
16601 while (km !== inputMap && km != null) {
16602 km = km.getParent ();
16603 }
16604 if (km != null) {
16605 this.registerWithKeyboardManager (false);
16606 }}, "javax.swing.ComponentInputMap");
16607 Clazz_defineMethod (c$, "registerWithKeyboardManager", 
16608  function (aKeyStroke) {
16609 javax.swing.KeyboardManager.getCurrentManager ().registerKeyStroke (aKeyStroke, this);
16610 }, "javax.swing.KeyStroke");
16611 Clazz_defineMethod (c$, "unregisterWithKeyboardManager", 
16612  function (aKeyStroke) {
16613 javax.swing.KeyboardManager.getCurrentManager ().unregisterKeyStroke (aKeyStroke, this);
16614 }, "javax.swing.KeyStroke");
16615 Clazz_defineMethod (c$, "registerKeyboardAction", 
16616 function (anAction, aKeyStroke, aCondition) {
16617 this.registerKeyboardAction (anAction, null, aKeyStroke, aCondition);
16618 }, "java.awt.event.ActionListener,javax.swing.KeyStroke,~N");
16619 Clazz_defineMethod (c$, "unregisterKeyboardAction", 
16620 function (aKeyStroke) {
16621 var am = this.getActionMap (false);
16622 for (var counter = 0; counter < 3; counter++) {
16623 var km = this.getInputMap (counter, false);
16624 if (km != null) {
16625 var actionID = km.get (aKeyStroke);
16626 if (am != null && actionID != null) {
16627 am.remove (actionID);
16628 }km.remove (aKeyStroke);
16629 }}
16630 }, "javax.swing.KeyStroke");
16631 Clazz_defineMethod (c$, "getRegisteredKeyStrokes", 
16632 function () {
16633 var counts =  Clazz_newIntArray (3, 0);
16634 var strokes =  new Array (3);
16635 for (var counter = 0; counter < 3; counter++) {
16636 var km = this.getInputMap (counter, false);
16637 strokes[counter] = (km != null) ? km.allKeys () : null;
16638 counts[counter] = (strokes[counter] != null) ? strokes[counter].length : 0;
16639 }
16640 var retValue =  new Array (counts[0] + counts[1] + counts[2]);
16641 for (var counter = 0, last = 0; counter < 3; counter++) {
16642 if (counts[counter] > 0) {
16643 System.arraycopy (strokes[counter], 0, retValue, last, counts[counter]);
16644 last += counts[counter];
16645 }}
16646 return retValue;
16647 });
16648 Clazz_defineMethod (c$, "getConditionForKeyStroke", 
16649 function (aKeyStroke) {
16650 for (var counter = 0; counter < 3; counter++) {
16651 var inputMap = this.getInputMap (counter, false);
16652 if (inputMap != null && inputMap.get (aKeyStroke) != null) {
16653 return counter;
16654 }}
16655 return -1;
16656 }, "javax.swing.KeyStroke");
16657 Clazz_defineMethod (c$, "getActionForKeyStroke", 
16658 function (aKeyStroke) {
16659 var am = this.getActionMap (false);
16660 if (am == null) {
16661 return null;
16662 }for (var counter = 0; counter < 3; counter++) {
16663 var inputMap = this.getInputMap (counter, false);
16664 if (inputMap != null) {
16665 var actionBinding = inputMap.get (aKeyStroke);
16666 if (actionBinding != null) {
16667 var action = am.get (actionBinding);
16668 if (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin)) {
16669 return (action).actionListener;
16670 }return action;
16671 }}}
16672 return null;
16673 }, "javax.swing.KeyStroke");
16674 Clazz_defineMethod (c$, "resetKeyboardActions", 
16675 function () {
16676 for (var counter = 0; counter < 3; counter++) {
16677 var inputMap = this.getInputMap (counter, false);
16678 if (inputMap != null) {
16679 inputMap.clear ();
16680 }}
16681 var am = this.getActionMap (false);
16682 if (am != null) {
16683 am.clear ();
16684 }});
16685 Clazz_defineMethod (c$, "setInputMap", 
16686 function (condition, map) {
16687 switch (condition) {
16688 case 2:
16689 if (map != null && !(Clazz_instanceOf (map, javax.swing.ComponentInputMap))) {
16690 throw  new IllegalArgumentException ("WHEN_IN_FOCUSED_WINDOW InputMaps must be of type ComponentInputMap");
16691 }this.windowInputMap = map;
16692 this.setFlag (7, true);
16693 this.registerWithKeyboardManager (false);
16694 break;
16695 case 1:
16696 this.ancestorInputMap = map;
16697 this.setFlag (6, true);
16698 break;
16699 case 0:
16700 this.focusInputMap = map;
16701 this.setFlag (5, true);
16702 break;
16703 default:
16704 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16705 }
16706 }, "~N,javax.swing.InputMap");
16707 Clazz_defineMethod (c$, "getInputMap", 
16708 function (condition) {
16709 return this.getInputMap (condition, true);
16710 }, "~N");
16711 Clazz_defineMethod (c$, "getInputMap", 
16712 function () {
16713 return this.getInputMap (0, true);
16714 });
16715 Clazz_defineMethod (c$, "setActionMap", 
16716 function (am) {
16717 this.actionMap = am;
16718 this.setFlag (8, true);
16719 }, "javax.swing.ActionMap");
16720 Clazz_defineMethod (c$, "getActionMap", 
16721 function () {
16722 return this.getActionMap (true);
16723 });
16724 Clazz_defineMethod (c$, "getInputMap", 
16725 function (condition, create) {
16726 switch (condition) {
16727 case 0:
16728 if (this.getFlag (5)) {
16729 return this.focusInputMap;
16730 }if (create) {
16731 var km =  new javax.swing.InputMap ();
16732 this.setInputMap (condition, km);
16733 return km;
16734 }break;
16735 case 1:
16736 if (this.getFlag (6)) {
16737 return this.ancestorInputMap;
16738 }if (create) {
16739 var km =  new javax.swing.InputMap ();
16740 this.setInputMap (condition, km);
16741 return km;
16742 }break;
16743 case 2:
16744 if (this.getFlag (7)) {
16745 return this.windowInputMap;
16746 }if (create) {
16747 var km =  new javax.swing.ComponentInputMap (this);
16748 this.setInputMap (condition, km);
16749 return km;
16750 }break;
16751 default:
16752 throw  new IllegalArgumentException ("condition must be one of JComponent.WHEN_IN_FOCUSED_WINDOW, JComponent.WHEN_FOCUSED or JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT");
16753 }
16754 return null;
16755 }, "~N,~B");
16756 Clazz_defineMethod (c$, "getActionMap", 
16757 function (create) {
16758 {
16759 (arguments.length == 0) && (create = true);
16760 }if (this.getFlag (8)) {
16761 return this.actionMap;
16762 }if (create) {
16763 var am =  new javax.swing.ActionMap ();
16764 this.setActionMap (am);
16765 return am;
16766 }return null;
16767 }, "~B");
16768 Clazz_defineMethod (c$, "getBaseline", 
16769 function (width, height) {
16770 Clazz_superCall (this, javax.swing.JComponent, "getBaseline", [width, height]);
16771 if (this.ui != null) {
16772 return this.ui.getBaseline (this, width, height);
16773 }return -1;
16774 }, "~N,~N");
16775 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
16776 function () {
16777 if (this.ui != null) {
16778 return this.ui.getBaselineResizeBehavior (this);
16779 }return java.awt.Component.BaselineResizeBehavior.OTHER;
16780 });
16781 Clazz_defineMethod (c$, "requestDefaultFocus", 
16782 function () {
16783 var nearestRoot = (this.isFocusCycleRoot ()) ? this : this.getFocusCycleRootAncestor ();
16784 if (nearestRoot == null) {
16785 return false;
16786 }return false;
16787 });
16788 Clazz_defineMethod (c$, "setVisible", 
16789 function (aFlag) {
16790 if (aFlag != this.isVisible ()) {
16791 Clazz_superCall (this, javax.swing.JComponent, "setVisible", [aFlag]);
16792 var parent = this.getParent ();
16793 if (parent != null) {
16794 var r = this.getBounds ();
16795 parent.repaint (r.x, r.y, r.width, r.height);
16796 }this.revalidate ();
16797 }}, "~B");
16798 Clazz_defineMethod (c$, "setEnabled", 
16799 function (enabled) {
16800 var oldEnabled = this.isEnabled ();
16801 Clazz_superCall (this, javax.swing.JComponent, "setEnabled", [enabled]);
16802 this.firePropertyChangeBool ("enabled", oldEnabled, enabled);
16803 if (enabled != oldEnabled) {
16804 this.repaint ();
16805 }}, "~B");
16806 Clazz_defineMethod (c$, "setForeground", 
16807 function (fg) {
16808 var oldFg = this.getForeground ();
16809 Clazz_superCall (this, javax.swing.JComponent, "setForeground", [fg]);
16810 if ((oldFg != null) ? !oldFg.equals (fg) : ((fg != null) && !fg.equals (oldFg))) {
16811 this.repaint ();
16812 }}, "java.awt.Color");
16813 Clazz_defineMethod (c$, "setBackground", 
16814 function (bg) {
16815 var oldBg = this.getBackground ();
16816 Clazz_superCall (this, javax.swing.JComponent, "setBackground", [bg]);
16817 if ((oldBg != null) ? !oldBg.equals (bg) : ((bg != null) && !bg.equals (oldBg))) {
16818 this.repaint ();
16819 }}, "java.awt.Color");
16820 Clazz_defineMethod (c$, "setFont", 
16821 function (font) {
16822 var oldFont = this.getFont ();
16823 Clazz_superCall (this, javax.swing.JComponent, "setFont", [font]);
16824 if (font !== oldFont) {
16825 this.revalidate ();
16826 this.repaint ();
16827 }}, "java.awt.Font");
16828 c$.getDefaultLocale = Clazz_defineMethod (c$, "getDefaultLocale", 
16829 function () {
16830 var l = javax.swing.SwingUtilities.appContextGet ("JComponent.defaultLocale");
16831 if (l == null) {
16832 l = java.util.Locale.getDefault ();
16833 javax.swing.JComponent.setDefaultLocale (l);
16834 }return l;
16835 });
16836 c$.setDefaultLocale = Clazz_defineMethod (c$, "setDefaultLocale", 
16837 function (l) {
16838 javax.swing.SwingUtilities.appContextPut ("JComponent.defaultLocale", l);
16839 }, "java.util.Locale");
16840 Clazz_defineMethod (c$, "processComponentKeyEvent", 
16841 function (e) {
16842 }, "java.awt.event.KeyEvent");
16843 Clazz_defineMethod (c$, "processKeyEvent", 
16844 function (e) {
16845 var shouldProcessKey;
16846 Clazz_superCall (this, javax.swing.JComponent, "processKeyEvent", [e]);
16847 if (!e.isConsumed ()) {
16848 this.processComponentKeyEvent (e);
16849 }shouldProcessKey = javax.swing.JComponent.KeyboardState.shouldProcess (e);
16850 if (e.isConsumed ()) {
16851 return;
16852 }if (shouldProcessKey && this.processKeyBindings (e, e.getID () == 401)) {
16853 e.consume ();
16854 }}, "java.awt.event.KeyEvent");
16855 Clazz_defineMethod (c$, "processKeyBinding", 
16856 function (ks, e, condition, pressed) {
16857 var map = this.getInputMap (condition, false);
16858 var am = this.getActionMap (false);
16859 if (map != null && am != null && this.isEnabled ()) {
16860 var binding = map.get (ks);
16861 var action = (binding == null) ? null : am.get (binding);
16862 if (action != null) {
16863 return javax.swing.SwingUtilities.notifyAction (action, ks, e, this, e.getModifiers ());
16864 }}return false;
16865 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
16866 Clazz_defineMethod (c$, "processKeyBindings", 
16867 function (e, pressed) {
16868 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (e)) {
16869 return false;
16870 }var ks;
16871 if (e.getID () == 400) {
16872 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
16873 } else {
16874 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), (pressed ? false : true));
16875 }if (this.processKeyBinding (ks, e, 0, pressed)) return true;
16876 var parent = this;
16877 while (parent != null && !(Clazz_instanceOf (parent, java.awt.Window)) && !(Clazz_instanceOf (parent, java.applet.Applet))) {
16878 if (Clazz_instanceOf (parent, javax.swing.JComponent)) {
16879 if ((parent).processKeyBinding (ks, e, 1, pressed)) return true;
16880 }parent = parent.getParent ();
16881 }
16882 if (parent != null) {
16883 return javax.swing.JComponent.processKeyBindingsForAllComponents (e, parent, pressed);
16884 }return false;
16885 }, "java.awt.event.KeyEvent,~B");
16886 c$.processKeyBindingsForAllComponents = Clazz_defineMethod (c$, "processKeyBindingsForAllComponents", 
16887 function (e, container, pressed) {
16888 while (true) {
16889 if (javax.swing.KeyboardManager.getCurrentManager ().fireKeyboardAction (e, pressed, container)) {
16890 return true;
16891 }if (Clazz_instanceOf (container, javax.swing.Popup.HeavyWeightWindow)) {
16892 container = (container).getOwner ();
16893 } else {
16894 return false;
16895 }}
16896 }, "java.awt.event.KeyEvent,java.awt.Container,~B");
16897 Clazz_defineMethod (c$, "setToolTipText", 
16898 function (text) {
16899 this.putClientProperty ("ToolTipText", text);
16900 }, "~S");
16901 Clazz_defineMethod (c$, "getToolTipText", 
16902 function () {
16903 return this.getClientProperty ("ToolTipText");
16904 });
16905 Clazz_defineMethod (c$, "getToolTipText", 
16906 function (event) {
16907 return this.getToolTipText ();
16908 }, "java.awt.event.MouseEvent");
16909 Clazz_defineMethod (c$, "getToolTipLocation", 
16910 function (event) {
16911 return null;
16912 }, "java.awt.event.MouseEvent");
16913 Clazz_defineMethod (c$, "getPopupLocation", 
16914 function (event) {
16915 return null;
16916 }, "java.awt.event.MouseEvent");
16917 Clazz_defineMethod (c$, "createToolTip", 
16918 function () {
16919 var tip =  new javax.swing.JToolTip ();
16920 tip.setComponent (this);
16921 return tip;
16922 });
16923 Clazz_defineMethod (c$, "scrollRectToVisible", 
16924 function (aRect) {
16925 var parent;
16926 var dx = this.getX ();
16927 var dy = this.getY ();
16928 for (parent = this.getParent (); !(parent == null) && !(Clazz_instanceOf (parent, javax.swing.JComponent)) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane)); parent = parent.getParent ()) {
16929 var bounds = parent.getBounds ();
16930 dx += bounds.x;
16931 dy += bounds.y;
16932 }
16933 if (!(parent == null) && !(Clazz_instanceOf (parent, javax.swing.CellRendererPane))) {
16934 aRect.x += dx;
16935 aRect.y += dy;
16936 (parent).scrollRectToVisible (aRect);
16937 aRect.x -= dx;
16938 aRect.y -= dy;
16939 }}, "java.awt.Rectangle");
16940 Clazz_defineMethod (c$, "setAutoscrolls", 
16941 function (autoscrolls) {
16942 }, "~B");
16943 Clazz_defineMethod (c$, "getAutoscrolls", 
16944 function () {
16945 return this.autoscrolls;
16946 });
16947 Clazz_defineMethod (c$, "superProcessMouseMotionEvent", 
16948 function (e) {
16949 Clazz_superCall (this, javax.swing.JComponent, "processMouseMotionEvent", [e]);
16950 }, "java.awt.event.MouseEvent");
16951 Clazz_defineMethod (c$, "setCreatedDoubleBuffer", 
16952 function (newValue) {
16953 this.setFlag (9, newValue);
16954 }, "~B");
16955 Clazz_defineMethod (c$, "getCreatedDoubleBuffer", 
16956 function () {
16957 return this.getFlag (9);
16958 });
16959 Clazz_defineMethod (c$, "getClientProperties", 
16960  function () {
16961 if (this.clientProperties == null) {
16962 this.clientProperties =  new javax.swing.ArrayTable ();
16963 }return this.clientProperties;
16964 });
16965 Clazz_defineMethod (c$, "getClientProperty", 
16966 function (key) {
16967 if (this.clientProperties == null) {
16968 return null;
16969 } else {
16970 {
16971 return this.clientProperties.get (key);
16972 }}}, "~O");
16973 Clazz_defineMethod (c$, "putClientProperty", 
16974 function (key, value) {
16975 if (value == null && this.clientProperties == null) {
16976 return;
16977 }var clientProperties = this.getClientProperties ();
16978 var oldValue;
16979 {
16980 oldValue = clientProperties.get (key);
16981 if (value != null) {
16982 clientProperties.put (key, value);
16983 } else if (oldValue != null) {
16984 clientProperties.remove (key);
16985 } else {
16986 return;
16987 }}this.clientPropertyChanged (key, oldValue, value);
16988 this.firePropertyChangeObject (key.toString (), oldValue, value);
16989 }, "~O,~O");
16990 Clazz_defineMethod (c$, "clientPropertyChanged", 
16991 function (key, oldValue, newValue) {
16992 }, "~O,~O,~O");
16993 Clazz_defineMethod (c$, "setUIProperty", 
16994 function (propertyName, value) {
16995 if (propertyName === "opaque") {
16996 if (!this.getFlag (24)) {
16997 this.setOpaque ((value).booleanValue ());
16998 this.setFlag (24, false);
16999 }} else if (propertyName === "autoscrolls") {
17000 if (!this.getFlag (25)) {
17001 this.setAutoscrolls ((value).booleanValue ());
17002 this.setFlag (25, false);
17003 }} else if (propertyName === "focusTraversalKeysForward") {
17004 } else if (propertyName === "focusTraversalKeysBackward") {
17005 } else {
17006 System.out.println (swingjs.JSToolkit.getClassName (this) + " property \"" + propertyName + "\" cannot be set using this method" + swingjs.JSToolkit.getStackTrace (5));
17007 }}, "~S,~O");
17008 c$.isLightweightComponent = Clazz_defineMethod (c$, "isLightweightComponent", 
17009 function (c) {
17010 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));
17011 }, "java.awt.Component");
17012 Clazz_overrideMethod (c$, "isOpaque", 
17013 function () {
17014 return this.getFlag (3);
17015 });
17016 Clazz_defineMethod (c$, "setOpaque", 
17017 function (isOpaque) {
17018 var oldValue = this.getFlag (3);
17019 this.setFlag (3, isOpaque);
17020 this.setFlag (24, true);
17021 this.firePropertyChangeBool ("opaque", oldValue, isOpaque);
17022 }, "~B");
17023 Clazz_defineMethod (c$, "rectangleIsObscured", 
17024 function (x, y, width, height) {
17025 var numChildren = this.getComponentCount ();
17026 for (var i = 0; i < numChildren; i++) {
17027 var child = this.getComponent (i);
17028 var cx;
17029 var cy;
17030 var cw;
17031 var ch;
17032 cx = child.getX ();
17033 cy = child.getY ();
17034 cw = child.getWidth ();
17035 ch = child.getHeight ();
17036 if (x >= cx && (x + width) <= (cx + cw) && y >= cy && (y + height) <= (cy + ch) && child.isVisible ()) {
17037 if (Clazz_instanceOf (child, javax.swing.JComponent)) {
17038 return (child).isOpaque ();
17039 } else {
17040 return false;
17041 }}}
17042 return false;
17043 }, "~N,~N,~N,~N");
17044 c$.computeVisibleRect = Clazz_defineMethod (c$, "computeVisibleRect", 
17045 function (c, visibleRect) {
17046 var p = c.getParent ();
17047 var bounds = c.getBounds ();
17048 if (p == null || Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17049 visibleRect.reshape (0, 0, bounds.width, bounds.height);
17050 } else {
17051 javax.swing.JComponent.computeVisibleRect (p, visibleRect);
17052 visibleRect.x -= bounds.x;
17053 visibleRect.y -= bounds.y;
17054 javax.swing.SwingUtilities.computeIntersection (0, 0, bounds.width, bounds.height, visibleRect);
17055 }}, "java.awt.Component,java.awt.Rectangle");
17056 Clazz_defineMethod (c$, "computeVisibleRect", 
17057 function (visibleRect) {
17058 javax.swing.JComponent.computeVisibleRect (this, visibleRect);
17059 }, "java.awt.Rectangle");
17060 Clazz_defineMethod (c$, "getVisibleRect", 
17061 function () {
17062 var visibleRect =  new java.awt.Rectangle ();
17063 this.computeVisibleRect (visibleRect);
17064 return visibleRect;
17065 });
17066 Clazz_defineMethod (c$, "getTopLevelAncestor", 
17067 function () {
17068 for (var p = this; p != null; p = p.getParent ()) {
17069 if (Clazz_instanceOf (p, java.awt.Window) || Clazz_instanceOf (p, java.applet.Applet)) {
17070 return p;
17071 }}
17072 return null;
17073 });
17074 Clazz_defineMethod (c$, "getAncestorNotifier", 
17075  function () {
17076 return this.getClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER);
17077 });
17078 Clazz_defineMethod (c$, "addAncestorListener", 
17079 function (listener) {
17080 var ancestorNotifier = this.getAncestorNotifier ();
17081 if (ancestorNotifier == null) {
17082 ancestorNotifier =  new javax.swing.AncestorNotifier (this);
17083 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, ancestorNotifier);
17084 }ancestorNotifier.addAncestorListener (listener);
17085 }, "javax.swing.event.AncestorListener");
17086 Clazz_defineMethod (c$, "removeAncestorListener", 
17087 function (listener) {
17088 var ancestorNotifier = this.getAncestorNotifier ();
17089 if (ancestorNotifier == null) {
17090 return;
17091 }ancestorNotifier.removeAncestorListener (listener);
17092 if (ancestorNotifier.listenerList.getListenerList ().length == 0) {
17093 ancestorNotifier.removeAllListeners ();
17094 this.putClientProperty (javax.swing.ClientPropertyKey.JComponent_ANCESTOR_NOTIFIER, null);
17095 }}, "javax.swing.event.AncestorListener");
17096 Clazz_defineMethod (c$, "getAncestorListeners", 
17097 function () {
17098 var ancestorNotifier = this.getAncestorNotifier ();
17099 if (ancestorNotifier == null) {
17100 return  new Array (0);
17101 }return ancestorNotifier.getAncestorListeners ();
17102 });
17103 Clazz_defineMethod (c$, "getListeners", 
17104 function (listenerType) {
17105 var result;
17106 if (listenerType === javax.swing.event.AncestorListener) {
17107 result = this.getAncestorListeners ();
17108 } else if (listenerType === java.beans.PropertyChangeListener) {
17109 result = this.getPropertyChangeListeners ();
17110 } else {
17111 result = this.listenerList.getListeners (listenerType);
17112 }if (result.length == 0) {
17113 return Clazz_superCall (this, javax.swing.JComponent, "getListeners", [listenerType]);
17114 }return result;
17115 }, "Class");
17116 Clazz_defineMethod (c$, "addNotify", 
17117 function () {
17118 Clazz_superCall (this, javax.swing.JComponent, "addNotify", []);
17119 this.firePropertyChangeObject ("ancestor", null, this.getParent ());
17120 this.registerWithKeyboardManager (false);
17121 this.registerNextFocusableComponent ();
17122 });
17123 Clazz_defineMethod (c$, "removeNotify", 
17124 function () {
17125 Clazz_superCall (this, javax.swing.JComponent, "removeNotify", []);
17126 this.firePropertyChangeObject ("ancestor", this.getParent (), null);
17127 this.unregisterWithKeyboardManager ();
17128 this.deregisterNextFocusableComponent ();
17129 if (this.getCreatedDoubleBuffer ()) {
17130 javax.swing.RepaintManager.currentManager (this).resetDoubleBuffer ();
17131 this.setCreatedDoubleBuffer (false);
17132 }});
17133 Clazz_defineMethod (c$, "repaint", 
17134 function (tm, x, y, width, height) {
17135 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
17136 }, "~N,~N,~N,~N,~N");
17137 Clazz_defineMethod (c$, "repaint", 
17138 function (r) {
17139 this.repaint (0, r.x, r.y, r.width, r.height);
17140 }, "java.awt.Rectangle");
17141 Clazz_defineMethod (c$, "revalidate", 
17142 function () {
17143 if (this.getParent () == null) {
17144 return;
17145 }if (javax.swing.SwingUtilities.isEventDispatchThread ()) {
17146 this.invalidate ();
17147 javax.swing.RepaintManager.currentManager (this).addInvalidComponent (this);
17148 } else {
17149 {
17150 if (this.getFlag (28)) {
17151 return;
17152 }this.setFlag (28, true);
17153 }var callRevalidate = ((Clazz_isClassDefined ("javax.swing.JComponent$2") ? 0 : javax.swing.JComponent.$JComponent$2$ ()), Clazz_innerTypeInstance (javax.swing.JComponent$2, this, null));
17154 javax.swing.SwingUtilities.invokeLater (callRevalidate);
17155 }});
17156 Clazz_defineMethod (c$, "isValidateRoot", 
17157 function () {
17158 return false;
17159 });
17160 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
17161 function () {
17162 return true;
17163 });
17164 Clazz_defineMethod (c$, "isPaintingOrigin", 
17165 function () {
17166 return false;
17167 });
17168 Clazz_defineMethod (c$, "paintImmediately", 
17169 function (x, y, w, h) {
17170 {
17171 if (arguments.length == 1) {
17172 var r = x;
17173 x = r.x;
17174 y = r.y;
17175 w = r.width;
17176 h = r.height;
17177 }
17178 }var c = this;
17179 var parent;
17180 if (!this.isShowing ()) {
17181 return;
17182 }while (!(c).isOpaque ()) {
17183 parent = c.getParent ();
17184 if (parent != null) {
17185 x += c.getX ();
17186 y += c.getY ();
17187 c = parent;
17188 } else {
17189 break;
17190 }if (!(Clazz_instanceOf (c, javax.swing.JComponent))) {
17191 break;
17192 }}
17193 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17194 (c)._paintImmediately (x, y, w, h);
17195 } else {
17196 c.repaint (x, y, w, h);
17197 }}, "~N,~N,~N,~N");
17198 Clazz_defineMethod (c$, "paintImmediately", 
17199 function (r) {
17200 this.paintImmediately (r.x, r.y, r.width, r.height);
17201 }, "java.awt.Rectangle");
17202 Clazz_defineMethod (c$, "alwaysOnTop", 
17203 function () {
17204 return false;
17205 });
17206 Clazz_defineMethod (c$, "setPaintingChild", 
17207 function (paintingChild) {
17208 this.paintingChild = paintingChild;
17209 }, "java.awt.Component");
17210 Clazz_defineMethod (c$, "_paintImmediately", 
17211 function (x, y, w, h) {
17212 var g;
17213 var c;
17214 var tmpX;
17215 var tmpY;
17216 var tmpWidth;
17217 var tmpHeight;
17218 var offsetX = 0;
17219 var offsetY = 0;
17220 var hasBuffer = false;
17221 var bufferedComponent = null;
17222 var paintingComponent = this;
17223 var path =  new java.util.ArrayList (7);
17224 var pIndex = -1;
17225 var pCount = 0;
17226 tmpX = tmpY = tmpWidth = tmpHeight = 0;
17227 var paintImmediatelyClip = javax.swing.JComponent.fetchRectangle ();
17228 paintImmediatelyClip.x = x;
17229 paintImmediatelyClip.y = y;
17230 paintImmediatelyClip.width = w;
17231 paintImmediatelyClip.height = h;
17232 var ontop = this.alwaysOnTop () && this.isOpaque ();
17233 if (ontop) {
17234 javax.swing.SwingUtilities.computeIntersection (0, 0, this.getWidth (), this.getHeight (), paintImmediatelyClip);
17235 if (paintImmediatelyClip.width == 0) {
17236 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17237 return;
17238 }}var child;
17239 for (c = this, child = null; c != null && !(Clazz_instanceOf (c, java.awt.Window)) && !(Clazz_instanceOf (c, java.applet.Applet)); child = c, c = c.getParent ()) {
17240 var jc = (Clazz_instanceOf (c, javax.swing.JComponent)) ? c : null;
17241 path.add (c);
17242 if (!ontop && jc != null && !jc.isOptimizedDrawingEnabled ()) {
17243 var resetPC;
17244 if (c !== this) {
17245 if (jc.isPaintingOrigin ()) {
17246 resetPC = true;
17247 } else {
17248 var children = c.getComponents ();
17249 var i = 0;
17250 for (; i < children.length; i++) {
17251 if (children[i] === child) break;
17252 }
17253 switch (jc.getObscuredState (i, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height)) {
17254 case 0:
17255 resetPC = false;
17256 break;
17257 case 2:
17258 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17259 return;
17260 default:
17261 resetPC = true;
17262 break;
17263 }
17264 }} else {
17265 resetPC = false;
17266 }if (resetPC) {
17267 paintingComponent = jc;
17268 pIndex = pCount;
17269 offsetX = offsetY = 0;
17270 hasBuffer = false;
17271 }}pCount++;
17272 if (!ontop) {
17273 var bx = c.getX ();
17274 var by = c.getY ();
17275 tmpWidth = c.getWidth ();
17276 tmpHeight = c.getHeight ();
17277 javax.swing.SwingUtilities.computeIntersection (tmpX, tmpY, tmpWidth, tmpHeight, paintImmediatelyClip);
17278 paintImmediatelyClip.x += bx;
17279 paintImmediatelyClip.y += by;
17280 offsetX += bx;
17281 offsetY += by;
17282 }}
17283 if (c == null || paintImmediatelyClip.width <= 0 || paintImmediatelyClip.height <= 0) {
17284 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17285 return;
17286 }paintingComponent.setFlag (13, true);
17287 paintImmediatelyClip.x -= offsetX;
17288 paintImmediatelyClip.y -= offsetY;
17289 if (paintingComponent !== this) {
17290 var comp;
17291 var i = pIndex;
17292 for (; i > 0; i--) {
17293 comp = path.get (i);
17294 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17295 (comp).setPaintingChild (path.get (i - 1));
17296 }}
17297 }try {
17298 g = javax.swing.JComponent.safelyGetGraphics (paintingComponent, c).createSwingJS ();
17299 try {
17300 if (hasBuffer) {
17301 var rm = javax.swing.RepaintManager.currentManager (bufferedComponent);
17302 rm.beginPaint ();
17303 try {
17304 rm.paint (paintingComponent, bufferedComponent, g, paintImmediatelyClip.x, paintImmediatelyClip.y, paintImmediatelyClip.width, paintImmediatelyClip.height);
17305 } finally {
17306 rm.endPaint ();
17307 }
17308 } else {
17309 paintingComponent.paint (g);
17310 }} finally {
17311 g.dispose ();
17312 }
17313 } finally {
17314 if (paintingComponent !== this) {
17315 var comp;
17316 var i = pIndex;
17317 for (; i > 0; i--) {
17318 comp = path.get (i);
17319 if (Clazz_instanceOf (comp, javax.swing.JComponent)) {
17320 (comp).setPaintingChild (null);
17321 }}
17322 }paintingComponent.setFlag (13, false);
17323 }
17324 javax.swing.JComponent.recycleRectangle (paintImmediatelyClip);
17325 }, "~N,~N,~N,~N");
17326 Clazz_defineMethod (c$, "paintToOffscreen", 
17327 function (g, x, y, w, h, maxX, maxY) {
17328 try {
17329 this.setFlag (1, true);
17330 if ((y + h) < maxY || (x + w) < maxX) {
17331 this.setFlag (2, true);
17332 }if (this.getFlag (13)) {
17333 this.paint (g);
17334 } else {
17335 if (!this.rectangleIsObscured (x, y, w, h)) {
17336 this.paintComponent (g);
17337 this.paintBorder (g);
17338 }this.paintChildren (g);
17339 }} finally {
17340 this.setFlag (1, false);
17341 this.setFlag (2, false);
17342 }
17343 }, "java.awt.Graphics,~N,~N,~N,~N,~N,~N");
17344 Clazz_defineMethod (c$, "getObscuredState", 
17345  function (compIndex, x, y, width, height) {
17346 var retValue = 0;
17347 var tmpRect = javax.swing.JComponent.fetchRectangle ();
17348 for (var i = compIndex - 1; i >= 0; i--) {
17349 var sibling = this.getComponent (i);
17350 if (!sibling.isVisible ()) {
17351 continue;
17352 }var siblingRect;
17353 var opaque;
17354 if (Clazz_instanceOf (sibling, javax.swing.JComponent)) {
17355 opaque = (sibling).isOpaque ();
17356 if (!opaque) {
17357 if (retValue == 1) {
17358 continue;
17359 }}} else {
17360 opaque = true;
17361 }siblingRect = sibling.getBounds (tmpRect);
17362 if (opaque && x >= siblingRect.x && (x + width) <= (siblingRect.x + siblingRect.width) && y >= siblingRect.y && (y + height) <= (siblingRect.y + siblingRect.height)) {
17363 javax.swing.JComponent.recycleRectangle (tmpRect);
17364 return 2;
17365 } else if (retValue == 0 && !((x + width <= siblingRect.x) || (y + height <= siblingRect.y) || (x >= siblingRect.x + siblingRect.width) || (y >= siblingRect.y + siblingRect.height))) {
17366 retValue = 1;
17367 }}
17368 javax.swing.JComponent.recycleRectangle (tmpRect);
17369 return retValue;
17370 }, "~N,~N,~N,~N,~N");
17371 Clazz_defineMethod (c$, "checkIfChildObscuredBySibling", 
17372 function () {
17373 return true;
17374 });
17375 Clazz_defineMethod (c$, "setFlag", 
17376  function (aFlag, aValue) {
17377 if (aValue) {
17378 this.flags |= (1 << aFlag);
17379 } else {
17380 this.flags &= ~(1 << aFlag);
17381 }}, "~N,~B");
17382 Clazz_defineMethod (c$, "getFlag", 
17383  function (aFlag) {
17384 var mask = (1 << aFlag);
17385 return ((this.flags & mask) == mask);
17386 }, "~N");
17387 Clazz_defineMethod (c$, "setDoubleBuffered", 
17388 function (aFlag) {
17389 }, "~B");
17390 Clazz_overrideMethod (c$, "isDoubleBuffered", 
17391 function () {
17392 return this.getFlag (0);
17393 });
17394 Clazz_defineMethod (c$, "getRootPane", 
17395 function () {
17396 return javax.swing.SwingUtilities.getRootPane (this);
17397 });
17398 Clazz_defineMethod (c$, "paramString", 
17399 function () {
17400 var preferredSizeString = (this.isPreferredSizeSet () ? this.getPreferredSize ().toString () : "");
17401 var minimumSizeString = (this.isMinimumSizeSet () ? this.getMinimumSize ().toString () : "");
17402 var maximumSizeString = (this.isMaximumSizeSet () ? this.getMaximumSize ().toString () : "");
17403 var borderString = (this.border == null ? "" : (this.border === this ? "this" : this.border.toString ()));
17404 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;
17405 });
17406 c$.$JComponent$ActionStandin$ = function () {
17407 Clazz_pu$h(self.c$);
17408 c$ = Clazz_decorateAsClass (function () {
17409 Clazz_prepareCallback (this, arguments);
17410 this.actionListener = null;
17411 this.command = null;
17412 this.action = null;
17413 Clazz_instantialize (this, arguments);
17414 }, javax.swing.JComponent, "ActionStandin", null, javax.swing.Action);
17415 Clazz_makeConstructor (c$, 
17416 function (a, b) {
17417 this.actionListener = a;
17418 if (Clazz_instanceOf (a, javax.swing.Action)) {
17419 this.action = a;
17420 } else {
17421 this.action = null;
17422 }this.command = b;
17423 }, "java.awt.event.ActionListener,~S");
17424 Clazz_defineMethod (c$, "getValue", 
17425 function (a) {
17426 if (a != null) {
17427 if (a.equals ("ActionCommandKey")) {
17428 return this.command;
17429 }if (this.action != null) {
17430 return this.action.getValue (a);
17431 }if (a.equals ("Name")) {
17432 return "ActionStandin";
17433 }}return null;
17434 }, "~S");
17435 Clazz_defineMethod (c$, "isEnabled", 
17436 function () {
17437 if (this.actionListener == null) {
17438 return false;
17439 }if (this.action == null) {
17440 return true;
17441 }return this.action.isEnabled ();
17442 });
17443 Clazz_defineMethod (c$, "actionPerformed", 
17444 function (a) {
17445 if (this.actionListener != null) {
17446 this.actionListener.actionPerformed (a);
17447 }}, "java.awt.event.ActionEvent");
17448 Clazz_overrideMethod (c$, "putValue", 
17449 function (a, b) {
17450 }, "~S,~O");
17451 Clazz_overrideMethod (c$, "setEnabled", 
17452 function (a) {
17453 }, "~B");
17454 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
17455 function (a) {
17456 }, "java.beans.PropertyChangeListener");
17457 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
17458 function (a) {
17459 }, "java.beans.PropertyChangeListener");
17460 c$ = Clazz_p0p ();
17461 };
17462 c$.$JComponent$2$ = function () {
17463 Clazz_pu$h(self.c$);
17464 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$2", null, Runnable);
17465 Clazz_overrideMethod (c$, "run", 
17466 function () {
17467 {
17468 this.b$["javax.swing.JComponent"].setFlag (28, false);
17469 }this.b$["javax.swing.JComponent"].revalidate ();
17470 });
17471 c$ = Clazz_p0p ();
17472 };
17473 c$.$JComponent$1$ = function () {
17474 Clazz_pu$h(self.c$);
17475 c$ = Clazz_declareAnonymous (javax.swing, "JComponent$1", null, jssun.awt.RequestFocusController);
17476 Clazz_overrideMethod (c$, "acceptRequestFocus", 
17477 function (from, to, temporary, focusedWindowChangeAllowed, cause) {
17478 if ((to == null) || !(Clazz_instanceOf (to, javax.swing.JComponent))) {
17479 return true;
17480 }if ((from == null) || !(Clazz_instanceOf (from, javax.swing.JComponent))) {
17481 return true;
17482 }var target = to;
17483 if (!target.getVerifyInputWhenFocusTarget ()) {
17484 return true;
17485 }var jFocusOwner = from;
17486 var iv = jFocusOwner.getInputVerifier ();
17487 if (iv == null) {
17488 return true;
17489 } else {
17490 var currentSource = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17491 if (currentSource === jFocusOwner) {
17492 return true;
17493 }javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, jFocusOwner);
17494 try {
17495 return iv.shouldYieldFocus (jFocusOwner);
17496 } finally {
17497 if (currentSource != null) {
17498 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY, currentSource);
17499 } else {
17500 javax.swing.SwingUtilities.appContextRemove (javax.swing.JComponent.INPUT_VERIFIER_SOURCE_KEY);
17501 }}
17502 }}, "java.awt.Component,java.awt.Component,~B,~B,jssun.awt.CausedFocusEvent.Cause");
17503 c$ = Clazz_p0p ();
17504 };
17505 Clazz_pu$h(self.c$);
17506 c$ = Clazz_decorateAsClass (function () {
17507 this.array = null;
17508 this.count = 0;
17509 this.capacity = 0;
17510 Clazz_instantialize (this, arguments);
17511 }, javax.swing.JComponent, "IntVector");
17512 Clazz_defineMethod (c$, "size", 
17513 function () {
17514 return this.count;
17515 });
17516 Clazz_defineMethod (c$, "elementAt", 
17517 function (a) {
17518 return this.array[a];
17519 }, "~N");
17520 Clazz_defineMethod (c$, "addElement", 
17521 function (a) {
17522 if (this.count == this.capacity) {
17523 this.capacity = (this.capacity + 2) * 2;
17524 var b =  Clazz_newIntArray (this.capacity, 0);
17525 if (this.count > 0) {
17526 System.arraycopy (this.array, 0, b, 0, this.count);
17527 }this.array = b;
17528 }this.array[this.count++] = a;
17529 }, "~N");
17530 Clazz_defineMethod (c$, "setElementAt", 
17531 function (a, b) {
17532 this.array[b] = a;
17533 }, "~N,~N");
17534 c$ = Clazz_p0p ();
17535 Clazz_pu$h(self.c$);
17536 c$ = Clazz_declareType (javax.swing.JComponent, "KeyboardState");
17537 c$.getKeyCodeArray = Clazz_defineMethod (c$, "getKeyCodeArray", 
17538 function () {
17539 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.JComponent.KeyboardState.keyCodesKey);
17540 if (a == null) {
17541 a =  new javax.swing.JComponent.IntVector ();
17542 javax.swing.SwingUtilities.appContextPut (javax.swing.JComponent.KeyboardState.keyCodesKey, a);
17543 }return a;
17544 });
17545 c$.registerKeyPressed = Clazz_defineMethod (c$, "registerKeyPressed", 
17546 function (a) {
17547 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17548 var c = b.size ();
17549 var d;
17550 for (d = 0; d < c; d++) {
17551 if (b.elementAt (d) == -1) {
17552 b.setElementAt (a, d);
17553 return;
17554 }}
17555 b.addElement (a);
17556 }, "~N");
17557 c$.registerKeyReleased = Clazz_defineMethod (c$, "registerKeyReleased", 
17558 function (a) {
17559 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17560 var c = b.size ();
17561 var d;
17562 for (d = 0; d < c; d++) {
17563 if (b.elementAt (d) == a) {
17564 b.setElementAt (-1, d);
17565 return;
17566 }}
17567 }, "~N");
17568 c$.keyIsPressed = Clazz_defineMethod (c$, "keyIsPressed", 
17569 function (a) {
17570 var b = javax.swing.JComponent.KeyboardState.getKeyCodeArray ();
17571 var c = b.size ();
17572 var d;
17573 for (d = 0; d < c; d++) {
17574 if (b.elementAt (d) == a) {
17575 return true;
17576 }}
17577 return false;
17578 }, "~N");
17579 c$.shouldProcess = Clazz_defineMethod (c$, "shouldProcess", 
17580 function (a) {
17581 switch (a.getID ()) {
17582 case 401:
17583 if (!javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ())) {
17584 javax.swing.JComponent.KeyboardState.registerKeyPressed (a.getKeyCode ());
17585 }return true;
17586 case 402:
17587 if (javax.swing.JComponent.KeyboardState.keyIsPressed (a.getKeyCode ()) || a.getKeyCode () == 154) {
17588 javax.swing.JComponent.KeyboardState.registerKeyReleased (a.getKeyCode ());
17589 return true;
17590 }return false;
17591 case 400:
17592 return true;
17593 default:
17594 return false;
17595 }
17596 }, "java.awt.event.KeyEvent");
17597 c$.keyCodesKey = c$.prototype.keyCodesKey = javax.swing.JComponent.KeyboardState;
17598 c$ = Clazz_p0p ();
17599 Clazz_defineStatics (c$,
17600 "uiClassID", "ComponentUI",
17601 "managingFocusForwardTraversalKeys", null,
17602 "managingFocusBackwardTraversalKeys", null,
17603 "NOT_OBSCURED", 0,
17604 "PARTIALLY_OBSCURED", 1,
17605 "COMPLETELY_OBSCURED", 2,
17606 "DEBUG_GRAPHICS_LOADED", false);
17607 c$.INPUT_VERIFIER_SOURCE_KEY = c$.prototype.INPUT_VERIFIER_SOURCE_KEY =  new Clazz._O ();
17608 Clazz_defineStatics (c$,
17609 "WHEN_FOCUSED", 0,
17610 "WHEN_ANCESTOR_OF_FOCUSED_COMPONENT", 1,
17611 "WHEN_IN_FOCUSED_WINDOW", 2,
17612 "UNDEFINED_CONDITION", -1,
17613 "WHEN_IN_FOCUSED_WINDOW_BINDINGS", "_WhenInFocusedWindow",
17614 "TOOL_TIP_TEXT_KEY", "ToolTipText",
17615 "NEXT_FOCUS", "nextFocus",
17616 "IS_DOUBLE_BUFFERED", 0,
17617 "ANCESTOR_USING_BUFFER", 1,
17618 "IS_PAINTING_TILE", 2,
17619 "IS_OPAQUE", 3,
17620 "FOCUS_INPUTMAP_CREATED", 5,
17621 "ANCESTOR_INPUTMAP_CREATED", 6,
17622 "WIF_INPUTMAP_CREATED", 7,
17623 "ACTIONMAP_CREATED", 8,
17624 "CREATED_DOUBLE_BUFFER", 9,
17625 "IS_PRINTING", 11,
17626 "IS_PRINTING_ALL", 12,
17627 "IS_REPAINTING", 13,
17628 "REQUEST_FOCUS_DISABLED", 22,
17629 "INHERITS_POPUP_MENU", 23,
17630 "OPAQUE_SET", 24,
17631 "AUTOSCROLLS_SET", 25,
17632 "REVALIDATE_RUNNABLE_SCHEDULED", 28);
17633 c$.tempRectangles = c$.prototype.tempRectangles =  new java.util.ArrayList (11);
17634 Clazz_defineStatics (c$,
17635 "defaultLocale", "JComponent.defaultLocale",
17636 "componentObtainingGraphicsFrom", null);
17637 c$.componentObtainingGraphicsFromLock = c$.prototype.componentObtainingGraphicsFromLock =  new Clazz._O ();
17638 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));
17639 });
17640 Clazz_declarePackage ("javax.swing");
17641 Clazz_load (["java.awt.event.ActionListener"], "javax.swing.Action", null, function () {
17642 c$ = Clazz_declareInterface (javax.swing, "Action", java.awt.event.ActionListener);
17643 Clazz_defineStatics (c$,
17644 "DEFAULT", "Default",
17645 "NAME", "Name",
17646 "SHORT_DESCRIPTION", "ShortDescription",
17647 "LONG_DESCRIPTION", "LongDescription",
17648 "SMALL_ICON", "SmallIcon",
17649 "ACTION_COMMAND_KEY", "ActionCommandKey",
17650 "ACCELERATOR_KEY", "AcceleratorKey",
17651 "MNEMONIC_KEY", "MnemonicKey",
17652 "SELECTED_KEY", "SwingSelectedKey",
17653 "DISPLAYED_MNEMONIC_INDEX_KEY", "SwingDisplayedMnemonicIndexKey",
17654 "LARGE_ICON_KEY", "SwingLargeIconKey");
17655 });
17656 Clazz_declarePackage ("javax.swing");
17657 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 () {
17658 c$ = Clazz_declareType (javax.swing, "SwingUtilities", null, javax.swing.SwingConstants);
17659 c$.installSwingDropTargetAsNecessary = Clazz_defineMethod (c$, "installSwingDropTargetAsNecessary", 
17660 function (c, t) {
17661 }, "java.awt.Component,javax.swing.TransferHandler");
17662 c$.isRectangleContainingRectangle = Clazz_defineMethod (c$, "isRectangleContainingRectangle", 
17663 function (a, b) {
17664 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)) {
17665 return true;
17666 }return false;
17667 }, "java.awt.Rectangle,java.awt.Rectangle");
17668 c$.getLocalBounds = Clazz_defineMethod (c$, "getLocalBounds", 
17669 function (aComponent) {
17670 var b =  new java.awt.Rectangle (aComponent.getBounds ());
17671 b.x = b.y = 0;
17672 return b;
17673 }, "java.awt.Component");
17674 c$.getWindowAncestor = Clazz_defineMethod (c$, "getWindowAncestor", 
17675 function (c) {
17676 for (var p = c.getParent (); p != null; p = p.getParent ()) {
17677 if (Clazz_instanceOf (p, java.awt.Window)) {
17678 return p;
17679 }}
17680 return null;
17681 }, "java.awt.Component");
17682 c$.convertScreenLocationToParent = Clazz_defineMethod (c$, "convertScreenLocationToParent", 
17683 function (parent, x, y) {
17684 for (var p = parent; p != null; p = p.getParent ()) {
17685 if (Clazz_instanceOf (p, java.awt.Window)) {
17686 var point =  new java.awt.Point (x, y);
17687 javax.swing.SwingUtilities.convertPointFromScreen (point, parent);
17688 return point;
17689 }}
17690 throw  new Error ("convertScreenLocationToParent: no window ancestor");
17691 }, "java.awt.Container,~N,~N");
17692 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17693 function (source, aPoint, destination) {
17694 var p;
17695 if (source == null && destination == null) return aPoint;
17696 if (source == null) {
17697 source = javax.swing.SwingUtilities.getWindowAncestor (destination);
17698 if (source == null) throw  new Error ("Source component not connected to component tree hierarchy");
17699 }p =  new java.awt.Point (aPoint);
17700 javax.swing.SwingUtilities.convertPointToScreen (p, source);
17701 if (destination == null) {
17702 destination = javax.swing.SwingUtilities.getWindowAncestor (source);
17703 if (destination == null) throw  new Error ("Destination component not connected to component tree hierarchy");
17704 }javax.swing.SwingUtilities.convertPointFromScreen (p, destination);
17705 return p;
17706 }, "java.awt.Component,java.awt.Point,java.awt.Component");
17707 c$.convertPoint = Clazz_defineMethod (c$, "convertPoint", 
17708 function (source, x, y, destination) {
17709 var point =  new java.awt.Point (x, y);
17710 return javax.swing.SwingUtilities.convertPoint (source, point, destination);
17711 }, "java.awt.Component,~N,~N,java.awt.Component");
17712 c$.convertRectangle = Clazz_defineMethod (c$, "convertRectangle", 
17713 function (source, aRectangle, destination) {
17714 var point =  new java.awt.Point (aRectangle.x, aRectangle.y);
17715 point = javax.swing.SwingUtilities.convertPoint (source, point, destination);
17716 return  new java.awt.Rectangle (point.x, point.y, aRectangle.width, aRectangle.height);
17717 }, "java.awt.Component,java.awt.Rectangle,java.awt.Component");
17718 c$.getAncestorOfClass = Clazz_defineMethod (c$, "getAncestorOfClass", 
17719 function (c, comp) {
17720 if (comp == null || c == null) return null;
17721 var parent = comp.getParent ();
17722 while (parent != null && !(c.isInstance (parent))) parent = parent.getParent ();
17723
17724 return parent;
17725 }, "Class,java.awt.Component");
17726 c$.getAncestorNamed = Clazz_defineMethod (c$, "getAncestorNamed", 
17727 function (name, comp) {
17728 if (comp == null || name == null) return null;
17729 var parent = comp.getParent ();
17730 while (parent != null && !(name.equals (parent.getName ()))) parent = parent.getParent ();
17731
17732 return parent;
17733 }, "~S,java.awt.Component");
17734 c$.getDeepestComponentAt = Clazz_defineMethod (c$, "getDeepestComponentAt", 
17735 function (parent, x, y) {
17736 if (!parent.contains (x, y)) {
17737 return null;
17738 }if (Clazz_instanceOf (parent, java.awt.Container)) {
17739 var components = (parent).getComponents ();
17740 for (var i = 0; i < components.length; i++) {
17741 var comp = components[i];
17742 if (comp != null && comp.isVisible ()) {
17743 var loc = comp.getLocation ();
17744 if (Clazz_instanceOf (comp, java.awt.Container)) {
17745 comp = javax.swing.SwingUtilities.getDeepestComponentAt (comp, x - loc.x, y - loc.y);
17746 } else {
17747 comp = comp.getComponentAt (x - loc.x, y - loc.y);
17748 }if (comp != null && comp.isVisible ()) {
17749 return comp;
17750 }}}
17751 }return parent;
17752 }, "java.awt.Component,~N,~N");
17753 c$.convertMouseEvent = Clazz_defineMethod (c$, "convertMouseEvent", 
17754 function (source, sourceEvent, destination) {
17755 var p = javax.swing.SwingUtilities.convertPoint (source,  new java.awt.Point (sourceEvent.getX (), sourceEvent.getY ()), destination);
17756 var newSource;
17757 if (destination != null) newSource = destination;
17758  else newSource = source;
17759 var newEvent;
17760 if (Clazz_instanceOf (sourceEvent, java.awt.event.MouseWheelEvent)) {
17761 var sourceWheelEvent = sourceEvent;
17762 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 ());
17763 } else if (Clazz_instanceOf (sourceEvent, javax.swing.event.MenuDragMouseEvent)) {
17764 var sourceMenuDragEvent = sourceEvent;
17765 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 ());
17766 } else {
17767 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);
17768 }return newEvent;
17769 }, "java.awt.Component,java.awt.event.MouseEvent,java.awt.Component");
17770 c$.convertPointToScreen = Clazz_defineMethod (c$, "convertPointToScreen", 
17771 function (p, c) {
17772 var x;
17773 var y;
17774 do {
17775 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17776 x = (c).getX ();
17777 y = (c).getY ();
17778 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17779 try {
17780 var pp = c.getLocationOnScreen ();
17781 x = pp.x;
17782 y = pp.y;
17783 } catch (icse) {
17784 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17785 x = c.getX ();
17786 y = c.getY ();
17787 } else {
17788 throw icse;
17789 }
17790 }
17791 } else {
17792 x = c.getX ();
17793 y = c.getY ();
17794 }p.x += x;
17795 p.y += y;
17796 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17797 c = c.getParent ();
17798 } while (c != null);
17799 }, "java.awt.Point,java.awt.Component");
17800 c$.convertPointFromScreen = Clazz_defineMethod (c$, "convertPointFromScreen", 
17801 function (p, c) {
17802 var x;
17803 var y;
17804 do {
17805 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
17806 x = (c).getX ();
17807 y = (c).getY ();
17808 } else if (Clazz_instanceOf (c, java.applet.Applet) || Clazz_instanceOf (c, java.awt.Window)) {
17809 try {
17810 var pp = c.getLocationOnScreen ();
17811 x = pp.x;
17812 y = pp.y;
17813 } catch (icse) {
17814 if (Clazz_exceptionOf (icse, java.awt.IllegalComponentStateException)) {
17815 x = c.getX ();
17816 y = c.getY ();
17817 } else {
17818 throw icse;
17819 }
17820 }
17821 } else {
17822 x = c.getX ();
17823 y = c.getY ();
17824 }p.x -= x;
17825 p.y -= y;
17826 if (Clazz_instanceOf (c, java.awt.Window) || Clazz_instanceOf (c, java.applet.Applet)) break;
17827 c = c.getParent ();
17828 } while (c != null);
17829 }, "java.awt.Point,java.awt.Component");
17830 c$.windowForComponent = Clazz_defineMethod (c$, "windowForComponent", 
17831 function (c) {
17832 return javax.swing.SwingUtilities.getWindowAncestor (c);
17833 }, "java.awt.Component");
17834 c$.isDescendingFrom = Clazz_defineMethod (c$, "isDescendingFrom", 
17835 function (a, b) {
17836 if (a === b) return true;
17837 for (var p = a.getParent (); p != null; p = p.getParent ()) if (p === b) return true;
17838
17839 return false;
17840 }, "java.awt.Component,java.awt.Component");
17841 c$.computeIntersection = Clazz_defineMethod (c$, "computeIntersection", 
17842 function (x, y, width, height, dest) {
17843 var x1 = (x > dest.x) ? x : dest.x;
17844 var x2 = ((x + width) < (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17845 var y1 = (y > dest.y) ? y : dest.y;
17846 var y2 = ((y + height) < (dest.y + dest.height) ? (y + height) : (dest.y + dest.height));
17847 dest.x = x1;
17848 dest.y = y1;
17849 dest.width = x2 - x1;
17850 dest.height = y2 - y1;
17851 if (dest.width < 0 || dest.height < 0) {
17852 dest.x = dest.y = dest.width = dest.height = 0;
17853 }return dest;
17854 }, "~N,~N,~N,~N,java.awt.Rectangle");
17855 c$.computeUnion = Clazz_defineMethod (c$, "computeUnion", 
17856 function (x, y, width, height, dest) {
17857 var x1 = (x < dest.x) ? x : dest.x;
17858 var x2 = ((x + width) > (dest.x + dest.width)) ? (x + width) : (dest.x + dest.width);
17859 var y1 = (y < dest.y) ? y : dest.y;
17860 var y2 = ((y + height) > (dest.y + dest.height)) ? (y + height) : (dest.y + dest.height);
17861 dest.x = x1;
17862 dest.y = y1;
17863 dest.width = (x2 - x1);
17864 dest.height = (y2 - y1);
17865 return dest;
17866 }, "~N,~N,~N,~N,java.awt.Rectangle");
17867 c$.computeDifference = Clazz_defineMethod (c$, "computeDifference", 
17868 function (rectA, rectB) {
17869 if (rectB == null || !rectA.intersects (rectB) || javax.swing.SwingUtilities.isRectangleContainingRectangle (rectB, rectA)) {
17870 return  new Array (0);
17871 }var t =  new java.awt.Rectangle ();
17872 var a = null;
17873 var b = null;
17874 var c = null;
17875 var d = null;
17876 var result;
17877 var rectCount = 0;
17878 if (javax.swing.SwingUtilities.isRectangleContainingRectangle (rectA, rectB)) {
17879 t.x = rectA.x;
17880 t.y = rectA.y;
17881 t.width = rectB.x - rectA.x;
17882 t.height = rectA.height;
17883 if (t.width > 0 && t.height > 0) {
17884 a =  new java.awt.Rectangle (t);
17885 rectCount++;
17886 }t.x = rectB.x;
17887 t.y = rectA.y;
17888 t.width = rectB.width;
17889 t.height = rectB.y - rectA.y;
17890 if (t.width > 0 && t.height > 0) {
17891 b =  new java.awt.Rectangle (t);
17892 rectCount++;
17893 }t.x = rectB.x;
17894 t.y = rectB.y + rectB.height;
17895 t.width = rectB.width;
17896 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17897 if (t.width > 0 && t.height > 0) {
17898 c =  new java.awt.Rectangle (t);
17899 rectCount++;
17900 }t.x = rectB.x + rectB.width;
17901 t.y = rectA.y;
17902 t.width = rectA.x + rectA.width - (rectB.x + rectB.width);
17903 t.height = rectA.height;
17904 if (t.width > 0 && t.height > 0) {
17905 d =  new java.awt.Rectangle (t);
17906 rectCount++;
17907 }} else {
17908 if (rectB.x <= rectA.x && rectB.y <= rectA.y) {
17909 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17910 t.x = rectA.x;
17911 t.y = rectB.y + rectB.height;
17912 t.width = rectA.width;
17913 t.height = rectA.y + rectA.height - (rectB.y + rectB.height);
17914 if (t.width > 0 && t.height > 0) {
17915 a = t;
17916 rectCount++;
17917 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17918 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
17919 if (t.width > 0 && t.height > 0) {
17920 a = t;
17921 rectCount++;
17922 }} else {
17923 t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectB.y + rectB.height) - rectA.y);
17924 if (t.width > 0 && t.height > 0) {
17925 a =  new java.awt.Rectangle (t);
17926 rectCount++;
17927 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17928 if (t.width > 0 && t.height > 0) {
17929 b =  new java.awt.Rectangle (t);
17930 rectCount++;
17931 }}} else if (rectB.x <= rectA.x && (rectB.y + rectB.height) >= (rectA.y + rectA.height)) {
17932 if ((rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17933 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17934 if (t.width > 0 && t.height > 0) {
17935 a = t;
17936 rectCount++;
17937 }} else {
17938 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17939 if (t.width > 0 && t.height > 0) {
17940 a =  new java.awt.Rectangle (t);
17941 rectCount++;
17942 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), (rectA.y + rectA.height) - rectB.y);
17943 if (t.width > 0 && t.height > 0) {
17944 b =  new java.awt.Rectangle (t);
17945 rectCount++;
17946 }}} else if (rectB.x <= rectA.x) {
17947 if ((rectB.x + rectB.width) >= (rectA.x + rectA.width)) {
17948 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17949 if (t.width > 0 && t.height > 0) {
17950 a =  new java.awt.Rectangle (t);
17951 rectCount++;
17952 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17953 if (t.width > 0 && t.height > 0) {
17954 b =  new java.awt.Rectangle (t);
17955 rectCount++;
17956 }} else {
17957 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17958 if (t.width > 0 && t.height > 0) {
17959 a =  new java.awt.Rectangle (t);
17960 rectCount++;
17961 }t.reshape ((rectB.x + rectB.width), rectB.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectB.height);
17962 if (t.width > 0 && t.height > 0) {
17963 b =  new java.awt.Rectangle (t);
17964 rectCount++;
17965 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17966 if (t.width > 0 && t.height > 0) {
17967 c =  new java.awt.Rectangle (t);
17968 rectCount++;
17969 }}} else if (rectB.x <= (rectA.x + rectA.width) && (rectB.x + rectB.width) > (rectA.x + rectA.width)) {
17970 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17971 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
17972 if (t.width > 0 && t.height > 0) {
17973 a = t;
17974 rectCount++;
17975 }} else if (rectB.y <= rectA.y) {
17976 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, (rectB.y + rectB.height) - rectA.y);
17977 if (t.width > 0 && t.height > 0) {
17978 a =  new java.awt.Rectangle (t);
17979 rectCount++;
17980 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
17981 if (t.width > 0 && t.height > 0) {
17982 b =  new java.awt.Rectangle (t);
17983 rectCount++;
17984 }} else if ((rectB.y + rectB.height) > (rectA.y + rectA.height)) {
17985 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17986 if (t.width > 0 && t.height > 0) {
17987 a =  new java.awt.Rectangle (t);
17988 rectCount++;
17989 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, (rectA.y + rectA.height) - rectB.y);
17990 if (t.width > 0 && t.height > 0) {
17991 b =  new java.awt.Rectangle (t);
17992 rectCount++;
17993 }} else {
17994 t.reshape (rectA.x, rectA.y, rectA.width, rectB.y - rectA.y);
17995 if (t.width > 0 && t.height > 0) {
17996 a =  new java.awt.Rectangle (t);
17997 rectCount++;
17998 }t.reshape (rectA.x, rectB.y, rectB.x - rectA.x, rectB.height);
17999 if (t.width > 0 && t.height > 0) {
18000 b =  new java.awt.Rectangle (t);
18001 rectCount++;
18002 }t.reshape (rectA.x, (rectB.y + rectB.height), rectA.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18003 if (t.width > 0 && t.height > 0) {
18004 c =  new java.awt.Rectangle (t);
18005 rectCount++;
18006 }}} else if (rectB.x >= rectA.x && (rectB.x + rectB.width) <= (rectA.x + rectA.width)) {
18007 if (rectB.y <= rectA.y && (rectB.y + rectB.height) > (rectA.y + rectA.height)) {
18008 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18009 if (t.width > 0 && t.height > 0) {
18010 a =  new java.awt.Rectangle (t);
18011 rectCount++;
18012 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18013 if (t.width > 0 && t.height > 0) {
18014 b =  new java.awt.Rectangle (t);
18015 rectCount++;
18016 }} else if (rectB.y <= rectA.y) {
18017 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18018 if (t.width > 0 && t.height > 0) {
18019 a =  new java.awt.Rectangle (t);
18020 rectCount++;
18021 }t.reshape (rectB.x, (rectB.y + rectB.height), rectB.width, (rectA.y + rectA.height) - (rectB.y + rectB.height));
18022 if (t.width > 0 && t.height > 0) {
18023 b =  new java.awt.Rectangle (t);
18024 rectCount++;
18025 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18026 if (t.width > 0 && t.height > 0) {
18027 c =  new java.awt.Rectangle (t);
18028 rectCount++;
18029 }} else {
18030 t.reshape (rectA.x, rectA.y, rectB.x - rectA.x, rectA.height);
18031 if (t.width > 0 && t.height > 0) {
18032 a =  new java.awt.Rectangle (t);
18033 rectCount++;
18034 }t.reshape (rectB.x, rectA.y, rectB.width, rectB.y - rectA.y);
18035 if (t.width > 0 && t.height > 0) {
18036 b =  new java.awt.Rectangle (t);
18037 rectCount++;
18038 }t.reshape ((rectB.x + rectB.width), rectA.y, (rectA.x + rectA.width) - (rectB.x + rectB.width), rectA.height);
18039 if (t.width > 0 && t.height > 0) {
18040 c =  new java.awt.Rectangle (t);
18041 rectCount++;
18042 }}}}result =  new Array (rectCount);
18043 rectCount = 0;
18044 if (a != null) result[rectCount++] = a;
18045 if (b != null) result[rectCount++] = b;
18046 if (c != null) result[rectCount++] = c;
18047 if (d != null) result[rectCount++] = d;
18048 return result;
18049 }, "java.awt.Rectangle,java.awt.Rectangle");
18050 c$.isLeftMouseButton = Clazz_defineMethod (c$, "isLeftMouseButton", 
18051 function (anEvent) {
18052 return ((anEvent.getModifiers () & 16) != 0);
18053 }, "java.awt.event.MouseEvent");
18054 c$.isMiddleMouseButton = Clazz_defineMethod (c$, "isMiddleMouseButton", 
18055 function (anEvent) {
18056 return ((anEvent.getModifiers () & 8) == 8);
18057 }, "java.awt.event.MouseEvent");
18058 c$.isRightMouseButton = Clazz_defineMethod (c$, "isRightMouseButton", 
18059 function (anEvent) {
18060 return ((anEvent.getModifiers () & 4) == 4);
18061 }, "java.awt.event.MouseEvent");
18062 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18063 function (g, c, p, x, y, w, h) {
18064 javax.swing.SwingUtilities.getCellRendererPane (c, p).paintComponent (g, c, p, x, y, w, h, false);
18065 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
18066 c$.paintComponent = Clazz_defineMethod (c$, "paintComponent", 
18067 function (g, c, p, r) {
18068 javax.swing.SwingUtilities.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
18069 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
18070 c$.getCellRendererPane = Clazz_defineMethod (c$, "getCellRendererPane", 
18071  function (c, p) {
18072 var shell = c.getParent ();
18073 if (Clazz_instanceOf (shell, javax.swing.CellRendererPane)) {
18074 if (shell.getParent () !== p) {
18075 p.add (shell);
18076 }} else {
18077 shell = swingjs.api.Interface.getInstance ("javax.swing.CellRendererPane", false);
18078 shell.add (c);
18079 p.add (shell);
18080 }return shell;
18081 }, "java.awt.Component,java.awt.Container");
18082 c$.updateComponentTreeUI = Clazz_defineMethod (c$, "updateComponentTreeUI", 
18083 function (c) {
18084 javax.swing.SwingUtilities.updateComponentTreeUI0 (c);
18085 c.invalidate ();
18086 c.validate ();
18087 c.repaint ();
18088 }, "java.awt.Component");
18089 c$.updateComponentTreeUI0 = Clazz_defineMethod (c$, "updateComponentTreeUI0", 
18090  function (c) {
18091 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
18092 var jc = c;
18093 jc.updateUI ();
18094 var jpm = jc.getComponentPopupMenu ();
18095 if (jpm != null) {
18096 javax.swing.SwingUtilities.updateComponentTreeUI (jpm);
18097 }}var children = null;
18098 if (Clazz_instanceOf (c, javax.swing.JMenu)) {
18099 children = (c).getMenuComponents ();
18100 } else if (Clazz_instanceOf (c, java.awt.Container)) {
18101 children = (c).getComponents ();
18102 }if (children != null) {
18103 for (var i = 0; i < children.length; i++) {
18104 javax.swing.SwingUtilities.updateComponentTreeUI0 (children[i]);
18105 }
18106 }}, "java.awt.Component");
18107 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
18108 function (doRun) {
18109 java.awt.EventQueue.invokeLater (doRun);
18110 }, "Runnable");
18111 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
18112 function (doRun) {
18113 java.awt.EventQueue.invokeAndWait (doRun);
18114 }, "Runnable");
18115 c$.isEventDispatchThread = Clazz_defineMethod (c$, "isEventDispatchThread", 
18116 function () {
18117 return java.awt.EventQueue.isDispatchThread ();
18118 });
18119 c$.getRootPane = Clazz_defineMethod (c$, "getRootPane", 
18120 function (c) {
18121 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
18122 return (c).getRootPane ();
18123 }for (; c != null; c = c.getParent ()) {
18124 if (Clazz_instanceOf (c, javax.swing.JRootPane)) {
18125 return c;
18126 }}
18127 return null;
18128 }, "java.awt.Component");
18129 c$.getRoot = Clazz_defineMethod (c$, "getRoot", 
18130 function (c) {
18131 var applet = null;
18132 for (var p = c; p != null; p = p.getParent ()) {
18133 if (Clazz_instanceOf (p, java.awt.Window)) {
18134 return p;
18135 }if (Clazz_instanceOf (p, java.applet.Applet)) {
18136 applet = p;
18137 }}
18138 return applet;
18139 }, "java.awt.Component");
18140 c$.processKeyBindings = Clazz_defineMethod (c$, "processKeyBindings", 
18141 function (event) {
18142 if (event != null) {
18143 if (event.isConsumed ()) {
18144 return false;
18145 }var component = event.getComponent ();
18146 var pressed = (event.getID () == 401);
18147 if (!javax.swing.SwingUtilities.isValidKeyEventForKeyBindings (event)) {
18148 return false;
18149 }while (component != null) {
18150 if (Clazz_instanceOf (component, javax.swing.JComponent)) {
18151 return (component).processKeyBindings (event, pressed);
18152 }if ((Clazz_instanceOf (component, java.applet.Applet)) || (Clazz_instanceOf (component, java.awt.Window))) {
18153 return javax.swing.JComponent.processKeyBindingsForAllComponents (event, component, pressed);
18154 }component = component.getParent ();
18155 }
18156 }return false;
18157 }, "java.awt.event.KeyEvent");
18158 c$.isValidKeyEventForKeyBindings = Clazz_defineMethod (c$, "isValidKeyEventForKeyBindings", 
18159 function (e) {
18160 if (e.getID () == 400) {
18161 var mod = e.getModifiers ();
18162 if (((mod & 8) != 0) && ((mod & 2) == 0)) {
18163 return false;
18164 }}return true;
18165 }, "java.awt.event.KeyEvent");
18166 c$.notifyAction = Clazz_defineMethod (c$, "notifyAction", 
18167 function (action, ks, event, sender, modifiers) {
18168 if (action == null) {
18169 return false;
18170 }if (Clazz_instanceOf (action, jssun.swing.UIAction)) {
18171 if (!(action).isEnabled (sender)) {
18172 return false;
18173 }} else if (!action.isEnabled ()) {
18174 return false;
18175 }var commandO;
18176 var stayNull;
18177 commandO = action.getValue ("ActionCommandKey");
18178 if (commandO == null && (Clazz_instanceOf (action, javax.swing.JComponent.ActionStandin))) {
18179 stayNull = true;
18180 } else {
18181 stayNull = false;
18182 }var command;
18183 if (commandO != null) {
18184 command = commandO.toString ();
18185 } else if (!stayNull && event.getKeyChar () != '\uffff') {
18186 command = String.valueOf (event.getKeyChar ());
18187 } else {
18188 command = null;
18189 }action.actionPerformed ( new java.awt.event.ActionEvent (sender, 1001, command, event.getWhen (), modifiers));
18190 return true;
18191 }, "javax.swing.Action,javax.swing.KeyStroke,java.awt.event.KeyEvent,~O,~N");
18192 c$.replaceUIInputMap = Clazz_defineMethod (c$, "replaceUIInputMap", 
18193 function (component, type, uiInputMap) {
18194 var map = component.getInputMap (type, (uiInputMap != null));
18195 while (map != null) {
18196 var parent = map.getParent ();
18197 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18198 map.setParent (uiInputMap);
18199 return;
18200 }map = parent;
18201 }
18202 }, "javax.swing.JComponent,~N,javax.swing.InputMap");
18203 c$.replaceUIActionMap = Clazz_defineMethod (c$, "replaceUIActionMap", 
18204 function (component, uiActionMap) {
18205 var map = component.getActionMap ((uiActionMap != null));
18206 ;while (map != null) {
18207 var parent = map.getParent ();
18208 if (parent == null || (Clazz_instanceOf (parent, javax.swing.plaf.UIResource))) {
18209 map.setParent (uiActionMap);
18210 return;
18211 }map = parent;
18212 }
18213 }, "javax.swing.JComponent,javax.swing.ActionMap");
18214 c$.getUIInputMap = Clazz_defineMethod (c$, "getUIInputMap", 
18215 function (component, condition) {
18216 var map = component.getInputMap (condition, false);
18217 while (map != null) {
18218 var parent = map.getParent ();
18219 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18220 return parent;
18221 }map = parent;
18222 }
18223 return null;
18224 }, "javax.swing.JComponent,~N");
18225 c$.getUIActionMap = Clazz_defineMethod (c$, "getUIActionMap", 
18226 function (component) {
18227 var map = component.getActionMap (false);
18228 while (map != null) {
18229 var parent = map.getParent ();
18230 if (Clazz_instanceOf (parent, javax.swing.plaf.UIResource)) {
18231 return parent;
18232 }map = parent;
18233 }
18234 return null;
18235 }, "javax.swing.JComponent");
18236 c$.getSharedOwnerFrame = Clazz_defineMethod (c$, "getSharedOwnerFrame", 
18237 function () {
18238 var sharedOwnerFrame = javax.swing.SwingUtilities.appContextGet (javax.swing.SwingUtilities.sharedOwnerFrameKey);
18239 if (sharedOwnerFrame == null) {
18240 sharedOwnerFrame =  new javax.swing.SwingUtilities.SharedOwnerFrame ();
18241 javax.swing.SwingUtilities.appContextPut (javax.swing.SwingUtilities.sharedOwnerFrameKey, sharedOwnerFrame);
18242 }return sharedOwnerFrame;
18243 });
18244 c$.getSharedOwnerFrameShutdownListener = Clazz_defineMethod (c$, "getSharedOwnerFrameShutdownListener", 
18245 function () {
18246 var sharedOwnerFrame = javax.swing.SwingUtilities.getSharedOwnerFrame ();
18247 return sharedOwnerFrame;
18248 });
18249 c$.appContextGet = Clazz_defineMethod (c$, "appContextGet", 
18250 function (key) {
18251 return jssun.awt.AppContext.getAppContext ().get (key);
18252 }, "~O");
18253 c$.appContextPut = Clazz_defineMethod (c$, "appContextPut", 
18254 function (key, value) {
18255 jssun.awt.AppContext.getAppContext ().put (key, value);
18256 }, "~O,~O");
18257 c$.appContextRemove = Clazz_defineMethod (c$, "appContextRemove", 
18258 function (key) {
18259 jssun.awt.AppContext.getAppContext ().remove (key);
18260 }, "~O");
18261 c$.loadSystemClass = Clazz_defineMethod (c$, "loadSystemClass", 
18262 function (className) {
18263 return Clazz._4Name (className, true, Thread.currentThread ().getContextClassLoader ());
18264 }, "~S");
18265 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
18266 function (c) {
18267 return c.getComponentOrientation ().isLeftToRight ();
18268 }, "java.awt.Component");
18269 c$.doesIconReferenceImage = Clazz_defineMethod (c$, "doesIconReferenceImage", 
18270 function (icon, image) {
18271 var iconImage = (icon != null && (Clazz_instanceOf (icon, javax.swing.ImageIcon))) ? (icon).getImage () : null;
18272 return (iconImage === image);
18273 }, "javax.swing.Icon,java.awt.Image");
18274 c$.findDisplayedMnemonicIndex = Clazz_defineMethod (c$, "findDisplayedMnemonicIndex", 
18275 function (text, mnemonic) {
18276 if (text == null || mnemonic == 0) {
18277 return -1;
18278 }var uc = Character.toUpperCase (String.fromCharCode (mnemonic));
18279 var lc = Character.toLowerCase (String.fromCharCode (mnemonic));
18280 var uci = text.indexOf (uc);
18281 var lci = text.indexOf (lc);
18282 if (uci == -1) {
18283 return lci;
18284 } else if (lci == -1) {
18285 return uci;
18286 } else {
18287 return (lci < uci) ? lci : uci;
18288 }}, "~S,~N");
18289 c$.calculateInnerArea = Clazz_defineMethod (c$, "calculateInnerArea", 
18290 function (c, r) {
18291 if (c == null) {
18292 return null;
18293 }var rect = r;
18294 var insets = c.getInsets ();
18295 if (rect == null) {
18296 rect =  new java.awt.Rectangle ();
18297 }rect.x = insets.left;
18298 rect.y = insets.top;
18299 rect.width = c.getWidth () - insets.left - insets.right;
18300 rect.height = c.getHeight () - insets.top - insets.bottom;
18301 return rect;
18302 }, "javax.swing.JComponent,java.awt.Rectangle");
18303 c$.updateRendererOrEditorUI = Clazz_defineMethod (c$, "updateRendererOrEditorUI", 
18304 function (rendererOrEditor) {
18305 if (rendererOrEditor == null) {
18306 return;
18307 }var component = null;
18308 if (Clazz_instanceOf (rendererOrEditor, java.awt.Component)) {
18309 component = rendererOrEditor;
18310 }if (Clazz_instanceOf (rendererOrEditor, javax.swing.DefaultCellEditor)) {
18311 component = (rendererOrEditor).getComponent ();
18312 }if (component != null) {
18313 javax.swing.SwingUtilities.updateComponentTreeUI (component);
18314 }}, "~O");
18315 Clazz_pu$h(self.c$);
18316 c$ = Clazz_declareType (javax.swing.SwingUtilities, "SharedOwnerFrame", java.awt.Frame, java.awt.event.WindowListener);
18317 Clazz_defineMethod (c$, "addNotify", 
18318 function () {
18319 Clazz_superCall (this, javax.swing.SwingUtilities.SharedOwnerFrame, "addNotify", []);
18320 this.installListeners ();
18321 });
18322 Clazz_defineMethod (c$, "installListeners", 
18323 function () {
18324 var a = this.getOwnedWindows ();
18325 for (var b = 0; b < a.length; b++) {
18326 var c = a[b];
18327 if (c != null) {
18328 c.removeWindowListener (this);
18329 c.addWindowListener (this);
18330 }}
18331 });
18332 Clazz_overrideMethod (c$, "windowClosed", 
18333 function (a) {
18334 var b = this.getOwnedWindows ();
18335 for (var c = 0; c < b.length; c++) {
18336 var d = b[c];
18337 if (d != null) {
18338 if (d.isDisplayable ()) {
18339 return;
18340 }d.removeWindowListener (this);
18341 }this.dispose ();
18342 }
18343 }, "java.awt.event.WindowEvent");
18344 Clazz_overrideMethod (c$, "windowOpened", 
18345 function (a) {
18346 }, "java.awt.event.WindowEvent");
18347 Clazz_overrideMethod (c$, "windowClosing", 
18348 function (a) {
18349 }, "java.awt.event.WindowEvent");
18350 Clazz_overrideMethod (c$, "windowIconified", 
18351 function (a) {
18352 }, "java.awt.event.WindowEvent");
18353 Clazz_overrideMethod (c$, "windowDeiconified", 
18354 function (a) {
18355 }, "java.awt.event.WindowEvent");
18356 Clazz_overrideMethod (c$, "windowActivated", 
18357 function (a) {
18358 }, "java.awt.event.WindowEvent");
18359 Clazz_overrideMethod (c$, "windowDeactivated", 
18360 function (a) {
18361 }, "java.awt.event.WindowEvent");
18362 Clazz_defineMethod (c$, "show", 
18363 function () {
18364 });
18365 Clazz_overrideMethod (c$, "dispose", 
18366 function () {
18367 });
18368 c$ = Clazz_p0p ();
18369 c$.sharedOwnerFrameKey = c$.prototype.sharedOwnerFrameKey =  new Clazz._O ();
18370 });
18371 Clazz_declarePackage ("java.awt");
18372 Clazz_load (["java.awt.Window"], "java.awt.Frame", ["java.lang.IllegalArgumentException", "java.awt.Cursor", "$.IllegalComponentStateException"], function () {
18373 c$ = Clazz_decorateAsClass (function () {
18374 this.maximizedBounds = null;
18375 this.title = "Untitled";
18376 this.resizable = true;
18377 this.undecorated = false;
18378 this.mbManagement = false;
18379 this.$state = 0;
18380 this.ownedWindows = null;
18381 this.menuBar = null;
18382 Clazz_instantialize (this, arguments);
18383 }, java.awt, "Frame", java.awt.Window);
18384 Clazz_makeConstructor (c$, 
18385 function () {
18386 this.construct ("");
18387 });
18388 Clazz_makeConstructor (c$, 
18389 function (gc) {
18390 this.construct ("", gc);
18391 }, "java.awt.GraphicsConfiguration");
18392 Clazz_makeConstructor (c$, 
18393 function (title) {
18394 Clazz_superConstructor (this, java.awt.Frame, []);
18395 this.initFrame (title, null);
18396 }, "~S");
18397 Clazz_makeConstructor (c$, 
18398 function (title, gc) {
18399 Clazz_superConstructor (this, java.awt.Frame, [gc]);
18400 this.initFrame (title, gc);
18401 }, "~S,java.awt.GraphicsConfiguration");
18402 Clazz_defineMethod (c$, "initFrame", 
18403  function (title, gc) {
18404 this.title = title;
18405 }, "~S,java.awt.GraphicsConfiguration");
18406 Clazz_overrideMethod (c$, "constructComponentName", 
18407 function () {
18408 {
18409 return "frame" + java.awt.Frame.$nameCounter++;
18410 }});
18411 Clazz_defineMethod (c$, "addNotify", 
18412 function () {
18413 if (this.peer == null) {
18414 this.peer = this.getToolkit ().createFrame (this);
18415 }var p = this.peer;
18416 p.setMaximizedBounds (this.maximizedBounds);
18417 Clazz_superCall (this, java.awt.Frame, "addNotify", []);
18418 });
18419 Clazz_defineMethod (c$, "getTitle", 
18420 function () {
18421 return this.title;
18422 });
18423 Clazz_defineMethod (c$, "setTitle", 
18424 function (title) {
18425 var oldTitle = this.title;
18426 if (title == null) {
18427 title = "";
18428 }{
18429 this.title = title;
18430 }this.firePropertyChangeObject ("title", oldTitle, title);
18431 }, "~S");
18432 Clazz_defineMethod (c$, "getIconImage", 
18433 function () {
18434 var icons = this.icons;
18435 if (icons != null) {
18436 if (icons.size () > 0) {
18437 return icons.get (0);
18438 }}return null;
18439 });
18440 Clazz_defineMethod (c$, "isResizable", 
18441 function () {
18442 return this.resizable;
18443 });
18444 Clazz_defineMethod (c$, "setResizable", 
18445 function (resizable) {
18446 var oldResizable = this.resizable;
18447 {
18448 this.resizable = resizable;
18449 }this.firePropertyChangeBool ("resizable", oldResizable, resizable);
18450 }, "~B");
18451 Clazz_defineMethod (c$, "setState", 
18452 function (state) {
18453 var current = this.getExtendedState ();
18454 if (state == 1 && (current & 1) == 0) {
18455 this.setExtendedState (current | 1);
18456 } else if (state == 0 && (current & 1) != 0) {
18457 this.setExtendedState (current & -2);
18458 }}, "~N");
18459 Clazz_defineMethod (c$, "setExtendedState", 
18460 function (state) {
18461 if (!this.isFrameStateSupported (state)) {
18462 return;
18463 }this.$state = state;
18464 }, "~N");
18465 Clazz_defineMethod (c$, "isFrameStateSupported", 
18466  function (state) {
18467 if (!this.getToolkit ().isFrameStateSupported (state)) {
18468 if (((state & 1) != 0) && !this.getToolkit ().isFrameStateSupported (1)) {
18469 return false;
18470 } else {
18471 state &= -2;
18472 }return this.getToolkit ().isFrameStateSupported (state);
18473 }return true;
18474 }, "~N");
18475 Clazz_defineMethod (c$, "getState", 
18476 function () {
18477 return (this.getExtendedState () & 1) != 0 ? 1 : 0;
18478 });
18479 Clazz_defineMethod (c$, "getExtendedState", 
18480 function () {
18481 return this.$state;
18482 });
18483 Clazz_defineMethod (c$, "setMaximizedBounds", 
18484 function (bounds) {
18485 this.maximizedBounds = bounds;
18486 }, "java.awt.Rectangle");
18487 Clazz_defineMethod (c$, "getMaximizedBounds", 
18488 function () {
18489 return this.maximizedBounds;
18490 });
18491 Clazz_defineMethod (c$, "setUndecorated", 
18492 function (undecorated) {
18493 {
18494 if (this.isDisplayable ()) {
18495 throw  new java.awt.IllegalComponentStateException ("The frame is displayable.");
18496 }this.undecorated = undecorated;
18497 }}, "~B");
18498 Clazz_defineMethod (c$, "isUndecorated", 
18499 function () {
18500 return this.undecorated;
18501 });
18502 Clazz_overrideMethod (c$, "removeNotify", 
18503 function () {
18504 });
18505 Clazz_defineMethod (c$, "paramString", 
18506 function () {
18507 var str = Clazz_superCall (this, java.awt.Frame, "paramString", []);
18508 if (this.title != null) {
18509 str += ",title=" + this.title;
18510 }if (this.resizable) {
18511 str += ",resizable";
18512 }this.getExtendedState ();
18513 if (this.$state == 0) {
18514 str += ",normal";
18515 } else {
18516 if ((this.$state & 1) != 0) {
18517 str += ",iconified";
18518 }if ((this.$state & 6) == 6) {
18519 str += ",maximized";
18520 } else if ((this.$state & 2) != 0) {
18521 str += ",maximized_horiz";
18522 } else if ((this.$state & 4) != 0) {
18523 str += ",maximized_vert";
18524 }}return str;
18525 });
18526 Clazz_defineMethod (c$, "setCursor", 
18527 function (cursorType) {
18528 if (cursorType < 0 || cursorType > 13) {
18529 throw  new IllegalArgumentException ("illegal cursor type");
18530 }this.setCursor (java.awt.Cursor.getPredefinedCursor (cursorType));
18531 }, "~N");
18532 Clazz_defineMethod (c$, "getCursorType", 
18533 function () {
18534 return (this.getCursor ().getType ());
18535 });
18536 c$.getFrames = Clazz_defineMethod (c$, "getFrames", 
18537 function () {
18538 var allWindows = java.awt.Window.getWindows ();
18539 var frameCount = 0;
18540 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18541 if (Clazz_instanceOf (w, java.awt.Frame)) {
18542 frameCount++;
18543 }}
18544 var frames =  new Array (frameCount);
18545 var c = 0;
18546 for (var w, $w = 0, $$w = allWindows; $w < $$w.length && ((w = $$w[$w]) || true); $w++) {
18547 if (Clazz_instanceOf (w, java.awt.Frame)) {
18548 frames[c++] = w;
18549 }}
18550 return frames;
18551 });
18552 Clazz_defineStatics (c$,
18553 "DEFAULT_CURSOR", 0,
18554 "CROSSHAIR_CURSOR", 1,
18555 "TEXT_CURSOR", 2,
18556 "WAIT_CURSOR", 3,
18557 "SW_RESIZE_CURSOR", 4,
18558 "SE_RESIZE_CURSOR", 5,
18559 "NW_RESIZE_CURSOR", 6,
18560 "NE_RESIZE_CURSOR", 7,
18561 "N_RESIZE_CURSOR", 8,
18562 "S_RESIZE_CURSOR", 9,
18563 "W_RESIZE_CURSOR", 10,
18564 "E_RESIZE_CURSOR", 11,
18565 "HAND_CURSOR", 12,
18566 "MOVE_CURSOR", 13,
18567 "NORMAL", 0,
18568 "ICONIFIED", 1,
18569 "MAXIMIZED_HORIZ", 2,
18570 "MAXIMIZED_VERT", 4,
18571 "MAXIMIZED_BOTH", 6,
18572 "$base", "frame",
18573 "$nameCounter", 0);
18574 });
18575 Clazz_declarePackage ("java.awt");
18576 Clazz_load (["java.lang.IllegalStateException"], "java.awt.IllegalComponentStateException", null, function () {
18577 c$ = Clazz_declareType (java.awt, "IllegalComponentStateException", IllegalStateException);
18578 });
18579 Clazz_declarePackage ("javax.swing");
18580 c$ = Clazz_declareInterface (javax.swing, "SwingConstants");
18581 Clazz_defineStatics (c$,
18582 "CENTER", 0,
18583 "TOP", 1,
18584 "LEFT", 2,
18585 "BOTTOM", 3,
18586 "RIGHT", 4,
18587 "NORTH", 1,
18588 "NORTH_EAST", 2,
18589 "EAST", 3,
18590 "SOUTH_EAST", 4,
18591 "SOUTH", 5,
18592 "SOUTH_WEST", 6,
18593 "WEST", 7,
18594 "NORTH_WEST", 8,
18595 "HORIZONTAL", 0,
18596 "VERTICAL", 1,
18597 "LEADING", 10,
18598 "TRAILING", 11,
18599 "NEXT", 12,
18600 "PREVIOUS", 13);
18601 Clazz_declarePackage ("java.awt");
18602 Clazz_load (["java.awt.Shape", "java.awt.geom.Rectangle2D"], "java.awt.Rectangle", ["java.awt.Dimension", "$.Point"], function () {
18603 c$ = Clazz_decorateAsClass (function () {
18604 this.x = 0;
18605 this.y = 0;
18606 this.width = 0;
18607 this.height = 0;
18608 Clazz_instantialize (this, arguments);
18609 }, java.awt, "Rectangle", java.awt.geom.Rectangle2D, java.awt.Shape);
18610 Clazz_makeConstructor (c$, 
18611 function () {
18612 this.construct (0, 0, 0, 0);
18613 });
18614 Clazz_makeConstructor (c$, 
18615 function (r) {
18616 this.construct (r.x, r.y, r.width, r.height);
18617 }, "java.awt.Rectangle");
18618 Clazz_makeConstructor (c$, 
18619 function (x, y, width, height) {
18620 Clazz_superConstructor (this, java.awt.Rectangle, []);
18621 this.x = x;
18622 this.y = y;
18623 this.width = width;
18624 this.height = height;
18625 }, "~N,~N,~N,~N");
18626 Clazz_makeConstructor (c$, 
18627 function (width, height) {
18628 this.construct (0, 0, width, height);
18629 }, "~N,~N");
18630 Clazz_makeConstructor (c$, 
18631 function (p, d) {
18632 this.construct (p.x, p.y, d.width, d.height);
18633 }, "java.awt.Point,java.awt.Dimension");
18634 Clazz_makeConstructor (c$, 
18635 function (p) {
18636 this.construct (p.x, p.y, 0, 0);
18637 }, "java.awt.Point");
18638 Clazz_makeConstructor (c$, 
18639 function (d) {
18640 this.construct (0, 0, d.width, d.height);
18641 }, "java.awt.Dimension");
18642 Clazz_overrideMethod (c$, "getX", 
18643 function () {
18644 return this.x;
18645 });
18646 Clazz_overrideMethod (c$, "getY", 
18647 function () {
18648 return this.y;
18649 });
18650 Clazz_overrideMethod (c$, "getWidth", 
18651 function () {
18652 return this.width;
18653 });
18654 Clazz_overrideMethod (c$, "getHeight", 
18655 function () {
18656 return this.height;
18657 });
18658 Clazz_overrideMethod (c$, "getBounds", 
18659 function () {
18660 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18661 });
18662 Clazz_overrideMethod (c$, "getBounds2D", 
18663 function () {
18664 return  new java.awt.Rectangle (this.x, this.y, this.width, this.height);
18665 });
18666 Clazz_defineMethod (c$, "setBounds", 
18667 function (r) {
18668 this.reshape (r.x, r.y, r.width, r.height);
18669 }, "java.awt.Rectangle");
18670 Clazz_defineMethod (c$, "setBounds", 
18671 function (x, y, width, height) {
18672 this.reshape (x, y, width, height);
18673 }, "~N,~N,~N,~N");
18674 Clazz_defineMethod (c$, "setRect", 
18675 function (x, y, width, height) {
18676 var newx;
18677 var newy;
18678 var neww;
18679 var newh;
18680 if (x > 4.294967294E9) {
18681 newx = 2147483647;
18682 neww = -1;
18683 } else {
18684 newx = java.awt.Rectangle.clip (x, false);
18685 if (width >= 0) width += x - newx;
18686 neww = java.awt.Rectangle.clip (width, width >= 0);
18687 }if (y > 4.294967294E9) {
18688 newy = 2147483647;
18689 newh = -1;
18690 } else {
18691 newy = java.awt.Rectangle.clip (y, false);
18692 if (height >= 0) height += y - newy;
18693 newh = java.awt.Rectangle.clip (height, height >= 0);
18694 }this.reshape (newx, newy, neww, newh);
18695 }, "~N,~N,~N,~N");
18696 c$.clip = Clazz_defineMethod (c$, "clip", 
18697  function (v, doceil) {
18698 if (v <= -2147483648) {
18699 return -2147483648;
18700 }if (v >= 2147483647) {
18701 return 2147483647;
18702 }return Clazz_doubleToInt (doceil ? Math.ceil (v) : Math.floor (v));
18703 }, "~N,~B");
18704 Clazz_defineMethod (c$, "reshape", 
18705 function (x, y, width, height) {
18706 this.x = x;
18707 this.y = y;
18708 this.width = width;
18709 this.height = height;
18710 }, "~N,~N,~N,~N");
18711 Clazz_defineMethod (c$, "getLocation", 
18712 function () {
18713 return  new java.awt.Point (this.x, this.y);
18714 });
18715 Clazz_defineMethod (c$, "setLocation", 
18716 function (p) {
18717 this.setLocation (p.x, p.y);
18718 }, "java.awt.Point");
18719 Clazz_defineMethod (c$, "setLocation", 
18720 function (x, y) {
18721 this.move (x, y);
18722 }, "~N,~N");
18723 Clazz_defineMethod (c$, "move", 
18724 function (x, y) {
18725 this.x = x;
18726 this.y = y;
18727 }, "~N,~N");
18728 Clazz_defineMethod (c$, "translate", 
18729 function (dx, dy) {
18730 var oldv = this.x;
18731 var newv = oldv + dx;
18732 if (dx < 0) {
18733 if (newv > oldv) {
18734 if (this.width >= 0) {
18735 this.width += newv - -2147483648;
18736 }newv = -2147483648;
18737 }} else {
18738 if (newv < oldv) {
18739 if (this.width >= 0) {
18740 this.width += newv - 2147483647;
18741 if (this.width < 0) this.width = 2147483647;
18742 }newv = 2147483647;
18743 }}this.x = newv;
18744 oldv = this.y;
18745 newv = oldv + dy;
18746 if (dy < 0) {
18747 if (newv > oldv) {
18748 if (this.height >= 0) {
18749 this.height += newv - -2147483648;
18750 }newv = -2147483648;
18751 }} else {
18752 if (newv < oldv) {
18753 if (this.height >= 0) {
18754 this.height += newv - 2147483647;
18755 if (this.height < 0) this.height = 2147483647;
18756 }newv = 2147483647;
18757 }}this.y = newv;
18758 }, "~N,~N");
18759 Clazz_defineMethod (c$, "getSize", 
18760 function () {
18761 return  new java.awt.Dimension (this.width, this.height);
18762 });
18763 Clazz_defineMethod (c$, "setSize", 
18764 function (d) {
18765 this.setSize (d.width, d.height);
18766 }, "java.awt.Dimension");
18767 Clazz_defineMethod (c$, "setSize", 
18768 function (width, height) {
18769 this.resize (width, height);
18770 }, "~N,~N");
18771 Clazz_defineMethod (c$, "resize", 
18772 function (width, height) {
18773 this.width = width;
18774 this.height = height;
18775 }, "~N,~N");
18776 Clazz_defineMethod (c$, "contains", 
18777 function (p) {
18778 return this.contains (p.x, p.y);
18779 }, "java.awt.Point");
18780 Clazz_defineMethod (c$, "contains", 
18781 function (x, y) {
18782 return this.inside (x, y);
18783 }, "~N,~N");
18784 Clazz_defineMethod (c$, "contains", 
18785 function (r) {
18786 return this.contains (r.x, r.y, r.width, r.height);
18787 }, "java.awt.Rectangle");
18788 Clazz_defineMethod (c$, "contains", 
18789 function (X, Y, W, H) {
18790 var w = this.width;
18791 var h = this.height;
18792 if ((w | h | W | H) < 0) {
18793 return false;
18794 }var x = this.x;
18795 var y = this.y;
18796 if (X < x || Y < y) {
18797 return false;
18798 }w += x;
18799 W += X;
18800 if (W <= X) {
18801 if (w >= x || W > w) return false;
18802 } else {
18803 if (w >= x && W > w) return false;
18804 }h += y;
18805 H += Y;
18806 if (H <= Y) {
18807 if (h >= y || H > h) return false;
18808 } else {
18809 if (h >= y && H > h) return false;
18810 }return true;
18811 }, "~N,~N,~N,~N");
18812 Clazz_defineMethod (c$, "inside", 
18813 function (X, Y) {
18814 var w = this.width;
18815 var h = this.height;
18816 if ((w | h) < 0) {
18817 return false;
18818 }var x = this.x;
18819 var y = this.y;
18820 if (X < x || Y < y) {
18821 return false;
18822 }w += x;
18823 h += y;
18824 return ((w < x || w > X) && (h < y || h > Y));
18825 }, "~N,~N");
18826 Clazz_defineMethod (c$, "intersects", 
18827 function (r) {
18828 var tw = this.width;
18829 var th = this.height;
18830 var rw = r.width;
18831 var rh = r.height;
18832 if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) {
18833 return false;
18834 }var tx = this.x;
18835 var ty = this.y;
18836 var rx = r.x;
18837 var ry = r.y;
18838 rw += rx;
18839 rh += ry;
18840 tw += tx;
18841 th += ty;
18842 return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry));
18843 }, "java.awt.Rectangle");
18844 Clazz_defineMethod (c$, "intersection", 
18845 function (r) {
18846 var tx1 = this.x;
18847 var ty1 = this.y;
18848 var rx1 = r.x;
18849 var ry1 = r.y;
18850 var tx2 = tx1;
18851 tx2 += this.width;
18852 var ty2 = ty1;
18853 ty2 += this.height;
18854 var rx2 = rx1;
18855 rx2 += r.width;
18856 var ry2 = ry1;
18857 ry2 += r.height;
18858 if (tx1 < rx1) tx1 = rx1;
18859 if (ty1 < ry1) ty1 = ry1;
18860 if (tx2 > rx2) tx2 = rx2;
18861 if (ty2 > ry2) ty2 = ry2;
18862 tx2 -= tx1;
18863 ty2 -= ty1;
18864 if (tx2 < -2147483648) tx2 = -2147483648;
18865 if (ty2 < -2147483648) ty2 = -2147483648;
18866 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18867 }, "java.awt.Rectangle");
18868 Clazz_defineMethod (c$, "union", 
18869 function (r) {
18870 var tx2 = this.width;
18871 var ty2 = this.height;
18872 if ((tx2 | ty2) < 0) {
18873 return  new java.awt.Rectangle (r);
18874 }var rx2 = r.width;
18875 var ry2 = r.height;
18876 if ((rx2 | ry2) < 0) {
18877 return  new java.awt.Rectangle (this);
18878 }var tx1 = this.x;
18879 var ty1 = this.y;
18880 tx2 += tx1;
18881 ty2 += ty1;
18882 var rx1 = r.x;
18883 var ry1 = r.y;
18884 rx2 += rx1;
18885 ry2 += ry1;
18886 if (tx1 > rx1) tx1 = rx1;
18887 if (ty1 > ry1) ty1 = ry1;
18888 if (tx2 < rx2) tx2 = rx2;
18889 if (ty2 < ry2) ty2 = ry2;
18890 tx2 -= tx1;
18891 ty2 -= ty1;
18892 if (tx2 > 2147483647) tx2 = 2147483647;
18893 if (ty2 > 2147483647) ty2 = 2147483647;
18894 return  new java.awt.Rectangle (tx1, ty1, tx2, ty2);
18895 }, "java.awt.Rectangle");
18896 Clazz_defineMethod (c$, "add", 
18897 function (newx, newy) {
18898 if ((this.width | this.height) < 0) {
18899 this.x = newx;
18900 this.y = newy;
18901 this.width = this.height = 0;
18902 return;
18903 }var x1 = this.x;
18904 var y1 = this.y;
18905 var x2 = this.width;
18906 var y2 = this.height;
18907 x2 += x1;
18908 y2 += y1;
18909 if (x1 > newx) x1 = newx;
18910 if (y1 > newy) y1 = newy;
18911 if (x2 < newx) x2 = newx;
18912 if (y2 < newy) y2 = newy;
18913 x2 -= x1;
18914 y2 -= y1;
18915 if (x2 > 2147483647) x2 = 2147483647;
18916 if (y2 > 2147483647) y2 = 2147483647;
18917 this.reshape (x1, y1, x2, y2);
18918 }, "~N,~N");
18919 Clazz_defineMethod (c$, "add", 
18920 function (pt) {
18921 this.add (pt.x, pt.y);
18922 }, "java.awt.Point");
18923 Clazz_defineMethod (c$, "add", 
18924 function (r) {
18925 var tx2 = this.width;
18926 var ty2 = this.height;
18927 if ((tx2 | ty2) < 0) {
18928 this.reshape (r.x, r.y, r.width, r.height);
18929 }var rx2 = r.width;
18930 var ry2 = r.height;
18931 if ((rx2 | ry2) < 0) {
18932 return;
18933 }var tx1 = this.x;
18934 var ty1 = this.y;
18935 tx2 += tx1;
18936 ty2 += ty1;
18937 var rx1 = r.x;
18938 var ry1 = r.y;
18939 rx2 += rx1;
18940 ry2 += ry1;
18941 if (tx1 > rx1) tx1 = rx1;
18942 if (ty1 > ry1) ty1 = ry1;
18943 if (tx2 < rx2) tx2 = rx2;
18944 if (ty2 < ry2) ty2 = ry2;
18945 tx2 -= tx1;
18946 ty2 -= ty1;
18947 if (tx2 > 2147483647) tx2 = 2147483647;
18948 if (ty2 > 2147483647) ty2 = 2147483647;
18949 this.reshape (tx1, ty1, tx2, ty2);
18950 }, "java.awt.Rectangle");
18951 Clazz_defineMethod (c$, "grow", 
18952 function (h, v) {
18953 var x0 = this.x;
18954 var y0 = this.y;
18955 var x1 = this.width;
18956 var y1 = this.height;
18957 x1 += x0;
18958 y1 += y0;
18959 x0 -= h;
18960 y0 -= v;
18961 x1 += h;
18962 y1 += v;
18963 if (x1 < x0) {
18964 x1 -= x0;
18965 if (x1 < -2147483648) x1 = -2147483648;
18966 if (x0 < -2147483648) x0 = -2147483648;
18967  else if (x0 > 2147483647) x0 = 2147483647;
18968 } else {
18969 if (x0 < -2147483648) x0 = -2147483648;
18970  else if (x0 > 2147483647) x0 = 2147483647;
18971 x1 -= x0;
18972 if (x1 < -2147483648) x1 = -2147483648;
18973  else if (x1 > 2147483647) x1 = 2147483647;
18974 }if (y1 < y0) {
18975 y1 -= y0;
18976 if (y1 < -2147483648) y1 = -2147483648;
18977 if (y0 < -2147483648) y0 = -2147483648;
18978  else if (y0 > 2147483647) y0 = 2147483647;
18979 } else {
18980 if (y0 < -2147483648) y0 = -2147483648;
18981  else if (y0 > 2147483647) y0 = 2147483647;
18982 y1 -= y0;
18983 if (y1 < -2147483648) y1 = -2147483648;
18984  else if (y1 > 2147483647) y1 = 2147483647;
18985 }this.reshape (x0, y0, x1, y1);
18986 }, "~N,~N");
18987 Clazz_overrideMethod (c$, "isEmpty", 
18988 function () {
18989 return (this.width <= 0) || (this.height <= 0);
18990 });
18991 Clazz_defineMethod (c$, "outcode", 
18992 function (x, y) {
18993 var out = 0;
18994 if (this.width <= 0) {
18995 out |= 5;
18996 } else if (x < this.x) {
18997 out |= 1;
18998 } else if (x > this.x + this.width) {
18999 out |= 4;
19000 }if (this.height <= 0) {
19001 out |= 10;
19002 } else if (y < this.y) {
19003 out |= 2;
19004 } else if (y > this.y + this.height) {
19005 out |= 8;
19006 }return out;
19007 }, "~N,~N");
19008 Clazz_overrideMethod (c$, "createIntersection", 
19009 function (r) {
19010 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19011 return this.intersection (r);
19012 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19013 java.awt.geom.Rectangle2D.intersect (this, r, dest);
19014 return dest;
19015 }, "java.awt.geom.Rectangle2D");
19016 Clazz_overrideMethod (c$, "createUnion", 
19017 function (r) {
19018 if (Clazz_instanceOf (r, java.awt.Rectangle)) {
19019 return this.union (r);
19020 }var dest =  new java.awt.geom.Rectangle2D.Double ();
19021 java.awt.geom.Rectangle2D.union (this, r, dest);
19022 return dest;
19023 }, "java.awt.geom.Rectangle2D");
19024 Clazz_defineMethod (c$, "equals", 
19025 function (obj) {
19026 if (Clazz_instanceOf (obj, java.awt.Rectangle)) {
19027 var r = obj;
19028 return ((this.x == r.x) && (this.y == r.y) && (this.width == r.width) && (this.height == r.height));
19029 }return Clazz_superCall (this, java.awt.Rectangle, "equals", [obj]);
19030 }, "~O");
19031 Clazz_overrideMethod (c$, "toString", 
19032 function () {
19033 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",width=" + this.width + ",height=" + this.height + "]";
19034 });
19035 });
19036 Clazz_declarePackage ("java.awt");
19037 Clazz_declareInterface (java.awt, "Shape");
19038 Clazz_declarePackage ("java.awt.geom");
19039 Clazz_load (["java.awt.geom.RectangularShape"], "java.awt.geom.Rectangle2D", ["java.lang.Double", "java.awt.geom.RectIterator"], function () {
19040 c$ = Clazz_declareType (java.awt.geom, "Rectangle2D", java.awt.geom.RectangularShape);
19041 Clazz_makeConstructor (c$, 
19042 function () {
19043 Clazz_superConstructor (this, java.awt.geom.Rectangle2D, []);
19044 });
19045 Clazz_defineMethod (c$, "setRect", 
19046 function (r) {
19047 this.setRect (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19048 }, "java.awt.geom.Rectangle2D");
19049 Clazz_defineMethod (c$, "intersectsLine", 
19050 function (x1, y1, x2, y2) {
19051 var out1;
19052 var out2;
19053 if ((out2 = this.outcode (x2, y2)) == 0) {
19054 return true;
19055 }while ((out1 = this.outcode (x1, y1)) != 0) {
19056 if ((out1 & out2) != 0) {
19057 return false;
19058 }if ((out1 & (5)) != 0) {
19059 var x = this.getX ();
19060 if ((out1 & 4) != 0) {
19061 x += this.getWidth ();
19062 }y1 = y1 + (x - x1) * (y2 - y1) / (x2 - x1);
19063 x1 = x;
19064 } else {
19065 var y = this.getY ();
19066 if ((out1 & 8) != 0) {
19067 y += this.getHeight ();
19068 }x1 = x1 + (y - y1) * (x2 - x1) / (y2 - y1);
19069 y1 = y;
19070 }}
19071 return true;
19072 }, "~N,~N,~N,~N");
19073 Clazz_defineMethod (c$, "intersectsLine", 
19074 function (l) {
19075 return this.intersectsLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
19076 }, "java.awt.geom.Line2D");
19077 Clazz_defineMethod (c$, "outcode", 
19078 function (p) {
19079 return this.outcode (p.getX (), p.getY ());
19080 }, "java.awt.geom.Point2D");
19081 Clazz_defineMethod (c$, "setFrame", 
19082 function (x, y, w, h) {
19083 this.setRect (x, y, w, h);
19084 }, "~N,~N,~N,~N");
19085 Clazz_overrideMethod (c$, "getBounds2D", 
19086 function () {
19087 return this.clone ();
19088 });
19089 Clazz_defineMethod (c$, "contains", 
19090 function (x, y) {
19091 var x0 = this.getX ();
19092 var y0 = this.getY ();
19093 return (x >= x0 && y >= y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19094 }, "~N,~N");
19095 Clazz_defineMethod (c$, "intersects", 
19096 function (x, y, w, h) {
19097 if (this.isEmpty () || w <= 0 || h <= 0) {
19098 return false;
19099 }var x0 = this.getX ();
19100 var y0 = this.getY ();
19101 return (x + w > x0 && y + h > y0 && x < x0 + this.getWidth () && y < y0 + this.getHeight ());
19102 }, "~N,~N,~N,~N");
19103 Clazz_defineMethod (c$, "contains", 
19104 function (x, y, w, h) {
19105 if (this.isEmpty () || w <= 0 || h <= 0) {
19106 return false;
19107 }var x0 = this.getX ();
19108 var y0 = this.getY ();
19109 return (x >= x0 && y >= y0 && (x + w) <= x0 + this.getWidth () && (y + h) <= y0 + this.getHeight ());
19110 }, "~N,~N,~N,~N");
19111 c$.intersect = Clazz_defineMethod (c$, "intersect", 
19112 function (src1, src2, dest) {
19113 var x1 = Math.max (src1.getMinX (), src2.getMinX ());
19114 var y1 = Math.max (src1.getMinY (), src2.getMinY ());
19115 var x2 = Math.min (src1.getMaxX (), src2.getMaxX ());
19116 var y2 = Math.min (src1.getMaxY (), src2.getMaxY ());
19117 dest.setFrame (x1, y1, x2 - x1, y2 - y1);
19118 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19119 c$.union = Clazz_defineMethod (c$, "union", 
19120 function (src1, src2, dest) {
19121 var x1 = Math.min (src1.getMinX (), src2.getMinX ());
19122 var y1 = Math.min (src1.getMinY (), src2.getMinY ());
19123 var x2 = Math.max (src1.getMaxX (), src2.getMaxX ());
19124 var y2 = Math.max (src1.getMaxY (), src2.getMaxY ());
19125 dest.setFrameFromDiagonal (x1, y1, x2, y2);
19126 }, "java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D,java.awt.geom.Rectangle2D");
19127 Clazz_defineMethod (c$, "add", 
19128 function (newx, newy) {
19129 var x1 = Math.min (this.getMinX (), newx);
19130 var x2 = Math.max (this.getMaxX (), newx);
19131 var y1 = Math.min (this.getMinY (), newy);
19132 var y2 = Math.max (this.getMaxY (), newy);
19133 this.setRect (x1, y1, x2 - x1, y2 - y1);
19134 }, "~N,~N");
19135 Clazz_defineMethod (c$, "add", 
19136 function (pt) {
19137 this.add (pt.getX (), pt.getY ());
19138 }, "java.awt.geom.Point2D");
19139 Clazz_defineMethod (c$, "add", 
19140 function (r) {
19141 var x1 = Math.min (this.getMinX (), r.getMinX ());
19142 var x2 = Math.max (this.getMaxX (), r.getMaxX ());
19143 var y1 = Math.min (this.getMinY (), r.getMinY ());
19144 var y2 = Math.max (this.getMaxY (), r.getMaxY ());
19145 this.setRect (x1, y1, x2 - x1, y2 - y1);
19146 }, "java.awt.geom.Rectangle2D");
19147 Clazz_defineMethod (c$, "getPathIterator", 
19148 function (at) {
19149 return  new java.awt.geom.RectIterator (this, at);
19150 }, "java.awt.geom.AffineTransform");
19151 Clazz_defineMethod (c$, "getPathIterator", 
19152 function (at, flatness) {
19153 return  new java.awt.geom.RectIterator (this, at);
19154 }, "java.awt.geom.AffineTransform,~N");
19155 Clazz_overrideMethod (c$, "hashCode", 
19156 function () {
19157 var bits = java.lang.Double.doubleToLongBits (this.getX ());
19158 bits += java.lang.Double.doubleToLongBits (this.getY ()) * 37;
19159 bits += java.lang.Double.doubleToLongBits (this.getWidth ()) * 43;
19160 bits += java.lang.Double.doubleToLongBits (this.getHeight ()) * 47;
19161 return ((bits) ^ ((bits >> 32)));
19162 });
19163 Clazz_overrideMethod (c$, "equals", 
19164 function (obj) {
19165 if (obj === this) {
19166 return true;
19167 }if (Clazz_instanceOf (obj, java.awt.geom.Rectangle2D)) {
19168 var r2d = obj;
19169 return ((this.getX () == r2d.getX ()) && (this.getY () == r2d.getY ()) && (this.getWidth () == r2d.getWidth ()) && (this.getHeight () == r2d.getHeight ()));
19170 }return false;
19171 }, "~O");
19172 Clazz_pu$h(self.c$);
19173 c$ = Clazz_decorateAsClass (function () {
19174 this.x = 0;
19175 this.y = 0;
19176 this.width = 0;
19177 this.height = 0;
19178 Clazz_instantialize (this, arguments);
19179 }, java.awt.geom.Rectangle2D, "Float", java.awt.geom.Rectangle2D);
19180 Clazz_makeConstructor (c$, 
19181 function (a, b, c, d) {
19182 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Float, []);
19183 {
19184 if (arguments.length == 0)
19185 return;
19186 }this.setRect (a, b, c, d);
19187 }, "~N,~N,~N,~N");
19188 Clazz_defineMethod (c$, "getX", 
19189 function () {
19190 return this.x;
19191 });
19192 Clazz_defineMethod (c$, "getY", 
19193 function () {
19194 return this.y;
19195 });
19196 Clazz_defineMethod (c$, "getWidth", 
19197 function () {
19198 return this.width;
19199 });
19200 Clazz_defineMethod (c$, "getHeight", 
19201 function () {
19202 return this.height;
19203 });
19204 Clazz_overrideMethod (c$, "isEmpty", 
19205 function () {
19206 return (this.width <= 0.0) || (this.height <= 0.0);
19207 });
19208 Clazz_defineMethod (c$, "setRect", 
19209 function (a, b, c, d) {
19210 this.x = a;
19211 this.y = b;
19212 this.width = c;
19213 this.height = d;
19214 }, "~N,~N,~N,~N");
19215 Clazz_defineMethod (c$, "setRect", 
19216 function (a, b, c, d) {
19217 this.x = a;
19218 this.y = b;
19219 this.width = c;
19220 this.height = d;
19221 }, "~N,~N,~N,~N");
19222 Clazz_defineMethod (c$, "setRect", 
19223 function (a) {
19224 this.x = a.getX ();
19225 this.y = a.getY ();
19226 this.width = a.getWidth ();
19227 this.height = a.getHeight ();
19228 }, "java.awt.geom.Rectangle2D");
19229 Clazz_defineMethod (c$, "outcode", 
19230 function (a, b) {
19231 var c = 0;
19232 if (this.width <= 0) {
19233 c |= 5;
19234 } else if (a < this.x) {
19235 c |= 1;
19236 } else if (a > this.x + this.width) {
19237 c |= 4;
19238 }if (this.height <= 0) {
19239 c |= 10;
19240 } else if (b < this.y) {
19241 c |= 2;
19242 } else if (b > this.y + this.height) {
19243 c |= 8;
19244 }return c;
19245 }, "~N,~N");
19246 Clazz_overrideMethod (c$, "getBounds2D", 
19247 function () {
19248 return  new java.awt.geom.Rectangle2D.Float (this.x, this.y, this.width, this.height);
19249 });
19250 Clazz_overrideMethod (c$, "createIntersection", 
19251 function (a) {
19252 var b;
19253 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19254 b =  new java.awt.geom.Rectangle2D.Float ();
19255 } else {
19256 b =  new java.awt.geom.Rectangle2D.Double ();
19257 }java.awt.geom.Rectangle2D.intersect (this, a, b);
19258 return b;
19259 }, "java.awt.geom.Rectangle2D");
19260 Clazz_overrideMethod (c$, "createUnion", 
19261 function (a) {
19262 var b;
19263 if (Clazz_instanceOf (a, java.awt.geom.Rectangle2D.Float)) {
19264 b =  new java.awt.geom.Rectangle2D.Float ();
19265 } else {
19266 b =  new java.awt.geom.Rectangle2D.Double ();
19267 }java.awt.geom.Rectangle2D.union (this, a, b);
19268 return b;
19269 }, "java.awt.geom.Rectangle2D");
19270 Clazz_overrideMethod (c$, "toString", 
19271 function () {
19272 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19273 });
19274 c$ = Clazz_p0p ();
19275 Clazz_pu$h(self.c$);
19276 c$ = Clazz_decorateAsClass (function () {
19277 this.x = 0;
19278 this.y = 0;
19279 this.width = 0;
19280 this.height = 0;
19281 Clazz_instantialize (this, arguments);
19282 }, java.awt.geom.Rectangle2D, "Double", java.awt.geom.Rectangle2D);
19283 Clazz_makeConstructor (c$, 
19284 function () {
19285 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19286 });
19287 Clazz_makeConstructor (c$, 
19288 function (a, b, c, d) {
19289 Clazz_superConstructor (this, java.awt.geom.Rectangle2D.Double, []);
19290 this.setRect (a, b, c, d);
19291 }, "~N,~N,~N,~N");
19292 Clazz_defineMethod (c$, "getX", 
19293 function () {
19294 return this.x;
19295 });
19296 Clazz_defineMethod (c$, "getY", 
19297 function () {
19298 return this.y;
19299 });
19300 Clazz_defineMethod (c$, "getWidth", 
19301 function () {
19302 return this.width;
19303 });
19304 Clazz_defineMethod (c$, "getHeight", 
19305 function () {
19306 return this.height;
19307 });
19308 Clazz_overrideMethod (c$, "isEmpty", 
19309 function () {
19310 return (this.width <= 0.0) || (this.height <= 0.0);
19311 });
19312 Clazz_defineMethod (c$, "setRect", 
19313 function (a, b, c, d) {
19314 this.x = a;
19315 this.y = b;
19316 this.width = c;
19317 this.height = d;
19318 }, "~N,~N,~N,~N");
19319 Clazz_defineMethod (c$, "setRect", 
19320 function (a) {
19321 this.x = a.getX ();
19322 this.y = a.getY ();
19323 this.width = a.getWidth ();
19324 this.height = a.getHeight ();
19325 }, "java.awt.geom.Rectangle2D");
19326 Clazz_defineMethod (c$, "outcode", 
19327 function (a, b) {
19328 var c = 0;
19329 if (this.width <= 0) {
19330 c |= 5;
19331 } else if (a < this.x) {
19332 c |= 1;
19333 } else if (a > this.x + this.width) {
19334 c |= 4;
19335 }if (this.height <= 0) {
19336 c |= 10;
19337 } else if (b < this.y) {
19338 c |= 2;
19339 } else if (b > this.y + this.height) {
19340 c |= 8;
19341 }return c;
19342 }, "~N,~N");
19343 Clazz_overrideMethod (c$, "getBounds2D", 
19344 function () {
19345 return  new java.awt.geom.Rectangle2D.Double (this.x, this.y, this.width, this.height);
19346 });
19347 Clazz_overrideMethod (c$, "createIntersection", 
19348 function (a) {
19349 var b =  new java.awt.geom.Rectangle2D.Double ();
19350 java.awt.geom.Rectangle2D.intersect (this, a, b);
19351 return b;
19352 }, "java.awt.geom.Rectangle2D");
19353 Clazz_overrideMethod (c$, "createUnion", 
19354 function (a) {
19355 var b =  new java.awt.geom.Rectangle2D.Double ();
19356 java.awt.geom.Rectangle2D.union (this, a, b);
19357 return b;
19358 }, "java.awt.geom.Rectangle2D");
19359 Clazz_overrideMethod (c$, "toString", 
19360 function () {
19361 return this.getClass ().getName () + "[x=" + this.x + ",y=" + this.y + ",w=" + this.width + ",h=" + this.height + "]";
19362 });
19363 c$ = Clazz_p0p ();
19364 Clazz_defineStatics (c$,
19365 "OUT_LEFT", 1,
19366 "OUT_TOP", 2,
19367 "OUT_RIGHT", 4,
19368 "OUT_BOTTOM", 8);
19369 });
19370 Clazz_declarePackage ("java.awt.geom");
19371 Clazz_load (["java.awt.Shape"], "java.awt.geom.RectangularShape", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator"], function () {
19372 c$ = Clazz_declareType (java.awt.geom, "RectangularShape", null, [java.awt.Shape, Cloneable]);
19373 Clazz_makeConstructor (c$, 
19374 function () {
19375 });
19376 Clazz_defineMethod (c$, "getMinX", 
19377 function () {
19378 return this.getX ();
19379 });
19380 Clazz_defineMethod (c$, "getMinY", 
19381 function () {
19382 return this.getY ();
19383 });
19384 Clazz_defineMethod (c$, "getMaxX", 
19385 function () {
19386 return this.getX () + this.getWidth ();
19387 });
19388 Clazz_defineMethod (c$, "getMaxY", 
19389 function () {
19390 return this.getY () + this.getHeight ();
19391 });
19392 Clazz_defineMethod (c$, "getCenterX", 
19393 function () {
19394 return this.getX () + this.getWidth () / 2.0;
19395 });
19396 Clazz_defineMethod (c$, "getCenterY", 
19397 function () {
19398 return this.getY () + this.getHeight () / 2.0;
19399 });
19400 Clazz_defineMethod (c$, "getFrame", 
19401 function () {
19402 return  new java.awt.geom.Rectangle2D.Double (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
19403 });
19404 Clazz_defineMethod (c$, "setFrame", 
19405 function (loc, size) {
19406 this.setFrame (loc.getX (), loc.getY (), size.getWidth (), size.getHeight ());
19407 }, "java.awt.geom.Point2D,java.awt.geom.Dimension2D");
19408 Clazz_defineMethod (c$, "setFrame", 
19409 function (r) {
19410 this.setFrame (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19411 }, "java.awt.geom.Rectangle2D");
19412 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19413 function (x1, y1, x2, y2) {
19414 if (x2 < x1) {
19415 var t = x1;
19416 x1 = x2;
19417 x2 = t;
19418 }if (y2 < y1) {
19419 var t = y1;
19420 y1 = y2;
19421 y2 = t;
19422 }this.setFrame (x1, y1, x2 - x1, y2 - y1);
19423 }, "~N,~N,~N,~N");
19424 Clazz_defineMethod (c$, "setFrameFromDiagonal", 
19425 function (p1, p2) {
19426 this.setFrameFromDiagonal (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
19427 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19428 Clazz_defineMethod (c$, "setFrameFromCenter", 
19429 function (centerX, centerY, cornerX, cornerY) {
19430 var halfW = Math.abs (cornerX - centerX);
19431 var halfH = Math.abs (cornerY - centerY);
19432 this.setFrame (centerX - halfW, centerY - halfH, halfW * 2.0, halfH * 2.0);
19433 }, "~N,~N,~N,~N");
19434 Clazz_defineMethod (c$, "setFrameFromCenter", 
19435 function (center, corner) {
19436 this.setFrameFromCenter (center.getX (), center.getY (), corner.getX (), corner.getY ());
19437 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
19438 Clazz_defineMethod (c$, "contains", 
19439 function (p) {
19440 return this.contains (p.getX (), p.getY ());
19441 }, "java.awt.geom.Point2D");
19442 Clazz_overrideMethod (c$, "intersects", 
19443 function (r) {
19444 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19445 }, "java.awt.geom.Rectangle2D");
19446 Clazz_defineMethod (c$, "contains", 
19447 function (r) {
19448 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
19449 }, "java.awt.geom.Rectangle2D");
19450 Clazz_overrideMethod (c$, "getBounds", 
19451 function () {
19452 var width = this.getWidth ();
19453 var height = this.getHeight ();
19454 if (width < 0 || height < 0) {
19455 return  new java.awt.Rectangle ();
19456 }var x = this.getX ();
19457 var y = this.getY ();
19458 var x1 = Math.floor (x);
19459 var y1 = Math.floor (y);
19460 var x2 = Math.ceil (x + width);
19461 var y2 = Math.ceil (y + height);
19462 return  new java.awt.Rectangle (Clazz_doubleToInt (x1), Clazz_doubleToInt (y1), Clazz_doubleToInt (x2 - x1), Clazz_doubleToInt (y2 - y1));
19463 });
19464 Clazz_overrideMethod (c$, "getPathIterator", 
19465 function (at, flatness) {
19466 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
19467 }, "java.awt.geom.AffineTransform,~N");
19468 Clazz_defineMethod (c$, "clone", 
19469 function () {
19470 try {
19471 return Clazz_superCall (this, java.awt.geom.RectangularShape, "clone", []);
19472 } catch (e) {
19473 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
19474 throw  new InternalError ();
19475 } else {
19476 throw e;
19477 }
19478 }
19479 });
19480 });
19481 Clazz_declarePackage ("java.awt.geom");
19482 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.FlatteningPathIterator", ["java.lang.IllegalArgumentException", "java.util.NoSuchElementException", "java.awt.geom.CubicCurve2D", "$.QuadCurve2D"], function () {
19483 c$ = Clazz_decorateAsClass (function () {
19484 this.src = null;
19485 this.squareflat = 0;
19486 this.limit = 0;
19487 this.hold = null;
19488 this.curx = 0;
19489 this.cury = 0;
19490 this.movx = 0;
19491 this.movy = 0;
19492 this.holdType = 0;
19493 this.holdEnd = 0;
19494 this.holdIndex = 0;
19495 this.levels = null;
19496 this.levelIndex = 0;
19497 this.done = false;
19498 Clazz_instantialize (this, arguments);
19499 }, java.awt.geom, "FlatteningPathIterator", null, java.awt.geom.PathIterator);
19500 Clazz_prepareFields (c$, function () {
19501 this.hold =  Clazz_newDoubleArray (14, 0);
19502 });
19503 Clazz_makeConstructor (c$, 
19504 function (src, flatness) {
19505 this.construct (src, flatness, 10);
19506 }, "java.awt.geom.PathIterator,~N");
19507 Clazz_makeConstructor (c$, 
19508 function (src, flatness, limit) {
19509 if (flatness < 0.0) {
19510 throw  new IllegalArgumentException ("flatness must be >= 0");
19511 }if (limit < 0) {
19512 throw  new IllegalArgumentException ("limit must be >= 0");
19513 }this.src = src;
19514 this.squareflat = flatness * flatness;
19515 this.limit = limit;
19516 this.levels =  Clazz_newIntArray (limit + 1, 0);
19517 this.next (false);
19518 }, "java.awt.geom.PathIterator,~N,~N");
19519 Clazz_defineMethod (c$, "getFlatness", 
19520 function () {
19521 return Math.sqrt (this.squareflat);
19522 });
19523 Clazz_defineMethod (c$, "getRecursionLimit", 
19524 function () {
19525 return this.limit;
19526 });
19527 Clazz_defineMethod (c$, "getWindingRule", 
19528 function () {
19529 return this.src.getWindingRule ();
19530 });
19531 Clazz_defineMethod (c$, "isDone", 
19532 function () {
19533 return this.done;
19534 });
19535 Clazz_defineMethod (c$, "ensureHoldCapacity", 
19536 function (want) {
19537 if (this.holdIndex - want < 0) {
19538 var have = this.hold.length - this.holdIndex;
19539 var newsize = this.hold.length + 24;
19540 var newhold =  Clazz_newDoubleArray (newsize, 0);
19541 System.arraycopy (this.hold, this.holdIndex, newhold, this.holdIndex + 24, have);
19542 this.hold = newhold;
19543 this.holdIndex += 24;
19544 this.holdEnd += 24;
19545 }}, "~N");
19546 Clazz_defineMethod (c$, "next", 
19547 function () {
19548 this.next (true);
19549 });
19550 Clazz_defineMethod (c$, "next", 
19551  function (doNext) {
19552 var level;
19553 if (this.holdIndex >= this.holdEnd) {
19554 if (doNext) {
19555 this.src.next ();
19556 }if (this.src.isDone ()) {
19557 this.done = true;
19558 return;
19559 }this.holdType = this.src.currentSegment (this.hold);
19560 this.levelIndex = 0;
19561 this.levels[0] = 0;
19562 }switch (this.holdType) {
19563 case 0:
19564 case 1:
19565 this.curx = this.hold[0];
19566 this.cury = this.hold[1];
19567 if (this.holdType == 0) {
19568 this.movx = this.curx;
19569 this.movy = this.cury;
19570 }this.holdIndex = 0;
19571 this.holdEnd = 0;
19572 break;
19573 case 4:
19574 this.curx = this.movx;
19575 this.cury = this.movy;
19576 this.holdIndex = 0;
19577 this.holdEnd = 0;
19578 break;
19579 case 2:
19580 if (this.holdIndex >= this.holdEnd) {
19581 this.holdIndex = this.hold.length - 6;
19582 this.holdEnd = this.hold.length - 2;
19583 this.hold[this.holdIndex + 0] = this.curx;
19584 this.hold[this.holdIndex + 1] = this.cury;
19585 this.hold[this.holdIndex + 2] = this.hold[0];
19586 this.hold[this.holdIndex + 3] = this.hold[1];
19587 this.hold[this.holdIndex + 4] = this.curx = this.hold[2];
19588 this.hold[this.holdIndex + 5] = this.cury = this.hold[3];
19589 }level = this.levels[this.levelIndex];
19590 while (level < this.limit) {
19591 if (java.awt.geom.QuadCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19592 break;
19593 }this.ensureHoldCapacity (4);
19594 java.awt.geom.QuadCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 4, this.hold, this.holdIndex);
19595 this.holdIndex -= 4;
19596 level++;
19597 this.levels[this.levelIndex] = level;
19598 this.levelIndex++;
19599 this.levels[this.levelIndex] = level;
19600 }
19601 this.holdIndex += 4;
19602 this.levelIndex--;
19603 break;
19604 case 3:
19605 if (this.holdIndex >= this.holdEnd) {
19606 this.holdIndex = this.hold.length - 8;
19607 this.holdEnd = this.hold.length - 2;
19608 this.hold[this.holdIndex + 0] = this.curx;
19609 this.hold[this.holdIndex + 1] = this.cury;
19610 this.hold[this.holdIndex + 2] = this.hold[0];
19611 this.hold[this.holdIndex + 3] = this.hold[1];
19612 this.hold[this.holdIndex + 4] = this.hold[2];
19613 this.hold[this.holdIndex + 5] = this.hold[3];
19614 this.hold[this.holdIndex + 6] = this.curx = this.hold[4];
19615 this.hold[this.holdIndex + 7] = this.cury = this.hold[5];
19616 }level = this.levels[this.levelIndex];
19617 while (level < this.limit) {
19618 if (java.awt.geom.CubicCurve2D.getFlatnessSq (this.hold, this.holdIndex) < this.squareflat) {
19619 break;
19620 }this.ensureHoldCapacity (6);
19621 java.awt.geom.CubicCurve2D.subdivide (this.hold, this.holdIndex, this.hold, this.holdIndex - 6, this.hold, this.holdIndex);
19622 this.holdIndex -= 6;
19623 level++;
19624 this.levels[this.levelIndex] = level;
19625 this.levelIndex++;
19626 this.levels[this.levelIndex] = level;
19627 }
19628 this.holdIndex += 6;
19629 this.levelIndex--;
19630 break;
19631 }
19632 }, "~B");
19633 Clazz_defineMethod (c$, "currentSegment", 
19634 function (coords) {
19635 if (this.isDone ()) {
19636 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19637 }var type = this.holdType;
19638 if (type != 4) {
19639 coords[0] = this.hold[this.holdIndex + 0];
19640 coords[1] = this.hold[this.holdIndex + 1];
19641 if (type != 0) {
19642 type = 1;
19643 }}return type;
19644 }, "~A");
19645 Clazz_defineMethod (c$, "currentSegment", 
19646 function (coords) {
19647 if (this.isDone ()) {
19648 throw  new java.util.NoSuchElementException ("flattening iterator out of bounds");
19649 }var type = this.holdType;
19650 if (type != 4) {
19651 coords[0] = this.hold[this.holdIndex + 0];
19652 coords[1] = this.hold[this.holdIndex + 1];
19653 if (type != 0) {
19654 type = 1;
19655 }}return type;
19656 }, "~A");
19657 Clazz_defineStatics (c$,
19658 "GROW_SIZE", 24);
19659 });
19660 Clazz_declarePackage ("java.awt.geom");
19661 c$ = Clazz_declareInterface (java.awt.geom, "PathIterator");
19662 Clazz_defineStatics (c$,
19663 "WIND_EVEN_ODD", 0,
19664 "WIND_NON_ZERO", 1,
19665 "SEG_MOVETO", 0,
19666 "SEG_LINETO", 1,
19667 "SEG_QUADTO", 2,
19668 "SEG_CUBICTO", 3,
19669 "SEG_CLOSE", 4);
19670 Clazz_declarePackage ("java.awt.geom");
19671 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 () {
19672 c$ = Clazz_declareType (java.awt.geom, "CubicCurve2D", null, [java.awt.Shape, Cloneable]);
19673 Clazz_makeConstructor (c$, 
19674 function () {
19675 });
19676 Clazz_defineMethod (c$, "setCurve", 
19677 function (coords, offset) {
19678 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]);
19679 }, "~A,~N");
19680 Clazz_defineMethod (c$, "setCurve", 
19681 function (p1, cp1, cp2, p2) {
19682 this.setCurve (p1.getX (), p1.getY (), cp1.getX (), cp1.getY (), cp2.getX (), cp2.getY (), p2.getX (), p2.getY ());
19683 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
19684 Clazz_defineMethod (c$, "setCurve", 
19685 function (pts, offset) {
19686 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 ());
19687 }, "~A,~N");
19688 Clazz_defineMethod (c$, "setCurve", 
19689 function (c) {
19690 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX1 (), c.getCtrlY1 (), c.getCtrlX2 (), c.getCtrlY2 (), c.getX2 (), c.getY2 ());
19691 }, "java.awt.geom.CubicCurve2D");
19692 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19693 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19694 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));
19695 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19696 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19697 function (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2) {
19698 return Math.sqrt (java.awt.geom.CubicCurve2D.getFlatnessSq (x1, y1, ctrlx1, ctrly1, ctrlx2, ctrly2, x2, y2));
19699 }, "~N,~N,~N,~N,~N,~N,~N,~N");
19700 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
19701 function (coords, offset) {
19702 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]);
19703 }, "~A,~N");
19704 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
19705 function (coords, offset) {
19706 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]);
19707 }, "~A,~N");
19708 Clazz_defineMethod (c$, "getFlatnessSq", 
19709 function () {
19710 return java.awt.geom.CubicCurve2D.getFlatnessSq (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19711 });
19712 Clazz_defineMethod (c$, "getFlatness", 
19713 function () {
19714 return java.awt.geom.CubicCurve2D.getFlatness (this.getX1 (), this.getY1 (), this.getCtrlX1 (), this.getCtrlY1 (), this.getCtrlX2 (), this.getCtrlY2 (), this.getX2 (), this.getY2 ());
19715 });
19716 Clazz_defineMethod (c$, "subdivide", 
19717 function (left, right) {
19718 java.awt.geom.CubicCurve2D.subdivide (this, left, right);
19719 }, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19720 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19721 function (src, left, right) {
19722 var x1 = src.getX1 ();
19723 var y1 = src.getY1 ();
19724 var ctrlx1 = src.getCtrlX1 ();
19725 var ctrly1 = src.getCtrlY1 ();
19726 var ctrlx2 = src.getCtrlX2 ();
19727 var ctrly2 = src.getCtrlY2 ();
19728 var x2 = src.getX2 ();
19729 var y2 = src.getY2 ();
19730 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19731 var centery = (ctrly1 + ctrly2) / 2.0;
19732 ctrlx1 = (x1 + ctrlx1) / 2.0;
19733 ctrly1 = (y1 + ctrly1) / 2.0;
19734 ctrlx2 = (x2 + ctrlx2) / 2.0;
19735 ctrly2 = (y2 + ctrly2) / 2.0;
19736 var ctrlx12 = (ctrlx1 + centerx) / 2.0;
19737 var ctrly12 = (ctrly1 + centery) / 2.0;
19738 var ctrlx21 = (ctrlx2 + centerx) / 2.0;
19739 var ctrly21 = (ctrly2 + centery) / 2.0;
19740 centerx = (ctrlx12 + ctrlx21) / 2.0;
19741 centery = (ctrly12 + ctrly21) / 2.0;
19742 if (left != null) {
19743 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx12, ctrly12, centerx, centery);
19744 }if (right != null) {
19745 right.setCurve (centerx, centery, ctrlx21, ctrly21, ctrlx2, ctrly2, x2, y2);
19746 }}, "java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D,java.awt.geom.CubicCurve2D");
19747 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
19748 function (src, srcoff, left, leftoff, right, rightoff) {
19749 var x1 = src[srcoff + 0];
19750 var y1 = src[srcoff + 1];
19751 var ctrlx1 = src[srcoff + 2];
19752 var ctrly1 = src[srcoff + 3];
19753 var ctrlx2 = src[srcoff + 4];
19754 var ctrly2 = src[srcoff + 5];
19755 var x2 = src[srcoff + 6];
19756 var y2 = src[srcoff + 7];
19757 if (left != null) {
19758 left[leftoff + 0] = x1;
19759 left[leftoff + 1] = y1;
19760 }if (right != null) {
19761 right[rightoff + 6] = x2;
19762 right[rightoff + 7] = y2;
19763 }x1 = (x1 + ctrlx1) / 2.0;
19764 y1 = (y1 + ctrly1) / 2.0;
19765 x2 = (x2 + ctrlx2) / 2.0;
19766 y2 = (y2 + ctrly2) / 2.0;
19767 var centerx = (ctrlx1 + ctrlx2) / 2.0;
19768 var centery = (ctrly1 + ctrly2) / 2.0;
19769 ctrlx1 = (x1 + centerx) / 2.0;
19770 ctrly1 = (y1 + centery) / 2.0;
19771 ctrlx2 = (x2 + centerx) / 2.0;
19772 ctrly2 = (y2 + centery) / 2.0;
19773 centerx = (ctrlx1 + ctrlx2) / 2.0;
19774 centery = (ctrly1 + ctrly2) / 2.0;
19775 if (left != null) {
19776 left[leftoff + 2] = x1;
19777 left[leftoff + 3] = y1;
19778 left[leftoff + 4] = ctrlx1;
19779 left[leftoff + 5] = ctrly1;
19780 left[leftoff + 6] = centerx;
19781 left[leftoff + 7] = centery;
19782 }if (right != null) {
19783 right[rightoff + 0] = centerx;
19784 right[rightoff + 1] = centery;
19785 right[rightoff + 2] = ctrlx2;
19786 right[rightoff + 3] = ctrly2;
19787 right[rightoff + 4] = x2;
19788 right[rightoff + 5] = y2;
19789 }}, "~A,~N,~A,~N,~A,~N");
19790 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19791 function (eqn) {
19792 return java.awt.geom.CubicCurve2D.solveCubic (eqn, eqn);
19793 }, "~A");
19794 c$.solveCubic = Clazz_defineMethod (c$, "solveCubic", 
19795 function (eqn, res) {
19796 var d = eqn[3];
19797 if (d == 0.0) {
19798 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
19799 }var a = eqn[2] / d;
19800 var b = eqn[1] / d;
19801 var c = eqn[0] / d;
19802 var roots = 0;
19803 var Q = (a * a - 3.0 * b) / 9.0;
19804 var R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0;
19805 var R2 = R * R;
19806 var Q3 = Q * Q * Q;
19807 a = a / 3.0;
19808 if (R2 < Q3) {
19809 var theta = Math.acos (R / Math.sqrt (Q3));
19810 Q = -2.0 * Math.sqrt (Q);
19811 if (res === eqn) {
19812 eqn =  Clazz_newDoubleArray (4, 0);
19813 System.arraycopy (res, 0, eqn, 0, 4);
19814 }res[roots++] = Q * Math.cos (theta / 3.0) - a;
19815 res[roots++] = Q * Math.cos ((theta + 6.283185307179586) / 3.0) - a;
19816 res[roots++] = Q * Math.cos ((theta - 6.283185307179586) / 3.0) - a;
19817 java.awt.geom.CubicCurve2D.fixRoots (res, eqn);
19818 } else {
19819 var neg = (R < 0.0);
19820 var S = Math.sqrt (R2 - Q3);
19821 if (neg) {
19822 R = -R;
19823 }var A = Math.pow (R + S, 0.3333333333333333);
19824 if (!neg) {
19825 A = -A;
19826 }var B = (A == 0.0) ? 0.0 : (Q / A);
19827 res[roots++] = (A + B) - a;
19828 }return roots;
19829 }, "~A,~A");
19830 c$.fixRoots = Clazz_defineMethod (c$, "fixRoots", 
19831  function (res, eqn) {
19832 var EPSILON = 1E-5;
19833 for (var i = 0; i < 3; i++) {
19834 var t = res[i];
19835 if (Math.abs (t) < 1.0E-5) {
19836 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 0, eqn);
19837 } else if (Math.abs (t - 1) < 1.0E-5) {
19838 res[i] = java.awt.geom.CubicCurve2D.findZero (t, 1, eqn);
19839 }}
19840 }, "~A,~A");
19841 c$.solveEqn = Clazz_defineMethod (c$, "solveEqn", 
19842  function (eqn, order, t) {
19843 var v = eqn[order];
19844 while (--order >= 0) {
19845 v = v * t + eqn[order];
19846 }
19847 return v;
19848 }, "~A,~N,~N");
19849 c$.findZero = Clazz_defineMethod (c$, "findZero", 
19850  function (t, target, eqn) {
19851 var slopeqn =  Clazz_newDoubleArray (-1, [eqn[1], 2 * eqn[2], 3 * eqn[3]]);
19852 var slope;
19853 var origdelta = 0;
19854 var origt = t;
19855 while (true) {
19856 slope = java.awt.geom.CubicCurve2D.solveEqn (slopeqn, 2, t);
19857 if (slope == 0) {
19858 return t;
19859 }var y = java.awt.geom.CubicCurve2D.solveEqn (eqn, 3, t);
19860 if (y == 0) {
19861 return t;
19862 }var delta = -(y / slope);
19863 if (origdelta == 0) {
19864 origdelta = delta;
19865 }if (t < target) {
19866 if (delta < 0) return t;
19867 } else if (t > target) {
19868 if (delta > 0) return t;
19869 } else {
19870 return (delta > 0 ? (target + 4.9E-324) : (target - 4.9E-324));
19871 }var newt = t + delta;
19872 if (t == newt) {
19873 return t;
19874 }if (delta * origdelta < 0) {
19875 var tag = (origt < t ? java.awt.geom.CubicCurve2D.getTag (target, origt, t) : java.awt.geom.CubicCurve2D.getTag (target, t, origt));
19876 if (tag != 0) {
19877 return (origt + t) / 2;
19878 }t = target;
19879 } else {
19880 t = newt;
19881 }}
19882 }, "~N,~N,~A");
19883 Clazz_defineMethod (c$, "contains", 
19884 function (x, y) {
19885 if (!(x * 0.0 + y * 0.0 == 0.0)) {
19886 return false;
19887 }var x1 = this.getX1 ();
19888 var y1 = this.getY1 ();
19889 var x2 = this.getX2 ();
19890 var y2 = this.getY2 ();
19891 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));
19892 return ((crossings & 1) == 1);
19893 }, "~N,~N");
19894 Clazz_defineMethod (c$, "contains", 
19895 function (p) {
19896 return this.contains (p.getX (), p.getY ());
19897 }, "java.awt.geom.Point2D");
19898 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
19899  function (eqn, val, c1, cp1, cp2, c2) {
19900 eqn[0] = c1 - val;
19901 eqn[1] = (cp1 - c1) * 3.0;
19902 eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0;
19903 eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1;
19904 return;
19905 }, "~A,~N,~N,~N,~N,~N");
19906 c$.evalCubic = Clazz_defineMethod (c$, "evalCubic", 
19907  function (vals, num, include0, include1, inflect, c1, cp1, cp2, c2) {
19908 var j = 0;
19909 for (var i = 0; i < num; i++) {
19910 var t = vals[i];
19911 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + (2 * inflect[2] + 3 * inflect[3] * t) * t != 0)) {
19912 var u = 1 - t;
19913 vals[j++] = c1 * u * u * u + 3 * cp1 * t * u * u + 3 * cp2 * t * t * u + c2 * t * t * t;
19914 }}
19915 return j;
19916 }, "~A,~N,~B,~B,~A,~N,~N,~N,~N");
19917 c$.getTag = Clazz_defineMethod (c$, "getTag", 
19918  function (coord, low, high) {
19919 if (coord <= low) {
19920 return (coord < low ? -2 : -1);
19921 }if (coord >= high) {
19922 return (coord > high ? 2 : 1);
19923 }return 0;
19924 }, "~N,~N,~N");
19925 c$.inwards = Clazz_defineMethod (c$, "inwards", 
19926  function (pttag, opt1tag, opt2tag) {
19927 switch (pttag) {
19928 case -2:
19929 case 2:
19930 default:
19931 return false;
19932 case -1:
19933 return (opt1tag >= 0 || opt2tag >= 0);
19934 case 0:
19935 return true;
19936 case 1:
19937 return (opt1tag <= 0 || opt2tag <= 0);
19938 }
19939 }, "~N,~N,~N");
19940 Clazz_defineMethod (c$, "intersects", 
19941 function (x, y, w, h) {
19942 if (w <= 0 || h <= 0) {
19943 return false;
19944 }var x1 = this.getX1 ();
19945 var y1 = this.getY1 ();
19946 var x1tag = java.awt.geom.CubicCurve2D.getTag (x1, x, x + w);
19947 var y1tag = java.awt.geom.CubicCurve2D.getTag (y1, y, y + h);
19948 if (x1tag == 0 && y1tag == 0) {
19949 return true;
19950 }var x2 = this.getX2 ();
19951 var y2 = this.getY2 ();
19952 var x2tag = java.awt.geom.CubicCurve2D.getTag (x2, x, x + w);
19953 var y2tag = java.awt.geom.CubicCurve2D.getTag (y2, y, y + h);
19954 if (x2tag == 0 && y2tag == 0) {
19955 return true;
19956 }var ctrlx1 = this.getCtrlX1 ();
19957 var ctrly1 = this.getCtrlY1 ();
19958 var ctrlx2 = this.getCtrlX2 ();
19959 var ctrly2 = this.getCtrlY2 ();
19960 var ctrlx1tag = java.awt.geom.CubicCurve2D.getTag (ctrlx1, x, x + w);
19961 var ctrly1tag = java.awt.geom.CubicCurve2D.getTag (ctrly1, y, y + h);
19962 var ctrlx2tag = java.awt.geom.CubicCurve2D.getTag (ctrlx2, x, x + w);
19963 var ctrly2tag = java.awt.geom.CubicCurve2D.getTag (ctrly2, y, y + h);
19964 if (x1tag < 0 && x2tag < 0 && ctrlx1tag < 0 && ctrlx2tag < 0) {
19965 return false;
19966 }if (y1tag < 0 && y2tag < 0 && ctrly1tag < 0 && ctrly2tag < 0) {
19967 return false;
19968 }if (x1tag > 0 && x2tag > 0 && ctrlx1tag > 0 && ctrlx2tag > 0) {
19969 return false;
19970 }if (y1tag > 0 && y2tag > 0 && ctrly1tag > 0 && ctrly2tag > 0) {
19971 return false;
19972 }if (java.awt.geom.CubicCurve2D.inwards (x1tag, x2tag, ctrlx1tag) && java.awt.geom.CubicCurve2D.inwards (y1tag, y2tag, ctrly1tag)) {
19973 return true;
19974 }if (java.awt.geom.CubicCurve2D.inwards (x2tag, x1tag, ctrlx2tag) && java.awt.geom.CubicCurve2D.inwards (y2tag, y1tag, ctrly2tag)) {
19975 return true;
19976 }var xoverlap = (x1tag * x2tag <= 0);
19977 var yoverlap = (y1tag * y2tag <= 0);
19978 if (x1tag == 0 && x2tag == 0 && yoverlap) {
19979 return true;
19980 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
19981 return true;
19982 }var eqn =  Clazz_newDoubleArray (4, 0);
19983 var res =  Clazz_newDoubleArray (4, 0);
19984 if (!yoverlap) {
19985 java.awt.geom.CubicCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly1, ctrly2, y2);
19986 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
19987 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, x1, ctrlx1, ctrlx2, x2);
19988 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], x, x + w) * java.awt.geom.CubicCurve2D.getTag (res[1], x, x + w) <= 0);
19989 }if (!xoverlap) {
19990 java.awt.geom.CubicCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
19991 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
19992 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
19993 return (num == 2 && java.awt.geom.CubicCurve2D.getTag (res[0], y, y + h) * java.awt.geom.CubicCurve2D.getTag (res[1], y, y + h) <= 0);
19994 }var dx = x2 - x1;
19995 var dy = y2 - y1;
19996 var k = y2 * x1 - x2 * y1;
19997 var c1tag;
19998 var c2tag;
19999 if (y1tag == 0) {
20000 c1tag = x1tag;
20001 } else {
20002 c1tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
20003 }if (y2tag == 0) {
20004 c2tag = x2tag;
20005 } else {
20006 c2tag = java.awt.geom.CubicCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
20007 }if (c1tag * c2tag <= 0) {
20008 return true;
20009 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
20010 java.awt.geom.CubicCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx1, ctrlx2, x2);
20011 var num = java.awt.geom.CubicCurve2D.solveCubic (eqn, res);
20012 num = java.awt.geom.CubicCurve2D.evalCubic (res, num, true, true, null, y1, ctrly1, ctrly2, y2);
20013 var tags =  Clazz_newIntArray (num + 1, 0);
20014 for (var i = 0; i < num; i++) {
20015 tags[i] = java.awt.geom.CubicCurve2D.getTag (res[i], y, y + h);
20016 }
20017 tags[num] = c1tag;
20018 java.util.Arrays.sort (tags);
20019 return ((num >= 1 && tags[0] * tags[1] <= 0) || (num >= 3 && tags[2] * tags[3] <= 0));
20020 }, "~N,~N,~N,~N");
20021 Clazz_defineMethod (c$, "intersects", 
20022 function (r) {
20023 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20024 }, "java.awt.geom.Rectangle2D");
20025 Clazz_defineMethod (c$, "contains", 
20026 function (x, y, w, h) {
20027 if (w <= 0 || h <= 0) {
20028 return false;
20029 }if (!(this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h))) {
20030 return false;
20031 }var rect =  new java.awt.geom.Rectangle2D.Double (x, y, w, h);
20032 return !rect.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20033 }, "~N,~N,~N,~N");
20034 Clazz_defineMethod (c$, "contains", 
20035 function (r) {
20036 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20037 }, "java.awt.geom.Rectangle2D");
20038 Clazz_overrideMethod (c$, "getBounds", 
20039 function () {
20040 return this.getBounds2D ().getBounds ();
20041 });
20042 Clazz_defineMethod (c$, "getPathIterator", 
20043 function (at) {
20044 return (swingjs.api.Interface.getInstance ("java.awt.geom.CubicInterator", false)).set (this, at);
20045 }, "java.awt.geom.AffineTransform");
20046 Clazz_defineMethod (c$, "getPathIterator", 
20047 function (at, flatness) {
20048 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
20049 }, "java.awt.geom.AffineTransform,~N");
20050 Clazz_defineMethod (c$, "clone", 
20051 function () {
20052 try {
20053 return Clazz_superCall (this, java.awt.geom.CubicCurve2D, "clone", []);
20054 } catch (e) {
20055 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20056 throw  new InternalError ();
20057 } else {
20058 throw e;
20059 }
20060 }
20061 });
20062 Clazz_pu$h(self.c$);
20063 c$ = Clazz_decorateAsClass (function () {
20064 this.x1 = 0;
20065 this.y1 = 0;
20066 this.ctrlx1 = 0;
20067 this.ctrly1 = 0;
20068 this.ctrlx2 = 0;
20069 this.ctrly2 = 0;
20070 this.x2 = 0;
20071 this.y2 = 0;
20072 Clazz_instantialize (this, arguments);
20073 }, java.awt.geom.CubicCurve2D, "Float", java.awt.geom.CubicCurve2D);
20074 Clazz_makeConstructor (c$, 
20075 function () {
20076 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20077 });
20078 Clazz_makeConstructor (c$, 
20079 function (a, b, c, d, e, f, g, h) {
20080 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Float, []);
20081 this.setCurve (a, b, c, d, e, f, g, h);
20082 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20083 Clazz_overrideMethod (c$, "getX1", 
20084 function () {
20085 return this.x1;
20086 });
20087 Clazz_overrideMethod (c$, "getY1", 
20088 function () {
20089 return this.y1;
20090 });
20091 Clazz_overrideMethod (c$, "getP1", 
20092 function () {
20093 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20094 });
20095 Clazz_overrideMethod (c$, "getCtrlX1", 
20096 function () {
20097 return this.ctrlx1;
20098 });
20099 Clazz_overrideMethod (c$, "getCtrlY1", 
20100 function () {
20101 return this.ctrly1;
20102 });
20103 Clazz_overrideMethod (c$, "getCtrlP1", 
20104 function () {
20105 return  new java.awt.geom.Point2D.Float (this.ctrlx1, this.ctrly1);
20106 });
20107 Clazz_overrideMethod (c$, "getCtrlX2", 
20108 function () {
20109 return this.ctrlx2;
20110 });
20111 Clazz_overrideMethod (c$, "getCtrlY2", 
20112 function () {
20113 return this.ctrly2;
20114 });
20115 Clazz_overrideMethod (c$, "getCtrlP2", 
20116 function () {
20117 return  new java.awt.geom.Point2D.Float (this.ctrlx2, this.ctrly2);
20118 });
20119 Clazz_overrideMethod (c$, "getX2", 
20120 function () {
20121 return this.x2;
20122 });
20123 Clazz_overrideMethod (c$, "getY2", 
20124 function () {
20125 return this.y2;
20126 });
20127 Clazz_overrideMethod (c$, "getP2", 
20128 function () {
20129 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20130 });
20131 Clazz_defineMethod (c$, "setCurve", 
20132 function (a, b, c, d, e, f, g, h) {
20133 this.x1 = a;
20134 this.y1 = b;
20135 this.ctrlx1 = c;
20136 this.ctrly1 = d;
20137 this.ctrlx2 = e;
20138 this.ctrly2 = f;
20139 this.x2 = g;
20140 this.y2 = h;
20141 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20142 Clazz_defineMethod (c$, "setCurve", 
20143 function (a, b, c, d, e, f, g, h) {
20144 this.x1 = a;
20145 this.y1 = b;
20146 this.ctrlx1 = c;
20147 this.ctrly1 = d;
20148 this.ctrlx2 = e;
20149 this.ctrly2 = f;
20150 this.x2 = g;
20151 this.y2 = h;
20152 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20153 Clazz_overrideMethod (c$, "getBounds2D", 
20154 function () {
20155 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20156 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20157 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20158 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20159 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
20160 });
20161 c$ = Clazz_p0p ();
20162 Clazz_pu$h(self.c$);
20163 c$ = Clazz_decorateAsClass (function () {
20164 this.x1 = 0;
20165 this.y1 = 0;
20166 this.ctrlx1 = 0;
20167 this.ctrly1 = 0;
20168 this.ctrlx2 = 0;
20169 this.ctrly2 = 0;
20170 this.x2 = 0;
20171 this.y2 = 0;
20172 Clazz_instantialize (this, arguments);
20173 }, java.awt.geom.CubicCurve2D, "Double", java.awt.geom.CubicCurve2D);
20174 Clazz_makeConstructor (c$, 
20175 function () {
20176 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20177 });
20178 Clazz_makeConstructor (c$, 
20179 function (a, b, c, d, e, f, g, h) {
20180 Clazz_superConstructor (this, java.awt.geom.CubicCurve2D.Double, []);
20181 this.setCurve (a, b, c, d, e, f, g, h);
20182 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20183 Clazz_overrideMethod (c$, "getX1", 
20184 function () {
20185 return this.x1;
20186 });
20187 Clazz_overrideMethod (c$, "getY1", 
20188 function () {
20189 return this.y1;
20190 });
20191 Clazz_overrideMethod (c$, "getP1", 
20192 function () {
20193 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20194 });
20195 Clazz_overrideMethod (c$, "getCtrlX1", 
20196 function () {
20197 return this.ctrlx1;
20198 });
20199 Clazz_overrideMethod (c$, "getCtrlY1", 
20200 function () {
20201 return this.ctrly1;
20202 });
20203 Clazz_overrideMethod (c$, "getCtrlP1", 
20204 function () {
20205 return  new java.awt.geom.Point2D.Double (this.ctrlx1, this.ctrly1);
20206 });
20207 Clazz_overrideMethod (c$, "getCtrlX2", 
20208 function () {
20209 return this.ctrlx2;
20210 });
20211 Clazz_overrideMethod (c$, "getCtrlY2", 
20212 function () {
20213 return this.ctrly2;
20214 });
20215 Clazz_overrideMethod (c$, "getCtrlP2", 
20216 function () {
20217 return  new java.awt.geom.Point2D.Double (this.ctrlx2, this.ctrly2);
20218 });
20219 Clazz_overrideMethod (c$, "getX2", 
20220 function () {
20221 return this.x2;
20222 });
20223 Clazz_overrideMethod (c$, "getY2", 
20224 function () {
20225 return this.y2;
20226 });
20227 Clazz_overrideMethod (c$, "getP2", 
20228 function () {
20229 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20230 });
20231 Clazz_defineMethod (c$, "setCurve", 
20232 function (a, b, c, d, e, f, g, h) {
20233 this.x1 = a;
20234 this.y1 = b;
20235 this.ctrlx1 = c;
20236 this.ctrly1 = d;
20237 this.ctrlx2 = e;
20238 this.ctrly2 = f;
20239 this.x2 = g;
20240 this.y2 = h;
20241 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20242 Clazz_overrideMethod (c$, "getBounds2D", 
20243 function () {
20244 var a = Math.min (Math.min (this.x1, this.x2), Math.min (this.ctrlx1, this.ctrlx2));
20245 var b = Math.min (Math.min (this.y1, this.y2), Math.min (this.ctrly1, this.ctrly2));
20246 var c = Math.max (Math.max (this.x1, this.x2), Math.max (this.ctrlx1, this.ctrlx2));
20247 var d = Math.max (Math.max (this.y1, this.y2), Math.max (this.ctrly1, this.ctrly2));
20248 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
20249 });
20250 c$ = Clazz_p0p ();
20251 Clazz_defineStatics (c$,
20252 "BELOW", -2,
20253 "LOWEDGE", -1,
20254 "INSIDE", 0,
20255 "HIGHEDGE", 1,
20256 "ABOVE", 2);
20257 });
20258 Clazz_declarePackage ("java.awt.geom");
20259 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.CubicIterator", ["java.util.NoSuchElementException"], function () {
20260 c$ = Clazz_decorateAsClass (function () {
20261 this.cubic = null;
20262 this.affine = null;
20263 this.index = 0;
20264 Clazz_instantialize (this, arguments);
20265 }, java.awt.geom, "CubicIterator", null, java.awt.geom.PathIterator);
20266 Clazz_makeConstructor (c$, 
20267 function () {
20268 });
20269 Clazz_makeConstructor (c$, 
20270 function (q, at) {
20271 this.set (q, at);
20272 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20273 Clazz_defineMethod (c$, "set", 
20274 function (q, at) {
20275 this.cubic = q;
20276 this.affine = at;
20277 return this;
20278 }, "java.awt.geom.CubicCurve2D,java.awt.geom.AffineTransform");
20279 Clazz_overrideMethod (c$, "getWindingRule", 
20280 function () {
20281 return 1;
20282 });
20283 Clazz_overrideMethod (c$, "isDone", 
20284 function () {
20285 return (this.index > 1);
20286 });
20287 Clazz_overrideMethod (c$, "next", 
20288 function () {
20289 this.index++;
20290 });
20291 Clazz_defineMethod (c$, "currentSegment", 
20292 function (coords) {
20293 if (this.isDone ()) {
20294 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20295 }var type;
20296 if (this.index == 0) {
20297 coords[0] = this.cubic.getX1 ();
20298 coords[1] = this.cubic.getY1 ();
20299 type = 0;
20300 } else {
20301 coords[0] = this.cubic.getCtrlX1 ();
20302 coords[1] = this.cubic.getCtrlY1 ();
20303 coords[2] = this.cubic.getCtrlX2 ();
20304 coords[3] = this.cubic.getCtrlY2 ();
20305 coords[4] = this.cubic.getX2 ();
20306 coords[5] = this.cubic.getY2 ();
20307 type = 3;
20308 }if (this.affine != null) {
20309 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20310 }return type;
20311 }, "~A");
20312 Clazz_defineMethod (c$, "currentSegment", 
20313 function (coords) {
20314 if (this.isDone ()) {
20315 throw  new java.util.NoSuchElementException ("cubic iterator iterator out of bounds");
20316 }var type;
20317 if (this.index == 0) {
20318 coords[0] = this.cubic.getX1 ();
20319 coords[1] = this.cubic.getY1 ();
20320 type = 0;
20321 } else {
20322 coords[0] = this.cubic.getCtrlX1 ();
20323 coords[1] = this.cubic.getCtrlY1 ();
20324 coords[2] = this.cubic.getCtrlX2 ();
20325 coords[3] = this.cubic.getCtrlY2 ();
20326 coords[4] = this.cubic.getX2 ();
20327 coords[5] = this.cubic.getY2 ();
20328 type = 3;
20329 }if (this.affine != null) {
20330 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 3);
20331 }return type;
20332 }, "~A");
20333 });
20334 Clazz_declarePackage ("java.awt.geom");
20335 Clazz_load (["java.awt.Shape"], "java.awt.geom.Line2D", ["java.lang.InternalError", "java.awt.geom.LineIterator", "$.Point2D", "$.Rectangle2D"], function () {
20336 c$ = Clazz_declareType (java.awt.geom, "Line2D", null, [java.awt.Shape, Cloneable]);
20337 Clazz_makeConstructor (c$, 
20338 function () {
20339 });
20340 Clazz_defineMethod (c$, "setLine", 
20341 function (p1, p2) {
20342 this.setLine (p1.getX (), p1.getY (), p2.getX (), p2.getY ());
20343 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20344 Clazz_defineMethod (c$, "setLine", 
20345 function (l) {
20346 this.setLine (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 ());
20347 }, "java.awt.geom.Line2D");
20348 c$.relativeCCW = Clazz_defineMethod (c$, "relativeCCW", 
20349 function (x1, y1, x2, y2, px, py) {
20350 x2 -= x1;
20351 y2 -= y1;
20352 px -= x1;
20353 py -= y1;
20354 var ccw = px * y2 - py * x2;
20355 if (ccw == 0.0) {
20356 ccw = px * x2 + py * y2;
20357 if (ccw > 0.0) {
20358 px -= x2;
20359 py -= y2;
20360 ccw = px * x2 + py * y2;
20361 if (ccw < 0.0) {
20362 ccw = 0.0;
20363 }}}return (ccw < 0.0) ? -1 : ((ccw > 0.0) ? 1 : 0);
20364 }, "~N,~N,~N,~N,~N,~N");
20365 Clazz_defineMethod (c$, "relativeCCW", 
20366 function (px, py) {
20367 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20368 }, "~N,~N");
20369 Clazz_defineMethod (c$, "relativeCCW", 
20370 function (p) {
20371 return java.awt.geom.Line2D.relativeCCW (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), p.getX (), p.getY ());
20372 }, "java.awt.geom.Point2D");
20373 c$.linesIntersect = Clazz_defineMethod (c$, "linesIntersect", 
20374 function (x1, y1, x2, y2, x3, y3, x4, y4) {
20375 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));
20376 }, "~N,~N,~N,~N,~N,~N,~N,~N");
20377 Clazz_defineMethod (c$, "intersectsLine", 
20378 function (x1, y1, x2, y2) {
20379 return java.awt.geom.Line2D.linesIntersect (x1, y1, x2, y2, this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20380 }, "~N,~N,~N,~N");
20381 Clazz_defineMethod (c$, "intersectsLine", 
20382 function (l) {
20383 return java.awt.geom.Line2D.linesIntersect (l.getX1 (), l.getY1 (), l.getX2 (), l.getY2 (), this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20384 }, "java.awt.geom.Line2D");
20385 c$.ptSegDistSq = Clazz_defineMethod (c$, "ptSegDistSq", 
20386 function (x1, y1, x2, y2, px, py) {
20387 x2 -= x1;
20388 y2 -= y1;
20389 px -= x1;
20390 py -= y1;
20391 var dotprod = px * x2 + py * y2;
20392 var projlenSq;
20393 if (dotprod <= 0.0) {
20394 projlenSq = 0.0;
20395 } else {
20396 px = x2 - px;
20397 py = y2 - py;
20398 dotprod = px * x2 + py * y2;
20399 if (dotprod <= 0.0) {
20400 projlenSq = 0.0;
20401 } else {
20402 projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20403 }}var lenSq = px * px + py * py - projlenSq;
20404 if (lenSq < 0) {
20405 lenSq = 0;
20406 }return lenSq;
20407 }, "~N,~N,~N,~N,~N,~N");
20408 c$.ptSegDist = Clazz_defineMethod (c$, "ptSegDist", 
20409 function (x1, y1, x2, y2, px, py) {
20410 return Math.sqrt (java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, px, py));
20411 }, "~N,~N,~N,~N,~N,~N");
20412 Clazz_defineMethod (c$, "ptSegDistSq", 
20413 function (px, py) {
20414 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20415 }, "~N,~N");
20416 Clazz_defineMethod (c$, "ptSegDistSq", 
20417 function (pt) {
20418 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20419 }, "java.awt.geom.Point2D");
20420 Clazz_defineMethod (c$, "ptSegDist", 
20421 function (px, py) {
20422 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20423 }, "~N,~N");
20424 Clazz_defineMethod (c$, "ptSegDist", 
20425 function (pt) {
20426 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20427 }, "java.awt.geom.Point2D");
20428 c$.ptLineDistSq = Clazz_defineMethod (c$, "ptLineDistSq", 
20429 function (x1, y1, x2, y2, px, py) {
20430 x2 -= x1;
20431 y2 -= y1;
20432 px -= x1;
20433 py -= y1;
20434 var dotprod = px * x2 + py * y2;
20435 var projlenSq = dotprod * dotprod / (x2 * x2 + y2 * y2);
20436 var lenSq = px * px + py * py - projlenSq;
20437 if (lenSq < 0) {
20438 lenSq = 0;
20439 }return lenSq;
20440 }, "~N,~N,~N,~N,~N,~N");
20441 c$.ptLineDist = Clazz_defineMethod (c$, "ptLineDist", 
20442 function (x1, y1, x2, y2, px, py) {
20443 return Math.sqrt (java.awt.geom.Line2D.ptLineDistSq (x1, y1, x2, y2, px, py));
20444 }, "~N,~N,~N,~N,~N,~N");
20445 Clazz_defineMethod (c$, "ptLineDistSq", 
20446 function (px, py) {
20447 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20448 }, "~N,~N");
20449 Clazz_defineMethod (c$, "ptLineDistSq", 
20450 function (pt) {
20451 return java.awt.geom.Line2D.ptLineDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20452 }, "java.awt.geom.Point2D");
20453 Clazz_defineMethod (c$, "ptLineDist", 
20454 function (px, py) {
20455 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), px, py);
20456 }, "~N,~N");
20457 Clazz_defineMethod (c$, "ptLineDist", 
20458 function (pt) {
20459 return java.awt.geom.Line2D.ptLineDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), pt.getX (), pt.getY ());
20460 }, "java.awt.geom.Point2D");
20461 Clazz_defineMethod (c$, "contains", 
20462 function (x, y) {
20463 return false;
20464 }, "~N,~N");
20465 Clazz_defineMethod (c$, "contains", 
20466 function (p) {
20467 return false;
20468 }, "java.awt.geom.Point2D");
20469 Clazz_defineMethod (c$, "intersects", 
20470 function (x, y, w, h) {
20471 return this.intersects ( new java.awt.geom.Rectangle2D.Double (x, y, w, h));
20472 }, "~N,~N,~N,~N");
20473 Clazz_defineMethod (c$, "intersects", 
20474 function (r) {
20475 return r.intersectsLine (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 ());
20476 }, "java.awt.geom.Rectangle2D");
20477 Clazz_defineMethod (c$, "contains", 
20478 function (x, y, w, h) {
20479 return false;
20480 }, "~N,~N,~N,~N");
20481 Clazz_defineMethod (c$, "contains", 
20482 function (r) {
20483 return false;
20484 }, "java.awt.geom.Rectangle2D");
20485 Clazz_overrideMethod (c$, "getBounds", 
20486 function () {
20487 return this.getBounds2D ().getBounds ();
20488 });
20489 Clazz_defineMethod (c$, "getPathIterator", 
20490 function (at) {
20491 return  new java.awt.geom.LineIterator (this, at);
20492 }, "java.awt.geom.AffineTransform");
20493 Clazz_defineMethod (c$, "getPathIterator", 
20494 function (at, flatness) {
20495 return  new java.awt.geom.LineIterator (this, at);
20496 }, "java.awt.geom.AffineTransform,~N");
20497 Clazz_defineMethod (c$, "clone", 
20498 function () {
20499 try {
20500 return Clazz_superCall (this, java.awt.geom.Line2D, "clone", []);
20501 } catch (e) {
20502 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
20503 throw  new InternalError ();
20504 } else {
20505 throw e;
20506 }
20507 }
20508 });
20509 Clazz_pu$h(self.c$);
20510 c$ = Clazz_decorateAsClass (function () {
20511 this.x1 = 0;
20512 this.y1 = 0;
20513 this.x2 = 0;
20514 this.y2 = 0;
20515 Clazz_instantialize (this, arguments);
20516 }, java.awt.geom.Line2D, "Float", java.awt.geom.Line2D);
20517 Clazz_makeConstructor (c$, 
20518 function () {
20519 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20520 });
20521 Clazz_makeConstructor (c$, 
20522 function (a, b, c, d) {
20523 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20524 this.setLine (a, b, c, d);
20525 }, "~N,~N,~N,~N");
20526 Clazz_makeConstructor (c$, 
20527 function (a, b) {
20528 Clazz_superConstructor (this, java.awt.geom.Line2D.Float, []);
20529 this.setLine (a, b);
20530 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20531 Clazz_overrideMethod (c$, "getX1", 
20532 function () {
20533 return this.x1;
20534 });
20535 Clazz_overrideMethod (c$, "getY1", 
20536 function () {
20537 return this.y1;
20538 });
20539 Clazz_overrideMethod (c$, "getP1", 
20540 function () {
20541 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
20542 });
20543 Clazz_overrideMethod (c$, "getX2", 
20544 function () {
20545 return this.x2;
20546 });
20547 Clazz_overrideMethod (c$, "getY2", 
20548 function () {
20549 return this.y2;
20550 });
20551 Clazz_overrideMethod (c$, "getP2", 
20552 function () {
20553 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
20554 });
20555 Clazz_defineMethod (c$, "setLine", 
20556 function (a, b, c, d) {
20557 this.x1 = a;
20558 this.y1 = b;
20559 this.x2 = c;
20560 this.y2 = d;
20561 }, "~N,~N,~N,~N");
20562 Clazz_defineMethod (c$, "setLine", 
20563 function (a, b, c, d) {
20564 this.x1 = a;
20565 this.y1 = b;
20566 this.x2 = c;
20567 this.y2 = d;
20568 }, "~N,~N,~N,~N");
20569 Clazz_overrideMethod (c$, "getBounds2D", 
20570 function () {
20571 var a;
20572 var b;
20573 var c;
20574 var d;
20575 if (this.x1 < this.x2) {
20576 a = this.x1;
20577 c = this.x2 - this.x1;
20578 } else {
20579 a = this.x2;
20580 c = this.x1 - this.x2;
20581 }if (this.y1 < this.y2) {
20582 b = this.y1;
20583 d = this.y2 - this.y1;
20584 } else {
20585 b = this.y2;
20586 d = this.y1 - this.y2;
20587 }return  new java.awt.geom.Rectangle2D.Float (a, b, c, d);
20588 });
20589 c$ = Clazz_p0p ();
20590 Clazz_pu$h(self.c$);
20591 c$ = Clazz_decorateAsClass (function () {
20592 this.x1 = 0;
20593 this.y1 = 0;
20594 this.x2 = 0;
20595 this.y2 = 0;
20596 Clazz_instantialize (this, arguments);
20597 }, java.awt.geom.Line2D, "Double", java.awt.geom.Line2D);
20598 Clazz_makeConstructor (c$, 
20599 function () {
20600 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20601 });
20602 Clazz_makeConstructor (c$, 
20603 function (a, b, c, d) {
20604 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20605 this.setLine (a, b, c, d);
20606 }, "~N,~N,~N,~N");
20607 Clazz_makeConstructor (c$, 
20608 function (a, b) {
20609 Clazz_superConstructor (this, java.awt.geom.Line2D.Double, []);
20610 this.setLine (a, b);
20611 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
20612 Clazz_overrideMethod (c$, "getX1", 
20613 function () {
20614 return this.x1;
20615 });
20616 Clazz_overrideMethod (c$, "getY1", 
20617 function () {
20618 return this.y1;
20619 });
20620 Clazz_overrideMethod (c$, "getP1", 
20621 function () {
20622 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
20623 });
20624 Clazz_overrideMethod (c$, "getX2", 
20625 function () {
20626 return this.x2;
20627 });
20628 Clazz_overrideMethod (c$, "getY2", 
20629 function () {
20630 return this.y2;
20631 });
20632 Clazz_overrideMethod (c$, "getP2", 
20633 function () {
20634 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
20635 });
20636 Clazz_defineMethod (c$, "setLine", 
20637 function (a, b, c, d) {
20638 this.x1 = a;
20639 this.y1 = b;
20640 this.x2 = c;
20641 this.y2 = d;
20642 }, "~N,~N,~N,~N");
20643 Clazz_overrideMethod (c$, "getBounds2D", 
20644 function () {
20645 var a;
20646 var b;
20647 var c;
20648 var d;
20649 if (this.x1 < this.x2) {
20650 a = this.x1;
20651 c = this.x2 - this.x1;
20652 } else {
20653 a = this.x2;
20654 c = this.x1 - this.x2;
20655 }if (this.y1 < this.y2) {
20656 b = this.y1;
20657 d = this.y2 - this.y1;
20658 } else {
20659 b = this.y2;
20660 d = this.y1 - this.y2;
20661 }return  new java.awt.geom.Rectangle2D.Double (a, b, c, d);
20662 });
20663 c$ = Clazz_p0p ();
20664 });
20665 Clazz_declarePackage ("java.awt.geom");
20666 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.LineIterator", ["java.util.NoSuchElementException"], function () {
20667 c$ = Clazz_decorateAsClass (function () {
20668 this.line = null;
20669 this.affine = null;
20670 this.index = 0;
20671 Clazz_instantialize (this, arguments);
20672 }, java.awt.geom, "LineIterator", null, java.awt.geom.PathIterator);
20673 Clazz_makeConstructor (c$, 
20674 function (l, at) {
20675 this.line = l;
20676 this.affine = at;
20677 }, "java.awt.geom.Line2D,java.awt.geom.AffineTransform");
20678 Clazz_overrideMethod (c$, "getWindingRule", 
20679 function () {
20680 return 1;
20681 });
20682 Clazz_overrideMethod (c$, "isDone", 
20683 function () {
20684 return (this.index > 1);
20685 });
20686 Clazz_overrideMethod (c$, "next", 
20687 function () {
20688 this.index++;
20689 });
20690 Clazz_defineMethod (c$, "currentSegment", 
20691 function (coords) {
20692 if (this.isDone ()) {
20693 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20694 }var type;
20695 if (this.index == 0) {
20696 coords[0] = this.line.getX1 ();
20697 coords[1] = this.line.getY1 ();
20698 type = 0;
20699 } else {
20700 coords[0] = this.line.getX2 ();
20701 coords[1] = this.line.getY2 ();
20702 type = 1;
20703 }if (this.affine != null) {
20704 this.affine.transform (coords, 0, coords, 0, 1);
20705 }return type;
20706 }, "~A");
20707 Clazz_defineMethod (c$, "currentSegment", 
20708 function (coords) {
20709 if (this.isDone ()) {
20710 throw  new java.util.NoSuchElementException ("line iterator out of bounds");
20711 }var type;
20712 if (this.index == 0) {
20713 coords[0] = this.line.getX1 ();
20714 coords[1] = this.line.getY1 ();
20715 type = 0;
20716 } else {
20717 coords[0] = this.line.getX2 ();
20718 coords[1] = this.line.getY2 ();
20719 type = 1;
20720 }if (this.affine != null) {
20721 this.affine.transform (coords, 0, coords, 0, 1);
20722 }return type;
20723 }, "~A");
20724 });
20725 Clazz_declarePackage ("java.awt.geom");
20726 Clazz_load (["java.awt.Shape"], "java.awt.geom.QuadCurve2D", ["java.lang.InternalError", "java.awt.geom.FlatteningPathIterator", "$.Line2D", "$.Point2D", "$.QuadIterator", "$.Rectangle2D"], function () {
20727 c$ = Clazz_declareType (java.awt.geom, "QuadCurve2D", null, [java.awt.Shape, Cloneable]);
20728 Clazz_makeConstructor (c$, 
20729 function () {
20730 });
20731 Clazz_defineMethod (c$, "setCurve", 
20732 function (coords, offset) {
20733 this.setCurve (coords[offset + 0], coords[offset + 1], coords[offset + 2], coords[offset + 3], coords[offset + 4], coords[offset + 5]);
20734 }, "~A,~N");
20735 Clazz_defineMethod (c$, "setCurve", 
20736 function (p1, cp, p2) {
20737 this.setCurve (p1.getX (), p1.getY (), cp.getX (), cp.getY (), p2.getX (), p2.getY ());
20738 }, "java.awt.geom.Point2D,java.awt.geom.Point2D,java.awt.geom.Point2D");
20739 Clazz_defineMethod (c$, "setCurve", 
20740 function (pts, offset) {
20741 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 ());
20742 }, "~A,~N");
20743 Clazz_defineMethod (c$, "setCurve", 
20744 function (c) {
20745 this.setCurve (c.getX1 (), c.getY1 (), c.getCtrlX (), c.getCtrlY (), c.getX2 (), c.getY2 ());
20746 }, "java.awt.geom.QuadCurve2D");
20747 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20748 function (x1, y1, ctrlx, ctrly, x2, y2) {
20749 return java.awt.geom.Line2D.ptSegDistSq (x1, y1, x2, y2, ctrlx, ctrly);
20750 }, "~N,~N,~N,~N,~N,~N");
20751 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20752 function (x1, y1, ctrlx, ctrly, x2, y2) {
20753 return java.awt.geom.Line2D.ptSegDist (x1, y1, x2, y2, ctrlx, ctrly);
20754 }, "~N,~N,~N,~N,~N,~N");
20755 c$.getFlatnessSq = Clazz_defineMethod (c$, "getFlatnessSq", 
20756 function (coords, offset) {
20757 return java.awt.geom.Line2D.ptSegDistSq (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20758 }, "~A,~N");
20759 c$.getFlatness = Clazz_defineMethod (c$, "getFlatness", 
20760 function (coords, offset) {
20761 return java.awt.geom.Line2D.ptSegDist (coords[offset + 0], coords[offset + 1], coords[offset + 4], coords[offset + 5], coords[offset + 2], coords[offset + 3]);
20762 }, "~A,~N");
20763 Clazz_defineMethod (c$, "getFlatnessSq", 
20764 function () {
20765 return java.awt.geom.Line2D.ptSegDistSq (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20766 });
20767 Clazz_defineMethod (c$, "getFlatness", 
20768 function () {
20769 return java.awt.geom.Line2D.ptSegDist (this.getX1 (), this.getY1 (), this.getX2 (), this.getY2 (), this.getCtrlX (), this.getCtrlY ());
20770 });
20771 Clazz_defineMethod (c$, "subdivide", 
20772 function (left, right) {
20773 java.awt.geom.QuadCurve2D.subdivide (this, left, right);
20774 }, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20775 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20776 function (src, left, right) {
20777 var x1 = src.getX1 ();
20778 var y1 = src.getY1 ();
20779 var ctrlx = src.getCtrlX ();
20780 var ctrly = src.getCtrlY ();
20781 var x2 = src.getX2 ();
20782 var y2 = src.getY2 ();
20783 var ctrlx1 = (x1 + ctrlx) / 2.0;
20784 var ctrly1 = (y1 + ctrly) / 2.0;
20785 var ctrlx2 = (x2 + ctrlx) / 2.0;
20786 var ctrly2 = (y2 + ctrly) / 2.0;
20787 ctrlx = (ctrlx1 + ctrlx2) / 2.0;
20788 ctrly = (ctrly1 + ctrly2) / 2.0;
20789 if (left != null) {
20790 left.setCurve (x1, y1, ctrlx1, ctrly1, ctrlx, ctrly);
20791 }if (right != null) {
20792 right.setCurve (ctrlx, ctrly, ctrlx2, ctrly2, x2, y2);
20793 }}, "java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D,java.awt.geom.QuadCurve2D");
20794 c$.subdivide = Clazz_defineMethod (c$, "subdivide", 
20795 function (src, srcoff, left, leftoff, right, rightoff) {
20796 var x1 = src[srcoff + 0];
20797 var y1 = src[srcoff + 1];
20798 var ctrlx = src[srcoff + 2];
20799 var ctrly = src[srcoff + 3];
20800 var x2 = src[srcoff + 4];
20801 var y2 = src[srcoff + 5];
20802 if (left != null) {
20803 left[leftoff + 0] = x1;
20804 left[leftoff + 1] = y1;
20805 }if (right != null) {
20806 right[rightoff + 4] = x2;
20807 right[rightoff + 5] = y2;
20808 }x1 = (x1 + ctrlx) / 2.0;
20809 y1 = (y1 + ctrly) / 2.0;
20810 x2 = (x2 + ctrlx) / 2.0;
20811 y2 = (y2 + ctrly) / 2.0;
20812 ctrlx = (x1 + x2) / 2.0;
20813 ctrly = (y1 + y2) / 2.0;
20814 if (left != null) {
20815 left[leftoff + 2] = x1;
20816 left[leftoff + 3] = y1;
20817 left[leftoff + 4] = ctrlx;
20818 left[leftoff + 5] = ctrly;
20819 }if (right != null) {
20820 right[rightoff + 0] = ctrlx;
20821 right[rightoff + 1] = ctrly;
20822 right[rightoff + 2] = x2;
20823 right[rightoff + 3] = y2;
20824 }}, "~A,~N,~A,~N,~A,~N");
20825 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20826 function (eqn) {
20827 return java.awt.geom.QuadCurve2D.solveQuadratic (eqn, eqn);
20828 }, "~A");
20829 c$.solveQuadratic = Clazz_defineMethod (c$, "solveQuadratic", 
20830 function (eqn, res) {
20831 var a = eqn[2];
20832 var b = eqn[1];
20833 var c = eqn[0];
20834 var roots = 0;
20835 if (a == 0.0) {
20836 if (b == 0.0) {
20837 return -1;
20838 }res[roots++] = -c / b;
20839 } else {
20840 var d = b * b - 4.0 * a * c;
20841 if (d < 0.0) {
20842 return 0;
20843 }d = Math.sqrt (d);
20844 if (b < 0.0) {
20845 d = -d;
20846 }var q = (b + d) / -2.0;
20847 res[roots++] = q / a;
20848 if (q != 0.0) {
20849 res[roots++] = c / q;
20850 }}return roots;
20851 }, "~A,~A");
20852 Clazz_defineMethod (c$, "contains", 
20853 function (x, y) {
20854 var x1 = this.getX1 ();
20855 var y1 = this.getY1 ();
20856 var xc = this.getCtrlX ();
20857 var yc = this.getCtrlY ();
20858 var x2 = this.getX2 ();
20859 var y2 = this.getY2 ();
20860 var kx = x1 - 2 * xc + x2;
20861 var ky = y1 - 2 * yc + y2;
20862 var dx = x - x1;
20863 var dy = y - y1;
20864 var dxl = x2 - x1;
20865 var dyl = y2 - y1;
20866 var t0 = (dx * ky - dy * kx) / (dxl * ky - dyl * kx);
20867 if (t0 < 0 || t0 > 1 || t0 != t0) {
20868 return false;
20869 }var xb = kx * t0 * t0 + 2 * (xc - x1) * t0 + x1;
20870 var yb = ky * t0 * t0 + 2 * (yc - y1) * t0 + y1;
20871 var xl = dxl * t0 + x1;
20872 var yl = dyl * t0 + y1;
20873 return (x >= xb && x < xl) || (x >= xl && x < xb) || (y >= yb && y < yl) || (y >= yl && y < yb);
20874 }, "~N,~N");
20875 Clazz_defineMethod (c$, "contains", 
20876 function (p) {
20877 return this.contains (p.getX (), p.getY ());
20878 }, "java.awt.geom.Point2D");
20879 c$.fillEqn = Clazz_defineMethod (c$, "fillEqn", 
20880  function (eqn, val, c1, cp, c2) {
20881 eqn[0] = c1 - val;
20882 eqn[1] = cp + cp - c1 - c1;
20883 eqn[2] = c1 - cp - cp + c2;
20884 return;
20885 }, "~A,~N,~N,~N,~N");
20886 c$.evalQuadratic = Clazz_defineMethod (c$, "evalQuadratic", 
20887  function (vals, num, include0, include1, inflect, c1, ctrl, c2) {
20888 var j = 0;
20889 for (var i = 0; i < num; i++) {
20890 var t = vals[i];
20891 if ((include0 ? t >= 0 : t > 0) && (include1 ? t <= 1 : t < 1) && (inflect == null || inflect[1] + 2 * inflect[2] * t != 0)) {
20892 var u = 1 - t;
20893 vals[j++] = c1 * u * u + 2 * ctrl * t * u + c2 * t * t;
20894 }}
20895 return j;
20896 }, "~A,~N,~B,~B,~A,~N,~N,~N");
20897 c$.getTag = Clazz_defineMethod (c$, "getTag", 
20898  function (coord, low, high) {
20899 if (coord <= low) {
20900 return (coord < low ? -2 : -1);
20901 }if (coord >= high) {
20902 return (coord > high ? 2 : 1);
20903 }return 0;
20904 }, "~N,~N,~N");
20905 c$.inwards = Clazz_defineMethod (c$, "inwards", 
20906  function (pttag, opt1tag, opt2tag) {
20907 switch (pttag) {
20908 case -2:
20909 case 2:
20910 default:
20911 return false;
20912 case -1:
20913 return (opt1tag >= 0 || opt2tag >= 0);
20914 case 0:
20915 return true;
20916 case 1:
20917 return (opt1tag <= 0 || opt2tag <= 0);
20918 }
20919 }, "~N,~N,~N");
20920 Clazz_defineMethod (c$, "intersects", 
20921 function (x, y, w, h) {
20922 if (w <= 0 || h <= 0) {
20923 return false;
20924 }var x1 = this.getX1 ();
20925 var y1 = this.getY1 ();
20926 var x1tag = java.awt.geom.QuadCurve2D.getTag (x1, x, x + w);
20927 var y1tag = java.awt.geom.QuadCurve2D.getTag (y1, y, y + h);
20928 if (x1tag == 0 && y1tag == 0) {
20929 return true;
20930 }var x2 = this.getX2 ();
20931 var y2 = this.getY2 ();
20932 var x2tag = java.awt.geom.QuadCurve2D.getTag (x2, x, x + w);
20933 var y2tag = java.awt.geom.QuadCurve2D.getTag (y2, y, y + h);
20934 if (x2tag == 0 && y2tag == 0) {
20935 return true;
20936 }var ctrlx = this.getCtrlX ();
20937 var ctrly = this.getCtrlY ();
20938 var ctrlxtag = java.awt.geom.QuadCurve2D.getTag (ctrlx, x, x + w);
20939 var ctrlytag = java.awt.geom.QuadCurve2D.getTag (ctrly, y, y + h);
20940 if (x1tag < 0 && x2tag < 0 && ctrlxtag < 0) {
20941 return false;
20942 }if (y1tag < 0 && y2tag < 0 && ctrlytag < 0) {
20943 return false;
20944 }if (x1tag > 0 && x2tag > 0 && ctrlxtag > 0) {
20945 return false;
20946 }if (y1tag > 0 && y2tag > 0 && ctrlytag > 0) {
20947 return false;
20948 }if (java.awt.geom.QuadCurve2D.inwards (x1tag, x2tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y1tag, y2tag, ctrlytag)) {
20949 return true;
20950 }if (java.awt.geom.QuadCurve2D.inwards (x2tag, x1tag, ctrlxtag) && java.awt.geom.QuadCurve2D.inwards (y2tag, y1tag, ctrlytag)) {
20951 return true;
20952 }var xoverlap = (x1tag * x2tag <= 0);
20953 var yoverlap = (y1tag * y2tag <= 0);
20954 if (x1tag == 0 && x2tag == 0 && yoverlap) {
20955 return true;
20956 }if (y1tag == 0 && y2tag == 0 && xoverlap) {
20957 return true;
20958 }var eqn =  Clazz_newDoubleArray (3, 0);
20959 var res =  Clazz_newDoubleArray (3, 0);
20960 if (!yoverlap) {
20961 java.awt.geom.QuadCurve2D.fillEqn (eqn, (y1tag < 0 ? y : y + h), y1, ctrly, y2);
20962 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);
20963 }if (!xoverlap) {
20964 java.awt.geom.QuadCurve2D.fillEqn (eqn, (x1tag < 0 ? x : x + w), x1, ctrlx, x2);
20965 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);
20966 }var dx = x2 - x1;
20967 var dy = y2 - y1;
20968 var k = y2 * x1 - x2 * y1;
20969 var c1tag;
20970 var c2tag;
20971 if (y1tag == 0) {
20972 c1tag = x1tag;
20973 } else {
20974 c1tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y1tag < 0 ? y : y + h)) / dy, x, x + w);
20975 }if (y2tag == 0) {
20976 c2tag = x2tag;
20977 } else {
20978 c2tag = java.awt.geom.QuadCurve2D.getTag ((k + dx * (y2tag < 0 ? y : y + h)) / dy, x, x + w);
20979 }if (c1tag * c2tag <= 0) {
20980 return true;
20981 }c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag);
20982 java.awt.geom.QuadCurve2D.fillEqn (eqn, (c2tag < 0 ? x : x + w), x1, ctrlx, x2);
20983 var num = java.awt.geom.QuadCurve2D.solveQuadratic (eqn, res);
20984 java.awt.geom.QuadCurve2D.evalQuadratic (res, num, true, true, null, y1, ctrly, y2);
20985 c2tag = java.awt.geom.QuadCurve2D.getTag (res[0], y, y + h);
20986 return (c1tag * c2tag <= 0);
20987 }, "~N,~N,~N,~N");
20988 Clazz_defineMethod (c$, "intersects", 
20989 function (r) {
20990 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
20991 }, "java.awt.geom.Rectangle2D");
20992 Clazz_defineMethod (c$, "contains", 
20993 function (x, y, w, h) {
20994 if (w <= 0 || h <= 0) {
20995 return false;
20996 }return (this.contains (x, y) && this.contains (x + w, y) && this.contains (x + w, y + h) && this.contains (x, y + h));
20997 }, "~N,~N,~N,~N");
20998 Clazz_defineMethod (c$, "contains", 
20999 function (r) {
21000 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
21001 }, "java.awt.geom.Rectangle2D");
21002 Clazz_overrideMethod (c$, "getBounds", 
21003 function () {
21004 return this.getBounds2D ().getBounds ();
21005 });
21006 Clazz_defineMethod (c$, "getPathIterator", 
21007 function (at) {
21008 return  new java.awt.geom.QuadIterator (this, at);
21009 }, "java.awt.geom.AffineTransform");
21010 Clazz_defineMethod (c$, "getPathIterator", 
21011 function (at, flatness) {
21012 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
21013 }, "java.awt.geom.AffineTransform,~N");
21014 Clazz_defineMethod (c$, "clone", 
21015 function () {
21016 try {
21017 return Clazz_superCall (this, java.awt.geom.QuadCurve2D, "clone", []);
21018 } catch (e) {
21019 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
21020 throw  new InternalError ();
21021 } else {
21022 throw e;
21023 }
21024 }
21025 });
21026 Clazz_pu$h(self.c$);
21027 c$ = Clazz_decorateAsClass (function () {
21028 this.x1 = 0;
21029 this.y1 = 0;
21030 this.ctrlx = 0;
21031 this.ctrly = 0;
21032 this.x2 = 0;
21033 this.y2 = 0;
21034 Clazz_instantialize (this, arguments);
21035 }, java.awt.geom.QuadCurve2D, "Float", java.awt.geom.QuadCurve2D);
21036 Clazz_makeConstructor (c$, 
21037 function () {
21038 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21039 });
21040 Clazz_makeConstructor (c$, 
21041 function (a, b, c, d, e, f) {
21042 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Float, []);
21043 this.setCurve (a, b, c, d, e, f);
21044 }, "~N,~N,~N,~N,~N,~N");
21045 Clazz_overrideMethod (c$, "getX1", 
21046 function () {
21047 return this.x1;
21048 });
21049 Clazz_overrideMethod (c$, "getY1", 
21050 function () {
21051 return this.y1;
21052 });
21053 Clazz_overrideMethod (c$, "getP1", 
21054 function () {
21055 return  new java.awt.geom.Point2D.Float (this.x1, this.y1);
21056 });
21057 Clazz_overrideMethod (c$, "getCtrlX", 
21058 function () {
21059 return this.ctrlx;
21060 });
21061 Clazz_overrideMethod (c$, "getCtrlY", 
21062 function () {
21063 return this.ctrly;
21064 });
21065 Clazz_overrideMethod (c$, "getCtrlPt", 
21066 function () {
21067 return  new java.awt.geom.Point2D.Float (this.ctrlx, this.ctrly);
21068 });
21069 Clazz_overrideMethod (c$, "getX2", 
21070 function () {
21071 return this.x2;
21072 });
21073 Clazz_overrideMethod (c$, "getY2", 
21074 function () {
21075 return this.y2;
21076 });
21077 Clazz_overrideMethod (c$, "getP2", 
21078 function () {
21079 return  new java.awt.geom.Point2D.Float (this.x2, this.y2);
21080 });
21081 Clazz_defineMethod (c$, "setCurve", 
21082 function (a, b, c, d, e, f) {
21083 this.x1 = a;
21084 this.y1 = b;
21085 this.ctrlx = c;
21086 this.ctrly = d;
21087 this.x2 = e;
21088 this.y2 = f;
21089 }, "~N,~N,~N,~N,~N,~N");
21090 Clazz_defineMethod (c$, "setCurve", 
21091 function (a, b, c, d, e, f) {
21092 this.x1 = a;
21093 this.y1 = b;
21094 this.ctrlx = c;
21095 this.ctrly = d;
21096 this.x2 = e;
21097 this.y2 = f;
21098 }, "~N,~N,~N,~N,~N,~N");
21099 Clazz_overrideMethod (c$, "getBounds2D", 
21100 function () {
21101 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21102 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21103 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21104 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21105 return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
21106 });
21107 c$ = Clazz_p0p ();
21108 Clazz_pu$h(self.c$);
21109 c$ = Clazz_decorateAsClass (function () {
21110 this.x1 = 0;
21111 this.y1 = 0;
21112 this.ctrlx = 0;
21113 this.ctrly = 0;
21114 this.x2 = 0;
21115 this.y2 = 0;
21116 Clazz_instantialize (this, arguments);
21117 }, java.awt.geom.QuadCurve2D, "Double", java.awt.geom.QuadCurve2D);
21118 Clazz_makeConstructor (c$, 
21119 function () {
21120 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21121 });
21122 Clazz_makeConstructor (c$, 
21123 function (a, b, c, d, e, f) {
21124 Clazz_superConstructor (this, java.awt.geom.QuadCurve2D.Double, []);
21125 this.setCurve (a, b, c, d, e, f);
21126 }, "~N,~N,~N,~N,~N,~N");
21127 Clazz_overrideMethod (c$, "getX1", 
21128 function () {
21129 return this.x1;
21130 });
21131 Clazz_overrideMethod (c$, "getY1", 
21132 function () {
21133 return this.y1;
21134 });
21135 Clazz_overrideMethod (c$, "getP1", 
21136 function () {
21137 return  new java.awt.geom.Point2D.Double (this.x1, this.y1);
21138 });
21139 Clazz_overrideMethod (c$, "getCtrlX", 
21140 function () {
21141 return this.ctrlx;
21142 });
21143 Clazz_overrideMethod (c$, "getCtrlY", 
21144 function () {
21145 return this.ctrly;
21146 });
21147 Clazz_overrideMethod (c$, "getCtrlPt", 
21148 function () {
21149 return  new java.awt.geom.Point2D.Double (this.ctrlx, this.ctrly);
21150 });
21151 Clazz_overrideMethod (c$, "getX2", 
21152 function () {
21153 return this.x2;
21154 });
21155 Clazz_overrideMethod (c$, "getY2", 
21156 function () {
21157 return this.y2;
21158 });
21159 Clazz_overrideMethod (c$, "getP2", 
21160 function () {
21161 return  new java.awt.geom.Point2D.Double (this.x2, this.y2);
21162 });
21163 Clazz_defineMethod (c$, "setCurve", 
21164 function (a, b, c, d, e, f) {
21165 this.x1 = a;
21166 this.y1 = b;
21167 this.ctrlx = c;
21168 this.ctrly = d;
21169 this.x2 = e;
21170 this.y2 = f;
21171 }, "~N,~N,~N,~N,~N,~N");
21172 Clazz_overrideMethod (c$, "getBounds2D", 
21173 function () {
21174 var a = Math.min (Math.min (this.x1, this.x2), this.ctrlx);
21175 var b = Math.min (Math.min (this.y1, this.y2), this.ctrly);
21176 var c = Math.max (Math.max (this.x1, this.x2), this.ctrlx);
21177 var d = Math.max (Math.max (this.y1, this.y2), this.ctrly);
21178 return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
21179 });
21180 c$ = Clazz_p0p ();
21181 Clazz_defineStatics (c$,
21182 "BELOW", -2,
21183 "LOWEDGE", -1,
21184 "INSIDE", 0,
21185 "HIGHEDGE", 1,
21186 "ABOVE", 2);
21187 });
21188 Clazz_declarePackage ("java.awt.geom");
21189 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.QuadIterator", ["java.util.NoSuchElementException"], function () {
21190 c$ = Clazz_decorateAsClass (function () {
21191 this.quad = null;
21192 this.affine = null;
21193 this.index = 0;
21194 Clazz_instantialize (this, arguments);
21195 }, java.awt.geom, "QuadIterator", null, java.awt.geom.PathIterator);
21196 Clazz_makeConstructor (c$, 
21197 function (q, at) {
21198 this.quad = q;
21199 this.affine = at;
21200 }, "java.awt.geom.QuadCurve2D,java.awt.geom.AffineTransform");
21201 Clazz_overrideMethod (c$, "getWindingRule", 
21202 function () {
21203 return 1;
21204 });
21205 Clazz_overrideMethod (c$, "isDone", 
21206 function () {
21207 return (this.index > 1);
21208 });
21209 Clazz_overrideMethod (c$, "next", 
21210 function () {
21211 this.index++;
21212 });
21213 Clazz_defineMethod (c$, "currentSegment", 
21214 function (coords) {
21215 if (this.isDone ()) {
21216 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21217 }var type;
21218 if (this.index == 0) {
21219 coords[0] = this.quad.getX1 ();
21220 coords[1] = this.quad.getY1 ();
21221 type = 0;
21222 } else {
21223 coords[0] = this.quad.getCtrlX ();
21224 coords[1] = this.quad.getCtrlY ();
21225 coords[2] = this.quad.getX2 ();
21226 coords[3] = this.quad.getY2 ();
21227 type = 2;
21228 }if (this.affine != null) {
21229 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21230 }return type;
21231 }, "~A");
21232 Clazz_defineMethod (c$, "currentSegment", 
21233 function (coords) {
21234 if (this.isDone ()) {
21235 throw  new java.util.NoSuchElementException ("quad iterator iterator out of bounds");
21236 }var type;
21237 if (this.index == 0) {
21238 coords[0] = this.quad.getX1 ();
21239 coords[1] = this.quad.getY1 ();
21240 type = 0;
21241 } else {
21242 coords[0] = this.quad.getCtrlX ();
21243 coords[1] = this.quad.getCtrlY ();
21244 coords[2] = this.quad.getX2 ();
21245 coords[3] = this.quad.getY2 ();
21246 type = 2;
21247 }if (this.affine != null) {
21248 this.affine.transform (coords, 0, coords, 0, this.index == 0 ? 1 : 2);
21249 }return type;
21250 }, "~A");
21251 });
21252 Clazz_declarePackage ("jssun.awt.geom");
21253 Clazz_load (null, "jssun.awt.geom.Curve", ["java.lang.Double", "$.InternalError", "java.awt.geom.IllegalPathStateException"], function () {
21254 c$ = Clazz_decorateAsClass (function () {
21255 this.direction = 0;
21256 Clazz_instantialize (this, arguments);
21257 }, jssun.awt.geom, "Curve");
21258 c$.insertMove = Clazz_defineMethod (c$, "insertMove", 
21259 function (curves, x, y) {
21260 curves.add ( new jssun.awt.geom.Order0 (x, y));
21261 }, "java.util.Vector,~N,~N");
21262 c$.insertLine = Clazz_defineMethod (c$, "insertLine", 
21263 function (curves, x0, y0, x1, y1) {
21264 if (y0 < y1) {
21265 curves.add ( new jssun.awt.geom.Order1 (x0, y0, x1, y1, 1));
21266 } else if (y0 > y1) {
21267 curves.add ( new jssun.awt.geom.Order1 (x1, y1, x0, y0, -1));
21268 } else {
21269 }}, "java.util.Vector,~N,~N,~N,~N");
21270 c$.insertQuad = Clazz_defineMethod (c$, "insertQuad", 
21271 function (curves, x0, y0, coords) {
21272 var y1 = coords[3];
21273 if (y0 > y1) {
21274 jssun.awt.geom.Order2.insert (curves, coords, coords[2], y1, coords[0], coords[1], x0, y0, -1);
21275 } else if (y0 == y1 && y0 == coords[1]) {
21276 return;
21277 } else {
21278 jssun.awt.geom.Order2.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], y1, 1);
21279 }}, "java.util.Vector,~N,~N,~A");
21280 c$.insertCubic = Clazz_defineMethod (c$, "insertCubic", 
21281 function (curves, x0, y0, coords) {
21282 var y1 = coords[5];
21283 if (y0 > y1) {
21284 jssun.awt.geom.Order3.insert (curves, coords, coords[4], y1, coords[2], coords[3], coords[0], coords[1], x0, y0, -1);
21285 } else if (y0 == y1 && y0 == coords[1] && y0 == coords[3]) {
21286 return;
21287 } else {
21288 jssun.awt.geom.Order3.insert (curves, coords, x0, y0, coords[0], coords[1], coords[2], coords[3], coords[4], y1, 1);
21289 }}, "java.util.Vector,~N,~N,~A");
21290 c$.pointCrossingsForPath = Clazz_defineMethod (c$, "pointCrossingsForPath", 
21291 function (pi, px, py) {
21292 if (pi.isDone ()) {
21293 return 0;
21294 }var coords =  Clazz_newDoubleArray (6, 0);
21295 if (pi.currentSegment (coords) != 0) {
21296 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21297 }pi.next ();
21298 var movx = coords[0];
21299 var movy = coords[1];
21300 var curx = movx;
21301 var cury = movy;
21302 var endx;
21303 var endy;
21304 var crossings = 0;
21305 while (!pi.isDone ()) {
21306 switch (pi.currentSegment (coords)) {
21307 case 0:
21308 if (cury != movy) {
21309 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21310 }movx = curx = coords[0];
21311 movy = cury = coords[1];
21312 break;
21313 case 1:
21314 endx = coords[0];
21315 endy = coords[1];
21316 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, endx, endy);
21317 curx = endx;
21318 cury = endy;
21319 break;
21320 case 2:
21321 endx = coords[2];
21322 endy = coords[3];
21323 crossings += jssun.awt.geom.Curve.pointCrossingsForQuad (px, py, curx, cury, coords[0], coords[1], endx, endy, 0);
21324 curx = endx;
21325 cury = endy;
21326 break;
21327 case 3:
21328 endx = coords[4];
21329 endy = coords[5];
21330 crossings += jssun.awt.geom.Curve.pointCrossingsForCubic (px, py, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21331 curx = endx;
21332 cury = endy;
21333 break;
21334 case 4:
21335 if (cury != movy) {
21336 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21337 }curx = movx;
21338 cury = movy;
21339 break;
21340 }
21341 pi.next ();
21342 }
21343 if (cury != movy) {
21344 crossings += jssun.awt.geom.Curve.pointCrossingsForLine (px, py, curx, cury, movx, movy);
21345 }return crossings;
21346 }, "java.awt.geom.PathIterator,~N,~N");
21347 c$.pointCrossingsForLine = Clazz_defineMethod (c$, "pointCrossingsForLine", 
21348 function (px, py, x0, y0, x1, y1) {
21349 if (py < y0 && py < y1) return 0;
21350 if (py >= y0 && py >= y1) return 0;
21351 if (px >= x0 && px >= x1) return 0;
21352 if (px < x0 && px < x1) return (y0 < y1) ? 1 : -1;
21353 var xintercept = x0 + (py - y0) * (x1 - x0) / (y1 - y0);
21354 if (px >= xintercept) return 0;
21355 return (y0 < y1) ? 1 : -1;
21356 }, "~N,~N,~N,~N,~N,~N");
21357 c$.pointCrossingsForQuad = Clazz_defineMethod (c$, "pointCrossingsForQuad", 
21358 function (px, py, x0, y0, xc, yc, x1, y1, level) {
21359 if (py < y0 && py < yc && py < y1) return 0;
21360 if (py >= y0 && py >= yc && py >= y1) return 0;
21361 if (px >= x0 && px >= xc && px >= x1) return 0;
21362 if (px < x0 && px < xc && px < x1) {
21363 if (py >= y0) {
21364 if (py < y1) return 1;
21365 } else {
21366 if (py >= y1) return -1;
21367 }return 0;
21368 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21369 var x0c = (x0 + xc) / 2;
21370 var y0c = (y0 + yc) / 2;
21371 var xc1 = (xc + x1) / 2;
21372 var yc1 = (yc + y1) / 2;
21373 xc = (x0c + xc1) / 2;
21374 yc = (y0c + yc1) / 2;
21375 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21376 return 0;
21377 }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));
21378 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21379 c$.pointCrossingsForCubic = Clazz_defineMethod (c$, "pointCrossingsForCubic", 
21380 function (px, py, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21381 if (py < y0 && py < yc0 && py < yc1 && py < y1) return 0;
21382 if (py >= y0 && py >= yc0 && py >= yc1 && py >= y1) return 0;
21383 if (px >= x0 && px >= xc0 && px >= xc1 && px >= x1) return 0;
21384 if (px < x0 && px < xc0 && px < xc1 && px < x1) {
21385 if (py >= y0) {
21386 if (py < y1) return 1;
21387 } else {
21388 if (py >= y1) return -1;
21389 }return 0;
21390 }if (level > 52) return jssun.awt.geom.Curve.pointCrossingsForLine (px, py, x0, y0, x1, y1);
21391 var xmid = (xc0 + xc1) / 2;
21392 var ymid = (yc0 + yc1) / 2;
21393 xc0 = (x0 + xc0) / 2;
21394 yc0 = (y0 + yc0) / 2;
21395 xc1 = (xc1 + x1) / 2;
21396 yc1 = (yc1 + y1) / 2;
21397 var xc0m = (xc0 + xmid) / 2;
21398 var yc0m = (yc0 + ymid) / 2;
21399 var xmc1 = (xmid + xc1) / 2;
21400 var ymc1 = (ymid + yc1) / 2;
21401 xmid = (xc0m + xmc1) / 2;
21402 ymid = (yc0m + ymc1) / 2;
21403 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21404 return 0;
21405 }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));
21406 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21407 c$.rectCrossingsForPath = Clazz_defineMethod (c$, "rectCrossingsForPath", 
21408 function (pi, rxmin, rymin, rxmax, rymax) {
21409 if (rxmax <= rxmin || rymax <= rymin) {
21410 return 0;
21411 }if (pi.isDone ()) {
21412 return 0;
21413 }var coords =  Clazz_newDoubleArray (6, 0);
21414 if (pi.currentSegment (coords) != 0) {
21415 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
21416 }pi.next ();
21417 var curx;
21418 var cury;
21419 var movx;
21420 var movy;
21421 var endx;
21422 var endy;
21423 curx = movx = coords[0];
21424 cury = movy = coords[1];
21425 var crossings = 0;
21426 while (crossings != -2147483648 && !pi.isDone ()) {
21427 switch (pi.currentSegment (coords)) {
21428 case 0:
21429 if (curx != movx || cury != movy) {
21430 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21431 }movx = curx = coords[0];
21432 movy = cury = coords[1];
21433 break;
21434 case 1:
21435 endx = coords[0];
21436 endy = coords[1];
21437 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, endx, endy);
21438 curx = endx;
21439 cury = endy;
21440 break;
21441 case 2:
21442 endx = coords[2];
21443 endy = coords[3];
21444 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], endx, endy, 0);
21445 curx = endx;
21446 cury = endy;
21447 break;
21448 case 3:
21449 endx = coords[4];
21450 endy = coords[5];
21451 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, curx, cury, coords[0], coords[1], coords[2], coords[3], endx, endy, 0);
21452 curx = endx;
21453 cury = endy;
21454 break;
21455 case 4:
21456 if (curx != movx || cury != movy) {
21457 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21458 }curx = movx;
21459 cury = movy;
21460 break;
21461 }
21462 pi.next ();
21463 }
21464 if (crossings != -2147483648 && (curx != movx || cury != movy)) {
21465 crossings = jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, curx, cury, movx, movy);
21466 }return crossings;
21467 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
21468 c$.rectCrossingsForLine = Clazz_defineMethod (c$, "rectCrossingsForLine", 
21469 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1) {
21470 if (y0 >= rymax && y1 >= rymax) return crossings;
21471 if (y0 <= rymin && y1 <= rymin) return crossings;
21472 if (x0 <= rxmin && x1 <= rxmin) return crossings;
21473 if (x0 >= rxmax && x1 >= rxmax) {
21474 if (y0 < y1) {
21475 if (y0 <= rymin) crossings++;
21476 if (y1 >= rymax) crossings++;
21477 } else if (y1 < y0) {
21478 if (y1 <= rymin) crossings--;
21479 if (y0 >= rymax) crossings--;
21480 }return crossings;
21481 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21482 return -2147483648;
21483 }var xi0 = x0;
21484 if (y0 < rymin) {
21485 xi0 += ((rymin - y0) * (x1 - x0) / (y1 - y0));
21486 } else if (y0 > rymax) {
21487 xi0 += ((rymax - y0) * (x1 - x0) / (y1 - y0));
21488 }var xi1 = x1;
21489 if (y1 < rymin) {
21490 xi1 += ((rymin - y1) * (x0 - x1) / (y0 - y1));
21491 } else if (y1 > rymax) {
21492 xi1 += ((rymax - y1) * (x0 - x1) / (y0 - y1));
21493 }if (xi0 <= rxmin && xi1 <= rxmin) return crossings;
21494 if (xi0 >= rxmax && xi1 >= rxmax) {
21495 if (y0 < y1) {
21496 if (y0 <= rymin) crossings++;
21497 if (y1 >= rymax) crossings++;
21498 } else if (y1 < y0) {
21499 if (y1 <= rymin) crossings--;
21500 if (y0 >= rymax) crossings--;
21501 }return crossings;
21502 }return -2147483648;
21503 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N");
21504 c$.rectCrossingsForQuad = Clazz_defineMethod (c$, "rectCrossingsForQuad", 
21505 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc, yc, x1, y1, level) {
21506 if (y0 >= rymax && yc >= rymax && y1 >= rymax) return crossings;
21507 if (y0 <= rymin && yc <= rymin && y1 <= rymin) return crossings;
21508 if (x0 <= rxmin && xc <= rxmin && x1 <= rxmin) return crossings;
21509 if (x0 >= rxmax && xc >= rxmax && x1 >= rxmax) {
21510 if (y0 < y1) {
21511 if (y0 <= rymin && y1 > rymin) crossings++;
21512 if (y0 < rymax && y1 >= rymax) crossings++;
21513 } else if (y1 < y0) {
21514 if (y1 <= rymin && y0 > rymin) crossings--;
21515 if (y1 < rymax && y0 >= rymax) crossings--;
21516 }return crossings;
21517 }if ((x0 < rxmax && x0 > rxmin && y0 < rymax && y0 > rymin) || (x1 < rxmax && x1 > rxmin && y1 < rymax && y1 > rymin)) {
21518 return -2147483648;
21519 }if (level > 52) {
21520 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21521 }var x0c = (x0 + xc) / 2;
21522 var y0c = (y0 + yc) / 2;
21523 var xc1 = (xc + x1) / 2;
21524 var yc1 = (yc + y1) / 2;
21525 xc = (x0c + xc1) / 2;
21526 yc = (y0c + yc1) / 2;
21527 if (Double.isNaN (xc) || Double.isNaN (yc)) {
21528 return 0;
21529 }crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x0c, y0c, xc, yc, level + 1);
21530 if (crossings != -2147483648) {
21531 crossings = jssun.awt.geom.Curve.rectCrossingsForQuad (crossings, rxmin, rymin, rxmax, rymax, xc, yc, xc1, yc1, x1, y1, level + 1);
21532 }return crossings;
21533 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21534 c$.rectCrossingsForCubic = Clazz_defineMethod (c$, "rectCrossingsForCubic", 
21535 function (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc1, yc1, x1, y1, level) {
21536 if (y0 >= rymax && yc0 >= rymax && yc1 >= rymax && y1 >= rymax) {
21537 return crossings;
21538 }if (y0 <= rymin && yc0 <= rymin && yc1 <= rymin && y1 <= rymin) {
21539 return crossings;
21540 }if (x0 <= rxmin && xc0 <= rxmin && xc1 <= rxmin && x1 <= rxmin) {
21541 return crossings;
21542 }if (x0 >= rxmax && xc0 >= rxmax && xc1 >= rxmax && x1 >= rxmax) {
21543 if (y0 < y1) {
21544 if (y0 <= rymin && y1 > rymin) crossings++;
21545 if (y0 < rymax && y1 >= rymax) crossings++;
21546 } else if (y1 < y0) {
21547 if (y1 <= rymin && y0 > rymin) crossings--;
21548 if (y1 < rymax && y0 >= rymax) crossings--;
21549 }return crossings;
21550 }if ((x0 > rxmin && x0 < rxmax && y0 > rymin && y0 < rymax) || (x1 > rxmin && x1 < rxmax && y1 > rymin && y1 < rymax)) {
21551 return -2147483648;
21552 }if (level > 52) {
21553 return jssun.awt.geom.Curve.rectCrossingsForLine (crossings, rxmin, rymin, rxmax, rymax, x0, y0, x1, y1);
21554 }var xmid = (xc0 + xc1) / 2;
21555 var ymid = (yc0 + yc1) / 2;
21556 xc0 = (x0 + xc0) / 2;
21557 yc0 = (y0 + yc0) / 2;
21558 xc1 = (xc1 + x1) / 2;
21559 yc1 = (yc1 + y1) / 2;
21560 var xc0m = (xc0 + xmid) / 2;
21561 var yc0m = (yc0 + ymid) / 2;
21562 var xmc1 = (xmid + xc1) / 2;
21563 var ymc1 = (ymid + yc1) / 2;
21564 xmid = (xc0m + xmc1) / 2;
21565 ymid = (yc0m + ymc1) / 2;
21566 if (Double.isNaN (xmid) || Double.isNaN (ymid)) {
21567 return 0;
21568 }crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, x0, y0, xc0, yc0, xc0m, yc0m, xmid, ymid, level + 1);
21569 if (crossings != -2147483648) {
21570 crossings = jssun.awt.geom.Curve.rectCrossingsForCubic (crossings, rxmin, rymin, rxmax, rymax, xmid, ymid, xmc1, ymc1, xc1, yc1, x1, y1, level + 1);
21571 }return crossings;
21572 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21573 Clazz_makeConstructor (c$, 
21574 function (direction) {
21575 this.direction = direction;
21576 }, "~N");
21577 Clazz_defineMethod (c$, "getDirection", 
21578 function () {
21579 return this.direction;
21580 });
21581 Clazz_defineMethod (c$, "getWithDirection", 
21582 function (direction) {
21583 return (this.direction == direction ? this : this.getReversedCurve ());
21584 }, "~N");
21585 c$.round = Clazz_defineMethod (c$, "round", 
21586 function (v) {
21587 return v;
21588 }, "~N");
21589 c$.orderof = Clazz_defineMethod (c$, "orderof", 
21590 function (x1, x2) {
21591 if (x1 < x2) {
21592 return -1;
21593 }if (x1 > x2) {
21594 return 1;
21595 }return 0;
21596 }, "~N,~N");
21597 c$.signeddiffbits = Clazz_defineMethod (c$, "signeddiffbits", 
21598 function (y1, y2) {
21599 return (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21600 }, "~N,~N");
21601 c$.diffbits = Clazz_defineMethod (c$, "diffbits", 
21602 function (y1, y2) {
21603 return Math.abs (Double.doubleToLongBits (y1) - Double.doubleToLongBits (y2));
21604 }, "~N,~N");
21605 c$.prev = Clazz_defineMethod (c$, "prev", 
21606 function (v) {
21607 return Double.longBitsToDouble (Double.doubleToLongBits (v) - 1);
21608 }, "~N");
21609 c$.next = Clazz_defineMethod (c$, "next", 
21610 function (v) {
21611 return Double.longBitsToDouble (Double.doubleToLongBits (v) + 1);
21612 }, "~N");
21613 Clazz_overrideMethod (c$, "toString", 
21614 function () {
21615 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") + "]");
21616 });
21617 Clazz_defineMethod (c$, "controlPointString", 
21618 function () {
21619 return "";
21620 });
21621 Clazz_defineMethod (c$, "crossingsFor", 
21622 function (x, y) {
21623 if (y >= this.getYTop () && y < this.getYBot ()) {
21624 if (x < this.getXMax () && (x < this.getXMin () || x < this.XforY (y))) {
21625 return 1;
21626 }}return 0;
21627 }, "~N,~N");
21628 Clazz_defineMethod (c$, "accumulateCrossings", 
21629 function (c) {
21630 var xhi = c.getXHi ();
21631 if (this.getXMin () >= xhi) {
21632 return false;
21633 }var xlo = c.getXLo ();
21634 var ylo = c.getYLo ();
21635 var yhi = c.getYHi ();
21636 var y0 = this.getYTop ();
21637 var y1 = this.getYBot ();
21638 var tstart;
21639 var ystart;
21640 var tend;
21641 var yend;
21642 if (y0 < ylo) {
21643 if (y1 <= ylo) {
21644 return false;
21645 }ystart = ylo;
21646 tstart = this.TforY (ylo);
21647 } else {
21648 if (y0 >= yhi) {
21649 return false;
21650 }ystart = y0;
21651 tstart = 0;
21652 }if (y1 > yhi) {
21653 yend = yhi;
21654 tend = this.TforY (yhi);
21655 } else {
21656 yend = y1;
21657 tend = 1;
21658 }var hitLo = false;
21659 var hitHi = false;
21660 while (true) {
21661 var x = this.XforT (tstart);
21662 if (x < xhi) {
21663 if (hitHi || x > xlo) {
21664 return true;
21665 }hitLo = true;
21666 } else {
21667 if (hitLo) {
21668 return true;
21669 }hitHi = true;
21670 }if (tstart >= tend) {
21671 break;
21672 }tstart = this.nextVertical (tstart, tend);
21673 }
21674 if (hitLo) {
21675 c.record (ystart, yend, this.direction);
21676 }return false;
21677 }, "jssun.awt.geom.Crossings");
21678 Clazz_defineMethod (c$, "getSubCurve", 
21679 function (ystart, yend) {
21680 return this.getSubCurve (ystart, yend, this.direction);
21681 }, "~N,~N");
21682 Clazz_defineMethod (c$, "compareTo", 
21683 function (that, yrange) {
21684 var y0 = yrange[0];
21685 var y1 = yrange[1];
21686 y1 = Math.min (Math.min (y1, this.getYBot ()), that.getYBot ());
21687 if (y1 <= yrange[0]) {
21688 System.err.println ("this == " + this);
21689 System.err.println ("that == " + that);
21690 System.out.println ("target range = " + yrange[0] + "=>" + yrange[1]);
21691 throw  new InternalError ("backstepping from " + yrange[0] + " to " + y1);
21692 }yrange[1] = y1;
21693 if (this.getXMax () <= that.getXMin ()) {
21694 if (this.getXMin () == that.getXMax ()) {
21695 return 0;
21696 }return -1;
21697 }if (this.getXMin () >= that.getXMax ()) {
21698 return 1;
21699 }var s0 = this.TforY (y0);
21700 var ys0 = this.YforT (s0);
21701 if (ys0 < y0) {
21702 s0 = this.refineTforY (s0, ys0, y0);
21703 ys0 = this.YforT (s0);
21704 }var s1 = this.TforY (y1);
21705 if (this.YforT (s1) < y0) {
21706 s1 = this.refineTforY (s1, this.YforT (s1), y0);
21707 }var t0 = that.TforY (y0);
21708 var yt0 = that.YforT (t0);
21709 if (yt0 < y0) {
21710 t0 = that.refineTforY (t0, yt0, y0);
21711 yt0 = that.YforT (t0);
21712 }var t1 = that.TforY (y1);
21713 if (that.YforT (t1) < y0) {
21714 t1 = that.refineTforY (t1, that.YforT (t1), y0);
21715 }var xs0 = this.XforT (s0);
21716 var xt0 = that.XforT (t0);
21717 var scale = Math.max (Math.abs (y0), Math.abs (y1));
21718 var ymin = Math.max (scale * 1E-14, 1E-300);
21719 if (this.fairlyClose (xs0, xt0)) {
21720 var bump = ymin;
21721 var maxbump = Math.min (ymin * 1E13, (y1 - y0) * .1);
21722 var y = y0 + bump;
21723 while (y <= y1) {
21724 if (this.fairlyClose (this.XforY (y), that.XforY (y))) {
21725 if ((bump *= 2) > maxbump) {
21726 bump = maxbump;
21727 }} else {
21728 y -= bump;
21729 while (true) {
21730 bump /= 2;
21731 var newy = y + bump;
21732 if (newy <= y) {
21733 break;
21734 }if (this.fairlyClose (this.XforY (newy), that.XforY (newy))) {
21735 y = newy;
21736 }}
21737 break;
21738 }y += bump;
21739 }
21740 if (y > y0) {
21741 if (y < y1) {
21742 yrange[1] = y;
21743 }return 0;
21744 }}if (ymin <= 0) {
21745 System.out.println ("ymin = " + ymin);
21746 }while (s0 < s1 && t0 < t1) {
21747 var sh = this.nextVertical (s0, s1);
21748 var xsh = this.XforT (sh);
21749 var ysh = this.YforT (sh);
21750 var th = that.nextVertical (t0, t1);
21751 var xth = that.XforT (th);
21752 var yth = that.YforT (th);
21753 try {
21754 if (this.findIntersect (that, yrange, ymin, 0, 0, s0, xs0, ys0, sh, xsh, ysh, t0, xt0, yt0, th, xth, yth)) {
21755 break;
21756 }} catch (t) {
21757 System.err.println ("Error: " + t);
21758 System.err.println ("y range was " + yrange[0] + "=>" + yrange[1]);
21759 System.err.println ("s y range is " + ys0 + "=>" + ysh);
21760 System.err.println ("t y range is " + yt0 + "=>" + yth);
21761 System.err.println ("ymin is " + ymin);
21762 return 0;
21763 }
21764 if (ysh < yth) {
21765 if (ysh > yrange[0]) {
21766 if (ysh < yrange[1]) {
21767 yrange[1] = ysh;
21768 }break;
21769 }s0 = sh;
21770 xs0 = xsh;
21771 ys0 = ysh;
21772 } else {
21773 if (yth > yrange[0]) {
21774 if (yth < yrange[1]) {
21775 yrange[1] = yth;
21776 }break;
21777 }t0 = th;
21778 xt0 = xth;
21779 yt0 = yth;
21780 }}
21781 var ymid = (yrange[0] + yrange[1]) / 2;
21782 return jssun.awt.geom.Curve.orderof (this.XforY (ymid), that.XforY (ymid));
21783 }, "jssun.awt.geom.Curve,~A");
21784 Clazz_defineMethod (c$, "findIntersect", 
21785 function (that, yrange, ymin, slevel, tlevel, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1) {
21786 if (ys0 > yt1 || yt0 > ys1) {
21787 return false;
21788 }if (Math.min (xs0, xs1) > Math.max (xt0, xt1) || Math.max (xs0, xs1) < Math.min (xt0, xt1)) {
21789 return false;
21790 }if (s1 - s0 > 0.001) {
21791 var s = (s0 + s1) / 2;
21792 var xs = this.XforT (s);
21793 var ys = this.YforT (s);
21794 if (s == s0 || s == s1) {
21795 System.out.println ("s0 = " + s0);
21796 System.out.println ("s1 = " + s1);
21797 throw  new InternalError ("no s progress!");
21798 }if (t1 - t0 > 0.001) {
21799 var t = (t0 + t1) / 2;
21800 var xt = that.XforT (t);
21801 var yt = that.YforT (t);
21802 if (t == t0 || t == t1) {
21803 System.out.println ("t0 = " + t0);
21804 System.out.println ("t1 = " + t1);
21805 throw  new InternalError ("no t progress!");
21806 }if (ys >= yt0 && yt >= ys0) {
21807 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t, xt, yt)) {
21808 return true;
21809 }}if (ys >= yt) {
21810 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s0, xs0, ys0, s, xs, ys, t, xt, yt, t1, xt1, yt1)) {
21811 return true;
21812 }}if (yt >= ys) {
21813 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21814 return true;
21815 }}if (ys1 >= yt && yt1 >= ys) {
21816 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel + 1, s, xs, ys, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21817 return true;
21818 }}} else {
21819 if (ys >= yt0) {
21820 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s0, xs0, ys0, s, xs, ys, t0, xt0, yt0, t1, xt1, yt1)) {
21821 return true;
21822 }}if (yt1 >= ys) {
21823 if (this.findIntersect (that, yrange, ymin, slevel + 1, tlevel, s, xs, ys, s1, xs1, ys1, t0, xt0, yt0, t1, xt1, yt1)) {
21824 return true;
21825 }}}} else if (t1 - t0 > 0.001) {
21826 var t = (t0 + t1) / 2;
21827 var xt = that.XforT (t);
21828 var yt = that.YforT (t);
21829 if (t == t0 || t == t1) {
21830 System.out.println ("t0 = " + t0);
21831 System.out.println ("t1 = " + t1);
21832 throw  new InternalError ("no t progress!");
21833 }if (yt >= ys0) {
21834 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t0, xt0, yt0, t, xt, yt)) {
21835 return true;
21836 }}if (ys1 >= yt) {
21837 if (this.findIntersect (that, yrange, ymin, slevel, tlevel + 1, s0, xs0, ys0, s1, xs1, ys1, t, xt, yt, t1, xt1, yt1)) {
21838 return true;
21839 }}} else {
21840 var xlk = xs1 - xs0;
21841 var ylk = ys1 - ys0;
21842 var xnm = xt1 - xt0;
21843 var ynm = yt1 - yt0;
21844 var xmk = xt0 - xs0;
21845 var ymk = yt0 - ys0;
21846 var det = xnm * ylk - ynm * xlk;
21847 if (det != 0) {
21848 var detinv = 1 / det;
21849 var s = (xnm * ymk - ynm * xmk) * detinv;
21850 var t = (xlk * ymk - ylk * xmk) * detinv;
21851 if (s >= 0 && s <= 1 && t >= 0 && t <= 1) {
21852 s = s0 + s * (s1 - s0);
21853 t = t0 + t * (t1 - t0);
21854 if (s < 0 || s > 1 || t < 0 || t > 1) {
21855 System.out.println ("Uh oh!");
21856 }var y = (this.YforT (s) + that.YforT (t)) / 2;
21857 if (y <= yrange[1] && y > yrange[0]) {
21858 yrange[1] = y;
21859 return true;
21860 }}}}return false;
21861 }, "jssun.awt.geom.Curve,~A,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
21862 Clazz_defineMethod (c$, "refineTforY", 
21863 function (t0, yt0, y0) {
21864 var t1 = 1;
21865 while (true) {
21866 var th = (t0 + t1) / 2;
21867 if (th == t0 || th == t1) {
21868 return t1;
21869 }var y = this.YforT (th);
21870 if (y < y0) {
21871 t0 = th;
21872 yt0 = y;
21873 } else if (y > y0) {
21874 t1 = th;
21875 } else {
21876 return t1;
21877 }}
21878 }, "~N,~N,~N");
21879 Clazz_defineMethod (c$, "fairlyClose", 
21880 function (v1, v2) {
21881 return (Math.abs (v1 - v2) < Math.max (Math.abs (v1), Math.abs (v2)) * 1E-10);
21882 }, "~N,~N");
21883 Clazz_defineStatics (c$,
21884 "INCREASING", 1,
21885 "DECREASING", -1,
21886 "RECT_INTERSECTS", 0x80000000,
21887 "TMIN", 1E-3);
21888 });
21889 Clazz_declarePackage ("java.awt.geom");
21890 Clazz_load (["java.lang.RuntimeException"], "java.awt.geom.IllegalPathStateException", null, function () {
21891 c$ = Clazz_declareType (java.awt.geom, "IllegalPathStateException", RuntimeException);
21892 Clazz_makeConstructor (c$, 
21893 function () {
21894 Clazz_superConstructor (this, java.awt.geom.IllegalPathStateException, []);
21895 });
21896 });
21897 Clazz_declarePackage ("java.awt.geom");
21898 Clazz_load (["java.awt.geom.PathIterator"], "java.awt.geom.RectIterator", ["java.util.NoSuchElementException"], function () {
21899 c$ = Clazz_decorateAsClass (function () {
21900 this.x = 0;
21901 this.y = 0;
21902 this.w = 0;
21903 this.h = 0;
21904 this.affine = null;
21905 this.index = 0;
21906 Clazz_instantialize (this, arguments);
21907 }, java.awt.geom, "RectIterator", null, java.awt.geom.PathIterator);
21908 Clazz_makeConstructor (c$, 
21909 function (r, at) {
21910 this.x = r.getX ();
21911 this.y = r.getY ();
21912 this.w = r.getWidth ();
21913 this.h = r.getHeight ();
21914 this.affine = at;
21915 if (this.w < 0 || this.h < 0) {
21916 this.index = 6;
21917 }}, "java.awt.geom.Rectangle2D,java.awt.geom.AffineTransform");
21918 Clazz_overrideMethod (c$, "getWindingRule", 
21919 function () {
21920 return 1;
21921 });
21922 Clazz_overrideMethod (c$, "isDone", 
21923 function () {
21924 return this.index > 5;
21925 });
21926 Clazz_overrideMethod (c$, "next", 
21927 function () {
21928 this.index++;
21929 });
21930 Clazz_defineMethod (c$, "currentSegment", 
21931 function (coords) {
21932 if (this.isDone ()) {
21933 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
21934 }if (this.index == 5) {
21935 return 4;
21936 }coords[0] = this.x;
21937 coords[1] = this.y;
21938 if (this.index == 1 || this.index == 2) {
21939 coords[0] += this.w;
21940 }if (this.index == 2 || this.index == 3) {
21941 coords[1] += this.h;
21942 }if (this.affine != null) {
21943 this.affine.transform (coords, 0, coords, 0, 1);
21944 }return (this.index == 0 ? 0 : 1);
21945 }, "~A");
21946 Clazz_defineMethod (c$, "currentSegment", 
21947 function (coords) {
21948 if (this.isDone ()) {
21949 throw  new java.util.NoSuchElementException ("rect iterator out of bounds");
21950 }if (this.index == 5) {
21951 return 4;
21952 }coords[0] = this.x;
21953 coords[1] = this.y;
21954 if (this.index == 1 || this.index == 2) {
21955 coords[0] += this.w;
21956 }if (this.index == 2 || this.index == 3) {
21957 coords[1] += this.h;
21958 }if (this.affine != null) {
21959 this.affine.transform (coords, 0, coords, 0, 1);
21960 }return (this.index == 0 ? 0 : 1);
21961 }, "~A");
21962 });
21963 Clazz_declarePackage ("java.awt.event");
21964 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ActionEvent", ["java.awt.event.KeyEvent"], function () {
21965 c$ = Clazz_decorateAsClass (function () {
21966 this.actionCommand = null;
21967 this.when = 0;
21968 this.modifiers = 0;
21969 Clazz_instantialize (this, arguments);
21970 }, java.awt.event, "ActionEvent", java.awt.AWTEvent);
21971 Clazz_makeConstructor (c$, 
21972 function (source, id, command) {
21973 this.construct (source, id, command, 0);
21974 }, "~O,~N,~S");
21975 Clazz_makeConstructor (c$, 
21976 function (source, id, command, modifiers) {
21977 this.construct (source, id, command, 0, modifiers);
21978 }, "~O,~N,~S,~N");
21979 Clazz_makeConstructor (c$, 
21980 function (source, id, command, when, modifiers) {
21981 Clazz_superConstructor (this, java.awt.event.ActionEvent, [source, id]);
21982 this.actionCommand = command;
21983 this.when = when;
21984 this.modifiers = modifiers;
21985 }, "~O,~N,~S,~N,~N");
21986 Clazz_defineMethod (c$, "getActionCommand", 
21987 function () {
21988 return this.actionCommand;
21989 });
21990 Clazz_defineMethod (c$, "getWhen", 
21991 function () {
21992 return this.when;
21993 });
21994 Clazz_defineMethod (c$, "getModifiers", 
21995 function () {
21996 return this.modifiers;
21997 });
21998 Clazz_overrideMethod (c$, "paramString", 
21999 function () {
22000 var typeStr;
22001 switch (this.id) {
22002 case 1001:
22003 typeStr = "ACTION_PERFORMED";
22004 break;
22005 default:
22006 typeStr = "unknown type";
22007 }
22008 return typeStr + ",cmd=" + this.actionCommand + ",when=" + this.when + ",modifiers=" + java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers);
22009 });
22010 Clazz_defineStatics (c$,
22011 "SHIFT_MASK", 1,
22012 "CTRL_MASK", 2,
22013 "META_MASK", 4,
22014 "ALT_MASK", 8,
22015 "ACTION_FIRST", 1001,
22016 "ACTION_LAST", 1001,
22017 "ACTION_PERFORMED", 1001);
22018 });
22019 Clazz_declarePackage ("java.awt.event");
22020 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.KeyEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Toolkit"], function () {
22021 c$ = Clazz_decorateAsClass (function () {
22022 this.isProxyActive = false;
22023 this.keyCode = 0;
22024 this.keyChar = '\0';
22025 this.keyLocation = 0;
22026 Clazz_instantialize (this, arguments);
22027 }, java.awt.event, "KeyEvent", java.awt.event.InputEvent);
22028 Clazz_makeConstructor (c$, 
22029 function (source, id, when, modifiers, keyCode, keyChar, keyLocation) {
22030 Clazz_superConstructor (this, java.awt.event.KeyEvent, [source, id, when, modifiers]);
22031 if (id == 400) {
22032 if (keyChar == '\uffff') {
22033 throw  new IllegalArgumentException ("invalid keyChar");
22034 }if (keyCode != 0) {
22035 throw  new IllegalArgumentException ("invalid keyCode");
22036 }if (keyLocation != 0) {
22037 throw  new IllegalArgumentException ("invalid keyLocation");
22038 }}this.keyCode = keyCode;
22039 this.keyChar = keyChar;
22040 if ((keyLocation < 0) || (keyLocation > 4)) {
22041 throw  new IllegalArgumentException ("invalid keyLocation");
22042 }this.keyLocation = keyLocation;
22043 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22044 this.setNewModifiers ();
22045 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22046 this.setOldModifiers ();
22047 }}, "java.awt.Component,~N,~N,~N,~N,~S,~N");
22048 Clazz_makeConstructor (c$, 
22049 function (source, id, when, modifiers, keyCode, keyChar) {
22050 this.construct (source, id, when, modifiers, keyCode, keyChar, 0);
22051 }, "java.awt.Component,~N,~N,~N,~N,~S");
22052 Clazz_makeConstructor (c$, 
22053 function (source, id, when, modifiers, keyCode) {
22054 this.construct (source, id, when, modifiers, keyCode, String.fromCharCode (keyCode));
22055 }, "java.awt.Component,~N,~N,~N,~N");
22056 Clazz_defineMethod (c$, "getKeyCode", 
22057 function () {
22058 return this.keyCode;
22059 });
22060 Clazz_defineMethod (c$, "setKeyCode", 
22061 function (keyCode) {
22062 this.keyCode = keyCode;
22063 }, "~N");
22064 Clazz_defineMethod (c$, "getKeyChar", 
22065 function () {
22066 return this.keyChar;
22067 });
22068 Clazz_defineMethod (c$, "setKeyChar", 
22069 function (keyChar) {
22070 this.keyChar = keyChar;
22071 }, "~S");
22072 Clazz_defineMethod (c$, "setModifiers", 
22073 function (modifiers) {
22074 this.modifiers = modifiers;
22075 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
22076 this.setNewModifiers ();
22077 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0)) {
22078 this.setOldModifiers ();
22079 }}, "~N");
22080 Clazz_defineMethod (c$, "getKeyLocation", 
22081 function () {
22082 return this.keyLocation;
22083 });
22084 c$.getKeyText = Clazz_defineMethod (c$, "getKeyText", 
22085 function (keyCode) {
22086 if (keyCode >= 48 && keyCode <= 57 || keyCode >= 65 && keyCode <= 90) {
22087 return String.valueOf (String.fromCharCode (keyCode));
22088 }switch (keyCode) {
22089 case 10:
22090 return java.awt.Toolkit.getProperty ("AWT.enter", "Enter");
22091 case 8:
22092 return java.awt.Toolkit.getProperty ("AWT.backSpace", "Backspace");
22093 case 9:
22094 return java.awt.Toolkit.getProperty ("AWT.tab", "Tab");
22095 case 3:
22096 return java.awt.Toolkit.getProperty ("AWT.cancel", "Cancel");
22097 case 12:
22098 return java.awt.Toolkit.getProperty ("AWT.clear", "Clear");
22099 case 65312:
22100 return java.awt.Toolkit.getProperty ("AWT.compose", "Compose");
22101 case 19:
22102 return java.awt.Toolkit.getProperty ("AWT.pause", "Pause");
22103 case 20:
22104 return java.awt.Toolkit.getProperty ("AWT.capsLock", "Caps Lock");
22105 case 27:
22106 return java.awt.Toolkit.getProperty ("AWT.escape", "Escape");
22107 case 32:
22108 return java.awt.Toolkit.getProperty ("AWT.space", "Space");
22109 case 33:
22110 return java.awt.Toolkit.getProperty ("AWT.pgup", "Page Up");
22111 case 34:
22112 return java.awt.Toolkit.getProperty ("AWT.pgdn", "Page Down");
22113 case 35:
22114 return java.awt.Toolkit.getProperty ("AWT.end", "End");
22115 case 36:
22116 return java.awt.Toolkit.getProperty ("AWT.home", "Home");
22117 case 37:
22118 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22119 case 38:
22120 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22121 case 39:
22122 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22123 case 40:
22124 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22125 case 65368:
22126 return java.awt.Toolkit.getProperty ("AWT.begin", "Begin");
22127 case 16:
22128 return java.awt.Toolkit.getProperty ("AWT.shift", "Shift");
22129 case 17:
22130 return java.awt.Toolkit.getProperty ("AWT.control", "Control");
22131 case 18:
22132 return java.awt.Toolkit.getProperty ("AWT.alt", "Alt");
22133 case 157:
22134 return java.awt.Toolkit.getProperty ("AWT.meta", "Meta");
22135 case 65406:
22136 return java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph");
22137 case 44:
22138 return java.awt.Toolkit.getProperty ("AWT.comma", "Comma");
22139 case 46:
22140 return java.awt.Toolkit.getProperty ("AWT.period", "Period");
22141 case 47:
22142 return java.awt.Toolkit.getProperty ("AWT.slash", "Slash");
22143 case 59:
22144 return java.awt.Toolkit.getProperty ("AWT.semicolon", "Semicolon");
22145 case 61:
22146 return java.awt.Toolkit.getProperty ("AWT.equals", "Equals");
22147 case 91:
22148 return java.awt.Toolkit.getProperty ("AWT.openBracket", "Open Bracket");
22149 case 92:
22150 return java.awt.Toolkit.getProperty ("AWT.backSlash", "Back Slash");
22151 case 93:
22152 return java.awt.Toolkit.getProperty ("AWT.closeBracket", "Close Bracket");
22153 case 106:
22154 return java.awt.Toolkit.getProperty ("AWT.multiply", "NumPad *");
22155 case 107:
22156 return java.awt.Toolkit.getProperty ("AWT.add", "NumPad +");
22157 case 108:
22158 return java.awt.Toolkit.getProperty ("AWT.separator", "NumPad ,");
22159 case 109:
22160 return java.awt.Toolkit.getProperty ("AWT.subtract", "NumPad -");
22161 case 110:
22162 return java.awt.Toolkit.getProperty ("AWT.decimal", "NumPad .");
22163 case 111:
22164 return java.awt.Toolkit.getProperty ("AWT.divide", "NumPad /");
22165 case 127:
22166 return java.awt.Toolkit.getProperty ("AWT.delete", "Delete");
22167 case 144:
22168 return java.awt.Toolkit.getProperty ("AWT.numLock", "Num Lock");
22169 case 145:
22170 return java.awt.Toolkit.getProperty ("AWT.scrollLock", "Scroll Lock");
22171 case 524:
22172 return java.awt.Toolkit.getProperty ("AWT.windows", "Windows");
22173 case 525:
22174 return java.awt.Toolkit.getProperty ("AWT.context", "Context Menu");
22175 case 112:
22176 return java.awt.Toolkit.getProperty ("AWT.f1", "F1");
22177 case 113:
22178 return java.awt.Toolkit.getProperty ("AWT.f2", "F2");
22179 case 114:
22180 return java.awt.Toolkit.getProperty ("AWT.f3", "F3");
22181 case 115:
22182 return java.awt.Toolkit.getProperty ("AWT.f4", "F4");
22183 case 116:
22184 return java.awt.Toolkit.getProperty ("AWT.f5", "F5");
22185 case 117:
22186 return java.awt.Toolkit.getProperty ("AWT.f6", "F6");
22187 case 118:
22188 return java.awt.Toolkit.getProperty ("AWT.f7", "F7");
22189 case 119:
22190 return java.awt.Toolkit.getProperty ("AWT.f8", "F8");
22191 case 120:
22192 return java.awt.Toolkit.getProperty ("AWT.f9", "F9");
22193 case 121:
22194 return java.awt.Toolkit.getProperty ("AWT.f10", "F10");
22195 case 122:
22196 return java.awt.Toolkit.getProperty ("AWT.f11", "F11");
22197 case 123:
22198 return java.awt.Toolkit.getProperty ("AWT.f12", "F12");
22199 case 61440:
22200 return java.awt.Toolkit.getProperty ("AWT.f13", "F13");
22201 case 61441:
22202 return java.awt.Toolkit.getProperty ("AWT.f14", "F14");
22203 case 61442:
22204 return java.awt.Toolkit.getProperty ("AWT.f15", "F15");
22205 case 61443:
22206 return java.awt.Toolkit.getProperty ("AWT.f16", "F16");
22207 case 61444:
22208 return java.awt.Toolkit.getProperty ("AWT.f17", "F17");
22209 case 61445:
22210 return java.awt.Toolkit.getProperty ("AWT.f18", "F18");
22211 case 61446:
22212 return java.awt.Toolkit.getProperty ("AWT.f19", "F19");
22213 case 61447:
22214 return java.awt.Toolkit.getProperty ("AWT.f20", "F20");
22215 case 61448:
22216 return java.awt.Toolkit.getProperty ("AWT.f21", "F21");
22217 case 61449:
22218 return java.awt.Toolkit.getProperty ("AWT.f22", "F22");
22219 case 61450:
22220 return java.awt.Toolkit.getProperty ("AWT.f23", "F23");
22221 case 61451:
22222 return java.awt.Toolkit.getProperty ("AWT.f24", "F24");
22223 case 154:
22224 return java.awt.Toolkit.getProperty ("AWT.printScreen", "Print Screen");
22225 case 155:
22226 return java.awt.Toolkit.getProperty ("AWT.insert", "Insert");
22227 case 156:
22228 return java.awt.Toolkit.getProperty ("AWT.help", "Help");
22229 case 192:
22230 return java.awt.Toolkit.getProperty ("AWT.backQuote", "Back Quote");
22231 case 222:
22232 return java.awt.Toolkit.getProperty ("AWT.quote", "Quote");
22233 case 224:
22234 return java.awt.Toolkit.getProperty ("AWT.up", "Up");
22235 case 225:
22236 return java.awt.Toolkit.getProperty ("AWT.down", "Down");
22237 case 226:
22238 return java.awt.Toolkit.getProperty ("AWT.left", "Left");
22239 case 227:
22240 return java.awt.Toolkit.getProperty ("AWT.right", "Right");
22241 case 128:
22242 return java.awt.Toolkit.getProperty ("AWT.deadGrave", "Dead Grave");
22243 case 129:
22244 return java.awt.Toolkit.getProperty ("AWT.deadAcute", "Dead Acute");
22245 case 130:
22246 return java.awt.Toolkit.getProperty ("AWT.deadCircumflex", "Dead Circumflex");
22247 case 131:
22248 return java.awt.Toolkit.getProperty ("AWT.deadTilde", "Dead Tilde");
22249 case 132:
22250 return java.awt.Toolkit.getProperty ("AWT.deadMacron", "Dead Macron");
22251 case 133:
22252 return java.awt.Toolkit.getProperty ("AWT.deadBreve", "Dead Breve");
22253 case 134:
22254 return java.awt.Toolkit.getProperty ("AWT.deadAboveDot", "Dead Above Dot");
22255 case 135:
22256 return java.awt.Toolkit.getProperty ("AWT.deadDiaeresis", "Dead Diaeresis");
22257 case 136:
22258 return java.awt.Toolkit.getProperty ("AWT.deadAboveRing", "Dead Above Ring");
22259 case 137:
22260 return java.awt.Toolkit.getProperty ("AWT.deadDoubleAcute", "Dead Double Acute");
22261 case 138:
22262 return java.awt.Toolkit.getProperty ("AWT.deadCaron", "Dead Caron");
22263 case 139:
22264 return java.awt.Toolkit.getProperty ("AWT.deadCedilla", "Dead Cedilla");
22265 case 140:
22266 return java.awt.Toolkit.getProperty ("AWT.deadOgonek", "Dead Ogonek");
22267 case 141:
22268 return java.awt.Toolkit.getProperty ("AWT.deadIota", "Dead Iota");
22269 case 142:
22270 return java.awt.Toolkit.getProperty ("AWT.deadVoicedSound", "Dead Voiced Sound");
22271 case 143:
22272 return java.awt.Toolkit.getProperty ("AWT.deadSemivoicedSound", "Dead Semivoiced Sound");
22273 case 150:
22274 return java.awt.Toolkit.getProperty ("AWT.ampersand", "Ampersand");
22275 case 151:
22276 return java.awt.Toolkit.getProperty ("AWT.asterisk", "Asterisk");
22277 case 152:
22278 return java.awt.Toolkit.getProperty ("AWT.quoteDbl", "Double Quote");
22279 case 153:
22280 return java.awt.Toolkit.getProperty ("AWT.Less", "Less");
22281 case 160:
22282 return java.awt.Toolkit.getProperty ("AWT.greater", "Greater");
22283 case 161:
22284 return java.awt.Toolkit.getProperty ("AWT.braceLeft", "Left Brace");
22285 case 162:
22286 return java.awt.Toolkit.getProperty ("AWT.braceRight", "Right Brace");
22287 case 512:
22288 return java.awt.Toolkit.getProperty ("AWT.at", "At");
22289 case 513:
22290 return java.awt.Toolkit.getProperty ("AWT.colon", "Colon");
22291 case 514:
22292 return java.awt.Toolkit.getProperty ("AWT.circumflex", "Circumflex");
22293 case 515:
22294 return java.awt.Toolkit.getProperty ("AWT.dollar", "Dollar");
22295 case 516:
22296 return java.awt.Toolkit.getProperty ("AWT.euro", "Euro");
22297 case 517:
22298 return java.awt.Toolkit.getProperty ("AWT.exclamationMark", "Exclamation Mark");
22299 case 518:
22300 return java.awt.Toolkit.getProperty ("AWT.invertedExclamationMark", "Inverted Exclamation Mark");
22301 case 519:
22302 return java.awt.Toolkit.getProperty ("AWT.leftParenthesis", "Left Parenthesis");
22303 case 520:
22304 return java.awt.Toolkit.getProperty ("AWT.numberSign", "Number Sign");
22305 case 45:
22306 return java.awt.Toolkit.getProperty ("AWT.minus", "Minus");
22307 case 521:
22308 return java.awt.Toolkit.getProperty ("AWT.plus", "Plus");
22309 case 522:
22310 return java.awt.Toolkit.getProperty ("AWT.rightParenthesis", "Right Parenthesis");
22311 case 523:
22312 return java.awt.Toolkit.getProperty ("AWT.underscore", "Underscore");
22313 case 24:
22314 return java.awt.Toolkit.getProperty ("AWT.final", "Final");
22315 case 28:
22316 return java.awt.Toolkit.getProperty ("AWT.convert", "Convert");
22317 case 29:
22318 return java.awt.Toolkit.getProperty ("AWT.noconvert", "No Convert");
22319 case 30:
22320 return java.awt.Toolkit.getProperty ("AWT.accept", "Accept");
22321 case 31:
22322 return java.awt.Toolkit.getProperty ("AWT.modechange", "Mode Change");
22323 case 21:
22324 return java.awt.Toolkit.getProperty ("AWT.kana", "Kana");
22325 case 25:
22326 return java.awt.Toolkit.getProperty ("AWT.kanji", "Kanji");
22327 case 240:
22328 return java.awt.Toolkit.getProperty ("AWT.alphanumeric", "Alphanumeric");
22329 case 241:
22330 return java.awt.Toolkit.getProperty ("AWT.katakana", "Katakana");
22331 case 242:
22332 return java.awt.Toolkit.getProperty ("AWT.hiragana", "Hiragana");
22333 case 243:
22334 return java.awt.Toolkit.getProperty ("AWT.fullWidth", "Full-Width");
22335 case 244:
22336 return java.awt.Toolkit.getProperty ("AWT.halfWidth", "Half-Width");
22337 case 245:
22338 return java.awt.Toolkit.getProperty ("AWT.romanCharacters", "Roman Characters");
22339 case 256:
22340 return java.awt.Toolkit.getProperty ("AWT.allCandidates", "All Candidates");
22341 case 257:
22342 return java.awt.Toolkit.getProperty ("AWT.previousCandidate", "Previous Candidate");
22343 case 258:
22344 return java.awt.Toolkit.getProperty ("AWT.codeInput", "Code Input");
22345 case 259:
22346 return java.awt.Toolkit.getProperty ("AWT.japaneseKatakana", "Japanese Katakana");
22347 case 260:
22348 return java.awt.Toolkit.getProperty ("AWT.japaneseHiragana", "Japanese Hiragana");
22349 case 261:
22350 return java.awt.Toolkit.getProperty ("AWT.japaneseRoman", "Japanese Roman");
22351 case 262:
22352 return java.awt.Toolkit.getProperty ("AWT.kanaLock", "Kana Lock");
22353 case 263:
22354 return java.awt.Toolkit.getProperty ("AWT.inputMethodOnOff", "Input Method On/Off");
22355 case 65481:
22356 return java.awt.Toolkit.getProperty ("AWT.again", "Again");
22357 case 65483:
22358 return java.awt.Toolkit.getProperty ("AWT.undo", "Undo");
22359 case 65485:
22360 return java.awt.Toolkit.getProperty ("AWT.copy", "Copy");
22361 case 65487:
22362 return java.awt.Toolkit.getProperty ("AWT.paste", "Paste");
22363 case 65489:
22364 return java.awt.Toolkit.getProperty ("AWT.cut", "Cut");
22365 case 65488:
22366 return java.awt.Toolkit.getProperty ("AWT.find", "Find");
22367 case 65482:
22368 return java.awt.Toolkit.getProperty ("AWT.props", "Props");
22369 case 65480:
22370 return java.awt.Toolkit.getProperty ("AWT.stop", "Stop");
22371 }
22372 if (keyCode >= 96 && keyCode <= 105) {
22373 var numpad = java.awt.Toolkit.getProperty ("AWT.numpad", "NumPad");
22374 var c = String.fromCharCode (keyCode - 96 + 48);
22375 return numpad + "-" + c;
22376 }var unknown = java.awt.Toolkit.getProperty ("AWT.unknown", "Unknown");
22377 return unknown + " keyCode: 0x" + Integer.toString (keyCode, 16);
22378 }, "~N");
22379 c$.getKeyModifiersText = Clazz_defineMethod (c$, "getKeyModifiersText", 
22380 function (modifiers) {
22381 var buf =  new StringBuilder ();
22382 if ((modifiers & 4) != 0) {
22383 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
22384 buf.append ("+");
22385 }if ((modifiers & 2) != 0) {
22386 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
22387 buf.append ("+");
22388 }if ((modifiers & 8) != 0) {
22389 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
22390 buf.append ("+");
22391 }if ((modifiers & 1) != 0) {
22392 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
22393 buf.append ("+");
22394 }if ((modifiers & 32) != 0) {
22395 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
22396 buf.append ("+");
22397 }if ((modifiers & 16) != 0) {
22398 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
22399 buf.append ("+");
22400 }if (buf.length () > 0) {
22401 buf.setLength (buf.length () - 1);
22402 }return buf.toString ();
22403 }, "~N");
22404 Clazz_defineMethod (c$, "isActionKey", 
22405 function () {
22406 switch (this.keyCode) {
22407 case 36:
22408 case 35:
22409 case 33:
22410 case 34:
22411 case 38:
22412 case 40:
22413 case 37:
22414 case 39:
22415 case 65368:
22416 case 226:
22417 case 224:
22418 case 227:
22419 case 225:
22420 case 112:
22421 case 113:
22422 case 114:
22423 case 115:
22424 case 116:
22425 case 117:
22426 case 118:
22427 case 119:
22428 case 120:
22429 case 121:
22430 case 122:
22431 case 123:
22432 case 61440:
22433 case 61441:
22434 case 61442:
22435 case 61443:
22436 case 61444:
22437 case 61445:
22438 case 61446:
22439 case 61447:
22440 case 61448:
22441 case 61449:
22442 case 61450:
22443 case 61451:
22444 case 154:
22445 case 145:
22446 case 20:
22447 case 144:
22448 case 19:
22449 case 155:
22450 case 24:
22451 case 28:
22452 case 29:
22453 case 30:
22454 case 31:
22455 case 21:
22456 case 25:
22457 case 240:
22458 case 241:
22459 case 242:
22460 case 243:
22461 case 244:
22462 case 245:
22463 case 256:
22464 case 257:
22465 case 258:
22466 case 259:
22467 case 260:
22468 case 261:
22469 case 262:
22470 case 263:
22471 case 65481:
22472 case 65483:
22473 case 65485:
22474 case 65487:
22475 case 65489:
22476 case 65488:
22477 case 65482:
22478 case 65480:
22479 case 156:
22480 case 524:
22481 case 525:
22482 return true;
22483 }
22484 return false;
22485 });
22486 Clazz_overrideMethod (c$, "paramString", 
22487 function () {
22488 var str =  new StringBuilder (100);
22489 switch (this.id) {
22490 case 401:
22491 str.append ("KEY_PRESSED");
22492 break;
22493 case 402:
22494 str.append ("KEY_RELEASED");
22495 break;
22496 case 400:
22497 str.append ("KEY_TYPED");
22498 break;
22499 default:
22500 str.append ("unknown type");
22501 break;
22502 }
22503 str.append (",keyCode=").append ("" + this.keyCode);
22504 str.append (",keyText=").append (java.awt.event.KeyEvent.getKeyText (this.keyCode));
22505 str.append (",keyChar=");
22506 switch (this.keyChar) {
22507 case '\b':
22508 str.append (java.awt.event.KeyEvent.getKeyText (8));
22509 break;
22510 case '\t':
22511 str.append (java.awt.event.KeyEvent.getKeyText (9));
22512 break;
22513 case '\n':
22514 str.append (java.awt.event.KeyEvent.getKeyText (10));
22515 break;
22516 case '\u0018':
22517 str.append (java.awt.event.KeyEvent.getKeyText (3));
22518 break;
22519 case '\u001b':
22520 str.append (java.awt.event.KeyEvent.getKeyText (27));
22521 break;
22522 case '\u007f':
22523 str.append (java.awt.event.KeyEvent.getKeyText (127));
22524 break;
22525 case '\uffff':
22526 str.append (java.awt.Toolkit.getProperty ("AWT.undefined", "Undefined"));
22527 str.append (" keyChar");
22528 break;
22529 default:
22530 str.append ("'").append (this.keyChar).append ("'");
22531 break;
22532 }
22533 if (this.getModifiers () != 0) {
22534 str.append (",modifiers=").append (java.awt.event.KeyEvent.getKeyModifiersText (this.modifiers));
22535 }if (this.getModifiersEx () != 0) {
22536 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
22537 }str.append (",keyLocation=");
22538 switch (this.keyLocation) {
22539 case 0:
22540 str.append ("KEY_LOCATION_UNKNOWN");
22541 break;
22542 case 1:
22543 str.append ("KEY_LOCATION_STANDARD");
22544 break;
22545 case 2:
22546 str.append ("KEY_LOCATION_LEFT");
22547 break;
22548 case 3:
22549 str.append ("KEY_LOCATION_RIGHT");
22550 break;
22551 case 4:
22552 str.append ("KEY_LOCATION_NUMPAD");
22553 break;
22554 default:
22555 str.append ("KEY_LOCATION_UNKNOWN");
22556 break;
22557 }
22558 return str.toString ();
22559 });
22560 Clazz_defineMethod (c$, "setNewModifiers", 
22561  function () {
22562 if ((this.modifiers & 1) != 0) {
22563 this.modifiers |= 64;
22564 }if ((this.modifiers & 8) != 0) {
22565 this.modifiers |= 512;
22566 }if ((this.modifiers & 2) != 0) {
22567 this.modifiers |= 128;
22568 }if ((this.modifiers & 4) != 0) {
22569 this.modifiers |= 256;
22570 }if ((this.modifiers & 32) != 0) {
22571 this.modifiers |= 8192;
22572 }if ((this.modifiers & 16) != 0) {
22573 this.modifiers |= 1024;
22574 }});
22575 Clazz_defineMethod (c$, "setOldModifiers", 
22576  function () {
22577 if ((this.modifiers & 64) != 0) {
22578 this.modifiers |= 1;
22579 }if ((this.modifiers & 512) != 0) {
22580 this.modifiers |= 8;
22581 }if ((this.modifiers & 128) != 0) {
22582 this.modifiers |= 2;
22583 }if ((this.modifiers & 256) != 0) {
22584 this.modifiers |= 4;
22585 }if ((this.modifiers & 8192) != 0) {
22586 this.modifiers |= 32;
22587 }if ((this.modifiers & 1024) != 0) {
22588 this.modifiers |= 16;
22589 }});
22590 Clazz_defineStatics (c$,
22591 "KEY_FIRST", 400,
22592 "KEY_LAST", 402,
22593 "KEY_TYPED", 400,
22594 "KEY_PRESSED", 401,
22595 "KEY_RELEASED", 402,
22596 "VK_ENTER", '\n',
22597 "VK_BACK_SPACE", '\b',
22598 "VK_TAB", '\t',
22599 "VK_CANCEL", 0x03,
22600 "VK_CLEAR", 0x0C,
22601 "VK_SHIFT", 0x10,
22602 "VK_CONTROL", 0x11,
22603 "VK_ALT", 0x12,
22604 "VK_PAUSE", 0x13,
22605 "VK_CAPS_LOCK", 0x14,
22606 "VK_ESCAPE", 0x1B,
22607 "VK_SPACE", 0x20,
22608 "VK_PAGE_UP", 0x21,
22609 "VK_PAGE_DOWN", 0x22,
22610 "VK_END", 0x23,
22611 "VK_HOME", 0x24,
22612 "VK_LEFT", 0x25,
22613 "VK_UP", 0x26,
22614 "VK_RIGHT", 0x27,
22615 "VK_DOWN", 0x28,
22616 "VK_COMMA", 0x2C,
22617 "VK_MINUS", 0x2D,
22618 "VK_PERIOD", 0x2E,
22619 "VK_SLASH", 0x2F,
22620 "VK_0", 0x30,
22621 "VK_1", 0x31,
22622 "VK_2", 0x32,
22623 "VK_3", 0x33,
22624 "VK_4", 0x34,
22625 "VK_5", 0x35,
22626 "VK_6", 0x36,
22627 "VK_7", 0x37,
22628 "VK_8", 0x38,
22629 "VK_9", 0x39,
22630 "VK_SEMICOLON", 0x3B,
22631 "VK_EQUALS", 0x3D,
22632 "VK_A", 0x41,
22633 "VK_B", 0x42,
22634 "VK_C", 0x43,
22635 "VK_D", 0x44,
22636 "VK_E", 0x45,
22637 "VK_F", 0x46,
22638 "VK_G", 0x47,
22639 "VK_H", 0x48,
22640 "VK_I", 0x49,
22641 "VK_J", 0x4A,
22642 "VK_K", 0x4B,
22643 "VK_L", 0x4C,
22644 "VK_M", 0x4D,
22645 "VK_N", 0x4E,
22646 "VK_O", 0x4F,
22647 "VK_P", 0x50,
22648 "VK_Q", 0x51,
22649 "VK_R", 0x52,
22650 "VK_S", 0x53,
22651 "VK_T", 0x54,
22652 "VK_U", 0x55,
22653 "VK_V", 0x56,
22654 "VK_W", 0x57,
22655 "VK_X", 0x58,
22656 "VK_Y", 0x59,
22657 "VK_Z", 0x5A,
22658 "VK_OPEN_BRACKET", 0x5B,
22659 "VK_BACK_SLASH", 0x5C,
22660 "VK_CLOSE_BRACKET", 0x5D,
22661 "VK_NUMPAD0", 0x60,
22662 "VK_NUMPAD1", 0x61,
22663 "VK_NUMPAD2", 0x62,
22664 "VK_NUMPAD3", 0x63,
22665 "VK_NUMPAD4", 0x64,
22666 "VK_NUMPAD5", 0x65,
22667 "VK_NUMPAD6", 0x66,
22668 "VK_NUMPAD7", 0x67,
22669 "VK_NUMPAD8", 0x68,
22670 "VK_NUMPAD9", 0x69,
22671 "VK_MULTIPLY", 0x6A,
22672 "VK_ADD", 0x6B,
22673 "VK_SEPARATER", 0x6C,
22674 "VK_SEPARATOR", 108,
22675 "VK_SUBTRACT", 0x6D,
22676 "VK_DECIMAL", 0x6E,
22677 "VK_DIVIDE", 0x6F,
22678 "VK_DELETE", 0x7F,
22679 "VK_NUM_LOCK", 0x90,
22680 "VK_SCROLL_LOCK", 0x91,
22681 "VK_F1", 0x70,
22682 "VK_F2", 0x71,
22683 "VK_F3", 0x72,
22684 "VK_F4", 0x73,
22685 "VK_F5", 0x74,
22686 "VK_F6", 0x75,
22687 "VK_F7", 0x76,
22688 "VK_F8", 0x77,
22689 "VK_F9", 0x78,
22690 "VK_F10", 0x79,
22691 "VK_F11", 0x7A,
22692 "VK_F12", 0x7B,
22693 "VK_F13", 0xF000,
22694 "VK_F14", 0xF001,
22695 "VK_F15", 0xF002,
22696 "VK_F16", 0xF003,
22697 "VK_F17", 0xF004,
22698 "VK_F18", 0xF005,
22699 "VK_F19", 0xF006,
22700 "VK_F20", 0xF007,
22701 "VK_F21", 0xF008,
22702 "VK_F22", 0xF009,
22703 "VK_F23", 0xF00A,
22704 "VK_F24", 0xF00B,
22705 "VK_PRINTSCREEN", 0x9A,
22706 "VK_INSERT", 0x9B,
22707 "VK_HELP", 0x9C,
22708 "VK_META", 0x9D,
22709 "VK_BACK_QUOTE", 0xC0,
22710 "VK_QUOTE", 0xDE,
22711 "VK_KP_UP", 0xE0,
22712 "VK_KP_DOWN", 0xE1,
22713 "VK_KP_LEFT", 0xE2,
22714 "VK_KP_RIGHT", 0xE3,
22715 "VK_DEAD_GRAVE", 0x80,
22716 "VK_DEAD_ACUTE", 0x81,
22717 "VK_DEAD_CIRCUMFLEX", 0x82,
22718 "VK_DEAD_TILDE", 0x83,
22719 "VK_DEAD_MACRON", 0x84,
22720 "VK_DEAD_BREVE", 0x85,
22721 "VK_DEAD_ABOVEDOT", 0x86,
22722 "VK_DEAD_DIAERESIS", 0x87,
22723 "VK_DEAD_ABOVERING", 0x88,
22724 "VK_DEAD_DOUBLEACUTE", 0x89,
22725 "VK_DEAD_CARON", 0x8a,
22726 "VK_DEAD_CEDILLA", 0x8b,
22727 "VK_DEAD_OGONEK", 0x8c,
22728 "VK_DEAD_IOTA", 0x8d,
22729 "VK_DEAD_VOICED_SOUND", 0x8e,
22730 "VK_DEAD_SEMIVOICED_SOUND", 0x8f,
22731 "VK_AMPERSAND", 0x96,
22732 "VK_ASTERISK", 0x97,
22733 "VK_QUOTEDBL", 0x98,
22734 "VK_LESS", 0x99,
22735 "VK_GREATER", 0xa0,
22736 "VK_BRACELEFT", 0xa1,
22737 "VK_BRACERIGHT", 0xa2,
22738 "VK_AT", 0x0200,
22739 "VK_COLON", 0x0201,
22740 "VK_CIRCUMFLEX", 0x0202,
22741 "VK_DOLLAR", 0x0203,
22742 "VK_EURO_SIGN", 0x0204,
22743 "VK_EXCLAMATION_MARK", 0x0205,
22744 "VK_INVERTED_EXCLAMATION_MARK", 0x0206,
22745 "VK_LEFT_PARENTHESIS", 0x0207,
22746 "VK_NUMBER_SIGN", 0x0208,
22747 "VK_PLUS", 0x0209,
22748 "VK_RIGHT_PARENTHESIS", 0x020A,
22749 "VK_UNDERSCORE", 0x020B,
22750 "VK_WINDOWS", 0x020C,
22751 "VK_CONTEXT_MENU", 0x020D,
22752 "VK_FINAL", 0x0018,
22753 "VK_CONVERT", 0x001C,
22754 "VK_NONCONVERT", 0x001D,
22755 "VK_ACCEPT", 0x001E,
22756 "VK_MODECHANGE", 0x001F,
22757 "VK_KANA", 0x0015,
22758 "VK_KANJI", 0x0019,
22759 "VK_ALPHANUMERIC", 0x00F0,
22760 "VK_KATAKANA", 0x00F1,
22761 "VK_HIRAGANA", 0x00F2,
22762 "VK_FULL_WIDTH", 0x00F3,
22763 "VK_HALF_WIDTH", 0x00F4,
22764 "VK_ROMAN_CHARACTERS", 0x00F5,
22765 "VK_ALL_CANDIDATES", 0x0100,
22766 "VK_PREVIOUS_CANDIDATE", 0x0101,
22767 "VK_CODE_INPUT", 0x0102,
22768 "VK_JAPANESE_KATAKANA", 0x0103,
22769 "VK_JAPANESE_HIRAGANA", 0x0104,
22770 "VK_JAPANESE_ROMAN", 0x0105,
22771 "VK_KANA_LOCK", 0x0106,
22772 "VK_INPUT_METHOD_ON_OFF", 0x0107,
22773 "VK_CUT", 0xFFD1,
22774 "VK_COPY", 0xFFCD,
22775 "VK_PASTE", 0xFFCF,
22776 "VK_UNDO", 0xFFCB,
22777 "VK_AGAIN", 0xFFC9,
22778 "VK_FIND", 0xFFD0,
22779 "VK_PROPS", 0xFFCA,
22780 "VK_STOP", 0xFFC8,
22781 "VK_COMPOSE", 0xFF20,
22782 "VK_ALT_GRAPH", 0xFF7E,
22783 "VK_BEGIN", 0xFF58,
22784 "VK_UNDEFINED", 0x0,
22785 "CHAR_UNDEFINED", String.fromCharCode (0xFFFF),
22786 "KEY_LOCATION_UNKNOWN", 0,
22787 "KEY_LOCATION_STANDARD", 1,
22788 "KEY_LOCATION_LEFT", 2,
22789 "KEY_LOCATION_RIGHT", 3,
22790 "KEY_LOCATION_NUMPAD", 4);
22791 });
22792 Clazz_declarePackage ("java.awt.event");
22793 Clazz_load (["java.awt.event.MouseEvent"], "java.awt.event.MouseWheelEvent", null, function () {
22794 c$ = Clazz_decorateAsClass (function () {
22795 this.scrollType = 0;
22796 this.scrollAmount = 0;
22797 this.wheelRotation = 0;
22798 Clazz_instantialize (this, arguments);
22799 }, java.awt.event, "MouseWheelEvent", java.awt.event.MouseEvent);
22800 Clazz_makeConstructor (c$, 
22801 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22802 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation);
22803 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22804 Clazz_makeConstructor (c$, 
22805 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, scrollType, scrollAmount, wheelRotation) {
22806 Clazz_superConstructor (this, java.awt.event.MouseWheelEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
22807 this.scrollType = scrollType;
22808 this.scrollAmount = scrollAmount;
22809 this.wheelRotation = wheelRotation;
22810 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N,~N");
22811 Clazz_defineMethod (c$, "getScrollType", 
22812 function () {
22813 return this.scrollType;
22814 });
22815 Clazz_defineMethod (c$, "getScrollAmount", 
22816 function () {
22817 return this.scrollAmount;
22818 });
22819 Clazz_defineMethod (c$, "getWheelRotation", 
22820 function () {
22821 return this.wheelRotation;
22822 });
22823 Clazz_defineMethod (c$, "getUnitsToScroll", 
22824 function () {
22825 return this.scrollAmount * this.wheelRotation;
22826 });
22827 Clazz_defineMethod (c$, "paramString", 
22828 function () {
22829 var scrollTypeStr = null;
22830 if (this.getScrollType () == 0) {
22831 scrollTypeStr = "WHEEL_UNIT_SCROLL";
22832 } else if (this.getScrollType () == 1) {
22833 scrollTypeStr = "WHEEL_BLOCK_SCROLL";
22834 } else {
22835 scrollTypeStr = "unknown scroll type";
22836 }return Clazz_superCall (this, java.awt.event.MouseWheelEvent, "paramString", []) + ",scrollType=" + scrollTypeStr + ",scrollAmount=" + this.getScrollAmount () + ",wheelRotation=" + this.getWheelRotation ();
22837 });
22838 Clazz_defineStatics (c$,
22839 "WHEEL_UNIT_SCROLL", 0,
22840 "WHEEL_BLOCK_SCROLL", 1);
22841 });
22842 Clazz_declarePackage ("javax.swing");
22843 Clazz_load (["javax.swing.Action", "$.ArrayTable"], "javax.swing.AbstractAction", ["java.lang.Boolean", "javax.swing.event.SwingPropertyChangeSupport"], function () {
22844 c$ = Clazz_decorateAsClass (function () {
22845 this.enabled = true;
22846 this.arrayTable = null;
22847 this.changeSupport = null;
22848 Clazz_instantialize (this, arguments);
22849 }, javax.swing, "AbstractAction", null, [javax.swing.Action, Cloneable]);
22850 c$.shouldReconfigure = Clazz_defineMethod (c$, "shouldReconfigure", 
22851 function (e) {
22852 if (e.getPropertyName () == null) {
22853 javax.swing.AbstractAction.RECONFIGURE_ON_NULL = new Boolean (false);
22854 }return false;
22855 }, "java.beans.PropertyChangeEvent");
22856 c$.setEnabledFromAction = Clazz_defineMethod (c$, "setEnabledFromAction", 
22857 function (c, a) {
22858 c.setEnabled ((a != null) ? a.isEnabled () : true);
22859 }, "javax.swing.JComponent,javax.swing.Action");
22860 c$.setToolTipTextFromAction = Clazz_defineMethod (c$, "setToolTipTextFromAction", 
22861 function (c, a) {
22862 c.setToolTipText (a != null ? a.getValue ("ShortDescription") : null);
22863 }, "javax.swing.JComponent,javax.swing.Action");
22864 c$.hasSelectedKey = Clazz_defineMethod (c$, "hasSelectedKey", 
22865 function (a) {
22866 return (a != null && a.getValue ("SwingSelectedKey") != null);
22867 }, "javax.swing.Action");
22868 c$.isSelected = Clazz_defineMethod (c$, "isSelected", 
22869 function (a) {
22870 return Boolean.TRUE.equals (a.getValue ("SwingSelectedKey"));
22871 }, "javax.swing.Action");
22872 Clazz_makeConstructor (c$, 
22873 function () {
22874 });
22875 Clazz_makeConstructor (c$, 
22876 function (name) {
22877 this.putValue ("Name", name);
22878 }, "~S");
22879 Clazz_makeConstructor (c$, 
22880 function (name, icon) {
22881 this.construct (name);
22882 this.putValue ("SmallIcon", icon);
22883 }, "~S,javax.swing.Icon");
22884 Clazz_defineMethod (c$, "getValue", 
22885 function (key) {
22886 if (key === "enabled") {
22887 return this.enabled;
22888 }if (this.arrayTable == null) {
22889 return null;
22890 }return this.arrayTable.get (key);
22891 }, "~S");
22892 Clazz_overrideMethod (c$, "putValue", 
22893 function (key, newValue) {
22894 var oldValue = null;
22895 if (key === "enabled") {
22896 if (newValue == null || !(Clazz_instanceOf (newValue, Boolean))) {
22897 newValue = new Boolean (false);
22898 }oldValue = new Boolean (this.enabled);
22899 this.enabled = (newValue).booleanValue ();
22900 } else {
22901 if (this.arrayTable == null) {
22902 this.arrayTable =  new javax.swing.ArrayTable ();
22903 }if (this.arrayTable.containsKey (key)) oldValue = this.arrayTable.get (key);
22904 if (newValue == null) {
22905 this.arrayTable.remove (key);
22906 } else {
22907 this.arrayTable.put (key, newValue);
22908 }}this.firePropertyChange (key, oldValue, newValue);
22909 }, "~S,~O");
22910 Clazz_defineMethod (c$, "isEnabled", 
22911 function () {
22912 return this.enabled;
22913 });
22914 Clazz_overrideMethod (c$, "setEnabled", 
22915 function (newValue) {
22916 var oldValue = this.enabled;
22917 if (oldValue != newValue) {
22918 this.enabled = newValue;
22919 this.firePropertyChange ("enabled", Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
22920 }}, "~B");
22921 Clazz_defineMethod (c$, "getKeys", 
22922 function () {
22923 if (this.arrayTable == null) {
22924 return null;
22925 }var keys =  new Array (this.arrayTable.size ());
22926 this.arrayTable.getKeys (keys);
22927 return keys;
22928 });
22929 Clazz_defineMethod (c$, "firePropertyChange", 
22930 function (propertyName, oldValue, newValue) {
22931 if (this.changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
22932 return;
22933 }this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
22934 }, "~S,~O,~O");
22935 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
22936 function (listener) {
22937 if (this.changeSupport == null) {
22938 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
22939 }this.changeSupport.addPropertyChangeListener (listener);
22940 }, "java.beans.PropertyChangeListener");
22941 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
22942 function (listener) {
22943 if (this.changeSupport == null) {
22944 return;
22945 }this.changeSupport.removePropertyChangeListener (listener);
22946 }, "java.beans.PropertyChangeListener");
22947 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
22948 function () {
22949 if (this.changeSupport == null) {
22950 return  new Array (0);
22951 }return this.changeSupport.getPropertyChangeListeners ();
22952 });
22953 Clazz_defineMethod (c$, "clone", 
22954 function () {
22955 var newAction = Clazz_superCall (this, javax.swing.AbstractAction, "clone", []);
22956 {
22957 if (this.arrayTable != null) {
22958 newAction.arrayTable = this.arrayTable.clone ();
22959 }}return newAction;
22960 });
22961 Clazz_defineStatics (c$,
22962 "RECONFIGURE_ON_NULL", null);
22963 });
22964 Clazz_declarePackage ("javax.swing");
22965 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 () {
22966 c$ = Clazz_decorateAsClass (function () {
22967 this.model = null;
22968 this.text = "";
22969 this.margin = null;
22970 this.defaultMargin = null;
22971 this.defaultIcon = null;
22972 this.pressedIcon = null;
22973 this.disabledIcon = null;
22974 this.selectedIcon = null;
22975 this.disabledSelectedIcon = null;
22976 this.rolloverIcon = null;
22977 this.rolloverSelectedIcon = null;
22978 this.$paintBorder = true;
22979 this.paintFocus = true;
22980 this.rolloverEnabled = false;
22981 this.contentAreaFilled = true;
22982 this.verticalAlignment = 0;
22983 this.horizontalAlignment = 0;
22984 this.verticalTextPosition = 0;
22985 this.horizontalTextPosition = 11;
22986 this.iconTextGap = 4;
22987 this.mnemonic = 0;
22988 this.mnemonicIndex = -1;
22989 this.multiClickThreshhold = 0;
22990 this.borderPaintedSet = false;
22991 this.rolloverEnabledSet = false;
22992 this.iconTextGapSet = false;
22993 this.contentAreaFilledSet = false;
22994 this.$setLayout = false;
22995 this.defaultCapable = true;
22996 this.handler = null;
22997 this.changeListener = null;
22998 this.actionListener = null;
22999 this.itemListener = null;
23000 this.changeEvent = null;
23001 this.hideActionText = false;
23002 this.$action = null;
23003 this.actionPropertyChangeListener = null;
23004 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.ButtonChangeListener")) {
23005 javax.swing.AbstractButton.$AbstractButton$ButtonChangeListener$ ();
23006 }
23007 if (!Clazz_isClassDefined ("javax.swing.AbstractButton.Handler")) {
23008 javax.swing.AbstractButton.$AbstractButton$Handler$ ();
23009 }
23010 Clazz_instantialize (this, arguments);
23011 }, javax.swing, "AbstractButton", javax.swing.JComponent, [java.awt.ItemSelectable, javax.swing.SwingConstants]);
23012 Clazz_defineMethod (c$, "setHideActionText", 
23013 function (hideActionText) {
23014 if (hideActionText != this.hideActionText) {
23015 this.hideActionText = hideActionText;
23016 if (this.getAction () != null) {
23017 this.setTextFromAction (this.getAction (), false);
23018 }this.firePropertyChangeBool ("hideActionText", !hideActionText, hideActionText);
23019 }}, "~B");
23020 Clazz_defineMethod (c$, "getHideActionText", 
23021 function () {
23022 return this.hideActionText;
23023 });
23024 Clazz_defineMethod (c$, "getText", 
23025 function () {
23026 return this.text;
23027 });
23028 Clazz_defineMethod (c$, "setText", 
23029 function (text) {
23030 var oldValue = this.text;
23031 this.text = text;
23032 this.firePropertyChangeObject ("text", oldValue, text);
23033 this.updateDisplayedMnemonicIndex (text, this.getMnemonic ());
23034 if (text == null || oldValue == null || !text.equals (oldValue)) {
23035 this.revalidate ();
23036 this.repaint ();
23037 }}, "~S");
23038 Clazz_defineMethod (c$, "isSelected", 
23039 function () {
23040 return this.model.isSelected ();
23041 });
23042 Clazz_defineMethod (c$, "setSelected", 
23043 function (b) {
23044 this.model.setSelected (b);
23045 }, "~B");
23046 Clazz_defineMethod (c$, "doClick", 
23047 function () {
23048 this.doClick (68);
23049 });
23050 Clazz_defineMethod (c$, "doClick", 
23051 function (pressTime) {
23052 }, "~N");
23053 Clazz_defineMethod (c$, "setMargin", 
23054 function (m) {
23055 if (Clazz_instanceOf (m, javax.swing.plaf.UIResource)) {
23056 this.defaultMargin = m;
23057 } else if (Clazz_instanceOf (this.margin, javax.swing.plaf.UIResource)) {
23058 this.defaultMargin = this.margin;
23059 }if (m == null && this.defaultMargin != null) {
23060 m = this.defaultMargin;
23061 }var old = this.margin;
23062 this.margin = m;
23063 this.firePropertyChangeObject ("margin", old, m);
23064 if (old == null || !old.equals (m)) {
23065 this.revalidate ();
23066 this.repaint ();
23067 }}, "java.awt.Insets");
23068 Clazz_defineMethod (c$, "getMargin", 
23069 function () {
23070 return (this.margin == null) ? null : this.margin.clone ();
23071 });
23072 Clazz_defineMethod (c$, "getIcon", 
23073 function () {
23074 return this.defaultIcon;
23075 });
23076 Clazz_defineMethod (c$, "setIcon", 
23077 function (defaultIcon) {
23078 var oldValue = this.defaultIcon;
23079 this.defaultIcon = defaultIcon;
23080 if (defaultIcon !== oldValue && (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource))) {
23081 this.disabledIcon = null;
23082 }this.firePropertyChangeObject ("icon", oldValue, defaultIcon);
23083 if (defaultIcon !== oldValue) {
23084 if (defaultIcon == null || oldValue == null || defaultIcon.getIconWidth () != oldValue.getIconWidth () || defaultIcon.getIconHeight () != oldValue.getIconHeight ()) {
23085 this.revalidate ();
23086 }this.repaint ();
23087 }}, "javax.swing.Icon");
23088 Clazz_defineMethod (c$, "getPressedIcon", 
23089 function () {
23090 return this.pressedIcon;
23091 });
23092 Clazz_defineMethod (c$, "setPressedIcon", 
23093 function (pressedIcon) {
23094 var oldValue = this.pressedIcon;
23095 this.pressedIcon = pressedIcon;
23096 this.firePropertyChangeObject ("pressedIcon", oldValue, pressedIcon);
23097 if (pressedIcon !== oldValue) {
23098 if (this.getModel ().isPressed ()) {
23099 this.repaint ();
23100 }}}, "javax.swing.Icon");
23101 Clazz_defineMethod (c$, "getSelectedIcon", 
23102 function () {
23103 return this.selectedIcon;
23104 });
23105 Clazz_defineMethod (c$, "setSelectedIcon", 
23106 function (selectedIcon) {
23107 var oldValue = this.selectedIcon;
23108 this.selectedIcon = selectedIcon;
23109 if (selectedIcon !== oldValue && Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23110 this.disabledSelectedIcon = null;
23111 }this.firePropertyChangeObject ("selectedIcon", oldValue, selectedIcon);
23112 if (selectedIcon !== oldValue) {
23113 if (this.isSelected ()) {
23114 this.repaint ();
23115 }}}, "javax.swing.Icon");
23116 Clazz_defineMethod (c$, "getRolloverIcon", 
23117 function () {
23118 return this.rolloverIcon;
23119 });
23120 Clazz_defineMethod (c$, "setRolloverIcon", 
23121 function (rolloverIcon) {
23122 var oldValue = this.rolloverIcon;
23123 this.rolloverIcon = rolloverIcon;
23124 this.firePropertyChangeObject ("rolloverIcon", oldValue, rolloverIcon);
23125 this.setRolloverEnabled (true);
23126 if (rolloverIcon !== oldValue) {
23127 this.repaint ();
23128 }}, "javax.swing.Icon");
23129 Clazz_defineMethod (c$, "getRolloverSelectedIcon", 
23130 function () {
23131 return this.rolloverSelectedIcon;
23132 });
23133 Clazz_defineMethod (c$, "setRolloverSelectedIcon", 
23134 function (rolloverSelectedIcon) {
23135 var oldValue = this.rolloverSelectedIcon;
23136 this.rolloverSelectedIcon = rolloverSelectedIcon;
23137 this.firePropertyChangeObject ("rolloverSelectedIcon", oldValue, rolloverSelectedIcon);
23138 this.setRolloverEnabled (true);
23139 if (rolloverSelectedIcon !== oldValue) {
23140 if (this.isSelected ()) {
23141 this.repaint ();
23142 }}}, "javax.swing.Icon");
23143 Clazz_defineMethod (c$, "getDisabledIcon", 
23144 function () {
23145 if (this.disabledIcon == null) {
23146 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.getIcon ());
23147 if (this.disabledIcon != null) {
23148 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
23149 }}return this.disabledIcon;
23150 });
23151 Clazz_defineMethod (c$, "setDisabledIcon", 
23152 function (disabledIcon) {
23153 var oldValue = this.disabledIcon;
23154 this.disabledIcon = disabledIcon;
23155 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
23156 if (disabledIcon !== oldValue) {
23157 if (!this.isEnabled ()) {
23158 this.repaint ();
23159 }}}, "javax.swing.Icon");
23160 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
23161 function () {
23162 if (this.disabledSelectedIcon == null) {
23163 if (this.selectedIcon != null) {
23164 this.disabledSelectedIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledSelectedIcon (this, this.getSelectedIcon ());
23165 } else {
23166 return this.getDisabledIcon ();
23167 }}return this.disabledSelectedIcon;
23168 });
23169 Clazz_defineMethod (c$, "setDisabledSelectedIcon", 
23170 function (disabledSelectedIcon) {
23171 var oldValue = this.disabledSelectedIcon;
23172 this.disabledSelectedIcon = disabledSelectedIcon;
23173 this.firePropertyChangeObject ("disabledSelectedIcon", oldValue, disabledSelectedIcon);
23174 if (disabledSelectedIcon !== oldValue) {
23175 if (disabledSelectedIcon == null || oldValue == null || disabledSelectedIcon.getIconWidth () != oldValue.getIconWidth () || disabledSelectedIcon.getIconHeight () != oldValue.getIconHeight ()) {
23176 this.revalidate ();
23177 }if (!this.isEnabled () && this.isSelected ()) {
23178 this.repaint ();
23179 }}}, "javax.swing.Icon");
23180 Clazz_defineMethod (c$, "getVerticalAlignment", 
23181 function () {
23182 return this.verticalAlignment;
23183 });
23184 Clazz_defineMethod (c$, "setVerticalAlignment", 
23185 function (alignment) {
23186 if (alignment == this.verticalAlignment) return;
23187 var oldValue = this.verticalAlignment;
23188 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
23189 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
23190 this.repaint ();
23191 }, "~N");
23192 Clazz_defineMethod (c$, "getHorizontalAlignment", 
23193 function () {
23194 return this.horizontalAlignment;
23195 });
23196 Clazz_defineMethod (c$, "setHorizontalAlignment", 
23197 function (alignment) {
23198 if (alignment == this.horizontalAlignment) return;
23199 var oldValue = this.horizontalAlignment;
23200 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
23201 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
23202 this.repaint ();
23203 }, "~N");
23204 Clazz_defineMethod (c$, "getVerticalTextPosition", 
23205 function () {
23206 return this.verticalTextPosition;
23207 });
23208 Clazz_defineMethod (c$, "setVerticalTextPosition", 
23209 function (textPosition) {
23210 if (textPosition == this.verticalTextPosition) return;
23211 var oldValue = this.verticalTextPosition;
23212 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
23213 this.firePropertyChangeInt ("verticalTextPosition", oldValue, this.verticalTextPosition);
23214 this.revalidate ();
23215 this.repaint ();
23216 }, "~N");
23217 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
23218 function () {
23219 return this.horizontalTextPosition;
23220 });
23221 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
23222 function (textPosition) {
23223 if (textPosition == this.horizontalTextPosition) return;
23224 var oldValue = this.horizontalTextPosition;
23225 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
23226 this.firePropertyChangeInt ("horizontalTextPosition", oldValue, this.horizontalTextPosition);
23227 this.revalidate ();
23228 this.repaint ();
23229 }, "~N");
23230 Clazz_defineMethod (c$, "getIconTextGap", 
23231 function () {
23232 return this.iconTextGap;
23233 });
23234 Clazz_defineMethod (c$, "setIconTextGap", 
23235 function (iconTextGap) {
23236 var oldValue = this.iconTextGap;
23237 this.iconTextGap = iconTextGap;
23238 this.iconTextGapSet = true;
23239 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
23240 if (iconTextGap != oldValue) {
23241 this.revalidate ();
23242 this.repaint ();
23243 }}, "~N");
23244 Clazz_defineMethod (c$, "checkHorizontalKey", 
23245 function (key, exception) {
23246 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
23247 return key;
23248 } else {
23249 throw  new IllegalArgumentException (exception);
23250 }}, "~N,~S");
23251 Clazz_defineMethod (c$, "checkVerticalKey", 
23252 function (key, exception) {
23253 if ((key == 1) || (key == 0) || (key == 3)) {
23254 return key;
23255 } else {
23256 throw  new IllegalArgumentException (exception);
23257 }}, "~N,~S");
23258 Clazz_defineMethod (c$, "removeNotify", 
23259 function () {
23260 Clazz_superCall (this, javax.swing.AbstractButton, "removeNotify", []);
23261 if (this.isRolloverEnabled ()) {
23262 this.getModel ().setRollover (false);
23263 }});
23264 Clazz_defineMethod (c$, "setActionCommand", 
23265 function (actionCommand) {
23266 this.getModel ().setActionCommand (actionCommand);
23267 }, "~S");
23268 Clazz_defineMethod (c$, "getActionCommand", 
23269 function () {
23270 var ac = this.getModel ().getActionCommand ();
23271 if (ac == null) {
23272 ac = this.getText ();
23273 }return ac;
23274 });
23275 Clazz_defineMethod (c$, "setAction", 
23276 function (a) {
23277 var oldValue = this.getAction ();
23278 if (this.$action == null || !this.$action.equals (a)) {
23279 this.$action = a;
23280 if (oldValue != null) {
23281 this.removeActionListener (oldValue);
23282 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
23283 this.actionPropertyChangeListener = null;
23284 }this.configurePropertiesFromAction (this.$action);
23285 if (this.$action != null) {
23286 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
23287 this.addActionListener (this.$action);
23288 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
23289 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
23290 }this.firePropertyChangeObject ("action", oldValue, this.$action);
23291 }}, "javax.swing.Action");
23292 Clazz_defineMethod (c$, "isListener", 
23293  function (c, a) {
23294 var isListener = false;
23295 var listeners = this.listenerList.getListenerList ();
23296 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23297 if (listeners[i] === c && listeners[i + 1] === a) {
23298 isListener = true;
23299 }}
23300 return isListener;
23301 }, "Class,java.awt.event.ActionListener");
23302 Clazz_defineMethod (c$, "getAction", 
23303 function () {
23304 return this.$action;
23305 });
23306 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
23307 function (a) {
23308 this.setMnemonicFromAction (a);
23309 this.setTextFromAction (a, false);
23310 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
23311 this.setIconFromAction (a);
23312 this.setActionCommandFromAction (a);
23313 javax.swing.AbstractAction.setEnabledFromAction (this, a);
23314 if (javax.swing.AbstractAction.hasSelectedKey (a) && this.shouldUpdateSelectedStateFromAction ()) {
23315 this.setSelectedFromAction (a);
23316 }this.setDisplayedMnemonicIndexFromAction (a, false);
23317 }, "javax.swing.Action");
23318 Clazz_overrideMethod (c$, "clientPropertyChanged", 
23319 function (key, oldValue, newValue) {
23320 if (key === "hideActionText") {
23321 var current = (Clazz_instanceOf (newValue, Boolean)) ? newValue : false;
23322 if (this.getHideActionText () != current) {
23323 this.setHideActionText (current);
23324 }}}, "~O,~O,~O");
23325 Clazz_defineMethod (c$, "shouldUpdateSelectedStateFromAction", 
23326 function () {
23327 return false;
23328 });
23329 Clazz_defineMethod (c$, "actionPropertyChanged", 
23330 function (action, propertyName) {
23331 if (propertyName === "Name") {
23332 this.setTextFromAction (action, true);
23333 } else if (propertyName === "enabled") {
23334 javax.swing.AbstractAction.setEnabledFromAction (this, action);
23335 } else if (propertyName === "ShortDescription") {
23336 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
23337 } else if (propertyName === "SmallIcon") {
23338 this.smallIconChanged (action);
23339 } else if (propertyName === "MnemonicKey") {
23340 this.setMnemonicFromAction (action);
23341 } else if (propertyName === "ActionCommandKey") {
23342 this.setActionCommandFromAction (action);
23343 } else if (propertyName === "SwingSelectedKey" && javax.swing.AbstractAction.hasSelectedKey (action) && this.shouldUpdateSelectedStateFromAction ()) {
23344 this.setSelectedFromAction (action);
23345 } else if (propertyName === "SwingDisplayedMnemonicIndexKey") {
23346 this.setDisplayedMnemonicIndexFromAction (action, true);
23347 } else if (propertyName === "SwingLargeIconKey") {
23348 this.largeIconChanged (action);
23349 }}, "javax.swing.Action,~S");
23350 Clazz_defineMethod (c$, "setDisplayedMnemonicIndexFromAction", 
23351  function (a, fromPropertyChange) {
23352 var iValue = (a == null) ? null : a.getValue ("SwingDisplayedMnemonicIndexKey");
23353 if (fromPropertyChange || iValue != null) {
23354 var value;
23355 if (iValue == null) {
23356 value = -1;
23357 } else {
23358 value = (iValue).intValue ();
23359 var text = this.getText ();
23360 if (text == null || value >= text.length) {
23361 value = -1;
23362 }}this.setDisplayedMnemonicIndex (value);
23363 }}, "javax.swing.Action,~B");
23364 Clazz_defineMethod (c$, "setMnemonicFromAction", 
23365  function (a) {
23366 var n = (a == null) ? null : a.getValue ("MnemonicKey");
23367 this.setMnemonic ((n == null) ? '\0' : n);
23368 }, "javax.swing.Action");
23369 Clazz_defineMethod (c$, "setTextFromAction", 
23370  function (a, propertyChange) {
23371 var hideText = this.getHideActionText ();
23372 if (!propertyChange) {
23373 this.setText ((a != null && !hideText) ? a.getValue ("Name") : null);
23374 } else if (!hideText) {
23375 this.setText (a.getValue ("Name"));
23376 }}, "javax.swing.Action,~B");
23377 Clazz_defineMethod (c$, "setIconFromAction", 
23378 function (a) {
23379 var icon = null;
23380 if (a != null) {
23381 icon = a.getValue ("SwingLargeIconKey");
23382 if (icon == null) {
23383 icon = a.getValue ("SmallIcon");
23384 }}this.setIcon (icon);
23385 }, "javax.swing.Action");
23386 Clazz_defineMethod (c$, "smallIconChanged", 
23387 function (a) {
23388 if (a.getValue ("SwingLargeIconKey") == null) {
23389 this.setIconFromAction (a);
23390 }}, "javax.swing.Action");
23391 Clazz_defineMethod (c$, "largeIconChanged", 
23392 function (a) {
23393 this.setIconFromAction (a);
23394 }, "javax.swing.Action");
23395 Clazz_defineMethod (c$, "setActionCommandFromAction", 
23396  function (a) {
23397 this.setActionCommand ((a != null) ? a.getValue ("ActionCommandKey") : null);
23398 }, "javax.swing.Action");
23399 Clazz_defineMethod (c$, "setSelectedFromAction", 
23400  function (a) {
23401 var selected = false;
23402 if (a != null) {
23403 selected = javax.swing.AbstractAction.isSelected (a);
23404 }if (selected != this.isSelected ()) {
23405 this.setSelected (selected);
23406 if (!selected && this.isSelected ()) {
23407 if (Clazz_instanceOf (this.getModel (), javax.swing.DefaultButtonModel)) {
23408 var group = (this.getModel ()).getGroup ();
23409 if (group != null) {
23410 group.clearSelection ();
23411 }}}}}, "javax.swing.Action");
23412 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
23413 function (a) {
23414 return this.createActionPropertyChangeListener0 (a);
23415 }, "javax.swing.Action");
23416 Clazz_defineMethod (c$, "createActionPropertyChangeListener0", 
23417 function (a) {
23418 return  new javax.swing.AbstractButton.ButtonActionPropertyChangeListener (this, a);
23419 }, "javax.swing.Action");
23420 Clazz_defineMethod (c$, "isBorderPainted", 
23421 function () {
23422 return this.$paintBorder;
23423 });
23424 Clazz_defineMethod (c$, "setBorderPainted", 
23425 function (b) {
23426 var oldValue = this.$paintBorder;
23427 this.$paintBorder = b;
23428 this.borderPaintedSet = true;
23429 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
23430 if (b != oldValue) {
23431 this.revalidate ();
23432 this.repaint ();
23433 }}, "~B");
23434 Clazz_defineMethod (c$, "paintBorder", 
23435 function (g) {
23436 if (this.isBorderPainted ()) {
23437 Clazz_superCall (this, javax.swing.AbstractButton, "paintBorder", [g]);
23438 }}, "java.awt.Graphics");
23439 Clazz_defineMethod (c$, "isFocusPainted", 
23440 function () {
23441 return this.paintFocus;
23442 });
23443 Clazz_defineMethod (c$, "setFocusPainted", 
23444 function (b) {
23445 var oldValue = this.paintFocus;
23446 this.paintFocus = b;
23447 this.firePropertyChangeBool ("focusPainted", oldValue, this.paintFocus);
23448 if (b != oldValue && this.isFocusOwner ()) {
23449 this.revalidate ();
23450 this.repaint ();
23451 }}, "~B");
23452 Clazz_defineMethod (c$, "isContentAreaFilled", 
23453 function () {
23454 return this.contentAreaFilled;
23455 });
23456 Clazz_defineMethod (c$, "setContentAreaFilled", 
23457 function (b) {
23458 var oldValue = this.contentAreaFilled;
23459 this.contentAreaFilled = b;
23460 this.contentAreaFilledSet = true;
23461 this.firePropertyChangeBool ("contentAreaFilled", oldValue, this.contentAreaFilled);
23462 if (b != oldValue) {
23463 this.repaint ();
23464 }}, "~B");
23465 Clazz_defineMethod (c$, "isRolloverEnabled", 
23466 function () {
23467 return this.rolloverEnabled;
23468 });
23469 Clazz_defineMethod (c$, "setRolloverEnabled", 
23470 function (b) {
23471 var oldValue = this.rolloverEnabled;
23472 this.rolloverEnabled = b;
23473 this.rolloverEnabledSet = true;
23474 this.firePropertyChangeBool ("rolloverEnabled", oldValue, this.rolloverEnabled);
23475 if (b != oldValue) {
23476 this.repaint ();
23477 }}, "~B");
23478 Clazz_defineMethod (c$, "getMnemonic", 
23479 function () {
23480 return this.mnemonic;
23481 });
23482 Clazz_defineMethod (c$, "setMnemonic", 
23483 function (mnemonic) {
23484 this.model.setMnemonic (mnemonic);
23485 this.updateMnemonicProperties ();
23486 }, "~N");
23487 Clazz_defineMethod (c$, "setMnemonic", 
23488 function (mnemonic) {
23489 var vk = (mnemonic).charCodeAt (0);
23490 if (vk >= 97 && vk <= 122) vk -= (32);
23491 this.setMnemonic (vk);
23492 }, "~S");
23493 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
23494 function (index) {
23495 var oldValue = this.mnemonicIndex;
23496 if (index == -1) {
23497 this.mnemonicIndex = -1;
23498 } else {
23499 var text = this.getText ();
23500 var textLength = (text == null) ? 0 : text.length;
23501 if (index < -1 || index >= textLength) {
23502 throw  new IllegalArgumentException ("index == " + index);
23503 }}this.mnemonicIndex = index;
23504 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
23505 if (index != oldValue) {
23506 this.revalidate ();
23507 this.repaint ();
23508 }}, "~N");
23509 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
23510 function () {
23511 return this.mnemonicIndex;
23512 });
23513 Clazz_defineMethod (c$, "updateDisplayedMnemonicIndex", 
23514  function (text, mnemonic) {
23515 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, mnemonic));
23516 }, "~S,~N");
23517 Clazz_defineMethod (c$, "updateMnemonicProperties", 
23518  function () {
23519 var newMnemonic = this.model.getMnemonic ();
23520 if (this.mnemonic != newMnemonic) {
23521 var oldValue = this.mnemonic;
23522 this.mnemonic = newMnemonic;
23523 this.firePropertyChangeInt ("mnemonic", oldValue, this.mnemonic);
23524 this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23525 this.revalidate ();
23526 this.repaint ();
23527 }});
23528 Clazz_defineMethod (c$, "setMultiClickThreshhold", 
23529 function (threshhold) {
23530 if (threshhold < 0) {
23531 throw  new IllegalArgumentException ("threshhold must be >= 0");
23532 }this.multiClickThreshhold = threshhold;
23533 }, "~N");
23534 Clazz_defineMethod (c$, "getMultiClickThreshhold", 
23535 function () {
23536 return this.multiClickThreshhold;
23537 });
23538 Clazz_defineMethod (c$, "getModel", 
23539 function () {
23540 return this.model;
23541 });
23542 Clazz_defineMethod (c$, "setModel", 
23543 function (newModel) {
23544 var oldModel = this.getModel ();
23545 if (oldModel != null) {
23546 oldModel.removeChangeListener (this.changeListener);
23547 oldModel.removeActionListener (this.actionListener);
23548 oldModel.removeItemListener (this.itemListener);
23549 this.changeListener = null;
23550 this.actionListener = null;
23551 this.itemListener = null;
23552 }this.model = newModel;
23553 if (newModel != null) {
23554 this.changeListener = this.createChangeListener ();
23555 this.actionListener = this.createActionListener ();
23556 this.itemListener = this.createItemListener ();
23557 newModel.addChangeListener (this.changeListener);
23558 newModel.addActionListener (this.actionListener);
23559 newModel.addItemListener (this.itemListener);
23560 this.updateMnemonicProperties ();
23561 Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [newModel.isEnabled ()]);
23562 } else {
23563 this.mnemonic = 0;
23564 }this.updateDisplayedMnemonicIndex (this.getText (), this.mnemonic);
23565 this.firePropertyChangeObject ("model", oldModel, newModel);
23566 if (newModel !== oldModel) {
23567 this.revalidate ();
23568 this.repaint ();
23569 }}, "javax.swing.ButtonModel");
23570 Clazz_overrideMethod (c$, "getUI", 
23571 function () {
23572 return this.ui;
23573 });
23574 Clazz_defineMethod (c$, "setUI", 
23575 function (ui) {
23576 Clazz_superCall (this, javax.swing.AbstractButton, "setUI", [ui]);
23577 if (Clazz_instanceOf (this.disabledIcon, javax.swing.plaf.UIResource)) {
23578 this.setDisabledIcon (null);
23579 }if (Clazz_instanceOf (this.disabledSelectedIcon, javax.swing.plaf.UIResource)) {
23580 this.setDisabledSelectedIcon (null);
23581 }}, "javax.swing.plaf.ButtonUI");
23582 Clazz_overrideMethod (c$, "updateUI", 
23583 function () {
23584 });
23585 Clazz_overrideMethod (c$, "addImpl", 
23586 function (comp, constraints, index) {
23587 if (!this.$setLayout) {
23588 this.setLayout ( new javax.swing.OverlayLayout (this));
23589 }return this.addImplSAEM (comp, constraints, index);
23590 }, "java.awt.Component,~O,~N");
23591 Clazz_defineMethod (c$, "setLayout", 
23592 function (mgr) {
23593 this.$setLayout = true;
23594 Clazz_superCall (this, javax.swing.AbstractButton, "setLayout", [mgr]);
23595 }, "java.awt.LayoutManager");
23596 Clazz_defineMethod (c$, "addChangeListener", 
23597 function (l) {
23598 this.listenerList.add (javax.swing.event.ChangeListener, l);
23599 }, "javax.swing.event.ChangeListener");
23600 Clazz_defineMethod (c$, "removeChangeListener", 
23601 function (l) {
23602 this.listenerList.remove (javax.swing.event.ChangeListener, l);
23603 }, "javax.swing.event.ChangeListener");
23604 Clazz_defineMethod (c$, "getChangeListeners", 
23605 function () {
23606 return (this.listenerList.getListeners (javax.swing.event.ChangeListener));
23607 });
23608 Clazz_defineMethod (c$, "fireStateChanged", 
23609 function () {
23610 var listeners = this.listenerList.getListenerList ();
23611 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23612 if (listeners[i] === javax.swing.event.ChangeListener) {
23613 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
23614 (listeners[i + 1]).stateChanged (this.changeEvent);
23615 }}
23616 });
23617 Clazz_defineMethod (c$, "addActionListener", 
23618 function (l) {
23619 this.listenerList.add (java.awt.event.ActionListener, l);
23620 }, "java.awt.event.ActionListener");
23621 Clazz_defineMethod (c$, "removeActionListener", 
23622 function (l) {
23623 if ((l != null) && (this.getAction () === l)) {
23624 this.setAction (null);
23625 } else {
23626 this.listenerList.remove (java.awt.event.ActionListener, l);
23627 }}, "java.awt.event.ActionListener");
23628 Clazz_defineMethod (c$, "getActionListeners", 
23629 function () {
23630 return (this.listenerList.getListeners (java.awt.event.ActionListener));
23631 });
23632 Clazz_defineMethod (c$, "createChangeListener", 
23633 function () {
23634 return this.getHandler ();
23635 });
23636 Clazz_defineMethod (c$, "fireActionPerformed", 
23637 function (event) {
23638 var listeners = this.listenerList.getListenerList ();
23639 var e = null;
23640 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23641 if (listeners[i] === java.awt.event.ActionListener) {
23642 if (e == null) {
23643 var actionCommand = event.getActionCommand ();
23644 if (actionCommand == null) {
23645 actionCommand = this.getActionCommand ();
23646 }e =  new java.awt.event.ActionEvent (this, 1001, actionCommand, event.getWhen (), event.getModifiers ());
23647 }(listeners[i + 1]).actionPerformed (e);
23648 }}
23649 }, "java.awt.event.ActionEvent");
23650 Clazz_defineMethod (c$, "fireItemStateChanged", 
23651 function (event) {
23652 var listeners = this.listenerList.getListenerList ();
23653 var e = null;
23654 for (var i = listeners.length - 2; i >= 0; i -= 2) {
23655 if (listeners[i] === java.awt.event.ItemListener) {
23656 if (e == null) {
23657 e =  new java.awt.event.ItemEvent (this, 701, this, event.getStateChange ());
23658 }(listeners[i + 1]).itemStateChanged (e);
23659 }}
23660 }, "java.awt.event.ItemEvent");
23661 Clazz_defineMethod (c$, "createActionListener", 
23662 function () {
23663 return this.getHandler ();
23664 });
23665 Clazz_defineMethod (c$, "createItemListener", 
23666 function () {
23667 return this.getHandler ();
23668 });
23669 Clazz_defineMethod (c$, "setEnabled", 
23670 function (b) {
23671 if (!b && this.model.isRollover ()) {
23672 this.model.setRollover (false);
23673 }Clazz_superCall (this, javax.swing.AbstractButton, "setEnabled", [b]);
23674 this.model.setEnabled (b);
23675 }, "~B");
23676 Clazz_defineMethod (c$, "getLabel", 
23677 function () {
23678 return this.getText ();
23679 });
23680 Clazz_defineMethod (c$, "setLabel", 
23681 function (label) {
23682 this.setText (label);
23683 }, "~S");
23684 Clazz_overrideMethod (c$, "addItemListener", 
23685 function (l) {
23686 this.listenerList.add (java.awt.event.ItemListener, l);
23687 }, "java.awt.event.ItemListener");
23688 Clazz_overrideMethod (c$, "removeItemListener", 
23689 function (l) {
23690 this.listenerList.remove (java.awt.event.ItemListener, l);
23691 }, "java.awt.event.ItemListener");
23692 Clazz_defineMethod (c$, "getItemListeners", 
23693 function () {
23694 return this.listenerList.getListeners (java.awt.event.ItemListener);
23695 });
23696 Clazz_overrideMethod (c$, "getSelectedObjects", 
23697 function () {
23698 if (this.isSelected () == false) {
23699 return null;
23700 }var selectedObjects =  new Array (1);
23701 selectedObjects[0] = this.getText ();
23702 return selectedObjects;
23703 });
23704 Clazz_defineMethod (c$, "init", 
23705 function (text, icon) {
23706 if (text != null) {
23707 this.setText (text);
23708 }if (icon != null) {
23709 this.setIcon (icon);
23710 }this.updateUI ();
23711 this.setAlignmentX (0.0);
23712 this.setAlignmentY (0.5);
23713 }, "~S,javax.swing.Icon");
23714 Clazz_defineMethod (c$, "imageUpdate", 
23715 function (img, infoflags, x, y, w, h) {
23716 var iconDisplayed = this.getIcon ();
23717 if (iconDisplayed == null) {
23718 return false;
23719 }if (!this.model.isEnabled ()) {
23720 if (this.model.isSelected ()) {
23721 iconDisplayed = this.getDisabledSelectedIcon ();
23722 } else {
23723 iconDisplayed = this.getDisabledIcon ();
23724 }} else if (this.model.isPressed () && this.model.isArmed ()) {
23725 iconDisplayed = this.getPressedIcon ();
23726 } else if (this.isRolloverEnabled () && this.model.isRollover ()) {
23727 if (this.model.isSelected ()) {
23728 iconDisplayed = this.getRolloverSelectedIcon ();
23729 } else {
23730 iconDisplayed = this.getRolloverIcon ();
23731 }} else if (this.model.isSelected ()) {
23732 iconDisplayed = this.getSelectedIcon ();
23733 }if (!javax.swing.SwingUtilities.doesIconReferenceImage (iconDisplayed, img)) {
23734 return false;
23735 }return Clazz_superCall (this, javax.swing.AbstractButton, "imageUpdate", [img, infoflags, x, y, w, h]);
23736 }, "java.awt.Image,~N,~N,~N,~N,~N");
23737 Clazz_defineMethod (c$, "setUIProperty", 
23738 function (propertyName, value) {
23739 if (propertyName === "borderPainted") {
23740 if (!this.borderPaintedSet) {
23741 this.setBorderPainted ((value).booleanValue ());
23742 this.borderPaintedSet = false;
23743 }} else if (propertyName === "rolloverEnabled") {
23744 if (!this.rolloverEnabledSet) {
23745 this.setRolloverEnabled ((value).booleanValue ());
23746 this.rolloverEnabledSet = false;
23747 }} else if (propertyName === "iconTextGap") {
23748 if (!this.iconTextGapSet) {
23749 this.setIconTextGap ((value).intValue ());
23750 this.iconTextGapSet = false;
23751 }} else if (propertyName === "contentAreaFilled") {
23752 if (!this.contentAreaFilledSet) {
23753 this.setContentAreaFilled ((value).booleanValue ());
23754 this.contentAreaFilledSet = false;
23755 }} else {
23756 Clazz_superCall (this, javax.swing.AbstractButton, "setUIProperty", [propertyName, value]);
23757 }}, "~S,~O");
23758 Clazz_defineMethod (c$, "paramString", 
23759 function () {
23760 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
23761 var pressedIconString = ((this.pressedIcon != null) && (this.pressedIcon !== this) ? this.pressedIcon.toString () : "");
23762 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
23763 var selectedIconString = ((this.selectedIcon != null) && (this.selectedIcon !== this) ? this.selectedIcon.toString () : "");
23764 var disabledSelectedIconString = ((this.disabledSelectedIcon != null) && (this.disabledSelectedIcon !== this) ? this.disabledSelectedIcon.toString () : "");
23765 var rolloverIconString = ((this.rolloverIcon != null) && (this.rolloverIcon !== this) ? this.rolloverIcon.toString () : "");
23766 var rolloverSelectedIconString = ((this.rolloverSelectedIcon != null) && (this.rolloverSelectedIcon !== this) ? this.rolloverSelectedIcon.toString () : "");
23767 var paintBorderString = (this.$paintBorder ? "true" : "false");
23768 var paintFocusString = (this.paintFocus ? "true" : "false");
23769 var rolloverEnabledString = (this.rolloverEnabled ? "true" : "false");
23770 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;
23771 });
23772 Clazz_defineMethod (c$, "getHandler", 
23773  function () {
23774 if (this.handler == null) {
23775 this.handler = Clazz_innerTypeInstance (javax.swing.AbstractButton.Handler, this, null);
23776 }return this.handler;
23777 });
23778 c$.$AbstractButton$ButtonChangeListener$ = function () {
23779 Clazz_pu$h(self.c$);
23780 c$ = Clazz_decorateAsClass (function () {
23781 Clazz_prepareCallback (this, arguments);
23782 Clazz_instantialize (this, arguments);
23783 }, javax.swing.AbstractButton, "ButtonChangeListener", null, javax.swing.event.ChangeListener);
23784 Clazz_makeConstructor (c$, 
23785 function () {
23786 });
23787 Clazz_overrideMethod (c$, "stateChanged", 
23788 function (a) {
23789 this.b$["javax.swing.AbstractButton"].getHandler ().stateChanged (a);
23790 }, "javax.swing.event.ChangeEvent");
23791 c$ = Clazz_p0p ();
23792 };
23793 c$.$AbstractButton$Handler$ = function () {
23794 Clazz_pu$h(self.c$);
23795 c$ = Clazz_decorateAsClass (function () {
23796 Clazz_prepareCallback (this, arguments);
23797 Clazz_instantialize (this, arguments);
23798 }, javax.swing.AbstractButton, "Handler", null, [java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.awt.event.ItemListener]);
23799 Clazz_overrideMethod (c$, "stateChanged", 
23800 function (a) {
23801 this.b$["javax.swing.AbstractButton"].updateMnemonicProperties ();
23802 if (this.b$["javax.swing.AbstractButton"].isEnabled () != this.b$["javax.swing.AbstractButton"].model.isEnabled ()) {
23803 this.b$["javax.swing.AbstractButton"].setEnabled (this.b$["javax.swing.AbstractButton"].model.isEnabled ());
23804 }this.b$["javax.swing.AbstractButton"].fireStateChanged ();
23805 this.b$["javax.swing.AbstractButton"].repaint ();
23806 }, "javax.swing.event.ChangeEvent");
23807 Clazz_overrideMethod (c$, "actionPerformed", 
23808 function (a) {
23809 this.b$["javax.swing.AbstractButton"].fireActionPerformed (a);
23810 }, "java.awt.event.ActionEvent");
23811 Clazz_overrideMethod (c$, "itemStateChanged", 
23812 function (a) {
23813 this.b$["javax.swing.AbstractButton"].fireItemStateChanged (a);
23814 if (this.b$["javax.swing.AbstractButton"].shouldUpdateSelectedStateFromAction ()) {
23815 var b = this.b$["javax.swing.AbstractButton"].getAction ();
23816 if (b != null && javax.swing.AbstractAction.hasSelectedKey (b)) {
23817 var c = this.b$["javax.swing.AbstractButton"].isSelected ();
23818 var d = javax.swing.AbstractAction.isSelected (b);
23819 if (d != c) {
23820 b.putValue ("SwingSelectedKey", new Boolean (c));
23821 }}}}, "java.awt.event.ItemEvent");
23822 c$ = Clazz_p0p ();
23823 };
23824 Clazz_pu$h(self.c$);
23825 c$ = Clazz_declareType (javax.swing.AbstractButton, "ButtonActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
23826 Clazz_overrideMethod (c$, "actionPropertyChanged", 
23827 function (a, b, c) {
23828 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
23829 a.configurePropertiesFromAction (b);
23830 } else {
23831 a.actionPropertyChanged (b, c.getPropertyName ());
23832 }}, "javax.swing.AbstractButton,javax.swing.Action,java.beans.PropertyChangeEvent");
23833 c$ = Clazz_p0p ();
23834 Clazz_defineStatics (c$,
23835 "MODEL_CHANGED_PROPERTY", "model",
23836 "TEXT_CHANGED_PROPERTY", "text",
23837 "MNEMONIC_CHANGED_PROPERTY", "mnemonic",
23838 "MARGIN_CHANGED_PROPERTY", "margin",
23839 "VERTICAL_ALIGNMENT_CHANGED_PROPERTY", "verticalAlignment",
23840 "HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY", "horizontalAlignment",
23841 "VERTICAL_TEXT_POSITION_CHANGED_PROPERTY", "verticalTextPosition",
23842 "HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY", "horizontalTextPosition",
23843 "BORDER_PAINTED_CHANGED_PROPERTY", "borderPainted",
23844 "FOCUS_PAINTED_CHANGED_PROPERTY", "focusPainted",
23845 "ROLLOVER_ENABLED_CHANGED_PROPERTY", "rolloverEnabled",
23846 "CONTENT_AREA_FILLED_CHANGED_PROPERTY", "contentAreaFilled",
23847 "ICON_CHANGED_PROPERTY", "icon",
23848 "PRESSED_ICON_CHANGED_PROPERTY", "pressedIcon",
23849 "SELECTED_ICON_CHANGED_PROPERTY", "selectedIcon",
23850 "ROLLOVER_ICON_CHANGED_PROPERTY", "rolloverIcon",
23851 "ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY", "rolloverSelectedIcon",
23852 "DISABLED_ICON_CHANGED_PROPERTY", "disabledIcon",
23853 "DISABLED_SELECTED_ICON_CHANGED_PROPERTY", "disabledSelectedIcon");
23854 });
23855 Clazz_declarePackage ("javax.swing");
23856 Clazz_load (null, "javax.swing.ArrayTable", ["java.util.Hashtable"], function () {
23857 c$ = Clazz_decorateAsClass (function () {
23858 this.table = null;
23859 Clazz_instantialize (this, arguments);
23860 }, javax.swing, "ArrayTable", null, Cloneable);
23861 Clazz_makeConstructor (c$, 
23862 function () {
23863 });
23864 Clazz_defineMethod (c$, "put", 
23865 function (key, value) {
23866 if (this.table == null) {
23867 this.table =  Clazz_newArray (-1, [key, value]);
23868 } else {
23869 var size = this.size ();
23870 if (size < 8) {
23871 if (this.containsKey (key)) {
23872 var tmp = this.table;
23873 for (var i = 0; i < tmp.length - 1; i += 2) {
23874 if (tmp[i].equals (key)) {
23875 tmp[i + 1] = value;
23876 break;
23877 }}
23878 } else {
23879 var array = this.table;
23880 var i = array.length;
23881 var tmp =  new Array (i + 2);
23882 System.arraycopy (array, 0, tmp, 0, i);
23883 tmp[i] = key;
23884 tmp[i + 1] = value;
23885 this.table = tmp;
23886 }} else {
23887 if ((size == 8) && this.isArray ()) {
23888 this.grow ();
23889 }(this.table).put (key, value);
23890 }}}, "~O,~O");
23891 Clazz_defineMethod (c$, "get", 
23892 function (key) {
23893 var value = null;
23894 if (this.table != null) {
23895 if (this.isArray ()) {
23896 var array = this.table;
23897 for (var i = 0; i < array.length - 1; i += 2) {
23898 if (array[i].equals (key)) {
23899 value = array[i + 1];
23900 break;
23901 }}
23902 } else {
23903 value = (this.table).get (key);
23904 }}return value;
23905 }, "~O");
23906 Clazz_defineMethod (c$, "size", 
23907 function () {
23908 var size;
23909 if (this.table == null) return 0;
23910 if (this.isArray ()) {
23911 size = Clazz_doubleToInt ((this.table).length / 2);
23912 } else {
23913 size = (this.table).size ();
23914 }return size;
23915 });
23916 Clazz_defineMethod (c$, "containsKey", 
23917 function (key) {
23918 var contains = false;
23919 if (this.table != null) {
23920 if (this.isArray ()) {
23921 var array = this.table;
23922 for (var i = 0; i < array.length - 1; i += 2) {
23923 if (array[i].equals (key)) {
23924 contains = true;
23925 break;
23926 }}
23927 } else {
23928 contains = (this.table).containsKey (key);
23929 }}return contains;
23930 }, "~O");
23931 Clazz_defineMethod (c$, "remove", 
23932 function (key) {
23933 var value = null;
23934 if (key == null) {
23935 return null;
23936 }if (this.table != null) {
23937 if (this.isArray ()) {
23938 var index = -1;
23939 var array = this.table;
23940 for (var i = array.length - 2; i >= 0; i -= 2) {
23941 if (array[i].equals (key)) {
23942 index = i;
23943 value = array[i + 1];
23944 break;
23945 }}
23946 if (index != -1) {
23947 var tmp =  new Array (array.length - 2);
23948 System.arraycopy (array, 0, tmp, 0, index);
23949 if (index < tmp.length) System.arraycopy (array, index + 2, tmp, index, tmp.length - index);
23950 this.table = (tmp.length == 0) ? null : tmp;
23951 }} else {
23952 value = (this.table).remove (key);
23953 }if (this.size () == 7 && !this.isArray ()) {
23954 this.shrink ();
23955 }}return value;
23956 }, "~O");
23957 Clazz_defineMethod (c$, "clear", 
23958 function () {
23959 this.table = null;
23960 });
23961 Clazz_overrideMethod (c$, "clone", 
23962 function () {
23963 var newArrayTable =  new javax.swing.ArrayTable ();
23964 if (this.isArray ()) {
23965 var array = this.table;
23966 for (var i = 0; i < array.length - 1; i += 2) {
23967 newArrayTable.put (array[i], array[i + 1]);
23968 }
23969 } else {
23970 var tmp = this.table;
23971 var keys = tmp.keys ();
23972 while (keys.hasMoreElements ()) {
23973 var o = keys.nextElement ();
23974 newArrayTable.put (o, tmp.get (o));
23975 }
23976 }return newArrayTable;
23977 });
23978 Clazz_defineMethod (c$, "getKeys", 
23979 function (keys) {
23980 if (this.table == null) {
23981 return null;
23982 }if (this.isArray ()) {
23983 var array = this.table;
23984 if (keys == null) {
23985 keys =  new Array (Clazz_doubleToInt (array.length / 2));
23986 }for (var i = 0, index = 0; i < array.length - 1; i += 2, index++) {
23987 keys[index] = array[i];
23988 }
23989 } else {
23990 var tmp = this.table;
23991 var enum_ = tmp.keys ();
23992 var counter = tmp.size ();
23993 if (keys == null) {
23994 keys =  new Array (counter);
23995 }while (counter > 0) {
23996 keys[--counter] = enum_.nextElement ();
23997 }
23998 }return keys;
23999 }, "~A");
24000 Clazz_defineMethod (c$, "isArray", 
24001  function () {
24002 return (Clazz_instanceOf (this.table, Array));
24003 });
24004 Clazz_defineMethod (c$, "grow", 
24005  function () {
24006 var array = this.table;
24007 var tmp =  new java.util.Hashtable (Clazz_doubleToInt (array.length / 2));
24008 for (var i = 0; i < array.length; i += 2) {
24009 tmp.put (array[i], array[i + 1]);
24010 }
24011 this.table = tmp;
24012 });
24013 Clazz_defineMethod (c$, "shrink", 
24014  function () {
24015 var tmp = this.table;
24016 var array =  new Array (tmp.size () * 2);
24017 var keys = tmp.keys ();
24018 var j = 0;
24019 while (keys.hasMoreElements ()) {
24020 var o = keys.nextElement ();
24021 array[j] = o;
24022 array[j + 1] = tmp.get (o);
24023 j += 2;
24024 }
24025 this.table = array;
24026 });
24027 Clazz_defineStatics (c$,
24028 "ARRAY_BOUNDARY", 8);
24029 });
24030 Clazz_declarePackage ("javax.swing.event");
24031 Clazz_load (["java.beans.PropertyChangeSupport"], "javax.swing.event.SwingPropertyChangeSupport", ["java.lang.NullPointerException", "javax.swing.SwingUtilities"], function () {
24032 c$ = Clazz_decorateAsClass (function () {
24033 this.notifyOnEDT = false;
24034 Clazz_instantialize (this, arguments);
24035 }, javax.swing.event, "SwingPropertyChangeSupport", java.beans.PropertyChangeSupport);
24036 Clazz_makeConstructor (c$, 
24037 function (sourceBean) {
24038 this.construct (sourceBean, false);
24039 }, "~O");
24040 Clazz_makeConstructor (c$, 
24041 function (sourceBean, notifyOnEDT) {
24042 Clazz_superConstructor (this, javax.swing.event.SwingPropertyChangeSupport, [sourceBean]);
24043 this.notifyOnEDT = notifyOnEDT;
24044 }, "~O,~B");
24045 Clazz_defineMethod (c$, "firePropertyChangeEvt", 
24046 function (evt) {
24047 if (evt == null) {
24048 throw  new NullPointerException ();
24049 }if (!this.isNotifyOnEDT () || javax.swing.SwingUtilities.isEventDispatchThread ()) {
24050 Clazz_superCall (this, javax.swing.event.SwingPropertyChangeSupport, "firePropertyChangeEvt", [evt]);
24051 } else {
24052 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))));
24053 }}, "java.beans.PropertyChangeEvent");
24054 Clazz_defineMethod (c$, "isNotifyOnEDT", 
24055 function () {
24056 return this.notifyOnEDT;
24057 });
24058 c$.$SwingPropertyChangeSupport$1$ = function () {
24059 Clazz_pu$h(self.c$);
24060 c$ = Clazz_declareAnonymous (javax.swing.event, "SwingPropertyChangeSupport$1", null, Runnable);
24061 Clazz_overrideMethod (c$, "run", 
24062 function () {
24063 this.b$["javax.swing.event.SwingPropertyChangeSupport"].firePropertyChangeEvt (this.f$.evt);
24064 });
24065 c$ = Clazz_p0p ();
24066 };
24067 });
24068 Clazz_declarePackage ("javax.swing");
24069 Clazz_load (["javax.swing.JComponent"], "javax.swing.JLayeredPane", ["java.util.ArrayList", "$.Hashtable", "java.awt.Color"], function () {
24070 c$ = Clazz_decorateAsClass (function () {
24071 this.componentToLayer = null;
24072 this.optimizedDrawingPossible = true;
24073 Clazz_instantialize (this, arguments);
24074 }, javax.swing, "JLayeredPane", javax.swing.JComponent);
24075 Clazz_makeConstructor (c$, 
24076 function () {
24077 Clazz_superConstructor (this, javax.swing.JLayeredPane, []);
24078 this.setLayout (null);
24079 });
24080 Clazz_defineMethod (c$, "validateOptimizedDrawing", 
24081  function () {
24082 var layeredComponentFound = false;
24083 {
24084 var layer = null;
24085 for (var c, $c = 0, $$c = this.getComponents (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
24086 layer = null;
24087 if ((Clazz_instanceOf (c, javax.swing.JComponent) && (layer = (c).getClientProperty ("layeredContainerLayer")) != null)) {
24088 if (layer != null && layer.equals (javax.swing.JLayeredPane.FRAME_CONTENT_LAYER)) continue;
24089 layeredComponentFound = true;
24090 break;
24091 }}
24092 }if (layeredComponentFound) this.optimizedDrawingPossible = false;
24093  else this.optimizedDrawingPossible = true;
24094 });
24095 Clazz_overrideMethod (c$, "addImpl", 
24096 function (comp, constraints, index) {
24097 var layer = javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24098 var pos;
24099 if (Clazz_instanceOf (constraints, Integer)) {
24100 layer = (constraints).intValue ();
24101 this.setLayer (comp, layer);
24102 } else layer = this.getLayer (comp);
24103 pos = this.insertIndexForLayer (layer, index);
24104 this.addImplSAEM (comp, constraints, pos);
24105 comp.validate ();
24106 comp.repaint ();
24107 this.validateOptimizedDrawing ();
24108 return comp;
24109 }, "java.awt.Component,~O,~N");
24110 Clazz_defineMethod (c$, "remove", 
24111 function (index) {
24112 var c = this.getComponent (index);
24113 Clazz_superCall (this, javax.swing.JLayeredPane, "remove", [index]);
24114 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24115 this.getComponentToLayer ().remove (c);
24116 }this.validateOptimizedDrawing ();
24117 }, "~N");
24118 Clazz_defineMethod (c$, "removeAll", 
24119 function () {
24120 var children = this.getComponents ();
24121 var cToL = this.getComponentToLayer ();
24122 for (var counter = children.length - 1; counter >= 0; counter--) {
24123 var c = children[counter];
24124 if (c != null && !(Clazz_instanceOf (c, javax.swing.JComponent))) {
24125 cToL.remove (c);
24126 }}
24127 Clazz_superCall (this, javax.swing.JLayeredPane, "removeAll", []);
24128 });
24129 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
24130 function () {
24131 return this.optimizedDrawingPossible;
24132 });
24133 c$.putLayer = Clazz_defineMethod (c$, "putLayer", 
24134 function (c, layer) {
24135 var layerObj;
24136 layerObj =  new Integer (layer);
24137 c.putClientProperty ("layeredContainerLayer", layerObj);
24138 }, "javax.swing.JComponent,~N");
24139 c$.getLayer = Clazz_defineMethod (c$, "getLayer", 
24140 function (c) {
24141 var i;
24142 if ((i = c.getClientProperty ("layeredContainerLayer")) != null) return i.intValue ();
24143 return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24144 }, "javax.swing.JComponent");
24145 c$.getLayeredPaneAbove = Clazz_defineMethod (c$, "getLayeredPaneAbove", 
24146 function (c) {
24147 if (c == null) return null;
24148 var parent = c.getParent ();
24149 while (parent != null && !(Clazz_instanceOf (parent, javax.swing.JLayeredPane))) parent = parent.getParent ();
24150
24151 return parent;
24152 }, "java.awt.Component");
24153 Clazz_defineMethod (c$, "setLayer", 
24154 function (c, layer) {
24155 this.setLayer (c, layer, -1);
24156 }, "java.awt.Component,~N");
24157 Clazz_defineMethod (c$, "setLayer", 
24158 function (c, layer, position) {
24159 var layerObj;
24160 layerObj = this.getObjectForLayer (layer);
24161 if (layer == this.getLayer (c) && position == this.getPosition (c)) {
24162 this.repaint (c.getBounds ());
24163 return;
24164 }if (Clazz_instanceOf (c, javax.swing.JComponent)) (c).putClientProperty ("layeredContainerLayer", layerObj);
24165  else this.getComponentToLayer ().put (c, layerObj);
24166 if (c.getParent () == null || c.getParent () !== this) {
24167 this.repaint (c.getBounds ());
24168 return;
24169 }var index = this.insertIndexForLayer (c, layer, position);
24170 this.setComponentZOrder (c, index);
24171 this.repaint (c.getBounds ());
24172 }, "java.awt.Component,~N,~N");
24173 Clazz_defineMethod (c$, "getLayer", 
24174 function (c) {
24175 var i;
24176 if (Clazz_instanceOf (c, javax.swing.JComponent)) i = (c).getClientProperty ("layeredContainerLayer");
24177  else i = this.getComponentToLayer ().get (c);
24178 if (i == null) return javax.swing.JLayeredPane.DEFAULT_LAYER.intValue ();
24179 return i.intValue ();
24180 }, "java.awt.Component");
24181 Clazz_defineMethod (c$, "getIndexOf", 
24182 function (c) {
24183 var i;
24184 var count;
24185 count = this.getComponentCount ();
24186 for (i = 0; i < count; i++) {
24187 if (c === this.getComponent (i)) return i;
24188 }
24189 return -1;
24190 }, "java.awt.Component");
24191 Clazz_defineMethod (c$, "moveToFront", 
24192 function (c) {
24193 this.setPosition (c, 0);
24194 }, "java.awt.Component");
24195 Clazz_defineMethod (c$, "moveToBack", 
24196 function (c) {
24197 this.setPosition (c, -1);
24198 }, "java.awt.Component");
24199 Clazz_defineMethod (c$, "setPosition", 
24200 function (c, position) {
24201 this.setLayer (c, this.getLayer (c), position);
24202 }, "java.awt.Component,~N");
24203 Clazz_defineMethod (c$, "getPosition", 
24204 function (c) {
24205 var i;
24206 var count;
24207 var startLayer;
24208 var curLayer;
24209 var startLocation;
24210 var pos = 0;
24211 count = this.getComponentCount ();
24212 startLocation = this.getIndexOf (c);
24213 if (startLocation == -1) return -1;
24214 startLayer = this.getLayer (c);
24215 for (i = startLocation - 1; i >= 0; i--) {
24216 curLayer = this.getLayer (this.getComponent (i));
24217 if (curLayer == startLayer) pos++;
24218  else return pos;
24219 }
24220 return pos;
24221 }, "java.awt.Component");
24222 Clazz_defineMethod (c$, "highestLayer", 
24223 function () {
24224 if (this.getComponentCount () > 0) return this.getLayer (this.getComponent (0));
24225 return 0;
24226 });
24227 Clazz_defineMethod (c$, "lowestLayer", 
24228 function () {
24229 var count = this.getComponentCount ();
24230 if (count > 0) return this.getLayer (this.getComponent (count - 1));
24231 return 0;
24232 });
24233 Clazz_defineMethod (c$, "getComponentCountInLayer", 
24234 function (layer) {
24235 var i;
24236 var count;
24237 var curLayer;
24238 var layerCount = 0;
24239 count = this.getComponentCount ();
24240 for (i = 0; i < count; i++) {
24241 curLayer = this.getLayer (this.getComponent (i));
24242 if (curLayer == layer) {
24243 layerCount++;
24244 } else if (layerCount > 0 || curLayer < layer) {
24245 break;
24246 }}
24247 return layerCount;
24248 }, "~N");
24249 Clazz_defineMethod (c$, "getComponentsInLayer", 
24250 function (layer) {
24251 var i;
24252 var count;
24253 var curLayer;
24254 var layerCount = 0;
24255 var results;
24256 results =  new Array (this.getComponentCountInLayer (layer));
24257 count = this.getComponentCount ();
24258 for (i = 0; i < count; i++) {
24259 curLayer = this.getLayer (this.getComponent (i));
24260 if (curLayer == layer) {
24261 results[layerCount++] = this.getComponent (i);
24262 } else if (layerCount > 0 || curLayer < layer) {
24263 break;
24264 }}
24265 return results;
24266 }, "~N");
24267 Clazz_defineMethod (c$, "paint", 
24268 function (g) {
24269 if (this.isOpaque ()) {
24270 var r = g.getClipBounds ();
24271 var c = this.getBackground ();
24272 if (c == null) c = java.awt.Color.lightGray;
24273 g.setColor (c);
24274 if (r != null) {
24275 g.fillRect (r.x, r.y, r.width, r.height);
24276 } else {
24277 g.fillRect (0, 0, this.getWidth (), this.getHeight ());
24278 }}Clazz_superCall (this, javax.swing.JLayeredPane, "paint", [g]);
24279 }, "java.awt.Graphics");
24280 Clazz_defineMethod (c$, "getComponentToLayer", 
24281 function () {
24282 if (this.componentToLayer == null) this.componentToLayer =  new java.util.Hashtable (4);
24283 return this.componentToLayer;
24284 });
24285 Clazz_defineMethod (c$, "getObjectForLayer", 
24286 function (layer) {
24287 var layerObj;
24288 switch (layer) {
24289 case 0:
24290 layerObj = javax.swing.JLayeredPane.DEFAULT_LAYER;
24291 break;
24292 case 100:
24293 layerObj = javax.swing.JLayeredPane.PALETTE_LAYER;
24294 break;
24295 case 200:
24296 layerObj = javax.swing.JLayeredPane.MODAL_LAYER;
24297 break;
24298 case 300:
24299 layerObj = javax.swing.JLayeredPane.POPUP_LAYER;
24300 break;
24301 case 400:
24302 layerObj = javax.swing.JLayeredPane.DRAG_LAYER;
24303 break;
24304 default:
24305 layerObj =  new Integer (layer);
24306 }
24307 return layerObj;
24308 }, "~N");
24309 Clazz_defineMethod (c$, "insertIndexForLayer", 
24310 function (layer, position) {
24311 return this.insertIndexForLayer (null, layer, position);
24312 }, "~N,~N");
24313 Clazz_defineMethod (c$, "insertIndexForLayer", 
24314  function (comp, layer, position) {
24315 var i;
24316 var count;
24317 var curLayer;
24318 var layerStart = -1;
24319 var layerEnd = -1;
24320 var componentCount = this.getComponentCount ();
24321 var compList =  new java.util.ArrayList (componentCount);
24322 for (var index = 0; index < componentCount; index++) {
24323 if (this.getComponent (index) !== comp) {
24324 compList.add (this.getComponent (index));
24325 }}
24326 count = compList.size ();
24327 for (i = 0; i < count; i++) {
24328 curLayer = this.getLayer (compList.get (i));
24329 if (layerStart == -1 && curLayer == layer) {
24330 layerStart = i;
24331 }if (curLayer < layer) {
24332 if (i == 0) {
24333 layerStart = 0;
24334 layerEnd = 0;
24335 } else {
24336 layerEnd = i;
24337 }break;
24338 }}
24339 if (layerStart == -1 && layerEnd == -1) return count;
24340 if (layerStart != -1 && layerEnd == -1) layerEnd = count;
24341 if (layerEnd != -1 && layerStart == -1) layerStart = layerEnd;
24342 if (position == -1) return layerEnd;
24343 if (position > -1 && layerStart + position <= layerEnd) return layerStart + position;
24344 return layerEnd;
24345 }, "java.awt.Component,~N,~N");
24346 Clazz_defineMethod (c$, "paramString", 
24347 function () {
24348 var optimizedDrawingPossibleString = (this.optimizedDrawingPossible ? "true" : "false");
24349 return Clazz_superCall (this, javax.swing.JLayeredPane, "paramString", []) + ",optimizedDrawingPossible=" + optimizedDrawingPossibleString;
24350 });
24351 c$.DEFAULT_LAYER = c$.prototype.DEFAULT_LAYER =  new Integer (0);
24352 c$.PALETTE_LAYER = c$.prototype.PALETTE_LAYER =  new Integer (100);
24353 c$.MODAL_LAYER = c$.prototype.MODAL_LAYER =  new Integer (200);
24354 c$.POPUP_LAYER = c$.prototype.POPUP_LAYER =  new Integer (300);
24355 c$.DRAG_LAYER = c$.prototype.DRAG_LAYER =  new Integer (400);
24356 c$.FRAME_CONTENT_LAYER = c$.prototype.FRAME_CONTENT_LAYER =  new Integer (-30000);
24357 Clazz_defineStatics (c$,
24358 "LAYER_PROPERTY", "layeredContainerLayer");
24359 });
24360 Clazz_declarePackage ("javax.swing");
24361 Clazz_load (["javax.swing.JComponent"], "javax.swing.JPanel", ["java.lang.Boolean", "java.awt.FlowLayout", "javax.swing.UIManager"], function () {
24362 c$ = Clazz_declareType (javax.swing, "JPanel", javax.swing.JComponent);
24363 Clazz_makeConstructor (c$, 
24364 function (layout, isDoubleBuffered) {
24365 Clazz_superConstructor (this, javax.swing.JPanel, []);
24366 this.setLayout (layout);
24367 this.setUIProperty ("opaque", Boolean.TRUE);
24368 this.updateUI ();
24369 }, "java.awt.LayoutManager,~B");
24370 Clazz_makeConstructor (c$, 
24371 function (layout) {
24372 this.construct (layout, true);
24373 }, "java.awt.LayoutManager");
24374 Clazz_makeConstructor (c$, 
24375 function (isDoubleBuffered) {
24376 this.construct ( new java.awt.FlowLayout (), isDoubleBuffered);
24377 }, "~B");
24378 Clazz_makeConstructor (c$, 
24379 function () {
24380 this.construct (true);
24381 });
24382 Clazz_overrideMethod (c$, "updateUI", 
24383 function () {
24384 this.setUI (javax.swing.UIManager.getUI (this));
24385 });
24386 Clazz_overrideMethod (c$, "getUI", 
24387 function () {
24388 return this.ui;
24389 });
24390 Clazz_overrideMethod (c$, "getUIClassID", 
24391 function () {
24392 return "PanelUI";
24393 });
24394 Clazz_defineStatics (c$,
24395 "$uiClassID", "PanelUI");
24396 });
24397 Clazz_declarePackage ("javax.swing");
24398 Clazz_load (["java.lang.Enum", "java.util.Enumeration", "javax.swing.UIDefaults"], "javax.swing.MultiUIDefaults", ["java.lang.StringBuffer", "java.util.HashSet"], function () {
24399 c$ = Clazz_decorateAsClass (function () {
24400 this.tables = null;
24401 Clazz_instantialize (this, arguments);
24402 }, javax.swing, "MultiUIDefaults", javax.swing.UIDefaults);
24403 Clazz_makeConstructor (c$, 
24404 function (defaults) {
24405 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24406 this.tables = defaults;
24407 }, "~A");
24408 Clazz_makeConstructor (c$, 
24409 function () {
24410 Clazz_superConstructor (this, javax.swing.MultiUIDefaults);
24411 this.tables =  new Array (0);
24412 });
24413 Clazz_defineMethod (c$, "get", 
24414 function (key) {
24415 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key]);
24416 if (value != null) {
24417 return value;
24418 }for (var i = 0; i < this.tables.length; i++) {
24419 var table = this.tables[i];
24420 value = (table != null) ? table.get (key) : null;
24421 if (value != null) {
24422 return value;
24423 }}
24424 return null;
24425 }, "~O");
24426 Clazz_defineMethod (c$, "get", 
24427 function (key, l) {
24428 var value = Clazz_superCall (this, javax.swing.MultiUIDefaults, "get", [key, l]);
24429 if (value != null) {
24430 return value;
24431 }for (var i = 0; i < this.tables.length; i++) {
24432 var table = this.tables[i];
24433 value = (table != null) ? table.get (key, l) : null;
24434 if (value != null) {
24435 return value;
24436 }}
24437 return null;
24438 }, "~O,java.util.Locale");
24439 Clazz_overrideMethod (c$, "size", 
24440 function () {
24441 return this.entrySet ().size ();
24442 });
24443 Clazz_overrideMethod (c$, "isEmpty", 
24444 function () {
24445 return this.size () == 0;
24446 });
24447 Clazz_overrideMethod (c$, "keys", 
24448 function () {
24449 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS, this.entrySet ());
24450 });
24451 Clazz_overrideMethod (c$, "elements", 
24452 function () {
24453 return  new javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS, this.entrySet ());
24454 });
24455 Clazz_defineMethod (c$, "entrySet", 
24456 function () {
24457 var set =  new java.util.HashSet ();
24458 for (var i = this.tables.length - 1; i >= 0; i--) {
24459 if (this.tables[i] != null) {
24460 set.addAll (this.tables[i].entrySet ());
24461 }}
24462 set.addAll (Clazz_superCall (this, javax.swing.MultiUIDefaults, "entrySet", []));
24463 return set;
24464 });
24465 Clazz_defineMethod (c$, "getUIError", 
24466 function (msg) {
24467 if (this.tables.length > 0) {
24468 this.tables[0].getUIError (msg);
24469 } else {
24470 Clazz_superCall (this, javax.swing.MultiUIDefaults, "getUIError", [msg]);
24471 }}, "~S");
24472 Clazz_defineMethod (c$, "remove", 
24473 function (key) {
24474 var value = null;
24475 for (var i = this.tables.length - 1; i >= 0; i--) {
24476 if (this.tables[i] != null) {
24477 var v = this.tables[i].remove (key);
24478 if (v != null) {
24479 value = v;
24480 }}}
24481 var v = Clazz_superCall (this, javax.swing.MultiUIDefaults, "remove", [key]);
24482 if (v != null) {
24483 value = v;
24484 }return value;
24485 }, "~O");
24486 Clazz_defineMethod (c$, "clear", 
24487 function () {
24488 Clazz_superCall (this, javax.swing.MultiUIDefaults, "clear", []);
24489 for (var i = 0; i < this.tables.length; i++) {
24490 var table = this.tables[i];
24491 if (table != null) {
24492 table.clear ();
24493 }}
24494 });
24495 Clazz_overrideMethod (c$, "toString", 
24496 function () {
24497 var buf =  new StringBuffer ();
24498 buf.append ("{");
24499 var keys = this.keys ();
24500 while (keys.hasMoreElements ()) {
24501 var key = keys.nextElement ();
24502 buf.append (key + "=" + this.get (key) + ", ");
24503 }
24504 var length = buf.length ();
24505 if (length > 1) {
24506 buf.$delete (length - 2, length);
24507 }buf.append ("}");
24508 return buf.toString ();
24509 });
24510 Clazz_pu$h(self.c$);
24511 c$ = Clazz_decorateAsClass (function () {
24512 this.iterator = null;
24513 this.type = null;
24514 Clazz_instantialize (this, arguments);
24515 }, javax.swing.MultiUIDefaults, "MultiUIDefaultsEnumerator", null, java.util.Enumeration);
24516 Clazz_makeConstructor (c$, 
24517 function (a, b) {
24518 this.type = a;
24519 this.iterator = b.iterator ();
24520 }, "javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type,java.util.Set");
24521 Clazz_overrideMethod (c$, "hasMoreElements", 
24522 function () {
24523 return this.iterator.hasNext ();
24524 });
24525 Clazz_overrideMethod (c$, "nextElement", 
24526 function () {
24527 switch (this.type) {
24528 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.KEYS:
24529 return this.iterator.next ().getKey ();
24530 case javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator.Type.ELEMENTS:
24531 return this.iterator.next ().getValue ();
24532 default:
24533 return null;
24534 }
24535 });
24536 Clazz_pu$h(self.c$);
24537 c$ = Clazz_declareType (javax.swing.MultiUIDefaults.MultiUIDefaultsEnumerator, "Type", Enum);
24538 Clazz_defineEnumConstant (c$, "KEYS", 0, []);
24539 Clazz_defineEnumConstant (c$, "ELEMENTS", 1, []);
24540 c$ = Clazz_p0p ();
24541 c$ = Clazz_p0p ();
24542 });
24543 Clazz_declarePackage ("java.awt");
24544 Clazz_load (null, "java.awt.Font", ["java.awt.font.TextAttribute", "java.awt.geom.AffineTransform", "swingjs.JSToolkit"], function () {
24545 c$ = Clazz_decorateAsClass (function () {
24546 this.family = null;
24547 this.name = null;
24548 this.style = 0;
24549 this.size = 0;
24550 this.pointSize = 0;
24551 this.$hasLayoutAttributes = false;
24552 this.nonIdentityTx = false;
24553 this.hash = 0;
24554 Clazz_instantialize (this, arguments);
24555 }, java.awt, "Font");
24556 Clazz_makeConstructor (c$, 
24557 function (name, style, size) {
24558 this.name = (name != null) ? name : "Default";
24559 this.style = (style & -4) == 0 ? style : 0;
24560 this.size = size;
24561 this.pointSize = size;
24562 }, "~S,~N,~N");
24563 Clazz_makeConstructor (c$, 
24564  function (name, style, sizePts) {
24565 this.name = (name != null) ? name : "Default";
24566 this.style = (style & -4) == 0 ? style : 0;
24567 this.size = Clazz_doubleToInt (sizePts + 0.5);
24568 this.pointSize = sizePts;
24569 }, "~S,~N,~N");
24570 Clazz_makeConstructor (c$, 
24571 function (font) {
24572 this.name = font.name;
24573 this.style = font.style;
24574 this.size = font.size;
24575 this.pointSize = font.pointSize;
24576 }, "java.awt.Font");
24577 Clazz_defineMethod (c$, "getTransform", 
24578 function () {
24579 return  new java.awt.geom.AffineTransform ();
24580 });
24581 Clazz_defineMethod (c$, "getFamily", 
24582 function () {
24583 return (this.family == null ? this.family = swingjs.JSToolkit.getFontFamily (this) : this.family);
24584 });
24585 Clazz_defineMethod (c$, "getName", 
24586 function () {
24587 return this.name;
24588 });
24589 Clazz_defineMethod (c$, "getFontName", 
24590 function () {
24591 return this.name;
24592 });
24593 Clazz_defineMethod (c$, "getStyle", 
24594 function () {
24595 return this.style;
24596 });
24597 Clazz_defineMethod (c$, "getSize", 
24598 function () {
24599 return this.size;
24600 });
24601 Clazz_defineMethod (c$, "getSize2D", 
24602 function () {
24603 return this.pointSize;
24604 });
24605 Clazz_defineMethod (c$, "isPlain", 
24606 function () {
24607 return this.style == 0;
24608 });
24609 Clazz_defineMethod (c$, "isBold", 
24610 function () {
24611 return (this.style & 1) != 0;
24612 });
24613 Clazz_defineMethod (c$, "isItalic", 
24614 function () {
24615 return (this.style & 2) != 0;
24616 });
24617 Clazz_defineMethod (c$, "isTransformed", 
24618 function () {
24619 return this.nonIdentityTx;
24620 });
24621 Clazz_defineMethod (c$, "hasLayoutAttributes", 
24622 function () {
24623 return this.$hasLayoutAttributes;
24624 });
24625 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24626 function (nm) {
24627 return java.awt.Font.getFont (nm, null);
24628 }, "~S");
24629 c$.decode = Clazz_defineMethod (c$, "decode", 
24630 function (str) {
24631 var fontName = str;
24632 var styleName = "";
24633 var fontSize = 12;
24634 var fontStyle = 0;
24635 if (str == null) {
24636 return  new java.awt.Font ("Dialog", fontStyle, fontSize);
24637 }var lastHyphen = str.lastIndexOf ('-');
24638 var lastSpace = str.lastIndexOf (' ');
24639 var sepChar = (lastHyphen > lastSpace) ? '-' : ' ';
24640 var sizeIndex = str.lastIndexOf (sepChar);
24641 var styleIndex = str.lastIndexOf (sepChar, sizeIndex - 1);
24642 var strlen = str.length;
24643 if (sizeIndex > 0 && sizeIndex + 1 < strlen) {
24644 try {
24645 fontSize = Integer.$valueOf (str.substring (sizeIndex + 1)).intValue ();
24646 if (fontSize <= 0) {
24647 fontSize = 12;
24648 }} catch (e) {
24649 if (Clazz_exceptionOf (e, NumberFormatException)) {
24650 styleIndex = sizeIndex;
24651 sizeIndex = strlen;
24652 if (str.charAt (sizeIndex - 1) == sepChar) {
24653 sizeIndex--;
24654 }} else {
24655 throw e;
24656 }
24657 }
24658 }if (styleIndex >= 0 && styleIndex + 1 < strlen) {
24659 styleName = str.substring (styleIndex + 1, sizeIndex);
24660 styleName = styleName.toLowerCase ();
24661 if (styleName.equals ("bolditalic")) {
24662 fontStyle = 3;
24663 } else if (styleName.equals ("italic")) {
24664 fontStyle = 2;
24665 } else if (styleName.equals ("bold")) {
24666 fontStyle = 1;
24667 } else if (styleName.equals ("plain")) {
24668 fontStyle = 0;
24669 } else {
24670 styleIndex = sizeIndex;
24671 if (str.charAt (styleIndex - 1) == sepChar) {
24672 styleIndex--;
24673 }}fontName = str.substring (0, styleIndex);
24674 } else {
24675 var fontEnd = strlen;
24676 if (styleIndex > 0) {
24677 fontEnd = styleIndex;
24678 } else if (sizeIndex > 0) {
24679 fontEnd = sizeIndex;
24680 }if (fontEnd > 0 && str.charAt (fontEnd - 1) == sepChar) {
24681 fontEnd--;
24682 }fontName = str.substring (0, fontEnd);
24683 }return  new java.awt.Font (fontName, fontStyle, fontSize);
24684 }, "~S");
24685 c$.getFont = Clazz_defineMethod (c$, "getFont", 
24686 function (nm, font) {
24687 var str = null;
24688 try {
24689 str = System.getProperty (nm);
24690 } catch (e) {
24691 if (Clazz_exceptionOf (e, SecurityException)) {
24692 } else {
24693 throw e;
24694 }
24695 }
24696 if (str == null) {
24697 return font;
24698 }return java.awt.Font.decode (str);
24699 }, "~S,java.awt.Font");
24700 Clazz_overrideMethod (c$, "hashCode", 
24701 function () {
24702 if (this.hash == 0) {
24703 this.hash = this.name.hashCode () ^ this.style ^ this.size;
24704 }return this.hash;
24705 });
24706 Clazz_overrideMethod (c$, "equals", 
24707 function (obj) {
24708 if (obj === this) {
24709 return true;
24710 }if (obj != null) {
24711 try {
24712 var font = obj;
24713 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)) {
24714 return true;
24715 }} catch (e) {
24716 if (Clazz_exceptionOf (e, ClassCastException)) {
24717 } else {
24718 throw e;
24719 }
24720 }
24721 }return false;
24722 }, "~O");
24723 Clazz_overrideMethod (c$, "toString", 
24724 function () {
24725 var strStyle;
24726 if (this.isBold ()) {
24727 strStyle = this.isItalic () ? "bolditalic" : "bold";
24728 } else {
24729 strStyle = this.isItalic () ? "italic" : "plain";
24730 }return this.getClass ().getName () + "[family=" + this.getFamily () + ",name=" + this.name + ",style=" + strStyle + ",size=" + this.size + "]";
24731 });
24732 Clazz_defineMethod (c$, "getAvailableAttributes", 
24733 function () {
24734 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]);
24735 return attributes;
24736 });
24737 Clazz_defineMethod (c$, "deriveFont", 
24738 function (style, size) {
24739 return  new java.awt.Font (this.name, style, size);
24740 }, "~N,~N");
24741 Clazz_defineMethod (c$, "deriveFont", 
24742 function (size) {
24743 return  new java.awt.Font (this.name, this.style, size);
24744 }, "~N");
24745 Clazz_defineMethod (c$, "deriveFont", 
24746 function (style) {
24747 return  new java.awt.Font (this.name, style, this.size);
24748 }, "~N");
24749 Clazz_defineMethod (c$, "hasUniformLineMetrics", 
24750 function () {
24751 return false;
24752 });
24753 Clazz_overrideMethod (c$, "finalize", 
24754 function () {
24755 });
24756 Clazz_defineStatics (c$,
24757 "DIALOG", "Dialog",
24758 "DIALOG_INPUT", "DialogInput",
24759 "SANS_SERIF", "SansSerif",
24760 "SERIF", "Serif",
24761 "MONOSPACED", "Monospaced",
24762 "PLAIN", 0,
24763 "BOLD", 1,
24764 "ITALIC", 2,
24765 "ROMAN_BASELINE", 0,
24766 "CENTER_BASELINE", 1,
24767 "HANGING_BASELINE", 2,
24768 "TRUETYPE_FONT", 0,
24769 "TYPE1_FONT", 1,
24770 "LAYOUT_LEFT_TO_RIGHT", 0,
24771 "LAYOUT_RIGHT_TO_LEFT", 1,
24772 "LAYOUT_NO_START_CONTEXT", 2,
24773 "LAYOUT_NO_LIMIT_CONTEXT", 4);
24774 });
24775 Clazz_declarePackage ("java.awt.font");
24776 Clazz_load (["java.text.AttributedCharacterIterator", "java.lang.Boolean", "$.Float", "java.util.HashMap"], "java.awt.font.TextAttribute", ["java.io.InvalidObjectException"], function () {
24777 c$ = Clazz_declareType (java.awt.font, "TextAttribute", java.text.AttributedCharacterIterator.Attribute);
24778 Clazz_makeConstructor (c$, 
24779 function (name) {
24780 Clazz_superConstructor (this, java.awt.font.TextAttribute, [name]);
24781 if (this.getClass () === java.awt.font.TextAttribute) {
24782 java.awt.font.TextAttribute.$instanceMap.put (name, this);
24783 }}, "~S");
24784 Clazz_overrideMethod (c$, "readResolve", 
24785 function () {
24786 if (this.getClass () !== java.awt.font.TextAttribute) {
24787 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24788 }var instance = java.awt.font.TextAttribute.$instanceMap.get (this.getName ());
24789 if (instance != null) {
24790 return instance;
24791 } else {
24792 throw  new java.io.InvalidObjectException ("unknown attribute name");
24793 }});
24794 c$.$instanceMap = c$.prototype.$instanceMap =  new java.util.HashMap (29);
24795 c$.FAMILY = c$.prototype.FAMILY =  new java.awt.font.TextAttribute ("family");
24796 c$.WEIGHT = c$.prototype.WEIGHT =  new java.awt.font.TextAttribute ("weight");
24797 c$.WEIGHT_EXTRA_LIGHT = c$.prototype.WEIGHT_EXTRA_LIGHT = Float.$valueOf (0.5);
24798 c$.WEIGHT_LIGHT = c$.prototype.WEIGHT_LIGHT = Float.$valueOf (0.75);
24799 c$.WEIGHT_DEMILIGHT = c$.prototype.WEIGHT_DEMILIGHT = Float.$valueOf (0.875);
24800 c$.WEIGHT_REGULAR = c$.prototype.WEIGHT_REGULAR = Float.$valueOf (1.0);
24801 c$.WEIGHT_SEMIBOLD = c$.prototype.WEIGHT_SEMIBOLD = Float.$valueOf (1.25);
24802 c$.WEIGHT_MEDIUM = c$.prototype.WEIGHT_MEDIUM = Float.$valueOf (1.5);
24803 c$.WEIGHT_DEMIBOLD = c$.prototype.WEIGHT_DEMIBOLD = Float.$valueOf (1.75);
24804 c$.WEIGHT_BOLD = c$.prototype.WEIGHT_BOLD = Float.$valueOf (2.0);
24805 c$.WEIGHT_HEAVY = c$.prototype.WEIGHT_HEAVY = Float.$valueOf (2.25);
24806 c$.WEIGHT_EXTRABOLD = c$.prototype.WEIGHT_EXTRABOLD = Float.$valueOf (2.5);
24807 c$.WEIGHT_ULTRABOLD = c$.prototype.WEIGHT_ULTRABOLD = Float.$valueOf (2.75);
24808 c$.WIDTH = c$.prototype.WIDTH =  new java.awt.font.TextAttribute ("width");
24809 c$.WIDTH_CONDENSED = c$.prototype.WIDTH_CONDENSED = Float.$valueOf (0.75);
24810 c$.WIDTH_SEMI_CONDENSED = c$.prototype.WIDTH_SEMI_CONDENSED = Float.$valueOf (0.875);
24811 c$.WIDTH_REGULAR = c$.prototype.WIDTH_REGULAR = Float.$valueOf (1.0);
24812 c$.WIDTH_SEMI_EXTENDED = c$.prototype.WIDTH_SEMI_EXTENDED = Float.$valueOf (1.25);
24813 c$.WIDTH_EXTENDED = c$.prototype.WIDTH_EXTENDED = Float.$valueOf (1.5);
24814 c$.POSTURE = c$.prototype.POSTURE =  new java.awt.font.TextAttribute ("posture");
24815 c$.POSTURE_REGULAR = c$.prototype.POSTURE_REGULAR = Float.$valueOf (0.0);
24816 c$.POSTURE_OBLIQUE = c$.prototype.POSTURE_OBLIQUE = Float.$valueOf (0.20);
24817 c$.SIZE = c$.prototype.SIZE =  new java.awt.font.TextAttribute ("size");
24818 c$.TRANSFORM = c$.prototype.TRANSFORM =  new java.awt.font.TextAttribute ("transform");
24819 c$.SUPERSCRIPT = c$.prototype.SUPERSCRIPT =  new java.awt.font.TextAttribute ("superscript");
24820 c$.SUPERSCRIPT_SUPER = c$.prototype.SUPERSCRIPT_SUPER = Integer.$valueOf (1);
24821 c$.SUPERSCRIPT_SUB = c$.prototype.SUPERSCRIPT_SUB = Integer.$valueOf (-1);
24822 c$.FONT = c$.prototype.FONT =  new java.awt.font.TextAttribute ("font");
24823 c$.CHAR_REPLACEMENT = c$.prototype.CHAR_REPLACEMENT =  new java.awt.font.TextAttribute ("char_replacement");
24824 c$.FOREGROUND = c$.prototype.FOREGROUND =  new java.awt.font.TextAttribute ("foreground");
24825 c$.BACKGROUND = c$.prototype.BACKGROUND =  new java.awt.font.TextAttribute ("background");
24826 c$.UNDERLINE = c$.prototype.UNDERLINE =  new java.awt.font.TextAttribute ("underline");
24827 c$.UNDERLINE_ON = c$.prototype.UNDERLINE_ON = Integer.$valueOf (0);
24828 c$.STRIKETHROUGH = c$.prototype.STRIKETHROUGH =  new java.awt.font.TextAttribute ("strikethrough");
24829 c$.STRIKETHROUGH_ON = c$.prototype.STRIKETHROUGH_ON = Boolean.TRUE;
24830 c$.RUN_DIRECTION = c$.prototype.RUN_DIRECTION =  new java.awt.font.TextAttribute ("run_direction");
24831 c$.RUN_DIRECTION_LTR = c$.prototype.RUN_DIRECTION_LTR = Boolean.FALSE;
24832 c$.RUN_DIRECTION_RTL = c$.prototype.RUN_DIRECTION_RTL = Boolean.TRUE;
24833 c$.BIDI_EMBEDDING = c$.prototype.BIDI_EMBEDDING =  new java.awt.font.TextAttribute ("bidi_embedding");
24834 c$.JUSTIFICATION = c$.prototype.JUSTIFICATION =  new java.awt.font.TextAttribute ("justification");
24835 c$.JUSTIFICATION_FULL = c$.prototype.JUSTIFICATION_FULL = Float.$valueOf (1.0);
24836 c$.JUSTIFICATION_NONE = c$.prototype.JUSTIFICATION_NONE = Float.$valueOf (0.0);
24837 c$.INPUT_METHOD_HIGHLIGHT = c$.prototype.INPUT_METHOD_HIGHLIGHT =  new java.awt.font.TextAttribute ("input method highlight");
24838 c$.INPUT_METHOD_UNDERLINE = c$.prototype.INPUT_METHOD_UNDERLINE =  new java.awt.font.TextAttribute ("input method underline");
24839 c$.UNDERLINE_LOW_ONE_PIXEL = c$.prototype.UNDERLINE_LOW_ONE_PIXEL = Integer.$valueOf (1);
24840 c$.UNDERLINE_LOW_TWO_PIXEL = c$.prototype.UNDERLINE_LOW_TWO_PIXEL = Integer.$valueOf (2);
24841 c$.UNDERLINE_LOW_DOTTED = c$.prototype.UNDERLINE_LOW_DOTTED = Integer.$valueOf (3);
24842 c$.UNDERLINE_LOW_GRAY = c$.prototype.UNDERLINE_LOW_GRAY = Integer.$valueOf (4);
24843 c$.UNDERLINE_LOW_DASHED = c$.prototype.UNDERLINE_LOW_DASHED = Integer.$valueOf (5);
24844 c$.SWAP_COLORS = c$.prototype.SWAP_COLORS =  new java.awt.font.TextAttribute ("swap_colors");
24845 c$.SWAP_COLORS_ON = c$.prototype.SWAP_COLORS_ON = Boolean.TRUE;
24846 c$.NUMERIC_SHAPING = c$.prototype.NUMERIC_SHAPING =  new java.awt.font.TextAttribute ("numeric_shaping");
24847 c$.KERNING = c$.prototype.KERNING =  new java.awt.font.TextAttribute ("kerning");
24848 c$.KERNING_ON = c$.prototype.KERNING_ON = Integer.$valueOf (1);
24849 c$.LIGATURES = c$.prototype.LIGATURES =  new java.awt.font.TextAttribute ("ligatures");
24850 c$.LIGATURES_ON = c$.prototype.LIGATURES_ON = Integer.$valueOf (1);
24851 c$.TRACKING = c$.prototype.TRACKING =  new java.awt.font.TextAttribute ("tracking");
24852 c$.TRACKING_TIGHT = c$.prototype.TRACKING_TIGHT = Float.$valueOf (-0.04);
24853 c$.TRACKING_LOOSE = c$.prototype.TRACKING_LOOSE = Float.$valueOf (.04);
24854 });
24855 Clazz_declarePackage ("java.text");
24856 Clazz_load (["java.text.CharacterIterator", "java.io.InvalidObjectException", "java.util.HashMap"], "java.text.AttributedCharacterIterator", null, function () {
24857 Clazz_declareInterface (java.text, "AttributedCharacterIterator", java.text.CharacterIterator);
24858 Clazz_pu$h(self.c$);
24859 c$ = Clazz_decorateAsClass (function () {
24860 this.name = null;
24861 Clazz_instantialize (this, arguments);
24862 }, java.text.AttributedCharacterIterator, "Attribute", null, java.io.Serializable);
24863 Clazz_makeConstructor (c$, 
24864 function (a) {
24865 this.name = a;
24866 if (this.getClass () === java.text.AttributedCharacterIterator.Attribute) {
24867 java.text.AttributedCharacterIterator.Attribute.instanceMap.put (a, this);
24868 }}, "~S");
24869 Clazz_overrideMethod (c$, "toString", 
24870 function () {
24871 return this.getClass ().getName () + "(" + this.name + ")";
24872 });
24873 Clazz_defineMethod (c$, "getName", 
24874 function () {
24875 return this.name;
24876 });
24877 Clazz_defineMethod (c$, "readResolve", 
24878 function () {
24879 if (this.getClass () !== java.text.AttributedCharacterIterator.Attribute) {
24880 throw  new java.io.InvalidObjectException ("subclass didn't correctly implement readResolve");
24881 }var a = java.text.AttributedCharacterIterator.Attribute.instanceMap.get (this.getName ());
24882 if (a != null) {
24883 return a;
24884 } else {
24885 throw  new java.io.InvalidObjectException ("unknown attribute name");
24886 }});
24887 c$.instanceMap = c$.prototype.instanceMap =  new java.util.HashMap (7);
24888 c$.LANGUAGE = c$.prototype.LANGUAGE =  new java.text.AttributedCharacterIterator.Attribute ("language");
24889 c$.READING = c$.prototype.READING =  new java.text.AttributedCharacterIterator.Attribute ("reading");
24890 c$.INPUT_METHOD_SEGMENT = c$.prototype.INPUT_METHOD_SEGMENT =  new java.text.AttributedCharacterIterator.Attribute ("input_method_segment");
24891 c$ = Clazz_p0p ();
24892 });
24893 Clazz_declarePackage ("java.text");
24894 c$ = Clazz_declareInterface (java.text, "CharacterIterator", Cloneable);
24895 Clazz_defineStatics (c$,
24896 "DONE", '\uFFFF');
24897 Clazz_declarePackage ("java.awt.geom");
24898 Clazz_load (null, "java.awt.geom.Point2D", ["java.lang.Double", "$.InternalError"], function () {
24899 c$ = Clazz_declareType (java.awt.geom, "Point2D", null, Cloneable);
24900 Clazz_makeConstructor (c$, 
24901 function () {
24902 });
24903 Clazz_defineMethod (c$, "setLocation", 
24904 function (p) {
24905 this.setLocation (p.getX (), p.getY ());
24906 }, "java.awt.geom.Point2D");
24907 c$.distanceSq = Clazz_defineMethod (c$, "distanceSq", 
24908 function (x1, y1, x2, y2) {
24909 x1 -= x2;
24910 y1 -= y2;
24911 return (x1 * x1 + y1 * y1);
24912 }, "~N,~N,~N,~N");
24913 c$.distance = Clazz_defineMethod (c$, "distance", 
24914 function (x1, y1, x2, y2) {
24915 x1 -= x2;
24916 y1 -= y2;
24917 return Math.sqrt (x1 * x1 + y1 * y1);
24918 }, "~N,~N,~N,~N");
24919 Clazz_defineMethod (c$, "distanceSq", 
24920 function (px, py) {
24921 px -= this.getX ();
24922 py -= this.getY ();
24923 return (px * px + py * py);
24924 }, "~N,~N");
24925 Clazz_defineMethod (c$, "distanceSq", 
24926 function (pt) {
24927 var px = pt.getX () - this.getX ();
24928 var py = pt.getY () - this.getY ();
24929 return (px * px + py * py);
24930 }, "java.awt.geom.Point2D");
24931 Clazz_defineMethod (c$, "distance", 
24932 function (px, py) {
24933 px -= this.getX ();
24934 py -= this.getY ();
24935 return Math.sqrt (px * px + py * py);
24936 }, "~N,~N");
24937 Clazz_defineMethod (c$, "distance", 
24938 function (pt) {
24939 var px = pt.getX () - this.getX ();
24940 var py = pt.getY () - this.getY ();
24941 return Math.sqrt (px * px + py * py);
24942 }, "java.awt.geom.Point2D");
24943 Clazz_defineMethod (c$, "clone", 
24944 function () {
24945 try {
24946 return Clazz_superCall (this, java.awt.geom.Point2D, "clone", []);
24947 } catch (e) {
24948 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
24949 throw  new InternalError ();
24950 } else {
24951 throw e;
24952 }
24953 }
24954 });
24955 Clazz_overrideMethod (c$, "hashCode", 
24956 function () {
24957 var bits = java.lang.Double.doubleToLongBits (this.getX ());
24958 bits ^= java.lang.Double.doubleToLongBits (this.getY ()) * 31;
24959 return ((bits) ^ ((bits >> 32)));
24960 });
24961 Clazz_defineMethod (c$, "equals", 
24962 function (obj) {
24963 if (Clazz_instanceOf (obj, java.awt.geom.Point2D)) {
24964 var p2d = obj;
24965 return (this.getX () == p2d.getX ()) && (this.getY () == p2d.getY ());
24966 }return Clazz_superCall (this, java.awt.geom.Point2D, "equals", [obj]);
24967 }, "~O");
24968 Clazz_pu$h(self.c$);
24969 c$ = Clazz_decorateAsClass (function () {
24970 this.x = 0;
24971 this.y = 0;
24972 Clazz_instantialize (this, arguments);
24973 }, java.awt.geom.Point2D, "Float", java.awt.geom.Point2D);
24974 Clazz_makeConstructor (c$, 
24975 function () {
24976 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
24977 });
24978 Clazz_makeConstructor (c$, 
24979 function (a, b) {
24980 Clazz_superConstructor (this, java.awt.geom.Point2D.Float, []);
24981 this.x = a;
24982 this.y = b;
24983 }, "~N,~N");
24984 Clazz_overrideMethod (c$, "getX", 
24985 function () {
24986 return this.x;
24987 });
24988 Clazz_overrideMethod (c$, "getY", 
24989 function () {
24990 return this.y;
24991 });
24992 Clazz_defineMethod (c$, "setLocation", 
24993 function (a, b) {
24994 this.x = a;
24995 this.y = b;
24996 }, "~N,~N");
24997 Clazz_defineMethod (c$, "setLocation", 
24998 function (a, b) {
24999 this.x = a;
25000 this.y = b;
25001 }, "~N,~N");
25002 Clazz_overrideMethod (c$, "toString", 
25003 function () {
25004 return "Point2D.Float[" + this.x + ", " + this.y + "]";
25005 });
25006 c$ = Clazz_p0p ();
25007 Clazz_pu$h(self.c$);
25008 c$ = Clazz_decorateAsClass (function () {
25009 this.x = 0;
25010 this.y = 0;
25011 Clazz_instantialize (this, arguments);
25012 }, java.awt.geom.Point2D, "Double", java.awt.geom.Point2D);
25013 Clazz_makeConstructor (c$, 
25014 function () {
25015 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25016 });
25017 Clazz_makeConstructor (c$, 
25018 function (a, b) {
25019 Clazz_superConstructor (this, java.awt.geom.Point2D.Double, []);
25020 this.x = a;
25021 this.y = b;
25022 }, "~N,~N");
25023 Clazz_overrideMethod (c$, "getX", 
25024 function () {
25025 return this.x;
25026 });
25027 Clazz_overrideMethod (c$, "getY", 
25028 function () {
25029 return this.y;
25030 });
25031 Clazz_defineMethod (c$, "setLocation", 
25032 function (a, b) {
25033 this.x = a;
25034 this.y = b;
25035 }, "~N,~N");
25036 Clazz_overrideMethod (c$, "toString", 
25037 function () {
25038 return "Point2D.Double[" + this.x + ", " + this.y + "]";
25039 });
25040 c$ = Clazz_p0p ();
25041 });
25042 Clazz_declarePackage ("java.awt.geom");
25043 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 () {
25044 c$ = Clazz_decorateAsClass (function () {
25045 this.m00 = 0;
25046 this.m10 = 0;
25047 this.m01 = 0;
25048 this.m11 = 0;
25049 this.m02 = 0;
25050 this.m12 = 0;
25051 this.state = 0;
25052 this.type = 0;
25053 Clazz_instantialize (this, arguments);
25054 }, java.awt.geom, "AffineTransform", null, [Cloneable, java.io.Serializable]);
25055 Clazz_makeConstructor (c$, 
25056  function (m00, m10, m01, m11, m02, m12, state) {
25057 {
25058 switch (arguments.length) { case 0: this.m00 = this.m11 = 1.0;
25059 return;
25060 case 1:
25061 if (Clazz_instanceOf(m00, java.awt.geom.AffineTransform)) {
25062 var Tx = m00; this.m00 =
25063 Tx.m00; this.m10 = Tx.m10; this.m01 = Tx.m01; this.m11 =
25064 Tx.m11; this.m02 = Tx.m02; this.m12 = Tx.m12; this.state =
25065 Tx.state; this.type = Tx.type;
25066 } else {
25067 var flatmatrix = m00;
25068 this.m00 = flatmatrix[0];
25069 this.m10 = flatmatrix[1];
25070 this.m01 = flatmatrix[2];
25071 this.m11 = flatmatrix[3];
25072 if (flatmatrix.length > 5) {
25073 this.m02 = flatmatrix[4];
25074 this.m12 = flatmatrix[5];
25075 }
25076 this.updateState();
25077 }
25078 return;
25079 case 6:
25080 this.m00 = m00;
25081 this.m10 = m10;
25082 this.m01 = m01;
25083 this.m11 = m11;
25084 this.m02 = m02;
25085 this.m12 = m12;
25086 this.updateState();
25087 return;
25088 }
25089 }this.m00 = m00;
25090 this.m10 = m10;
25091 this.m01 = m01;
25092 this.m11 = m11;
25093 this.m02 = m02;
25094 this.m12 = m12;
25095 this.state = state;
25096 this.type = -1;
25097 }, "~N,~N,~N,~N,~N,~N,~N");
25098 c$.getTranslateInstance = Clazz_defineMethod (c$, "getTranslateInstance", 
25099 function (tx, ty) {
25100 var Tx =  new java.awt.geom.AffineTransform ();
25101 Tx.setToTranslation (tx, ty);
25102 return Tx;
25103 }, "~N,~N");
25104 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25105 function (theta) {
25106 var Tx =  new java.awt.geom.AffineTransform ();
25107 Tx.setToRotation (theta);
25108 return Tx;
25109 }, "~N");
25110 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25111 function (theta, anchorx, anchory) {
25112 var Tx =  new java.awt.geom.AffineTransform ();
25113 Tx.setToRotation (theta, anchorx, anchory);
25114 return Tx;
25115 }, "~N,~N,~N");
25116 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25117 function (vecx, vecy) {
25118 var Tx =  new java.awt.geom.AffineTransform ();
25119 Tx.setToRotation (vecx, vecy);
25120 return Tx;
25121 }, "~N,~N");
25122 c$.getRotateInstance = Clazz_defineMethod (c$, "getRotateInstance", 
25123 function (vecx, vecy, anchorx, anchory) {
25124 var Tx =  new java.awt.geom.AffineTransform ();
25125 Tx.setToRotation (vecx, vecy, anchorx, anchory);
25126 return Tx;
25127 }, "~N,~N,~N,~N");
25128 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25129 function (numquadrants) {
25130 var Tx =  new java.awt.geom.AffineTransform ();
25131 Tx.setToQuadrantRotation (numquadrants);
25132 return Tx;
25133 }, "~N");
25134 c$.getQuadrantRotateInstance = Clazz_defineMethod (c$, "getQuadrantRotateInstance", 
25135 function (numquadrants, anchorx, anchory) {
25136 var Tx =  new java.awt.geom.AffineTransform ();
25137 Tx.setToQuadrantRotation (numquadrants, anchorx, anchory);
25138 return Tx;
25139 }, "~N,~N,~N");
25140 c$.getScaleInstance = Clazz_defineMethod (c$, "getScaleInstance", 
25141 function (sx, sy) {
25142 var Tx =  new java.awt.geom.AffineTransform ();
25143 Tx.setToScale (sx, sy);
25144 return Tx;
25145 }, "~N,~N");
25146 c$.getShearInstance = Clazz_defineMethod (c$, "getShearInstance", 
25147 function (shx, shy) {
25148 var Tx =  new java.awt.geom.AffineTransform ();
25149 Tx.setToShear (shx, shy);
25150 return Tx;
25151 }, "~N,~N");
25152 Clazz_defineMethod (c$, "getType", 
25153 function () {
25154 if (this.type == -1) {
25155 this.calculateType ();
25156 }return this.type;
25157 });
25158 Clazz_defineMethod (c$, "calculateType", 
25159  function () {
25160 var ret = 0;
25161 var sgn0;
25162 var sgn1;
25163 var M0;
25164 var M1;
25165 var M2;
25166 var M3;
25167 this.updateState ();
25168 switch (this.state) {
25169 default:
25170 this.stateError ();
25171 case (7):
25172 ret = 1;
25173 case (6):
25174 if ((M0 = this.m00) * (M2 = this.m01) + (M3 = this.m10) * (M1 = this.m11) != 0) {
25175 this.type = 32;
25176 return;
25177 }sgn0 = (M0 >= 0.0);
25178 sgn1 = (M1 >= 0.0);
25179 if (sgn0 == sgn1) {
25180 if (M0 != M1 || M2 != -M3) {
25181 ret |= (20);
25182 } else if (M0 * M1 - M2 * M3 != 1.0) {
25183 ret |= (18);
25184 } else {
25185 ret |= 16;
25186 }} else {
25187 if (M0 != -M1 || M2 != M3) {
25188 ret |= (84);
25189 } else if (M0 * M1 - M2 * M3 != 1.0) {
25190 ret |= (82);
25191 } else {
25192 ret |= (80);
25193 }}break;
25194 case (5):
25195 ret = 1;
25196 case (4):
25197 sgn0 = ((M0 = this.m01) >= 0.0);
25198 sgn1 = ((M1 = this.m10) >= 0.0);
25199 if (sgn0 != sgn1) {
25200 if (M0 != -M1) {
25201 ret |= (12);
25202 } else if (M0 != 1.0 && M0 != -1.0) {
25203 ret |= (10);
25204 } else {
25205 ret |= 8;
25206 }} else {
25207 if (M0 == M1) {
25208 ret |= (74);
25209 } else {
25210 ret |= (76);
25211 }}break;
25212 case (3):
25213 ret = 1;
25214 case (2):
25215 sgn0 = ((M0 = this.m00) >= 0.0);
25216 sgn1 = ((M1 = this.m11) >= 0.0);
25217 if (sgn0 == sgn1) {
25218 if (sgn0) {
25219 if (M0 == M1) {
25220 ret |= 2;
25221 } else {
25222 ret |= 4;
25223 }} else {
25224 if (M0 != M1) {
25225 ret |= (12);
25226 } else if (M0 != -1.0) {
25227 ret |= (10);
25228 } else {
25229 ret |= 8;
25230 }}} else {
25231 if (M0 == -M1) {
25232 if (M0 == 1.0 || M0 == -1.0) {
25233 ret |= 64;
25234 } else {
25235 ret |= (66);
25236 }} else {
25237 ret |= (68);
25238 }}break;
25239 case (1):
25240 ret = 1;
25241 break;
25242 case (0):
25243 break;
25244 }
25245 this.type = ret;
25246 });
25247 Clazz_defineMethod (c$, "getDeterminant", 
25248 function () {
25249 switch (this.state) {
25250 default:
25251 this.stateError ();
25252 case (7):
25253 case (6):
25254 return this.m00 * this.m11 - this.m01 * this.m10;
25255 case (5):
25256 case (4):
25257 return -(this.m01 * this.m10);
25258 case (3):
25259 case (2):
25260 return this.m00 * this.m11;
25261 case (1):
25262 case (0):
25263 return 1.0;
25264 }
25265 });
25266 Clazz_defineMethod (c$, "updateState", 
25267 function () {
25268 if (this.m01 == 0.0 && this.m10 == 0.0) {
25269 if (this.m00 == 1.0 && this.m11 == 1.0) {
25270 if (this.m02 == 0.0 && this.m12 == 0.0) {
25271 this.state = 0;
25272 this.type = 0;
25273 } else {
25274 this.state = 1;
25275 this.type = 1;
25276 }} else {
25277 if (this.m02 == 0.0 && this.m12 == 0.0) {
25278 this.state = 2;
25279 this.type = -1;
25280 } else {
25281 this.state = (3);
25282 this.type = -1;
25283 }}} else {
25284 if (this.m00 == 0.0 && this.m11 == 0.0) {
25285 if (this.m02 == 0.0 && this.m12 == 0.0) {
25286 this.state = 4;
25287 this.type = -1;
25288 } else {
25289 this.state = (5);
25290 this.type = -1;
25291 }} else {
25292 if (this.m02 == 0.0 && this.m12 == 0.0) {
25293 this.state = (6);
25294 this.type = -1;
25295 } else {
25296 this.state = (7);
25297 this.type = -1;
25298 }}}});
25299 Clazz_defineMethod (c$, "stateError", 
25300  function () {
25301 throw  new InternalError ("missing case in transform state switch");
25302 });
25303 Clazz_defineMethod (c$, "getMatrix", 
25304 function (flatmatrix) {
25305 flatmatrix[0] = this.m00;
25306 flatmatrix[1] = this.m10;
25307 flatmatrix[2] = this.m01;
25308 flatmatrix[3] = this.m11;
25309 if (flatmatrix.length > 5) {
25310 flatmatrix[4] = this.m02;
25311 flatmatrix[5] = this.m12;
25312 }}, "~A");
25313 Clazz_defineMethod (c$, "getScaleX", 
25314 function () {
25315 return this.m00;
25316 });
25317 Clazz_defineMethod (c$, "getScaleY", 
25318 function () {
25319 return this.m11;
25320 });
25321 Clazz_defineMethod (c$, "getShearX", 
25322 function () {
25323 return this.m01;
25324 });
25325 Clazz_defineMethod (c$, "getShearY", 
25326 function () {
25327 return this.m10;
25328 });
25329 Clazz_defineMethod (c$, "getTranslateX", 
25330 function () {
25331 return this.m02;
25332 });
25333 Clazz_defineMethod (c$, "getTranslateY", 
25334 function () {
25335 return this.m12;
25336 });
25337 Clazz_defineMethod (c$, "translate", 
25338 function (tx, ty) {
25339 switch (this.state) {
25340 default:
25341 this.stateError ();
25342 case (7):
25343 this.m02 = tx * this.m00 + ty * this.m01 + this.m02;
25344 this.m12 = tx * this.m10 + ty * this.m11 + this.m12;
25345 if (this.m02 == 0.0 && this.m12 == 0.0) {
25346 this.state = 6;
25347 if (this.type != -1) {
25348 this.type -= 1;
25349 }}return;
25350 case (6):
25351 this.m02 = tx * this.m00 + ty * this.m01;
25352 this.m12 = tx * this.m10 + ty * this.m11;
25353 if (this.m02 != 0.0 || this.m12 != 0.0) {
25354 this.state = 7;
25355 this.type |= 1;
25356 }return;
25357 case (5):
25358 this.m02 = ty * this.m01 + this.m02;
25359 this.m12 = tx * this.m10 + this.m12;
25360 if (this.m02 == 0.0 && this.m12 == 0.0) {
25361 this.state = 4;
25362 if (this.type != -1) {
25363 this.type -= 1;
25364 }}return;
25365 case (4):
25366 this.m02 = ty * this.m01;
25367 this.m12 = tx * this.m10;
25368 if (this.m02 != 0.0 || this.m12 != 0.0) {
25369 this.state = 5;
25370 this.type |= 1;
25371 }return;
25372 case (3):
25373 this.m02 = tx * this.m00 + this.m02;
25374 this.m12 = ty * this.m11 + this.m12;
25375 if (this.m02 == 0.0 && this.m12 == 0.0) {
25376 this.state = 2;
25377 if (this.type != -1) {
25378 this.type -= 1;
25379 }}return;
25380 case (2):
25381 this.m02 = tx * this.m00;
25382 this.m12 = ty * this.m11;
25383 if (this.m02 != 0.0 || this.m12 != 0.0) {
25384 this.state = 3;
25385 this.type |= 1;
25386 }return;
25387 case (1):
25388 this.m02 = tx + this.m02;
25389 this.m12 = ty + this.m12;
25390 if (this.m02 == 0.0 && this.m12 == 0.0) {
25391 this.state = 0;
25392 this.type = 0;
25393 }return;
25394 case (0):
25395 this.m02 = tx;
25396 this.m12 = ty;
25397 if (tx != 0.0 || ty != 0.0) {
25398 this.state = 1;
25399 this.type = 1;
25400 }return;
25401 }
25402 }, "~N,~N");
25403 Clazz_defineMethod (c$, "rotate90", 
25404  function () {
25405 var M0 = this.m00;
25406 this.m00 = this.m01;
25407 this.m01 = -M0;
25408 M0 = this.m10;
25409 this.m10 = this.m11;
25410 this.m11 = -M0;
25411 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25412 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25413 state -= 2;
25414 }this.state = state;
25415 this.type = -1;
25416 });
25417 Clazz_defineMethod (c$, "rotate180", 
25418  function () {
25419 this.m00 = -this.m00;
25420 this.m11 = -this.m11;
25421 var state = this.state;
25422 if ((state & (4)) != 0) {
25423 this.m01 = -this.m01;
25424 this.m10 = -this.m10;
25425 } else {
25426 if (this.m00 == 1.0 && this.m11 == 1.0) {
25427 this.state = state & -3;
25428 } else {
25429 this.state = state | 2;
25430 }}this.type = -1;
25431 });
25432 Clazz_defineMethod (c$, "rotate270", 
25433  function () {
25434 var M0 = this.m00;
25435 this.m00 = -this.m01;
25436 this.m01 = M0;
25437 M0 = this.m10;
25438 this.m10 = -this.m11;
25439 this.m11 = M0;
25440 var state = java.awt.geom.AffineTransform.rot90conversion[this.state];
25441 if ((state & (6)) == 2 && this.m00 == 1.0 && this.m11 == 1.0) {
25442 state -= 2;
25443 }this.state = state;
25444 this.type = -1;
25445 });
25446 Clazz_defineMethod (c$, "rotate", 
25447 function (theta) {
25448 var sin = Math.sin (theta);
25449 if (sin == 1.0) {
25450 this.rotate90 ();
25451 } else if (sin == -1.0) {
25452 this.rotate270 ();
25453 } else {
25454 var cos = Math.cos (theta);
25455 if (cos == -1.0) {
25456 this.rotate180 ();
25457 } else if (cos != 1.0) {
25458 var M0;
25459 var M1;
25460 M0 = this.m00;
25461 M1 = this.m01;
25462 this.m00 = cos * M0 + sin * M1;
25463 this.m01 = -sin * M0 + cos * M1;
25464 M0 = this.m10;
25465 M1 = this.m11;
25466 this.m10 = cos * M0 + sin * M1;
25467 this.m11 = -sin * M0 + cos * M1;
25468 this.updateState ();
25469 }}}, "~N");
25470 Clazz_defineMethod (c$, "rotate", 
25471 function (theta, anchorx, anchory) {
25472 this.translate (anchorx, anchory);
25473 this.rotate (theta);
25474 this.translate (-anchorx, -anchory);
25475 }, "~N,~N,~N");
25476 Clazz_defineMethod (c$, "rotate", 
25477 function (vecx, vecy) {
25478 if (vecy == 0.0) {
25479 if (vecx < 0.0) {
25480 this.rotate180 ();
25481 }} else if (vecx == 0.0) {
25482 if (vecy > 0.0) {
25483 this.rotate90 ();
25484 } else {
25485 this.rotate270 ();
25486 }} else {
25487 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25488 var sin = vecy / len;
25489 var cos = vecx / len;
25490 var M0;
25491 var M1;
25492 M0 = this.m00;
25493 M1 = this.m01;
25494 this.m00 = cos * M0 + sin * M1;
25495 this.m01 = -sin * M0 + cos * M1;
25496 M0 = this.m10;
25497 M1 = this.m11;
25498 this.m10 = cos * M0 + sin * M1;
25499 this.m11 = -sin * M0 + cos * M1;
25500 this.updateState ();
25501 }}, "~N,~N");
25502 Clazz_defineMethod (c$, "rotate", 
25503 function (vecx, vecy, anchorx, anchory) {
25504 this.translate (anchorx, anchory);
25505 this.rotate (vecx, vecy);
25506 this.translate (-anchorx, -anchory);
25507 }, "~N,~N,~N,~N");
25508 Clazz_defineMethod (c$, "quadrantRotate", 
25509 function (numquadrants) {
25510 switch (numquadrants & 3) {
25511 case 0:
25512 break;
25513 case 1:
25514 this.rotate90 ();
25515 break;
25516 case 2:
25517 this.rotate180 ();
25518 break;
25519 case 3:
25520 this.rotate270 ();
25521 break;
25522 }
25523 }, "~N");
25524 Clazz_defineMethod (c$, "quadrantRotate", 
25525 function (numquadrants, anchorx, anchory) {
25526 switch (numquadrants & 3) {
25527 case 0:
25528 return;
25529 case 1:
25530 this.m02 += anchorx * (this.m00 - this.m01) + anchory * (this.m01 + this.m00);
25531 this.m12 += anchorx * (this.m10 - this.m11) + anchory * (this.m11 + this.m10);
25532 this.rotate90 ();
25533 break;
25534 case 2:
25535 this.m02 += anchorx * (this.m00 + this.m00) + anchory * (this.m01 + this.m01);
25536 this.m12 += anchorx * (this.m10 + this.m10) + anchory * (this.m11 + this.m11);
25537 this.rotate180 ();
25538 break;
25539 case 3:
25540 this.m02 += anchorx * (this.m00 + this.m01) + anchory * (this.m01 - this.m00);
25541 this.m12 += anchorx * (this.m10 + this.m11) + anchory * (this.m11 - this.m10);
25542 this.rotate270 ();
25543 break;
25544 }
25545 if (this.m02 == 0.0 && this.m12 == 0.0) {
25546 this.state &= -2;
25547 } else {
25548 this.state |= 1;
25549 }}, "~N,~N,~N");
25550 Clazz_defineMethod (c$, "scale", 
25551 function (sx, sy) {
25552 var state = this.state;
25553 switch (state) {
25554 default:
25555 this.stateError ();
25556 case (7):
25557 case (6):
25558 this.m00 *= sx;
25559 this.m11 *= sy;
25560 case (5):
25561 case (4):
25562 this.m01 *= sy;
25563 this.m10 *= sx;
25564 if (this.m01 == 0 && this.m10 == 0) {
25565 state &= 1;
25566 if (this.m00 == 1.0 && this.m11 == 1.0) {
25567 this.type = (state == 0 ? 0 : 1);
25568 } else {
25569 state |= 2;
25570 this.type = -1;
25571 }this.state = state;
25572 }return;
25573 case (3):
25574 case (2):
25575 this.m00 *= sx;
25576 this.m11 *= sy;
25577 if (this.m00 == 1.0 && this.m11 == 1.0) {
25578 this.state = (state &= 1);
25579 this.type = (state == 0 ? 0 : 1);
25580 } else {
25581 this.type = -1;
25582 }return;
25583 case (1):
25584 case (0):
25585 this.m00 = sx;
25586 this.m11 = sy;
25587 if (sx != 1.0 || sy != 1.0) {
25588 this.state = state | 2;
25589 this.type = -1;
25590 }return;
25591 }
25592 }, "~N,~N");
25593 Clazz_defineMethod (c$, "shear", 
25594 function (shx, shy) {
25595 var state = this.state;
25596 switch (state) {
25597 default:
25598 this.stateError ();
25599 case (7):
25600 case (6):
25601 var M0;
25602 var M1;
25603 M0 = this.m00;
25604 M1 = this.m01;
25605 this.m00 = M0 + M1 * shy;
25606 this.m01 = M0 * shx + M1;
25607 M0 = this.m10;
25608 M1 = this.m11;
25609 this.m10 = M0 + M1 * shy;
25610 this.m11 = M0 * shx + M1;
25611 this.updateState ();
25612 return;
25613 case (5):
25614 case (4):
25615 this.m00 = this.m01 * shy;
25616 this.m11 = this.m10 * shx;
25617 if (this.m00 != 0.0 || this.m11 != 0.0) {
25618 this.state = state | 2;
25619 }this.type = -1;
25620 return;
25621 case (3):
25622 case (2):
25623 this.m01 = this.m00 * shx;
25624 this.m10 = this.m11 * shy;
25625 if (this.m01 != 0.0 || this.m10 != 0.0) {
25626 this.state = state | 4;
25627 }this.type = -1;
25628 return;
25629 case (1):
25630 case (0):
25631 this.m01 = shx;
25632 this.m10 = shy;
25633 if (this.m01 != 0.0 || this.m10 != 0.0) {
25634 this.state = state | 2 | 4;
25635 this.type = -1;
25636 }return;
25637 }
25638 }, "~N,~N");
25639 Clazz_defineMethod (c$, "setToIdentity", 
25640 function () {
25641 this.m00 = this.m11 = 1.0;
25642 this.m10 = this.m01 = this.m02 = this.m12 = 0.0;
25643 this.state = 0;
25644 this.type = 0;
25645 });
25646 Clazz_defineMethod (c$, "setToTranslation", 
25647 function (tx, ty) {
25648 this.m00 = 1.0;
25649 this.m10 = 0.0;
25650 this.m01 = 0.0;
25651 this.m11 = 1.0;
25652 this.m02 = tx;
25653 this.m12 = ty;
25654 if (tx != 0.0 || ty != 0.0) {
25655 this.state = 1;
25656 this.type = 1;
25657 } else {
25658 this.state = 0;
25659 this.type = 0;
25660 }}, "~N,~N");
25661 Clazz_defineMethod (c$, "setToRotation", 
25662 function (theta) {
25663 var sin = Math.sin (theta);
25664 var cos;
25665 if (sin == 1.0 || sin == -1.0) {
25666 cos = 0.0;
25667 this.state = 4;
25668 this.type = 8;
25669 } else {
25670 cos = Math.cos (theta);
25671 if (cos == -1.0) {
25672 sin = 0.0;
25673 this.state = 2;
25674 this.type = 8;
25675 } else if (cos == 1.0) {
25676 sin = 0.0;
25677 this.state = 0;
25678 this.type = 0;
25679 } else {
25680 this.state = 6;
25681 this.type = 16;
25682 }}this.m00 = cos;
25683 this.m10 = sin;
25684 this.m01 = -sin;
25685 this.m11 = cos;
25686 this.m02 = 0.0;
25687 this.m12 = 0.0;
25688 }, "~N");
25689 Clazz_defineMethod (c$, "setToRotation", 
25690 function (theta, anchorx, anchory) {
25691 this.setToRotation (theta);
25692 var sin = this.m10;
25693 var oneMinusCos = 1.0 - this.m00;
25694 this.m02 = anchorx * oneMinusCos + anchory * sin;
25695 this.m12 = anchory * oneMinusCos - anchorx * sin;
25696 if (this.m02 != 0.0 || this.m12 != 0.0) {
25697 this.state |= 1;
25698 this.type |= 1;
25699 }}, "~N,~N,~N");
25700 Clazz_defineMethod (c$, "setToRotation", 
25701 function (vecx, vecy) {
25702 var sin;
25703 var cos;
25704 if (vecy == 0) {
25705 sin = 0.0;
25706 if (vecx < 0.0) {
25707 cos = -1.0;
25708 this.state = 2;
25709 this.type = 8;
25710 } else {
25711 cos = 1.0;
25712 this.state = 0;
25713 this.type = 0;
25714 }} else if (vecx == 0) {
25715 cos = 0.0;
25716 sin = (vecy > 0.0) ? 1.0 : -1.0;
25717 this.state = 4;
25718 this.type = 8;
25719 } else {
25720 var len = Math.sqrt (vecx * vecx + vecy * vecy);
25721 cos = vecx / len;
25722 sin = vecy / len;
25723 this.state = 6;
25724 this.type = 16;
25725 }this.m00 = cos;
25726 this.m10 = sin;
25727 this.m01 = -sin;
25728 this.m11 = cos;
25729 this.m02 = 0.0;
25730 this.m12 = 0.0;
25731 }, "~N,~N");
25732 Clazz_defineMethod (c$, "setToRotation", 
25733 function (vecx, vecy, anchorx, anchory) {
25734 this.setToRotation (vecx, vecy);
25735 var sin = this.m10;
25736 var oneMinusCos = 1.0 - this.m00;
25737 this.m02 = anchorx * oneMinusCos + anchory * sin;
25738 this.m12 = anchory * oneMinusCos - anchorx * sin;
25739 if (this.m02 != 0.0 || this.m12 != 0.0) {
25740 this.state |= 1;
25741 this.type |= 1;
25742 }}, "~N,~N,~N,~N");
25743 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25744 function (numquadrants) {
25745 switch (numquadrants & 3) {
25746 case 0:
25747 this.m00 = 1.0;
25748 this.m10 = 0.0;
25749 this.m01 = 0.0;
25750 this.m11 = 1.0;
25751 this.m02 = 0.0;
25752 this.m12 = 0.0;
25753 this.state = 0;
25754 this.type = 0;
25755 break;
25756 case 1:
25757 this.m00 = 0.0;
25758 this.m10 = 1.0;
25759 this.m01 = -1.0;
25760 this.m11 = 0.0;
25761 this.m02 = 0.0;
25762 this.m12 = 0.0;
25763 this.state = 4;
25764 this.type = 8;
25765 break;
25766 case 2:
25767 this.m00 = -1.0;
25768 this.m10 = 0.0;
25769 this.m01 = 0.0;
25770 this.m11 = -1.0;
25771 this.m02 = 0.0;
25772 this.m12 = 0.0;
25773 this.state = 2;
25774 this.type = 8;
25775 break;
25776 case 3:
25777 this.m00 = 0.0;
25778 this.m10 = -1.0;
25779 this.m01 = 1.0;
25780 this.m11 = 0.0;
25781 this.m02 = 0.0;
25782 this.m12 = 0.0;
25783 this.state = 4;
25784 this.type = 8;
25785 break;
25786 }
25787 }, "~N");
25788 Clazz_defineMethod (c$, "setToQuadrantRotation", 
25789 function (numquadrants, anchorx, anchory) {
25790 switch (numquadrants & 3) {
25791 case 0:
25792 this.m00 = 1.0;
25793 this.m10 = 0.0;
25794 this.m01 = 0.0;
25795 this.m11 = 1.0;
25796 this.m02 = 0.0;
25797 this.m12 = 0.0;
25798 this.state = 0;
25799 this.type = 0;
25800 break;
25801 case 1:
25802 this.m00 = 0.0;
25803 this.m10 = 1.0;
25804 this.m01 = -1.0;
25805 this.m11 = 0.0;
25806 this.m02 = anchorx + anchory;
25807 this.m12 = anchory - anchorx;
25808 if (this.m02 == 0.0 && this.m12 == 0.0) {
25809 this.state = 4;
25810 this.type = 8;
25811 } else {
25812 this.state = 5;
25813 this.type = 9;
25814 }break;
25815 case 2:
25816 this.m00 = -1.0;
25817 this.m10 = 0.0;
25818 this.m01 = 0.0;
25819 this.m11 = -1.0;
25820 this.m02 = anchorx + anchorx;
25821 this.m12 = anchory + anchory;
25822 if (this.m02 == 0.0 && this.m12 == 0.0) {
25823 this.state = 2;
25824 this.type = 8;
25825 } else {
25826 this.state = 3;
25827 this.type = 9;
25828 }break;
25829 case 3:
25830 this.m00 = 0.0;
25831 this.m10 = -1.0;
25832 this.m01 = 1.0;
25833 this.m11 = 0.0;
25834 this.m02 = anchorx - anchory;
25835 this.m12 = anchory + anchorx;
25836 if (this.m02 == 0.0 && this.m12 == 0.0) {
25837 this.state = 4;
25838 this.type = 8;
25839 } else {
25840 this.state = 5;
25841 this.type = 9;
25842 }break;
25843 }
25844 }, "~N,~N,~N");
25845 Clazz_defineMethod (c$, "setToScale", 
25846 function (sx, sy) {
25847 this.m00 = sx;
25848 this.m10 = 0.0;
25849 this.m01 = 0.0;
25850 this.m11 = sy;
25851 this.m02 = 0.0;
25852 this.m12 = 0.0;
25853 if (sx != 1.0 || sy != 1.0) {
25854 this.state = 2;
25855 this.type = -1;
25856 } else {
25857 this.state = 0;
25858 this.type = 0;
25859 }}, "~N,~N");
25860 Clazz_defineMethod (c$, "setToShear", 
25861 function (shx, shy) {
25862 this.m00 = 1.0;
25863 this.m01 = shx;
25864 this.m10 = shy;
25865 this.m11 = 1.0;
25866 this.m02 = 0.0;
25867 this.m12 = 0.0;
25868 if (shx != 0.0 || shy != 0.0) {
25869 this.state = (6);
25870 this.type = -1;
25871 } else {
25872 this.state = 0;
25873 this.type = 0;
25874 }}, "~N,~N");
25875 Clazz_defineMethod (c$, "setTransform", 
25876 function (Tx) {
25877 this.m00 = Tx.m00;
25878 this.m10 = Tx.m10;
25879 this.m01 = Tx.m01;
25880 this.m11 = Tx.m11;
25881 this.m02 = Tx.m02;
25882 this.m12 = Tx.m12;
25883 this.state = Tx.state;
25884 this.type = Tx.type;
25885 }, "java.awt.geom.AffineTransform");
25886 Clazz_defineMethod (c$, "setTransform", 
25887 function (m00, m10, m01, m11, m02, m12) {
25888 this.m00 = m00;
25889 this.m10 = m10;
25890 this.m01 = m01;
25891 this.m11 = m11;
25892 this.m02 = m02;
25893 this.m12 = m12;
25894 this.updateState ();
25895 }, "~N,~N,~N,~N,~N,~N");
25896 Clazz_defineMethod (c$, "concatenate", 
25897 function (Tx) {
25898 var M0;
25899 var M1;
25900 var T00;
25901 var T01;
25902 var T10;
25903 var T11;
25904 var T02;
25905 var T12;
25906 var mystate = this.state;
25907 var txstate = Tx.state;
25908 switch ((txstate << 3) | mystate) {
25909 case (0):
25910 case (1):
25911 case (2):
25912 case (3):
25913 case (4):
25914 case (5):
25915 case (6):
25916 case (7):
25917 return;
25918 case (56):
25919 this.m01 = Tx.m01;
25920 this.m10 = Tx.m10;
25921 case (24):
25922 this.m00 = Tx.m00;
25923 this.m11 = Tx.m11;
25924 case (8):
25925 this.m02 = Tx.m02;
25926 this.m12 = Tx.m12;
25927 this.state = txstate;
25928 this.type = Tx.type;
25929 return;
25930 case (48):
25931 this.m01 = Tx.m01;
25932 this.m10 = Tx.m10;
25933 case (16):
25934 this.m00 = Tx.m00;
25935 this.m11 = Tx.m11;
25936 this.state = txstate;
25937 this.type = Tx.type;
25938 return;
25939 case (40):
25940 this.m02 = Tx.m02;
25941 this.m12 = Tx.m12;
25942 case (32):
25943 this.m01 = Tx.m01;
25944 this.m10 = Tx.m10;
25945 this.m00 = this.m11 = 0.0;
25946 this.state = txstate;
25947 this.type = Tx.type;
25948 return;
25949 case (15):
25950 case (14):
25951 case (13):
25952 case (12):
25953 case (11):
25954 case (10):
25955 case (9):
25956 this.translate (Tx.m02, Tx.m12);
25957 return;
25958 case (23):
25959 case (22):
25960 case (21):
25961 case (20):
25962 case (19):
25963 case (18):
25964 case (17):
25965 this.scale (Tx.m00, Tx.m11);
25966 return;
25967 case (39):
25968 case (38):
25969 T01 = Tx.m01;
25970 T10 = Tx.m10;
25971 M0 = this.m00;
25972 this.m00 = this.m01 * T10;
25973 this.m01 = M0 * T01;
25974 M0 = this.m10;
25975 this.m10 = this.m11 * T10;
25976 this.m11 = M0 * T01;
25977 this.type = -1;
25978 return;
25979 case (37):
25980 case (36):
25981 this.m00 = this.m01 * Tx.m10;
25982 this.m01 = 0.0;
25983 this.m11 = this.m10 * Tx.m01;
25984 this.m10 = 0.0;
25985 this.state = mystate ^ (6);
25986 this.type = -1;
25987 return;
25988 case (35):
25989 case (34):
25990 this.m01 = this.m00 * Tx.m01;
25991 this.m00 = 0.0;
25992 this.m10 = this.m11 * Tx.m10;
25993 this.m11 = 0.0;
25994 this.state = mystate ^ (6);
25995 this.type = -1;
25996 return;
25997 case (33):
25998 this.m00 = 0.0;
25999 this.m01 = Tx.m01;
26000 this.m10 = Tx.m10;
26001 this.m11 = 0.0;
26002 this.state = 5;
26003 this.type = -1;
26004 return;
26005 }
26006 T00 = Tx.m00;
26007 T01 = Tx.m01;
26008 T02 = Tx.m02;
26009 T10 = Tx.m10;
26010 T11 = Tx.m11;
26011 T12 = Tx.m12;
26012 switch (mystate) {
26013 default:
26014 this.stateError ();
26015 case (6):
26016 this.state = mystate | txstate;
26017 case (7):
26018 M0 = this.m00;
26019 M1 = this.m01;
26020 this.m00 = T00 * M0 + T10 * M1;
26021 this.m01 = T01 * M0 + T11 * M1;
26022 this.m02 += T02 * M0 + T12 * M1;
26023 M0 = this.m10;
26024 M1 = this.m11;
26025 this.m10 = T00 * M0 + T10 * M1;
26026 this.m11 = T01 * M0 + T11 * M1;
26027 this.m12 += T02 * M0 + T12 * M1;
26028 this.type = -1;
26029 return;
26030 case (5):
26031 case (4):
26032 M0 = this.m01;
26033 this.m00 = T10 * M0;
26034 this.m01 = T11 * M0;
26035 this.m02 += T12 * M0;
26036 M0 = this.m10;
26037 this.m10 = T00 * M0;
26038 this.m11 = T01 * M0;
26039 this.m12 += T02 * M0;
26040 break;
26041 case (3):
26042 case (2):
26043 M0 = this.m00;
26044 this.m00 = T00 * M0;
26045 this.m01 = T01 * M0;
26046 this.m02 += T02 * M0;
26047 M0 = this.m11;
26048 this.m10 = T10 * M0;
26049 this.m11 = T11 * M0;
26050 this.m12 += T12 * M0;
26051 break;
26052 case (1):
26053 this.m00 = T00;
26054 this.m01 = T01;
26055 this.m02 += T02;
26056 this.m10 = T10;
26057 this.m11 = T11;
26058 this.m12 += T12;
26059 this.state = txstate | 1;
26060 this.type = -1;
26061 return;
26062 }
26063 this.updateState ();
26064 }, "java.awt.geom.AffineTransform");
26065 Clazz_defineMethod (c$, "preConcatenate", 
26066 function (Tx) {
26067 var M0;
26068 var M1;
26069 var T00;
26070 var T01;
26071 var T10;
26072 var T11;
26073 var T02;
26074 var T12;
26075 var mystate = this.state;
26076 var txstate = Tx.state;
26077 switch ((txstate << 3) | mystate) {
26078 case (0):
26079 case (1):
26080 case (2):
26081 case (3):
26082 case (4):
26083 case (5):
26084 case (6):
26085 case (7):
26086 return;
26087 case (8):
26088 case (10):
26089 case (12):
26090 case (14):
26091 this.m02 = Tx.m02;
26092 this.m12 = Tx.m12;
26093 this.state = mystate | 1;
26094 this.type |= 1;
26095 return;
26096 case (9):
26097 case (11):
26098 case (13):
26099 case (15):
26100 this.m02 = this.m02 + Tx.m02;
26101 this.m12 = this.m12 + Tx.m12;
26102 return;
26103 case (17):
26104 case (16):
26105 this.state = mystate | 2;
26106 case (23):
26107 case (22):
26108 case (21):
26109 case (20):
26110 case (19):
26111 case (18):
26112 T00 = Tx.m00;
26113 T11 = Tx.m11;
26114 if ((mystate & 4) != 0) {
26115 this.m01 = this.m01 * T00;
26116 this.m10 = this.m10 * T11;
26117 if ((mystate & 2) != 0) {
26118 this.m00 = this.m00 * T00;
26119 this.m11 = this.m11 * T11;
26120 }} else {
26121 this.m00 = this.m00 * T00;
26122 this.m11 = this.m11 * T11;
26123 }if ((mystate & 1) != 0) {
26124 this.m02 = this.m02 * T00;
26125 this.m12 = this.m12 * T11;
26126 }this.type = -1;
26127 return;
26128 case (37):
26129 case (36):
26130 mystate = mystate | 2;
26131 case (33):
26132 case (32):
26133 case (35):
26134 case (34):
26135 this.state = mystate ^ 4;
26136 case (39):
26137 case (38):
26138 T01 = Tx.m01;
26139 T10 = Tx.m10;
26140 M0 = this.m00;
26141 this.m00 = this.m10 * T01;
26142 this.m10 = M0 * T10;
26143 M0 = this.m01;
26144 this.m01 = this.m11 * T01;
26145 this.m11 = M0 * T10;
26146 M0 = this.m02;
26147 this.m02 = this.m12 * T01;
26148 this.m12 = M0 * T10;
26149 this.type = -1;
26150 return;
26151 }
26152 T00 = Tx.m00;
26153 T01 = Tx.m01;
26154 T02 = Tx.m02;
26155 T10 = Tx.m10;
26156 T11 = Tx.m11;
26157 T12 = Tx.m12;
26158 switch (mystate) {
26159 default:
26160 this.stateError ();
26161 case (7):
26162 M0 = this.m02;
26163 M1 = this.m12;
26164 T02 += M0 * T00 + M1 * T01;
26165 T12 += M0 * T10 + M1 * T11;
26166 case (6):
26167 this.m02 = T02;
26168 this.m12 = T12;
26169 M0 = this.m00;
26170 M1 = this.m10;
26171 this.m00 = M0 * T00 + M1 * T01;
26172 this.m10 = M0 * T10 + M1 * T11;
26173 M0 = this.m01;
26174 M1 = this.m11;
26175 this.m01 = M0 * T00 + M1 * T01;
26176 this.m11 = M0 * T10 + M1 * T11;
26177 break;
26178 case (5):
26179 M0 = this.m02;
26180 M1 = this.m12;
26181 T02 += M0 * T00 + M1 * T01;
26182 T12 += M0 * T10 + M1 * T11;
26183 case (4):
26184 this.m02 = T02;
26185 this.m12 = T12;
26186 M0 = this.m10;
26187 this.m00 = M0 * T01;
26188 this.m10 = M0 * T11;
26189 M0 = this.m01;
26190 this.m01 = M0 * T00;
26191 this.m11 = M0 * T10;
26192 break;
26193 case (3):
26194 M0 = this.m02;
26195 M1 = this.m12;
26196 T02 += M0 * T00 + M1 * T01;
26197 T12 += M0 * T10 + M1 * T11;
26198 case (2):
26199 this.m02 = T02;
26200 this.m12 = T12;
26201 M0 = this.m00;
26202 this.m00 = M0 * T00;
26203 this.m10 = M0 * T10;
26204 M0 = this.m11;
26205 this.m01 = M0 * T01;
26206 this.m11 = M0 * T11;
26207 break;
26208 case (1):
26209 M0 = this.m02;
26210 M1 = this.m12;
26211 T02 += M0 * T00 + M1 * T01;
26212 T12 += M0 * T10 + M1 * T11;
26213 case (0):
26214 this.m02 = T02;
26215 this.m12 = T12;
26216 this.m00 = T00;
26217 this.m10 = T10;
26218 this.m01 = T01;
26219 this.m11 = T11;
26220 this.state = mystate | txstate;
26221 this.type = -1;
26222 return;
26223 }
26224 this.updateState ();
26225 }, "java.awt.geom.AffineTransform");
26226 Clazz_defineMethod (c$, "createInverse", 
26227 function () {
26228 var det;
26229 switch (this.state) {
26230 default:
26231 this.stateError ();
26232 case (7):
26233 det = this.m00 * this.m11 - this.m01 * this.m10;
26234 if (Math.abs (det) <= 4.9E-324) {
26235 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26236 }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));
26237 case (6):
26238 det = this.m00 * this.m11 - this.m01 * this.m10;
26239 if (Math.abs (det) <= 4.9E-324) {
26240 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26241 }return  new java.awt.geom.AffineTransform (this.m11 / det, -this.m10 / det, -this.m01 / det, this.m00 / det, 0.0, 0.0, (6));
26242 case (5):
26243 if (this.m01 == 0.0 || this.m10 == 0.0) {
26244 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26245 }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));
26246 case (4):
26247 if (this.m01 == 0.0 || this.m10 == 0.0) {
26248 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26249 }return  new java.awt.geom.AffineTransform (0.0, 1.0 / this.m01, 1.0 / this.m10, 0.0, 0.0, 0.0, (4));
26250 case (3):
26251 if (this.m00 == 0.0 || this.m11 == 0.0) {
26252 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26253 }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));
26254 case (2):
26255 if (this.m00 == 0.0 || this.m11 == 0.0) {
26256 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26257 }return  new java.awt.geom.AffineTransform (1.0 / this.m00, 0.0, 0.0, 1.0 / this.m11, 0.0, 0.0, (2));
26258 case (1):
26259 return  new java.awt.geom.AffineTransform (1.0, 0.0, 0.0, 1.0, -this.m02, -this.m12, (1));
26260 case (0):
26261 return  new java.awt.geom.AffineTransform ();
26262 }
26263 });
26264 Clazz_defineMethod (c$, "invert", 
26265 function () {
26266 var M00;
26267 var M01;
26268 var M02;
26269 var M10;
26270 var M11;
26271 var M12;
26272 var det;
26273 switch (this.state) {
26274 default:
26275 this.stateError ();
26276 case (7):
26277 M00 = this.m00;
26278 M01 = this.m01;
26279 M02 = this.m02;
26280 M10 = this.m10;
26281 M11 = this.m11;
26282 M12 = this.m12;
26283 det = M00 * M11 - M01 * M10;
26284 if (Math.abs (det) <= 4.9E-324) {
26285 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26286 }this.m00 = M11 / det;
26287 this.m10 = -M10 / det;
26288 this.m01 = -M01 / det;
26289 this.m11 = M00 / det;
26290 this.m02 = (M01 * M12 - M11 * M02) / det;
26291 this.m12 = (M10 * M02 - M00 * M12) / det;
26292 break;
26293 case (6):
26294 M00 = this.m00;
26295 M01 = this.m01;
26296 M10 = this.m10;
26297 M11 = this.m11;
26298 det = M00 * M11 - M01 * M10;
26299 if (Math.abs (det) <= 4.9E-324) {
26300 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26301 }this.m00 = M11 / det;
26302 this.m10 = -M10 / det;
26303 this.m01 = -M01 / det;
26304 this.m11 = M00 / det;
26305 break;
26306 case (5):
26307 M01 = this.m01;
26308 M02 = this.m02;
26309 M10 = this.m10;
26310 M12 = this.m12;
26311 if (M01 == 0.0 || M10 == 0.0) {
26312 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26313 }this.m10 = 1.0 / M01;
26314 this.m01 = 1.0 / M10;
26315 this.m02 = -M12 / M10;
26316 this.m12 = -M02 / M01;
26317 break;
26318 case (4):
26319 M01 = this.m01;
26320 M10 = this.m10;
26321 if (M01 == 0.0 || M10 == 0.0) {
26322 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26323 }this.m10 = 1.0 / M01;
26324 this.m01 = 1.0 / M10;
26325 break;
26326 case (3):
26327 M00 = this.m00;
26328 M02 = this.m02;
26329 M11 = this.m11;
26330 M12 = this.m12;
26331 if (M00 == 0.0 || M11 == 0.0) {
26332 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26333 }this.m00 = 1.0 / M00;
26334 this.m11 = 1.0 / M11;
26335 this.m02 = -M02 / M00;
26336 this.m12 = -M12 / M11;
26337 break;
26338 case (2):
26339 M00 = this.m00;
26340 M11 = this.m11;
26341 if (M00 == 0.0 || M11 == 0.0) {
26342 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26343 }this.m00 = 1.0 / M00;
26344 this.m11 = 1.0 / M11;
26345 break;
26346 case (1):
26347 this.m02 = -this.m02;
26348 this.m12 = -this.m12;
26349 break;
26350 case (0):
26351 break;
26352 }
26353 });
26354 Clazz_defineMethod (c$, "transform", 
26355 function (ptSrc, ptDst) {
26356 if (ptDst == null) {
26357 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26358 ptDst =  new java.awt.geom.Point2D.Double ();
26359 } else {
26360 ptDst =  new java.awt.geom.Point2D.Float ();
26361 }}var x = ptSrc.getX ();
26362 var y = ptSrc.getY ();
26363 switch (this.state) {
26364 default:
26365 this.stateError ();
26366 case (7):
26367 ptDst.setLocation (x * this.m00 + y * this.m01 + this.m02, x * this.m10 + y * this.m11 + this.m12);
26368 return ptDst;
26369 case (6):
26370 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26371 return ptDst;
26372 case (5):
26373 ptDst.setLocation (y * this.m01 + this.m02, x * this.m10 + this.m12);
26374 return ptDst;
26375 case (4):
26376 ptDst.setLocation (y * this.m01, x * this.m10);
26377 return ptDst;
26378 case (3):
26379 ptDst.setLocation (x * this.m00 + this.m02, y * this.m11 + this.m12);
26380 return ptDst;
26381 case (2):
26382 ptDst.setLocation (x * this.m00, y * this.m11);
26383 return ptDst;
26384 case (1):
26385 ptDst.setLocation (x + this.m02, y + this.m12);
26386 return ptDst;
26387 case (0):
26388 ptDst.setLocation (x, y);
26389 return ptDst;
26390 }
26391 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26392 Clazz_defineMethod (c$, "transform", 
26393 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26394 if (numPts == 0) return;
26395 if (!JU.AU.isAD (srcPts)) {
26396 var src = srcPts;
26397 var dst = dstPts;
26398 this.transform (src, srcOff, dst, dstOff, numPts);
26399 return;
26400 }var M00;
26401 var M01;
26402 var M02;
26403 var M10;
26404 var M11;
26405 var M12;
26406 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26407 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26408 srcOff = dstOff;
26409 }switch (this.state) {
26410 default:
26411 this.stateError ();
26412 case (7):
26413 M00 = this.m00;
26414 M01 = this.m01;
26415 M02 = this.m02;
26416 M10 = this.m10;
26417 M11 = this.m11;
26418 M12 = this.m12;
26419 while (--numPts >= 0) {
26420 var x = srcPts[srcOff++];
26421 var y = srcPts[srcOff++];
26422 dstPts[dstOff++] = M00 * x + M01 * y + M02;
26423 dstPts[dstOff++] = M10 * x + M11 * y + M12;
26424 }
26425 return;
26426 case (6):
26427 M00 = this.m00;
26428 M01 = this.m01;
26429 M10 = this.m10;
26430 M11 = this.m11;
26431 while (--numPts >= 0) {
26432 var x = srcPts[srcOff++];
26433 var y = srcPts[srcOff++];
26434 dstPts[dstOff++] = M00 * x + M01 * y;
26435 dstPts[dstOff++] = M10 * x + M11 * y;
26436 }
26437 return;
26438 case (5):
26439 M01 = this.m01;
26440 M02 = this.m02;
26441 M10 = this.m10;
26442 M12 = this.m12;
26443 while (--numPts >= 0) {
26444 var x = srcPts[srcOff++];
26445 dstPts[dstOff++] = M01 * srcPts[srcOff++] + M02;
26446 dstPts[dstOff++] = M10 * x + M12;
26447 }
26448 return;
26449 case (4):
26450 M01 = this.m01;
26451 M10 = this.m10;
26452 while (--numPts >= 0) {
26453 var x = srcPts[srcOff++];
26454 dstPts[dstOff++] = M01 * srcPts[srcOff++];
26455 dstPts[dstOff++] = M10 * x;
26456 }
26457 return;
26458 case (3):
26459 M00 = this.m00;
26460 M02 = this.m02;
26461 M11 = this.m11;
26462 M12 = this.m12;
26463 while (--numPts >= 0) {
26464 dstPts[dstOff++] = M00 * srcPts[srcOff++] + M02;
26465 dstPts[dstOff++] = M11 * srcPts[srcOff++] + M12;
26466 }
26467 return;
26468 case (2):
26469 M00 = this.m00;
26470 M11 = this.m11;
26471 while (--numPts >= 0) {
26472 dstPts[dstOff++] = M00 * srcPts[srcOff++];
26473 dstPts[dstOff++] = M11 * srcPts[srcOff++];
26474 }
26475 return;
26476 case (1):
26477 M02 = this.m02;
26478 M12 = this.m12;
26479 while (--numPts >= 0) {
26480 dstPts[dstOff++] = srcPts[srcOff++] + M02;
26481 dstPts[dstOff++] = srcPts[srcOff++] + M12;
26482 }
26483 return;
26484 case (0):
26485 if (srcPts !== dstPts || srcOff != dstOff) {
26486 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26487 }return;
26488 }
26489 }, "~A,~N,~A,~N,~N");
26490 Clazz_defineMethod (c$, "inverseTransform", 
26491 function (ptSrc, ptDst) {
26492 if (ptDst == null) {
26493 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26494 ptDst =  new java.awt.geom.Point2D.Double ();
26495 } else {
26496 ptDst =  new java.awt.geom.Point2D.Float ();
26497 }}var x = ptSrc.getX ();
26498 var y = ptSrc.getY ();
26499 switch (this.state) {
26500 default:
26501 this.stateError ();
26502 case (7):
26503 x -= this.m02;
26504 y -= this.m12;
26505 case (6):
26506 var det = this.m00 * this.m11 - this.m01 * this.m10;
26507 if (Math.abs (det) <= 4.9E-324) {
26508 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26509 }ptDst.setLocation ((x * this.m11 - y * this.m01) / det, (y * this.m00 - x * this.m10) / det);
26510 return ptDst;
26511 case (5):
26512 x -= this.m02;
26513 y -= this.m12;
26514 case (4):
26515 if (this.m01 == 0.0 || this.m10 == 0.0) {
26516 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26517 }ptDst.setLocation (y / this.m10, x / this.m01);
26518 return ptDst;
26519 case (3):
26520 x -= this.m02;
26521 y -= this.m12;
26522 case (2):
26523 if (this.m00 == 0.0 || this.m11 == 0.0) {
26524 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26525 }ptDst.setLocation (x / this.m00, y / this.m11);
26526 return ptDst;
26527 case (1):
26528 ptDst.setLocation (x - this.m02, y - this.m12);
26529 return ptDst;
26530 case (0):
26531 ptDst.setLocation (x, y);
26532 return ptDst;
26533 }
26534 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26535 Clazz_defineMethod (c$, "inverseTransform", 
26536 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26537 var M00;
26538 var M01;
26539 var M02;
26540 var M10;
26541 var M11;
26542 var M12;
26543 var det;
26544 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26545 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26546 srcOff = dstOff;
26547 }switch (this.state) {
26548 default:
26549 this.stateError ();
26550 case (7):
26551 M00 = this.m00;
26552 M01 = this.m01;
26553 M02 = this.m02;
26554 M10 = this.m10;
26555 M11 = this.m11;
26556 M12 = this.m12;
26557 det = M00 * M11 - M01 * M10;
26558 if (Math.abs (det) <= 4.9E-324) {
26559 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26560 }while (--numPts >= 0) {
26561 var x = srcPts[srcOff++] - M02;
26562 var y = srcPts[srcOff++] - M12;
26563 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26564 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26565 }
26566 return;
26567 case (6):
26568 M00 = this.m00;
26569 M01 = this.m01;
26570 M10 = this.m10;
26571 M11 = this.m11;
26572 det = M00 * M11 - M01 * M10;
26573 if (Math.abs (det) <= 4.9E-324) {
26574 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is " + det);
26575 }while (--numPts >= 0) {
26576 var x = srcPts[srcOff++];
26577 var y = srcPts[srcOff++];
26578 dstPts[dstOff++] = (x * M11 - y * M01) / det;
26579 dstPts[dstOff++] = (y * M00 - x * M10) / det;
26580 }
26581 return;
26582 case (5):
26583 M01 = this.m01;
26584 M02 = this.m02;
26585 M10 = this.m10;
26586 M12 = this.m12;
26587 if (M01 == 0.0 || M10 == 0.0) {
26588 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26589 }while (--numPts >= 0) {
26590 var x = srcPts[srcOff++] - M02;
26591 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M10;
26592 dstPts[dstOff++] = x / M01;
26593 }
26594 return;
26595 case (4):
26596 M01 = this.m01;
26597 M10 = this.m10;
26598 if (M01 == 0.0 || M10 == 0.0) {
26599 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26600 }while (--numPts >= 0) {
26601 var x = srcPts[srcOff++];
26602 dstPts[dstOff++] = srcPts[srcOff++] / M10;
26603 dstPts[dstOff++] = x / M01;
26604 }
26605 return;
26606 case (3):
26607 M00 = this.m00;
26608 M02 = this.m02;
26609 M11 = this.m11;
26610 M12 = this.m12;
26611 if (M00 == 0.0 || M11 == 0.0) {
26612 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26613 }while (--numPts >= 0) {
26614 dstPts[dstOff++] = (srcPts[srcOff++] - M02) / M00;
26615 dstPts[dstOff++] = (srcPts[srcOff++] - M12) / M11;
26616 }
26617 return;
26618 case (2):
26619 M00 = this.m00;
26620 M11 = this.m11;
26621 if (M00 == 0.0 || M11 == 0.0) {
26622 throw  new java.awt.geom.NoninvertibleTransformException ("Determinant is 0");
26623 }while (--numPts >= 0) {
26624 dstPts[dstOff++] = srcPts[srcOff++] / M00;
26625 dstPts[dstOff++] = srcPts[srcOff++] / M11;
26626 }
26627 return;
26628 case (1):
26629 M02 = this.m02;
26630 M12 = this.m12;
26631 while (--numPts >= 0) {
26632 dstPts[dstOff++] = srcPts[srcOff++] - M02;
26633 dstPts[dstOff++] = srcPts[srcOff++] - M12;
26634 }
26635 return;
26636 case (0):
26637 if (srcPts !== dstPts || srcOff != dstOff) {
26638 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26639 }return;
26640 }
26641 }, "~A,~N,~A,~N,~N");
26642 Clazz_defineMethod (c$, "deltaTransform", 
26643 function (ptSrc, ptDst) {
26644 if (ptDst == null) {
26645 if (Clazz_instanceOf (ptSrc, java.awt.geom.Point2D.Double)) {
26646 ptDst =  new java.awt.geom.Point2D.Double ();
26647 } else {
26648 ptDst =  new java.awt.geom.Point2D.Float ();
26649 }}var x = ptSrc.getX ();
26650 var y = ptSrc.getY ();
26651 switch (this.state) {
26652 default:
26653 this.stateError ();
26654 case (7):
26655 case (6):
26656 ptDst.setLocation (x * this.m00 + y * this.m01, x * this.m10 + y * this.m11);
26657 return ptDst;
26658 case (5):
26659 case (4):
26660 ptDst.setLocation (y * this.m01, x * this.m10);
26661 return ptDst;
26662 case (3):
26663 case (2):
26664 ptDst.setLocation (x * this.m00, y * this.m11);
26665 return ptDst;
26666 case (1):
26667 case (0):
26668 ptDst.setLocation (x, y);
26669 return ptDst;
26670 }
26671 }, "java.awt.geom.Point2D,java.awt.geom.Point2D");
26672 Clazz_defineMethod (c$, "deltaTransform", 
26673 function (srcPts, srcOff, dstPts, dstOff, numPts) {
26674 var M00;
26675 var M01;
26676 var M10;
26677 var M11;
26678 if (dstPts === srcPts && dstOff > srcOff && dstOff < srcOff + numPts * 2) {
26679 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26680 srcOff = dstOff;
26681 }switch (this.state) {
26682 default:
26683 this.stateError ();
26684 case (7):
26685 case (6):
26686 M00 = this.m00;
26687 M01 = this.m01;
26688 M10 = this.m10;
26689 M11 = this.m11;
26690 while (--numPts >= 0) {
26691 var x = srcPts[srcOff++];
26692 var y = srcPts[srcOff++];
26693 dstPts[dstOff++] = x * M00 + y * M01;
26694 dstPts[dstOff++] = x * M10 + y * M11;
26695 }
26696 return;
26697 case (5):
26698 case (4):
26699 M01 = this.m01;
26700 M10 = this.m10;
26701 while (--numPts >= 0) {
26702 var x = srcPts[srcOff++];
26703 dstPts[dstOff++] = srcPts[srcOff++] * M01;
26704 dstPts[dstOff++] = x * M10;
26705 }
26706 return;
26707 case (3):
26708 case (2):
26709 M00 = this.m00;
26710 M11 = this.m11;
26711 while (--numPts >= 0) {
26712 dstPts[dstOff++] = srcPts[srcOff++] * M00;
26713 dstPts[dstOff++] = srcPts[srcOff++] * M11;
26714 }
26715 return;
26716 case (1):
26717 case (0):
26718 if (srcPts !== dstPts || srcOff != dstOff) {
26719 System.arraycopy (srcPts, srcOff, dstPts, dstOff, numPts * 2);
26720 }return;
26721 }
26722 }, "~A,~N,~A,~N,~N");
26723 Clazz_defineMethod (c$, "createTransformedShape", 
26724 function (pSrc) {
26725 if (pSrc == null) {
26726 return null;
26727 }return  new java.awt.geom.Path2D.Double (pSrc, this);
26728 }, "java.awt.Shape");
26729 c$._matround = Clazz_defineMethod (c$, "_matround", 
26730  function (matval) {
26731 return Math.rint (matval * 1E15) / 1E15;
26732 }, "~N");
26733 Clazz_overrideMethod (c$, "toString", 
26734 function () {
26735 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) + "]]");
26736 });
26737 Clazz_defineMethod (c$, "isIdentity", 
26738 function () {
26739 return (this.state == 0 || (this.getType () == 0));
26740 });
26741 Clazz_defineMethod (c$, "clone", 
26742 function () {
26743 try {
26744 return Clazz_superCall (this, java.awt.geom.AffineTransform, "clone", []);
26745 } catch (e) {
26746 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
26747 throw  new InternalError ();
26748 } else {
26749 throw e;
26750 }
26751 }
26752 });
26753 Clazz_overrideMethod (c$, "hashCode", 
26754 function () {
26755 var bits = Double.doubleToLongBits (this.m00);
26756 bits = bits * 31 + Double.doubleToLongBits (this.m01);
26757 bits = bits * 31 + Double.doubleToLongBits (this.m02);
26758 bits = bits * 31 + Double.doubleToLongBits (this.m10);
26759 bits = bits * 31 + Double.doubleToLongBits (this.m11);
26760 bits = bits * 31 + Double.doubleToLongBits (this.m12);
26761 return ((bits) ^ ((bits >> 32)));
26762 });
26763 Clazz_overrideMethod (c$, "equals", 
26764 function (obj) {
26765 if (!(Clazz_instanceOf (obj, java.awt.geom.AffineTransform))) {
26766 return false;
26767 }var a = obj;
26768 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));
26769 }, "~O");
26770 Clazz_defineStatics (c$,
26771 "TYPE_UNKNOWN", -1,
26772 "TYPE_IDENTITY", 0,
26773 "TYPE_TRANSLATION", 1,
26774 "TYPE_UNIFORM_SCALE", 2,
26775 "TYPE_GENERAL_SCALE", 4,
26776 "TYPE_MASK_SCALE", (6),
26777 "TYPE_FLIP", 64,
26778 "TYPE_QUADRANT_ROTATION", 8,
26779 "TYPE_GENERAL_ROTATION", 16,
26780 "TYPE_MASK_ROTATION", (24),
26781 "TYPE_GENERAL_TRANSFORM", 32,
26782 "APPLY_IDENTITY", 0,
26783 "APPLY_TRANSLATE", 1,
26784 "APPLY_SCALE", 2,
26785 "APPLY_SHEAR", 4,
26786 "HI_SHIFT", 3,
26787 "HI_IDENTITY", 0,
26788 "HI_TRANSLATE", 8,
26789 "HI_SCALE", 16,
26790 "HI_SHEAR", 32,
26791 "rot90conversion",  Clazz_newIntArray (-1, [4, 5, 4, 5, 2, 3, 6, 7]));
26792 });
26793 Clazz_declarePackage ("java.awt.geom");
26794 Clazz_load (["java.lang.Exception"], "java.awt.geom.NoninvertibleTransformException", null, function () {
26795 c$ = Clazz_declareType (java.awt.geom, "NoninvertibleTransformException", Exception);
26796 });
26797 Clazz_declarePackage ("java.awt.geom");
26798 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 () {
26799 c$ = Clazz_decorateAsClass (function () {
26800 this.pointTypes = null;
26801 this.numTypes = 0;
26802 this.numCoords = 0;
26803 this.windingRule = 0;
26804 Clazz_instantialize (this, arguments);
26805 }, java.awt.geom, "Path2D", null, [java.awt.Shape, Cloneable]);
26806 Clazz_makeConstructor (c$, 
26807 function () {
26808 });
26809 Clazz_makeConstructor (c$, 
26810 function (rule, initialTypes) {
26811 this.setWindingRule (rule);
26812 this.pointTypes =  Clazz_newByteArray (initialTypes, 0);
26813 }, "~N,~N");
26814 Clazz_defineMethod (c$, "closePath", 
26815 function () {
26816 if (this.numTypes == 0 || this.pointTypes[this.numTypes - 1] != 4) {
26817 this.needRoom (true, 0);
26818 this.pointTypes[this.numTypes++] = 4;
26819 }});
26820 Clazz_defineMethod (c$, "append", 
26821 function (s, connect) {
26822 this.append (s.getPathIterator (null), connect);
26823 }, "java.awt.Shape,~B");
26824 Clazz_defineMethod (c$, "getWindingRule", 
26825 function () {
26826 return this.windingRule;
26827 });
26828 Clazz_defineMethod (c$, "setWindingRule", 
26829 function (rule) {
26830 if (rule != 0 && rule != 1) {
26831 throw  new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
26832 }this.windingRule = rule;
26833 }, "~N");
26834 Clazz_defineMethod (c$, "getCurrentPoint", 
26835 function () {
26836 var index = this.numCoords;
26837 if (this.numTypes < 1 || index < 1) {
26838 return null;
26839 }if (this.pointTypes[this.numTypes - 1] == 4) {
26840 loop : for (var i = this.numTypes - 2; i > 0; i--) {
26841 switch (this.pointTypes[i]) {
26842 case 0:
26843 break loop;
26844 case 1:
26845 index -= 2;
26846 break;
26847 case 2:
26848 index -= 4;
26849 break;
26850 case 3:
26851 index -= 6;
26852 break;
26853 case 4:
26854 break;
26855 }
26856 }
26857 }return this.getPoint (index - 2);
26858 });
26859 Clazz_defineMethod (c$, "reset", 
26860 function () {
26861 this.numTypes = this.numCoords = 0;
26862 });
26863 Clazz_defineMethod (c$, "createTransformedShape", 
26864 function (at) {
26865 var p2d = this.clone ();
26866 if (at != null) {
26867 p2d.transform (at);
26868 }return p2d;
26869 }, "java.awt.geom.AffineTransform");
26870 Clazz_overrideMethod (c$, "getBounds", 
26871 function () {
26872 return this.getBounds2D ().getBounds ();
26873 });
26874 c$.contains = Clazz_defineMethod (c$, "contains", 
26875 function (pi, x, y) {
26876 if (x * 0.0 + y * 0.0 == 0.0) {
26877 var mask = (pi.getWindingRule () == 1 ? -1 : 1);
26878 var cross = jssun.awt.geom.Curve.pointCrossingsForPath (pi, x, y);
26879 return ((cross & mask) != 0);
26880 } else {
26881 return false;
26882 }}, "java.awt.geom.PathIterator,~N,~N");
26883 c$.contains = Clazz_defineMethod (c$, "contains", 
26884 function (pi, p) {
26885 return java.awt.geom.Path2D.contains (pi, p.getX (), p.getY ());
26886 }, "java.awt.geom.PathIterator,java.awt.geom.Point2D");
26887 Clazz_defineMethod (c$, "contains", 
26888 function (x, y) {
26889 if (x * 0.0 + y * 0.0 == 0.0) {
26890 if (this.numTypes < 2) {
26891 return false;
26892 }var mask = (this.windingRule == 1 ? -1 : 1);
26893 return ((this.pointCrossings (x, y) & mask) != 0);
26894 } else {
26895 return false;
26896 }}, "~N,~N");
26897 Clazz_defineMethod (c$, "contains", 
26898 function (p) {
26899 return this.contains (p.getX (), p.getY ());
26900 }, "java.awt.geom.Point2D");
26901 c$.contains = Clazz_defineMethod (c$, "contains", 
26902 function (pi, x, y, w, h) {
26903 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26904 return false;
26905 }if (w <= 0 || h <= 0) {
26906 return false;
26907 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26908 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26909 return (crossings != -2147483648 && (crossings & mask) != 0);
26910 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
26911 c$.contains = Clazz_defineMethod (c$, "contains", 
26912 function (pi, r) {
26913 return java.awt.geom.Path2D.contains (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26914 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
26915 Clazz_defineMethod (c$, "contains", 
26916 function (x, y, w, h) {
26917 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26918 return false;
26919 }if (w <= 0 || h <= 0) {
26920 return false;
26921 }var mask = (this.windingRule == 1 ? -1 : 2);
26922 var crossings = this.rectCrossings (x, y, x + w, y + h);
26923 return (crossings != -2147483648 && (crossings & mask) != 0);
26924 }, "~N,~N,~N,~N");
26925 Clazz_defineMethod (c$, "contains", 
26926 function (r) {
26927 return this.contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26928 }, "java.awt.geom.Rectangle2D");
26929 c$.intersects = Clazz_defineMethod (c$, "intersects", 
26930 function (pi, x, y, w, h) {
26931 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26932 return false;
26933 }if (w <= 0 || h <= 0) {
26934 return false;
26935 }var mask = (pi.getWindingRule () == 1 ? -1 : 2);
26936 var crossings = jssun.awt.geom.Curve.rectCrossingsForPath (pi, x, y, x + w, y + h);
26937 return (crossings == -2147483648 || (crossings & mask) != 0);
26938 }, "java.awt.geom.PathIterator,~N,~N,~N,~N");
26939 c$.intersects = Clazz_defineMethod (c$, "intersects", 
26940 function (pi, r) {
26941 return java.awt.geom.Path2D.intersects (pi, r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26942 }, "java.awt.geom.PathIterator,java.awt.geom.Rectangle2D");
26943 Clazz_defineMethod (c$, "intersects", 
26944 function (x, y, w, h) {
26945 if (java.lang.Double.isNaN (x + w) || java.lang.Double.isNaN (y + h)) {
26946 return false;
26947 }if (w <= 0 || h <= 0) {
26948 return false;
26949 }var mask = (this.windingRule == 1 ? -1 : 2);
26950 var crossings = this.rectCrossings (x, y, x + w, y + h);
26951 return (crossings == -2147483648 || (crossings & mask) != 0);
26952 }, "~N,~N,~N,~N");
26953 Clazz_defineMethod (c$, "intersects", 
26954 function (r) {
26955 return this.intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
26956 }, "java.awt.geom.Rectangle2D");
26957 Clazz_overrideMethod (c$, "getPathIterator", 
26958 function (at, flatness) {
26959 return  new java.awt.geom.FlatteningPathIterator (this.getPathIterator (at), flatness);
26960 }, "java.awt.geom.AffineTransform,~N");
26961 Clazz_pu$h(self.c$);
26962 c$ = Clazz_decorateAsClass (function () {
26963 this.typeIdx = 0;
26964 this.pointIdx = 0;
26965 this.path = null;
26966 Clazz_instantialize (this, arguments);
26967 }, java.awt.geom.Path2D, "Iterator", null, java.awt.geom.PathIterator);
26968 Clazz_makeConstructor (c$, 
26969 function (a) {
26970 this.path = a;
26971 }, "java.awt.geom.Path2D");
26972 Clazz_overrideMethod (c$, "getWindingRule", 
26973 function () {
26974 return this.path.getWindingRule ();
26975 });
26976 Clazz_overrideMethod (c$, "isDone", 
26977 function () {
26978 return (this.typeIdx >= this.path.numTypes);
26979 });
26980 Clazz_overrideMethod (c$, "next", 
26981 function () {
26982 var a = this.path.pointTypes[this.typeIdx++];
26983 this.pointIdx += java.awt.geom.Path2D.Iterator.curvecoords[a];
26984 });
26985 Clazz_defineStatics (c$,
26986 "curvecoords",  Clazz_newIntArray (-1, [2, 2, 4, 6, 0]));
26987 c$ = Clazz_p0p ();
26988 Clazz_pu$h(self.c$);
26989 c$ = Clazz_decorateAsClass (function () {
26990 this.floatCoords = null;
26991 Clazz_instantialize (this, arguments);
26992 }, java.awt.geom.Path2D, "Float", java.awt.geom.Path2D);
26993 Clazz_makeConstructor (c$, 
26994 function () {
26995 this.construct (1, 20);
26996 });
26997 Clazz_makeConstructor (c$, 
26998 function (a) {
26999 this.construct (a, 20);
27000 }, "~N");
27001 Clazz_makeConstructor (c$, 
27002 function (a, b) {
27003 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27004 this.setWindingRule (a);
27005 this.pointTypes =  Clazz_newByteArray (b, 0);
27006 this.floatCoords =  Clazz_newFloatArray (b * 2, 0);
27007 }, "~N,~N");
27008 Clazz_makeConstructor (c$, 
27009 function (a) {
27010 this.construct (a, null);
27011 }, "java.awt.Shape");
27012 Clazz_makeConstructor (c$, 
27013 function (a, b) {
27014 Clazz_superConstructor (this, java.awt.geom.Path2D.Float, []);
27015 this.setPath (a, b);
27016 }, "java.awt.Shape,java.awt.geom.AffineTransform");
27017 Clazz_defineMethod (c$, "setPath", 
27018  function (a, b) {
27019 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27020 var c = a;
27021 this.setWindingRule (c.windingRule);
27022 this.numTypes = c.numTypes;
27023 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27024 this.numCoords = c.numCoords;
27025 this.floatCoords = c.cloneCoordsFloat (b);
27026 } else {
27027 var c = a.getPathIterator (b);
27028 this.setWindingRule (c.getWindingRule ());
27029 this.pointTypes =  Clazz_newByteArray (20, 0);
27030 this.floatCoords =  Clazz_newFloatArray (40, 0);
27031 this.append (c, false);
27032 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27033 Clazz_defineMethod (c$, "cloneCoordsFloat", 
27034 function (a) {
27035 var b;
27036 if (a == null) {
27037 b = java.util.Arrays.copyOf (this.floatCoords, this.floatCoords.length);
27038 } else {
27039 b =  Clazz_newFloatArray (this.floatCoords.length, 0);
27040 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27041 }return b;
27042 }, "java.awt.geom.AffineTransform");
27043 Clazz_overrideMethod (c$, "cloneCoordsDouble", 
27044 function (a) {
27045 var b =  Clazz_newDoubleArray (this.floatCoords.length, 0);
27046 if (a == null) {
27047 for (var c = 0; c < this.numCoords; c++) {
27048 b[c] = this.floatCoords[c];
27049 }
27050 } else {
27051 a.transform (this.floatCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27052 }return b;
27053 }, "java.awt.geom.AffineTransform");
27054 Clazz_defineMethod (c$, "append", 
27055 function (a, b) {
27056 {
27057 if (typeof pi == "number") {
27058 this.floatCoords[this.numCoords++] = pi;
27059 this.floatCoords[this.numCoords++] = connect;
27060 return;
27061 }
27062 }var c =  Clazz_newFloatArray (6, 0);
27063 while (!a.isDone ()) {
27064 switch (a.currentSegment (c)) {
27065 case 0:
27066 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27067 this.moveTo (c[0], c[1]);
27068 break;
27069 }if (this.pointTypes[this.numTypes - 1] != 4 && this.floatCoords[this.numCoords - 2] == c[0] && this.floatCoords[this.numCoords - 1] == c[1]) {
27070 break;
27071 }case 1:
27072 this.lineTo (c[0], c[1]);
27073 break;
27074 case 2:
27075 this.quadTo (c[0], c[1], c[2], c[3]);
27076 break;
27077 case 3:
27078 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27079 break;
27080 case 4:
27081 this.closePath ();
27082 break;
27083 }
27084 a.next ();
27085 b = false;
27086 }
27087 }, "java.awt.geom.PathIterator,~B");
27088 Clazz_overrideMethod (c$, "getPoint", 
27089 function (a) {
27090 return  new java.awt.geom.Point2D.Float (this.floatCoords[a], this.floatCoords[a + 1]);
27091 }, "~N");
27092 Clazz_overrideMethod (c$, "needRoom", 
27093 function (a, b) {
27094 if (a && this.numTypes == 0) {
27095 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27096 }var c = this.pointTypes.length;
27097 if (this.numTypes >= c) {
27098 var d = c;
27099 if (d > 500) {
27100 d = 500;
27101 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27102 }c = this.floatCoords.length;
27103 if (this.numCoords + b > c) {
27104 var d = c;
27105 if (d > 1000) {
27106 d = 1000;
27107 }if (d < b) {
27108 d = b;
27109 }this.floatCoords = java.util.Arrays.copyOf (this.floatCoords, c + d);
27110 }}, "~B,~N");
27111 Clazz_defineMethod (c$, "moveTo", 
27112 function (a, b) {
27113 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27114 this.floatCoords[this.numCoords - 2] = a;
27115 this.floatCoords[this.numCoords - 1] = b;
27116 } else {
27117 this.needRoom (false, 2);
27118 this.pointTypes[this.numTypes++] = 0;
27119 this.floatCoords[this.numCoords++] = a;
27120 this.floatCoords[this.numCoords++] = b;
27121 }}, "~N,~N");
27122 Clazz_defineMethod (c$, "moveTo", 
27123 function (a, b) {
27124 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27125 this.floatCoords[this.numCoords - 2] = a;
27126 this.floatCoords[this.numCoords - 1] = b;
27127 } else {
27128 this.needRoom (false, 2);
27129 this.pointTypes[this.numTypes++] = 0;
27130 this.floatCoords[this.numCoords++] = a;
27131 this.floatCoords[this.numCoords++] = b;
27132 }}, "~N,~N");
27133 Clazz_defineMethod (c$, "lineTo", 
27134 function (a, b) {
27135 this.needRoom (true, 2);
27136 this.pointTypes[this.numTypes++] = 1;
27137 this.floatCoords[this.numCoords++] = a;
27138 this.floatCoords[this.numCoords++] = b;
27139 }, "~N,~N");
27140 Clazz_defineMethod (c$, "lineTo", 
27141 function (a, b) {
27142 this.needRoom (true, 2);
27143 this.pointTypes[this.numTypes++] = 1;
27144 this.floatCoords[this.numCoords++] = a;
27145 this.floatCoords[this.numCoords++] = b;
27146 }, "~N,~N");
27147 Clazz_defineMethod (c$, "quadTo", 
27148 function (a, b, c, d) {
27149 this.needRoom (true, 4);
27150 this.pointTypes[this.numTypes++] = 2;
27151 this.floatCoords[this.numCoords++] = a;
27152 this.floatCoords[this.numCoords++] = b;
27153 this.floatCoords[this.numCoords++] = c;
27154 this.floatCoords[this.numCoords++] = d;
27155 }, "~N,~N,~N,~N");
27156 Clazz_defineMethod (c$, "quadTo", 
27157 function (a, b, c, d) {
27158 this.needRoom (true, 4);
27159 this.pointTypes[this.numTypes++] = 2;
27160 this.floatCoords[this.numCoords++] = a;
27161 this.floatCoords[this.numCoords++] = b;
27162 this.floatCoords[this.numCoords++] = c;
27163 this.floatCoords[this.numCoords++] = d;
27164 }, "~N,~N,~N,~N");
27165 Clazz_defineMethod (c$, "curveTo", 
27166 function (a, b, c, d, e, f) {
27167 this.needRoom (true, 6);
27168 this.pointTypes[this.numTypes++] = 3;
27169 this.floatCoords[this.numCoords++] = a;
27170 this.floatCoords[this.numCoords++] = b;
27171 this.floatCoords[this.numCoords++] = c;
27172 this.floatCoords[this.numCoords++] = d;
27173 this.floatCoords[this.numCoords++] = e;
27174 this.floatCoords[this.numCoords++] = f;
27175 }, "~N,~N,~N,~N,~N,~N");
27176 Clazz_defineMethod (c$, "curveTo", 
27177 function (a, b, c, d, e, f) {
27178 this.needRoom (true, 6);
27179 this.pointTypes[this.numTypes++] = 3;
27180 this.floatCoords[this.numCoords++] = a;
27181 this.floatCoords[this.numCoords++] = b;
27182 this.floatCoords[this.numCoords++] = c;
27183 this.floatCoords[this.numCoords++] = d;
27184 this.floatCoords[this.numCoords++] = e;
27185 this.floatCoords[this.numCoords++] = f;
27186 }, "~N,~N,~N,~N,~N,~N");
27187 Clazz_overrideMethod (c$, "pointCrossings", 
27188 function (a, b) {
27189 var c;
27190 var d;
27191 var e;
27192 var f;
27193 var g;
27194 var h;
27195 var i = this.floatCoords;
27196 e = c = i[0];
27197 f = d = i[1];
27198 var j = 0;
27199 var k = 2;
27200 for (var l = 1; l < this.numTypes; l++) {
27201 switch (this.pointTypes[l]) {
27202 case 0:
27203 if (f != d) {
27204 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27205 }c = e = i[k++];
27206 d = f = i[k++];
27207 break;
27208 case 1:
27209 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27210 e = g;
27211 f = h;
27212 break;
27213 case 2:
27214 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27215 e = g;
27216 f = h;
27217 break;
27218 case 3:
27219 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);
27220 e = g;
27221 f = h;
27222 break;
27223 case 4:
27224 if (f != d) {
27225 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27226 }e = c;
27227 f = d;
27228 break;
27229 }
27230 }
27231 if (f != d) {
27232 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27233 }return j;
27234 }, "~N,~N");
27235 Clazz_overrideMethod (c$, "rectCrossings", 
27236 function (a, b, c, d) {
27237 var e = this.floatCoords;
27238 var f;
27239 var g;
27240 var h;
27241 var i;
27242 var j;
27243 var k;
27244 f = h = e[0];
27245 g = i = e[1];
27246 var l = 0;
27247 var m = 2;
27248 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27249 switch (this.pointTypes[n]) {
27250 case 0:
27251 if (f != h || g != i) {
27252 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27253 }h = f = e[m++];
27254 i = g = e[m++];
27255 break;
27256 case 1:
27257 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j = e[m++], k = e[m++]);
27258 f = j;
27259 g = k;
27260 break;
27261 case 2:
27262 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27263 f = j;
27264 g = k;
27265 break;
27266 case 3:
27267 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);
27268 f = j;
27269 g = k;
27270 break;
27271 case 4:
27272 if (f != h || g != i) {
27273 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27274 }f = h;
27275 g = i;
27276 break;
27277 }
27278 }
27279 if (l != -2147483648 && (f != h || g != i)) {
27280 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27281 }return l;
27282 }, "~N,~N,~N,~N");
27283 Clazz_overrideMethod (c$, "transform", 
27284 function (a) {
27285 a.transform (this.floatCoords, 0, this.floatCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27286 }, "java.awt.geom.AffineTransform");
27287 Clazz_overrideMethod (c$, "getBounds2D", 
27288 function () {
27289 var a;
27290 var b;
27291 var c;
27292 var d;
27293 var e = this.numCoords;
27294 if (e > 0) {
27295 b = d = this.floatCoords[--e];
27296 a = c = this.floatCoords[--e];
27297 while (e > 0) {
27298 var f = this.floatCoords[--e];
27299 var g = this.floatCoords[--e];
27300 if (g < a) a = g;
27301 if (f < b) b = f;
27302 if (g > c) c = g;
27303 if (f > d) d = f;
27304 }
27305 } else {
27306 a = b = c = d = 0.0;
27307 }return  new java.awt.geom.Rectangle2D.Float (a, b, c - a, d - b);
27308 });
27309 Clazz_defineMethod (c$, "getPathIterator", 
27310 function (a) {
27311 if (a == null) {
27312 return  new java.awt.geom.Path2D.Float.CopyIterator (this);
27313 } else {
27314 return  new java.awt.geom.Path2D.Float.TxIterator (this, a);
27315 }}, "java.awt.geom.AffineTransform");
27316 Clazz_overrideMethod (c$, "clone", 
27317 function () {
27318 return  new java.awt.geom.Path2D.Float (this);
27319 });
27320 Clazz_pu$h(self.c$);
27321 c$ = Clazz_decorateAsClass (function () {
27322 this.floatCoords = null;
27323 Clazz_instantialize (this, arguments);
27324 }, java.awt.geom.Path2D.Float, "CopyIterator", java.awt.geom.Path2D.Iterator);
27325 Clazz_makeConstructor (c$, 
27326 function (a) {
27327 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.CopyIterator, [a]);
27328 this.floatCoords = a.floatCoords;
27329 }, "java.awt.geom.Path2D.Float");
27330 Clazz_defineMethod (c$, "currentSegment", 
27331 function (a) {
27332 var b = this.path.pointTypes[this.typeIdx];
27333 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27334 if (c > 0) {
27335 for (var d = 0; d < c; d++) {
27336 a[d] = this.floatCoords[this.pointIdx + d];
27337 }
27338 }return b;
27339 }, "~A");
27340 c$ = Clazz_p0p ();
27341 Clazz_pu$h(self.c$);
27342 c$ = Clazz_decorateAsClass (function () {
27343 this.floatCoords = null;
27344 this.affine = null;
27345 Clazz_instantialize (this, arguments);
27346 }, java.awt.geom.Path2D.Float, "TxIterator", java.awt.geom.Path2D.Iterator);
27347 Clazz_makeConstructor (c$, 
27348 function (a, b) {
27349 Clazz_superConstructor (this, java.awt.geom.Path2D.Float.TxIterator, [a]);
27350 this.floatCoords = a.floatCoords;
27351 this.affine = b;
27352 }, "java.awt.geom.Path2D.Float,java.awt.geom.AffineTransform");
27353 Clazz_defineMethod (c$, "currentSegment", 
27354 function (a) {
27355 var b = this.path.pointTypes[this.typeIdx];
27356 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27357 if (c > 0) {
27358 this.affine.transform (this.floatCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27359 }return b;
27360 }, "~A");
27361 c$ = Clazz_p0p ();
27362 c$ = Clazz_p0p ();
27363 Clazz_pu$h(self.c$);
27364 c$ = Clazz_decorateAsClass (function () {
27365 this.doubleCoords = null;
27366 Clazz_instantialize (this, arguments);
27367 }, java.awt.geom.Path2D, "Double", java.awt.geom.Path2D);
27368 Clazz_makeConstructor (c$, 
27369 function () {
27370 this.construct (1, 20);
27371 });
27372 Clazz_makeConstructor (c$, 
27373 function (a) {
27374 this.construct (a, 20);
27375 }, "~N");
27376 Clazz_makeConstructor (c$, 
27377 function (a, b) {
27378 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, [a, b]);
27379 this.doubleCoords =  Clazz_newDoubleArray (b * 2, 0);
27380 }, "~N,~N");
27381 Clazz_makeConstructor (c$, 
27382 function (a) {
27383 this.construct (a, null);
27384 }, "java.awt.Shape");
27385 Clazz_makeConstructor (c$, 
27386 function (a, b) {
27387 Clazz_superConstructor (this, java.awt.geom.Path2D.Double, []);
27388 if (Clazz_instanceOf (a, java.awt.geom.Path2D)) {
27389 var c = a;
27390 this.setWindingRule (c.windingRule);
27391 this.numTypes = c.numTypes;
27392 this.pointTypes = java.util.Arrays.copyOf (c.pointTypes, c.pointTypes.length);
27393 this.numCoords = c.numCoords;
27394 this.doubleCoords = c.cloneCoordsDouble (b);
27395 } else {
27396 var c = a.getPathIterator (b);
27397 this.setWindingRule (c.getWindingRule ());
27398 this.pointTypes =  Clazz_newByteArray (20, 0);
27399 this.doubleCoords =  Clazz_newDoubleArray (40, 0);
27400 this.append (c, false);
27401 }}, "java.awt.Shape,java.awt.geom.AffineTransform");
27402 Clazz_overrideMethod (c$, "cloneCoordsFloat", 
27403 function (a) {
27404 var b =  Clazz_newFloatArray (this.doubleCoords.length, 0);
27405 if (a == null) {
27406 for (var c = 0; c < this.numCoords; c++) {
27407 b[c] = this.doubleCoords[c];
27408 }
27409 } else {
27410 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27411 }return b;
27412 }, "java.awt.geom.AffineTransform");
27413 Clazz_defineMethod (c$, "cloneCoordsDouble", 
27414 function (a) {
27415 var b;
27416 if (a == null) {
27417 b = java.util.Arrays.copyOf (this.doubleCoords, this.doubleCoords.length);
27418 } else {
27419 b =  Clazz_newDoubleArray (this.doubleCoords.length, 0);
27420 a.transform (this.doubleCoords, 0, b, 0, Clazz_doubleToInt (this.numCoords / 2));
27421 }return b;
27422 }, "java.awt.geom.AffineTransform");
27423 Clazz_defineMethod (c$, "append", 
27424 function (a, b) {
27425 {
27426 if (typeof pi == "number") {
27427 this.floatCoords[this.numCoords++] = pi;
27428 this.floatCoords[this.numCoords++] = connect;
27429 return;
27430 }
27431 }var c =  Clazz_newDoubleArray (6, 0);
27432 while (!a.isDone ()) {
27433 switch (a.currentSegment (c)) {
27434 case 0:
27435 if (!b || this.numTypes < 1 || this.numCoords < 1) {
27436 this.moveTo (c[0], c[1]);
27437 break;
27438 }if (this.pointTypes[this.numTypes - 1] != 4 && this.doubleCoords[this.numCoords - 2] == c[0] && this.doubleCoords[this.numCoords - 1] == c[1]) {
27439 break;
27440 }case 1:
27441 this.lineTo (c[0], c[1]);
27442 break;
27443 case 2:
27444 this.quadTo (c[0], c[1], c[2], c[3]);
27445 break;
27446 case 3:
27447 this.curveTo (c[0], c[1], c[2], c[3], c[4], c[5]);
27448 break;
27449 case 4:
27450 this.closePath ();
27451 break;
27452 }
27453 a.next ();
27454 b = false;
27455 }
27456 }, "java.awt.geom.PathIterator,~B");
27457 Clazz_overrideMethod (c$, "getPoint", 
27458 function (a) {
27459 return  new java.awt.geom.Point2D.Double (this.doubleCoords[a], this.doubleCoords[a + 1]);
27460 }, "~N");
27461 Clazz_overrideMethod (c$, "needRoom", 
27462 function (a, b) {
27463 if (a && this.numTypes == 0) {
27464 throw  new java.awt.geom.IllegalPathStateException ("missing initial moveto in path definition");
27465 }var c = this.pointTypes.length;
27466 if (this.numTypes >= c) {
27467 var d = c;
27468 if (d > 500) {
27469 d = 500;
27470 }this.pointTypes = java.util.Arrays.copyOf (this.pointTypes, c + d);
27471 }c = this.doubleCoords.length;
27472 if (this.numCoords + b > c) {
27473 var d = c;
27474 if (d > 1000) {
27475 d = 1000;
27476 }if (d < b) {
27477 d = b;
27478 }this.doubleCoords = java.util.Arrays.copyOf (this.doubleCoords, c + d);
27479 }}, "~B,~N");
27480 Clazz_overrideMethod (c$, "moveTo", 
27481 function (a, b) {
27482 if (this.numTypes > 0 && this.pointTypes[this.numTypes - 1] == 0) {
27483 this.doubleCoords[this.numCoords - 2] = a;
27484 this.doubleCoords[this.numCoords - 1] = b;
27485 } else {
27486 this.needRoom (false, 2);
27487 this.pointTypes[this.numTypes++] = 0;
27488 this.doubleCoords[this.numCoords++] = a;
27489 this.doubleCoords[this.numCoords++] = b;
27490 }}, "~N,~N");
27491 Clazz_overrideMethod (c$, "lineTo", 
27492 function (a, b) {
27493 this.needRoom (true, 2);
27494 this.pointTypes[this.numTypes++] = 1;
27495 this.doubleCoords[this.numCoords++] = a;
27496 this.doubleCoords[this.numCoords++] = b;
27497 }, "~N,~N");
27498 Clazz_overrideMethod (c$, "quadTo", 
27499 function (a, b, c, d) {
27500 this.needRoom (true, 4);
27501 this.pointTypes[this.numTypes++] = 2;
27502 this.doubleCoords[this.numCoords++] = a;
27503 this.doubleCoords[this.numCoords++] = b;
27504 this.doubleCoords[this.numCoords++] = c;
27505 this.doubleCoords[this.numCoords++] = d;
27506 }, "~N,~N,~N,~N");
27507 Clazz_overrideMethod (c$, "curveTo", 
27508 function (a, b, c, d, e, f) {
27509 this.needRoom (true, 6);
27510 this.pointTypes[this.numTypes++] = 3;
27511 this.doubleCoords[this.numCoords++] = a;
27512 this.doubleCoords[this.numCoords++] = b;
27513 this.doubleCoords[this.numCoords++] = c;
27514 this.doubleCoords[this.numCoords++] = d;
27515 this.doubleCoords[this.numCoords++] = e;
27516 this.doubleCoords[this.numCoords++] = f;
27517 }, "~N,~N,~N,~N,~N,~N");
27518 Clazz_overrideMethod (c$, "pointCrossings", 
27519 function (a, b) {
27520 var c;
27521 var d;
27522 var e;
27523 var f;
27524 var g;
27525 var h;
27526 var i = this.doubleCoords;
27527 e = c = i[0];
27528 f = d = i[1];
27529 var j = 0;
27530 var k = 2;
27531 for (var l = 1; l < this.numTypes; l++) {
27532 switch (this.pointTypes[l]) {
27533 case 0:
27534 if (f != d) {
27535 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27536 }c = e = i[k++];
27537 d = f = i[k++];
27538 break;
27539 case 1:
27540 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, g = i[k++], h = i[k++]);
27541 e = g;
27542 f = h;
27543 break;
27544 case 2:
27545 j += jssun.awt.geom.Curve.pointCrossingsForQuad (a, b, e, f, i[k++], i[k++], g = i[k++], h = i[k++], 0);
27546 e = g;
27547 f = h;
27548 break;
27549 case 3:
27550 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);
27551 e = g;
27552 f = h;
27553 break;
27554 case 4:
27555 if (f != d) {
27556 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27557 }e = c;
27558 f = d;
27559 break;
27560 }
27561 }
27562 if (f != d) {
27563 j += jssun.awt.geom.Curve.pointCrossingsForLine (a, b, e, f, c, d);
27564 }return j;
27565 }, "~N,~N");
27566 Clazz_overrideMethod (c$, "rectCrossings", 
27567 function (a, b, c, d) {
27568 var e = this.doubleCoords;
27569 var f;
27570 var g;
27571 var h;
27572 var i;
27573 var j;
27574 var k;
27575 f = h = e[0];
27576 g = i = e[1];
27577 var l = 0;
27578 var m = 2;
27579 for (var n = 1; l != -2147483648 && n < this.numTypes; n++) {
27580 switch (this.pointTypes[n]) {
27581 case 0:
27582 if (f != h || g != i) {
27583 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27584 }h = f = e[m++];
27585 i = g = e[m++];
27586 break;
27587 case 1:
27588 j = e[m++];
27589 k = e[m++];
27590 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, j, k);
27591 f = j;
27592 g = k;
27593 break;
27594 case 2:
27595 l = jssun.awt.geom.Curve.rectCrossingsForQuad (l, a, b, c, d, f, g, e[m++], e[m++], j = e[m++], k = e[m++], 0);
27596 f = j;
27597 g = k;
27598 break;
27599 case 3:
27600 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);
27601 f = j;
27602 g = k;
27603 break;
27604 case 4:
27605 if (f != h || g != i) {
27606 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27607 }f = h;
27608 g = i;
27609 break;
27610 }
27611 }
27612 if (l != -2147483648 && (f != h || g != i)) {
27613 l = jssun.awt.geom.Curve.rectCrossingsForLine (l, a, b, c, d, f, g, h, i);
27614 }return l;
27615 }, "~N,~N,~N,~N");
27616 Clazz_overrideMethod (c$, "transform", 
27617 function (a) {
27618 a.transform (this.doubleCoords, 0, this.doubleCoords, 0, Clazz_doubleToInt (this.numCoords / 2));
27619 }, "java.awt.geom.AffineTransform");
27620 Clazz_overrideMethod (c$, "getBounds2D", 
27621 function () {
27622 var a;
27623 var b;
27624 var c;
27625 var d;
27626 var e = this.numCoords;
27627 if (e > 0) {
27628 b = d = this.doubleCoords[--e];
27629 a = c = this.doubleCoords[--e];
27630 while (e > 0) {
27631 var f = this.doubleCoords[--e];
27632 var g = this.doubleCoords[--e];
27633 if (g < a) a = g;
27634 if (f < b) b = f;
27635 if (g > c) c = g;
27636 if (f > d) d = f;
27637 }
27638 } else {
27639 a = b = c = d = 0.0;
27640 }return  new java.awt.geom.Rectangle2D.Double (a, b, c - a, d - b);
27641 });
27642 Clazz_defineMethod (c$, "getPathIterator", 
27643 function (a) {
27644 if (a == null) {
27645 return  new java.awt.geom.Path2D.Double.CopyIterator (this);
27646 } else {
27647 return  new java.awt.geom.Path2D.Double.TxIterator (this, a);
27648 }}, "java.awt.geom.AffineTransform");
27649 Clazz_overrideMethod (c$, "clone", 
27650 function () {
27651 return  new java.awt.geom.Path2D.Double (this);
27652 });
27653 Clazz_pu$h(self.c$);
27654 c$ = Clazz_decorateAsClass (function () {
27655 this.doubleCoords = null;
27656 Clazz_instantialize (this, arguments);
27657 }, java.awt.geom.Path2D.Double, "CopyIterator", java.awt.geom.Path2D.Iterator);
27658 Clazz_makeConstructor (c$, 
27659 function (a) {
27660 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.CopyIterator, [a]);
27661 this.doubleCoords = a.doubleCoords;
27662 }, "java.awt.geom.Path2D.Double");
27663 Clazz_defineMethod (c$, "currentSegment", 
27664 function (a) {
27665 var b = this.path.pointTypes[this.typeIdx];
27666 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27667 if (c > 0) {
27668 for (var d = 0; d < c; d++) {
27669 a[d] = this.doubleCoords[this.pointIdx + d];
27670 }
27671 }return b;
27672 }, "~A");
27673 Clazz_defineMethod (c$, "currentSegment", 
27674 function (a) {
27675 var b = this.path.pointTypes[this.typeIdx];
27676 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27677 if (c > 0) {
27678 System.arraycopy (this.doubleCoords, this.pointIdx, a, 0, c);
27679 }return b;
27680 }, "~A");
27681 c$ = Clazz_p0p ();
27682 Clazz_pu$h(self.c$);
27683 c$ = Clazz_decorateAsClass (function () {
27684 this.doubleCoords = null;
27685 this.affine = null;
27686 Clazz_instantialize (this, arguments);
27687 }, java.awt.geom.Path2D.Double, "TxIterator", java.awt.geom.Path2D.Iterator);
27688 Clazz_makeConstructor (c$, 
27689 function (a, b) {
27690 Clazz_superConstructor (this, java.awt.geom.Path2D.Double.TxIterator, [a]);
27691 this.doubleCoords = a.doubleCoords;
27692 this.affine = b;
27693 }, "java.awt.geom.Path2D.Double,java.awt.geom.AffineTransform");
27694 Clazz_defineMethod (c$, "currentSegment", 
27695 function (a) {
27696 var b = this.path.pointTypes[this.typeIdx];
27697 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27698 if (c > 0) {
27699 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27700 }return b;
27701 }, "~A");
27702 Clazz_defineMethod (c$, "currentSegment", 
27703 function (a) {
27704 var b = this.path.pointTypes[this.typeIdx];
27705 var c = java.awt.geom.Path2D.Iterator.curvecoords[b];
27706 if (c > 0) {
27707 this.affine.transform (this.doubleCoords, this.pointIdx, a, 0, Clazz_doubleToInt (c / 2));
27708 }return b;
27709 }, "~A");
27710 c$ = Clazz_p0p ();
27711 c$ = Clazz_p0p ();
27712 Clazz_defineStatics (c$,
27713 "WIND_EVEN_ODD", 0,
27714 "WIND_NON_ZERO", 1,
27715 "SEG_MOVETO", 0,
27716 "SEG_LINETO", 1,
27717 "SEG_QUADTO", 2,
27718 "SEG_CUBICTO", 3,
27719 "SEG_CLOSE", 4,
27720 "INIT_SIZE", 20,
27721 "EXPAND_MAX", 500);
27722 });
27723 Clazz_declarePackage ("javax.swing");
27724 Clazz_declareInterface (javax.swing, "Icon");
27725 Clazz_declarePackage ("javax.swing");
27726 Clazz_load (["javax.swing.JTextField"], "javax.swing.JPasswordField", ["javax.swing.text.Segment"], function () {
27727 c$ = Clazz_decorateAsClass (function () {
27728 this.echoChar = '\0';
27729 this.echoCharSet = false;
27730 Clazz_instantialize (this, arguments);
27731 }, javax.swing, "JPasswordField", javax.swing.JTextField);
27732 Clazz_makeConstructor (c$, 
27733 function () {
27734 this.construct (null, null, 0);
27735 });
27736 Clazz_makeConstructor (c$, 
27737 function (text) {
27738 this.construct (null, text, 0);
27739 }, "~S");
27740 Clazz_makeConstructor (c$, 
27741 function (columns) {
27742 this.construct (null, null, columns);
27743 }, "~N");
27744 Clazz_makeConstructor (c$, 
27745 function (text, columns) {
27746 this.construct (null, text, columns);
27747 }, "~S,~N");
27748 Clazz_overrideMethod (c$, "getUIClassID", 
27749 function () {
27750 return "PasswordFieldUI";
27751 });
27752 Clazz_defineMethod (c$, "updateUI", 
27753 function () {
27754 if (!this.echoCharSet) {
27755 this.echoChar = '*';
27756 }Clazz_superCall (this, javax.swing.JPasswordField, "updateUI", []);
27757 });
27758 Clazz_defineMethod (c$, "getEchoChar", 
27759 function () {
27760 return this.echoChar;
27761 });
27762 Clazz_defineMethod (c$, "setEchoChar", 
27763 function (c) {
27764 this.echoChar = c;
27765 this.echoCharSet = true;
27766 this.repaint ();
27767 this.revalidate ();
27768 }, "~S");
27769 Clazz_defineMethod (c$, "echoCharIsSet", 
27770 function () {
27771 return this.echoChar.charCodeAt (0) != 0;
27772 });
27773 Clazz_overrideMethod (c$, "cut", 
27774 function () {
27775 });
27776 Clazz_overrideMethod (c$, "copy", 
27777 function () {
27778 });
27779 Clazz_defineMethod (c$, "getPassword", 
27780 function () {
27781 var doc = this.getDocument ();
27782 var txt =  new javax.swing.text.Segment ();
27783 try {
27784 doc.getText (0, doc.getLength (), txt);
27785 } catch (e) {
27786 if (Clazz_exceptionOf (e, javax.swing.text.BadLocationException)) {
27787 return null;
27788 } else {
27789 throw e;
27790 }
27791 }
27792 var retValue =  Clazz_newCharArray (txt.count, '\0');
27793 System.arraycopy (txt.array, txt.offset, retValue, 0, txt.count);
27794 return retValue;
27795 });
27796 Clazz_defineMethod (c$, "paramString", 
27797 function () {
27798 return Clazz_superCall (this, javax.swing.JPasswordField, "paramString", []) + ",echoChar=" + this.echoChar;
27799 });
27800 Clazz_defineMethod (c$, "customSetUIProperty", 
27801 function (propertyName, value) {
27802 if (propertyName === "echoChar") {
27803 if (!this.echoCharSet) {
27804 this.setEchoChar ((value).charValue ());
27805 this.echoCharSet = false;
27806 }return true;
27807 }return false;
27808 }, "~S,~O");
27809 Clazz_defineStatics (c$,
27810 "$$uiClassID", "PasswordFieldUI");
27811 });
27812 Clazz_declarePackage ("javax.swing");
27813 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 () {
27814 c$ = Clazz_decorateAsClass (function () {
27815 this.$action = null;
27816 this.actionPropertyChangeListener = null;
27817 this.horizontalAlignment = 10;
27818 this.columns = 0;
27819 this.columnWidth = 0;
27820 this.command = null;
27821 if (!Clazz_isClassDefined ("javax.swing.JTextField.ScrollRepainter")) {
27822 javax.swing.JTextField.$JTextField$ScrollRepainter$ ();
27823 }
27824 Clazz_instantialize (this, arguments);
27825 }, javax.swing, "JTextField", javax.swing.text.JTextComponent, javax.swing.SwingConstants);
27826 Clazz_makeConstructor (c$, 
27827 function () {
27828 this.construct (null, null, 0);
27829 });
27830 Clazz_makeConstructor (c$, 
27831 function (text) {
27832 this.construct (null, text, 0);
27833 }, "~S");
27834 Clazz_makeConstructor (c$, 
27835 function (columns) {
27836 this.construct (null, null, columns);
27837 }, "~N");
27838 Clazz_makeConstructor (c$, 
27839 function (text, columns) {
27840 this.construct (null, text, columns);
27841 }, "~S,~N");
27842 Clazz_makeConstructor (c$, 
27843 function (doc, text, columns) {
27844 Clazz_superConstructor (this, javax.swing.JTextField);
27845 if (columns < 0) {
27846 throw  new IllegalArgumentException ("columns less than zero.");
27847 }this.columns = columns;
27848 if (doc == null) {
27849 doc = this.createDefaultModel ();
27850 }this.setDocument (doc);
27851 if (text != null) {
27852 this.setText (text);
27853 }}, "javax.swing.text.Document,~S,~N");
27854 Clazz_overrideMethod (c$, "getUIClassID", 
27855 function () {
27856 return "TextFieldUI";
27857 });
27858 Clazz_defineMethod (c$, "setDocument", 
27859 function (doc) {
27860 if (doc != null) {
27861 doc.putProperty ("filterNewlines", Boolean.TRUE);
27862 }Clazz_superCall (this, javax.swing.JTextField, "setDocument", [doc]);
27863 }, "javax.swing.text.Document");
27864 Clazz_overrideMethod (c$, "isValidateRoot", 
27865 function () {
27866 var parent = this.getParent ();
27867 if (Clazz_instanceOf (parent, javax.swing.JViewport)) {
27868 return false;
27869 }return true;
27870 });
27871 Clazz_defineMethod (c$, "getHorizontalAlignment", 
27872 function () {
27873 return this.horizontalAlignment;
27874 });
27875 Clazz_defineMethod (c$, "setHorizontalAlignment", 
27876 function (alignment) {
27877 if (alignment == this.horizontalAlignment) return;
27878 var oldValue = this.horizontalAlignment;
27879 if ((alignment == 2) || (alignment == 0) || (alignment == 4) || (alignment == 10) || (alignment == 11)) {
27880 this.horizontalAlignment = alignment;
27881 } else {
27882 throw  new IllegalArgumentException ("horizontalAlignment");
27883 }this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
27884 this.invalidate ();
27885 this.repaint ();
27886 }, "~N");
27887 Clazz_defineMethod (c$, "createDefaultModel", 
27888 function () {
27889 return swingjs.JSToolkit.getPlainDocument (this);
27890 });
27891 Clazz_defineMethod (c$, "getColumns", 
27892 function () {
27893 return this.columns;
27894 });
27895 Clazz_defineMethod (c$, "setColumns", 
27896 function (columns) {
27897 var oldVal = this.columns;
27898 if (columns < 0) {
27899 throw  new IllegalArgumentException ("columns less than zero.");
27900 }if (columns != oldVal) {
27901 this.columns = columns;
27902 this.invalidate ();
27903 }}, "~N");
27904 Clazz_defineMethod (c$, "getColumnWidth", 
27905 function () {
27906 if (this.columnWidth == 0) {
27907 var metrics = this.getFontMetrics (this.getFont ());
27908 this.columnWidth = metrics.charWidth ('m');
27909 }return this.columnWidth;
27910 });
27911 Clazz_overrideMethod (c$, "getPreferredSize", 
27912 function () {
27913 return this.getPrefSizeJTF ();
27914 });
27915 Clazz_defineMethod (c$, "getPrefSizeJTF", 
27916 function () {
27917 var size = this.getPrefSizeJComp ();
27918 if (this.columns != 0) {
27919 var insets = this.getInsets ();
27920 size.width = this.columns * this.getColumnWidth () + insets.left + insets.right;
27921 }return size;
27922 });
27923 Clazz_defineMethod (c$, "setFont", 
27924 function (f) {
27925 Clazz_superCall (this, javax.swing.JTextField, "setFont", [f]);
27926 this.columnWidth = 0;
27927 }, "java.awt.Font");
27928 Clazz_defineMethod (c$, "addActionListener", 
27929 function (l) {
27930 this.listenerList.add (java.awt.event.ActionListener, l);
27931 }, "java.awt.event.ActionListener");
27932 Clazz_defineMethod (c$, "removeActionListener", 
27933 function (l) {
27934 if ((l != null) && (this.getAction () === l)) {
27935 this.setAction (null);
27936 } else {
27937 this.listenerList.remove (java.awt.event.ActionListener, l);
27938 }}, "java.awt.event.ActionListener");
27939 Clazz_defineMethod (c$, "getActionListeners", 
27940 function () {
27941 return this.listenerList.getListeners (java.awt.event.ActionListener);
27942 });
27943 Clazz_defineMethod (c$, "fireActionPerformed", 
27944 function () {
27945 var listeners = this.listenerList.getListenerList ();
27946 var modifiers = 0;
27947 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
27948 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
27949 modifiers = (currentEvent).getModifiers ();
27950 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
27951 modifiers = (currentEvent).getModifiers ();
27952 }var e =  new java.awt.event.ActionEvent (this, 1001, (this.command != null) ? this.command : this.getText (), java.awt.EventQueue.getMostRecentEventTime (), modifiers);
27953 for (var i = listeners.length - 2; i >= 0; i -= 2) {
27954 if (listeners[i] === java.awt.event.ActionListener) {
27955 (listeners[i + 1]).actionPerformed (e);
27956 }}
27957 });
27958 Clazz_defineMethod (c$, "setActionCommand", 
27959 function (command) {
27960 this.command = command;
27961 }, "~S");
27962 Clazz_defineMethod (c$, "setAction", 
27963 function (a) {
27964 var oldValue = this.getAction ();
27965 if (this.$action == null || !this.$action.equals (a)) {
27966 this.$action = a;
27967 if (oldValue != null) {
27968 this.removeActionListener (oldValue);
27969 oldValue.removePropertyChangeListener (this.actionPropertyChangeListener);
27970 this.actionPropertyChangeListener = null;
27971 }this.configurePropertiesFromAction (this.$action);
27972 if (this.$action != null) {
27973 if (!this.isListener (java.awt.event.ActionListener, this.$action)) {
27974 this.addActionListener (this.$action);
27975 }this.actionPropertyChangeListener = this.createActionPropertyChangeListener (this.$action);
27976 this.$action.addPropertyChangeListener (this.actionPropertyChangeListener);
27977 }this.firePropertyChangeObject ("action", oldValue, this.$action);
27978 }}, "javax.swing.Action");
27979 Clazz_defineMethod (c$, "isListener", 
27980  function (c, a) {
27981 var isListener = false;
27982 var listeners = this.listenerList.getListenerList ();
27983 for (var i = listeners.length - 2; i >= 0; i -= 2) {
27984 if (listeners[i] === c && listeners[i + 1] === a) {
27985 isListener = true;
27986 }}
27987 return isListener;
27988 }, "Class,java.awt.event.ActionListener");
27989 Clazz_defineMethod (c$, "getAction", 
27990 function () {
27991 return this.$action;
27992 });
27993 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
27994 function (a) {
27995 javax.swing.AbstractAction.setEnabledFromAction (this, a);
27996 javax.swing.AbstractAction.setToolTipTextFromAction (this, a);
27997 this.setActionCommandFromAction (a);
27998 }, "javax.swing.Action");
27999 Clazz_defineMethod (c$, "actionPropertyChanged", 
28000 function (action, propertyName) {
28001 if (propertyName === "ActionCommandKey") {
28002 this.setActionCommandFromAction (action);
28003 } else if (propertyName === "enabled") {
28004 javax.swing.AbstractAction.setEnabledFromAction (this, action);
28005 } else if (propertyName === "ShortDescription") {
28006 javax.swing.AbstractAction.setToolTipTextFromAction (this, action);
28007 }}, "javax.swing.Action,~S");
28008 Clazz_defineMethod (c$, "setActionCommandFromAction", 
28009  function (action) {
28010 this.setActionCommand ((action == null) ? null : action.getValue ("ActionCommandKey"));
28011 }, "javax.swing.Action");
28012 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
28013 function (a) {
28014 return  new javax.swing.JTextField.TextFieldActionPropertyChangeListener (this, a);
28015 }, "javax.swing.Action");
28016 Clazz_defineMethod (c$, "getActions", 
28017 function () {
28018 return javax.swing.text.TextAction.augmentList (Clazz_superCall (this, javax.swing.JTextField, "getActions", []), javax.swing.JTextField.defaultActions);
28019 });
28020 Clazz_defineMethod (c$, "postActionEvent", 
28021 function () {
28022 this.fireActionPerformed ();
28023 });
28024 Clazz_defineMethod (c$, "hasActionListener", 
28025 function () {
28026 var listeners = this.listenerList.getListenerList ();
28027 for (var i = listeners.length - 2; i >= 0; i -= 2) {
28028 if (listeners[i] === java.awt.event.ActionListener) {
28029 return true;
28030 }}
28031 return false;
28032 });
28033 Clazz_defineMethod (c$, "paramString", 
28034 function () {
28035 var horizontalAlignmentString;
28036 if (this.horizontalAlignment == 2) {
28037 horizontalAlignmentString = "LEFT";
28038 } else if (this.horizontalAlignment == 0) {
28039 horizontalAlignmentString = "CENTER";
28040 } else if (this.horizontalAlignment == 4) {
28041 horizontalAlignmentString = "RIGHT";
28042 } else if (this.horizontalAlignment == 10) {
28043 horizontalAlignmentString = "LEADING";
28044 } else if (this.horizontalAlignment == 11) {
28045 horizontalAlignmentString = "TRAILING";
28046 } else horizontalAlignmentString = "";
28047 var commandString = (this.command != null ? this.command : "");
28048 return Clazz_superCall (this, javax.swing.JTextField, "paramString", []) + ",columns=" + this.columns + ",columnWidth=" + this.columnWidth + ",command=" + commandString + ",horizontalAlignment=" + horizontalAlignmentString;
28049 });
28050 c$.$JTextField$ScrollRepainter$ = function () {
28051 Clazz_pu$h(self.c$);
28052 c$ = Clazz_decorateAsClass (function () {
28053 Clazz_prepareCallback (this, arguments);
28054 Clazz_instantialize (this, arguments);
28055 }, javax.swing.JTextField, "ScrollRepainter", null, javax.swing.event.ChangeListener);
28056 Clazz_overrideMethod (c$, "stateChanged", 
28057 function (a) {
28058 this.b$["javax.swing.JTextField"].repaint ();
28059 }, "javax.swing.event.ChangeEvent");
28060 c$ = Clazz_p0p ();
28061 };
28062 Clazz_pu$h(self.c$);
28063 c$ = Clazz_declareType (javax.swing.JTextField, "TextFieldActionPropertyChangeListener", javax.swing.ActionPropertyChangeListener);
28064 Clazz_overrideMethod (c$, "actionPropertyChanged", 
28065 function (a, b, c) {
28066 if (javax.swing.AbstractAction.shouldReconfigure (c)) {
28067 a.configurePropertiesFromAction (b);
28068 } else {
28069 a.actionPropertyChanged (b, c.getPropertyName ());
28070 }}, "javax.swing.JTextField,javax.swing.Action,java.beans.PropertyChangeEvent");
28071 c$ = Clazz_p0p ();
28072 Clazz_pu$h(self.c$);
28073 c$ = Clazz_declareType (javax.swing.JTextField, "NotifyAction", javax.swing.text.TextAction);
28074 Clazz_makeConstructor (c$, 
28075 function () {
28076 Clazz_superConstructor (this, javax.swing.JTextField.NotifyAction, ["notify-field-accept"]);
28077 });
28078 Clazz_overrideMethod (c$, "actionPerformed", 
28079 function (a) {
28080 var b = this.getFocusedComponent ();
28081 if (Clazz_instanceOf (b, javax.swing.JTextField)) {
28082 var c = b;
28083 c.postActionEvent ();
28084 }}, "java.awt.event.ActionEvent");
28085 Clazz_overrideMethod (c$, "isEnabled", 
28086 function () {
28087 var a = this.getFocusedComponent ();
28088 if (Clazz_instanceOf (a, javax.swing.JTextField)) {
28089 return (a).hasActionListener ();
28090 }return false;
28091 });
28092 c$ = Clazz_p0p ();
28093 Clazz_defineStatics (c$,
28094 "notifyAction", "notify-field-accept");
28095 c$.defaultActions = c$.prototype.defaultActions =  Clazz_newArray (-1, [ new javax.swing.JTextField.NotifyAction ()]);
28096 Clazz_defineStatics (c$,
28097 "$uiClassID", "TextFieldUI");
28098 });
28099 Clazz_declarePackage ("javax.swing");
28100 Clazz_load (["java.beans.PropertyChangeListener"], "javax.swing.ActionPropertyChangeListener", null, function () {
28101 c$ = Clazz_decorateAsClass (function () {
28102 this.action = null;
28103 Clazz_instantialize (this, arguments);
28104 }, javax.swing, "ActionPropertyChangeListener", null, java.beans.PropertyChangeListener);
28105 Clazz_makeConstructor (c$, 
28106 function (c, a) {
28107 this.setTarget (c);
28108 this.action = a;
28109 }, "~O,javax.swing.Action");
28110 Clazz_overrideMethod (c$, "propertyChange", 
28111 function (e) {
28112 var target = this.getTarget ();
28113 if (target == null) {
28114 this.getAction ().removePropertyChangeListener (this);
28115 } else {
28116 this.actionPropertyChanged (target, this.getAction (), e);
28117 }}, "java.beans.PropertyChangeEvent");
28118 Clazz_defineMethod (c$, "setTarget", 
28119  function (c) {
28120 }, "~O");
28121 Clazz_defineMethod (c$, "getTarget", 
28122 function () {
28123 return null;
28124 });
28125 Clazz_defineMethod (c$, "getAction", 
28126 function () {
28127 return this.action;
28128 });
28129 });
28130 Clazz_declarePackage ("javax.swing.event");
28131 Clazz_load (["java.util.EventListener"], "javax.swing.event.ChangeListener", null, function () {
28132 Clazz_declareInterface (javax.swing.event, "ChangeListener", java.util.EventListener);
28133 });
28134 Clazz_declarePackage ("javax.swing");
28135 Clazz_load (null, "javax.swing.ActionMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28136 c$ = Clazz_decorateAsClass (function () {
28137 this.arrayTable = null;
28138 this.parent = null;
28139 Clazz_instantialize (this, arguments);
28140 }, javax.swing, "ActionMap");
28141 Clazz_makeConstructor (c$, 
28142 function () {
28143 });
28144 Clazz_defineMethod (c$, "setParent", 
28145 function (map) {
28146 this.parent = map;
28147 }, "javax.swing.ActionMap");
28148 Clazz_defineMethod (c$, "getParent", 
28149 function () {
28150 return this.parent;
28151 });
28152 Clazz_defineMethod (c$, "put", 
28153 function (key, action) {
28154 if (key == null) {
28155 return;
28156 }if (action == null) {
28157 this.remove (key);
28158 } else {
28159 if (this.arrayTable == null) {
28160 this.arrayTable =  new javax.swing.ArrayTable ();
28161 }this.arrayTable.put (key, action);
28162 }}, "~O,javax.swing.Action");
28163 Clazz_defineMethod (c$, "get", 
28164 function (key) {
28165 var value = (this.arrayTable == null) ? null : this.arrayTable.get (key);
28166 if (value == null) {
28167 var parent = this.getParent ();
28168 if (parent != null) {
28169 return parent.get (key);
28170 }}return value;
28171 }, "~O");
28172 Clazz_defineMethod (c$, "remove", 
28173 function (key) {
28174 if (this.arrayTable != null) {
28175 this.arrayTable.remove (key);
28176 }}, "~O");
28177 Clazz_defineMethod (c$, "clear", 
28178 function () {
28179 if (this.arrayTable != null) {
28180 this.arrayTable.clear ();
28181 }});
28182 Clazz_defineMethod (c$, "keys", 
28183 function () {
28184 if (this.arrayTable == null) {
28185 return null;
28186 }return this.arrayTable.getKeys (null);
28187 });
28188 Clazz_defineMethod (c$, "size", 
28189 function () {
28190 if (this.arrayTable == null) {
28191 return 0;
28192 }return this.arrayTable.size ();
28193 });
28194 Clazz_defineMethod (c$, "allKeys", 
28195 function () {
28196 var count = this.size ();
28197 var parent = this.getParent ();
28198 if (count == 0) {
28199 if (parent != null) {
28200 return parent.allKeys ();
28201 }return this.keys ();
28202 }if (parent == null) {
28203 return this.keys ();
28204 }var keys = this.keys ();
28205 var pKeys = parent.allKeys ();
28206 if (pKeys == null) {
28207 return keys;
28208 }if (keys == null) {
28209 return pKeys;
28210 }var keyMap =  new java.util.HashMap ();
28211 var counter;
28212 for (counter = keys.length - 1; counter >= 0; counter--) {
28213 keyMap.put (keys[counter], keys[counter]);
28214 }
28215 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28216 keyMap.put (pKeys[counter], pKeys[counter]);
28217 }
28218 return keyMap.keySet ().toArray ();
28219 });
28220 });
28221 Clazz_declarePackage ("javax.swing");
28222 Clazz_load (null, "javax.swing.InputMap", ["java.util.HashMap", "javax.swing.ArrayTable"], function () {
28223 c$ = Clazz_decorateAsClass (function () {
28224 this.arrayTable = null;
28225 this.parent = null;
28226 Clazz_instantialize (this, arguments);
28227 }, javax.swing, "InputMap");
28228 Clazz_makeConstructor (c$, 
28229 function () {
28230 });
28231 Clazz_defineMethod (c$, "setParent", 
28232 function (map) {
28233 this.parent = map;
28234 }, "javax.swing.InputMap");
28235 Clazz_defineMethod (c$, "getParent", 
28236 function () {
28237 return this.parent;
28238 });
28239 Clazz_defineMethod (c$, "put", 
28240 function (keyStroke, actionMapKey) {
28241 if (keyStroke == null) {
28242 return;
28243 }if (actionMapKey == null) {
28244 this.remove (keyStroke);
28245 } else {
28246 if (this.arrayTable == null) {
28247 this.arrayTable =  new javax.swing.ArrayTable ();
28248 }this.arrayTable.put (keyStroke, actionMapKey);
28249 }}, "javax.swing.KeyStroke,~O");
28250 Clazz_defineMethod (c$, "get", 
28251 function (keyStroke) {
28252 if (this.arrayTable == null) {
28253 var parent = this.getParent ();
28254 if (parent != null) {
28255 return parent.get (keyStroke);
28256 }return null;
28257 }var value = this.arrayTable.get (keyStroke);
28258 if (value == null) {
28259 var parent = this.getParent ();
28260 if (parent != null) {
28261 return parent.get (keyStroke);
28262 }}return value;
28263 }, "javax.swing.KeyStroke");
28264 Clazz_defineMethod (c$, "remove", 
28265 function (key) {
28266 if (this.arrayTable != null) {
28267 this.arrayTable.remove (key);
28268 }}, "javax.swing.KeyStroke");
28269 Clazz_defineMethod (c$, "clear", 
28270 function () {
28271 if (this.arrayTable != null) {
28272 this.arrayTable.clear ();
28273 }});
28274 Clazz_defineMethod (c$, "keys", 
28275 function () {
28276 if (this.arrayTable == null) {
28277 return null;
28278 }var keys =  new Array (this.arrayTable.size ());
28279 this.arrayTable.getKeys (keys);
28280 return keys;
28281 });
28282 Clazz_defineMethod (c$, "size", 
28283 function () {
28284 if (this.arrayTable == null) {
28285 return 0;
28286 }return this.arrayTable.size ();
28287 });
28288 Clazz_defineMethod (c$, "allKeys", 
28289 function () {
28290 var count = this.size ();
28291 var parent = this.getParent ();
28292 if (count == 0) {
28293 if (parent != null) {
28294 return parent.allKeys ();
28295 }return this.keys ();
28296 }if (parent == null) {
28297 return this.keys ();
28298 }var keys = this.keys ();
28299 var pKeys = parent.allKeys ();
28300 if (pKeys == null) {
28301 return keys;
28302 }if (keys == null) {
28303 return pKeys;
28304 }var keyMap =  new java.util.HashMap ();
28305 var counter;
28306 for (counter = keys.length - 1; counter >= 0; counter--) {
28307 keyMap.put (keys[counter], keys[counter]);
28308 }
28309 for (counter = pKeys.length - 1; counter >= 0; counter--) {
28310 keyMap.put (pKeys[counter], pKeys[counter]);
28311 }
28312 var allKeys =  new Array (keyMap.size ());
28313 return keyMap.keySet ().toArray (allKeys);
28314 });
28315 });
28316 Clazz_declarePackage ("javax.swing");
28317 Clazz_declareInterface (javax.swing, "Scrollable");
28318 Clazz_declarePackage ("javax.swing.event");
28319 Clazz_load (["java.util.EventObject"], "javax.swing.event.CaretEvent", null, function () {
28320 c$ = Clazz_declareType (javax.swing.event, "CaretEvent", java.util.EventObject);
28321 });
28322 Clazz_declarePackage ("javax.swing.event");
28323 Clazz_load (["java.util.EventListener"], "javax.swing.event.DocumentListener", null, function () {
28324 Clazz_declareInterface (javax.swing.event, "DocumentListener", java.util.EventListener);
28325 });
28326 Clazz_declarePackage ("javax.swing.event");
28327 Clazz_load (null, "javax.swing.event.EventListenerList", ["java.lang.reflect.Array"], function () {
28328 c$ = Clazz_decorateAsClass (function () {
28329 this.listenerList = null;
28330 Clazz_instantialize (this, arguments);
28331 }, javax.swing.event, "EventListenerList");
28332 Clazz_prepareFields (c$, function () {
28333 this.listenerList = javax.swing.event.EventListenerList.NULL_ARRAY;
28334 });
28335 Clazz_defineMethod (c$, "getListenerList", 
28336 function () {
28337 return this.listenerList;
28338 });
28339 Clazz_defineMethod (c$, "getListeners", 
28340 function (t) {
28341 var lList = this.listenerList;
28342 var n = this.getListenerCount (lList, t);
28343 var result = java.lang.reflect.Array.newInstance (t, n);
28344 var j = 0;
28345 for (var i = lList.length - 2; i >= 0; i -= 2) {
28346 if (lList[i] === t) {
28347 result[j++] = lList[i + 1];
28348 }}
28349 return result;
28350 }, "Class");
28351 Clazz_defineMethod (c$, "getListenerCount", 
28352 function () {
28353 return Clazz_doubleToInt (this.listenerList.length / 2);
28354 });
28355 Clazz_defineMethod (c$, "getListenerCount", 
28356 function (t) {
28357 var lList = this.listenerList;
28358 return this.getListenerCount (lList, t);
28359 }, "Class");
28360 Clazz_defineMethod (c$, "getListenerCount", 
28361  function (list, t) {
28362 var count = 0;
28363 for (var i = 0; i < list.length; i += 2) {
28364 if (t === list[i]) count++;
28365 }
28366 return count;
28367 }, "~A,Class");
28368 Clazz_defineMethod (c$, "add", 
28369 function (t, l) {
28370 if (l == null) {
28371 return;
28372 }if (this.listenerList === javax.swing.event.EventListenerList.NULL_ARRAY) {
28373 this.listenerList =  Clazz_newArray (-1, [t, l]);
28374 } else {
28375 var i = this.listenerList.length;
28376 var tmp =  new Array (i + 2);
28377 System.arraycopy (this.listenerList, 0, tmp, 0, i);
28378 tmp[i] = t;
28379 tmp[i + 1] = l;
28380 this.listenerList = tmp;
28381 }}, "Class,~O");
28382 Clazz_defineMethod (c$, "remove", 
28383 function (t, l) {
28384 if (l == null) {
28385 return;
28386 }var index = -1;
28387 for (var i = this.listenerList.length - 2; i >= 0; i -= 2) {
28388 if ((this.listenerList[i] === t) && (this.listenerList[i + 1].equals (l) == true)) {
28389 index = i;
28390 break;
28391 }}
28392 if (index != -1) {
28393 var tmp =  new Array (this.listenerList.length - 2);
28394 System.arraycopy (this.listenerList, 0, tmp, 0, index);
28395 if (index < tmp.length) System.arraycopy (this.listenerList, index + 2, tmp, index, tmp.length - index);
28396 this.listenerList = (tmp.length == 0) ? javax.swing.event.EventListenerList.NULL_ARRAY : tmp;
28397 }}, "Class,~O");
28398 Clazz_overrideMethod (c$, "toString", 
28399 function () {
28400 var lList = this.listenerList;
28401 var s = "EventListenerList: ";
28402 s += Clazz_doubleToInt (lList.length / 2) + " listeners: ";
28403 for (var i = 0; i <= lList.length - 2; i += 2) {
28404 s += " type " + (lList[i]).getName ();
28405 s += " listener " + lList[i + 1];
28406 }
28407 return s;
28408 });
28409 c$.NULL_ARRAY = c$.prototype.NULL_ARRAY =  new Array (0);
28410 });
28411 Clazz_declarePackage ("javax.swing.event");
28412 Clazz_load (["java.util.EventObject"], "javax.swing.event.ChangeEvent", null, function () {
28413 c$ = Clazz_declareType (javax.swing.event, "ChangeEvent", java.util.EventObject);
28414 });
28415 Clazz_declarePackage ("jssun.swing");
28416 Clazz_load (["jssun.swing.UIClientPropertyKey"], "jssun.swing.StringUIClientPropertyKey", null, function () {
28417 c$ = Clazz_decorateAsClass (function () {
28418 this.key = null;
28419 Clazz_instantialize (this, arguments);
28420 }, jssun.swing, "StringUIClientPropertyKey", null, jssun.swing.UIClientPropertyKey);
28421 Clazz_makeConstructor (c$, 
28422 function (key) {
28423 this.key = key;
28424 }, "~S");
28425 Clazz_overrideMethod (c$, "toString", 
28426 function () {
28427 return this.key;
28428 });
28429 });
28430 Clazz_declarePackage ("jssun.swing");
28431 Clazz_declareInterface (jssun.swing, "UIClientPropertyKey");
28432 Clazz_declarePackage ("java.awt");
28433 Clazz_load (["java.awt.Graphics"], "java.awt.Graphics2D", null, function () {
28434 c$ = Clazz_declareType (java.awt, "Graphics2D", java.awt.Graphics);
28435 Clazz_makeConstructor (c$, 
28436 function () {
28437 Clazz_superConstructor (this, java.awt.Graphics2D, []);
28438 });
28439 Clazz_overrideMethod (c$, "draw3DRect", 
28440 function (x, y, width, height, raised) {
28441 var p = this.getPaint ();
28442 var c = this.getColor ();
28443 var brighter = c.brighter ();
28444 var darker = c.darker ();
28445 this.setColor (raised ? brighter : darker);
28446 this.fillRect (x, y, 1, height + 1);
28447 this.fillRect (x + 1, y, width - 1, 1);
28448 this.setColor (raised ? darker : brighter);
28449 this.fillRect (x + 1, y + height, width, 1);
28450 this.fillRect (x + width, y, 1, height);
28451 this.setPaint (p);
28452 }, "~N,~N,~N,~N,~B");
28453 Clazz_overrideMethod (c$, "fill3DRect", 
28454 function (x, y, width, height, raised) {
28455 var p = this.getPaint ();
28456 var c = this.getColor ();
28457 var brighter = c.brighter ();
28458 var darker = c.darker ();
28459 if (!raised) {
28460 this.setColor (darker);
28461 } else if (p !== c) {
28462 this.setColor (c);
28463 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28464 this.setColor (raised ? brighter : darker);
28465 this.fillRect (x, y, 1, height);
28466 this.fillRect (x + 1, y, width - 2, 1);
28467 this.setColor (raised ? darker : brighter);
28468 this.fillRect (x + 1, y + height - 1, width - 1, 1);
28469 this.fillRect (x + width - 1, y, 1, height - 1);
28470 this.setPaint (p);
28471 }, "~N,~N,~N,~N,~B");
28472 });
28473 Clazz_declarePackage ("java.awt");
28474 c$ = Clazz_declareType (java.awt, "Graphics");
28475 Clazz_makeConstructor (c$, 
28476 function () {
28477 });
28478 Clazz_defineMethod (c$, "create", 
28479 function () {
28480 return this.createSwingJS ();
28481 });
28482 Clazz_defineMethod (c$, "create", 
28483 function (x, y, width, height) {
28484 return this.create4 (x, y, width, height);
28485 }, "~N,~N,~N,~N");
28486 Clazz_defineMethod (c$, "create4", 
28487 function (x, y, width, height) {
28488 var g = this.createSwingJS ();
28489 if (g == null) return null;
28490 g.translate (x, y);
28491 g.clipRect (0, 0, width, height);
28492 return g;
28493 }, "~N,~N,~N,~N");
28494 Clazz_defineMethod (c$, "getFontMetrics", 
28495 function () {
28496 return this.getFontMetrics (this.getFont ());
28497 });
28498 Clazz_defineMethod (c$, "drawRect", 
28499 function (x, y, width, height) {
28500 if ((width < 0) || (height < 0)) {
28501 return;
28502 }if (height == 0 || width == 0) {
28503 this.drawLine (x, y, x + width, y + height);
28504 } else {
28505 this.drawLine (x, y, x + width - 1, y);
28506 this.drawLine (x + width, y, x + width, y + height - 1);
28507 this.drawLine (x + width, y + height, x + 1, y + height);
28508 this.drawLine (x, y + height, x, y + 1);
28509 }}, "~N,~N,~N,~N");
28510 Clazz_defineMethod (c$, "draw3DRect", 
28511 function (x, y, width, height, raised) {
28512 var c = this.getColor ();
28513 var brighter = c.brighter ();
28514 var darker = c.darker ();
28515 this.setColor (raised ? brighter : darker);
28516 this.drawLine (x, y, x, y + height);
28517 this.drawLine (x + 1, y, x + width - 1, y);
28518 this.setColor (raised ? darker : brighter);
28519 this.drawLine (x + 1, y + height, x + width, y + height);
28520 this.drawLine (x + width, y, x + width, y + height - 1);
28521 this.setColor (c);
28522 }, "~N,~N,~N,~N,~B");
28523 Clazz_defineMethod (c$, "fill3DRect", 
28524 function (x, y, width, height, raised) {
28525 var c = this.getColor ();
28526 var brighter = c.brighter ();
28527 var darker = c.darker ();
28528 if (!raised) {
28529 this.setColor (darker);
28530 }this.fillRect (x + 1, y + 1, width - 2, height - 2);
28531 this.setColor (raised ? brighter : darker);
28532 this.drawLine (x, y, x, y + height - 1);
28533 this.drawLine (x + 1, y, x + width - 2, y);
28534 this.setColor (raised ? darker : brighter);
28535 this.drawLine (x + 1, y + height - 1, x + width - 1, y + height - 1);
28536 this.drawLine (x + width - 1, y, x + width - 1, y + height - 2);
28537 this.setColor (c);
28538 }, "~N,~N,~N,~N,~B");
28539 Clazz_defineMethod (c$, "drawPolygon", 
28540 function (p) {
28541 this.drawPolygon (p.xpoints, p.ypoints, p.npoints);
28542 }, "java.awt.Polygon");
28543 Clazz_defineMethod (c$, "fillPolygon", 
28544 function (p) {
28545 this.fillPolygon (p.xpoints, p.ypoints, p.npoints);
28546 }, "java.awt.Polygon");
28547 Clazz_defineMethod (c$, "drawChars", 
28548 function (data, offset, length, x, y) {
28549 this.drawString ( String.instantialize (data, offset, length), x, y);
28550 }, "~A,~N,~N,~N,~N");
28551 Clazz_defineMethod (c$, "drawBytes", 
28552 function (data, offset, length, x, y) {
28553 this.drawString ( String.instantialize (data, 0, offset, length), x, y);
28554 }, "~A,~N,~N,~N,~N");
28555 Clazz_overrideMethod (c$, "finalize", 
28556 function () {
28557 this.dispose ();
28558 });
28559 Clazz_overrideMethod (c$, "toString", 
28560 function () {
28561 return this.getClass ().getName () + "[font=" + this.getFont () + ",color=" + this.getColor () + "]";
28562 });
28563 Clazz_defineMethod (c$, "getClipRect", 
28564 function () {
28565 return this.getClipBounds ();
28566 });
28567 Clazz_defineMethod (c$, "hitClip", 
28568 function (x, y, width, height) {
28569 var clipRect = this.getClipBounds ();
28570 if (clipRect == null) {
28571 return true;
28572 }return clipRect.intersects (x, y, width, height);
28573 }, "~N,~N,~N,~N");
28574 Clazz_declarePackage ("jssun.font");
28575 Clazz_load (["java.awt.FontMetrics", "java.util.Hashtable"], "jssun.font.FontDesignMetrics", ["java.lang.IndexOutOfBoundsException", "java.awt.Toolkit", "swingjs.JSToolkit"], function () {
28576 c$ = Clazz_decorateAsClass (function () {
28577 this.ascent = 0;
28578 this.descent = 0;
28579 this.leading = 0;
28580 this.height = -1;
28581 Clazz_instantialize (this, arguments);
28582 }, jssun.font, "FontDesignMetrics", java.awt.FontMetrics);
28583 c$.getMetrics = Clazz_defineMethod (c$, "getMetrics", 
28584 function (font) {
28585 var m = null;
28586 var r;
28587 r = jssun.font.FontDesignMetrics.metricsCache.get (font);
28588 if (r != null) {
28589 m = r.get ();
28590 }if (m == null) {
28591 m =  new jssun.font.FontDesignMetrics (font);
28592 jssun.font.FontDesignMetrics.metricsCache.put (font,  new jssun.font.FontDesignMetrics.KeyReference (font, m));
28593 }for (var i = 0; i < jssun.font.FontDesignMetrics.recentMetrics.length; i++) {
28594 if (jssun.font.FontDesignMetrics.recentMetrics[i] === m) {
28595 return m;
28596 }}
28597 {
28598 jssun.font.FontDesignMetrics.recentMetrics[jssun.font.FontDesignMetrics.recentIndex++] = m;
28599 if (jssun.font.FontDesignMetrics.recentIndex == 5) {
28600 jssun.font.FontDesignMetrics.recentIndex = 0;
28601 }}return m;
28602 }, "java.awt.Font");
28603 Clazz_makeConstructor (c$, 
28604  function (font) {
28605 Clazz_superConstructor (this, jssun.font.FontDesignMetrics, [font]);
28606 this.font = font;
28607 this.initMatrixAndMetrics ();
28608 }, "java.awt.Font");
28609 Clazz_defineMethod (c$, "initMatrixAndMetrics", 
28610  function () {
28611 {
28612 //need to calculate ascent, descent, leading, and maxAdvance
28613 }});
28614 Clazz_defineMethod (c$, "charWidth", 
28615 function (ch) {
28616 var s = "";
28617 {
28618 s = "" + ch;
28619 }return this.stringWidth (s);
28620 }, "~S");
28621 Clazz_overrideMethod (c$, "stringWidth", 
28622 function (str) {
28623 return Clazz_doubleToInt (0.5 + this.getWidth (str));
28624 }, "~S");
28625 Clazz_defineMethod (c$, "getWidth", 
28626  function (str) {
28627 return swingjs.JSToolkit.getStringWidth (null, this.font, str);
28628 }, "~S");
28629 Clazz_overrideMethod (c$, "charsWidth", 
28630 function (data, off, len) {
28631 var width = 0;
28632 if (len < 0) {
28633 throw  new IndexOutOfBoundsException ("len=" + len);
28634 }var limit = off + len;
28635 for (var i = off; i < limit; i++) {
28636 var ch = data[i];
28637 width += this.stringWidth ("" + ch);
28638 }
28639 return Clazz_doubleToInt (0.5 + width);
28640 }, "~A,~N,~N");
28641 Clazz_overrideMethod (c$, "getWidths", 
28642 function () {
28643 var widths =  Clazz_newIntArray (256, 0);
28644 return widths;
28645 });
28646 Clazz_defineMethod (c$, "getAscent", 
28647 function () {
28648 if (this.ascent == 0) this.ascent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getAscent ();
28649 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.ascent);
28650 });
28651 Clazz_defineMethod (c$, "getDescent", 
28652 function () {
28653 if (this.descent == 0) this.descent = java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (this.font).getDescent ();
28654 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28655 });
28656 Clazz_overrideMethod (c$, "getLeading", 
28657 function () {
28658 return Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading) - Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent);
28659 });
28660 Clazz_overrideMethod (c$, "getHeight", 
28661 function () {
28662 if (this.height < 0) {
28663 this.height = this.getAscent () + Clazz_floatToInt (jssun.font.FontDesignMetrics.roundingUpValue + this.descent + this.leading);
28664 }return this.height;
28665 });
28666 Clazz_pu$h(self.c$);
28667 c$ = Clazz_decorateAsClass (function () {
28668 this.key = null;
28669 this.val = null;
28670 Clazz_instantialize (this, arguments);
28671 }, jssun.font.FontDesignMetrics, "KeyReference");
28672 Clazz_makeConstructor (c$, 
28673 function (a, b) {
28674 this.key = a;
28675 this.val = b;
28676 }, "~O,~O");
28677 Clazz_defineMethod (c$, "get", 
28678 function () {
28679 return this.val;
28680 });
28681 Clazz_defineMethod (c$, "dispose", 
28682 function () {
28683 if (jssun.font.FontDesignMetrics.metricsCache.get (this.key) === this) {
28684 jssun.font.FontDesignMetrics.metricsCache.remove (this.key);
28685 }});
28686 c$ = Clazz_p0p ();
28687 Clazz_defineStatics (c$,
28688 "roundingUpValue", 0.95);
28689 c$.metricsCache = c$.prototype.metricsCache =  new java.util.Hashtable ();
28690 Clazz_defineStatics (c$,
28691 "MAXRECENT", 5);
28692 c$.recentMetrics = c$.prototype.recentMetrics =  new Array (5);
28693 Clazz_defineStatics (c$,
28694 "recentIndex", 0);
28695 });
28696 Clazz_declarePackage ("java.awt");
28697 Clazz_load (["java.awt.font.FontRenderContext"], "java.awt.FontMetrics", ["java.lang.Character"], function () {
28698 c$ = Clazz_decorateAsClass (function () {
28699 this.font = null;
28700 Clazz_instantialize (this, arguments);
28701 }, java.awt, "FontMetrics");
28702 Clazz_makeConstructor (c$, 
28703 function (font) {
28704 this.font = font;
28705 }, "java.awt.Font");
28706 Clazz_defineMethod (c$, "getFont", 
28707 function () {
28708 return this.font;
28709 });
28710 Clazz_defineMethod (c$, "getFontRenderContext", 
28711 function () {
28712 return java.awt.FontMetrics.DEFAULT_FRC;
28713 });
28714 Clazz_defineMethod (c$, "getLeading", 
28715 function () {
28716 return 0;
28717 });
28718 Clazz_defineMethod (c$, "getAscent", 
28719 function () {
28720 return this.font.getSize ();
28721 });
28722 Clazz_defineMethod (c$, "getDescent", 
28723 function () {
28724 return 0;
28725 });
28726 Clazz_defineMethod (c$, "getHeight", 
28727 function () {
28728 return this.getLeading () + this.getAscent () + this.getDescent ();
28729 });
28730 Clazz_defineMethod (c$, "getMaxAscent", 
28731 function () {
28732 return this.getAscent ();
28733 });
28734 Clazz_defineMethod (c$, "getMaxDescent", 
28735 function () {
28736 return this.getDescent ();
28737 });
28738 Clazz_defineMethod (c$, "getMaxDecent", 
28739 function () {
28740 return this.getMaxDescent ();
28741 });
28742 Clazz_defineMethod (c$, "getMaxAdvance", 
28743 function () {
28744 return -1;
28745 });
28746 Clazz_defineMethod (c$, "charWidth", 
28747 function (codePoint) {
28748 if (!Character.isValidCodePoint (codePoint)) {
28749 codePoint = 0xffff;
28750 }if (codePoint < 256) {
28751 return this.getWidths ()[codePoint];
28752 } else {
28753 var buffer =  Clazz_newCharArray (2, '\0');
28754 var len = Character.toChars (codePoint, buffer, 0);
28755 return this.charsWidth (buffer, 0, len);
28756 }}, "~N");
28757 Clazz_defineMethod (c$, "charWidth", 
28758 function (ch) {
28759 if (ch.charCodeAt (0) < 256) {
28760 return this.getWidths ()[ch.charCodeAt (0)];
28761 }var data =  Clazz_newCharArray (-1, [ch]);
28762 return this.charsWidth (data, 0, 1);
28763 }, "~S");
28764 Clazz_defineMethod (c$, "stringWidth", 
28765 function (str) {
28766 var len = str.length;
28767 var data =  Clazz_newCharArray (len, '\0');
28768 str.getChars (0, len, data, 0);
28769 return this.charsWidth (data, 0, len);
28770 }, "~S");
28771 Clazz_defineMethod (c$, "charsWidth", 
28772 function (data, off, len) {
28773 return this.stringWidth ( String.instantialize (data, off, len));
28774 }, "~A,~N,~N");
28775 Clazz_defineMethod (c$, "bytesWidth", 
28776 function (data, off, len) {
28777 return this.stringWidth ( String.instantialize (data, 0, off, len));
28778 }, "~A,~N,~N");
28779 Clazz_defineMethod (c$, "getWidths", 
28780 function () {
28781 var widths =  Clazz_newIntArray (256, 0);
28782 for (var ch = String.fromCharCode (0); ch.charCodeAt (0) < 256; ch = String.fromCharCode (ch.charCodeAt (0) + 1)) {
28783 widths[ch.charCodeAt (0)] = this.charWidth (ch);
28784 }
28785 return widths;
28786 });
28787 Clazz_overrideMethod (c$, "toString", 
28788 function () {
28789 return this.getClass ().getName () + "[font=" + this.getFont () + "ascent=" + this.getAscent () + ", descent=" + this.getDescent () + ", height=" + this.getHeight () + "]";
28790 });
28791 c$.DEFAULT_FRC = c$.prototype.DEFAULT_FRC =  new java.awt.font.FontRenderContext (null, false, false);
28792 });
28793 Clazz_declarePackage ("JU");
28794 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 () {
28795 c$ = Clazz_declareType (JU, "PT");
28796 c$.parseInt = Clazz_defineMethod (c$, "parseInt", 
28797 function (str) {
28798 return JU.PT.parseIntNext (str,  Clazz_newIntArray (-1, [0]));
28799 }, "~S");
28800 c$.parseIntNext = Clazz_defineMethod (c$, "parseIntNext", 
28801 function (str, next) {
28802 var cch = str.length;
28803 if (next[0] < 0 || next[0] >= cch) return -2147483648;
28804 return JU.PT.parseIntChecked (str, cch, next);
28805 }, "~S,~A");
28806 c$.parseIntChecked = Clazz_defineMethod (c$, "parseIntChecked", 
28807 function (str, ichMax, next) {
28808 var digitSeen = false;
28809 var value = 0;
28810 var ich = next[0];
28811 if (ich < 0) return -2147483648;
28812 var ch;
28813 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28814
28815 var negative = false;
28816 if (ich < ichMax && str.charCodeAt (ich) == 45) {
28817 negative = true;
28818 ++ich;
28819 }while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28820 value = value * 10 + (ch - 48);
28821 digitSeen = true;
28822 ++ich;
28823 }
28824 if (!digitSeen) value = -2147483648;
28825  else if (negative) value = -value;
28826 next[0] = ich;
28827 return value;
28828 }, "~S,~N,~A");
28829 c$.isWhiteSpace = Clazz_defineMethod (c$, "isWhiteSpace", 
28830 function (str, ich) {
28831 var ch;
28832 return (ich >= 0 && ((ch = str.charAt (ich)) == ' ' || ch == '\t' || ch == '\n'));
28833 }, "~S,~N");
28834 c$.parseFloatChecked = Clazz_defineMethod (c$, "parseFloatChecked", 
28835 function (str, ichMax, next, isStrict) {
28836 var digitSeen = false;
28837 var ich = next[0];
28838 if (isStrict && str.indexOf ('\n') != str.lastIndexOf ('\n')) return NaN;
28839 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
28840
28841 var negative = false;
28842 if (ich < ichMax && str.charAt (ich) == '-') {
28843 ++ich;
28844 negative = true;
28845 }var ch = 0;
28846 var ival = 0;
28847 var ival2 = 0;
28848 while (ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28849 ival = (ival * 10) + (ch - 48) * 1;
28850 ++ich;
28851 digitSeen = true;
28852 }
28853 var isDecimal = false;
28854 var iscale = 0;
28855 var nzero = (ival == 0 ? -1 : 0);
28856 if (ch == 46) {
28857 isDecimal = true;
28858 while (++ich < ichMax && (ch = str.charCodeAt (ich)) >= 48 && ch <= 57) {
28859 digitSeen = true;
28860 if (nzero < 0) {
28861 if (ch == 48) {
28862 nzero--;
28863 continue;
28864 }nzero = -nzero;
28865 }if (iscale < JU.PT.decimalScale.length) {
28866 ival2 = (ival2 * 10) + (ch - 48) * 1;
28867 iscale++;
28868 }}
28869 }var value;
28870 if (!digitSeen) {
28871 value = NaN;
28872 } else if (ival2 > 0) {
28873 value = ival2 * JU.PT.decimalScale[iscale - 1];
28874 if (nzero > 1) {
28875 if (nzero - 2 < JU.PT.decimalScale.length) {
28876 value *= JU.PT.decimalScale[nzero - 2];
28877 } else {
28878 value *= Math.pow (10, 1 - nzero);
28879 }} else {
28880 value += ival;
28881 }} else {
28882 value = ival;
28883 }var isExponent = false;
28884 if (ich < ichMax && (ch == 69 || ch == 101 || ch == 68)) {
28885 isExponent = true;
28886 if (++ich >= ichMax) return NaN;
28887 ch = str.charCodeAt (ich);
28888 if ((ch == 43) && (++ich >= ichMax)) return NaN;
28889 next[0] = ich;
28890 var exponent = JU.PT.parseIntChecked (str, ichMax, next);
28891 if (exponent == -2147483648) return NaN;
28892 if (exponent > 0 && exponent <= JU.PT.tensScale.length) value *= JU.PT.tensScale[exponent - 1];
28893  else if (exponent < 0 && -exponent <= JU.PT.decimalScale.length) value *= JU.PT.decimalScale[-exponent - 1];
28894  else if (exponent != 0) value *= Math.pow (10, exponent);
28895 } else {
28896 next[0] = ich;
28897 }if (negative) value = -value;
28898 if (value == Infinity) value = 3.4028235E38;
28899 return (!isStrict || (!isExponent || isDecimal) && JU.PT.checkTrailingText (str, next[0], ichMax) ? value : NaN);
28900 }, "~S,~N,~A,~B");
28901 c$.checkTrailingText = Clazz_defineMethod (c$, "checkTrailingText", 
28902 function (str, ich, ichMax) {
28903 var ch;
28904 while (ich < ichMax && (JU.PT.isWhitespace (ch = str.charAt (ich)) || ch == ';')) ++ich;
28905
28906 return (ich == ichMax);
28907 }, "~S,~N,~N");
28908 c$.parseFloatArray = Clazz_defineMethod (c$, "parseFloatArray", 
28909 function (str) {
28910 return JU.PT.parseFloatArrayNext (str,  Clazz_newIntArray (1, 0), null, null, null);
28911 }, "~S");
28912 c$.parseFloatArrayInfested = Clazz_defineMethod (c$, "parseFloatArrayInfested", 
28913 function (tokens, data) {
28914 var len = data.length;
28915 var nTokens = tokens.length;
28916 var n = 0;
28917 var max = 0;
28918 for (var i = 0; i >= 0 && i < len && n < nTokens; i++) {
28919 var f;
28920 while (Float.isNaN (f = JU.PT.parseFloat (tokens[n++])) && n < nTokens) {
28921 }
28922 if (!Float.isNaN (f)) data[(max = i)] = f;
28923 if (n == nTokens) break;
28924 }
28925 return max + 1;
28926 }, "~A,~A");
28927 c$.parseFloatArrayNext = Clazz_defineMethod (c$, "parseFloatArrayNext", 
28928 function (str, next, f, strStart, strEnd) {
28929 var n = 0;
28930 var pt = next[0];
28931 if (pt >= 0) {
28932 if (strStart != null) {
28933 var p = str.indexOf (strStart, pt);
28934 if (p >= 0) next[0] = p + strStart.length;
28935 }str = str.substring (next[0]);
28936 pt = (strEnd == null ? -1 : str.indexOf (strEnd));
28937 if (pt < 0) pt = str.length;
28938  else str = str.substring (0, pt);
28939 next[0] += pt + 1;
28940 var tokens = JU.PT.getTokens (str);
28941 if (f == null) f =  Clazz_newFloatArray (tokens.length, 0);
28942 n = JU.PT.parseFloatArrayInfested (tokens, f);
28943 }if (f == null) return  Clazz_newFloatArray (0, 0);
28944 for (var i = n; i < f.length; i++) f[i] = NaN;
28945
28946 return f;
28947 }, "~S,~A,~A,~S,~S");
28948 c$.parseFloatRange = Clazz_defineMethod (c$, "parseFloatRange", 
28949 function (str, ichMax, next) {
28950 var cch = str.length;
28951 if (ichMax > cch) ichMax = cch;
28952 if (next[0] < 0 || next[0] >= ichMax) return NaN;
28953 return JU.PT.parseFloatChecked (str, ichMax, next, false);
28954 }, "~S,~N,~A");
28955 c$.parseFloatNext = Clazz_defineMethod (c$, "parseFloatNext", 
28956 function (str, next) {
28957 var cch = (str == null ? -1 : str.length);
28958 return (next[0] < 0 || next[0] >= cch ? NaN : JU.PT.parseFloatChecked (str, cch, next, false));
28959 }, "~S,~A");
28960 c$.parseFloatStrict = Clazz_defineMethod (c$, "parseFloatStrict", 
28961 function (str) {
28962 var cch = str.length;
28963 if (cch == 0) return NaN;
28964 return JU.PT.parseFloatChecked (str, cch,  Clazz_newIntArray (-1, [0]), true);
28965 }, "~S");
28966 c$.parseFloat = Clazz_defineMethod (c$, "parseFloat", 
28967 function (str) {
28968 return JU.PT.parseFloatNext (str,  Clazz_newIntArray (-1, [0]));
28969 }, "~S");
28970 c$.parseIntRadix = Clazz_defineMethod (c$, "parseIntRadix", 
28971 function (s, i) {
28972 {
28973 return Integer.parseIntRadix(s, i);
28974 }}, "~S,~N");
28975 c$.getTokens = Clazz_defineMethod (c$, "getTokens", 
28976 function (line) {
28977 return JU.PT.getTokensAt (line, 0);
28978 }, "~S");
28979 c$.parseToken = Clazz_defineMethod (c$, "parseToken", 
28980 function (str) {
28981 return JU.PT.parseTokenNext (str,  Clazz_newIntArray (-1, [0]));
28982 }, "~S");
28983 c$.parseTrimmed = Clazz_defineMethod (c$, "parseTrimmed", 
28984 function (str) {
28985 return JU.PT.parseTrimmedRange (str, 0, str.length);
28986 }, "~S");
28987 c$.parseTrimmedAt = Clazz_defineMethod (c$, "parseTrimmedAt", 
28988 function (str, ichStart) {
28989 return JU.PT.parseTrimmedRange (str, ichStart, str.length);
28990 }, "~S,~N");
28991 c$.parseTrimmedRange = Clazz_defineMethod (c$, "parseTrimmedRange", 
28992 function (str, ichStart, ichMax) {
28993 var cch = str.length;
28994 if (ichMax < cch) cch = ichMax;
28995 if (cch < ichStart) return "";
28996 return JU.PT.parseTrimmedChecked (str, ichStart, cch);
28997 }, "~S,~N,~N");
28998 c$.getTokensAt = Clazz_defineMethod (c$, "getTokensAt", 
28999 function (line, ich) {
29000 if (line == null) return null;
29001 var cchLine = line.length;
29002 if (ich < 0 || ich > cchLine) return null;
29003 var tokenCount = JU.PT.countTokens (line, ich);
29004 var tokens =  new Array (tokenCount);
29005 var next =  Clazz_newIntArray (1, 0);
29006 next[0] = ich;
29007 for (var i = 0; i < tokenCount; ++i) tokens[i] = JU.PT.parseTokenChecked (line, cchLine, next);
29008
29009 return tokens;
29010 }, "~S,~N");
29011 c$.countTokens = Clazz_defineMethod (c$, "countTokens", 
29012 function (line, ich) {
29013 var tokenCount = 0;
29014 if (line != null) {
29015 var ichMax = line.length;
29016 while (true) {
29017 while (ich < ichMax && JU.PT.isWhiteSpace (line, ich)) ++ich;
29018
29019 if (ich == ichMax) break;
29020 ++tokenCount;
29021 do {
29022 ++ich;
29023 } while (ich < ichMax && !JU.PT.isWhiteSpace (line, ich));
29024 }
29025 }return tokenCount;
29026 }, "~S,~N");
29027 c$.parseTokenNext = Clazz_defineMethod (c$, "parseTokenNext", 
29028 function (str, next) {
29029 var cch = str.length;
29030 return (next[0] < 0 || next[0] >= cch ? null : JU.PT.parseTokenChecked (str, cch, next));
29031 }, "~S,~A");
29032 c$.parseTokenRange = Clazz_defineMethod (c$, "parseTokenRange", 
29033 function (str, ichMax, next) {
29034 var cch = str.length;
29035 if (ichMax > cch) ichMax = cch;
29036 return (next[0] < 0 || next[0] >= ichMax ? null : JU.PT.parseTokenChecked (str, ichMax, next));
29037 }, "~S,~N,~A");
29038 c$.parseTokenChecked = Clazz_defineMethod (c$, "parseTokenChecked", 
29039 function (str, ichMax, next) {
29040 var ich = next[0];
29041 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29042
29043 var ichNonWhite = ich;
29044 while (ich < ichMax && !JU.PT.isWhiteSpace (str, ich)) ++ich;
29045
29046 next[0] = ich;
29047 return (ichNonWhite == ich ? null : str.substring (ichNonWhite, ich));
29048 }, "~S,~N,~A");
29049 c$.parseTrimmedChecked = Clazz_defineMethod (c$, "parseTrimmedChecked", 
29050 function (str, ich, ichMax) {
29051 while (ich < ichMax && JU.PT.isWhiteSpace (str, ich)) ++ich;
29052
29053 var ichLast = ichMax - 1;
29054 while (ichLast >= ich && JU.PT.isWhiteSpace (str, ichLast)) --ichLast;
29055
29056 return (ichLast < ich ? "" : str.substring (ich, ichLast + 1));
29057 }, "~S,~N,~N");
29058 c$.dVal = Clazz_defineMethod (c$, "dVal", 
29059 function (s) {
29060 {
29061 if(s==null)
29062 throw new NumberFormatException("null");
29063 var d=parseFloat(s);
29064 if(isNaN(d))
29065 throw new NumberFormatException("Not a Number : "+s);
29066 return d
29067 }}, "~S");
29068 c$.fVal = Clazz_defineMethod (c$, "fVal", 
29069 function (s) {
29070 {
29071 return this.dVal(s);
29072 }}, "~S");
29073 c$.parseIntRange = Clazz_defineMethod (c$, "parseIntRange", 
29074 function (str, ichMax, next) {
29075 var cch = str.length;
29076 if (ichMax > cch) ichMax = cch;
29077 return (next[0] < 0 || next[0] >= ichMax ? -2147483648 : JU.PT.parseIntChecked (str, ichMax, next));
29078 }, "~S,~N,~A");
29079 c$.parseFloatArrayData = Clazz_defineMethod (c$, "parseFloatArrayData", 
29080 function (tokens, data) {
29081 JU.PT.parseFloatArrayDataN (tokens, data, data.length);
29082 }, "~A,~A");
29083 c$.parseFloatArrayDataN = Clazz_defineMethod (c$, "parseFloatArrayDataN", 
29084 function (tokens, data, nData) {
29085 for (var i = nData; --i >= 0; ) data[i] = (i >= tokens.length ? NaN : JU.PT.parseFloat (tokens[i]));
29086
29087 }, "~A,~A,~N");
29088 c$.split = Clazz_defineMethod (c$, "split", 
29089 function (text, run) {
29090 if (text.length == 0) return  new Array (0);
29091 var n = 1;
29092 var i = text.indexOf (run);
29093 var lines;
29094 var runLen = run.length;
29095 if (i < 0 || runLen == 0) {
29096 lines =  new Array (1);
29097 lines[0] = text;
29098 return lines;
29099 }var len = text.length - runLen;
29100 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
29101
29102 lines =  new Array (n);
29103 i = 0;
29104 var ipt = 0;
29105 var pt = 0;
29106 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
29107 lines[pt++] = text.substring (i, ipt);
29108 i = ipt + runLen;
29109 }
29110 if (text.indexOf (run, len) != len) len += runLen;
29111 lines[pt] = text.substring (i, len);
29112 return lines;
29113 }, "~S,~S");
29114 c$.getQuotedStringAt = Clazz_defineMethod (c$, "getQuotedStringAt", 
29115 function (line, ipt0) {
29116 var next =  Clazz_newIntArray (-1, [ipt0]);
29117 return JU.PT.getQuotedStringNext (line, next);
29118 }, "~S,~N");
29119 c$.getQuotedStringNext = Clazz_defineMethod (c$, "getQuotedStringNext", 
29120 function (line, next) {
29121 var i = next[0];
29122 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return "";
29123 var pt = i + 1;
29124 var len = line.length;
29125 while (++i < len && line.charAt (i) != '"') if (line.charAt (i) == '\\') i++;
29126
29127 next[0] = i + 1;
29128 return line.substring (pt, i);
29129 }, "~S,~A");
29130 c$.getCSVString = Clazz_defineMethod (c$, "getCSVString", 
29131 function (line, next) {
29132 var i = next[1];
29133 if (i < 0 || (i = line.indexOf ("\"", i)) < 0) return null;
29134 var pt = next[0] = i;
29135 var len = line.length;
29136 var escaped = false;
29137 var haveEscape = false;
29138 while (++i < len && (line.charAt (i) != '"' || (escaped = (i + 1 < len && line.charAt (i + 1) == '"')))) if (escaped) {
29139 escaped = false;
29140 haveEscape = true;
29141 i++;
29142 }
29143 if (i >= len) {
29144 next[1] = -1;
29145 return null;
29146 }next[1] = i + 1;
29147 var s = line.substring (pt + 1, i);
29148 return (haveEscape ? JU.PT.rep (JU.PT.rep (s, "\"\"", "\0"), "\0", "\"") : s);
29149 }, "~S,~A");
29150 c$.isOneOf = Clazz_defineMethod (c$, "isOneOf", 
29151 function (key, semiList) {
29152 if (semiList.length == 0) return false;
29153 if (semiList.charAt (0) != ';') semiList = ";" + semiList + ";";
29154 return key.indexOf (";") < 0 && semiList.indexOf (';' + key + ';') >= 0;
29155 }, "~S,~S");
29156 c$.getQuotedAttribute = Clazz_defineMethod (c$, "getQuotedAttribute", 
29157 function (info, name) {
29158 var i = info.indexOf (name + "=");
29159 return (i < 0 ? null : JU.PT.getQuotedStringAt (info, i));
29160 }, "~S,~S");
29161 c$.approx = Clazz_defineMethod (c$, "approx", 
29162 function (f, n) {
29163 return Math.round (f * n) / n;
29164 }, "~N,~N");
29165 c$.rep = Clazz_defineMethod (c$, "rep", 
29166 function (str, strFrom, strTo) {
29167 if (str == null || strFrom.length == 0 || str.indexOf (strFrom) < 0) return str;
29168 var isOnce = (strTo.indexOf (strFrom) >= 0);
29169 do {
29170 str = str.$replace (strFrom, strTo);
29171 } while (!isOnce && str.indexOf (strFrom) >= 0);
29172 return str;
29173 }, "~S,~S,~S");
29174 c$.formatF = Clazz_defineMethod (c$, "formatF", 
29175 function (value, width, precision, alignLeft, zeroPad) {
29176 return JU.PT.formatS (JU.DF.formatDecimal (value, precision), width, 0, alignLeft, zeroPad);
29177 }, "~N,~N,~N,~B,~B");
29178 c$.formatD = Clazz_defineMethod (c$, "formatD", 
29179 function (value, width, precision, alignLeft, zeroPad, allowOverflow) {
29180 return JU.PT.formatS (JU.DF.formatDecimal (value, -1 - precision), width, 0, alignLeft, zeroPad);
29181 }, "~N,~N,~N,~B,~B,~B");
29182 c$.formatS = Clazz_defineMethod (c$, "formatS", 
29183 function (value, width, precision, alignLeft, zeroPad) {
29184 if (value == null) return "";
29185 var len = value.length;
29186 if (precision != 2147483647 && precision > 0 && precision < len) value = value.substring (0, precision);
29187  else if (precision < 0 && len + precision >= 0) value = value.substring (len + precision + 1);
29188 var padLength = width - value.length;
29189 if (padLength <= 0) return value;
29190 var isNeg = (zeroPad && !alignLeft && value.charAt (0) == '-');
29191 var padChar = (zeroPad ? '0' : ' ');
29192 var padChar0 = (isNeg ? '-' : padChar);
29193 var sb =  new JU.SB ();
29194 if (alignLeft) sb.append (value);
29195 sb.appendC (padChar0);
29196 for (var i = padLength; --i > 0; ) sb.appendC (padChar);
29197
29198 if (!alignLeft) sb.append (isNeg ? padChar + value.substring (1) : value);
29199 return sb.toString ();
29200 }, "~S,~N,~N,~B,~B");
29201 c$.replaceWithCharacter = Clazz_defineMethod (c$, "replaceWithCharacter", 
29202 function (str, strFrom, chTo) {
29203 if (str == null) return null;
29204 for (var i = strFrom.length; --i >= 0; ) str = str.$replace (strFrom.charAt (i), chTo);
29205
29206 return str;
29207 }, "~S,~S,~S");
29208 c$.replaceAllCharacters = Clazz_defineMethod (c$, "replaceAllCharacters", 
29209 function (str, strFrom, strTo) {
29210 for (var i = strFrom.length; --i >= 0; ) {
29211 var chFrom = strFrom.substring (i, i + 1);
29212 str = JU.PT.rep (str, chFrom, strTo);
29213 }
29214 return str;
29215 }, "~S,~S,~S");
29216 c$.trim = Clazz_defineMethod (c$, "trim", 
29217 function (str, chars) {
29218 if (chars.length == 0) return str.trim ();
29219 var len = str.length;
29220 var k = 0;
29221 while (k < len && chars.indexOf (str.charAt (k)) >= 0) k++;
29222
29223 var m = str.length - 1;
29224 while (m > k && chars.indexOf (str.charAt (m)) >= 0) m--;
29225
29226 return str.substring (k, m + 1);
29227 }, "~S,~S");
29228 c$.trimQuotes = Clazz_defineMethod (c$, "trimQuotes", 
29229 function (value) {
29230 return (value != null && value.length > 1 && value.startsWith ("\"") && value.endsWith ("\"") ? value.substring (1, value.length - 1) : value);
29231 }, "~S");
29232 c$.isNonStringPrimitive = Clazz_defineMethod (c$, "isNonStringPrimitive", 
29233 function (info) {
29234 return Clazz_instanceOf (info, Number) || Clazz_instanceOf (info, Boolean);
29235 }, "~O");
29236 c$.arrayGet = Clazz_defineMethod (c$, "arrayGet", 
29237  function (info, i) {
29238 {
29239 return info[i];
29240 }}, "~O,~N");
29241 c$.toJSON = Clazz_defineMethod (c$, "toJSON", 
29242 function (infoType, info) {
29243 if (info == null) return JU.PT.packageJSON (infoType, null);
29244 if (JU.PT.isNonStringPrimitive (info)) return JU.PT.packageJSON (infoType, info.toString ());
29245 var s = null;
29246 var sb = null;
29247 while (true) {
29248 if (Clazz_instanceOf (info, String)) {
29249 s = info;
29250 {
29251 if (typeof s == "undefined") s = "null"
29252 }if (s.indexOf ("{\"") != 0) {
29253 s = JU.PT.rep (s, "\"", "\\\"");
29254 s = JU.PT.rep (s, "\n", "\\n");
29255 s = "\"" + s + "\"";
29256 }break;
29257 }if (Clazz_instanceOf (info, javajs.api.JSONEncodable)) {
29258 if ((s = (info).toJSON ()) == null) s = "null";
29259 break;
29260 }sb =  new JU.SB ();
29261 if (Clazz_instanceOf (info, java.util.Map)) {
29262 sb.append ("{ ");
29263 var sep = "";
29264 for (var key, $key = (info).keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
29265 sb.append (sep).append (JU.PT.packageJSON (key, JU.PT.toJSON (null, (info).get (key))));
29266 sep = ",";
29267 }
29268 sb.append (" }");
29269 break;
29270 }if (Clazz_instanceOf (info, JU.Lst)) {
29271 sb.append ("[ ");
29272 var n = (info).size ();
29273 for (var i = 0; i < n; i++) {
29274 if (i > 0) sb.appendC (',');
29275 sb.append (JU.PT.toJSON (null, (info).get (i)));
29276 }
29277 sb.append (" ]");
29278 break;
29279 }if (Clazz_instanceOf (info, JU.M34)) {
29280 var len = (Clazz_instanceOf (info, JU.M4) ? 4 : 3);
29281 var x =  Clazz_newFloatArray (len, 0);
29282 var m = info;
29283 sb.appendC ('[');
29284 for (var i = 0; i < len; i++) {
29285 if (i > 0) sb.appendC (',');
29286 m.getRow (i, x);
29287 sb.append (JU.PT.toJSON (null, x));
29288 }
29289 sb.appendC (']');
29290 break;
29291 }s = JU.PT.nonArrayString (info);
29292 if (s == null) {
29293 sb.append ("[");
29294 var n = JU.AU.getLength (info);
29295 for (var i = 0; i < n; i++) {
29296 if (i > 0) sb.appendC (',');
29297 sb.append (JU.PT.toJSON (null, JU.PT.arrayGet (info, i)));
29298 }
29299 sb.append ("]");
29300 break;
29301 }info = info.toString ();
29302 }
29303 return JU.PT.packageJSON (infoType, (s == null ? sb.toString () : s));
29304 }, "~S,~O");
29305 c$.nonArrayString = Clazz_defineMethod (c$, "nonArrayString", 
29306 function (x) {
29307 {
29308 var s = x.toString(); return (s.startsWith("[object") &&
29309 s.endsWith("Array]") ? null : s);
29310 }}, "~O");
29311 c$.byteArrayToJSON = Clazz_defineMethod (c$, "byteArrayToJSON", 
29312 function (data) {
29313 var sb =  new JU.SB ();
29314 sb.append ("[");
29315 var n = data.length;
29316 for (var i = 0; i < n; i++) {
29317 if (i > 0) sb.appendC (',');
29318 sb.appendI (data[i] & 0xFF);
29319 }
29320 sb.append ("]");
29321 return sb.toString ();
29322 }, "~A");
29323 c$.packageJSON = Clazz_defineMethod (c$, "packageJSON", 
29324 function (infoType, info) {
29325 return (infoType == null ? info : "\"" + infoType + "\": " + info);
29326 }, "~S,~S");
29327 c$.isAS = Clazz_defineMethod (c$, "isAS", 
29328 function (x) {
29329 {
29330 return Clazz_isAS(x);
29331 }}, "~O");
29332 c$.isASS = Clazz_defineMethod (c$, "isASS", 
29333 function (x) {
29334 {
29335 return Clazz_isASS(x);
29336 }}, "~O");
29337 c$.isAP = Clazz_defineMethod (c$, "isAP", 
29338 function (x) {
29339 {
29340 return Clazz_isAP(x);
29341 }}, "~O");
29342 c$.isAF = Clazz_defineMethod (c$, "isAF", 
29343 function (x) {
29344 {
29345 return Clazz_isAF(x);
29346 }}, "~O");
29347 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
29348 function (x) {
29349 {
29350 return Clazz_isAFloat(x);
29351 }}, "~O");
29352 c$.isAD = Clazz_defineMethod (c$, "isAD", 
29353 function (x) {
29354 {
29355 return Clazz_isAF(x);
29356 }}, "~O");
29357 c$.isADD = Clazz_defineMethod (c$, "isADD", 
29358 function (x) {
29359 {
29360 return Clazz_isAFF(x);
29361 }}, "~O");
29362 c$.isAB = Clazz_defineMethod (c$, "isAB", 
29363 function (x) {
29364 {
29365 return Clazz_isAI(x);
29366 }}, "~O");
29367 c$.isAI = Clazz_defineMethod (c$, "isAI", 
29368 function (x) {
29369 {
29370 return Clazz_isAI(x);
29371 }}, "~O");
29372 c$.isAII = Clazz_defineMethod (c$, "isAII", 
29373 function (x) {
29374 {
29375 return Clazz_isAII(x);
29376 }}, "~O");
29377 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
29378 function (x) {
29379 {
29380 return Clazz_isAFF(x);
29381 }}, "~O");
29382 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
29383 function (x) {
29384 {
29385 return Clazz_isAFFF(x);
29386 }}, "~O");
29387 c$.escapeUrl = Clazz_defineMethod (c$, "escapeUrl", 
29388 function (url) {
29389 url = JU.PT.rep (url, "\n", "");
29390 url = JU.PT.rep (url, "%", "%25");
29391 url = JU.PT.rep (url, "#", "%23");
29392 url = JU.PT.rep (url, "[", "%5B");
29393 url = JU.PT.rep (url, "]", "%5D");
29394 url = JU.PT.rep (url, " ", "%20");
29395 return url;
29396 }, "~S");
29397 c$.esc = Clazz_defineMethod (c$, "esc", 
29398 function (str) {
29399 if (str == null || str.length == 0) return "\"\"";
29400 var haveEscape = false;
29401 var i = 0;
29402 for (; i < "\\\\\tt\rr\nn\"\"".length; i += 2) if (str.indexOf ("\\\\\tt\rr\nn\"\"".charAt (i)) >= 0) {
29403 haveEscape = true;
29404 break;
29405 }
29406 if (haveEscape) while (i < "\\\\\tt\rr\nn\"\"".length) {
29407 var pt = -1;
29408 var ch = "\\\\\tt\rr\nn\"\"".charAt (i++);
29409 var ch2 = "\\\\\tt\rr\nn\"\"".charAt (i++);
29410 var sb =  new JU.SB ();
29411 var pt0 = 0;
29412 while ((pt = str.indexOf (ch, pt + 1)) >= 0) {
29413 sb.append (str.substring (pt0, pt)).appendC ('\\').appendC (ch2);
29414 pt0 = pt + 1;
29415 }
29416 sb.append (str.substring (pt0, str.length));
29417 str = sb.toString ();
29418 }
29419 return "\"" + JU.PT.escUnicode (str) + "\"";
29420 }, "~S");
29421 c$.escUnicode = Clazz_defineMethod (c$, "escUnicode", 
29422 function (str) {
29423 for (var i = str.length; --i >= 0; ) if (str.charCodeAt (i) > 0x7F) {
29424 var s = "0000" + Integer.toHexString (str.charCodeAt (i));
29425 str = str.substring (0, i) + "\\u" + s.substring (s.length - 4) + str.substring (i + 1);
29426 }
29427 return str;
29428 }, "~S");
29429 c$.escF = Clazz_defineMethod (c$, "escF", 
29430 function (f) {
29431 var sf = "" + f;
29432 {
29433 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
29434 sf += ".0";
29435 }return sf;
29436 }, "~N");
29437 c$.join = Clazz_defineMethod (c$, "join", 
29438 function (s, c, i0) {
29439 if (s.length < i0) return null;
29440 var sb =  new JU.SB ();
29441 sb.append (s[i0++]);
29442 for (var i = i0; i < s.length; i++) sb.appendC (c).append (s[i]);
29443
29444 return sb.toString ();
29445 }, "~A,~S,~N");
29446 c$.isLike = Clazz_defineMethod (c$, "isLike", 
29447 function (a, b) {
29448 var areEqual = a.equals (b);
29449 if (areEqual) return true;
29450 var isStart = b.startsWith ("*");
29451 var isEnd = b.endsWith ("*");
29452 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));
29453 }, "~S,~S");
29454 c$.getMapValueNoCase = Clazz_defineMethod (c$, "getMapValueNoCase", 
29455 function (h, key) {
29456 if ("this".equals (key)) return h;
29457 var val = h.get (key);
29458 if (val == null) for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) if (e.getKey ().equalsIgnoreCase (key)) return e.getValue ();
29459
29460 return val;
29461 }, "java.util.Map,~S");
29462 c$.getMapSubset = Clazz_defineMethod (c$, "getMapSubset", 
29463 function (h, key, h2) {
29464 var val = h.get (key);
29465 if (val != null) {
29466 h2.put (key, val);
29467 return;
29468 }for (var e, $e = h.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) {
29469 var k = e.getKey ();
29470 if (JU.PT.isLike (k, key)) h2.put (k, e.getValue ());
29471 }
29472 }, "java.util.Map,~S,java.util.Map");
29473 c$.clean = Clazz_defineMethod (c$, "clean", 
29474 function (s) {
29475 return JU.PT.rep (JU.PT.replaceAllCharacters (s, " \t\n\r", " "), "  ", " ").trim ();
29476 }, "~S");
29477 c$.fdup = Clazz_defineMethod (c$, "fdup", 
29478 function (f, pt, n) {
29479 var ch;
29480 var count = 0;
29481 for (var i = pt; --i >= 1; ) {
29482 if (JU.PT.isDigit (ch = f.charAt (i))) continue;
29483 switch (ch) {
29484 case '.':
29485 if (count++ != 0) return f;
29486 continue;
29487 case '-':
29488 if (i != 1 && f.charAt (i - 1) != '.') return f;
29489 continue;
29490 default:
29491 return f;
29492 }
29493 }
29494 var s = f.substring (0, pt + 1);
29495 var sb =  new JU.SB ();
29496 for (var i = 0; i < n; i++) sb.append (s);
29497
29498 sb.append (f.substring (pt + 1));
29499 return sb.toString ();
29500 }, "~S,~N,~N");
29501 c$.formatString = Clazz_defineMethod (c$, "formatString", 
29502 function (strFormat, key, strT, floatT, doubleT, doOne) {
29503 if (strFormat == null) return null;
29504 if ("".equals (strFormat)) return "";
29505 var len = key.length;
29506 if (strFormat.indexOf ("%") < 0 || len == 0 || strFormat.indexOf (key) < 0) return strFormat;
29507 var strLabel = "";
29508 var ich;
29509 var ichPercent;
29510 var ichKey;
29511 for (ich = 0; (ichPercent = strFormat.indexOf ('%', ich)) >= 0 && (ichKey = strFormat.indexOf (key, ichPercent + 1)) >= 0; ) {
29512 if (ich != ichPercent) strLabel += strFormat.substring (ich, ichPercent);
29513 ich = ichPercent + 1;
29514 if (ichKey > ichPercent + 6) {
29515 strLabel += '%';
29516 continue;
29517 }try {
29518 var alignLeft = false;
29519 if (strFormat.charAt (ich) == '-') {
29520 alignLeft = true;
29521 ++ich;
29522 }var zeroPad = false;
29523 if (strFormat.charAt (ich) == '0') {
29524 zeroPad = true;
29525 ++ich;
29526 }var ch;
29527 var width = 0;
29528 while ((ch = strFormat.charAt (ich)) >= '0' && (ch <= '9')) {
29529 width = (10 * width) + (ch.charCodeAt (0) - 48);
29530 ++ich;
29531 }
29532 var precision = 2147483647;
29533 var isExponential = false;
29534 if (strFormat.charAt (ich) == '.') {
29535 ++ich;
29536 if ((ch = strFormat.charAt (ich)) == '-') {
29537 isExponential = true;
29538 ++ich;
29539 }if ((ch = strFormat.charAt (ich)) >= '0' && ch <= '9') {
29540 precision = ch.charCodeAt (0) - 48;
29541 ++ich;
29542 }if (isExponential) precision = -precision - (strT == null ? 1 : 0);
29543 }var st = strFormat.substring (ich, ich + len);
29544 if (!st.equals (key)) {
29545 ich = ichPercent + 1;
29546 strLabel += '%';
29547 continue;
29548 }ich += len;
29549 if (!Float.isNaN (floatT)) strLabel += JU.PT.formatF (floatT, width, precision, alignLeft, zeroPad);
29550  else if (strT != null) strLabel += JU.PT.formatS (strT, width, precision, alignLeft, zeroPad);
29551  else if (!Double.isNaN (doubleT)) strLabel += JU.PT.formatD (doubleT, width, precision, alignLeft, zeroPad, true);
29552 if (doOne) break;
29553 } catch (ioobe) {
29554 if (Clazz_exceptionOf (ioobe, IndexOutOfBoundsException)) {
29555 ich = ichPercent;
29556 break;
29557 } else {
29558 throw ioobe;
29559 }
29560 }
29561 }
29562 strLabel += strFormat.substring (ich);
29563 return strLabel;
29564 }, "~S,~S,~S,~N,~N,~B");
29565 c$.formatStringS = Clazz_defineMethod (c$, "formatStringS", 
29566 function (strFormat, key, strT) {
29567 return JU.PT.formatString (strFormat, key, strT, NaN, NaN, false);
29568 }, "~S,~S,~S");
29569 c$.formatStringF = Clazz_defineMethod (c$, "formatStringF", 
29570 function (strFormat, key, floatT) {
29571 return JU.PT.formatString (strFormat, key, null, floatT, NaN, false);
29572 }, "~S,~S,~N");
29573 c$.formatStringI = Clazz_defineMethod (c$, "formatStringI", 
29574 function (strFormat, key, intT) {
29575 return JU.PT.formatString (strFormat, key, "" + intT, NaN, NaN, false);
29576 }, "~S,~S,~N");
29577 c$.sprintf = Clazz_defineMethod (c$, "sprintf", 
29578 function (strFormat, list, values) {
29579 if (values == null) return strFormat;
29580 var n = list.length;
29581 if (n == values.length) try {
29582 for (var o = 0; o < n; o++) {
29583 if (values[o] == null) continue;
29584 switch (list.charAt (o)) {
29585 case 's':
29586 strFormat = JU.PT.formatString (strFormat, "s", values[o], NaN, NaN, true);
29587 break;
29588 case 'f':
29589 strFormat = JU.PT.formatString (strFormat, "f", null, (values[o]).floatValue (), NaN, true);
29590 break;
29591 case 'i':
29592 strFormat = JU.PT.formatString (strFormat, "d", "" + values[o], NaN, NaN, true);
29593 strFormat = JU.PT.formatString (strFormat, "i", "" + values[o], NaN, NaN, true);
29594 break;
29595 case 'd':
29596 strFormat = JU.PT.formatString (strFormat, "e", null, NaN, (values[o]).doubleValue (), true);
29597 break;
29598 case 'p':
29599 var pVal = values[o];
29600 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.x, NaN, true);
29601 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.y, NaN, true);
29602 strFormat = JU.PT.formatString (strFormat, "p", null, pVal.z, NaN, true);
29603 break;
29604 case 'q':
29605 var qVal = values[o];
29606 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.x, NaN, true);
29607 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.y, NaN, true);
29608 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.z, NaN, true);
29609 strFormat = JU.PT.formatString (strFormat, "q", null, qVal.w, NaN, true);
29610 break;
29611 case 'S':
29612 var sVal = values[o];
29613 for (var i = 0; i < sVal.length; i++) strFormat = JU.PT.formatString (strFormat, "s", sVal[i], NaN, NaN, true);
29614
29615 break;
29616 case 'F':
29617 var fVal = values[o];
29618 for (var i = 0; i < fVal.length; i++) strFormat = JU.PT.formatString (strFormat, "f", null, fVal[i], NaN, true);
29619
29620 break;
29621 case 'I':
29622 var iVal = values[o];
29623 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "d", "" + iVal[i], NaN, NaN, true);
29624
29625 for (var i = 0; i < iVal.length; i++) strFormat = JU.PT.formatString (strFormat, "i", "" + iVal[i], NaN, NaN, true);
29626
29627 break;
29628 case 'D':
29629 var dVal = values[o];
29630 for (var i = 0; i < dVal.length; i++) strFormat = JU.PT.formatString (strFormat, "e", null, NaN, dVal[i], true);
29631
29632 }
29633 }
29634 return JU.PT.rep (strFormat, "%%", "%");
29635 } catch (e) {
29636 if (Clazz_exceptionOf (e, Exception)) {
29637 } else {
29638 throw e;
29639 }
29640 }
29641 System.out.println ("TextFormat.sprintf error " + list + " " + strFormat);
29642 return JU.PT.rep (strFormat, "%", "?");
29643 }, "~S,~S,~A");
29644 c$.formatCheck = Clazz_defineMethod (c$, "formatCheck", 
29645 function (strFormat) {
29646 if (strFormat == null || strFormat.indexOf ('p') < 0 && strFormat.indexOf ('q') < 0) return strFormat;
29647 strFormat = JU.PT.rep (strFormat, "%%", "\1");
29648 strFormat = JU.PT.rep (strFormat, "%p", "%6.2p");
29649 strFormat = JU.PT.rep (strFormat, "%q", "%6.2q");
29650 var format = JU.PT.split (strFormat, "%");
29651 var sb =  new JU.SB ();
29652 sb.append (format[0]);
29653 for (var i = 1; i < format.length; i++) {
29654 var f = "%" + format[i];
29655 var pt;
29656 if (f.length >= 3) {
29657 if ((pt = f.indexOf ('p')) >= 0) f = JU.PT.fdup (f, pt, 3);
29658 if ((pt = f.indexOf ('q')) >= 0) f = JU.PT.fdup (f, pt, 4);
29659 }sb.append (f);
29660 }
29661 return sb.toString ().$replace ('\1', '%');
29662 }, "~S");
29663 c$.leftJustify = Clazz_defineMethod (c$, "leftJustify", 
29664 function (s, s1, s2) {
29665 s.append (s2);
29666 var n = s1.length - s2.length;
29667 if (n > 0) s.append (s1.substring (0, n));
29668 }, "JU.SB,~S,~S");
29669 c$.rightJustify = Clazz_defineMethod (c$, "rightJustify", 
29670 function (s, s1, s2) {
29671 var n = s1.length - s2.length;
29672 if (n > 0) s.append (s1.substring (0, n));
29673 s.append (s2);
29674 }, "JU.SB,~S,~S");
29675 c$.safeTruncate = Clazz_defineMethod (c$, "safeTruncate", 
29676 function (f, n) {
29677 if (f > -0.001 && f < 0.001) f = 0;
29678 return (f + "         ").substring (0, n);
29679 }, "~N,~N");
29680 c$.isWild = Clazz_defineMethod (c$, "isWild", 
29681 function (s) {
29682 return s != null && (s.indexOf ("*") >= 0 || s.indexOf ("?") >= 0);
29683 }, "~S");
29684 c$.isMatch = Clazz_defineMethod (c$, "isMatch", 
29685 function (search, match, checkStar, allowInitialStar) {
29686 if (search.equals (match)) return true;
29687 var mLen = match.length;
29688 if (mLen == 0) return false;
29689 var isStar0 = (checkStar && allowInitialStar ? match.charAt (0) == '*' : false);
29690 if (mLen == 1 && isStar0) return true;
29691 var isStar1 = (checkStar && match.endsWith ("*"));
29692 var haveQ = (match.indexOf ('?') >= 0);
29693 if (!haveQ) {
29694 if (isStar0) return (isStar1 ? (mLen < 3 || search.indexOf (match.substring (1, mLen - 1)) >= 0) : search.endsWith (match.substring (1)));
29695  else if (isStar1) return search.startsWith (match.substring (0, mLen - 1));
29696 }var sLen = search.length;
29697 var qqqq = "????";
29698 var nq = 4;
29699 while (nq < sLen) {
29700 qqqq += qqqq;
29701 nq += 4;
29702 }
29703 if (checkStar) {
29704 if (isStar0) {
29705 match = qqqq + match.substring (1);
29706 mLen += nq - 1;
29707 }if (isStar1) {
29708 match = match.substring (0, mLen - 1) + qqqq;
29709 mLen += nq - 1;
29710 }}if (mLen < sLen) return false;
29711 var ich = 0;
29712 while (mLen > sLen) {
29713 if (allowInitialStar && match.charAt (ich) == '?') {
29714 ++ich;
29715 } else if (match.charAt (ich + mLen - 1) != '?') {
29716 return false;
29717 }--mLen;
29718 }
29719 for (var i = sLen; --i >= 0; ) {
29720 var chm = match.charAt (ich + i);
29721 if (chm == '?') continue;
29722 var chs = search.charAt (i);
29723 if (chm != chs && (chm != '\1' || chs != '?')) return false;
29724 }
29725 return true;
29726 }, "~S,~S,~B,~B");
29727 c$.replaceQuotedStrings = Clazz_defineMethod (c$, "replaceQuotedStrings", 
29728 function (s, list, newList) {
29729 var n = list.size ();
29730 for (var i = 0; i < n; i++) {
29731 var name = list.get (i);
29732 var newName = newList.get (i);
29733 if (!newName.equals (name)) s = JU.PT.rep (s, "\"" + name + "\"", "\"" + newName + "\"");
29734 }
29735 return s;
29736 }, "~S,JU.Lst,JU.Lst");
29737 c$.replaceStrings = Clazz_defineMethod (c$, "replaceStrings", 
29738 function (s, list, newList) {
29739 var n = list.size ();
29740 for (var i = 0; i < n; i++) {
29741 var name = list.get (i);
29742 var newName = newList.get (i);
29743 if (!newName.equals (name)) s = JU.PT.rep (s, name, newName);
29744 }
29745 return s;
29746 }, "~S,JU.Lst,JU.Lst");
29747 c$.isDigit = Clazz_defineMethod (c$, "isDigit", 
29748 function (ch) {
29749 var c = (ch).charCodeAt (0);
29750 return (48 <= c && c <= 57);
29751 }, "~S");
29752 c$.isUpperCase = Clazz_defineMethod (c$, "isUpperCase", 
29753 function (ch) {
29754 var c = (ch).charCodeAt (0);
29755 return (65 <= c && c <= 90);
29756 }, "~S");
29757 c$.isLowerCase = Clazz_defineMethod (c$, "isLowerCase", 
29758 function (ch) {
29759 var c = (ch).charCodeAt (0);
29760 return (97 <= c && c <= 122);
29761 }, "~S");
29762 c$.isLetter = Clazz_defineMethod (c$, "isLetter", 
29763 function (ch) {
29764 var c = (ch).charCodeAt (0);
29765 return (65 <= c && c <= 90 || 97 <= c && c <= 122);
29766 }, "~S");
29767 c$.isLetterOrDigit = Clazz_defineMethod (c$, "isLetterOrDigit", 
29768 function (ch) {
29769 var c = (ch).charCodeAt (0);
29770 return (65 <= c && c <= 90 || 97 <= c && c <= 122 || 48 <= c && c <= 57);
29771 }, "~S");
29772 c$.isWhitespace = Clazz_defineMethod (c$, "isWhitespace", 
29773 function (ch) {
29774 var c = (ch).charCodeAt (0);
29775 return (c >= 0x1c && c <= 0x20 || c >= 0x9 && c <= 0xd);
29776 }, "~S");
29777 c$.fixPtFloats = Clazz_defineMethod (c$, "fixPtFloats", 
29778 function (pt, f) {
29779 pt.x = Math.round (pt.x * f) / f;
29780 pt.y = Math.round (pt.y * f) / f;
29781 pt.z = Math.round (pt.z * f) / f;
29782 }, "JU.T3,~N");
29783 c$.fixDouble = Clazz_defineMethod (c$, "fixDouble", 
29784 function (d, f) {
29785 return Math.round (d * f) / f;
29786 }, "~N,~N");
29787 c$.parseFloatFraction = Clazz_defineMethod (c$, "parseFloatFraction", 
29788 function (s) {
29789 var pt = s.indexOf ("/");
29790 return (pt < 0 ? JU.PT.parseFloat (s) : JU.PT.parseFloat (s.substring (0, pt)) / JU.PT.parseFloat (s.substring (pt + 1)));
29791 }, "~S");
29792 Clazz_defineStatics (c$,
29793 "tensScale",  Clazz_newFloatArray (-1, [10, 100, 1000, 10000, 100000, 1000000]),
29794 "decimalScale",  Clazz_newFloatArray (-1, [0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001, 0.00000001, 0.000000001]),
29795 "FLOAT_MIN_SAFE", 2E-45,
29796 "escapable", "\\\\\tt\rr\nn\"\"",
29797 "FRACTIONAL_PRECISION", 100000,
29798 "CARTESIAN_PRECISION", 10000);
29799 });
29800 Clazz_declarePackage ("javajs.api");
29801 Clazz_declareInterface (javajs.api, "JSONEncodable");
29802 Clazz_declarePackage ("JU");
29803 Clazz_load (null, "JU.AU", ["java.util.Arrays", "JU.Lst"], function () {
29804 c$ = Clazz_declareType (JU, "AU");
29805 c$.ensureLength = Clazz_defineMethod (c$, "ensureLength", 
29806 function (array, minimumLength) {
29807 if (array != null && JU.AU.getLength (array) >= minimumLength) return array;
29808 return JU.AU.arrayCopyObject (array, minimumLength);
29809 }, "~O,~N");
29810 c$.ensureLengthS = Clazz_defineMethod (c$, "ensureLengthS", 
29811 function (array, minimumLength) {
29812 if (array != null && array.length >= minimumLength) return array;
29813 return JU.AU.arrayCopyS (array, minimumLength);
29814 }, "~A,~N");
29815 c$.ensureLengthA = Clazz_defineMethod (c$, "ensureLengthA", 
29816 function (array, minimumLength) {
29817 if (array != null && array.length >= minimumLength) return array;
29818 return JU.AU.arrayCopyF (array, minimumLength);
29819 }, "~A,~N");
29820 c$.ensureLengthI = Clazz_defineMethod (c$, "ensureLengthI", 
29821 function (array, minimumLength) {
29822 if (array != null && array.length >= minimumLength) return array;
29823 return JU.AU.arrayCopyI (array, minimumLength);
29824 }, "~A,~N");
29825 c$.ensureLengthShort = Clazz_defineMethod (c$, "ensureLengthShort", 
29826 function (array, minimumLength) {
29827 if (array != null && array.length >= minimumLength) return array;
29828 return JU.AU.arrayCopyShort (array, minimumLength);
29829 }, "~A,~N");
29830 c$.ensureLengthByte = Clazz_defineMethod (c$, "ensureLengthByte", 
29831 function (array, minimumLength) {
29832 if (array != null && array.length >= minimumLength) return array;
29833 return JU.AU.arrayCopyByte (array, minimumLength);
29834 }, "~A,~N");
29835 c$.doubleLength = Clazz_defineMethod (c$, "doubleLength", 
29836 function (array) {
29837 return JU.AU.arrayCopyObject (array, (array == null ? 16 : 2 * JU.AU.getLength (array)));
29838 }, "~O");
29839 c$.doubleLengthS = Clazz_defineMethod (c$, "doubleLengthS", 
29840 function (array) {
29841 return JU.AU.arrayCopyS (array, (array == null ? 16 : 2 * array.length));
29842 }, "~A");
29843 c$.doubleLengthF = Clazz_defineMethod (c$, "doubleLengthF", 
29844 function (array) {
29845 return JU.AU.arrayCopyF (array, (array == null ? 16 : 2 * array.length));
29846 }, "~A");
29847 c$.doubleLengthI = Clazz_defineMethod (c$, "doubleLengthI", 
29848 function (array) {
29849 return JU.AU.arrayCopyI (array, (array == null ? 16 : 2 * array.length));
29850 }, "~A");
29851 c$.doubleLengthShort = Clazz_defineMethod (c$, "doubleLengthShort", 
29852 function (array) {
29853 return JU.AU.arrayCopyShort (array, (array == null ? 16 : 2 * array.length));
29854 }, "~A");
29855 c$.doubleLengthByte = Clazz_defineMethod (c$, "doubleLengthByte", 
29856 function (array) {
29857 return JU.AU.arrayCopyByte (array, (array == null ? 16 : 2 * array.length));
29858 }, "~A");
29859 c$.doubleLengthBool = Clazz_defineMethod (c$, "doubleLengthBool", 
29860 function (array) {
29861 return JU.AU.arrayCopyBool (array, (array == null ? 16 : 2 * array.length));
29862 }, "~A");
29863 c$.deleteElements = Clazz_defineMethod (c$, "deleteElements", 
29864 function (array, firstElement, nElements) {
29865 if (nElements == 0 || array == null) return array;
29866 var oldLength = JU.AU.getLength (array);
29867 if (firstElement >= oldLength) return array;
29868 var n = oldLength - (firstElement + nElements);
29869 if (n < 0) n = 0;
29870 var t = JU.AU.newInstanceO (array, firstElement + n);
29871 if (firstElement > 0) System.arraycopy (array, 0, t, 0, firstElement);
29872 if (n > 0) System.arraycopy (array, firstElement + nElements, t, firstElement, n);
29873 return t;
29874 }, "~O,~N,~N");
29875 c$.arrayCopyObject = Clazz_defineMethod (c$, "arrayCopyObject", 
29876 function (array, newLength) {
29877 if (array == null) {
29878 return null;
29879 }var oldLength = JU.AU.getLength (array);
29880 if (newLength == oldLength) return array;
29881 var t = JU.AU.newInstanceO (array, newLength);
29882 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29883 return t;
29884 }, "~O,~N");
29885 c$.newInstanceO = Clazz_defineMethod (c$, "newInstanceO", 
29886  function (array, n) {
29887 {
29888 if (!array.getClass().getComponentType)
29889 return new Array(n);
29890 }}, "~O,~N");
29891 c$.getLength = Clazz_defineMethod (c$, "getLength", 
29892 function (array) {
29893 {
29894 return array.length
29895 }}, "~O");
29896 c$.arrayCopyS = Clazz_defineMethod (c$, "arrayCopyS", 
29897 function (array, newLength) {
29898 if (newLength < 0) newLength = array.length;
29899 var t =  new Array (newLength);
29900 if (array != null) {
29901 var oldLength = array.length;
29902 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29903 }return t;
29904 }, "~A,~N");
29905 c$.arrayCopyII = Clazz_defineMethod (c$, "arrayCopyII", 
29906 function (array, newLength) {
29907 var t = JU.AU.newInt2 (newLength);
29908 if (array != null) {
29909 var oldLength = array.length;
29910 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29911 }return t;
29912 }, "~A,~N");
29913 c$.arrayCopyPt = Clazz_defineMethod (c$, "arrayCopyPt", 
29914 function (array, newLength) {
29915 if (newLength < 0) newLength = array.length;
29916 var t =  new Array (newLength);
29917 if (array != null) {
29918 var oldLength = array.length;
29919 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29920 }return t;
29921 }, "~A,~N");
29922 c$.arrayCopyF = Clazz_defineMethod (c$, "arrayCopyF", 
29923 function (array, newLength) {
29924 if (newLength < 0) newLength = array.length;
29925 var t =  Clazz_newFloatArray (newLength, 0);
29926 if (array != null) {
29927 var oldLength = array.length;
29928 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29929 }return t;
29930 }, "~A,~N");
29931 c$.arrayCopyI = Clazz_defineMethod (c$, "arrayCopyI", 
29932 function (array, newLength) {
29933 if (newLength < 0) newLength = array.length;
29934 var t =  Clazz_newIntArray (newLength, 0);
29935 if (array != null) {
29936 var oldLength = array.length;
29937 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29938 }return t;
29939 }, "~A,~N");
29940 c$.arrayCopyRangeI = Clazz_defineMethod (c$, "arrayCopyRangeI", 
29941 function (array, i0, n) {
29942 if (array == null) return null;
29943 var oldLength = array.length;
29944 if (n == -1) n = oldLength;
29945 if (n == -2) n = Clazz_doubleToInt (oldLength / 2);
29946 n = n - i0;
29947 var t =  Clazz_newIntArray (n, 0);
29948 System.arraycopy (array, i0, t, 0, n);
29949 return t;
29950 }, "~A,~N,~N");
29951 c$.arrayCopyRangeRevI = Clazz_defineMethod (c$, "arrayCopyRangeRevI", 
29952 function (array, i0, n) {
29953 if (array == null) return null;
29954 var t = JU.AU.arrayCopyRangeI (array, i0, n);
29955 if (n < 0) n = array.length;
29956 for (var i = Clazz_doubleToInt (n / 2); --i >= 0; ) JU.AU.swapInt (t, i, n - 1 - i);
29957
29958 return t;
29959 }, "~A,~N,~N");
29960 c$.arrayCopyShort = Clazz_defineMethod (c$, "arrayCopyShort", 
29961 function (array, newLength) {
29962 if (newLength < 0) newLength = array.length;
29963 var t =  Clazz_newShortArray (newLength, 0);
29964 if (array != null) {
29965 var oldLength = array.length;
29966 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29967 }return t;
29968 }, "~A,~N");
29969 c$.arrayCopyByte = Clazz_defineMethod (c$, "arrayCopyByte", 
29970 function (array, newLength) {
29971 if (newLength < 0) newLength = array.length;
29972 var t =  Clazz_newByteArray (newLength, 0);
29973 if (array != null) {
29974 var oldLength = array.length;
29975 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29976 }return t;
29977 }, "~A,~N");
29978 c$.arrayCopyBool = Clazz_defineMethod (c$, "arrayCopyBool", 
29979 function (array, newLength) {
29980 if (newLength < 0) newLength = array.length;
29981 var t =  Clazz_newBooleanArray (newLength, false);
29982 if (array != null) {
29983 var oldLength = array.length;
29984 System.arraycopy (array, 0, t, 0, oldLength < newLength ? oldLength : newLength);
29985 }return t;
29986 }, "~A,~N");
29987 c$.swapInt = Clazz_defineMethod (c$, "swapInt", 
29988 function (array, indexA, indexB) {
29989 var t = array[indexA];
29990 array[indexA] = array[indexB];
29991 array[indexB] = t;
29992 }, "~A,~N,~N");
29993 c$.dumpArray = Clazz_defineMethod (c$, "dumpArray", 
29994 function (msg, A, x1, x2, y1, y2) {
29995 var s = "dumpArray: " + msg + "\n";
29996 for (var x = x1; x <= x2; x++) s += "\t*" + x + "*";
29997
29998 for (var y = y2; y >= y1; y--) {
29999 s += "\n*" + y + "*";
30000 for (var x = x1; x <= x2; x++) s += "\t" + (x < A.length && y < A[x].length ? A[x][y] : NaN);
30001
30002 }
30003 return s;
30004 }, "~S,~A,~N,~N,~N,~N");
30005 c$.dumpIntArray = Clazz_defineMethod (c$, "dumpIntArray", 
30006 function (A, n) {
30007 var str = "";
30008 for (var i = 0; i < n; i++) str += " " + A[i];
30009
30010 return str;
30011 }, "~A,~N");
30012 c$.sortedItem = Clazz_defineMethod (c$, "sortedItem", 
30013 function (v, n) {
30014 if (v.size () == 0) return null;
30015 if (v.size () == 1) return v.get (0);
30016 var keys = v.toArray ( new Array (v.size ()));
30017 java.util.Arrays.sort (keys);
30018 return keys[n % keys.length];
30019 }, "JU.Lst,~N");
30020 c$.createArrayOfArrayList = Clazz_defineMethod (c$, "createArrayOfArrayList", 
30021 function (size) {
30022 return  new Array (size);
30023 }, "~N");
30024 c$.createArrayOfHashtable = Clazz_defineMethod (c$, "createArrayOfHashtable", 
30025 function (size) {
30026 return  new Array (size);
30027 }, "~N");
30028 c$.swap = Clazz_defineMethod (c$, "swap", 
30029 function (o, i, j) {
30030 var oi = o[i];
30031 o[i] = o[j];
30032 o[j] = oi;
30033 }, "~A,~N,~N");
30034 c$.newFloat2 = Clazz_defineMethod (c$, "newFloat2", 
30035 function (n) {
30036 {
30037 return Clazz_newArray(n, null);
30038 }}, "~N");
30039 c$.newInt2 = Clazz_defineMethod (c$, "newInt2", 
30040 function (n) {
30041 {
30042 return Clazz_newArray(n, null);
30043 }}, "~N");
30044 c$.newInt3 = Clazz_defineMethod (c$, "newInt3", 
30045 function (nx, ny) {
30046 {
30047 return Clazz_newArray(nx, null);
30048 }}, "~N,~N");
30049 c$.newFloat3 = Clazz_defineMethod (c$, "newFloat3", 
30050 function (nx, ny) {
30051 {
30052 return Clazz_newArray(nx, null);
30053 }}, "~N,~N");
30054 c$.newInt4 = Clazz_defineMethod (c$, "newInt4", 
30055 function (n) {
30056 {
30057 return Clazz_newArray(n, null);
30058 }}, "~N");
30059 c$.newShort2 = Clazz_defineMethod (c$, "newShort2", 
30060 function (n) {
30061 {
30062 return Clazz_newArray(n, null);
30063 }}, "~N");
30064 c$.newByte2 = Clazz_defineMethod (c$, "newByte2", 
30065 function (n) {
30066 {
30067 return Clazz_newArray(n, null);
30068 }}, "~N");
30069 c$.newDouble2 = Clazz_defineMethod (c$, "newDouble2", 
30070 function (n) {
30071 {
30072 return Clazz_newArray(n, null);
30073 }}, "~N");
30074 c$.removeMapKeys = Clazz_defineMethod (c$, "removeMapKeys", 
30075 function (map, root) {
30076 var list =  new JU.Lst ();
30077 for (var key, $key = map.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) if (key.startsWith (root)) list.addLast (key);
30078
30079 for (var i = list.size (); --i >= 0; ) map.remove (list.get (i));
30080
30081 return list.size ();
30082 }, "java.util.Map,~S");
30083 c$.isAS = Clazz_defineMethod (c$, "isAS", 
30084 function (x) {
30085 {
30086 return Clazz_isAS(x);
30087 }}, "~O");
30088 c$.isASS = Clazz_defineMethod (c$, "isASS", 
30089 function (x) {
30090 {
30091 return Clazz_isASS(x);
30092 }}, "~O");
30093 c$.isAP = Clazz_defineMethod (c$, "isAP", 
30094 function (x) {
30095 {
30096 return Clazz_isAP(x);
30097 }}, "~O");
30098 c$.isAF = Clazz_defineMethod (c$, "isAF", 
30099 function (x) {
30100 {
30101 return Clazz_isAF(x);
30102 }}, "~O");
30103 c$.isAFloat = Clazz_defineMethod (c$, "isAFloat", 
30104 function (x) {
30105 {
30106 return Clazz_isAFloat(x);
30107 }}, "~O");
30108 c$.isAD = Clazz_defineMethod (c$, "isAD", 
30109 function (x) {
30110 {
30111 return Clazz_isAF(x);
30112 }}, "~O");
30113 c$.isADD = Clazz_defineMethod (c$, "isADD", 
30114 function (x) {
30115 {
30116 return Clazz_isAFF(x);
30117 }}, "~O");
30118 c$.isAB = Clazz_defineMethod (c$, "isAB", 
30119 function (x) {
30120 {
30121 return Clazz_isAI(x);
30122 }}, "~O");
30123 c$.isAI = Clazz_defineMethod (c$, "isAI", 
30124 function (x) {
30125 {
30126 return Clazz_isAI(x);
30127 }}, "~O");
30128 c$.isAII = Clazz_defineMethod (c$, "isAII", 
30129 function (x) {
30130 {
30131 return Clazz_isAII(x);
30132 }}, "~O");
30133 c$.isAFF = Clazz_defineMethod (c$, "isAFF", 
30134 function (x) {
30135 {
30136 return Clazz_isAFF(x);
30137 }}, "~O");
30138 c$.isAFFF = Clazz_defineMethod (c$, "isAFFF", 
30139 function (x) {
30140 {
30141 return Clazz_isAFFF(x);
30142 }}, "~O");
30143 c$.ensureSignedBytes = Clazz_defineMethod (c$, "ensureSignedBytes", 
30144 function (b) {
30145 if (b != null) {
30146 {
30147 for (var i = b.length; --i >= 0;) { var j = b[i] & 0xFF; if
30148 (j >= 0x80) j -= 0x100; b[i] = j; }
30149 }}return b;
30150 }, "~A");
30151 });
30152 Clazz_declarePackage ("JU");
30153 Clazz_load (["java.util.ArrayList"], "JU.Lst", null, function () {
30154 c$ = Clazz_declareType (JU, "Lst", java.util.ArrayList);
30155 Clazz_defineMethod (c$, "addLast", 
30156 function (v) {
30157 {
30158 return this.add1(v);
30159 }}, "~O");
30160 Clazz_defineMethod (c$, "removeObj", 
30161 function (v) {
30162 {
30163 return this.removeObject(v);
30164 }}, "~O");
30165 });
30166 Clazz_declarePackage ("JU");
30167 Clazz_load (["java.lang.Boolean"], "JU.DF", ["java.lang.Double", "$.Float", "JU.PT", "$.SB"], function () {
30168 c$ = Clazz_declareType (JU, "DF");
30169 c$.setUseNumberLocalization = Clazz_defineMethod (c$, "setUseNumberLocalization", 
30170 function (TF) {
30171 JU.DF.useNumberLocalization[0] = (TF ? Boolean.TRUE : Boolean.FALSE);
30172 }, "~B");
30173 c$.formatDecimalDbl = Clazz_defineMethod (c$, "formatDecimalDbl", 
30174 function (value, decimalDigits) {
30175 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Double.isNaN (value)) return "" + value;
30176 return JU.DF.formatDecimal (value, decimalDigits);
30177 }, "~N,~N");
30178 c$.formatDecimal = Clazz_defineMethod (c$, "formatDecimal", 
30179 function (value, decimalDigits) {
30180 if (decimalDigits == 2147483647 || value == -Infinity || value == Infinity || Float.isNaN (value)) return "" + value;
30181 var n;
30182 if (decimalDigits < 0) {
30183 decimalDigits = -decimalDigits;
30184 if (decimalDigits > JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length;
30185 if (value == 0) return JU.DF.formattingStrings[decimalDigits] + "E+0";
30186 n = 0;
30187 var d;
30188 if (Math.abs (value) < 1) {
30189 n = 10;
30190 d = value * 1e-10;
30191 } else {
30192 n = -10;
30193 d = value * 1e10;
30194 }var s = ("" + d).toUpperCase ();
30195 var i = s.indexOf ("E");
30196 n = JU.PT.parseInt (s.substring (i + 1)) + n;
30197 return (i < 0 ? "" + value : JU.DF.formatDecimal (JU.PT.parseFloat (s.substring (0, i)), decimalDigits - 1) + "E" + (n >= 0 ? "+" : "") + n);
30198 }if (decimalDigits >= JU.DF.formattingStrings.length) decimalDigits = JU.DF.formattingStrings.length - 1;
30199 var s1 = ("" + value).toUpperCase ();
30200 var pt = s1.indexOf (".");
30201 if (pt < 0) return s1 + JU.DF.formattingStrings[decimalDigits].substring (1);
30202 var isNeg = s1.startsWith ("-");
30203 if (isNeg) {
30204 s1 = s1.substring (1);
30205 pt--;
30206 }var pt1 = s1.indexOf ("E-");
30207 if (pt1 > 0) {
30208 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30209 s1 = "0." + "0000000000000000000000000000000000000000".substring (0, -n - 1) + s1.substring (0, 1) + s1.substring (2, pt1);
30210 pt = 1;
30211 }pt1 = s1.indexOf ("E");
30212 if (pt1 > 0) {
30213 n = JU.PT.parseInt (s1.substring (pt1 + 1));
30214 s1 = s1.substring (0, 1) + s1.substring (2, pt1) + "0000000000000000000000000000000000000000";
30215 s1 = s1.substring (0, n + 1) + "." + s1.substring (n + 1);
30216 pt = s1.indexOf (".");
30217 }var len = s1.length;
30218 var pt2 = decimalDigits + pt + 1;
30219 if (pt2 < len && s1.charAt (pt2) >= '5') {
30220 return JU.DF.formatDecimal (value + (isNeg ? -1 : 1) * JU.DF.formatAdds[decimalDigits], decimalDigits);
30221 }var sb = JU.SB.newS (s1.substring (0, (decimalDigits == 0 ? pt : ++pt)));
30222 for (var i = 0; i < decimalDigits; i++, pt++) {
30223 if (pt < len) sb.appendC (s1.charAt (pt));
30224  else sb.appendC ('0');
30225 }
30226 s1 = (isNeg ? "-" : "") + sb;
30227 return (Boolean.TRUE.equals (JU.DF.useNumberLocalization[0]) ? s1 : s1.$replace (',', '.'));
30228 }, "~N,~N");
30229 c$.formatDecimalTrimmed = Clazz_defineMethod (c$, "formatDecimalTrimmed", 
30230 function (x, precision) {
30231 var str = JU.DF.formatDecimalDbl (x, precision);
30232 var m = str.length - 1;
30233 var zero = '0';
30234 while (m >= 0 && str.charAt (m) == zero) m--;
30235
30236 return str.substring (0, m + 1);
30237 }, "~N,~N");
30238 Clazz_defineStatics (c$,
30239 "formattingStrings",  Clazz_newArray (-1, ["0", "0.0", "0.00", "0.000", "0.0000", "0.00000", "0.000000", "0.0000000", "0.00000000", "0.000000000"]),
30240 "zeros", "0000000000000000000000000000000000000000",
30241 "formatAdds",  Clazz_newFloatArray (-1, [0.5, 0.05, 0.005, 0.0005, 0.00005, 0.000005, 0.0000005, 0.00000005, 0.000000005, 0.0000000005]));
30242 c$.useNumberLocalization = c$.prototype.useNumberLocalization =  Clazz_newArray (-1, [Boolean.TRUE]);
30243 });
30244 Clazz_declarePackage ("JU");
30245 c$ = Clazz_decorateAsClass (function () {
30246 this.sb = null;
30247 this.s = null;
30248 Clazz_instantialize (this, arguments);
30249 }, JU, "SB");
30250 Clazz_makeConstructor (c$, 
30251 function () {
30252 {
30253 this.s = "";
30254 }});
30255 c$.newN = Clazz_defineMethod (c$, "newN", 
30256 function (n) {
30257 {
30258 return new JU.SB();
30259 }}, "~N");
30260 c$.newS = Clazz_defineMethod (c$, "newS", 
30261 function (s) {
30262 {
30263 var sb = new JU.SB();
30264 sb.s = s;
30265 return sb;
30266 }}, "~S");
30267 Clazz_defineMethod (c$, "append", 
30268 function (s) {
30269 {
30270 this.s += s
30271 }return this;
30272 }, "~S");
30273 Clazz_defineMethod (c$, "appendC", 
30274 function (c) {
30275 {
30276 this.s += c;
30277 }return this;
30278 }, "~S");
30279 Clazz_defineMethod (c$, "appendI", 
30280 function (i) {
30281 {
30282 this.s += i
30283 }return this;
30284 }, "~N");
30285 Clazz_defineMethod (c$, "appendB", 
30286 function (b) {
30287 {
30288 this.s += b
30289 }return this;
30290 }, "~B");
30291 Clazz_defineMethod (c$, "appendF", 
30292 function (f) {
30293 {
30294 var sf = "" + f;
30295 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30296 sf += ".0" ;
30297 this.s += sf;
30298 }return this;
30299 }, "~N");
30300 Clazz_defineMethod (c$, "appendD", 
30301 function (d) {
30302 {
30303 var sf = "" + d;
30304 if (sf.indexOf(".") < 0 && sf.indexOf("e") < 0)
30305 sf += ".0" ;
30306 this.s += sf;
30307 }return this;
30308 }, "~N");
30309 Clazz_defineMethod (c$, "appendSB", 
30310 function (buf) {
30311 {
30312 this.s += buf.s;
30313 }return this;
30314 }, "JU.SB");
30315 Clazz_defineMethod (c$, "appendO", 
30316 function (data) {
30317 if (data != null) {
30318 {
30319 this.s += data.toString();
30320 }}return this;
30321 }, "~O");
30322 Clazz_defineMethod (c$, "appendCB", 
30323 function (cb, off, len) {
30324 {
30325 for (var i = len,j=off; --i >= 0;)
30326 this.s += cb[j++];
30327 }}, "~A,~N,~N");
30328 Clazz_overrideMethod (c$, "toString", 
30329 function () {
30330 {
30331 return this.s;
30332 }});
30333 Clazz_defineMethod (c$, "length", 
30334 function () {
30335 {
30336 return this.s.length;
30337 }});
30338 Clazz_defineMethod (c$, "indexOf", 
30339 function (s) {
30340 {
30341 return this.s.indexOf(s);
30342 }}, "~S");
30343 Clazz_defineMethod (c$, "charAt", 
30344 function (i) {
30345 {
30346 return this.s.charAt(i);
30347 }}, "~N");
30348 Clazz_defineMethod (c$, "charCodeAt", 
30349 function (i) {
30350 {
30351 return this.s.charCodeAt(i);
30352 }}, "~N");
30353 Clazz_defineMethod (c$, "setLength", 
30354 function (n) {
30355 {
30356 this.s = this.s.substring(0, n);
30357 }}, "~N");
30358 Clazz_defineMethod (c$, "lastIndexOf", 
30359 function (s) {
30360 {
30361 return this.s.lastIndexOf(s);
30362 }}, "~S");
30363 Clazz_defineMethod (c$, "indexOf2", 
30364 function (s, i) {
30365 {
30366 return this.s.indexOf(s, i);
30367 }}, "~S,~N");
30368 Clazz_defineMethod (c$, "substring", 
30369 function (i) {
30370 {
30371 return this.s.substring(i);
30372 }}, "~N");
30373 Clazz_defineMethod (c$, "substring2", 
30374 function (i, j) {
30375 {
30376 return this.s.substring(i, j);
30377 }}, "~N,~N");
30378 Clazz_defineMethod (c$, "toBytes", 
30379 function (off, len) {
30380 if (len < 0) len = this.length () - off;
30381 var b =  Clazz_newByteArray (len, 0);
30382 for (var i = off + len, j = i - off; --i >= off; ) b[--j] = (this.charAt (i)).charCodeAt (0);
30383
30384 return b;
30385 }, "~N,~N");
30386 Clazz_defineMethod (c$, "replace", 
30387 function (start, end, str) {
30388 {
30389 this.s = this.s.substring(0, start) + str + this.s.substring(end);
30390 }}, "~N,~N,~S");
30391 Clazz_defineMethod (c$, "insert", 
30392 function (offset, str) {
30393 this.replace (offset, offset, str);
30394 }, "~N,~S");
30395 Clazz_declarePackage ("JU");
30396 Clazz_load (null, "JU.M34", ["java.lang.ArrayIndexOutOfBoundsException"], function () {
30397 c$ = Clazz_decorateAsClass (function () {
30398 this.m00 = 0;
30399 this.m01 = 0;
30400 this.m02 = 0;
30401 this.m10 = 0;
30402 this.m11 = 0;
30403 this.m12 = 0;
30404 this.m20 = 0;
30405 this.m21 = 0;
30406 this.m22 = 0;
30407 Clazz_instantialize (this, arguments);
30408 }, JU, "M34");
30409 Clazz_defineMethod (c$, "setAA33", 
30410 function (a) {
30411 var x = a.x;
30412 var y = a.y;
30413 var z = a.z;
30414 var angle = a.angle;
30415 var n = Math.sqrt (x * x + y * y + z * z);
30416 n = 1 / n;
30417 x *= n;
30418 y *= n;
30419 z *= n;
30420 var c = Math.cos (angle);
30421 var s = Math.sin (angle);
30422 var omc = 1.0 - c;
30423 this.m00 = (c + x * x * omc);
30424 this.m11 = (c + y * y * omc);
30425 this.m22 = (c + z * z * omc);
30426 var tmp1 = x * y * omc;
30427 var tmp2 = z * s;
30428 this.m01 = (tmp1 - tmp2);
30429 this.m10 = (tmp1 + tmp2);
30430 tmp1 = x * z * omc;
30431 tmp2 = y * s;
30432 this.m02 = (tmp1 + tmp2);
30433 this.m20 = (tmp1 - tmp2);
30434 tmp1 = y * z * omc;
30435 tmp2 = x * s;
30436 this.m12 = (tmp1 - tmp2);
30437 this.m21 = (tmp1 + tmp2);
30438 }, "JU.A4");
30439 Clazz_defineMethod (c$, "rotate", 
30440 function (t) {
30441 this.rotate2 (t, t);
30442 }, "JU.T3");
30443 Clazz_defineMethod (c$, "rotate2", 
30444 function (t, result) {
30445 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);
30446 }, "JU.T3,JU.T3");
30447 Clazz_defineMethod (c$, "setM33", 
30448 function (m1) {
30449 this.m00 = m1.m00;
30450 this.m01 = m1.m01;
30451 this.m02 = m1.m02;
30452 this.m10 = m1.m10;
30453 this.m11 = m1.m11;
30454 this.m12 = m1.m12;
30455 this.m20 = m1.m20;
30456 this.m21 = m1.m21;
30457 this.m22 = m1.m22;
30458 }, "JU.M34");
30459 Clazz_defineMethod (c$, "clear33", 
30460 function () {
30461 this.m00 = this.m01 = this.m02 = this.m10 = this.m11 = this.m12 = this.m20 = this.m21 = this.m22 = 0.0;
30462 });
30463 Clazz_defineMethod (c$, "set33", 
30464 function (row, col, v) {
30465 switch (row) {
30466 case 0:
30467 switch (col) {
30468 case 0:
30469 this.m00 = v;
30470 return;
30471 case 1:
30472 this.m01 = v;
30473 return;
30474 case 2:
30475 this.m02 = v;
30476 return;
30477 }
30478 break;
30479 case 1:
30480 switch (col) {
30481 case 0:
30482 this.m10 = v;
30483 return;
30484 case 1:
30485 this.m11 = v;
30486 return;
30487 case 2:
30488 this.m12 = v;
30489 return;
30490 }
30491 break;
30492 case 2:
30493 switch (col) {
30494 case 0:
30495 this.m20 = v;
30496 return;
30497 case 1:
30498 this.m21 = v;
30499 return;
30500 case 2:
30501 this.m22 = v;
30502 return;
30503 }
30504 break;
30505 }
30506 this.err ();
30507 }, "~N,~N,~N");
30508 Clazz_defineMethod (c$, "get33", 
30509 function (row, col) {
30510 switch (row) {
30511 case 0:
30512 switch (col) {
30513 case 0:
30514 return this.m00;
30515 case 1:
30516 return this.m01;
30517 case 2:
30518 return this.m02;
30519 }
30520 break;
30521 case 1:
30522 switch (col) {
30523 case 0:
30524 return this.m10;
30525 case 1:
30526 return this.m11;
30527 case 2:
30528 return this.m12;
30529 }
30530 break;
30531 case 2:
30532 switch (col) {
30533 case 0:
30534 return this.m20;
30535 case 1:
30536 return this.m21;
30537 case 2:
30538 return this.m22;
30539 }
30540 break;
30541 }
30542 this.err ();
30543 return 0;
30544 }, "~N,~N");
30545 Clazz_defineMethod (c$, "setRow33", 
30546 function (row, v) {
30547 switch (row) {
30548 case 0:
30549 this.m00 = v[0];
30550 this.m01 = v[1];
30551 this.m02 = v[2];
30552 return;
30553 case 1:
30554 this.m10 = v[0];
30555 this.m11 = v[1];
30556 this.m12 = v[2];
30557 return;
30558 case 2:
30559 this.m20 = v[0];
30560 this.m21 = v[1];
30561 this.m22 = v[2];
30562 return;
30563 default:
30564 this.err ();
30565 }
30566 }, "~N,~A");
30567 Clazz_defineMethod (c$, "getRow33", 
30568 function (row, v) {
30569 switch (row) {
30570 case 0:
30571 v[0] = this.m00;
30572 v[1] = this.m01;
30573 v[2] = this.m02;
30574 return;
30575 case 1:
30576 v[0] = this.m10;
30577 v[1] = this.m11;
30578 v[2] = this.m12;
30579 return;
30580 case 2:
30581 v[0] = this.m20;
30582 v[1] = this.m21;
30583 v[2] = this.m22;
30584 return;
30585 }
30586 this.err ();
30587 }, "~N,~A");
30588 Clazz_defineMethod (c$, "setColumn33", 
30589 function (column, v) {
30590 switch (column) {
30591 case 0:
30592 this.m00 = v[0];
30593 this.m10 = v[1];
30594 this.m20 = v[2];
30595 break;
30596 case 1:
30597 this.m01 = v[0];
30598 this.m11 = v[1];
30599 this.m21 = v[2];
30600 break;
30601 case 2:
30602 this.m02 = v[0];
30603 this.m12 = v[1];
30604 this.m22 = v[2];
30605 break;
30606 default:
30607 this.err ();
30608 }
30609 }, "~N,~A");
30610 Clazz_defineMethod (c$, "getColumn33", 
30611 function (column, v) {
30612 switch (column) {
30613 case 0:
30614 v[0] = this.m00;
30615 v[1] = this.m10;
30616 v[2] = this.m20;
30617 break;
30618 case 1:
30619 v[0] = this.m01;
30620 v[1] = this.m11;
30621 v[2] = this.m21;
30622 break;
30623 case 2:
30624 v[0] = this.m02;
30625 v[1] = this.m12;
30626 v[2] = this.m22;
30627 break;
30628 default:
30629 this.err ();
30630 }
30631 }, "~N,~A");
30632 Clazz_defineMethod (c$, "add33", 
30633 function (m1) {
30634 this.m00 += m1.m00;
30635 this.m01 += m1.m01;
30636 this.m02 += m1.m02;
30637 this.m10 += m1.m10;
30638 this.m11 += m1.m11;
30639 this.m12 += m1.m12;
30640 this.m20 += m1.m20;
30641 this.m21 += m1.m21;
30642 this.m22 += m1.m22;
30643 }, "JU.M34");
30644 Clazz_defineMethod (c$, "sub33", 
30645 function (m1) {
30646 this.m00 -= m1.m00;
30647 this.m01 -= m1.m01;
30648 this.m02 -= m1.m02;
30649 this.m10 -= m1.m10;
30650 this.m11 -= m1.m11;
30651 this.m12 -= m1.m12;
30652 this.m20 -= m1.m20;
30653 this.m21 -= m1.m21;
30654 this.m22 -= m1.m22;
30655 }, "JU.M34");
30656 Clazz_defineMethod (c$, "mul33", 
30657 function (x) {
30658 this.m00 *= x;
30659 this.m01 *= x;
30660 this.m02 *= x;
30661 this.m10 *= x;
30662 this.m11 *= x;
30663 this.m12 *= x;
30664 this.m20 *= x;
30665 this.m21 *= x;
30666 this.m22 *= x;
30667 }, "~N");
30668 Clazz_defineMethod (c$, "transpose33", 
30669 function () {
30670 var tmp = this.m01;
30671 this.m01 = this.m10;
30672 this.m10 = tmp;
30673 tmp = this.m02;
30674 this.m02 = this.m20;
30675 this.m20 = tmp;
30676 tmp = this.m12;
30677 this.m12 = this.m21;
30678 this.m21 = tmp;
30679 });
30680 Clazz_defineMethod (c$, "setXRot", 
30681 function (angle) {
30682 var c = Math.cos (angle);
30683 var s = Math.sin (angle);
30684 this.m00 = 1.0;
30685 this.m01 = 0.0;
30686 this.m02 = 0.0;
30687 this.m10 = 0.0;
30688 this.m11 = c;
30689 this.m12 = -s;
30690 this.m20 = 0.0;
30691 this.m21 = s;
30692 this.m22 = c;
30693 }, "~N");
30694 Clazz_defineMethod (c$, "setYRot", 
30695 function (angle) {
30696 var c = Math.cos (angle);
30697 var s = Math.sin (angle);
30698 this.m00 = c;
30699 this.m01 = 0.0;
30700 this.m02 = s;
30701 this.m10 = 0.0;
30702 this.m11 = 1.0;
30703 this.m12 = 0.0;
30704 this.m20 = -s;
30705 this.m21 = 0.0;
30706 this.m22 = c;
30707 }, "~N");
30708 Clazz_defineMethod (c$, "setZRot", 
30709 function (angle) {
30710 var c = Math.cos (angle);
30711 var s = Math.sin (angle);
30712 this.m00 = c;
30713 this.m01 = -s;
30714 this.m02 = 0.0;
30715 this.m10 = s;
30716 this.m11 = c;
30717 this.m12 = 0.0;
30718 this.m20 = 0.0;
30719 this.m21 = 0.0;
30720 this.m22 = 1.0;
30721 }, "~N");
30722 Clazz_defineMethod (c$, "determinant3", 
30723 function () {
30724 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);
30725 });
30726 Clazz_defineMethod (c$, "err", 
30727 function () {
30728 throw  new ArrayIndexOutOfBoundsException ("matrix column/row out of bounds");
30729 });
30730 });
30731 Clazz_declarePackage ("JU");
30732 Clazz_load (["JU.M34"], "JU.M4", ["JU.T3"], function () {
30733 c$ = Clazz_decorateAsClass (function () {
30734 this.m03 = 0;
30735 this.m13 = 0;
30736 this.m23 = 0;
30737 this.m30 = 0;
30738 this.m31 = 0;
30739 this.m32 = 0;
30740 this.m33 = 0;
30741 Clazz_instantialize (this, arguments);
30742 }, JU, "M4", JU.M34);
30743 c$.newA16 = Clazz_defineMethod (c$, "newA16", 
30744 function (v) {
30745 var m =  new JU.M4 ();
30746 m.m00 = v[0];
30747 m.m01 = v[1];
30748 m.m02 = v[2];
30749 m.m03 = v[3];
30750 m.m10 = v[4];
30751 m.m11 = v[5];
30752 m.m12 = v[6];
30753 m.m13 = v[7];
30754 m.m20 = v[8];
30755 m.m21 = v[9];
30756 m.m22 = v[10];
30757 m.m23 = v[11];
30758 m.m30 = v[12];
30759 m.m31 = v[13];
30760 m.m32 = v[14];
30761 m.m33 = v[15];
30762 return m;
30763 }, "~A");
30764 c$.newM4 = Clazz_defineMethod (c$, "newM4", 
30765 function (m1) {
30766 var m =  new JU.M4 ();
30767 if (m1 == null) {
30768 m.setIdentity ();
30769 return m;
30770 }m.setToM3 (m1);
30771 m.m03 = m1.m03;
30772 m.m13 = m1.m13;
30773 m.m23 = m1.m23;
30774 m.m30 = m1.m30;
30775 m.m31 = m1.m31;
30776 m.m32 = m1.m32;
30777 m.m33 = m1.m33;
30778 return m;
30779 }, "JU.M4");
30780 c$.newMV = Clazz_defineMethod (c$, "newMV", 
30781 function (m1, t) {
30782 var m =  new JU.M4 ();
30783 m.setMV (m1, t);
30784 return m;
30785 }, "JU.M3,JU.T3");
30786 Clazz_defineMethod (c$, "setZero", 
30787 function () {
30788 this.clear33 ();
30789 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = this.m33 = 0.0;
30790 });
30791 Clazz_defineMethod (c$, "setIdentity", 
30792 function () {
30793 this.setZero ();
30794 this.m00 = this.m11 = this.m22 = this.m33 = 1.0;
30795 });
30796 Clazz_defineMethod (c$, "setM4", 
30797 function (m1) {
30798 this.setM33 (m1);
30799 this.m03 = m1.m03;
30800 this.m13 = m1.m13;
30801 this.m23 = m1.m23;
30802 this.m30 = m1.m30;
30803 this.m31 = m1.m31;
30804 this.m32 = m1.m32;
30805 this.m33 = m1.m33;
30806 return this;
30807 }, "JU.M4");
30808 Clazz_defineMethod (c$, "setMV", 
30809 function (m1, t) {
30810 this.setM33 (m1);
30811 this.setTranslation (t);
30812 this.m33 = 1;
30813 }, "JU.M3,JU.T3");
30814 Clazz_defineMethod (c$, "setToM3", 
30815 function (m1) {
30816 this.setM33 (m1);
30817 this.m03 = this.m13 = this.m23 = this.m30 = this.m31 = this.m32 = 0.0;
30818 this.m33 = 1.0;
30819 }, "JU.M34");
30820 Clazz_defineMethod (c$, "setToAA", 
30821 function (a) {
30822 this.setIdentity ();
30823 this.setAA33 (a);
30824 }, "JU.A4");
30825 Clazz_defineMethod (c$, "setA", 
30826 function (m) {
30827 this.m00 = m[0];
30828 this.m01 = m[1];
30829 this.m02 = m[2];
30830 this.m03 = m[3];
30831 this.m10 = m[4];
30832 this.m11 = m[5];
30833 this.m12 = m[6];
30834 this.m13 = m[7];
30835 this.m20 = m[8];
30836 this.m21 = m[9];
30837 this.m22 = m[10];
30838 this.m23 = m[11];
30839 this.m30 = m[12];
30840 this.m31 = m[13];
30841 this.m32 = m[14];
30842 this.m33 = m[15];
30843 }, "~A");
30844 Clazz_defineMethod (c$, "setTranslation", 
30845 function (trans) {
30846 this.m03 = trans.x;
30847 this.m13 = trans.y;
30848 this.m23 = trans.z;
30849 }, "JU.T3");
30850 Clazz_defineMethod (c$, "setElement", 
30851 function (row, col, v) {
30852 if (row < 3 && col < 3) {
30853 this.set33 (row, col, v);
30854 return;
30855 }if (row > 3 || col > 3) this.err ();
30856 switch (row) {
30857 case 0:
30858 this.m03 = v;
30859 return;
30860 case 1:
30861 this.m13 = v;
30862 return;
30863 case 2:
30864 this.m23 = v;
30865 return;
30866 }
30867 switch (col) {
30868 case 0:
30869 this.m30 = v;
30870 return;
30871 case 1:
30872 this.m31 = v;
30873 return;
30874 case 2:
30875 this.m32 = v;
30876 return;
30877 case 3:
30878 this.m33 = v;
30879 return;
30880 }
30881 }, "~N,~N,~N");
30882 Clazz_defineMethod (c$, "getElement", 
30883 function (row, col) {
30884 if (row < 3 && col < 3) return this.get33 (row, col);
30885 if (row > 3 || col > 3) {
30886 this.err ();
30887 return 0;
30888 }switch (row) {
30889 case 0:
30890 return this.m03;
30891 case 1:
30892 return this.m13;
30893 case 2:
30894 return this.m23;
30895 default:
30896 switch (col) {
30897 case 0:
30898 return this.m30;
30899 case 1:
30900 return this.m31;
30901 case 2:
30902 return this.m32;
30903 default:
30904 return this.m33;
30905 }
30906 }
30907 }, "~N,~N");
30908 Clazz_defineMethod (c$, "getTranslation", 
30909 function (trans) {
30910 trans.x = this.m03;
30911 trans.y = this.m13;
30912 trans.z = this.m23;
30913 }, "JU.T3");
30914 Clazz_defineMethod (c$, "getRotationScale", 
30915 function (m1) {
30916 m1.m00 = this.m00;
30917 m1.m01 = this.m01;
30918 m1.m02 = this.m02;
30919 m1.m10 = this.m10;
30920 m1.m11 = this.m11;
30921 m1.m12 = this.m12;
30922 m1.m20 = this.m20;
30923 m1.m21 = this.m21;
30924 m1.m22 = this.m22;
30925 }, "JU.M3");
30926 Clazz_defineMethod (c$, "setRotationScale", 
30927 function (m1) {
30928 this.m00 = m1.m00;
30929 this.m01 = m1.m01;
30930 this.m02 = m1.m02;
30931 this.m10 = m1.m10;
30932 this.m11 = m1.m11;
30933 this.m12 = m1.m12;
30934 this.m20 = m1.m20;
30935 this.m21 = m1.m21;
30936 this.m22 = m1.m22;
30937 }, "JU.M3");
30938 Clazz_defineMethod (c$, "setRowA", 
30939 function (row, v) {
30940 if (row < 3) this.setRow33 (row, v);
30941 switch (row) {
30942 case 0:
30943 this.m03 = v[3];
30944 return;
30945 case 1:
30946 this.m13 = v[3];
30947 return;
30948 case 2:
30949 this.m23 = v[3];
30950 return;
30951 case 3:
30952 this.m30 = v[0];
30953 this.m31 = v[1];
30954 this.m32 = v[2];
30955 this.m33 = v[3];
30956 return;
30957 }
30958 this.err ();
30959 }, "~N,~A");
30960 Clazz_overrideMethod (c$, "getRow", 
30961 function (row, v) {
30962 if (row < 3) this.getRow33 (row, v);
30963 switch (row) {
30964 case 0:
30965 v[3] = this.m03;
30966 return;
30967 case 1:
30968 v[3] = this.m13;
30969 return;
30970 case 2:
30971 v[3] = this.m23;
30972 return;
30973 case 3:
30974 v[0] = this.m30;
30975 v[1] = this.m31;
30976 v[2] = this.m32;
30977 v[3] = this.m33;
30978 return;
30979 }
30980 this.err ();
30981 }, "~N,~A");
30982 Clazz_defineMethod (c$, "setColumn4", 
30983 function (column, x, y, z, w) {
30984 if (column == 0) {
30985 this.m00 = x;
30986 this.m10 = y;
30987 this.m20 = z;
30988 this.m30 = w;
30989 } else if (column == 1) {
30990 this.m01 = x;
30991 this.m11 = y;
30992 this.m21 = z;
30993 this.m31 = w;
30994 } else if (column == 2) {
30995 this.m02 = x;
30996 this.m12 = y;
30997 this.m22 = z;
30998 this.m32 = w;
30999 } else if (column == 3) {
31000 this.m03 = x;
31001 this.m13 = y;
31002 this.m23 = z;
31003 this.m33 = w;
31004 } else {
31005 this.err ();
31006 }}, "~N,~N,~N,~N,~N");
31007 Clazz_defineMethod (c$, "setColumnA", 
31008 function (column, v) {
31009 if (column < 3) this.setColumn33 (column, v);
31010 switch (column) {
31011 case 0:
31012 this.m30 = v[3];
31013 return;
31014 case 1:
31015 this.m31 = v[3];
31016 return;
31017 case 2:
31018 this.m32 = v[3];
31019 return;
31020 case 3:
31021 this.m03 = v[0];
31022 this.m13 = v[1];
31023 this.m23 = v[2];
31024 this.m33 = v[3];
31025 return;
31026 default:
31027 this.err ();
31028 }
31029 }, "~N,~A");
31030 Clazz_defineMethod (c$, "getColumn", 
31031 function (column, v) {
31032 if (column < 3) this.getColumn33 (column, v);
31033 switch (column) {
31034 case 0:
31035 v[3] = this.m30;
31036 return;
31037 case 1:
31038 v[3] = this.m31;
31039 return;
31040 case 2:
31041 v[3] = this.m32;
31042 return;
31043 case 3:
31044 v[0] = this.m03;
31045 v[1] = this.m13;
31046 v[2] = this.m23;
31047 v[3] = this.m33;
31048 return;
31049 default:
31050 this.err ();
31051 }
31052 }, "~N,~A");
31053 Clazz_defineMethod (c$, "sub", 
31054 function (m1) {
31055 this.sub33 (m1);
31056 this.m03 -= m1.m03;
31057 this.m13 -= m1.m13;
31058 this.m23 -= m1.m23;
31059 this.m30 -= m1.m30;
31060 this.m31 -= m1.m31;
31061 this.m32 -= m1.m32;
31062 this.m33 -= m1.m33;
31063 }, "JU.M4");
31064 Clazz_defineMethod (c$, "transpose", 
31065 function () {
31066 this.transpose33 ();
31067 var tmp = this.m03;
31068 this.m03 = this.m30;
31069 this.m30 = tmp;
31070 tmp = this.m13;
31071 this.m13 = this.m31;
31072 this.m31 = tmp;
31073 tmp = this.m23;
31074 this.m23 = this.m32;
31075 this.m32 = tmp;
31076 });
31077 Clazz_defineMethod (c$, "invert", 
31078 function () {
31079 var s = this.determinant4 ();
31080 if (s == 0.0) return this;
31081 s = 1 / s;
31082 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));
31083 this.scale (s);
31084 return this;
31085 });
31086 Clazz_defineMethod (c$, "set", 
31087  function (m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {
31088 this.m00 = m00;
31089 this.m01 = m01;
31090 this.m02 = m02;
31091 this.m03 = m03;
31092 this.m10 = m10;
31093 this.m11 = m11;
31094 this.m12 = m12;
31095 this.m13 = m13;
31096 this.m20 = m20;
31097 this.m21 = m21;
31098 this.m22 = m22;
31099 this.m23 = m23;
31100 this.m30 = m30;
31101 this.m31 = m31;
31102 this.m32 = m32;
31103 this.m33 = m33;
31104 }, "~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
31105 Clazz_defineMethod (c$, "determinant4", 
31106 function () {
31107 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);
31108 });
31109 Clazz_defineMethod (c$, "scale", 
31110  function (scalar) {
31111 this.mul33 (scalar);
31112 this.m03 *= scalar;
31113 this.m13 *= scalar;
31114 this.m23 *= scalar;
31115 this.m30 *= scalar;
31116 this.m31 *= scalar;
31117 this.m32 *= scalar;
31118 this.m33 *= scalar;
31119 }, "~N");
31120 Clazz_defineMethod (c$, "mul", 
31121 function (m1) {
31122 this.mul2 (this, m1);
31123 }, "JU.M4");
31124 Clazz_defineMethod (c$, "mul2", 
31125 function (m1, m2) {
31126 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);
31127 }, "JU.M4,JU.M4");
31128 Clazz_defineMethod (c$, "transform", 
31129 function (vec) {
31130 this.transform2 (vec, vec);
31131 }, "JU.T4");
31132 Clazz_defineMethod (c$, "transform2", 
31133 function (vec, vecOut) {
31134 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);
31135 }, "JU.T4,JU.T4");
31136 Clazz_defineMethod (c$, "rotTrans", 
31137 function (point) {
31138 this.rotTrans2 (point, point);
31139 }, "JU.T3");
31140 Clazz_defineMethod (c$, "rotTrans2", 
31141 function (point, pointOut) {
31142 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);
31143 return pointOut;
31144 }, "JU.T3,JU.T3");
31145 Clazz_defineMethod (c$, "setAsXYRotation", 
31146 function (angle) {
31147 this.setIdentity ();
31148 var c = Math.cos (angle);
31149 var s = Math.sin (angle);
31150 this.m22 = c;
31151 this.m23 = -s;
31152 this.m32 = s;
31153 this.m33 = c;
31154 return this;
31155 }, "~N");
31156 Clazz_defineMethod (c$, "setAsYZRotation", 
31157 function (angle) {
31158 this.setIdentity ();
31159 var c = Math.cos (angle);
31160 var s = Math.sin (angle);
31161 this.m00 = c;
31162 this.m03 = -s;
31163 this.m30 = s;
31164 this.m33 = c;
31165 return this;
31166 }, "~N");
31167 Clazz_defineMethod (c$, "setAsXZRotation", 
31168 function (angle) {
31169 this.setIdentity ();
31170 var c = Math.cos (angle);
31171 var s = Math.sin (angle);
31172 this.m11 = c;
31173 this.m13 = -s;
31174 this.m31 = s;
31175 this.m33 = c;
31176 return this;
31177 }, "~N");
31178 Clazz_overrideMethod (c$, "equals", 
31179 function (o) {
31180 if (!(Clazz_instanceOf (o, JU.M4))) return false;
31181 var m = o;
31182 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);
31183 }, "~O");
31184 Clazz_overrideMethod (c$, "hashCode", 
31185 function () {
31186 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);
31187 });
31188 Clazz_overrideMethod (c$, "toString", 
31189 function () {
31190 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 + "] ]";
31191 });
31192 });
31193 Clazz_declarePackage ("JU");
31194 Clazz_load (["javajs.api.JSONEncodable"], "JU.T3", ["java.lang.Float"], function () {
31195 c$ = Clazz_decorateAsClass (function () {
31196 this.x = 0;
31197 this.y = 0;
31198 this.z = 0;
31199 Clazz_instantialize (this, arguments);
31200 }, JU, "T3", null, [javajs.api.JSONEncodable, java.io.Serializable]);
31201 Clazz_defineMethod (c$, "set", 
31202 function (x, y, z) {
31203 this.x = x;
31204 this.y = y;
31205 this.z = z;
31206 }, "~N,~N,~N");
31207 Clazz_defineMethod (c$, "setA", 
31208 function (t) {
31209 this.x = t[0];
31210 this.y = t[1];
31211 this.z = t[2];
31212 }, "~A");
31213 Clazz_defineMethod (c$, "setT", 
31214 function (t1) {
31215 this.x = t1.x;
31216 this.y = t1.y;
31217 this.z = t1.z;
31218 }, "JU.T3");
31219 Clazz_defineMethod (c$, "add2", 
31220 function (t1, t2) {
31221 this.x = t1.x + t2.x;
31222 this.y = t1.y + t2.y;
31223 this.z = t1.z + t2.z;
31224 }, "JU.T3,JU.T3");
31225 Clazz_defineMethod (c$, "add", 
31226 function (t1) {
31227 this.x += t1.x;
31228 this.y += t1.y;
31229 this.z += t1.z;
31230 }, "JU.T3");
31231 Clazz_defineMethod (c$, "distanceSquared", 
31232 function (p1) {
31233 var dx = this.x - p1.x;
31234 var dy = this.y - p1.y;
31235 var dz = this.z - p1.z;
31236 return (dx * dx + dy * dy + dz * dz);
31237 }, "JU.T3");
31238 Clazz_defineMethod (c$, "distance", 
31239 function (p1) {
31240 return Math.sqrt (this.distanceSquared (p1));
31241 }, "JU.T3");
31242 Clazz_defineMethod (c$, "sub2", 
31243 function (t1, t2) {
31244 this.x = t1.x - t2.x;
31245 this.y = t1.y - t2.y;
31246 this.z = t1.z - t2.z;
31247 }, "JU.T3,JU.T3");
31248 Clazz_defineMethod (c$, "sub", 
31249 function (t1) {
31250 this.x -= t1.x;
31251 this.y -= t1.y;
31252 this.z -= t1.z;
31253 }, "JU.T3");
31254 Clazz_defineMethod (c$, "scale", 
31255 function (s) {
31256 this.x *= s;
31257 this.y *= s;
31258 this.z *= s;
31259 }, "~N");
31260 Clazz_defineMethod (c$, "add3", 
31261 function (a, b, c) {
31262 this.x += a;
31263 this.y += b;
31264 this.z += c;
31265 }, "~N,~N,~N");
31266 Clazz_defineMethod (c$, "scaleT", 
31267 function (p) {
31268 this.x *= p.x;
31269 this.y *= p.y;
31270 this.z *= p.z;
31271 }, "JU.T3");
31272 Clazz_defineMethod (c$, "scaleAdd2", 
31273 function (s, t1, t2) {
31274 this.x = s * t1.x + t2.x;
31275 this.y = s * t1.y + t2.y;
31276 this.z = s * t1.z + t2.z;
31277 }, "~N,JU.T3,JU.T3");
31278 Clazz_defineMethod (c$, "ave", 
31279 function (a, b) {
31280 this.x = (a.x + b.x) / 2;
31281 this.y = (a.y + b.y) / 2;
31282 this.z = (a.z + b.z) / 2;
31283 }, "JU.T3,JU.T3");
31284 Clazz_defineMethod (c$, "dot", 
31285 function (v) {
31286 return this.x * v.x + this.y * v.y + this.z * v.z;
31287 }, "JU.T3");
31288 Clazz_defineMethod (c$, "lengthSquared", 
31289 function () {
31290 return this.x * this.x + this.y * this.y + this.z * this.z;
31291 });
31292 Clazz_defineMethod (c$, "length", 
31293 function () {
31294 return Math.sqrt (this.lengthSquared ());
31295 });
31296 Clazz_defineMethod (c$, "normalize", 
31297 function () {
31298 var d = this.length ();
31299 this.x /= d;
31300 this.y /= d;
31301 this.z /= d;
31302 });
31303 Clazz_defineMethod (c$, "cross", 
31304 function (v1, v2) {
31305 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);
31306 }, "JU.T3,JU.T3");
31307 Clazz_overrideMethod (c$, "hashCode", 
31308 function () {
31309 var bits = 1;
31310 bits = 31 * bits + JU.T3.floatToIntBits0 (this.x);
31311 bits = 31 * bits + JU.T3.floatToIntBits0 (this.y);
31312 bits = 31 * bits + JU.T3.floatToIntBits0 (this.z);
31313 return (bits ^ (bits >> 32));
31314 });
31315 c$.floatToIntBits0 = Clazz_defineMethod (c$, "floatToIntBits0", 
31316 function (f) {
31317 return (f == 0 ? 0 : Float.floatToIntBits (f));
31318 }, "~N");
31319 Clazz_overrideMethod (c$, "equals", 
31320 function (t1) {
31321 if (!(Clazz_instanceOf (t1, JU.T3))) return false;
31322 var t2 = t1;
31323 return (this.x == t2.x && this.y == t2.y && this.z == t2.z);
31324 }, "~O");
31325 Clazz_overrideMethod (c$, "toString", 
31326 function () {
31327 return "{" + this.x + ", " + this.y + ", " + this.z + "}";
31328 });
31329 Clazz_overrideMethod (c$, "toJSON", 
31330 function () {
31331 return "[" + this.x + "," + this.y + "," + this.z + "]";
31332 });
31333 });
31334 Clazz_declarePackage ("javax.swing");
31335 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 () {
31336 c$ = Clazz_decorateAsClass (function () {
31337 this.windowDecorationStyle = 0;
31338 this.menuBar = null;
31339 this.contentPane = null;
31340 this.layeredPane = null;
31341 this.glassPane = null;
31342 this.defaultButton = null;
31343 this.defaultPressAction = null;
31344 this.defaultReleaseAction = null;
31345 this.useTrueDoubleBuffering = true;
31346 if (!Clazz_isClassDefined ("javax.swing.JRootPane.RootLayout")) {
31347 javax.swing.JRootPane.$JRootPane$RootLayout$ ();
31348 }
31349 Clazz_instantialize (this, arguments);
31350 }, javax.swing, "JRootPane", javax.swing.JComponent);
31351 Clazz_makeConstructor (c$, 
31352 function () {
31353 Clazz_superConstructor (this, javax.swing.JRootPane, []);
31354 var appletName = jssun.awt.AppContext.getAppContext ().getThreadGroup ().getName ();
31355 this.setName (appletName + ".JRootPane");
31356 this.setGlassPane (this.createGlassPane ());
31357 this.setLayeredPane (this.createLayeredPane ());
31358 this.setContentPane (this.createContentPane ());
31359 this.setLayout (this.createRootLayout ());
31360 this.updateUI ();
31361 });
31362 Clazz_overrideMethod (c$, "setDoubleBuffered", 
31363 function (aFlag) {
31364 }, "~B");
31365 Clazz_defineMethod (c$, "getWindowDecorationStyle", 
31366 function () {
31367 return this.windowDecorationStyle;
31368 });
31369 Clazz_defineMethod (c$, "setWindowDecorationStyle", 
31370 function (windowDecorationStyle) {
31371 if (windowDecorationStyle < 0 || windowDecorationStyle > 8) {
31372 throw  new IllegalArgumentException ("Invalid decoration style");
31373 }var oldWindowDecorationStyle = this.getWindowDecorationStyle ();
31374 this.windowDecorationStyle = windowDecorationStyle;
31375 this.firePropertyChangeInt ("windowDecorationStyle", oldWindowDecorationStyle, windowDecorationStyle);
31376 }, "~N");
31377 Clazz_overrideMethod (c$, "getUI", 
31378 function () {
31379 return this.ui;
31380 });
31381 Clazz_overrideMethod (c$, "updateUI", 
31382 function () {
31383 this.setUI (javax.swing.UIManager.getUI (this));
31384 });
31385 Clazz_overrideMethod (c$, "getUIClassID", 
31386 function () {
31387 return "RootPaneUI";
31388 });
31389 Clazz_defineMethod (c$, "createLayeredPane", 
31390 function () {
31391 var p =  new javax.swing.JLayeredPane ();
31392 p.setName (this.getName () + ".layeredPane");
31393 return p;
31394 });
31395 Clazz_defineMethod (c$, "createContentPane", 
31396 function () {
31397 var c =  new javax.swing.JPanel ();
31398 c.setName (this.getName () + ".contentPane");
31399 c.setLayout (((Clazz_isClassDefined ("javax.swing.JRootPane$1") ? 0 : javax.swing.JRootPane.$JRootPane$1$ ()), Clazz_innerTypeInstance (javax.swing.JRootPane$1, this, null)));
31400 return c;
31401 });
31402 Clazz_defineMethod (c$, "createGlassPane", 
31403 function () {
31404 var c =  new javax.swing.JPanel ();
31405 c.setName (this.getName () + ".glassPane");
31406 c.setVisible (false);
31407 (c).setOpaque (false);
31408 return c;
31409 });
31410 Clazz_defineMethod (c$, "createRootLayout", 
31411 function () {
31412 return Clazz_innerTypeInstance (javax.swing.JRootPane.RootLayout, this, null);
31413 });
31414 Clazz_defineMethod (c$, "setJMenuBar", 
31415 function (menu) {
31416 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31417 this.menuBar = menu;
31418 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31419 }, "javax.swing.JMenuBar");
31420 Clazz_defineMethod (c$, "setMenuBar", 
31421 function (menu) {
31422 if (this.menuBar != null && this.menuBar.getParent () === this.layeredPane) this.layeredPane.remove (this.menuBar);
31423 this.menuBar = menu;
31424 if (this.menuBar != null) this.layeredPane.add (this.menuBar, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31425 }, "javax.swing.JMenuBar");
31426 Clazz_defineMethod (c$, "getJMenuBar", 
31427 function () {
31428 return this.menuBar;
31429 });
31430 Clazz_defineMethod (c$, "getMenuBar", 
31431 function () {
31432 return this.menuBar;
31433 });
31434 Clazz_defineMethod (c$, "setContentPane", 
31435 function (content) {
31436 if (content == null) throw  new java.awt.IllegalComponentStateException ("contentPane cannot be set to null.");
31437 if (this.contentPane != null && this.contentPane.getParent () === this.layeredPane) this.layeredPane.remove (this.contentPane);
31438 this.contentPane = content;
31439 this.layeredPane.add (this.contentPane, javax.swing.JLayeredPane.FRAME_CONTENT_LAYER);
31440 }, "java.awt.Container");
31441 Clazz_defineMethod (c$, "getContentPane", 
31442 function () {
31443 return this.contentPane;
31444 });
31445 Clazz_defineMethod (c$, "setLayeredPane", 
31446 function (layered) {
31447 if (layered == null) throw  new java.awt.IllegalComponentStateException ("layeredPane cannot be set to null.");
31448 if (this.layeredPane != null && this.layeredPane.getParent () === this) this.remove (this.layeredPane);
31449 this.layeredPane = layered;
31450 this.add (this.layeredPane, -1);
31451 }, "javax.swing.JLayeredPane");
31452 Clazz_defineMethod (c$, "getLayeredPane", 
31453 function () {
31454 return this.layeredPane;
31455 });
31456 Clazz_defineMethod (c$, "setGlassPane", 
31457 function (glass) {
31458 if (glass == null) {
31459 throw  new NullPointerException ("glassPane cannot be set to null.");
31460 }var visible = false;
31461 if (this.glassPane != null && this.glassPane.getParent () === this) {
31462 this.remove (this.glassPane);
31463 visible = this.glassPane.isVisible ();
31464 }glass.setVisible (visible);
31465 this.glassPane = glass;
31466 this.add (this.glassPane, 0);
31467 if (visible) {
31468 this.repaint ();
31469 }}, "java.awt.Component");
31470 Clazz_defineMethod (c$, "getGlassPane", 
31471 function () {
31472 return this.glassPane;
31473 });
31474 Clazz_overrideMethod (c$, "isValidateRoot", 
31475 function () {
31476 return true;
31477 });
31478 Clazz_overrideMethod (c$, "isOptimizedDrawingEnabled", 
31479 function () {
31480 return !this.glassPane.isVisible ();
31481 });
31482 Clazz_defineMethod (c$, "addNotify", 
31483 function () {
31484 Clazz_superCall (this, javax.swing.JRootPane, "addNotify", []);
31485 this.enableEvents (8);
31486 });
31487 Clazz_defineMethod (c$, "setDefaultButton", 
31488 function (defaultButton) {
31489 var oldDefault = this.defaultButton;
31490 if (oldDefault !== defaultButton) {
31491 this.defaultButton = defaultButton;
31492 if (oldDefault != null) {
31493 oldDefault.repaint ();
31494 }if (defaultButton != null) {
31495 defaultButton.repaint ();
31496 }}this.firePropertyChangeObject ("defaultButton", oldDefault, defaultButton);
31497 }, "javax.swing.JButton");
31498 Clazz_defineMethod (c$, "getDefaultButton", 
31499 function () {
31500 return this.defaultButton;
31501 });
31502 Clazz_defineMethod (c$, "setUseTrueDoubleBuffering", 
31503 function (useTrueDoubleBuffering) {
31504 this.useTrueDoubleBuffering = useTrueDoubleBuffering;
31505 }, "~B");
31506 Clazz_defineMethod (c$, "getUseTrueDoubleBuffering", 
31507 function () {
31508 return this.useTrueDoubleBuffering;
31509 });
31510 Clazz_defineMethod (c$, "disableTrueDoubleBuffering", 
31511 function () {
31512 });
31513 Clazz_overrideMethod (c$, "addImpl", 
31514 function (comp, constraints, index) {
31515 this.addImplSAEM (comp, constraints, index);
31516 if (this.glassPane != null && this.glassPane.getParent () === this && this.getComponent (0) !== this.glassPane) {
31517 this.add (this.glassPane, 0);
31518 }return comp;
31519 }, "java.awt.Component,~O,~N");
31520 c$.$JRootPane$RootLayout$ = function () {
31521 Clazz_pu$h(self.c$);
31522 c$ = Clazz_decorateAsClass (function () {
31523 Clazz_prepareCallback (this, arguments);
31524 Clazz_instantialize (this, arguments);
31525 }, javax.swing.JRootPane, "RootLayout", null, java.awt.LayoutManager2);
31526 Clazz_overrideMethod (c$, "preferredLayoutSize", 
31527 function (a) {
31528 var b;
31529 var c;
31530 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31531 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31532 b = this.b$["javax.swing.JRootPane"].contentPane.getPreferredSize ();
31533 } else {
31534 b = a.getSize ();
31535 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31536 c = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31537 } else {
31538 c =  new java.awt.Dimension (0, 0);
31539 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31540 }, "java.awt.Container");
31541 Clazz_overrideMethod (c$, "minimumLayoutSize", 
31542 function (a) {
31543 var b;
31544 var c;
31545 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31546 if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31547 b = this.b$["javax.swing.JRootPane"].contentPane.getMinimumSize ();
31548 } else {
31549 b = a.getSize ();
31550 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31551 c = this.b$["javax.swing.JRootPane"].menuBar.getMinimumSize ();
31552 } else {
31553 c =  new java.awt.Dimension (0, 0);
31554 }return  new java.awt.Dimension (Math.max (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31555 }, "java.awt.Container");
31556 Clazz_overrideMethod (c$, "maximumLayoutSize", 
31557 function (a) {
31558 var b;
31559 var c;
31560 var d = this.b$["javax.swing.JRootPane"].getInsets ();
31561 if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31562 c = this.b$["javax.swing.JRootPane"].menuBar.getMaximumSize ();
31563 } else {
31564 c =  new java.awt.Dimension (0, 0);
31565 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31566 b = this.b$["javax.swing.JRootPane"].contentPane.getMaximumSize ();
31567 } else {
31568 b =  new java.awt.Dimension (2147483647, 2147483647 - d.top - d.bottom - c.height - 1);
31569 }return  new java.awt.Dimension (Math.min (b.width, c.width) + d.left + d.right, b.height + c.height + d.top + d.bottom);
31570 }, "java.awt.Container");
31571 Clazz_overrideMethod (c$, "layoutContainer", 
31572 function (a) {
31573 var b = a.getBounds ();
31574 var c = this.b$["javax.swing.JRootPane"].getInsets ();
31575 var d = 0;
31576 var e = b.width - c.right - c.left;
31577 var f = b.height - c.top - c.bottom;
31578 if (this.b$["javax.swing.JRootPane"].layeredPane != null) {
31579 this.b$["javax.swing.JRootPane"].layeredPane.setBounds (c.left, c.top, e, f);
31580 }if (this.b$["javax.swing.JRootPane"].glassPane != null) {
31581 this.b$["javax.swing.JRootPane"].glassPane.setBounds (c.left, c.top, e, f);
31582 }if (this.b$["javax.swing.JRootPane"].menuBar != null && this.b$["javax.swing.JRootPane"].menuBar.isVisible ()) {
31583 var g = this.b$["javax.swing.JRootPane"].menuBar.getPreferredSize ();
31584 this.b$["javax.swing.JRootPane"].menuBar.setBounds (0, 0, e, g.height);
31585 d += g.height;
31586 }if (this.b$["javax.swing.JRootPane"].contentPane != null) {
31587 this.b$["javax.swing.JRootPane"].contentPane.setBounds (0, d, e, f - d);
31588 }}, "java.awt.Container");
31589 Clazz_defineMethod (c$, "addLayoutComponent", 
31590 function (a, b) {
31591 }, "~S,java.awt.Component");
31592 Clazz_overrideMethod (c$, "removeLayoutComponent", 
31593 function (a) {
31594 }, "java.awt.Component");
31595 Clazz_defineMethod (c$, "addLayoutComponent", 
31596 function (a, b) {
31597 }, "java.awt.Component,~O");
31598 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
31599 function (a) {
31600 return 0.0;
31601 }, "java.awt.Container");
31602 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
31603 function (a) {
31604 return 0.0;
31605 }, "java.awt.Container");
31606 Clazz_overrideMethod (c$, "invalidateLayout", 
31607 function (a) {
31608 }, "java.awt.Container");
31609 c$ = Clazz_p0p ();
31610 };
31611 c$.$JRootPane$1$ = function () {
31612 Clazz_pu$h(self.c$);
31613 c$ = Clazz_declareAnonymous (javax.swing, "JRootPane$1", java.awt.BorderLayout);
31614 Clazz_defineMethod (c$, "addLayoutComponent", 
31615 function (comp, constraints) {
31616 if (constraints == null) {
31617 constraints = "Center";
31618 }Clazz_superCall (this, javax.swing.JRootPane$1, "addLayoutComponent", [comp, constraints]);
31619 }, "java.awt.Component,~O");
31620 c$ = Clazz_p0p ();
31621 };
31622 Clazz_pu$h(self.c$);
31623 c$ = Clazz_decorateAsClass (function () {
31624 this.owner = null;
31625 this.root = null;
31626 this.press = false;
31627 Clazz_instantialize (this, arguments);
31628 }, javax.swing.JRootPane, "DefaultAction", javax.swing.AbstractAction);
31629 Clazz_makeConstructor (c$, 
31630 function (a, b) {
31631 Clazz_superConstructor (this, javax.swing.JRootPane.DefaultAction, []);
31632 this.root = a;
31633 this.press = b;
31634 }, "javax.swing.JRootPane,~B");
31635 Clazz_defineMethod (c$, "setOwner", 
31636 function (a) {
31637 this.owner = a;
31638 }, "javax.swing.JButton");
31639 Clazz_overrideMethod (c$, "actionPerformed", 
31640 function (a) {
31641 if (this.owner != null && javax.swing.SwingUtilities.getRootPane (this.owner) === this.root) {
31642 var b = this.owner.getModel ();
31643 if (this.press) {
31644 b.setArmed (true);
31645 b.setPressed (true);
31646 } else {
31647 b.setPressed (false);
31648 }}}, "java.awt.event.ActionEvent");
31649 Clazz_overrideMethod (c$, "isEnabled", 
31650 function () {
31651 return this.owner.getModel ().isEnabled ();
31652 });
31653 c$ = Clazz_p0p ();
31654 Clazz_defineStatics (c$,
31655 "$uiClassID", "RootPaneUI",
31656 "NONE", 0,
31657 "FRAME", 1,
31658 "PLAIN_DIALOG", 2,
31659 "INFORMATION_DIALOG", 3,
31660 "ERROR_DIALOG", 4,
31661 "COLOR_CHOOSER_DIALOG", 5,
31662 "FILE_CHOOSER_DIALOG", 6,
31663 "QUESTION_DIALOG", 7,
31664 "WARNING_DIALOG", 8);
31665 });
31666 Clazz_declarePackage ("javax.swing");
31667 Clazz_load (["javax.swing.AbstractButton", "$.DefaultButtonModel"], "javax.swing.JToggleButton", ["java.awt.EventQueue", "java.awt.event.ActionEvent", "$.InputEvent", "$.ItemEvent", "javax.swing.UIManager"], function () {
31668 c$ = Clazz_declareType (javax.swing, "JToggleButton", javax.swing.AbstractButton);
31669 Clazz_makeConstructor (c$, 
31670 function () {
31671 this.construct (null, null, false);
31672 });
31673 Clazz_makeConstructor (c$, 
31674 function (icon) {
31675 this.construct (null, icon, false);
31676 }, "javax.swing.Icon");
31677 Clazz_makeConstructor (c$, 
31678 function (icon, selected) {
31679 this.construct (null, icon, selected);
31680 }, "javax.swing.Icon,~B");
31681 Clazz_makeConstructor (c$, 
31682 function (text) {
31683 this.construct (text, null, false);
31684 }, "~S");
31685 Clazz_makeConstructor (c$, 
31686 function (text, selected) {
31687 this.construct (text, null, selected);
31688 }, "~S,~B");
31689 Clazz_makeConstructor (c$, 
31690 function (a) {
31691 this.construct ();
31692 this.setAction (a);
31693 }, "javax.swing.Action");
31694 Clazz_makeConstructor (c$, 
31695 function (text, icon) {
31696 this.construct (text, icon, false);
31697 }, "~S,javax.swing.Icon");
31698 Clazz_makeConstructor (c$, 
31699 function (text, icon, selected) {
31700 Clazz_superConstructor (this, javax.swing.JToggleButton, []);
31701 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
31702 this.model.setSelected (selected);
31703 this.init (text, icon);
31704 }, "~S,javax.swing.Icon,~B");
31705 Clazz_overrideMethod (c$, "updateUI", 
31706 function () {
31707 this.setUI (javax.swing.UIManager.getUI (this));
31708 });
31709 Clazz_overrideMethod (c$, "getUIClassID", 
31710 function () {
31711 return "ToggleButtonUI";
31712 });
31713 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
31714 function () {
31715 return true;
31716 });
31717 Clazz_pu$h(self.c$);
31718 c$ = Clazz_declareType (javax.swing.JToggleButton, "ToggleButtonModel", javax.swing.DefaultButtonModel);
31719 Clazz_makeConstructor (c$, 
31720 function () {
31721 Clazz_superConstructor (this, javax.swing.JToggleButton.ToggleButtonModel, []);
31722 });
31723 Clazz_overrideMethod (c$, "isSelected", 
31724 function () {
31725 return (this.stateMask & 2) != 0;
31726 });
31727 Clazz_overrideMethod (c$, "setSelected", 
31728 function (a) {
31729 var b = this.getGroup ();
31730 if (b != null) {
31731 b.setSelected (this, a);
31732 a = b.isSelected (this);
31733 }if (this.isSelected () == a) {
31734 return;
31735 }if (a) {
31736 this.stateMask |= 2;
31737 } else {
31738 this.stateMask &= -3;
31739 }this.fireStateChanged ();
31740 this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, this.isSelected () ? 1 : 2));
31741 }, "~B");
31742 Clazz_overrideMethod (c$, "setPressed", 
31743 function (a) {
31744 if ((this.isPressed () == a) || !this.isEnabled ()) {
31745 return;
31746 }if (a == false && this.isArmed ()) {
31747 this.setSelected (!this.isSelected ());
31748 }if (a) {
31749 this.stateMask |= 4;
31750 } else {
31751 this.stateMask &= -5;
31752 }this.fireStateChanged ();
31753 if (!this.isPressed () && this.isArmed ()) {
31754 var b = 0;
31755 var c = java.awt.EventQueue.getCurrentEvent ();
31756 if (Clazz_instanceOf (c, java.awt.event.InputEvent)) {
31757 b = (c).getModifiers ();
31758 } else if (Clazz_instanceOf (c, java.awt.event.ActionEvent)) {
31759 b = (c).getModifiers ();
31760 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), b));
31761 }}, "~B");
31762 c$ = Clazz_p0p ();
31763 Clazz_defineStatics (c$,
31764 "$uiClassID", "ToggleButtonUI");
31765 });
31766 Clazz_declarePackage ("javax.swing");
31767 Clazz_load (["java.awt.ItemSelectable"], "javax.swing.ButtonModel", null, function () {
31768 Clazz_declareInterface (javax.swing, "ButtonModel", java.awt.ItemSelectable);
31769 });
31770 Clazz_declarePackage ("javax.swing");
31771 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JRadioButton", ["javax.swing.UIManager"], function () {
31772 c$ = Clazz_declareType (javax.swing, "JRadioButton", javax.swing.JToggleButton);
31773 Clazz_makeConstructor (c$, 
31774 function () {
31775 this.construct (null, null, false);
31776 });
31777 Clazz_makeConstructor (c$, 
31778 function (icon) {
31779 this.construct (null, icon, false);
31780 }, "javax.swing.Icon");
31781 Clazz_makeConstructor (c$, 
31782 function (a) {
31783 this.construct ();
31784 this.setAction (a);
31785 }, "javax.swing.Action");
31786 Clazz_makeConstructor (c$, 
31787 function (icon, selected) {
31788 this.construct (null, icon, selected);
31789 }, "javax.swing.Icon,~B");
31790 Clazz_makeConstructor (c$, 
31791 function (text) {
31792 this.construct (text, null, false);
31793 }, "~S");
31794 Clazz_makeConstructor (c$, 
31795 function (text, selected) {
31796 this.construct (text, null, selected);
31797 }, "~S,~B");
31798 Clazz_makeConstructor (c$, 
31799 function (text, icon) {
31800 this.construct (text, icon, false);
31801 }, "~S,javax.swing.Icon");
31802 Clazz_makeConstructor (c$, 
31803 function (text, icon, selected) {
31804 Clazz_superConstructor (this, javax.swing.JRadioButton, [text, icon, selected]);
31805 this.setBorderPainted (false);
31806 this.setHorizontalAlignment (10);
31807 }, "~S,javax.swing.Icon,~B");
31808 Clazz_overrideMethod (c$, "updateUI", 
31809 function () {
31810 this.setUI (javax.swing.UIManager.getUI (this));
31811 });
31812 Clazz_overrideMethod (c$, "getUIClassID", 
31813 function () {
31814 return "RadioButtonUI";
31815 });
31816 Clazz_overrideMethod (c$, "setIconFromAction", 
31817 function (a) {
31818 }, "javax.swing.Action");
31819 Clazz_defineStatics (c$,
31820 "$$uiClassID", "RadioButtonUI");
31821 });
31822 Clazz_declarePackage ("javax.swing");
31823 Clazz_load (["java.applet.Applet", "javax.swing.RootPaneContainer"], "javax.swing.JApplet", ["java.awt.BorderLayout", "$.Color", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
31824 c$ = Clazz_decorateAsClass (function () {
31825 this.rootPane = null;
31826 this.rootPaneCheckingEnabled = false;
31827 this.transferHandler = null;
31828 Clazz_instantialize (this, arguments);
31829 }, javax.swing, "JApplet", java.applet.Applet, javax.swing.RootPaneContainer);
31830 Clazz_makeConstructor (c$, 
31831 function () {
31832 Clazz_superConstructor (this, javax.swing.JApplet, []);
31833 this.setJApplet ();
31834 });
31835 Clazz_defineMethod (c$, "setJApplet", 
31836  function () {
31837 this.setPanel ();
31838 this.setForeground (java.awt.Color.black);
31839 this.setBackground (java.awt.Color.white);
31840 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
31841 this.setLayout ( new java.awt.BorderLayout ());
31842 this.setRootPane (this.createRootPane ());
31843 this.setRootPaneCheckingEnabled (true);
31844 this.setFocusTraversalPolicyProvider (true);
31845 this.enableEvents (8);
31846 });
31847 Clazz_defineMethod (c$, "createRootPane", 
31848 function () {
31849 var rp =  new javax.swing.JRootPane ();
31850 rp.setOpaque (true);
31851 return rp;
31852 });
31853 Clazz_defineMethod (c$, "setTransferHandler", 
31854 function (newHandler) {
31855 var oldHandler = this.transferHandler;
31856 this.transferHandler = newHandler;
31857 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
31858 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
31859 }, "javax.swing.TransferHandler");
31860 Clazz_defineMethod (c$, "getTransferHandler", 
31861 function () {
31862 return this.transferHandler;
31863 });
31864 Clazz_defineMethod (c$, "paint", 
31865 function (g) {
31866 this.getContentPane ().paint (g);
31867 }, "java.awt.Graphics");
31868 Clazz_overrideMethod (c$, "update", 
31869 function (g) {
31870 this.paint (g);
31871 }, "java.awt.Graphics");
31872 Clazz_defineMethod (c$, "setJMenuBar", 
31873 function (menuBar) {
31874 this.getRootPane ().setMenuBar (menuBar);
31875 }, "javax.swing.JMenuBar");
31876 Clazz_defineMethod (c$, "getJMenuBar", 
31877 function () {
31878 return this.getRootPane ().getMenuBar ();
31879 });
31880 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
31881 function () {
31882 return this.rootPaneCheckingEnabled;
31883 });
31884 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
31885 function (enabled) {
31886 this.rootPaneCheckingEnabled = enabled;
31887 }, "~B");
31888 Clazz_overrideMethod (c$, "addImpl", 
31889 function (comp, constraints, index) {
31890 if (this.isRootPaneCheckingEnabled ()) {
31891 return this.getContentPane ().add (comp, constraints, index);
31892 }return this.addImplSAEM (comp, constraints, index);
31893 }, "java.awt.Component,~O,~N");
31894 Clazz_defineMethod (c$, "remove", 
31895 function (comp) {
31896 if (comp === this.rootPane) {
31897 this.removeChild (comp);
31898 } else {
31899 this.getContentPane ().removeChild (comp);
31900 }}, "java.awt.Component");
31901 Clazz_defineMethod (c$, "setLayout", 
31902 function (manager) {
31903 if (this.isRootPaneCheckingEnabled ()) {
31904 this.getContentPane ().setLayout (manager);
31905 } else {
31906 Clazz_superCall (this, javax.swing.JApplet, "setLayout", [manager]);
31907 }}, "java.awt.LayoutManager");
31908 Clazz_overrideMethod (c$, "getRootPane", 
31909 function () {
31910 return this.rootPane;
31911 });
31912 Clazz_defineMethod (c$, "setRootPane", 
31913 function (root) {
31914 if (this.rootPane != null) {
31915 this.remove (this.rootPane);
31916 }this.rootPane = root;
31917 if (this.rootPane != null) {
31918 var checkingEnabled = this.isRootPaneCheckingEnabled ();
31919 try {
31920 this.setRootPaneCheckingEnabled (false);
31921 this.add (this.rootPane, "Center");
31922 } finally {
31923 this.setRootPaneCheckingEnabled (checkingEnabled);
31924 }
31925 }}, "javax.swing.JRootPane");
31926 Clazz_overrideMethod (c$, "getContentPane", 
31927 function () {
31928 return this.getRootPane ().getContentPane ();
31929 });
31930 Clazz_overrideMethod (c$, "setContentPane", 
31931 function (contentPane) {
31932 this.getRootPane ().setContentPane (contentPane);
31933 }, "java.awt.Container");
31934 Clazz_overrideMethod (c$, "getLayeredPane", 
31935 function () {
31936 return this.getRootPane ().getLayeredPane ();
31937 });
31938 Clazz_overrideMethod (c$, "setLayeredPane", 
31939 function (layeredPane) {
31940 this.getRootPane ().setLayeredPane (layeredPane);
31941 }, "javax.swing.JLayeredPane");
31942 Clazz_overrideMethod (c$, "getGlassPane", 
31943 function () {
31944 return this.getRootPane ().getGlassPane ();
31945 });
31946 Clazz_overrideMethod (c$, "setGlassPane", 
31947 function (glassPane) {
31948 this.getRootPane ().setGlassPane (glassPane);
31949 }, "java.awt.Component");
31950 Clazz_defineMethod (c$, "getGraphics", 
31951 function () {
31952 javax.swing.JComponent.getGraphicsInvoked (this);
31953 return Clazz_superCall (this, javax.swing.JApplet, "getGraphics", []);
31954 });
31955 Clazz_defineMethod (c$, "repaint", 
31956 function (time, x, y, width, height) {
31957 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
31958 System.out.println ("repaintNow " + this);
31959 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
31960 } else {
31961 Clazz_superCall (this, javax.swing.JApplet, "repaint", [time, x, y, width, height]);
31962 }}, "~N,~N,~N,~N,~N");
31963 Clazz_defineMethod (c$, "repaintNow", 
31964 function () {
31965 this.repaint (100, 0, 0, this.getWidth (), this.getHeight ());
31966 });
31967 Clazz_defineMethod (c$, "paramString", 
31968 function () {
31969 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
31970 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
31971 return Clazz_superCall (this, javax.swing.JApplet, "paramString", []) + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
31972 });
31973 });
31974 Clazz_declarePackage ("java.awt");
31975 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 () {
31976 c$ = Clazz_decorateAsClass (function () {
31977 this.queues = null;
31978 this.nextQueue = null;
31979 this.previousQueue = null;
31980 this.dispatchThread = null;
31981 this.threadGroup = null;
31982 this.mostRecentEventTime = 0;
31983 this.currentEvent = null;
31984 this.waitForID = 0;
31985 this.name = null;
31986 Clazz_instantialize (this, arguments);
31987 }, java.awt, "EventQueue");
31988 Clazz_prepareFields (c$, function () {
31989 this.queues =  new Array (4);
31990 this.threadGroup = Thread.currentThread ().getThreadGroup ();
31991 this.mostRecentEventTime = System.currentTimeMillis ();
31992 this.name = "AWT-EventQueue-" + java.awt.EventQueue.nextThreadNum ();
31993 });
31994 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
31995  function () {
31996 return java.awt.EventQueue.threadInitNumber++;
31997 });
31998 c$.noEvents = Clazz_defineMethod (c$, "noEvents", 
31999 function (eventQueue) {
32000 return eventQueue.noEvents ();
32001 }, "java.awt.EventQueue");
32002 c$.getNextQueue = Clazz_defineMethod (c$, "getNextQueue", 
32003 function (eventQueue) {
32004 return eventQueue.nextQueue;
32005 }, "java.awt.EventQueue");
32006 c$.removeSourceEvents = Clazz_defineMethod (c$, "removeSourceEvents", 
32007 function (eventQueue, source, removeAllEvents) {
32008 eventQueue.removeSourceEvents (source, removeAllEvents);
32009 }, "java.awt.EventQueue,~O,~B");
32010 Clazz_makeConstructor (c$, 
32011 function () {
32012 for (var i = 0; i < 4; i++) {
32013 this.queues[i] =  new java.awt.Queue ();
32014 }
32015 });
32016 Clazz_defineMethod (c$, "postEvent", 
32017 function (event) {
32018 jssun.awt.SunToolkit.flushPendingEvents ();
32019 this.postEventPrivate (event);
32020 }, "java.awt.AWTEvent");
32021 Clazz_defineMethod (c$, "postEventPrivate", 
32022 function (theEvent) {
32023 theEvent.isPosted = true;
32024 {
32025 if (this.dispatchThread == null && this.nextQueue == null) {
32026 if (theEvent.getSource () === jssun.awt.AWTAutoShutdown.getInstance ()) {
32027 return;
32028 } else {
32029 this.initDispatchThread ();
32030 }}if (this.nextQueue != null) {
32031 this.nextQueue.postEventPrivate (theEvent);
32032 return;
32033 }this.postEventNow (theEvent, java.awt.EventQueue.getPriority (theEvent));
32034 }}, "java.awt.AWTEvent");
32035 c$.getPriority = Clazz_defineMethod (c$, "getPriority", 
32036  function (theEvent) {
32037 if (Clazz_instanceOf (theEvent, jssun.awt.PeerEvent)) {
32038 var flags = (theEvent).getFlags ();
32039 if ((flags & 2) != 0) return 3;
32040 if ((flags & 1) != 0) return 2;
32041 if ((flags & 4) != 0) return 0;
32042 }switch (theEvent.getID ()) {
32043 case 1201:
32044 case 800:
32045 case 801:
32046 return 0;
32047 default:
32048 return 1;
32049 }
32050 }, "java.awt.AWTEvent");
32051 Clazz_defineMethod (c$, "postEventNow", 
32052  function (theEvent, priority) {
32053 if (this.coalesceEvent (theEvent, priority)) {
32054 return;
32055 }var newItem =  new java.awt.EventQueueItem (theEvent);
32056 this.cacheEQItem (newItem);
32057 if (this.queues[priority].head == null) {
32058 var shouldNotify = this.noEvents ();
32059 this.queues[priority].head = this.queues[priority].tail = newItem;
32060 if (shouldNotify) {
32061 if (theEvent.getSource () !== jssun.awt.AWTAutoShutdown.getInstance ()) {
32062 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (this.dispatchThread);
32063 }}} else {
32064 this.queues[priority].tail.next = newItem;
32065 this.queues[priority].tail = newItem;
32066 }}, "java.awt.AWTEvent,~N");
32067 Clazz_defineMethod (c$, "coalescePaintEvent", 
32068  function (e) {
32069 var sourcePeer = (e.getSource ()).peer;
32070 if (sourcePeer != null) {
32071 sourcePeer.coalescePaintEvent (e);
32072 }var cache = (e.getSource ()).eventCache;
32073 if (cache == null) {
32074 return false;
32075 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32076 if (index != -1 && cache[index] != null) {
32077 var merged = this.mergePaintEvents (e, cache[index].event);
32078 if (merged != null) {
32079 cache[index].event = merged;
32080 return true;
32081 }}return false;
32082 }, "java.awt.event.PaintEvent");
32083 Clazz_defineMethod (c$, "mergePaintEvents", 
32084  function (a, b) {
32085 var aRect = a.getUpdateRect ();
32086 var bRect = b.getUpdateRect ();
32087 if (bRect.contains (aRect)) {
32088 return b;
32089 }if (aRect.contains (bRect)) {
32090 return a;
32091 }return null;
32092 }, "java.awt.event.PaintEvent,java.awt.event.PaintEvent");
32093 Clazz_defineMethod (c$, "coalesceMouseEvent", 
32094  function (e) {
32095 var cache = (e.getSource ()).eventCache;
32096 if (cache == null) {
32097 return false;
32098 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32099 if (index != -1 && cache[index] != null) {
32100 cache[index].event = e;
32101 return true;
32102 }return false;
32103 }, "java.awt.event.MouseEvent");
32104 Clazz_defineMethod (c$, "coalescePeerEvent", 
32105  function (e) {
32106 var cache = (e.getSource ()).eventCache;
32107 if (cache == null) {
32108 return false;
32109 }var index = java.awt.EventQueue.eventToCacheIndex (e);
32110 if (index != -1 && cache[index] != null) {
32111 e = e.coalesceEvents (cache[index].event);
32112 if (e != null) {
32113 cache[index].event = e;
32114 return true;
32115 } else {
32116 cache[index] = null;
32117 }}return false;
32118 }, "jssun.awt.PeerEvent");
32119 Clazz_defineMethod (c$, "coalesceOtherEvent", 
32120  function (e, priority) {
32121 var id = e.getID ();
32122 var source = e.getSource ();
32123 for (var entry = this.queues[priority].head; entry != null; entry = entry.next) {
32124 if (entry.event.getSource () === source && entry.id == id) {
32125 var coalescedEvent = source.coalesceEvents (entry.event, e);
32126 if (coalescedEvent != null) {
32127 entry.event = coalescedEvent;
32128 return true;
32129 }}}
32130 return false;
32131 }, "java.awt.AWTEvent,~N");
32132 Clazz_defineMethod (c$, "coalesceEvent", 
32133  function (e, priority) {
32134 if (!(Clazz_instanceOf (e.getSource (), java.awt.Component))) {
32135 return false;
32136 }if (Clazz_instanceOf (e, jssun.awt.PeerEvent)) {
32137 return this.coalescePeerEvent (e);
32138 }if ((e.getSource ()).isCoalescingEnabled () && this.coalesceOtherEvent (e, priority)) {
32139 return true;
32140 }if (Clazz_instanceOf (e, java.awt.event.PaintEvent)) {
32141 return this.coalescePaintEvent (e);
32142 }if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
32143 return this.coalesceMouseEvent (e);
32144 }return false;
32145 }, "java.awt.AWTEvent,~N");
32146 Clazz_defineMethod (c$, "cacheEQItem", 
32147  function (entry) {
32148 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32149 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32150 var source = entry.event.getSource ();
32151 if (source.eventCache == null) {
32152 source.eventCache =  new Array (5);
32153 }source.eventCache[index] = entry;
32154 }}, "java.awt.EventQueueItem");
32155 Clazz_defineMethod (c$, "uncacheEQItem", 
32156  function (entry) {
32157 var index = java.awt.EventQueue.eventToCacheIndex (entry.event);
32158 if (index != -1 && Clazz_instanceOf (entry.event.getSource (), java.awt.Component)) {
32159 var source = entry.event.getSource ();
32160 if (source.eventCache == null) {
32161 return;
32162 }source.eventCache[index] = null;
32163 }}, "java.awt.EventQueueItem");
32164 c$.eventToCacheIndex = Clazz_defineMethod (c$, "eventToCacheIndex", 
32165  function (e) {
32166 switch (e.getID ()) {
32167 case 800:
32168 return 0;
32169 case 801:
32170 return 1;
32171 case 503:
32172 return 2;
32173 case 506:
32174 return 3;
32175 default:
32176 return -1;
32177 }
32178 }, "java.awt.AWTEvent");
32179 Clazz_defineMethod (c$, "noEvents", 
32180  function () {
32181 for (var i = 0; i < 4; i++) {
32182 if (this.queues[i].head != null) {
32183 return false;
32184 }}
32185 return true;
32186 });
32187 Clazz_defineMethod (c$, "getNextEvent", 
32188 function () {
32189 jssun.awt.SunToolkit.flushPendingEvents ();
32190 {
32191 for (var i = 3; i >= 0; i--) {
32192 if (this.queues[i].head != null) {
32193 var entry = this.queues[i].head;
32194 this.queues[i].head = entry.next;
32195 if (entry.next == null) {
32196 this.queues[i].tail = null;
32197 }this.uncacheEQItem (entry);
32198 return entry.event;
32199 }}
32200 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this.dispatchThread);
32201 }return null;
32202 });
32203 Clazz_defineMethod (c$, "getNextEventForID", 
32204 function (id) {
32205 jssun.awt.SunToolkit.flushPendingEvents ();
32206 {
32207 for (var i = 0; i < 4; i++) {
32208 for (var entry = this.queues[i].head, prev = null; entry != null; prev = entry, entry = entry.next) {
32209 if (entry.id == id) {
32210 if (prev == null) {
32211 this.queues[i].head = entry.next;
32212 } else {
32213 prev.next = entry.next;
32214 }if (this.queues[i].tail === entry) {
32215 this.queues[i].tail = prev;
32216 }this.uncacheEQItem (entry);
32217 return entry.event;
32218 }}
32219 }
32220 this.waitForID = id;
32221 this.waitForID = 0;
32222 }return null;
32223 }, "~N");
32224 Clazz_defineMethod (c$, "peekEvent", 
32225 function () {
32226 for (var i = 3; i >= 0; i--) {
32227 if (this.queues[i].head != null) {
32228 return this.queues[i].head.event;
32229 }}
32230 return null;
32231 });
32232 Clazz_defineMethod (c$, "peekEvent", 
32233 function (id) {
32234 for (var i = 3; i >= 0; i--) {
32235 var q = this.queues[i].head;
32236 for (; q != null; q = q.next) {
32237 if (q.id == id) {
32238 return q.event;
32239 }}
32240 }
32241 return null;
32242 }, "~N");
32243 Clazz_defineMethod (c$, "dispatchEvent", 
32244 function (event) {
32245 var src = event.getSource ();
32246 this.dispatchEventImpl (event, src, false);
32247 }, "java.awt.AWTEvent");
32248 Clazz_defineMethod (c$, "dispatchEventAndWait", 
32249 function (event, src) {
32250 this.dispatchEventImpl (event, src, true);
32251 }, "java.awt.AWTEvent,~O");
32252 Clazz_defineMethod (c$, "dispatchEventImpl", 
32253  function (event, src, andWait) {
32254 event.isPosted = true;
32255 if (Clazz_instanceOf (event, java.awt.ActiveEvent)) {
32256 this.setCurrentEventAndMostRecentTimeImpl (event);
32257 swingjs.JSToolkit.dispatchEvent (event, null, andWait);
32258 } else if (Clazz_instanceOf (src, java.awt.Component)) {
32259 swingjs.JSToolkit.dispatchEvent (event, src, andWait);
32260 event.dispatched ();
32261 } else if (Clazz_instanceOf (src, jssun.awt.AWTAutoShutdown)) {
32262 if (this.noEvents ()) {
32263 this.dispatchThread.stopDispatching ();
32264 }} else {
32265 System.err.println ("unable to dispatch event: " + event);
32266 }}, "java.awt.AWTEvent,~O,~B");
32267 c$.getMostRecentEventTime = Clazz_defineMethod (c$, "getMostRecentEventTime", 
32268 function () {
32269 return 0;
32270 });
32271 Clazz_defineMethod (c$, "getMostRecentEventTimeEx", 
32272 function () {
32273 return this.mostRecentEventTime;
32274 });
32275 c$.getCurrentEvent = Clazz_defineMethod (c$, "getCurrentEvent", 
32276 function () {
32277 return java.awt.Toolkit.getEventQueue ().getCurrentEventImpl ();
32278 });
32279 Clazz_defineMethod (c$, "getCurrentEventImpl", 
32280  function () {
32281 return (swingjs.JSToolkit.isDispatchThread () ? (this.currentEvent) : null);
32282 });
32283 Clazz_defineMethod (c$, "push", 
32284 function (newEventQueue) {
32285 if (this.nextQueue != null) {
32286 this.nextQueue.push (newEventQueue);
32287 return;
32288 }{
32289 while (this.peekEvent () != null) {
32290 try {
32291 newEventQueue.postEventPrivate (this.getNextEvent ());
32292 } catch (ie) {
32293 if (Clazz_exceptionOf (ie, InterruptedException)) {
32294 } else {
32295 throw ie;
32296 }
32297 }
32298 }
32299 newEventQueue.previousQueue = this;
32300 }if (this.dispatchThread != null) {
32301 this.dispatchThread.stopDispatchingLater ();
32302 }this.nextQueue = newEventQueue;
32303 var appContext = jssun.awt.AppContext.getAppContext ();
32304 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32305 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, newEventQueue);
32306 }}, "java.awt.EventQueue");
32307 Clazz_defineMethod (c$, "pop", 
32308 function () {
32309 var prev = this.previousQueue;
32310 {
32311 {
32312 if (this.nextQueue != null) {
32313 this.nextQueue.pop ();
32314 return;
32315 }if (this.previousQueue == null) {
32316 throw  new java.util.EmptyStackException ();
32317 }this.previousQueue.nextQueue = null;
32318 while (this.peekEvent () != null) {
32319 try {
32320 this.previousQueue.postEventPrivate (this.getNextEvent ());
32321 } catch (ie) {
32322 if (Clazz_exceptionOf (ie, InterruptedException)) {
32323 } else {
32324 throw ie;
32325 }
32326 }
32327 }
32328 var appContext = jssun.awt.AppContext.getAppContext ();
32329 if (appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY) === this) {
32330 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, this.previousQueue);
32331 }this.previousQueue = null;
32332 }}var dt = this.dispatchThread;
32333 if (dt != null) {
32334 dt.stopDispatching ();
32335 }});
32336 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
32337 function () {
32338 return swingjs.JSToolkit.isDispatchThread ();
32339 });
32340 Clazz_defineMethod (c$, "initDispatchThread", 
32341 function () {
32342 {
32343 if (this.dispatchThread == null) {
32344 var t =  new java.awt.EventDispatchThread (this.threadGroup, this.name, this);
32345 jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadBusy (t);
32346 this.dispatchThread = t;
32347 this.dispatchThread.start ();
32348 }}});
32349 Clazz_defineMethod (c$, "detachDispatchThread", 
32350 function () {
32351 this.dispatchThread = null;
32352 });
32353 Clazz_defineMethod (c$, "getDispatchThread", 
32354 function () {
32355 return this.dispatchThread;
32356 });
32357 Clazz_defineMethod (c$, "removeSourceEvents", 
32358 function (source, removeAllEvents) {
32359 jssun.awt.SunToolkit.flushPendingEvents ();
32360 {
32361 for (var i = 0; i < 4; i++) {
32362 var entry = this.queues[i].head;
32363 var prev = null;
32364 while (entry != null) {
32365 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)))) {
32366 if (Clazz_instanceOf (entry.event, java.awt.SequencedEvent)) {
32367 (entry.event).dispose ();
32368 }if (Clazz_instanceOf (entry.event, java.awt.SentEvent)) {
32369 (entry.event).dispose ();
32370 }if (prev == null) {
32371 this.queues[i].head = entry.next;
32372 } else {
32373 prev.next = entry.next;
32374 }this.uncacheEQItem (entry);
32375 } else {
32376 prev = entry;
32377 }entry = entry.next;
32378 }
32379 this.queues[i].tail = prev;
32380 }
32381 }}, "~O,~B");
32382 c$.setCurrentEventAndMostRecentTime = Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTime", 
32383 function (e) {
32384 java.awt.Toolkit.getEventQueue ().setCurrentEventAndMostRecentTimeImpl (e);
32385 }, "java.awt.AWTEvent");
32386 Clazz_defineMethod (c$, "setCurrentEventAndMostRecentTimeImpl", 
32387  function (e) {
32388 if (swingjs.JSToolkit.isDispatchThread ()) {
32389 return;
32390 }this.currentEvent = e;
32391 var mostRecentEventTime2 = -9223372036854775808;
32392 if (Clazz_instanceOf (e, java.awt.event.InputEvent)) {
32393 var ie = e;
32394 mostRecentEventTime2 = ie.getWhen ();
32395 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
32396 var ime = e;
32397 mostRecentEventTime2 = ime.getWhen ();
32398 } else if (Clazz_instanceOf (e, java.awt.event.ActionEvent)) {
32399 var ae = e;
32400 mostRecentEventTime2 = ae.getWhen ();
32401 } else if (Clazz_instanceOf (e, java.awt.event.InvocationEvent)) {
32402 var ie = e;
32403 mostRecentEventTime2 = ie.getWhen ();
32404 }this.mostRecentEventTime = Math.max (this.mostRecentEventTime, mostRecentEventTime2);
32405 }, "java.awt.AWTEvent");
32406 c$.invokeLater = Clazz_defineMethod (c$, "invokeLater", 
32407 function (runnable) {
32408 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), runnable));
32409 }, "Runnable");
32410 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
32411 function (runnable) {
32412 java.awt.EventQueue.invokeAndWaitStatic (java.awt.Toolkit.getDefaultToolkit (), runnable);
32413 }, "Runnable");
32414 c$.invokeAndWaitStatic = Clazz_defineMethod (c$, "invokeAndWaitStatic", 
32415  function (source, runnable) {
32416 if (java.awt.EventQueue.isDispatchThread ()) {
32417 throw  new Error ("Cannot call invokeAndWait from the event dispatcher thread");
32418 }var event =  new java.awt.event.InvocationEvent (source, runnable, null, true);
32419 swingjs.JSToolkit.dispatchEvent (event, null, true);
32420 var eventThrowable = event.getThrowable ();
32421 if (eventThrowable != null) {
32422 throw  new java.lang.reflect.InvocationTargetException (eventThrowable);
32423 }}, "~O,Runnable");
32424 Clazz_defineMethod (c$, "wakeup", 
32425 function (isShutdown) {
32426 {
32427 if (this.nextQueue != null) {
32428 this.nextQueue.wakeup (isShutdown);
32429 } else if (this.dispatchThread != null) {
32430 try {
32431 this.dispatchThread.start ();
32432 } catch (e) {
32433 if (Clazz_exceptionOf (e, IllegalThreadStateException)) {
32434 this.dispatchThread.run ();
32435 } else {
32436 throw e;
32437 }
32438 }
32439 } else if (!isShutdown) {
32440 this.initDispatchThread ();
32441 }}}, "~B");
32442 Clazz_defineStatics (c$,
32443 "threadInitNumber", 0,
32444 "LOW_PRIORITY", 0,
32445 "NORM_PRIORITY", 1,
32446 "HIGH_PRIORITY", 2,
32447 "ULTIMATE_PRIORITY", 3,
32448 "NUM_PRIORITIES", 4,
32449 "PAINT", 0,
32450 "UPDATE", 1,
32451 "MOVE", 2,
32452 "DRAG", 3,
32453 "PEER", 4,
32454 "CACHE_LENGTH", 5);
32455 c$ = Clazz_decorateAsClass (function () {
32456 this.head = null;
32457 this.tail = null;
32458 Clazz_instantialize (this, arguments);
32459 }, java.awt, "Queue");
32460 c$ = Clazz_decorateAsClass (function () {
32461 this.event = null;
32462 this.id = 0;
32463 this.next = null;
32464 Clazz_instantialize (this, arguments);
32465 }, java.awt, "EventQueueItem");
32466 Clazz_makeConstructor (c$, 
32467 function (evt) {
32468 this.event = evt;
32469 this.id = evt.getID ();
32470 }, "java.awt.AWTEvent");
32471 });
32472 Clazz_declarePackage ("java.awt");
32473 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 () {
32474 c$ = Clazz_decorateAsClass (function () {
32475 this.a = null;
32476 this.b = null;
32477 Clazz_instantialize (this, arguments);
32478 }, 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]);
32479 Clazz_makeConstructor (c$, 
32480 function (a, b) {
32481 this.a = a;
32482 this.b = b;
32483 }, "java.util.EventListener,java.util.EventListener");
32484 Clazz_defineMethod (c$, "remove", 
32485 function (oldl) {
32486 if (oldl === this.a) return this.b;
32487 if (oldl === this.b) return this.a;
32488 var a2 = java.awt.AWTEventMulticaster.removeInternal (this.a, oldl);
32489 var b2 = java.awt.AWTEventMulticaster.removeInternal (this.b, oldl);
32490 if (a2 === this.a && b2 === this.b) {
32491 return this;
32492 }return java.awt.AWTEventMulticaster.addInternal (a2, b2);
32493 }, "java.util.EventListener");
32494 Clazz_defineMethod (c$, "componentResized", 
32495 function (e) {
32496 (this.a).componentResized (e);
32497 (this.b).componentResized (e);
32498 }, "java.awt.event.ComponentEvent");
32499 Clazz_defineMethod (c$, "componentMoved", 
32500 function (e) {
32501 (this.a).componentMoved (e);
32502 (this.b).componentMoved (e);
32503 }, "java.awt.event.ComponentEvent");
32504 Clazz_defineMethod (c$, "componentShown", 
32505 function (e) {
32506 (this.a).componentShown (e);
32507 (this.b).componentShown (e);
32508 }, "java.awt.event.ComponentEvent");
32509 Clazz_defineMethod (c$, "componentHidden", 
32510 function (e) {
32511 (this.a).componentHidden (e);
32512 (this.b).componentHidden (e);
32513 }, "java.awt.event.ComponentEvent");
32514 Clazz_defineMethod (c$, "componentAdded", 
32515 function (e) {
32516 (this.a).componentAdded (e);
32517 (this.b).componentAdded (e);
32518 }, "java.awt.event.ContainerEvent");
32519 Clazz_defineMethod (c$, "componentRemoved", 
32520 function (e) {
32521 (this.a).componentRemoved (e);
32522 (this.b).componentRemoved (e);
32523 }, "java.awt.event.ContainerEvent");
32524 Clazz_defineMethod (c$, "focusGained", 
32525 function (e) {
32526 (this.a).focusGained (e);
32527 (this.b).focusGained (e);
32528 }, "java.awt.event.FocusEvent");
32529 Clazz_defineMethod (c$, "focusLost", 
32530 function (e) {
32531 (this.a).focusLost (e);
32532 (this.b).focusLost (e);
32533 }, "java.awt.event.FocusEvent");
32534 Clazz_defineMethod (c$, "keyTyped", 
32535 function (e) {
32536 (this.a).keyTyped (e);
32537 (this.b).keyTyped (e);
32538 }, "java.awt.event.KeyEvent");
32539 Clazz_defineMethod (c$, "keyPressed", 
32540 function (e) {
32541 (this.a).keyPressed (e);
32542 (this.b).keyPressed (e);
32543 }, "java.awt.event.KeyEvent");
32544 Clazz_defineMethod (c$, "keyReleased", 
32545 function (e) {
32546 (this.a).keyReleased (e);
32547 (this.b).keyReleased (e);
32548 }, "java.awt.event.KeyEvent");
32549 Clazz_defineMethod (c$, "mouseClicked", 
32550 function (e) {
32551 (this.a).mouseClicked (e);
32552 (this.b).mouseClicked (e);
32553 }, "java.awt.event.MouseEvent");
32554 Clazz_defineMethod (c$, "mousePressed", 
32555 function (e) {
32556 (this.a).mousePressed (e);
32557 (this.b).mousePressed (e);
32558 }, "java.awt.event.MouseEvent");
32559 Clazz_defineMethod (c$, "mouseReleased", 
32560 function (e) {
32561 (this.a).mouseReleased (e);
32562 (this.b).mouseReleased (e);
32563 }, "java.awt.event.MouseEvent");
32564 Clazz_defineMethod (c$, "mouseEntered", 
32565 function (e) {
32566 (this.a).mouseEntered (e);
32567 (this.b).mouseEntered (e);
32568 }, "java.awt.event.MouseEvent");
32569 Clazz_defineMethod (c$, "mouseExited", 
32570 function (e) {
32571 (this.a).mouseExited (e);
32572 (this.b).mouseExited (e);
32573 }, "java.awt.event.MouseEvent");
32574 Clazz_defineMethod (c$, "mouseDragged", 
32575 function (e) {
32576 (this.a).mouseDragged (e);
32577 (this.b).mouseDragged (e);
32578 }, "java.awt.event.MouseEvent");
32579 Clazz_defineMethod (c$, "mouseMoved", 
32580 function (e) {
32581 (this.a).mouseMoved (e);
32582 (this.b).mouseMoved (e);
32583 }, "java.awt.event.MouseEvent");
32584 Clazz_defineMethod (c$, "windowOpened", 
32585 function (e) {
32586 (this.a).windowOpened (e);
32587 (this.b).windowOpened (e);
32588 }, "java.awt.event.WindowEvent");
32589 Clazz_defineMethod (c$, "windowClosing", 
32590 function (e) {
32591 (this.a).windowClosing (e);
32592 (this.b).windowClosing (e);
32593 }, "java.awt.event.WindowEvent");
32594 Clazz_defineMethod (c$, "windowClosed", 
32595 function (e) {
32596 (this.a).windowClosed (e);
32597 (this.b).windowClosed (e);
32598 }, "java.awt.event.WindowEvent");
32599 Clazz_defineMethod (c$, "windowIconified", 
32600 function (e) {
32601 (this.a).windowIconified (e);
32602 (this.b).windowIconified (e);
32603 }, "java.awt.event.WindowEvent");
32604 Clazz_defineMethod (c$, "windowDeiconified", 
32605 function (e) {
32606 (this.a).windowDeiconified (e);
32607 (this.b).windowDeiconified (e);
32608 }, "java.awt.event.WindowEvent");
32609 Clazz_defineMethod (c$, "windowActivated", 
32610 function (e) {
32611 (this.a).windowActivated (e);
32612 (this.b).windowActivated (e);
32613 }, "java.awt.event.WindowEvent");
32614 Clazz_defineMethod (c$, "windowDeactivated", 
32615 function (e) {
32616 (this.a).windowDeactivated (e);
32617 (this.b).windowDeactivated (e);
32618 }, "java.awt.event.WindowEvent");
32619 Clazz_defineMethod (c$, "windowStateChanged", 
32620 function (e) {
32621 (this.a).windowStateChanged (e);
32622 (this.b).windowStateChanged (e);
32623 }, "java.awt.event.WindowEvent");
32624 Clazz_defineMethod (c$, "windowGainedFocus", 
32625 function (e) {
32626 (this.a).windowGainedFocus (e);
32627 (this.b).windowGainedFocus (e);
32628 }, "java.awt.event.WindowEvent");
32629 Clazz_defineMethod (c$, "windowLostFocus", 
32630 function (e) {
32631 (this.a).windowLostFocus (e);
32632 (this.b).windowLostFocus (e);
32633 }, "java.awt.event.WindowEvent");
32634 Clazz_defineMethod (c$, "actionPerformed", 
32635 function (e) {
32636 (this.a).actionPerformed (e);
32637 (this.b).actionPerformed (e);
32638 }, "java.awt.event.ActionEvent");
32639 Clazz_defineMethod (c$, "itemStateChanged", 
32640 function (e) {
32641 (this.a).itemStateChanged (e);
32642 (this.b).itemStateChanged (e);
32643 }, "java.awt.event.ItemEvent");
32644 Clazz_defineMethod (c$, "adjustmentValueChanged", 
32645 function (e) {
32646 (this.a).adjustmentValueChanged (e);
32647 (this.b).adjustmentValueChanged (e);
32648 }, "java.awt.event.AdjustmentEvent");
32649 Clazz_defineMethod (c$, "textValueChanged", 
32650 function (e) {
32651 (this.a).textValueChanged (e);
32652 (this.b).textValueChanged (e);
32653 }, "java.awt.event.TextEvent");
32654 Clazz_defineMethod (c$, "inputMethodTextChanged", 
32655 function (e) {
32656 (this.a).inputMethodTextChanged (e);
32657 (this.b).inputMethodTextChanged (e);
32658 }, "java.awt.event.InputMethodEvent");
32659 Clazz_defineMethod (c$, "caretPositionChanged", 
32660 function (e) {
32661 (this.a).caretPositionChanged (e);
32662 (this.b).caretPositionChanged (e);
32663 }, "java.awt.event.InputMethodEvent");
32664 Clazz_defineMethod (c$, "hierarchyChanged", 
32665 function (e) {
32666 (this.a).hierarchyChanged (e);
32667 (this.b).hierarchyChanged (e);
32668 }, "java.awt.event.HierarchyEvent");
32669 Clazz_defineMethod (c$, "ancestorMoved", 
32670 function (e) {
32671 (this.a).ancestorMoved (e);
32672 (this.b).ancestorMoved (e);
32673 }, "java.awt.event.HierarchyEvent");
32674 Clazz_defineMethod (c$, "ancestorResized", 
32675 function (e) {
32676 (this.a).ancestorResized (e);
32677 (this.b).ancestorResized (e);
32678 }, "java.awt.event.HierarchyEvent");
32679 Clazz_defineMethod (c$, "mouseWheelMoved", 
32680 function (e) {
32681 (this.a).mouseWheelMoved (e);
32682 (this.b).mouseWheelMoved (e);
32683 }, "java.awt.event.MouseWheelEvent");
32684 c$.add = Clazz_defineMethod (c$, "add", 
32685 function (a, b) {
32686 return java.awt.AWTEventMulticaster.addInternal (a, b);
32687 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32688 c$.add = Clazz_defineMethod (c$, "add", 
32689 function (a, b) {
32690 return java.awt.AWTEventMulticaster.addInternal (a, b);
32691 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32692 c$.add = Clazz_defineMethod (c$, "add", 
32693 function (a, b) {
32694 return java.awt.AWTEventMulticaster.addInternal (a, b);
32695 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32696 c$.add = Clazz_defineMethod (c$, "add", 
32697 function (a, b) {
32698 return java.awt.AWTEventMulticaster.addInternal (a, b);
32699 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32700 c$.add = Clazz_defineMethod (c$, "add", 
32701 function (a, b) {
32702 return java.awt.AWTEventMulticaster.addInternal (a, b);
32703 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32704 c$.add = Clazz_defineMethod (c$, "add", 
32705 function (a, b) {
32706 return java.awt.AWTEventMulticaster.addInternal (a, b);
32707 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32708 c$.add = Clazz_defineMethod (c$, "add", 
32709 function (a, b) {
32710 return java.awt.AWTEventMulticaster.addInternal (a, b);
32711 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32712 c$.add = Clazz_defineMethod (c$, "add", 
32713 function (a, b) {
32714 return java.awt.AWTEventMulticaster.addInternal (a, b);
32715 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32716 c$.add = Clazz_defineMethod (c$, "add", 
32717 function (a, b) {
32718 return java.awt.AWTEventMulticaster.addInternal (a, b);
32719 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32720 c$.add = Clazz_defineMethod (c$, "add", 
32721 function (a, b) {
32722 return java.awt.AWTEventMulticaster.addInternal (a, b);
32723 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32724 c$.add = Clazz_defineMethod (c$, "add", 
32725 function (a, b) {
32726 return java.awt.AWTEventMulticaster.addInternal (a, b);
32727 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32728 c$.add = Clazz_defineMethod (c$, "add", 
32729 function (a, b) {
32730 return java.awt.AWTEventMulticaster.addInternal (a, b);
32731 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32732 c$.add = Clazz_defineMethod (c$, "add", 
32733 function (a, b) {
32734 return java.awt.AWTEventMulticaster.addInternal (a, b);
32735 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32736 c$.add = Clazz_defineMethod (c$, "add", 
32737 function (a, b) {
32738 return java.awt.AWTEventMulticaster.addInternal (a, b);
32739 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32740 c$.add = Clazz_defineMethod (c$, "add", 
32741 function (a, b) {
32742 return java.awt.AWTEventMulticaster.addInternal (a, b);
32743 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32744 c$.add = Clazz_defineMethod (c$, "add", 
32745 function (a, b) {
32746 return java.awt.AWTEventMulticaster.addInternal (a, b);
32747 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32748 c$.add = Clazz_defineMethod (c$, "add", 
32749 function (a, b) {
32750 return java.awt.AWTEventMulticaster.addInternal (a, b);
32751 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32752 c$.remove = Clazz_defineMethod (c$, "remove", 
32753 function (l, oldl) {
32754 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32755 }, "java.awt.event.ComponentListener,java.awt.event.ComponentListener");
32756 c$.remove = Clazz_defineMethod (c$, "remove", 
32757 function (l, oldl) {
32758 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32759 }, "java.awt.event.ContainerListener,java.awt.event.ContainerListener");
32760 c$.remove = Clazz_defineMethod (c$, "remove", 
32761 function (l, oldl) {
32762 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32763 }, "java.awt.event.FocusListener,java.awt.event.FocusListener");
32764 c$.remove = Clazz_defineMethod (c$, "remove", 
32765 function (l, oldl) {
32766 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32767 }, "java.awt.event.KeyListener,java.awt.event.KeyListener");
32768 c$.remove = Clazz_defineMethod (c$, "remove", 
32769 function (l, oldl) {
32770 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32771 }, "java.awt.event.MouseListener,java.awt.event.MouseListener");
32772 c$.remove = Clazz_defineMethod (c$, "remove", 
32773 function (l, oldl) {
32774 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32775 }, "java.awt.event.MouseMotionListener,java.awt.event.MouseMotionListener");
32776 c$.remove = Clazz_defineMethod (c$, "remove", 
32777 function (l, oldl) {
32778 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32779 }, "java.awt.event.WindowListener,java.awt.event.WindowListener");
32780 c$.remove = Clazz_defineMethod (c$, "remove", 
32781 function (l, oldl) {
32782 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32783 }, "java.awt.event.WindowStateListener,java.awt.event.WindowStateListener");
32784 c$.remove = Clazz_defineMethod (c$, "remove", 
32785 function (l, oldl) {
32786 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32787 }, "java.awt.event.WindowFocusListener,java.awt.event.WindowFocusListener");
32788 c$.remove = Clazz_defineMethod (c$, "remove", 
32789 function (l, oldl) {
32790 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32791 }, "java.awt.event.ActionListener,java.awt.event.ActionListener");
32792 c$.remove = Clazz_defineMethod (c$, "remove", 
32793 function (l, oldl) {
32794 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32795 }, "java.awt.event.ItemListener,java.awt.event.ItemListener");
32796 c$.remove = Clazz_defineMethod (c$, "remove", 
32797 function (l, oldl) {
32798 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32799 }, "java.awt.event.AdjustmentListener,java.awt.event.AdjustmentListener");
32800 c$.remove = Clazz_defineMethod (c$, "remove", 
32801 function (l, oldl) {
32802 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32803 }, "java.awt.event.TextListener,java.awt.event.TextListener");
32804 c$.remove = Clazz_defineMethod (c$, "remove", 
32805 function (l, oldl) {
32806 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32807 }, "java.awt.event.InputMethodListener,java.awt.event.InputMethodListener");
32808 c$.remove = Clazz_defineMethod (c$, "remove", 
32809 function (l, oldl) {
32810 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32811 }, "java.awt.event.HierarchyListener,java.awt.event.HierarchyListener");
32812 c$.remove = Clazz_defineMethod (c$, "remove", 
32813 function (l, oldl) {
32814 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32815 }, "java.awt.event.HierarchyBoundsListener,java.awt.event.HierarchyBoundsListener");
32816 c$.remove = Clazz_defineMethod (c$, "remove", 
32817 function (l, oldl) {
32818 return java.awt.AWTEventMulticaster.removeInternal (l, oldl);
32819 }, "java.awt.event.MouseWheelListener,java.awt.event.MouseWheelListener");
32820 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
32821 function (a, b) {
32822 if (a == null) return b;
32823 if (b == null) return a;
32824 return  new java.awt.AWTEventMulticaster (a, b);
32825 }, "java.util.EventListener,java.util.EventListener");
32826 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
32827 function (l, oldl) {
32828 if (l === oldl || l == null) {
32829 return null;
32830 } else if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32831 return (l).remove (oldl);
32832 } else {
32833 return l;
32834 }}, "java.util.EventListener,java.util.EventListener");
32835 c$.getListenerCount = Clazz_defineMethod (c$, "getListenerCount", 
32836  function (l, listenerType) {
32837 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32838 var mc = l;
32839 return java.awt.AWTEventMulticaster.getListenerCount (mc.a, listenerType) + java.awt.AWTEventMulticaster.getListenerCount (mc.b, listenerType);
32840 } else {
32841 return listenerType.isInstance (l) ? 1 : 0;
32842 }}, "java.util.EventListener,Class");
32843 c$.populateListenerArray = Clazz_defineMethod (c$, "populateListenerArray", 
32844  function (a, l, index) {
32845 if (Clazz_instanceOf (l, java.awt.AWTEventMulticaster)) {
32846 var mc = l;
32847 var lhs = java.awt.AWTEventMulticaster.populateListenerArray (a, mc.a, index);
32848 return java.awt.AWTEventMulticaster.populateListenerArray (a, mc.b, lhs);
32849 } else if (a.getClass ().getComponentType ().isInstance (l)) {
32850 a[index] = l;
32851 return index + 1;
32852 } else {
32853 return index;
32854 }}, "~A,java.util.EventListener,~N");
32855 c$.getListeners = Clazz_defineMethod (c$, "getListeners", 
32856 function (l, listenerType) {
32857 if (listenerType == null) {
32858 throw  new NullPointerException ("Listener type should not be null");
32859 }var n = java.awt.AWTEventMulticaster.getListenerCount (l, listenerType);
32860 var result = java.lang.reflect.Array.newInstance (listenerType, n);
32861 java.awt.AWTEventMulticaster.populateListenerArray (result, l, 0);
32862 return result;
32863 }, "java.util.EventListener,Class");
32864 });
32865 Clazz_declarePackage ("java.awt");
32866 Clazz_load (["java.util.EventObject"], "java.awt.AWTEvent", ["java.awt.Component", "java.awt.peer.LightweightPeer"], function () {
32867 c$ = Clazz_decorateAsClass (function () {
32868 this.bdata = null;
32869 this.id = 0;
32870 this.num = 0;
32871 this.consumed = false;
32872 this.focusManagerIsDispatching = false;
32873 this.isPosted = false;
32874 Clazz_instantialize (this, arguments);
32875 }, java.awt, "AWTEvent", java.util.EventObject);
32876 Clazz_makeConstructor (c$, 
32877 function (event) {
32878 this.construct (event.target, event.id);
32879 }, "java.awt.Event");
32880 Clazz_makeConstructor (c$, 
32881 function (source, id) {
32882 Clazz_superConstructor (this, java.awt.AWTEvent, [source]);
32883 this.id = id;
32884 this.num = ++java.awt.AWTEvent.idnum;
32885 switch (id) {
32886 case 1001:
32887 case 701:
32888 case 601:
32889 case 900:
32890 this.consumed = true;
32891 break;
32892 default:
32893 }
32894 }, "~O,~N");
32895 Clazz_defineMethod (c$, "setSource", 
32896 function (newSource) {
32897 if (this.source === newSource) {
32898 return;
32899 }var comp = null;
32900 if (Clazz_instanceOf (newSource, java.awt.Component)) {
32901 comp = newSource;
32902 while (comp != null && comp.peer != null && (Clazz_instanceOf (comp.peer, java.awt.peer.LightweightPeer))) {
32903 comp = comp.parent;
32904 }
32905 }this.source = newSource;
32906 }, "~O");
32907 Clazz_defineMethod (c$, "getID", 
32908 function () {
32909 return this.id;
32910 });
32911 Clazz_overrideMethod (c$, "toString", 
32912 function () {
32913 var srcName = null;
32914 if (Clazz_instanceOf (this.source, java.awt.Component)) {
32915 srcName = (this.source).getName ();
32916 }return this.getClass ().getName () + "[" + this.paramString () + "] on " + (srcName != null ? srcName : this.source);
32917 });
32918 Clazz_defineMethod (c$, "paramString", 
32919 function () {
32920 return "";
32921 });
32922 Clazz_defineMethod (c$, "consume", 
32923 function () {
32924 switch (this.id) {
32925 case 401:
32926 case 402:
32927 case 501:
32928 case 502:
32929 case 503:
32930 case 506:
32931 case 504:
32932 case 505:
32933 case 507:
32934 case 1100:
32935 case 1101:
32936 this.consumed = true;
32937 break;
32938 default:
32939 }
32940 });
32941 Clazz_defineMethod (c$, "isConsumed", 
32942 function () {
32943 return this.consumed;
32944 });
32945 Clazz_defineMethod (c$, "copyPrivateDataInto", 
32946 function (that) {
32947 that.bdata = this.bdata;
32948 }, "java.awt.AWTEvent");
32949 Clazz_defineMethod (c$, "dispatched", 
32950 function () {
32951 });
32952 Clazz_defineStatics (c$,
32953 "idnum", 0,
32954 "COMPONENT_EVENT_MASK", 0x01,
32955 "CONTAINER_EVENT_MASK", 0x02,
32956 "FOCUS_EVENT_MASK", 0x04,
32957 "KEY_EVENT_MASK", 0x08,
32958 "MOUSE_EVENT_MASK", 0x10,
32959 "MOUSE_MOTION_EVENT_MASK", 0x20,
32960 "WINDOW_EVENT_MASK", 0x40,
32961 "ACTION_EVENT_MASK", 0x80,
32962 "ADJUSTMENT_EVENT_MASK", 0x100,
32963 "ITEM_EVENT_MASK", 0x200,
32964 "TEXT_EVENT_MASK", 0x400,
32965 "INPUT_METHOD_EVENT_MASK", 0x800,
32966 "INPUT_METHODS_ENABLED_MASK", 0x1000,
32967 "PAINT_EVENT_MASK", 0x2000,
32968 "INVOCATION_EVENT_MASK", 0x4000,
32969 "HIERARCHY_EVENT_MASK", 0x8000,
32970 "HIERARCHY_BOUNDS_EVENT_MASK", 0x10000,
32971 "MOUSE_WHEEL_EVENT_MASK", 0x20000,
32972 "WINDOW_STATE_EVENT_MASK", 0x40000,
32973 "WINDOW_FOCUS_EVENT_MASK", 0x80000,
32974 "RESERVED_ID_MAX", 1999);
32975 });
32976 Clazz_declarePackage ("java.awt.event");
32977 Clazz_load (["java.util.EventListener"], "java.awt.event.AWTEventListener", null, function () {
32978 Clazz_declareInterface (java.awt.event, "AWTEventListener", java.util.EventListener);
32979 });
32980 Clazz_declarePackage ("java.awt");
32981 Clazz_declareInterface (java.awt, "ActiveEvent");
32982 Clazz_declarePackage ("java.awt.event");
32983 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.event.InvocationEvent", ["java.lang.Exception"], function () {
32984 c$ = Clazz_decorateAsClass (function () {
32985 this.runnable = null;
32986 this.notifier = null;
32987 this.catchExceptions = false;
32988 this.exception = null;
32989 this.throwable = null;
32990 this.when = 0;
32991 Clazz_instantialize (this, arguments);
32992 }, java.awt.event, "InvocationEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
32993 Clazz_makeConstructor (c$, 
32994 function (source, runnable) {
32995 this.construct (source, runnable, null, false);
32996 }, "~O,Runnable");
32997 Clazz_makeConstructor (c$, 
32998 function (source, runnable, notifier, catchThrowables) {
32999 this.construct (source, 1200, runnable, notifier, catchThrowables);
33000 }, "~O,Runnable,~O,~B");
33001 Clazz_makeConstructor (c$, 
33002 function (source, id, runnable, notifier, catchThrowables) {
33003 Clazz_superConstructor (this, java.awt.event.InvocationEvent, [source, id]);
33004 this.runnable = runnable;
33005 this.notifier = notifier;
33006 this.catchExceptions = catchThrowables;
33007 this.when = System.currentTimeMillis ();
33008 }, "~O,~N,Runnable,~O,~B");
33009 Clazz_overrideMethod (c$, "dispatch", 
33010 function () {
33011 if (this.catchExceptions) {
33012 try {
33013 this.runnable.run ();
33014 } catch (t) {
33015 if (Clazz_instanceOf (t, Exception)) {
33016 this.exception = t;
33017 }this.throwable = t;
33018 }
33019 } else {
33020 this.runnable.run ();
33021 }if (this.notifier != null) {
33022 {
33023 this.notifier.notifyAll ();
33024 }}});
33025 Clazz_defineMethod (c$, "getException", 
33026 function () {
33027 return (this.catchExceptions) ? this.exception : null;
33028 });
33029 Clazz_defineMethod (c$, "getThrowable", 
33030 function () {
33031 return (this.catchExceptions) ? this.throwable : null;
33032 });
33033 Clazz_defineMethod (c$, "getWhen", 
33034 function () {
33035 return this.when;
33036 });
33037 Clazz_overrideMethod (c$, "paramString", 
33038 function () {
33039 var typeStr;
33040 switch (this.id) {
33041 case 1200:
33042 typeStr = "INVOCATION_DEFAULT";
33043 break;
33044 default:
33045 typeStr = "unknown type";
33046 }
33047 return typeStr + ",runnable=" + this.runnable + ",notifier=" + this.notifier + ",catchExceptions=" + this.catchExceptions + ",when=" + this.when;
33048 });
33049 Clazz_defineStatics (c$,
33050 "SWINGJS_INVOCATION_LOW", 1201,
33051 "INVOCATION_FIRST", 1200,
33052 "INVOCATION_DEFAULT", 1200,
33053 "INVOCATION_LAST", 1201);
33054 });
33055 Clazz_declarePackage ("java.awt.event");
33056 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ComponentEvent", ["java.awt.Component"], function () {
33057 c$ = Clazz_declareType (java.awt.event, "ComponentEvent", java.awt.AWTEvent);
33058 Clazz_defineMethod (c$, "getComponent", 
33059 function () {
33060 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
33061 });
33062 Clazz_overrideMethod (c$, "paramString", 
33063 function () {
33064 var typeStr;
33065 var b = (this.source != null ? (this.source).getBounds () : null);
33066 switch (this.id) {
33067 case 102:
33068 typeStr = "COMPONENT_SHOWN";
33069 break;
33070 case 103:
33071 typeStr = "COMPONENT_HIDDEN";
33072 break;
33073 case 100:
33074 typeStr = "COMPONENT_MOVED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33075 break;
33076 case 101:
33077 typeStr = "COMPONENT_RESIZED (" + b.x + "," + b.y + " " + b.width + "x" + b.height + ")";
33078 break;
33079 default:
33080 typeStr = "unknown type";
33081 }
33082 return typeStr;
33083 });
33084 Clazz_defineStatics (c$,
33085 "COMPONENT_FIRST", 100,
33086 "COMPONENT_LAST", 103,
33087 "COMPONENT_MOVED", 100,
33088 "COMPONENT_RESIZED", 101,
33089 "COMPONENT_SHOWN", 102,
33090 "COMPONENT_HIDDEN", 103);
33091 });
33092 Clazz_declarePackage ("java.awt.event");
33093 Clazz_load (["java.awt.event.InputEvent"], "java.awt.event.MouseEvent", ["java.lang.IllegalArgumentException", "$.StringBuilder", "java.awt.Point", "$.Toolkit"], function () {
33094 c$ = Clazz_decorateAsClass (function () {
33095 this.x = 0;
33096 this.y = 0;
33097 this.xAbs = 0;
33098 this.yAbs = 0;
33099 this.clickCount = 0;
33100 this.button = 0;
33101 this.popupTrigger = false;
33102 Clazz_instantialize (this, arguments);
33103 }, java.awt.event, "MouseEvent", java.awt.event.InputEvent);
33104 Clazz_defineMethod (c$, "getLocationOnScreen", 
33105 function () {
33106 return  new java.awt.Point (this.xAbs, this.yAbs);
33107 });
33108 Clazz_defineMethod (c$, "getXOnScreen", 
33109 function () {
33110 return this.xAbs;
33111 });
33112 Clazz_defineMethod (c$, "getYOnScreen", 
33113 function () {
33114 return this.yAbs;
33115 });
33116 Clazz_makeConstructor (c$, 
33117 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, button) {
33118 this.construct (source, id, when, modifiers, x, y, 0, 0, clickCount, popupTrigger, button);
33119 var eventLocationOnScreen =  new java.awt.Point (0, 0);
33120 try {
33121 eventLocationOnScreen = source.getLocationOnScreen ();
33122 this.xAbs = eventLocationOnScreen.x + x;
33123 this.yAbs = eventLocationOnScreen.y + y;
33124 } catch (e) {
33125 if (Clazz_exceptionOf (e, java.awt.IllegalComponentStateException)) {
33126 this.xAbs = 0;
33127 this.yAbs = 0;
33128 } else {
33129 throw e;
33130 }
33131 }
33132 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~N");
33133 Clazz_makeConstructor (c$, 
33134 function (source, id, when, modifiers, x, y, clickCount, popupTrigger) {
33135 this.construct (source, id, when, modifiers, x, y, clickCount, popupTrigger, 0);
33136 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B");
33137 Clazz_makeConstructor (c$, 
33138 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, button) {
33139 Clazz_superConstructor (this, java.awt.event.MouseEvent, [source, id, when, modifiers]);
33140 this.x = x;
33141 this.y = y;
33142 this.xAbs = xAbs;
33143 this.yAbs = yAbs;
33144 this.clickCount = clickCount;
33145 this.popupTrigger = popupTrigger;
33146 if (button < 0 || button > 3) {
33147 throw  new IllegalArgumentException ("Invalid button value");
33148 }this.button = button;
33149 if ((this.getModifiers () != 0) && (this.getModifiersEx () == 0)) {
33150 this.setNewModifiers ();
33151 } else if ((this.getModifiers () == 0) && (this.getModifiersEx () != 0 || button != 0)) {
33152 this.setOldModifiers ();
33153 }}, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~N");
33154 Clazz_defineMethod (c$, "getX", 
33155 function () {
33156 return this.x;
33157 });
33158 Clazz_defineMethod (c$, "getY", 
33159 function () {
33160 return this.y;
33161 });
33162 Clazz_defineMethod (c$, "getPoint", 
33163 function () {
33164 var x;
33165 var y;
33166 {
33167 x = this.x;
33168 y = this.y;
33169 }return  new java.awt.Point (x, y);
33170 });
33171 Clazz_defineMethod (c$, "translatePoint", 
33172 function (x, y) {
33173 this.x += x;
33174 this.y += y;
33175 }, "~N,~N");
33176 Clazz_defineMethod (c$, "getClickCount", 
33177 function () {
33178 return this.clickCount;
33179 });
33180 Clazz_defineMethod (c$, "getButton", 
33181 function () {
33182 return this.button;
33183 });
33184 Clazz_defineMethod (c$, "isPopupTrigger", 
33185 function () {
33186 return this.popupTrigger;
33187 });
33188 c$.getMouseModifiersText = Clazz_defineMethod (c$, "getMouseModifiersText", 
33189 function (modifiers) {
33190 var buf =  new StringBuilder ();
33191 if ((modifiers & 8) != 0) {
33192 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33193 buf.append ("+");
33194 }if ((modifiers & 4) != 0) {
33195 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33196 buf.append ("+");
33197 }if ((modifiers & 2) != 0) {
33198 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33199 buf.append ("+");
33200 }if ((modifiers & 1) != 0) {
33201 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33202 buf.append ("+");
33203 }if ((modifiers & 32) != 0) {
33204 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33205 buf.append ("+");
33206 }if ((modifiers & 16) != 0) {
33207 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33208 buf.append ("+");
33209 }if ((modifiers & 8) != 0) {
33210 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33211 buf.append ("+");
33212 }if ((modifiers & 4) != 0) {
33213 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33214 buf.append ("+");
33215 }if (buf.length () > 0) {
33216 buf.setLength (buf.length () - 1);
33217 }return buf.toString ();
33218 }, "~N");
33219 Clazz_overrideMethod (c$, "paramString", 
33220 function () {
33221 var str =  new StringBuilder (80);
33222 str.append (java.awt.event.MouseEvent.getIdString (this.id));
33223 str.append (",(" + this.x).append ("," + this.y).append ("," + this.when).append (")");
33224 str.append (",absolute(").append ("" + this.xAbs).append (",").append ("" + this.yAbs).append (")");
33225 str.append (",button=").append ("" + this.getButton ());
33226 if (this.getModifiers () != 0) {
33227 str.append (",modifiers=").append (java.awt.event.MouseEvent.getMouseModifiersText (this.modifiers));
33228 }if (this.getModifiersEx () != 0) {
33229 str.append (",extModifiers=").append (java.awt.event.InputEvent.getModifiersExText (this.modifiers));
33230 }str.append (",clickCount=").append ("" + this.clickCount);
33231 return str.toString ();
33232 });
33233 c$.getIdString = Clazz_defineMethod (c$, "getIdString", 
33234 function (id) {
33235 switch (id) {
33236 case 501:
33237 return "MOUSE_PRESSED";
33238 case 502:
33239 return "MOUSE_RELEASED";
33240 case 500:
33241 return "MOUSE_CLICKED";
33242 case 504:
33243 return "MOUSE_ENTERED";
33244 case 505:
33245 return "MOUSE_EXITED";
33246 case 503:
33247 return "MOUSE_MOVED";
33248 case 506:
33249 return "MOUSE_DRAGGED";
33250 case 507:
33251 return "MOUSE_WHEEL";
33252 default:
33253 return "unknown type";
33254 }
33255 }, "~N");
33256 Clazz_defineMethod (c$, "setNewModifiers", 
33257  function () {
33258 if ((this.modifiers & 16) != 0) {
33259 this.modifiers |= 1024;
33260 }if ((this.modifiers & 8) != 0) {
33261 this.modifiers |= 2048;
33262 }if ((this.modifiers & 4) != 0) {
33263 this.modifiers |= 4096;
33264 }if (this.id == 501 || this.id == 502 || this.id == 500) {
33265 if ((this.modifiers & 16) != 0) {
33266 this.button = 1;
33267 this.modifiers &= -13;
33268 if (this.id != 501) {
33269 this.modifiers &= -1025;
33270 }} else if ((this.modifiers & 8) != 0) {
33271 this.button = 2;
33272 this.modifiers &= -21;
33273 if (this.id != 501) {
33274 this.modifiers &= -2049;
33275 }} else if ((this.modifiers & 4) != 0) {
33276 this.button = 3;
33277 this.modifiers &= -25;
33278 if (this.id != 501) {
33279 this.modifiers &= -4097;
33280 }}}if ((this.modifiers & 8) != 0) {
33281 this.modifiers |= 512;
33282 }if ((this.modifiers & 4) != 0) {
33283 this.modifiers |= 256;
33284 }if ((this.modifiers & 1) != 0) {
33285 this.modifiers |= 64;
33286 }if ((this.modifiers & 2) != 0) {
33287 this.modifiers |= 128;
33288 }if ((this.modifiers & 32) != 0) {
33289 this.modifiers |= 8192;
33290 }});
33291 Clazz_defineMethod (c$, "setOldModifiers", 
33292  function () {
33293 if (this.id == 501 || this.id == 502 || this.id == 500) {
33294 switch (this.button) {
33295 case 1:
33296 this.modifiers |= 16;
33297 break;
33298 case 2:
33299 this.modifiers |= 8;
33300 break;
33301 case 3:
33302 this.modifiers |= 4;
33303 break;
33304 }
33305 } else {
33306 if ((this.modifiers & 1024) != 0) {
33307 this.modifiers |= 16;
33308 }if ((this.modifiers & 2048) != 0) {
33309 this.modifiers |= 8;
33310 }if ((this.modifiers & 4096) != 0) {
33311 this.modifiers |= 4;
33312 }}if ((this.modifiers & 512) != 0) {
33313 this.modifiers |= 8;
33314 }if ((this.modifiers & 256) != 0) {
33315 this.modifiers |= 4;
33316 }if ((this.modifiers & 64) != 0) {
33317 this.modifiers |= 1;
33318 }if ((this.modifiers & 128) != 0) {
33319 this.modifiers |= 2;
33320 }if ((this.modifiers & 8192) != 0) {
33321 this.modifiers |= 32;
33322 }});
33323 Clazz_defineStatics (c$,
33324 "MOUSE_FIRST", 500,
33325 "MOUSE_LAST", 507,
33326 "MOUSE_CLICKED", 500,
33327 "MOUSE_PRESSED", 501,
33328 "MOUSE_RELEASED", 502,
33329 "MOUSE_MOVED", 503,
33330 "MOUSE_ENTERED", 504,
33331 "MOUSE_EXITED", 505,
33332 "MOUSE_DRAGGED", 506,
33333 "MOUSE_WHEEL", 507,
33334 "NOBUTTON", 0,
33335 "BUTTON1", 1,
33336 "BUTTON2", 2,
33337 "BUTTON3", 3);
33338 });
33339 Clazz_declarePackage ("java.awt.event");
33340 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.InputEvent", ["java.lang.StringBuilder", "java.awt.Toolkit"], function () {
33341 c$ = Clazz_decorateAsClass (function () {
33342 this.when = 0;
33343 this.modifiers = 0;
33344 this.canAccessSystemClipboard = false;
33345 Clazz_instantialize (this, arguments);
33346 }, java.awt.event, "InputEvent", java.awt.event.ComponentEvent);
33347 Clazz_makeConstructor (c$, 
33348 function (source, id, when, modifiers) {
33349 Clazz_superConstructor (this, java.awt.event.InputEvent, [source, id]);
33350 this.when = when;
33351 this.modifiers = modifiers;
33352 this.canAccessSystemClipboard = false;
33353 }, "java.awt.Component,~N,~N,~N");
33354 Clazz_defineMethod (c$, "isShiftDown", 
33355 function () {
33356 return (this.modifiers & 1) != 0;
33357 });
33358 Clazz_defineMethod (c$, "isControlDown", 
33359 function () {
33360 return (this.modifiers & 2) != 0;
33361 });
33362 Clazz_defineMethod (c$, "isMetaDown", 
33363 function () {
33364 return (this.modifiers & 4) != 0;
33365 });
33366 Clazz_defineMethod (c$, "isAltDown", 
33367 function () {
33368 return (this.modifiers & 8) != 0;
33369 });
33370 Clazz_defineMethod (c$, "isAltGraphDown", 
33371 function () {
33372 return (this.modifiers & 32) != 0;
33373 });
33374 Clazz_defineMethod (c$, "getWhen", 
33375 function () {
33376 return this.when;
33377 });
33378 Clazz_defineMethod (c$, "getModifiers", 
33379 function () {
33380 return this.modifiers & (-16321);
33381 });
33382 Clazz_defineMethod (c$, "getModifiersEx", 
33383 function () {
33384 return this.modifiers & -64;
33385 });
33386 Clazz_overrideMethod (c$, "consume", 
33387 function () {
33388 this.consumed = true;
33389 });
33390 Clazz_overrideMethod (c$, "isConsumed", 
33391 function () {
33392 return this.consumed;
33393 });
33394 c$.getModifiersExText = Clazz_defineMethod (c$, "getModifiersExText", 
33395 function (modifiers) {
33396 var buf =  new StringBuilder ();
33397 if ((modifiers & 256) != 0) {
33398 buf.append (java.awt.Toolkit.getProperty ("AWT.meta", "Meta"));
33399 buf.append ("+");
33400 }if ((modifiers & 128) != 0) {
33401 buf.append (java.awt.Toolkit.getProperty ("AWT.control", "Ctrl"));
33402 buf.append ("+");
33403 }if ((modifiers & 512) != 0) {
33404 buf.append (java.awt.Toolkit.getProperty ("AWT.alt", "Alt"));
33405 buf.append ("+");
33406 }if ((modifiers & 64) != 0) {
33407 buf.append (java.awt.Toolkit.getProperty ("AWT.shift", "Shift"));
33408 buf.append ("+");
33409 }if ((modifiers & 8192) != 0) {
33410 buf.append (java.awt.Toolkit.getProperty ("AWT.altGraph", "Alt Graph"));
33411 buf.append ("+");
33412 }if ((modifiers & 1024) != 0) {
33413 buf.append (java.awt.Toolkit.getProperty ("AWT.button1", "Button1"));
33414 buf.append ("+");
33415 }if ((modifiers & 2048) != 0) {
33416 buf.append (java.awt.Toolkit.getProperty ("AWT.button2", "Button2"));
33417 buf.append ("+");
33418 }if ((modifiers & 4096) != 0) {
33419 buf.append (java.awt.Toolkit.getProperty ("AWT.button3", "Button3"));
33420 buf.append ("+");
33421 }if (buf.length () > 0) {
33422 buf.setLength (buf.length () - 1);
33423 }return buf.toString ();
33424 }, "~N");
33425 Clazz_defineStatics (c$,
33426 "SHIFT_MASK", 1,
33427 "CTRL_MASK", 2,
33428 "META_MASK", 4,
33429 "ALT_MASK", 8,
33430 "ALT_GRAPH_MASK", 32,
33431 "BUTTON1_MASK", 16,
33432 "BUTTON2_MASK", 8,
33433 "BUTTON3_MASK", 4,
33434 "SHIFT_DOWN_MASK", 64,
33435 "CTRL_DOWN_MASK", 128,
33436 "META_DOWN_MASK", 256,
33437 "ALT_DOWN_MASK", 512,
33438 "BUTTON1_DOWN_MASK", 1024,
33439 "BUTTON2_DOWN_MASK", 2048,
33440 "BUTTON3_DOWN_MASK", 4096,
33441 "ALT_GRAPH_DOWN_MASK", 8192,
33442 "FIRST_HIGH_BIT", 16384,
33443 "JDK_1_3_MODIFIERS", 63,
33444 "HIGH_MODIFIERS", -16384);
33445 });
33446 Clazz_declarePackage ("java.awt");
33447 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 () {
33448 c$ = Clazz_decorateAsClass (function () {
33449 this.desktopProperties = null;
33450 this.desktopPropsSupport = null;
33451 this.calls = null;
33452 this.eventListener = null;
33453 this.listener2SelectiveListener = null;
33454 if (!Clazz_isClassDefined ("java.awt.Toolkit.SelectiveAWTEventListener")) {
33455 java.awt.Toolkit.$Toolkit$SelectiveAWTEventListener$ ();
33456 }
33457 Clazz_instantialize (this, arguments);
33458 }, java.awt, "Toolkit");
33459 Clazz_prepareFields (c$, function () {
33460 this.desktopProperties =  new java.util.HashMap ();
33461 this.desktopPropsSupport = java.awt.Toolkit.createPropertyChangeSupport (this);
33462 this.calls =  Clazz_newIntArray (32, 0);
33463 this.listener2SelectiveListener =  new java.util.HashMap ();
33464 });
33465 Clazz_defineMethod (c$, "createComponent", 
33466 function (target) {
33467 if (java.awt.Toolkit.lightweightMarker == null) {
33468 java.awt.Toolkit.lightweightMarker =  new jssun.awt.NullComponentPeer ();
33469 }return java.awt.Toolkit.lightweightMarker;
33470 }, "java.awt.Component");
33471 Clazz_defineMethod (c$, "loadSystemColors", 
33472 function (systemColors) {
33473 }, "~A");
33474 Clazz_defineMethod (c$, "setDynamicLayout", 
33475 function (dynamic) {
33476 }, "~B");
33477 Clazz_defineMethod (c$, "isDynamicLayoutSet", 
33478 function () {
33479 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33480 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutSet ();
33481 } else {
33482 return false;
33483 }});
33484 Clazz_defineMethod (c$, "isDynamicLayoutActive", 
33485 function () {
33486 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33487 return java.awt.Toolkit.getDefaultToolkit ().isDynamicLayoutActive ();
33488 } else {
33489 return false;
33490 }});
33491 Clazz_defineMethod (c$, "getScreenInsets", 
33492 function (gc) {
33493 if (this !== java.awt.Toolkit.getDefaultToolkit ()) {
33494 return java.awt.Toolkit.getDefaultToolkit ().getScreenInsets (gc);
33495 } else {
33496 return  new java.awt.Insets (0, 0, 0, 0);
33497 }}, "java.awt.GraphicsConfiguration");
33498 c$.getDefaultToolkit = Clazz_defineMethod (c$, "getDefaultToolkit", 
33499 function () {
33500 return (java.awt.Toolkit.toolkit == null ? java.awt.Toolkit.toolkit =  new swingjs.JSToolkit () : java.awt.Toolkit.toolkit);
33501 });
33502 Clazz_defineMethod (c$, "createImage", 
33503 function (imagedata) {
33504 return this.createImage (imagedata, 0, imagedata.length);
33505 }, "~A");
33506 Clazz_defineMethod (c$, "getMenuShortcutKeyMask", 
33507 function () {
33508 return 2;
33509 });
33510 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
33511 function (c) {
33512 return null;
33513 }, "java.awt.Component");
33514 Clazz_defineMethod (c$, "createCustomCursor", 
33515 function (cursor, hotSpot, name) {
33516 return  new java.awt.Cursor (0);
33517 }, "java.awt.Image,java.awt.Point,~S");
33518 Clazz_defineMethod (c$, "isFrameStateSupported", 
33519 function (state) {
33520 return (state == 0);
33521 }, "~N");
33522 c$.getProperty = Clazz_defineMethod (c$, "getProperty", 
33523 function (key, defaultValue) {
33524 if (java.awt.Toolkit.resources != null) {
33525 try {
33526 return java.awt.Toolkit.resources.getString (key);
33527 } catch (e) {
33528 if (Clazz_exceptionOf (e, java.util.MissingResourceException)) {
33529 } else {
33530 throw e;
33531 }
33532 }
33533 }return defaultValue;
33534 }, "~S,~S");
33535 Clazz_defineMethod (c$, "getSystemEventQueue", 
33536 function () {
33537 return this.getSystemEventQueueImpl ();
33538 });
33539 c$.getEventQueue = Clazz_defineMethod (c$, "getEventQueue", 
33540 function () {
33541 return java.awt.Toolkit.getDefaultToolkit ().getSystemEventQueueImpl ();
33542 });
33543 Clazz_defineMethod (c$, "getDesktopProperty", 
33544 function (propertyName) {
33545 if (this.desktopProperties.isEmpty ()) {
33546 this.initializeDesktopProperties ();
33547 }var value;
33548 if (propertyName.equals ("awt.dynamicLayoutSupported")) {
33549 value = this.lazilyLoadDesktopProperty (propertyName);
33550 return value;
33551 }value = this.desktopProperties.get (propertyName);
33552 if (value == null) {
33553 value = this.lazilyLoadDesktopProperty (propertyName);
33554 if (value != null) {
33555 this.setDesktopProperty (propertyName, value);
33556 }}if (Clazz_instanceOf (value, java.awt.RenderingHints)) {
33557 value = (value).clone ();
33558 }return value;
33559 }, "~S");
33560 Clazz_defineMethod (c$, "setDesktopProperty", 
33561 function (name, newValue) {
33562 var oldValue;
33563 {
33564 oldValue = this.desktopProperties.get (name);
33565 this.desktopProperties.put (name, newValue);
33566 }this.desktopPropsSupport.firePropertyChange (name, oldValue, newValue);
33567 }, "~S,~O");
33568 Clazz_defineMethod (c$, "lazilyLoadDesktopProperty", 
33569 function (name) {
33570 return null;
33571 }, "~S");
33572 Clazz_defineMethod (c$, "initializeDesktopProperties", 
33573 function () {
33574 });
33575 Clazz_defineMethod (c$, "addPropertyChangeListener", 
33576 function (name, pcl) {
33577 this.desktopPropsSupport.addPropertyChangeListener (name, pcl);
33578 }, "~S,java.beans.PropertyChangeListener");
33579 Clazz_defineMethod (c$, "removePropertyChangeListener", 
33580 function (name, pcl) {
33581 this.desktopPropsSupport.removePropertyChangeListener (name, pcl);
33582 }, "~S,java.beans.PropertyChangeListener");
33583 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33584 function () {
33585 return this.desktopPropsSupport.getPropertyChangeListeners ();
33586 });
33587 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
33588 function (propertyName) {
33589 return this.desktopPropsSupport.getPropertyChangeListeners (propertyName);
33590 }, "~S");
33591 Clazz_defineMethod (c$, "isAlwaysOnTopSupported", 
33592 function () {
33593 return true;
33594 });
33595 c$.deProxyAWTEventListener = Clazz_defineMethod (c$, "deProxyAWTEventListener", 
33596  function (l) {
33597 var localL = l;
33598 if (localL == null) {
33599 return null;
33600 }if (Clazz_instanceOf (l, java.awt.event.AWTEventListenerProxy)) {
33601 localL = (l).getListener ();
33602 }return localL;
33603 }, "java.awt.event.AWTEventListener");
33604 Clazz_defineMethod (c$, "addAWTEventListener", 
33605 function (listener, eventMask) {
33606 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33607 if (localL == null) {
33608 return;
33609 }{
33610 var selectiveListener = this.listener2SelectiveListener.get (localL);
33611 if (selectiveListener == null) {
33612 selectiveListener = Clazz_innerTypeInstance (java.awt.Toolkit.SelectiveAWTEventListener, this, null, localL, eventMask);
33613 this.listener2SelectiveListener.put (localL, selectiveListener);
33614 this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.add (this.eventListener, selectiveListener);
33615 }selectiveListener.orEventMasks (eventMask);
33616 java.awt.Toolkit.enabledOnToolkitMask |= eventMask;
33617 var mask = eventMask;
33618 for (var i = 0; i < 32; i++) {
33619 if (mask == 0) {
33620 break;
33621 }if ((mask & 1) != 0) {
33622 this.calls[i]++;
33623 }mask >>>= 1;
33624 }
33625 }}, "java.awt.event.AWTEventListener,~N");
33626 Clazz_defineMethod (c$, "removeAWTEventListener", 
33627 function (listener) {
33628 var localL = java.awt.Toolkit.deProxyAWTEventListener (listener);
33629 if (listener == null) {
33630 return;
33631 }{
33632 var selectiveListener = this.listener2SelectiveListener.get (localL);
33633 if (selectiveListener != null) {
33634 this.listener2SelectiveListener.remove (localL);
33635 var listenerCalls = selectiveListener.getCalls ();
33636 for (var i = 0; i < 32; i++) {
33637 this.calls[i] -= listenerCalls[i];
33638 if (this.calls[i] == 0) {
33639 java.awt.Toolkit.enabledOnToolkitMask &= ~(1 << i);
33640 }}
33641 }this.eventListener = java.awt.Toolkit.ToolkitEventMulticaster.remove (this.eventListener, (selectiveListener == null) ? localL : selectiveListener);
33642 }}, "java.awt.event.AWTEventListener");
33643 c$.enabledOnToolkit = Clazz_defineMethod (c$, "enabledOnToolkit", 
33644 function (eventMask) {
33645 return (java.awt.Toolkit.enabledOnToolkitMask & eventMask) != 0;
33646 }, "~N");
33647 Clazz_defineMethod (c$, "countAWTEventListeners", 
33648 function (eventMask) {
33649 var ci = 0;
33650 for (; eventMask != 0; eventMask >>>= 1, ci++) {
33651 }
33652 ci--;
33653 return this.calls[ci];
33654 }, "~N");
33655 Clazz_defineMethod (c$, "getAWTEventListeners", 
33656 function () {
33657 {
33658 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33659 var ret =  new Array (la.length);
33660 for (var i = 0; i < la.length; i++) {
33661 var sael = la[i];
33662 var tempL = sael.getListener ();
33663 ret[i] =  new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), tempL);
33664 }
33665 return ret;
33666 }});
33667 Clazz_defineMethod (c$, "getAWTEventListeners", 
33668 function (eventMask) {
33669 {
33670 var la = java.awt.Toolkit.ToolkitEventMulticaster.getListeners (this.eventListener, java.awt.event.AWTEventListener);
33671 var list =  new java.util.ArrayList (la.length);
33672 for (var i = 0; i < la.length; i++) {
33673 var sael = la[i];
33674 if ((sael.getEventMask () & eventMask) == eventMask) {
33675 list.add ( new java.awt.event.AWTEventListenerProxy (sael.getEventMask (), sael.getListener ()));
33676 }}
33677 return list.toArray ( new Array (0));
33678 }}, "~N");
33679 Clazz_defineMethod (c$, "notifyAWTEventListeners", 
33680 function (theEvent) {
33681 var eventListener = this.eventListener;
33682 if (eventListener != null) {
33683 eventListener.eventDispatched (theEvent);
33684 }}, "java.awt.AWTEvent");
33685 c$.createPropertyChangeSupport = Clazz_defineMethod (c$, "createPropertyChangeSupport", 
33686  function (toolkit) {
33687 return  new java.beans.PropertyChangeSupport (toolkit);
33688 }, "java.awt.Toolkit");
33689 c$.$Toolkit$SelectiveAWTEventListener$ = function () {
33690 Clazz_pu$h(self.c$);
33691 c$ = Clazz_decorateAsClass (function () {
33692 Clazz_prepareCallback (this, arguments);
33693 this.listener = null;
33694 this.eventMask = 0;
33695 this.calls = null;
33696 Clazz_instantialize (this, arguments);
33697 }, java.awt.Toolkit, "SelectiveAWTEventListener", null, java.awt.event.AWTEventListener);
33698 Clazz_prepareFields (c$, function () {
33699 this.calls =  Clazz_newIntArray (32, 0);
33700 });
33701 Clazz_defineMethod (c$, "getListener", 
33702 function () {
33703 return this.listener;
33704 });
33705 Clazz_defineMethod (c$, "getEventMask", 
33706 function () {
33707 return this.eventMask;
33708 });
33709 Clazz_defineMethod (c$, "getCalls", 
33710 function () {
33711 return this.calls;
33712 });
33713 Clazz_defineMethod (c$, "orEventMasks", 
33714 function (a) {
33715 this.eventMask |= a;
33716 for (var b = 0; b < 32; b++) {
33717 if (a == 0) {
33718 break;
33719 }if ((a & 1) != 0) {
33720 this.calls[b]++;
33721 }a >>>= 1;
33722 }
33723 }, "~N");
33724 Clazz_makeConstructor (c$, 
33725 function (a, b) {
33726 this.listener = a;
33727 this.eventMask = b;
33728 }, "java.awt.event.AWTEventListener,~N");
33729 Clazz_defineMethod (c$, "eventDispatched", 
33730 function (a) {
33731 var b = 0;
33732 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))) {
33733 var c = 0;
33734 for (var d = b; d != 0; d >>>= 1, c++) {
33735 }
33736 c--;
33737 for (var e = 0; e < this.calls[c]; e++) {
33738 this.listener.eventDispatched (a);
33739 }
33740 }}, "java.awt.AWTEvent");
33741 c$ = Clazz_p0p ();
33742 };
33743 Clazz_pu$h(self.c$);
33744 c$ = Clazz_declareType (java.awt.Toolkit, "ToolkitEventMulticaster", java.awt.AWTEventMulticaster, java.awt.event.AWTEventListener);
33745 c$.add = Clazz_defineMethod (c$, "add", 
33746 function (a, b) {
33747 if (a == null) return b;
33748 if (b == null) return a;
33749 return  new java.awt.Toolkit.ToolkitEventMulticaster (a, b);
33750 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33751 c$.remove = Clazz_defineMethod (c$, "remove", 
33752 function (a, b) {
33753 return java.awt.AWTEventMulticaster.removeInternal (a, b);
33754 }, "java.awt.event.AWTEventListener,java.awt.event.AWTEventListener");
33755 Clazz_defineMethod (c$, "remove", 
33756 function (a) {
33757 if (a === this.a) return this.b;
33758 if (a === this.b) return this.a;
33759 var b = java.awt.AWTEventMulticaster.removeInternal (this.a, a);
33760 var c = java.awt.AWTEventMulticaster.removeInternal (this.b, a);
33761 if (b === this.a && c === this.b) {
33762 return this;
33763 }return java.awt.Toolkit.ToolkitEventMulticaster.add (b, c);
33764 }, "java.util.EventListener");
33765 Clazz_defineMethod (c$, "eventDispatched", 
33766 function (a) {
33767 (this.a).eventDispatched (a);
33768 (this.b).eventDispatched (a);
33769 }, "java.awt.AWTEvent");
33770 c$ = Clazz_p0p ();
33771 Clazz_defineStatics (c$,
33772 "lightweightMarker", null,
33773 "toolkit", null,
33774 "resources", null,
33775 "LONG_BITS", 32,
33776 "enabledOnToolkitMask", 0);
33777 });
33778 Clazz_declarePackage ("java.lang");
33779 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 () {
33780 c$ = Clazz_decorateAsClass (function () {
33781 this.name = null;
33782 this.priority = 5;
33783 this.daemon = false;
33784 this.target = null;
33785 this.group = null;
33786 this.tid = 0;
33787 this.threadStatus = 0;
33788 this.parkBlocker = null;
33789 this.stopBeforeStart = false;
33790 this.throwableFromStop = null;
33791 this.me = null;
33792 this.uncaughtExceptionHandler = null;
33793 this.$interrupted = false;
33794 this.stopped = false;
33795 Clazz_instantialize (this, arguments);
33796 }, java.lang, "Thread", null, Runnable);
33797 c$.nextThreadNum = Clazz_defineMethod (c$, "nextThreadNum", 
33798  function () {
33799 return java.lang.Thread.threadInitNumber++;
33800 });
33801 c$.nextThreadID = Clazz_defineMethod (c$, "nextThreadID", 
33802  function () {
33803 return ++java.lang.Thread.threadSeqNumber;
33804 });
33805 c$.currentThread = Clazz_defineMethod (c$, "currentThread", 
33806 function () {
33807 if (java.lang.Thread.thisThread == null) {
33808 java.lang.Thread.thisThread =  new java.lang.Thread ("master");
33809 java.lang.Thread.thisThread.setPriority (5);
33810 }return java.lang.Thread.thisThread;
33811 });
33812 c$.yield = Clazz_defineMethod (c$, "yield", 
33813 function () {
33814 });
33815 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33816 function (millis) {
33817 }, "~N");
33818 c$.sleep = Clazz_defineMethod (c$, "sleep", 
33819 function (millis, nanos) {
33820 if (millis < 0) {
33821 throw  new IllegalArgumentException ("timeout value is negative");
33822 }if (nanos < 0 || nanos > 999999) {
33823 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
33824 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
33825 millis++;
33826 }java.lang.Thread.sleep (millis);
33827 }, "~N,~N");
33828 Clazz_defineMethod (c$, "init", 
33829  function (g, target, name, stackSize) {
33830 this.init (g, target, name, stackSize, null);
33831 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33832 Clazz_defineMethod (c$, "init", 
33833  function (g, target, name, stackSize, acc) {
33834 var parent = (java.lang.Thread.thisThread == null ? null : java.lang.Thread.thisThread);
33835 if (g == null) {
33836 if (g == null && parent != null) {
33837 g = parent.getThreadGroup ();
33838 }}if (g == null) {
33839 g = this.newThreadGroup (null, name);
33840 parent = this;
33841 }g.checkAccess ();
33842 g.addUnstarted ();
33843 this.group = g;
33844 this.priority = parent.getPriority ();
33845 this.name = name;
33846 this.target = target;
33847 this.setPriority (this.priority);
33848 this.tid = java.lang.Thread.nextThreadID ();
33849 this.me = this;
33850 }, "java.lang.ThreadGroup,Runnable,~S,~N,~O");
33851 Clazz_defineMethod (c$, "newThreadGroup", 
33852 function (group, name) {
33853 return  new java.lang.ThreadGroup (group, name);
33854 }, "java.lang.ThreadGroup,~S");
33855 Clazz_makeConstructor (c$, 
33856 function () {
33857 this.init (null, null, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33858 });
33859 Clazz_makeConstructor (c$, 
33860 function (target) {
33861 this.init (null, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33862 }, "Runnable");
33863 Clazz_makeConstructor (c$, 
33864 function (group, target) {
33865 this.init (group, target, "Thread-" + java.lang.Thread.nextThreadNum (), 0);
33866 }, "java.lang.ThreadGroup,Runnable");
33867 Clazz_makeConstructor (c$, 
33868 function (name) {
33869 this.init (null, null, name, 0);
33870 }, "~S");
33871 Clazz_makeConstructor (c$, 
33872 function (group, name) {
33873 this.init (group, null, name, 0);
33874 }, "java.lang.ThreadGroup,~S");
33875 Clazz_makeConstructor (c$, 
33876 function (target, name) {
33877 this.init (null, target, name, 0);
33878 }, "Runnable,~S");
33879 Clazz_makeConstructor (c$, 
33880 function (group, target, name) {
33881 this.init (group, target, name, 0);
33882 }, "java.lang.ThreadGroup,Runnable,~S");
33883 Clazz_makeConstructor (c$, 
33884 function (group, target, name, stackSize) {
33885 this.init (group, target, name, stackSize);
33886 }, "java.lang.ThreadGroup,Runnable,~S,~N");
33887 Clazz_defineMethod (c$, "start", 
33888 function () {
33889 if (this.threadStatus != 0 || this !== this.me) throw  new IllegalThreadStateException ();
33890 this.group.add (this);
33891 this.start0 ();
33892 if (this.stopBeforeStart) {
33893 this.stop0 (this.throwableFromStop);
33894 }});
33895 Clazz_defineMethod (c$, "start0", 
33896  function () {
33897 });
33898 Clazz_defineMethod (c$, "run", 
33899 function () {
33900 if (this.target != null) {
33901 this.target.run ();
33902 }});
33903 Clazz_defineMethod (c$, "stop", 
33904 function () {
33905 if ((this.threadStatus != 0) && !this.isAlive ()) {
33906 return;
33907 }this.stop1 ( new ThreadDeath ());
33908 });
33909 Clazz_defineMethod (c$, "stop", 
33910 function (obj) {
33911 this.stop1 (obj);
33912 }, "Throwable");
33913 Clazz_defineMethod (c$, "stop1", 
33914  function (th) {
33915 if (this.threadStatus != 0) {
33916 this.resume ();
33917 this.stop0 (th);
33918 } else {
33919 if (th == null) {
33920 throw  new NullPointerException ();
33921 }this.stopBeforeStart = true;
33922 this.throwableFromStop = th;
33923 }}, "Throwable");
33924 Clazz_defineMethod (c$, "interrupt", 
33925 function () {
33926 this.interrupt0 ();
33927 });
33928 c$.interrupted = Clazz_defineMethod (c$, "interrupted", 
33929 function () {
33930 return java.lang.Thread.currentThread ().isInterruptedB (true);
33931 });
33932 Clazz_defineMethod (c$, "isInterrupted", 
33933 function () {
33934 return this.isInterruptedB (false);
33935 });
33936 Clazz_defineMethod (c$, "isInterruptedB", 
33937  function (clearInterrupted) {
33938 var wasInt = this.$interrupted;
33939 if (clearInterrupted) this.$interrupted = false;
33940 return wasInt;
33941 }, "~B");
33942 Clazz_defineMethod (c$, "destroy", 
33943 function () {
33944 throw  new NoSuchMethodError ();
33945 });
33946 Clazz_defineMethod (c$, "isAlive", 
33947 function () {
33948 return true;
33949 });
33950 Clazz_defineMethod (c$, "suspend", 
33951 function () {
33952 this.checkAccess ();
33953 this.suspend0 ();
33954 });
33955 Clazz_defineMethod (c$, "resume", 
33956 function () {
33957 this.checkAccess ();
33958 this.resume0 ();
33959 });
33960 Clazz_defineMethod (c$, "setPriority", 
33961 function (newPriority) {
33962 var g;
33963 this.checkAccess ();
33964 if (newPriority > 10 || newPriority < 1) {
33965 throw  new IllegalArgumentException ();
33966 }if ((g = this.getThreadGroup ()) != null) {
33967 if (newPriority > g.getMaxPriority ()) {
33968 newPriority = g.getMaxPriority ();
33969 }this.setPriority0 (this.priority = newPriority);
33970 }}, "~N");
33971 Clazz_defineMethod (c$, "getPriority", 
33972 function () {
33973 return this.priority;
33974 });
33975 Clazz_defineMethod (c$, "setName", 
33976 function (name) {
33977 this.checkAccess ();
33978 this.name = name;
33979 }, "~S");
33980 Clazz_defineMethod (c$, "getName", 
33981 function () {
33982 return this.name;
33983 });
33984 Clazz_defineMethod (c$, "getThreadGroup", 
33985 function () {
33986 return this.group;
33987 });
33988 c$.activeCount = Clazz_defineMethod (c$, "activeCount", 
33989 function () {
33990 return java.lang.Thread.currentThread ().getThreadGroup ().activeCount ();
33991 });
33992 c$.enumerate = Clazz_defineMethod (c$, "enumerate", 
33993 function (tarray) {
33994 return java.lang.Thread.currentThread ().getThreadGroup ().enumerate (tarray);
33995 }, "~A");
33996 Clazz_defineMethod (c$, "countStackFrames", 
33997 function () {
33998 return 0;
33999 });
34000 Clazz_defineMethod (c$, "join", 
34001 function (millis) {
34002 var base = System.currentTimeMillis ();
34003 var now = 0;
34004 if (millis < 0) {
34005 throw  new IllegalArgumentException ("timeout value is negative");
34006 }swingjs.JSToolkit.warn ("Cannot wait in Thread");
34007 if (millis == 0) {
34008 while (this.isAlive ()) {
34009 this.wait (0);
34010 }
34011 } else {
34012 while (this.isAlive ()) {
34013 var delay = millis - now;
34014 if (delay <= 0) {
34015 break;
34016 }this.wait (delay);
34017 now = System.currentTimeMillis () - base;
34018 }
34019 }}, "~N");
34020 Clazz_defineMethod (c$, "join", 
34021 function (millis, nanos) {
34022 if (millis < 0) {
34023 throw  new IllegalArgumentException ("timeout value is negative");
34024 }if (nanos < 0 || nanos > 999999) {
34025 throw  new IllegalArgumentException ("nanosecond timeout value out of range");
34026 }if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
34027 millis++;
34028 }this.join (millis);
34029 }, "~N,~N");
34030 Clazz_defineMethod (c$, "join", 
34031 function () {
34032 this.join (0);
34033 });
34034 c$.dumpStack = Clazz_defineMethod (c$, "dumpStack", 
34035 function () {
34036  new Exception ("Stack trace").printStackTrace ();
34037 });
34038 Clazz_defineMethod (c$, "setDaemon", 
34039 function (on) {
34040 this.checkAccess ();
34041 if (this.isAlive ()) {
34042 throw  new IllegalThreadStateException ();
34043 }this.daemon = on;
34044 }, "~B");
34045 Clazz_defineMethod (c$, "isDaemon", 
34046 function () {
34047 return this.daemon;
34048 });
34049 Clazz_defineMethod (c$, "checkAccess", 
34050 function () {
34051 });
34052 Clazz_overrideMethod (c$, "toString", 
34053 function () {
34054 var group = this.getThreadGroup ();
34055 if (group != null) {
34056 return "Thread[" + this.getName () + "," + this.getPriority () + "," + group.getName () + "]";
34057 } else {
34058 return "Thread[" + this.getName () + "," + this.getPriority () + "," + "" + "]";
34059 }});
34060 Clazz_defineMethod (c$, "getContextClassLoader", 
34061 function () {
34062 return null;
34063 });
34064 Clazz_defineMethod (c$, "setContextClassLoader", 
34065 function (cl) {
34066 }, "ClassLoader");
34067 c$.holdsLock = Clazz_defineMethod (c$, "holdsLock", 
34068 function (obj) {
34069 return false;
34070 }, "~O");
34071 Clazz_defineMethod (c$, "getStackTrace", 
34072 function () {
34073 return ( new Exception ()).getStackTrace ();
34074 });
34075 c$.getAllStackTraces = Clazz_defineMethod (c$, "getAllStackTraces", 
34076 function () {
34077 var threads = java.lang.Thread.getThreads ();
34078 var traces = java.lang.Thread.dumpThreads (threads);
34079 var m =  new java.util.HashMap (threads.length);
34080 for (var i = 0; i < threads.length; i++) {
34081 var stackTrace = traces[i];
34082 if (stackTrace != null) {
34083 m.put (threads[i], stackTrace);
34084 }}
34085 return m;
34086 });
34087 c$.dumpThreads = Clazz_defineMethod (c$, "dumpThreads", 
34088  function (threads) {
34089 return null;
34090 }, "~A");
34091 c$.getThreads = Clazz_defineMethod (c$, "getThreads", 
34092  function () {
34093 return null;
34094 });
34095 Clazz_defineMethod (c$, "getId", 
34096 function () {
34097 return this.tid;
34098 });
34099 Clazz_defineMethod (c$, "getState", 
34100 function () {
34101 switch (this.threadStatus) {
34102 case 0:
34103 return java.lang.Thread.State.NEW;
34104 case 1:
34105 return java.lang.Thread.State.RUNNABLE;
34106 case 2:
34107 default:
34108 return java.lang.Thread.State.TERMINATED;
34109 case 3:
34110 return java.lang.Thread.State.TIMED_WAITING;
34111 case 4:
34112 return java.lang.Thread.State.WAITING;
34113 }
34114 });
34115 c$.setDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "setDefaultUncaughtExceptionHandler", 
34116 function (eh) {
34117 java.lang.Thread.defaultUncaughtExceptionHandler = eh;
34118 }, "java.lang.Thread.UncaughtExceptionHandler");
34119 c$.getDefaultUncaughtExceptionHandler = Clazz_defineMethod (c$, "getDefaultUncaughtExceptionHandler", 
34120 function () {
34121 return java.lang.Thread.defaultUncaughtExceptionHandler;
34122 });
34123 Clazz_defineMethod (c$, "getUncaughtExceptionHandler", 
34124 function () {
34125 return this.uncaughtExceptionHandler != null ? this.uncaughtExceptionHandler : this.group;
34126 });
34127 Clazz_defineMethod (c$, "setUncaughtExceptionHandler", 
34128 function (eh) {
34129 this.checkAccess ();
34130 this.uncaughtExceptionHandler = eh;
34131 }, "java.lang.Thread.UncaughtExceptionHandler");
34132 Clazz_defineMethod (c$, "setPriority0", 
34133  function (newPriority) {
34134 }, "~N");
34135 Clazz_defineMethod (c$, "stop0", 
34136  function (o) {
34137 this.stopped = true;
34138 }, "~O");
34139 Clazz_defineMethod (c$, "suspend0", 
34140  function () {
34141 });
34142 Clazz_defineMethod (c$, "resume0", 
34143  function () {
34144 });
34145 Clazz_defineMethod (c$, "interrupt0", 
34146  function () {
34147 this.$interrupted = true;
34148 });
34149 Clazz_pu$h(self.c$);
34150 c$ = Clazz_declareType (java.lang.Thread, "State", Enum);
34151 Clazz_defineEnumConstant (c$, "NEW", 0, []);
34152 Clazz_defineEnumConstant (c$, "RUNNABLE", 1, []);
34153 Clazz_defineEnumConstant (c$, "BLOCKED", 2, []);
34154 Clazz_defineEnumConstant (c$, "WAITING", 3, []);
34155 Clazz_defineEnumConstant (c$, "TIMED_WAITING", 4, []);
34156 Clazz_defineEnumConstant (c$, "TERMINATED", 5, []);
34157 c$ = Clazz_p0p ();
34158 Clazz_declareInterface (java.lang.Thread, "UncaughtExceptionHandler");
34159 Clazz_defineStatics (c$,
34160 "threadInitNumber", 0,
34161 "threadSeqNumber", 0,
34162 "thisThread", null,
34163 "MIN_PRIORITY", 1,
34164 "NORM_PRIORITY", 5,
34165 "MAX_PRIORITY", 10,
34166 "defaultUncaughtExceptionHandler", null);
34167 });
34168 Clazz_declarePackage ("java.lang");
34169 Clazz_load (["java.lang.Thread"], "java.lang.ThreadGroup", ["java.lang.IllegalThreadStateException", "$.ThreadDeath", "java.util.Arrays"], function () {
34170 c$ = Clazz_decorateAsClass (function () {
34171 this.parent = null;
34172 this.name = null;
34173 this.maxPriority = 10;
34174 this.destroyed = false;
34175 this.daemon = false;
34176 this.vmAllowSuspension = false;
34177 this.nUnstartedThreads = 0;
34178 this.nthreads = 0;
34179 this.threads = null;
34180 this.ngroups = 0;
34181 this.groups = null;
34182 this.html5Applet = null;
34183 Clazz_instantialize (this, arguments);
34184 }, java.lang, "ThreadGroup", null, java.lang.Thread.UncaughtExceptionHandler);
34185 Clazz_makeConstructor (c$, 
34186 function (name) {
34187 this.construct (java.lang.Thread.currentThread ().getThreadGroup (), name);
34188 }, "~S");
34189 Clazz_makeConstructor (c$, 
34190 function (parent, name) {
34191 this.name = name;
34192 this.parent = parent;
34193 if (parent != null) {
34194 this.maxPriority = parent.maxPriority;
34195 this.daemon = parent.daemon;
34196 this.vmAllowSuspension = parent.vmAllowSuspension;
34197 parent.add (this);
34198 }}, "java.lang.ThreadGroup,~S");
34199 Clazz_defineMethod (c$, "getName", 
34200 function () {
34201 return this.name;
34202 });
34203 Clazz_defineMethod (c$, "getParent", 
34204 function () {
34205 if (this.parent != null) this.parent.checkAccess ();
34206 return this.parent;
34207 });
34208 Clazz_defineMethod (c$, "getMaxPriority", 
34209 function () {
34210 return this.maxPriority;
34211 });
34212 Clazz_defineMethod (c$, "isDaemon", 
34213 function () {
34214 return this.daemon;
34215 });
34216 Clazz_defineMethod (c$, "isDestroyed", 
34217 function () {
34218 return this.destroyed;
34219 });
34220 Clazz_defineMethod (c$, "setDaemon", 
34221 function (daemon) {
34222 this.checkAccess ();
34223 this.daemon = daemon;
34224 }, "~B");
34225 Clazz_defineMethod (c$, "setMaxPriority", 
34226 function (pri) {
34227 var ngroupsSnapshot;
34228 var groupsSnapshot;
34229 {
34230 this.checkAccess ();
34231 if (pri < 1 || pri > 10) {
34232 return;
34233 }this.maxPriority = (this.parent != null) ? Math.min (pri, this.parent.maxPriority) : pri;
34234 ngroupsSnapshot = this.ngroups;
34235 if (this.groups != null) {
34236 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34237 } else {
34238 groupsSnapshot = null;
34239 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34240 groupsSnapshot[i].setMaxPriority (pri);
34241 }
34242 }, "~N");
34243 Clazz_defineMethod (c$, "parentOf", 
34244 function (g) {
34245 for (; g != null; g = g.parent) {
34246 if (g === this) {
34247 return true;
34248 }}
34249 return false;
34250 }, "java.lang.ThreadGroup");
34251 Clazz_defineMethod (c$, "checkAccess", 
34252 function () {
34253 });
34254 Clazz_defineMethod (c$, "activeCount", 
34255 function () {
34256 var result;
34257 var ngroupsSnapshot;
34258 var groupsSnapshot;
34259 {
34260 if (this.destroyed) {
34261 return 0;
34262 }result = this.nthreads;
34263 ngroupsSnapshot = this.ngroups;
34264 if (this.groups != null) {
34265 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34266 } else {
34267 groupsSnapshot = null;
34268 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34269 result += groupsSnapshot[i].activeCount ();
34270 }
34271 return result;
34272 });
34273 Clazz_defineMethod (c$, "enumerate", 
34274 function (list) {
34275 this.checkAccess ();
34276 return this.enumerate (list, 0, true);
34277 }, "~A");
34278 Clazz_defineMethod (c$, "enumerate", 
34279 function (list, recurse) {
34280 this.checkAccess ();
34281 return this.enumerate (list, 0, recurse);
34282 }, "~A,~B");
34283 Clazz_defineMethod (c$, "enumerate", 
34284  function (list, n, recurse) {
34285 var ngroupsSnapshot = 0;
34286 var groupsSnapshot = null;
34287 {
34288 if (this.destroyed) {
34289 return 0;
34290 }var nt = this.nthreads;
34291 if (nt > list.length - n) {
34292 nt = list.length - n;
34293 }for (var i = 0; i < nt; i++) {
34294 if (this.threads[i].isAlive ()) {
34295 list[n++] = this.threads[i];
34296 }}
34297 if (recurse) {
34298 ngroupsSnapshot = this.ngroups;
34299 if (this.groups != null) {
34300 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34301 } else {
34302 groupsSnapshot = null;
34303 }}}if (recurse) {
34304 for (var i = 0; i < ngroupsSnapshot; i++) {
34305 n = groupsSnapshot[i].enumerate (list, n, true);
34306 }
34307 }return n;
34308 }, "~A,~N,~B");
34309 Clazz_defineMethod (c$, "activeGroupCount", 
34310 function () {
34311 var ngroupsSnapshot;
34312 var groupsSnapshot;
34313 {
34314 if (this.destroyed) {
34315 return 0;
34316 }ngroupsSnapshot = this.ngroups;
34317 if (this.groups != null) {
34318 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34319 } else {
34320 groupsSnapshot = null;
34321 }}var n = ngroupsSnapshot;
34322 for (var i = 0; i < ngroupsSnapshot; i++) {
34323 n += groupsSnapshot[i].activeGroupCount ();
34324 }
34325 return n;
34326 });
34327 Clazz_defineMethod (c$, "enumerate", 
34328 function (list) {
34329 this.checkAccess ();
34330 return this.enumerate (list, 0, true);
34331 }, "~A");
34332 Clazz_defineMethod (c$, "enumerate", 
34333 function (list, recurse) {
34334 this.checkAccess ();
34335 return this.enumerate (list, 0, recurse);
34336 }, "~A,~B");
34337 Clazz_defineMethod (c$, "enumerate", 
34338  function (list, n, recurse) {
34339 var ngroupsSnapshot = 0;
34340 var groupsSnapshot = null;
34341 {
34342 if (this.destroyed) {
34343 return 0;
34344 }var ng = this.ngroups;
34345 if (ng > list.length - n) {
34346 ng = list.length - n;
34347 }if (ng > 0) {
34348 System.arraycopy (this.groups, 0, list, n, ng);
34349 n += ng;
34350 }if (recurse) {
34351 ngroupsSnapshot = this.ngroups;
34352 if (this.groups != null) {
34353 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34354 } else {
34355 groupsSnapshot = null;
34356 }}}if (recurse) {
34357 for (var i = 0; i < ngroupsSnapshot; i++) {
34358 n = groupsSnapshot[i].enumerate (list, n, true);
34359 }
34360 }return n;
34361 }, "~A,~N,~B");
34362 Clazz_defineMethod (c$, "stop", 
34363 function () {
34364 if (this.stopOrSuspend (false)) java.lang.Thread.currentThread ().stop ();
34365 });
34366 Clazz_defineMethod (c$, "interrupt", 
34367 function () {
34368 var ngroupsSnapshot;
34369 var groupsSnapshot;
34370 {
34371 this.checkAccess ();
34372 for (var i = 0; i < this.nthreads; i++) {
34373 this.threads[i].interrupt ();
34374 }
34375 ngroupsSnapshot = this.ngroups;
34376 if (this.groups != null) {
34377 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34378 } else {
34379 groupsSnapshot = null;
34380 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34381 groupsSnapshot[i].interrupt ();
34382 }
34383 });
34384 Clazz_defineMethod (c$, "suspend", 
34385 function () {
34386 if (this.stopOrSuspend (true)) java.lang.Thread.currentThread ().suspend ();
34387 });
34388 Clazz_defineMethod (c$, "stopOrSuspend", 
34389  function (suspend) {
34390 var suicide = false;
34391 var us = java.lang.Thread.currentThread ();
34392 var ngroupsSnapshot;
34393 var groupsSnapshot = null;
34394 {
34395 this.checkAccess ();
34396 for (var i = 0; i < this.nthreads; i++) {
34397 if (this.threads[i] === us) suicide = true;
34398  else if (suspend) this.threads[i].suspend ();
34399  else this.threads[i].stop ();
34400 }
34401 ngroupsSnapshot = this.ngroups;
34402 if (this.groups != null) {
34403 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34404 }}for (var i = 0; i < ngroupsSnapshot; i++) suicide = groupsSnapshot[i].stopOrSuspend (suspend) || suicide;
34405
34406 return suicide;
34407 }, "~B");
34408 Clazz_defineMethod (c$, "resume", 
34409 function () {
34410 var ngroupsSnapshot;
34411 var groupsSnapshot;
34412 {
34413 this.checkAccess ();
34414 for (var i = 0; i < this.nthreads; i++) {
34415 this.threads[i].resume ();
34416 }
34417 ngroupsSnapshot = this.ngroups;
34418 if (this.groups != null) {
34419 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34420 } else {
34421 groupsSnapshot = null;
34422 }}for (var i = 0; i < ngroupsSnapshot; i++) {
34423 groupsSnapshot[i].resume ();
34424 }
34425 });
34426 Clazz_defineMethod (c$, "destroy", 
34427 function () {
34428 var ngroupsSnapshot;
34429 var groupsSnapshot;
34430 {
34431 this.checkAccess ();
34432 if (this.destroyed || (this.nthreads > 0)) {
34433 throw  new IllegalThreadStateException ();
34434 }ngroupsSnapshot = this.ngroups;
34435 if (this.groups != null) {
34436 groupsSnapshot = java.util.Arrays.copyOf (this.groups, ngroupsSnapshot);
34437 } else {
34438 groupsSnapshot = null;
34439 }if (this.parent != null) {
34440 this.destroyed = true;
34441 this.ngroups = 0;
34442 this.groups = null;
34443 this.nthreads = 0;
34444 this.threads = null;
34445 }}for (var i = 0; i < ngroupsSnapshot; i += 1) {
34446 groupsSnapshot[i].destroy ();
34447 }
34448 if (this.parent != null) {
34449 this.parent.remove (this);
34450 }});
34451 Clazz_defineMethod (c$, "add", 
34452  function (g) {
34453 {
34454 if (this.destroyed) {
34455 throw  new IllegalThreadStateException ();
34456 }if (this.groups == null) {
34457 this.groups =  new Array (4);
34458 } else if (this.ngroups == this.groups.length) {
34459 this.groups = java.util.Arrays.copyOf (this.groups, this.ngroups * 2);
34460 }this.groups[this.ngroups] = g;
34461 this.ngroups++;
34462 }}, "java.lang.ThreadGroup");
34463 Clazz_defineMethod (c$, "remove", 
34464  function (g) {
34465 {
34466 if (this.destroyed) {
34467 return;
34468 }for (var i = 0; i < this.ngroups; i++) {
34469 if (this.groups[i] === g) {
34470 this.ngroups -= 1;
34471 System.arraycopy (this.groups, i + 1, this.groups, i, this.ngroups - i);
34472 this.groups[this.ngroups] = null;
34473 break;
34474 }}
34475 if (this.nthreads == 0) {
34476 this.notifyAll ();
34477 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34478 this.destroy ();
34479 }}}, "java.lang.ThreadGroup");
34480 Clazz_defineMethod (c$, "addUnstarted", 
34481 function () {
34482 {
34483 if (this.destroyed) {
34484 throw  new IllegalThreadStateException ();
34485 }this.nUnstartedThreads++;
34486 }});
34487 Clazz_defineMethod (c$, "add", 
34488 function (t) {
34489 {
34490 if (this.destroyed) {
34491 throw  new IllegalThreadStateException ();
34492 }if (this.threads == null) {
34493 this.threads =  new Array (4);
34494 } else if (this.nthreads == this.threads.length) {
34495 this.threads = java.util.Arrays.copyOf (this.threads, this.nthreads * 2);
34496 }this.threads[this.nthreads] = t;
34497 this.nthreads++;
34498 this.nUnstartedThreads--;
34499 }}, "java.lang.Thread");
34500 Clazz_defineMethod (c$, "remove", 
34501 function (t) {
34502 {
34503 if (this.destroyed) {
34504 return;
34505 }for (var i = 0; i < this.nthreads; i++) {
34506 if (this.threads[i] === t) {
34507 System.arraycopy (this.threads, i + 1, this.threads, i, --this.nthreads - i);
34508 this.threads[this.nthreads] = null;
34509 break;
34510 }}
34511 if (this.nthreads == 0) {
34512 this.notifyAll ();
34513 }if (this.daemon && (this.nthreads == 0) && (this.nUnstartedThreads == 0) && (this.ngroups == 0)) {
34514 this.destroy ();
34515 }}}, "java.lang.Thread");
34516 Clazz_defineMethod (c$, "uncaughtException", 
34517 function (t, e) {
34518 if (this.parent != null) {
34519 this.parent.uncaughtException (t, e);
34520 } else {
34521 var ueh = java.lang.Thread.getDefaultUncaughtExceptionHandler ();
34522 if (ueh != null) {
34523 ueh.uncaughtException (t, e);
34524 } else if (!(Clazz_instanceOf (e, ThreadDeath))) {
34525 System.err.print ("Exception in thread \"" + t.getName () + "\" ");
34526 e.printStackTrace (System.err);
34527 }}}, "java.lang.Thread,Throwable");
34528 Clazz_overrideMethod (c$, "toString", 
34529 function () {
34530 return this.getClass ().getName () + "[name=" + this.getName () + ",maxpri=" + this.maxPriority + ",html5Applet=" + this.html5Applet + "]";
34531 });
34532 });
34533 Clazz_declarePackage ("java.awt");
34534 Clazz_load (["java.awt.LayoutManager"], "java.awt.FlowLayout", ["java.awt.Dimension"], function () {
34535 c$ = Clazz_decorateAsClass (function () {
34536 this.align = 0;
34537 this.newAlign = 0;
34538 this.hgap = 0;
34539 this.vgap = 0;
34540 this.alignOnBaseline = false;
34541 Clazz_instantialize (this, arguments);
34542 }, java.awt, "FlowLayout", null, [java.awt.LayoutManager, java.io.Serializable]);
34543 Clazz_makeConstructor (c$, 
34544 function () {
34545 this.construct (1, 5, 5);
34546 });
34547 Clazz_makeConstructor (c$, 
34548 function (align) {
34549 this.construct (align, 5, 5);
34550 }, "~N");
34551 Clazz_makeConstructor (c$, 
34552 function (align, hgap, vgap) {
34553 this.hgap = hgap;
34554 this.vgap = vgap;
34555 this.setAlignment (align);
34556 }, "~N,~N,~N");
34557 Clazz_defineMethod (c$, "getAlignment", 
34558 function () {
34559 return this.newAlign;
34560 });
34561 Clazz_defineMethod (c$, "setAlignment", 
34562 function (align) {
34563 this.newAlign = align;
34564 switch (align) {
34565 case 3:
34566 this.align = 0;
34567 break;
34568 case 4:
34569 this.align = 2;
34570 break;
34571 default:
34572 this.align = align;
34573 break;
34574 }
34575 }, "~N");
34576 Clazz_defineMethod (c$, "getHgap", 
34577 function () {
34578 return this.hgap;
34579 });
34580 Clazz_defineMethod (c$, "setHgap", 
34581 function (hgap) {
34582 this.hgap = hgap;
34583 }, "~N");
34584 Clazz_defineMethod (c$, "getVgap", 
34585 function () {
34586 return this.vgap;
34587 });
34588 Clazz_defineMethod (c$, "setVgap", 
34589 function (vgap) {
34590 this.vgap = vgap;
34591 }, "~N");
34592 Clazz_defineMethod (c$, "setAlignOnBaseline", 
34593 function (alignOnBaseline) {
34594 this.alignOnBaseline = alignOnBaseline;
34595 }, "~B");
34596 Clazz_defineMethod (c$, "getAlignOnBaseline", 
34597 function () {
34598 return this.alignOnBaseline;
34599 });
34600 Clazz_overrideMethod (c$, "addLayoutComponent", 
34601 function (name, comp) {
34602 }, "~S,java.awt.Component");
34603 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34604 function (comp) {
34605 }, "java.awt.Component");
34606 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34607 function (target) {
34608 {
34609 var dim =  new java.awt.Dimension (0, 0);
34610 var nmembers = target.getComponentCount ();
34611 var firstVisibleComponent = true;
34612 var useBaseline = this.getAlignOnBaseline ();
34613 var maxAscent = 0;
34614 var maxDescent = 0;
34615 for (var i = 0; i < nmembers; i++) {
34616 var m = target.getComponent (i);
34617 if (m.isVisible ()) {
34618 var d = m.getPreferredSize ();
34619 dim.height = Math.max (dim.height, d.height);
34620 if (firstVisibleComponent) {
34621 firstVisibleComponent = false;
34622 } else {
34623 dim.width += this.hgap;
34624 }dim.width += d.width;
34625 if (useBaseline) {
34626 var baseline = m.getBaseline (d.width, d.height);
34627 if (baseline >= 0) {
34628 maxAscent = Math.max (maxAscent, baseline);
34629 maxDescent = Math.max (maxDescent, d.height - baseline);
34630 }}}}
34631 if (useBaseline) {
34632 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34633 }var insets = target.getInsets ();
34634 dim.width += insets.left + insets.right + this.hgap * 2;
34635 dim.height += insets.top + insets.bottom + this.vgap * 2;
34636 return dim;
34637 }}, "java.awt.Container");
34638 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34639 function (target) {
34640 {
34641 var useBaseline = this.getAlignOnBaseline ();
34642 var dim =  new java.awt.Dimension (0, 0);
34643 var nmembers = target.getComponentCount ();
34644 var maxAscent = 0;
34645 var maxDescent = 0;
34646 var firstVisibleComponent = true;
34647 for (var i = 0; i < nmembers; i++) {
34648 var m = target.getComponent (i);
34649 if (m.visible) {
34650 var d = m.getMinimumSize ();
34651 dim.height = Math.max (dim.height, d.height);
34652 if (firstVisibleComponent) {
34653 firstVisibleComponent = false;
34654 } else {
34655 dim.width += this.hgap;
34656 }dim.width += d.width;
34657 if (useBaseline) {
34658 var baseline = m.getBaseline (d.width, d.height);
34659 if (baseline >= 0) {
34660 maxAscent = Math.max (maxAscent, baseline);
34661 maxDescent = Math.max (maxDescent, dim.height - baseline);
34662 }}}}
34663 if (useBaseline) {
34664 dim.height = Math.max (maxAscent + maxDescent, dim.height);
34665 }var insets = target.getInsets ();
34666 dim.width += insets.left + insets.right + this.hgap * 2;
34667 dim.height += insets.top + insets.bottom + this.vgap * 2;
34668 return dim;
34669 }}, "java.awt.Container");
34670 Clazz_defineMethod (c$, "moveComponents", 
34671  function (target, x, y, width, height, rowStart, rowEnd, ltr, useBaseline, ascent, descent) {
34672 switch (this.newAlign) {
34673 case 0:
34674 x += ltr ? 0 : width;
34675 break;
34676 case 1:
34677 x += Clazz_doubleToInt (width / 2);
34678 break;
34679 case 2:
34680 x += ltr ? width : 0;
34681 break;
34682 case 3:
34683 break;
34684 case 4:
34685 x += width;
34686 break;
34687 }
34688 var maxAscent = 0;
34689 var nonbaselineHeight = 0;
34690 var baselineOffset = 0;
34691 if (useBaseline) {
34692 var maxDescent = 0;
34693 for (var i = rowStart; i < rowEnd; i++) {
34694 var m = target.getComponent (i);
34695 if (m.visible) {
34696 if (ascent[i] >= 0) {
34697 maxAscent = Math.max (maxAscent, ascent[i]);
34698 maxDescent = Math.max (maxDescent, descent[i]);
34699 } else {
34700 nonbaselineHeight = Math.max (m.getHeight (), nonbaselineHeight);
34701 }}}
34702 height = Math.max (maxAscent + maxDescent, nonbaselineHeight);
34703 baselineOffset = Clazz_doubleToInt ((height - maxAscent - maxDescent) / 2);
34704 }for (var i = rowStart; i < rowEnd; i++) {
34705 var m = target.getComponent (i);
34706 if (m.isVisible ()) {
34707 var cy;
34708 if (useBaseline && ascent[i] >= 0) {
34709 cy = y + baselineOffset + maxAscent - ascent[i];
34710 } else {
34711 cy = y + Clazz_doubleToInt ((height - m.height) / 2);
34712 }if (ltr) {
34713 m.setLocation (x, cy);
34714 } else {
34715 m.setLocation (target.width - x - m.width, cy);
34716 }x += m.width + this.hgap;
34717 }}
34718 return height;
34719 }, "java.awt.Container,~N,~N,~N,~N,~N,~N,~B,~B,~A,~A");
34720 Clazz_overrideMethod (c$, "layoutContainer", 
34721 function (target) {
34722 System.out.println ("FlowLayout laying out " + target);
34723 {
34724 var insets = target.getInsets ();
34725 var maxwidth = target.width - (insets.left + insets.right + this.hgap * 2);
34726 var nmembers = target.getComponentCount ();
34727 var x = 0;
34728 var y = insets.top + this.vgap;
34729 var rowh = 0;
34730 var start = 0;
34731 var ltr = target.getComponentOrientation ().isLeftToRight ();
34732 var useBaseline = this.getAlignOnBaseline ();
34733 var ascent = null;
34734 var descent = null;
34735 if (useBaseline) {
34736 ascent =  Clazz_newIntArray (nmembers, 0);
34737 descent =  Clazz_newIntArray (nmembers, 0);
34738 }for (var i = 0; i < nmembers; i++) {
34739 var m = target.getComponent (i);
34740 if (m.isVisible ()) {
34741 var d = m.getPreferredSize ();
34742 m.setSize (d.width, d.height);
34743 if (useBaseline) {
34744 var baseline = m.getBaseline (d.width, d.height);
34745 if (baseline >= 0) {
34746 ascent[i] = baseline;
34747 descent[i] = d.height - baseline;
34748 } else {
34749 ascent[i] = -1;
34750 }}if ((x == 0) || ((x + d.width) <= maxwidth)) {
34751 if (x > 0) {
34752 x += this.hgap;
34753 }x += d.width;
34754 rowh = Math.max (rowh, d.height);
34755 } else {
34756 rowh = this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, i, ltr, useBaseline, ascent, descent);
34757 x = d.width;
34758 y += this.vgap + rowh;
34759 rowh = d.height;
34760 start = i;
34761 }}}
34762 this.moveComponents (target, insets.left + this.hgap, y, maxwidth - x, rowh, start, nmembers, ltr, useBaseline, ascent, descent);
34763 }}, "java.awt.Container");
34764 Clazz_overrideMethod (c$, "toString", 
34765 function () {
34766 var str = "";
34767 switch (this.align) {
34768 case 0:
34769 str = ",align=left";
34770 break;
34771 case 1:
34772 str = ",align=center";
34773 break;
34774 case 2:
34775 str = ",align=right";
34776 break;
34777 case 3:
34778 str = ",align=leading";
34779 break;
34780 case 4:
34781 str = ",align=trailing";
34782 break;
34783 }
34784 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + str + "]";
34785 });
34786 Clazz_defineStatics (c$,
34787 "LEFT", 0,
34788 "CENTER", 1,
34789 "RIGHT", 2,
34790 "LEADING", 3,
34791 "TRAILING", 4);
34792 });
34793 Clazz_declarePackage ("java.awt");
34794 Clazz_load (["java.awt.LayoutManager2"], "java.awt.BorderLayout", ["java.lang.IllegalArgumentException", "java.awt.Dimension"], function () {
34795 c$ = Clazz_decorateAsClass (function () {
34796 this.hgap = 0;
34797 this.vgap = 0;
34798 this.north = null;
34799 this.west = null;
34800 this.east = null;
34801 this.south = null;
34802 this.center = null;
34803 this.firstLine = null;
34804 this.lastLine = null;
34805 this.firstItem = null;
34806 this.lastItem = null;
34807 Clazz_instantialize (this, arguments);
34808 }, java.awt, "BorderLayout", null, [java.awt.LayoutManager2, java.io.Serializable]);
34809 Clazz_makeConstructor (c$, 
34810 function () {
34811 this.construct (0, 0);
34812 });
34813 Clazz_makeConstructor (c$, 
34814 function (hgap, vgap) {
34815 this.hgap = hgap;
34816 this.vgap = vgap;
34817 }, "~N,~N");
34818 Clazz_defineMethod (c$, "getHgap", 
34819 function () {
34820 return this.hgap;
34821 });
34822 Clazz_defineMethod (c$, "setHgap", 
34823 function (hgap) {
34824 this.hgap = hgap;
34825 }, "~N");
34826 Clazz_defineMethod (c$, "getVgap", 
34827 function () {
34828 return this.vgap;
34829 });
34830 Clazz_defineMethod (c$, "setVgap", 
34831 function (vgap) {
34832 this.vgap = vgap;
34833 }, "~N");
34834 Clazz_defineMethod (c$, "addLayoutComponent", 
34835 function (comp, constraints) {
34836 {
34837 if ((constraints == null) || (Clazz_instanceOf (constraints, String))) {
34838 this.addLayoutComponent (constraints, comp);
34839 } else {
34840 throw  new IllegalArgumentException ("cannot add to layout: constraint must be a string (or null)");
34841 }}}, "java.awt.Component,~O");
34842 Clazz_defineMethod (c$, "addLayoutComponent", 
34843 function (name, comp) {
34844 {
34845 if (name == null) {
34846 name = "Center";
34847 }System.out.println ("BorderLayout adding " + name + " " + comp);
34848 if ("Center".equals (name)) {
34849 this.center = comp;
34850 } else if ("North".equals (name)) {
34851 this.north = comp;
34852 } else if ("South".equals (name)) {
34853 this.south = comp;
34854 } else if ("East".equals (name)) {
34855 this.east = comp;
34856 } else if ("West".equals (name)) {
34857 this.west = comp;
34858 } else if ("First".equals (name)) {
34859 this.firstLine = comp;
34860 } else if ("Last".equals (name)) {
34861 this.lastLine = comp;
34862 } else if ("Before".equals (name)) {
34863 this.firstItem = comp;
34864 } else if ("After".equals (name)) {
34865 this.lastItem = comp;
34866 } else {
34867 throw  new IllegalArgumentException ("cannot add to layout: unknown constraint: " + name);
34868 }}}, "~S,java.awt.Component");
34869 Clazz_overrideMethod (c$, "removeLayoutComponent", 
34870 function (comp) {
34871 {
34872 if (comp === this.center) {
34873 this.center = null;
34874 } else if (comp === this.north) {
34875 this.north = null;
34876 } else if (comp === this.south) {
34877 this.south = null;
34878 } else if (comp === this.east) {
34879 this.east = null;
34880 } else if (comp === this.west) {
34881 this.west = null;
34882 }if (comp === this.firstLine) {
34883 this.firstLine = null;
34884 } else if (comp === this.lastLine) {
34885 this.lastLine = null;
34886 } else if (comp === this.firstItem) {
34887 this.firstItem = null;
34888 } else if (comp === this.lastItem) {
34889 this.lastItem = null;
34890 }}}, "java.awt.Component");
34891 Clazz_defineMethod (c$, "getLayoutComponent", 
34892 function (constraints) {
34893 if ("Center".equals (constraints)) {
34894 return this.center;
34895 } else if ("North".equals (constraints)) {
34896 return this.north;
34897 } else if ("South".equals (constraints)) {
34898 return this.south;
34899 } else if ("West".equals (constraints)) {
34900 return this.west;
34901 } else if ("East".equals (constraints)) {
34902 return this.east;
34903 } else if ("First".equals (constraints)) {
34904 return this.firstLine;
34905 } else if ("Last".equals (constraints)) {
34906 return this.lastLine;
34907 } else if ("Before".equals (constraints)) {
34908 return this.firstItem;
34909 } else if ("After".equals (constraints)) {
34910 return this.lastItem;
34911 } else {
34912 throw  new IllegalArgumentException ("cannot get component: unknown constraint: " + constraints);
34913 }}, "~O");
34914 Clazz_defineMethod (c$, "getLayoutComponent", 
34915 function (target, constraints) {
34916 var ltr = target.getComponentOrientation ().isLeftToRight ();
34917 var result = null;
34918 if ("North".equals (constraints)) {
34919 result = (this.firstLine != null) ? this.firstLine : this.north;
34920 } else if ("South".equals (constraints)) {
34921 result = (this.lastLine != null) ? this.lastLine : this.south;
34922 } else if ("West".equals (constraints)) {
34923 result = ltr ? this.firstItem : this.lastItem;
34924 if (result == null) {
34925 result = this.west;
34926 }} else if ("East".equals (constraints)) {
34927 result = ltr ? this.lastItem : this.firstItem;
34928 if (result == null) {
34929 result = this.east;
34930 }} else if ("Center".equals (constraints)) {
34931 result = this.center;
34932 } else {
34933 throw  new IllegalArgumentException ("cannot get component: invalid constraint: " + constraints);
34934 }return result;
34935 }, "java.awt.Container,~O");
34936 Clazz_defineMethod (c$, "getConstraints", 
34937 function (comp) {
34938 if (comp == null) {
34939 return null;
34940 }if (comp === this.center) {
34941 return "Center";
34942 } else if (comp === this.north) {
34943 return "North";
34944 } else if (comp === this.south) {
34945 return "South";
34946 } else if (comp === this.west) {
34947 return "West";
34948 } else if (comp === this.east) {
34949 return "East";
34950 } else if (comp === this.firstLine) {
34951 return "First";
34952 } else if (comp === this.lastLine) {
34953 return "Last";
34954 } else if (comp === this.firstItem) {
34955 return "Before";
34956 } else if (comp === this.lastItem) {
34957 return "After";
34958 }return null;
34959 }, "java.awt.Component");
34960 Clazz_overrideMethod (c$, "minimumLayoutSize", 
34961 function (target) {
34962 {
34963 var dim =  new java.awt.Dimension (0, 0);
34964 var ltr = target.getComponentOrientation ().isLeftToRight ();
34965 var c = null;
34966 if ((c = this.getChild ("East", ltr)) != null) {
34967 var d = c.getMinimumSize ();
34968 dim.width += d.width + this.hgap;
34969 dim.height = Math.max (d.height, dim.height);
34970 }if ((c = this.getChild ("West", ltr)) != null) {
34971 var d = c.getMinimumSize ();
34972 dim.width += d.width + this.hgap;
34973 dim.height = Math.max (d.height, dim.height);
34974 }if ((c = this.getChild ("Center", ltr)) != null) {
34975 var d = c.getMinimumSize ();
34976 dim.width += d.width;
34977 dim.height = Math.max (d.height, dim.height);
34978 }if ((c = this.getChild ("North", ltr)) != null) {
34979 var d = c.getMinimumSize ();
34980 dim.width = Math.max (d.width, dim.width);
34981 dim.height += d.height + this.vgap;
34982 }if ((c = this.getChild ("South", ltr)) != null) {
34983 var d = c.getMinimumSize ();
34984 dim.width = Math.max (d.width, dim.width);
34985 dim.height += d.height + this.vgap;
34986 }var insets = target.getInsets ();
34987 dim.width += insets.left + insets.right;
34988 dim.height += insets.top + insets.bottom;
34989 return dim;
34990 }}, "java.awt.Container");
34991 Clazz_overrideMethod (c$, "preferredLayoutSize", 
34992 function (target) {
34993 {
34994 var dim =  new java.awt.Dimension (0, 0);
34995 var ltr = target.getComponentOrientation ().isLeftToRight ();
34996 var c = null;
34997 if ((c = this.getChild ("East", ltr)) != null) {
34998 var d = c.getPreferredSize ();
34999 dim.width += d.width + this.hgap;
35000 dim.height = Math.max (d.height, dim.height);
35001 }if ((c = this.getChild ("West", ltr)) != null) {
35002 var d = c.getPreferredSize ();
35003 dim.width += d.width + this.hgap;
35004 dim.height = Math.max (d.height, dim.height);
35005 }if ((c = this.getChild ("Center", ltr)) != null) {
35006 var d = c.getPreferredSize ();
35007 dim.width += d.width;
35008 dim.height = Math.max (d.height, dim.height);
35009 }if ((c = this.getChild ("North", ltr)) != null) {
35010 var d = c.getPreferredSize ();
35011 dim.width = Math.max (d.width, dim.width);
35012 dim.height += d.height + this.vgap;
35013 }if ((c = this.getChild ("South", ltr)) != null) {
35014 var d = c.getPreferredSize ();
35015 dim.width = Math.max (d.width, dim.width);
35016 dim.height += d.height + this.vgap;
35017 }var insets = target.getInsets ();
35018 dim.width += insets.left + insets.right;
35019 dim.height += insets.top + insets.bottom;
35020 return dim;
35021 }}, "java.awt.Container");
35022 Clazz_overrideMethod (c$, "maximumLayoutSize", 
35023 function (target) {
35024 return  new java.awt.Dimension (2147483647, 2147483647);
35025 }, "java.awt.Container");
35026 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
35027 function (parent) {
35028 return 0.5;
35029 }, "java.awt.Container");
35030 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
35031 function (parent) {
35032 return 0.5;
35033 }, "java.awt.Container");
35034 Clazz_overrideMethod (c$, "invalidateLayout", 
35035 function (target) {
35036 }, "java.awt.Container");
35037 Clazz_overrideMethod (c$, "layoutContainer", 
35038 function (target) {
35039 System.out.println ("BorderLayout laying out " + target);
35040 {
35041 var insets = target.getInsets ();
35042 var top = insets.top;
35043 var bottom = target.height - insets.bottom;
35044 var left = insets.left;
35045 var right = target.width - insets.right;
35046 var ltr = target.getComponentOrientation ().isLeftToRight ();
35047 var c = null;
35048 if ((c = this.getChild ("North", ltr)) != null) {
35049 c.setSize (right - left, c.height);
35050 var d = c.getPreferredSize ();
35051 c.setBounds (left, top, right - left, d.height);
35052 top += d.height + this.vgap;
35053 }if ((c = this.getChild ("South", ltr)) != null) {
35054 c.setSize (right - left, c.height);
35055 var d = c.getPreferredSize ();
35056 c.setBounds (left, bottom - d.height, right - left, d.height);
35057 bottom -= d.height + this.vgap;
35058 }if ((c = this.getChild ("East", ltr)) != null) {
35059 c.setSize (c.width, bottom - top);
35060 var d = c.getPreferredSize ();
35061 c.setBounds (right - d.width, top, d.width, bottom - top);
35062 right -= d.width + this.hgap;
35063 }if ((c = this.getChild ("West", ltr)) != null) {
35064 c.setSize (c.width, bottom - top);
35065 var d = c.getPreferredSize ();
35066 c.setBounds (left, top, d.width, bottom - top);
35067 left += d.width + this.hgap;
35068 }if ((c = this.getChild ("Center", ltr)) != null) {
35069 c.setBounds (left, top, right - left, bottom - top);
35070 }}}, "java.awt.Container");
35071 Clazz_defineMethod (c$, "getChild", 
35072  function (key, ltr) {
35073 var result = null;
35074 if (key === "North") {
35075 result = (this.firstLine != null) ? this.firstLine : this.north;
35076 } else if (key === "South") {
35077 result = (this.lastLine != null) ? this.lastLine : this.south;
35078 } else if (key === "West") {
35079 result = ltr ? this.firstItem : this.lastItem;
35080 if (result == null) {
35081 result = this.west;
35082 }} else if (key === "East") {
35083 result = ltr ? this.lastItem : this.firstItem;
35084 if (result == null) {
35085 result = this.east;
35086 }} else if (key === "Center") {
35087 result = this.center;
35088 }if (result != null && !result.visible) {
35089 result = null;
35090 }return result;
35091 }, "~S,~B");
35092 Clazz_overrideMethod (c$, "toString", 
35093 function () {
35094 return this.getClass ().getName () + "[hgap=" + this.hgap + ",vgap=" + this.vgap + "]";
35095 });
35096 Clazz_defineStatics (c$,
35097 "NORTH", "North",
35098 "SOUTH", "South",
35099 "EAST", "East",
35100 "WEST", "West",
35101 "CENTER", "Center",
35102 "BEFORE_FIRST_LINE", "First",
35103 "AFTER_LAST_LINE", "Last",
35104 "BEFORE_LINE_BEGINS", "Before",
35105 "AFTER_LINE_ENDS", "After");
35106 c$.PAGE_START = c$.prototype.PAGE_START = "First";
35107 c$.PAGE_END = c$.prototype.PAGE_END = "Last";
35108 c$.LINE_START = c$.prototype.LINE_START = "Before";
35109 c$.LINE_END = c$.prototype.LINE_END = "After";
35110 });
35111 Clazz_declarePackage ("java.awt");
35112 Clazz_load (["java.awt.LayoutManager"], "java.awt.LayoutManager2", null, function () {
35113 Clazz_declareInterface (java.awt, "LayoutManager2", java.awt.LayoutManager);
35114 });
35115 Clazz_declarePackage ("java.awt");
35116 Clazz_declareInterface (java.awt, "LayoutManager");
35117 Clazz_declarePackage ("java.awt");
35118 Clazz_load (["jssun.awt.SunGraphicsCallback"], "java.awt.GraphicsCallback", null, function () {
35119 c$ = Clazz_declareType (java.awt, "GraphicsCallback", jssun.awt.SunGraphicsCallback);
35120 Clazz_pu$h(self.c$);
35121 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintCallback", java.awt.GraphicsCallback);
35122 Clazz_makeConstructor (c$, 
35123  function () {
35124 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintCallback, []);
35125 });
35126 Clazz_overrideMethod (c$, "run", 
35127 function (a, b) {
35128 a.paint (b);
35129 }, "java.awt.Component,java.awt.Graphics");
35130 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35131 function () {
35132 return java.awt.GraphicsCallback.PaintCallback.instance;
35133 });
35134 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintCallback ();
35135 c$ = Clazz_p0p ();
35136 Clazz_pu$h(self.c$);
35137 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintAllCallback", java.awt.GraphicsCallback);
35138 Clazz_makeConstructor (c$, 
35139  function () {
35140 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintAllCallback, []);
35141 });
35142 Clazz_overrideMethod (c$, "run", 
35143 function (a, b) {
35144 a.paintAll (b);
35145 }, "java.awt.Component,java.awt.Graphics");
35146 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35147 function () {
35148 return java.awt.GraphicsCallback.PaintAllCallback.instance;
35149 });
35150 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintAllCallback ();
35151 c$ = Clazz_p0p ();
35152 Clazz_pu$h(self.c$);
35153 c$ = Clazz_declareType (java.awt.GraphicsCallback, "PaintHeavyweightComponentsCallback", java.awt.GraphicsCallback);
35154 Clazz_makeConstructor (c$, 
35155  function () {
35156 Clazz_superConstructor (this, java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback, []);
35157 });
35158 Clazz_overrideMethod (c$, "run", 
35159 function (a, b) {
35160 if (a.isLightweight ()) {
35161 a.paintHeavyweightComponents (b);
35162 } else {
35163 a.paintAll (b);
35164 }}, "java.awt.Component,java.awt.Graphics");
35165 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
35166 function () {
35167 return java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.instance;
35168 });
35169 c$.instance = c$.prototype.instance =  new java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback ();
35170 c$ = Clazz_p0p ();
35171 });
35172 Clazz_declarePackage ("java.awt");
35173 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 () {
35174 c$ = Clazz_decorateAsClass (function () {
35175 this.component = null;
35176 this.layoutMgr = null;
35177 this.dispatcher = null;
35178 this.focusCycleRoot = false;
35179 this.focusTraversalPolicyProvider = false;
35180 this.containerListener = null;
35181 this.listeningChildren = 0;
35182 this.listeningBoundsChildren = 0;
35183 this.descendantsCount = 0;
35184 this.preserveBackgroundColor = null;
35185 this.numOfHWComponents = 0;
35186 this.numOfLWComponents = 0;
35187 this.modalComp = null;
35188 this.modalAppContext = null;
35189 Clazz_instantialize (this, arguments);
35190 }, java.awt, "Container", java.awt.Component);
35191 Clazz_makeConstructor (c$, 
35192 function () {
35193 Clazz_superConstructor (this, java.awt.Container, []);
35194 this.component =  new java.util.ArrayList ();
35195 });
35196 Clazz_defineMethod (c$, "initializeFocusTraversalKeys", 
35197 function () {
35198 });
35199 Clazz_defineMethod (c$, "getComponentCount", 
35200 function () {
35201 return this.countComponents ();
35202 });
35203 Clazz_defineMethod (c$, "countComponents", 
35204 function () {
35205 return this.component.size ();
35206 });
35207 Clazz_defineMethod (c$, "getComponent", 
35208 function (n) {
35209 if ((n < 0) || (n >= this.component.size ())) {
35210 throw  new ArrayIndexOutOfBoundsException ("No such child: " + n);
35211 }return this.component.get (n);
35212 }, "~N");
35213 Clazz_defineMethod (c$, "getComponents", 
35214 function () {
35215 return this.getComponents_NoClientCode ();
35216 });
35217 Clazz_defineMethod (c$, "getComponents_NoClientCode", 
35218 function () {
35219 return this.component.toArray (java.awt.Container.EMPTY_ARRAY);
35220 });
35221 Clazz_defineMethod (c$, "getInsets", 
35222 function () {
35223 var peer = this.peer;
35224 if (Clazz_instanceOf (peer, java.awt.peer.ContainerPeer)) {
35225 var cpeer = peer;
35226 return cpeer.getInsets ().clone ();
35227 }return  new java.awt.Insets (0, 0, 0, 0);
35228 });
35229 Clazz_defineMethod (c$, "add", 
35230 function (comp) {
35231 return this.addImpl (comp, null, -1);
35232 }, "java.awt.Component");
35233 Clazz_defineMethod (c$, "add", 
35234 function (name, comp) {
35235 return this.addImpl (comp, name, -1);
35236 }, "~S,java.awt.Component");
35237 Clazz_defineMethod (c$, "add", 
35238 function (comp, index) {
35239 return this.addImpl (comp, null, index);
35240 }, "java.awt.Component,~N");
35241 Clazz_defineMethod (c$, "checkAddToSelf", 
35242  function (comp) {
35243 if (Clazz_instanceOf (comp, java.awt.Container)) {
35244 for (var cn = this; cn != null; cn = cn.parent) {
35245 if (cn === comp) {
35246 throw  new IllegalArgumentException ("adding container's parent to itself");
35247 }}
35248 }}, "java.awt.Component");
35249 Clazz_defineMethod (c$, "checkNotAWindow", 
35250  function (comp) {
35251 if (Clazz_instanceOf (comp, java.awt.Window)) {
35252 throw  new IllegalArgumentException ("adding a window to a container");
35253 }}, "java.awt.Component");
35254 Clazz_defineMethod (c$, "removeDelicately", 
35255  function (comp, newParent, newIndex) {
35256 var index = this.getComponentZOrder (comp);
35257 var needRemoveNotify = java.awt.Container.isRemoveNotifyNeeded (comp, this, newParent);
35258 if (needRemoveNotify) {
35259 comp.removeNotify ();
35260 }if (newParent !== this) {
35261 if (this.layoutMgr != null) {
35262 this.layoutMgr.removeLayoutComponent (comp);
35263 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35264 this.adjustListeningChildren (65536, -comp.numListening (65536));
35265 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35266 comp.parent = null;
35267 this.component.remove (index);
35268 this.invalidateIfValid ();
35269 } else {
35270 this.component.remove (index);
35271 this.component.add (newIndex, comp);
35272 }if (comp.parent == null) {
35273 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35274 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35275 this.dispatchEvent (e);
35276 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35277 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35278 this.updateCursorImmediately ();
35279 }}return needRemoveNotify;
35280 }, "java.awt.Component,java.awt.Container,~N");
35281 Clazz_defineMethod (c$, "canContainFocusOwner", 
35282 function (focusOwnerCandidate) {
35283 if (!(this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ())) {
35284 return false;
35285 }{
35286 if (this.parent != null) {
35287 return this.parent.canContainFocusOwner (focusOwnerCandidate);
35288 }}return true;
35289 }, "java.awt.Component");
35290 Clazz_defineMethod (c$, "hasHeavyweightDescendants", 
35291 function () {
35292 return this.numOfHWComponents > 0;
35293 });
35294 Clazz_defineMethod (c$, "hasLightweightDescendants", 
35295 function () {
35296 return this.numOfLWComponents > 0;
35297 });
35298 Clazz_defineMethod (c$, "getHeavyweightContainer", 
35299 function () {
35300 if (this.peer != null && !(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35301 return this;
35302 } else {
35303 return this.getNativeContainer ();
35304 }});
35305 c$.isRemoveNotifyNeeded = Clazz_defineMethod (c$, "isRemoveNotifyNeeded", 
35306  function (comp, oldContainer, newContainer) {
35307 return false;
35308 }, "java.awt.Component,java.awt.Container,java.awt.Container");
35309 Clazz_defineMethod (c$, "setComponentZOrder", 
35310 function (comp, index) {
35311 {
35312 var curParent = comp.parent;
35313 var oldZindex = this.getComponentZOrder (comp);
35314 if (curParent === this && index == oldZindex) {
35315 return;
35316 }var peerRecreated = (curParent != null) ? curParent.removeDelicately (comp, this, index) : false;
35317 this.addDelicately (comp, curParent, index);
35318 if (!peerRecreated && oldZindex != -1) {
35319 comp.mixOnZOrderChanging (oldZindex, index);
35320 }}}, "java.awt.Component,~N");
35321 Clazz_defineMethod (c$, "reparentTraverse", 
35322  function (parentPeer, child) {
35323 this.checkTreeLock ();
35324 for (var i = 0; i < child.getComponentCount (); i++) {
35325 var comp = child.getComponent (i);
35326 if (comp.isLightweight ()) {
35327 if (Clazz_instanceOf (comp, java.awt.Container)) {
35328 this.reparentTraverse (parentPeer, comp);
35329 }} else {
35330 comp.getPeer ().reparent (parentPeer);
35331 }}
35332 }, "java.awt.peer.ContainerPeer,java.awt.Container");
35333 Clazz_defineMethod (c$, "reparentChild", 
35334  function (comp) {
35335 if (comp == null) {
35336 return;
35337 }if (comp.isLightweight ()) {
35338 if (Clazz_instanceOf (comp, java.awt.Container)) {
35339 this.reparentTraverse (this.getPeer (), comp);
35340 }} else {
35341 comp.getPeer ().reparent (this.getPeer ());
35342 }}, "java.awt.Component");
35343 Clazz_defineMethod (c$, "addDelicately", 
35344  function (comp, curParent, index) {
35345 this.checkTreeLock ();
35346 if (curParent !== this) {
35347 if (index == -1) {
35348 this.component.add (comp);
35349 } else {
35350 this.component.add (index, comp);
35351 }comp.parent = this;
35352 this.adjustListeningChildren (32768, comp.numListening (32768));
35353 this.adjustListeningChildren (65536, comp.numListening (65536));
35354 this.adjustDescendants (comp.countHierarchyMembers ());
35355 } else {
35356 if (index < this.component.size ()) {
35357 this.component.set (index, comp);
35358 }}this.invalidateIfValid ();
35359 if (this.peer != null) {
35360 if (comp.peer == null) {
35361 comp.addNotify ();
35362 } else {
35363 var newNativeContainer = this.getHeavyweightContainer ();
35364 var oldNativeContainer = curParent.getHeavyweightContainer ();
35365 if (oldNativeContainer !== newNativeContainer) {
35366 newNativeContainer.reparentChild (comp);
35367 }if (!comp.isLightweight () && this.isLightweight ()) {
35368 comp.relocateComponent ();
35369 }}}if (curParent !== this) {
35370 if (this.layoutMgr != null) {
35371 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35372 (this.layoutMgr).addLayoutComponent (comp, null);
35373 } else {
35374 this.layoutMgr.addLayoutComponent (null, comp);
35375 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35376 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35377 this.dispatchEvent (e);
35378 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35379 } else {
35380 comp.createHierarchyEvents (1400, comp, this, 1400, java.awt.Toolkit.enabledOnToolkit (32768));
35381 }if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35382 this.updateCursorImmediately ();
35383 }}, "java.awt.Component,java.awt.Container,~N");
35384 Clazz_defineMethod (c$, "checkTreeLock", 
35385  function () {
35386 });
35387 Clazz_defineMethod (c$, "getComponentZOrder", 
35388 function (comp) {
35389 if (comp == null) {
35390 return -1;
35391 }{
35392 if (comp.parent !== this) {
35393 return -1;
35394 }return this.component.indexOf (comp);
35395 }}, "java.awt.Component");
35396 Clazz_defineMethod (c$, "add", 
35397 function (comp, constraints) {
35398 this.addImpl (comp, constraints, -1);
35399 }, "java.awt.Component,~O");
35400 Clazz_defineMethod (c$, "add", 
35401 function (comp, constraints, index) {
35402 return this.addImpl (comp, constraints, index);
35403 }, "java.awt.Component,~O,~N");
35404 Clazz_defineMethod (c$, "addImpl", 
35405 function (comp, constraints, index) {
35406 return this.addImplSAEM (comp, constraints, index);
35407 }, "java.awt.Component,~O,~N");
35408 Clazz_defineMethod (c$, "addImplSAEM", 
35409 function (comp, constraints, index) {
35410 {
35411 if (index > this.component.size () || (index < 0 && index != -1)) {
35412 throw  new IllegalArgumentException ("illegal component position");
35413 }this.checkAddToSelf (comp);
35414 this.checkNotAWindow (comp);
35415 if (comp.parent != null) {
35416 comp.parent.remove (comp);
35417 if (index > this.component.size ()) {
35418 throw  new IllegalArgumentException ("illegal component position");
35419 }}if (index == -1) {
35420 this.component.add (comp);
35421 } else {
35422 this.component.add (index, comp);
35423 }comp.parent = this;
35424 this.adjustListeningChildren (32768, comp.numListening (32768));
35425 this.adjustListeningChildren (65536, comp.numListening (65536));
35426 this.adjustDescendants (comp.countHierarchyMembers ());
35427 this.invalidateIfValid ();
35428 if (this.peer != null) {
35429 comp.addNotify ();
35430 }if (this.layoutMgr != null) {
35431 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35432 (this.layoutMgr).addLayoutComponent (comp, constraints);
35433 } else if (Clazz_instanceOf (constraints, String)) {
35434 this.layoutMgr.addLayoutComponent (constraints, comp);
35435 }}if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35436 var e =  new java.awt.event.ContainerEvent (this, 300, comp);
35437 this.dispatchEvent (e);
35438 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35439 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35440 this.updateCursorImmediately ();
35441 }}return comp;
35442 }, "java.awt.Component,~O,~N");
35443 Clazz_defineMethod (c$, "checkGD", 
35444 function (stringID) {
35445 }, "~S");
35446 Clazz_defineMethod (c$, "remove", 
35447 function (index) {
35448 this.removeInt (index);
35449 }, "~N");
35450 Clazz_defineMethod (c$, "removeInt", 
35451 function (index) {
35452 {
35453 if (index < 0 || index >= this.component.size ()) {
35454 throw  new ArrayIndexOutOfBoundsException (index);
35455 }var comp = this.component.get (index);
35456 if (this.peer != null) {
35457 comp.removeNotify ();
35458 }if (this.layoutMgr != null) {
35459 this.layoutMgr.removeLayoutComponent (comp);
35460 }this.adjustListeningChildren (32768, -comp.numListening (32768));
35461 this.adjustListeningChildren (65536, -comp.numListening (65536));
35462 this.adjustDescendants (-(comp.countHierarchyMembers ()));
35463 comp.parent = null;
35464 this.component.remove (index);
35465 this.invalidateIfValid ();
35466 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35467 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35468 this.dispatchEvent (e);
35469 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35470 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35471 this.updateCursorImmediately ();
35472 }}}, "~N");
35473 Clazz_defineMethod (c$, "remove", 
35474 function (comp) {
35475 this.removeChild (comp);
35476 }, "java.awt.Component");
35477 Clazz_defineMethod (c$, "removeChild", 
35478 function (comp) {
35479 {
35480 if (comp.parent === this) {
35481 var index = this.component.indexOf (comp);
35482 if (index >= 0) {
35483 this.remove (index);
35484 }}}}, "java.awt.Component");
35485 Clazz_defineMethod (c$, "removeAll", 
35486 function () {
35487 {
35488 this.adjustListeningChildren (32768, -this.listeningChildren);
35489 this.adjustListeningChildren (65536, -this.listeningBoundsChildren);
35490 this.adjustDescendants (-this.descendantsCount);
35491 while (!this.component.isEmpty ()) {
35492 var comp = this.component.remove (this.component.size () - 1);
35493 if (this.peer != null) {
35494 comp.removeNotify ();
35495 }if (this.layoutMgr != null) {
35496 this.layoutMgr.removeLayoutComponent (comp);
35497 }comp.parent = null;
35498 if (this.containerListener != null || (this.eventMask & 2) != 0 || java.awt.Toolkit.enabledOnToolkit (2)) {
35499 var e =  new java.awt.event.ContainerEvent (this, 301, comp);
35500 this.dispatchEvent (e);
35501 }comp.createHierarchyEvents (1400, comp, this, 1, java.awt.Toolkit.enabledOnToolkit (32768));
35502 }
35503 if (this.peer != null && this.layoutMgr == null && this.isVisible ()) {
35504 this.updateCursorImmediately ();
35505 }this.invalidateIfValid ();
35506 }});
35507 Clazz_defineMethod (c$, "numListening", 
35508 function (mask) {
35509 var superListening = this.numListeningMask (mask);
35510 if (mask == 32768) {
35511 return this.listeningChildren + superListening;
35512 } else if (mask == 65536) {
35513 return this.listeningBoundsChildren + superListening;
35514 } else {
35515 return superListening;
35516 }}, "~N");
35517 Clazz_defineMethod (c$, "adjustListeningChildren", 
35518 function (mask, num) {
35519 if (num == 0) return;
35520 if ((mask & 32768) != 0) {
35521 this.listeningChildren += num;
35522 }if ((mask & 65536) != 0) {
35523 this.listeningBoundsChildren += num;
35524 }this.adjustListeningChildrenOnParent (mask, num);
35525 }, "~N,~N");
35526 Clazz_defineMethod (c$, "adjustDescendants", 
35527 function (num) {
35528 if (num == 0) return;
35529 this.descendantsCount += num;
35530 this.adjustDecendantsOnParent (num);
35531 }, "~N");
35532 Clazz_defineMethod (c$, "adjustDecendantsOnParent", 
35533 function (num) {
35534 if (this.parent != null) {
35535 this.parent.adjustDescendants (num);
35536 }}, "~N");
35537 Clazz_defineMethod (c$, "countHierarchyMembers", 
35538 function () {
35539 return this.descendantsCount + 1;
35540 });
35541 Clazz_defineMethod (c$, "getListenersCount", 
35542  function (id, enabledOnToolkit) {
35543 if (enabledOnToolkit) {
35544 return this.descendantsCount;
35545 }switch (id) {
35546 case 1400:
35547 return this.listeningChildren;
35548 case 1401:
35549 case 1402:
35550 return this.listeningBoundsChildren;
35551 default:
35552 return 0;
35553 }
35554 }, "~N,~B");
35555 Clazz_defineMethod (c$, "createHierarchyEvents", 
35556 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
35557 var listeners = this.getListenersCount (id, enabledOnToolkit);
35558 for (var count = listeners, i = 0; count > 0; i++) {
35559 count -= this.component.get (i).createHierarchyEvents (id, changed, changedParent, changeFlags, enabledOnToolkit);
35560 }
35561 return listeners + this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
35562 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
35563 Clazz_defineMethod (c$, "createChildHierarchyEvents", 
35564 function (id, changeFlags, enabledOnToolkit) {
35565 if (this.component.isEmpty ()) {
35566 return;
35567 }var listeners = this.getListenersCount (id, enabledOnToolkit);
35568 for (var count = listeners, i = 0; count > 0; i++) {
35569 count -= this.component.get (i).createHierarchyEvents (id, this, this.parent, changeFlags, enabledOnToolkit);
35570 }
35571 }, "~N,~N,~B");
35572 Clazz_defineMethod (c$, "getLayout", 
35573 function () {
35574 return this.layoutMgr;
35575 });
35576 Clazz_defineMethod (c$, "setLayout", 
35577 function (mgr) {
35578 this.layoutMgr = mgr;
35579 this.invalidateIfValid ();
35580 }, "java.awt.LayoutManager");
35581 Clazz_overrideMethod (c$, "doLayout", 
35582 function () {
35583 this.layout ();
35584 });
35585 Clazz_overrideMethod (c$, "layout", 
35586 function () {
35587 var layoutMgr = this.layoutMgr;
35588 if (layoutMgr != null) {
35589 layoutMgr.layoutContainer (this);
35590 }});
35591 Clazz_overrideMethod (c$, "invalidate", 
35592 function () {
35593 var layoutMgr = this.layoutMgr;
35594 if (Clazz_instanceOf (layoutMgr, java.awt.LayoutManager2)) {
35595 var lm = layoutMgr;
35596 lm.invalidateLayout (this);
35597 }this.invalidateComp ();
35598 });
35599 Clazz_overrideMethod (c$, "validate", 
35600 function () {
35601 if (!this.isValid ()) {
35602 var updateCur = false;
35603 {
35604 if (!this.isValid () && this.peer != null) {
35605 var p = null;
35606 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35607 p = this.peer;
35608 }if (p != null) {
35609 p.beginValidate ();
35610 }this.validateTree ();
35611 if (p != null) {
35612 p.endValidate ();
35613 updateCur = this.isVisible ();
35614 }}}if (updateCur) {
35615 this.updateCursorImmediately ();
35616 }}});
35617 Clazz_defineMethod (c$, "validateTree", 
35618 function () {
35619 if (!this.isValid ()) {
35620 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35621 (this.peer).beginLayout ();
35622 }this.doLayout ();
35623 for (var i = 0; i < this.component.size (); i++) {
35624 var comp = this.component.get (i);
35625 if ((Clazz_instanceOf (comp, java.awt.Container)) && !(Clazz_instanceOf (comp, java.awt.Window)) && !comp.isValid ()) {
35626 (comp).validateTree ();
35627 } else {
35628 comp.validate ();
35629 }}
35630 if (Clazz_instanceOf (this.peer, java.awt.peer.ContainerPeer)) {
35631 (this.peer).endLayout ();
35632 }}this.validateComponent ();
35633 });
35634 Clazz_defineMethod (c$, "invalidateTree", 
35635 function () {
35636 {
35637 for (var i = 0; i < this.component.size (); i++) {
35638 var comp = this.component.get (i);
35639 if (Clazz_instanceOf (comp, java.awt.Container)) {
35640 (comp).invalidateTree ();
35641 } else {
35642 comp.invalidateIfValid ();
35643 }}
35644 this.invalidateIfValid ();
35645 }});
35646 Clazz_overrideMethod (c$, "setFont", 
35647 function (f) {
35648 var oldfont = this.getFont ();
35649 this.setFontComp (f);
35650 var newfont = this.getFont ();
35651 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
35652 this.invalidateTree ();
35653 }}, "java.awt.Font");
35654 Clazz_overrideMethod (c$, "getPreferredSize", 
35655 function () {
35656 return this.preferredSize ();
35657 });
35658 Clazz_overrideMethod (c$, "preferredSize", 
35659 function () {
35660 var dim = this.prefSize;
35661 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
35662 {
35663 this.prefSize = (this.layoutMgr != null) ? this.layoutMgr.preferredLayoutSize (this) : this.prefSizeComp ();
35664 dim = this.prefSize;
35665 }}return (dim == null ? null :  new java.awt.Dimension (dim));
35666 });
35667 Clazz_overrideMethod (c$, "getMinimumSize", 
35668 function () {
35669 var dim = this.minSize;
35670 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
35671 {
35672 this.minSize = (this.layoutMgr != null) ? this.layoutMgr.minimumLayoutSize (this) : this.minimumSize ();
35673 dim = this.minSize;
35674 }}if (dim != null) {
35675 return  new java.awt.Dimension (dim);
35676 } else {
35677 return dim;
35678 }});
35679 Clazz_overrideMethod (c$, "getMaximumSize", 
35680 function () {
35681 var dim = this.maxSize;
35682 if (dim == null || !(this.isMaximumSizeSet () || this.isValid ())) {
35683 {
35684 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35685 var lm = this.layoutMgr;
35686 this.maxSize = lm.maximumLayoutSize (this);
35687 } else {
35688 this.maxSize = this.getMaxSizeComp ();
35689 }dim = this.maxSize;
35690 }}if (dim != null) {
35691 return  new java.awt.Dimension (dim);
35692 } else {
35693 return dim;
35694 }});
35695 Clazz_overrideMethod (c$, "getAlignmentX", 
35696 function () {
35697 var xAlign;
35698 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35699 {
35700 var lm = this.layoutMgr;
35701 xAlign = lm.getLayoutAlignmentX (this);
35702 }} else {
35703 xAlign = this.getAlignmentXComp ();
35704 }return xAlign;
35705 });
35706 Clazz_overrideMethod (c$, "getAlignmentY", 
35707 function () {
35708 var yAlign;
35709 if (Clazz_instanceOf (this.layoutMgr, java.awt.LayoutManager2)) {
35710 {
35711 var lm = this.layoutMgr;
35712 yAlign = lm.getLayoutAlignmentY (this);
35713 }} else {
35714 yAlign = this.getAlignmentYComp ();
35715 }return yAlign;
35716 });
35717 Clazz_overrideMethod (c$, "paint", 
35718 function (g) {
35719 java.awt.GraphicsCallback.PaintCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 2);
35720 }, "java.awt.Graphics");
35721 Clazz_overrideMethod (c$, "update", 
35722 function (g) {
35723 if (this.isShowing ()) {
35724 g.clearRect (0, 0, this.width, this.height);
35725 this.paint (g);
35726 }}, "java.awt.Graphics");
35727 Clazz_defineMethod (c$, "paintComponents", 
35728 function (g) {
35729 if (this.isShowing ()) {
35730 java.awt.GraphicsCallback.PaintAllCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 4);
35731 }}, "java.awt.Graphics");
35732 Clazz_overrideMethod (c$, "lightweightPaint", 
35733 function (g) {
35734 this.lwPaintComp (g);
35735 this.paintHeavyweightComponents (g);
35736 }, "java.awt.Graphics");
35737 Clazz_overrideMethod (c$, "paintHeavyweightComponents", 
35738 function (g) {
35739 if (this.isShowing ()) {
35740 java.awt.GraphicsCallback.PaintHeavyweightComponentsCallback.getInstance ().runComponents (this.component.toArray (java.awt.Container.EMPTY_ARRAY), g, 3);
35741 }}, "java.awt.Graphics");
35742 Clazz_defineMethod (c$, "addContainerListener", 
35743 function (l) {
35744 if (l == null) {
35745 return;
35746 }this.containerListener = java.awt.AWTEventMulticaster.add (this.containerListener, l);
35747 this.newEventsOnly = true;
35748 }, "java.awt.event.ContainerListener");
35749 Clazz_defineMethod (c$, "removeContainerListener", 
35750 function (l) {
35751 if (l == null) {
35752 return;
35753 }this.containerListener = java.awt.AWTEventMulticaster.remove (this.containerListener, l);
35754 }, "java.awt.event.ContainerListener");
35755 Clazz_defineMethod (c$, "getContainerListeners", 
35756 function () {
35757 return (this.getListeners (java.awt.event.ContainerListener));
35758 });
35759 Clazz_overrideMethod (c$, "getListeners", 
35760 function (listenerType) {
35761 var l = null;
35762 if (listenerType === java.awt.event.ContainerListener) {
35763 l = this.containerListener;
35764 } else {
35765 return this.getListenersComp (listenerType);
35766 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
35767 }, "Class");
35768 Clazz_overrideMethod (c$, "eventEnabled", 
35769 function (e) {
35770 var id = e.getID ();
35771 if (id == 300 || id == 301) {
35772 if ((this.eventMask & 2) != 0 || this.containerListener != null) {
35773 return true;
35774 }return false;
35775 }return this.eventTypeEnabled (e.id);
35776 }, "java.awt.AWTEvent");
35777 Clazz_overrideMethod (c$, "processEvent", 
35778 function (e) {
35779 this.processEventCont (e);
35780 }, "java.awt.AWTEvent");
35781 Clazz_defineMethod (c$, "processEventCont", 
35782 function (e) {
35783 if (Clazz_instanceOf (e, java.awt.event.ContainerEvent)) {
35784 this.processContainerEvent (e);
35785 return;
35786 }this.processEventComp (e);
35787 }, "java.awt.AWTEvent");
35788 Clazz_defineMethod (c$, "processContainerEvent", 
35789 function (e) {
35790 var listener = this.containerListener;
35791 if (listener != null) {
35792 switch (e.getID ()) {
35793 case 300:
35794 listener.componentAdded (e);
35795 break;
35796 case 301:
35797 listener.componentRemoved (e);
35798 break;
35799 }
35800 }}, "java.awt.event.ContainerEvent");
35801 Clazz_overrideMethod (c$, "dispatchEventImpl", 
35802 function (e) {
35803 if ((this.dispatcher != null) && this.dispatcher.dispatchEvent (e)) {
35804 e.consume ();
35805 if (this.peer != null) {
35806 this.peer.handleEvent (e);
35807 }return;
35808 }this.dispatchEventImplComp (e);
35809 {
35810 switch (e.getID ()) {
35811 case 101:
35812 break;
35813 case 100:
35814 break;
35815 default:
35816 break;
35817 }
35818 }}, "java.awt.AWTEvent");
35819 Clazz_defineMethod (c$, "dispatchEventToSelf", 
35820 function (e) {
35821 this.dispatchEventImplComp (e);
35822 }, "java.awt.AWTEvent");
35823 Clazz_defineMethod (c$, "getMouseEventTarget", 
35824  function (x, y, includeSelf, filter, searchHeavyweights) {
35825 {
35826 if (arguments.length == 3) {
35827 filter = java.awt.Container.MouseEventTargetFilter.FILTER;
35828 searchHeavyWeights = false;
35829 }
35830 }var comp = null;
35831 if (comp == null || comp === this) {
35832 comp = this.getMouseEventTargetImpl (x, y, includeSelf, filter, false, searchHeavyweights);
35833 }return comp;
35834 }, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B");
35835 Clazz_defineMethod (c$, "getMouseEventTargetImpl", 
35836  function (x, y, includeSelf, filter, searchHeavyweightChildren, searchHeavyweightDescendants) {
35837 {
35838 for (var i = 0; i < this.component.size (); i++) {
35839 var comp = this.component.get (i);
35840 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)) {
35841 if (Clazz_instanceOf (comp, java.awt.Container)) {
35842 var child = comp;
35843 var deeper = child.getMouseEventTarget (x - child.x, y - child.y, includeSelf, filter, searchHeavyweightDescendants);
35844 if (deeper != null) {
35845 return deeper;
35846 }} else {
35847 if (filter.accept (comp)) {
35848 return comp;
35849 }}}}
35850 var isPeerOK;
35851 var isMouseOverMe;
35852 isPeerOK = includeSelf;
35853 isMouseOverMe = this.contains (x, y);
35854 if (isMouseOverMe && isPeerOK && filter.accept (this)) {
35855 return this;
35856 }return null;
35857 }}, "~N,~N,~B,java.awt.Container.EventTargetFilter,~B,~B");
35858 Clazz_defineMethod (c$, "proxyEnableEvents", 
35859 function (events) {
35860 if (this.parent != null) {
35861 this.parent.proxyEnableEvents (events);
35862 }if (this.dispatcher != null) {
35863 this.dispatcher.enableEvents (events);
35864 }}, "~N");
35865 Clazz_defineMethod (c$, "deliverEvent", 
35866 function (e) {
35867 var comp = this.getComponentAt (e.x, e.y);
35868 if ((comp != null) && (comp !== this)) {
35869 e.translate (-comp.x, -comp.y);
35870 comp.deliverEvent (e);
35871 } else {
35872 this.postEvent (e);
35873 }}, "java.awt.Event");
35874 Clazz_defineMethod (c$, "getComponentAt", 
35875 function (x, y) {
35876 return this.locate (x, y);
35877 }, "~N,~N");
35878 Clazz_overrideMethod (c$, "locate", 
35879 function (x, y) {
35880 return this;
35881 }, "~N,~N");
35882 Clazz_defineMethod (c$, "getComponentAt", 
35883 function (p) {
35884 return this.getComponentAt (p.x, p.y);
35885 }, "java.awt.Point");
35886 Clazz_defineMethod (c$, "getMousePosition", 
35887 function (allowChildren) {
35888 return null;
35889 }, "~B");
35890 Clazz_overrideMethod (c$, "isSameOrAncestorOf", 
35891 function (comp, allowChildren) {
35892 return this === comp || (allowChildren && this.isParentOf (comp));
35893 }, "java.awt.Component,~B");
35894 Clazz_defineMethod (c$, "findComponentAt", 
35895 function (x, y) {
35896 {
35897 return this.findComponentAt (x, y, true);
35898 }}, "~N,~N");
35899 Clazz_defineMethod (c$, "findComponentAt", 
35900 function (x, y, ignoreEnabled) {
35901 return null;
35902 }, "~N,~N,~B");
35903 Clazz_defineMethod (c$, "findComponentAt", 
35904 function (p) {
35905 return this.findComponentAt (p.x, p.y);
35906 }, "java.awt.Point");
35907 Clazz_defineMethod (c$, "addNotify", 
35908 function () {
35909 {
35910 this.addNotifyComp ();
35911 if (!(Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer))) {
35912 this.setDispatcher ();
35913 }for (var i = 0; i < this.component.size (); i++) {
35914 this.component.get (i).addNotify ();
35915 }
35916 }});
35917 Clazz_defineMethod (c$, "setDispatcher", 
35918 function () {
35919 this.dispatcher =  new java.awt.LightweightDispatcher (this);
35920 });
35921 Clazz_defineMethod (c$, "removeNotify", 
35922 function () {
35923 for (var i = this.component.size () - 1; i >= 0; i--) {
35924 var comp = this.component.get (i);
35925 if (comp != null) {
35926 comp.setAutoFocusTransferOnDisposal (false);
35927 comp.removeNotify ();
35928 comp.setAutoFocusTransferOnDisposal (true);
35929 }}
35930 if (this.dispatcher != null) {
35931 this.dispatcher.dispose ();
35932 this.dispatcher = null;
35933 }this.removeNotifyComp ();
35934 });
35935 Clazz_defineMethod (c$, "isAncestorOf", 
35936 function (c) {
35937 var p;
35938 if (c == null || ((p = c.getParent ()) == null)) {
35939 return false;
35940 }while (p != null) {
35941 if (p === this) {
35942 return true;
35943 }p = p.getParent ();
35944 }
35945 return false;
35946 }, "java.awt.Component");
35947 Clazz_overrideMethod (c$, "paramString", 
35948 function () {
35949 var str = this.paramStringComp ();
35950 var layoutMgr = this.layoutMgr;
35951 if (layoutMgr != null) {
35952 str += ",layout=" + layoutMgr.getClass ().getName ();
35953 }return str;
35954 });
35955 Clazz_defineMethod (c$, "setFocusTraversalKeys", 
35956 function (id, keystrokes) {
35957 }, "~N,java.util.Set");
35958 Clazz_defineMethod (c$, "getFocusTraversalKeys", 
35959 function (id) {
35960 return null;
35961 }, "~N");
35962 Clazz_defineMethod (c$, "areFocusTraversalKeysSet", 
35963 function (id) {
35964 return false;
35965 }, "~N");
35966 Clazz_defineMethod (c$, "isFocusCycleRoot", 
35967 function (container) {
35968 if (this.isFocusCycleRoot () && container === this) {
35969 return true;
35970 } else {
35971 return this.isFocusCycleRootComp (container);
35972 }}, "java.awt.Container");
35973 Clazz_overrideMethod (c$, "containsFocus", 
35974 function () {
35975 return false;
35976 });
35977 Clazz_defineMethod (c$, "isParentOf", 
35978  function (comp) {
35979 {
35980 while (comp != null && comp !== this && !(Clazz_instanceOf (comp, java.awt.Window))) {
35981 comp = comp.getParent ();
35982 }
35983 return (comp === this);
35984 }}, "java.awt.Component");
35985 Clazz_defineMethod (c$, "clearMostRecentFocusOwnerOnHide", 
35986 function () {
35987 });
35988 Clazz_overrideMethod (c$, "clearCurrentFocusCycleRootOnHide", 
35989 function () {
35990 });
35991 Clazz_defineMethod (c$, "getTraversalRoot", 
35992 function () {
35993 return null;
35994 });
35995 Clazz_defineMethod (c$, "isFocusCycleRoot", 
35996 function () {
35997 return this.focusCycleRoot;
35998 });
35999 Clazz_defineMethod (c$, "setFocusTraversalPolicyProvider", 
36000 function (provider) {
36001 var oldProvider;
36002 {
36003 oldProvider = this.focusTraversalPolicyProvider;
36004 this.focusTraversalPolicyProvider = provider;
36005 }this.firePropertyChangeBool ("focusTraversalPolicyProvider", oldProvider, provider);
36006 }, "~B");
36007 Clazz_defineMethod (c$, "isFocusTraversalPolicyProvider", 
36008 function () {
36009 return this.focusTraversalPolicyProvider;
36010 });
36011 Clazz_defineMethod (c$, "transferFocusDownCycle", 
36012 function () {
36013 });
36014 Clazz_defineMethod (c$, "preProcessKeyEvent", 
36015 function (e) {
36016 var parent = this.parent;
36017 if (parent != null) {
36018 parent.preProcessKeyEvent (e);
36019 }}, "java.awt.event.KeyEvent");
36020 Clazz_defineMethod (c$, "postProcessKeyEvent", 
36021 function (e) {
36022 var parent = this.parent;
36023 if (parent != null) {
36024 parent.postProcessKeyEvent (e);
36025 }}, "java.awt.event.KeyEvent");
36026 Clazz_overrideMethod (c$, "postsOldMouseEvents", 
36027 function () {
36028 return true;
36029 });
36030 Clazz_defineMethod (c$, "applyComponentOrientation", 
36031 function (o) {
36032 this.applyCompOrientComp (o);
36033 {
36034 for (var i = 0; i < this.component.size (); i++) {
36035 var comp = this.component.get (i);
36036 comp.applyComponentOrientation (o);
36037 }
36038 }}, "java.awt.ComponentOrientation");
36039 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36040 function (listener) {
36041 this.addPropChangeListenerComp (listener);
36042 }, "java.beans.PropertyChangeListener");
36043 Clazz_defineMethod (c$, "addPropertyChangeListener", 
36044 function (propertyName, listener) {
36045 this.addPropChangeListComp (propertyName, listener);
36046 }, "~S,java.beans.PropertyChangeListener");
36047 Clazz_defineMethod (c$, "increaseComponentCount", 
36048 function (c) {
36049 if (!c.isDisplayable ()) {
36050 throw  new IllegalStateException ("Peer does not exist while invoking the increaseComponentCount() method");
36051 }var addHW = 0;
36052 var addLW = 0;
36053 if (Clazz_instanceOf (c, java.awt.Container)) {
36054 addLW = (c).numOfLWComponents;
36055 addHW = (c).numOfHWComponents;
36056 }if (c.isLightweight ()) {
36057 addLW++;
36058 } else {
36059 addHW++;
36060 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36061 cont.numOfLWComponents += addLW;
36062 cont.numOfHWComponents += addHW;
36063 }
36064 }, "java.awt.Component");
36065 Clazz_defineMethod (c$, "decreaseComponentCount", 
36066 function (c) {
36067 if (!c.isDisplayable ()) {
36068 throw  new IllegalStateException ("Peer does not exist while invoking the decreaseComponentCount() method");
36069 }var subHW = 0;
36070 var subLW = 0;
36071 if (Clazz_instanceOf (c, java.awt.Container)) {
36072 subLW = (c).numOfLWComponents;
36073 subHW = (c).numOfHWComponents;
36074 }if (c.isLightweight ()) {
36075 subLW++;
36076 } else {
36077 subHW++;
36078 }for (var cont = this; cont != null; cont = cont.getContainer ()) {
36079 cont.numOfLWComponents -= subLW;
36080 cont.numOfHWComponents -= subHW;
36081 }
36082 }, "java.awt.Component");
36083 Clazz_declareInterface (java.awt.Container, "EventTargetFilter");
36084 Clazz_pu$h(self.c$);
36085 c$ = Clazz_declareType (java.awt.Container, "MouseEventTargetFilter", null, java.awt.Container.EventTargetFilter);
36086 Clazz_makeConstructor (c$, 
36087  function () {
36088 });
36089 Clazz_overrideMethod (c$, "accept", 
36090 function (a) {
36091 return (a.eventMask & 32) != 0 || (a.eventMask & 16) != 0 || (a.eventMask & 131072) != 0 || a.mouseListener != null || a.mouseMotionListener != null || a.mouseWheelListener != null;
36092 }, "java.awt.Component");
36093 c$.FILTER = c$.prototype.FILTER =  new java.awt.Container.MouseEventTargetFilter ();
36094 c$ = Clazz_p0p ();
36095 c$.EMPTY_ARRAY = c$.prototype.EMPTY_ARRAY =  new Array (0);
36096 Clazz_defineStatics (c$,
36097 "INCLUDE_SELF", true,
36098 "SEARCH_HEAVYWEIGHTS", true);
36099 c$ = Clazz_decorateAsClass (function () {
36100 this.nativeContainer = null;
36101 this.mouseEventTarget = null;
36102 this.targetLastEntered = null;
36103 this.isMouseInNativeContainer = false;
36104 this.eventMask = 0;
36105 Clazz_instantialize (this, arguments);
36106 }, java.awt, "LightweightDispatcher", null, java.awt.event.AWTEventListener);
36107 Clazz_makeConstructor (c$, 
36108 function (nativeContainer) {
36109 this.nativeContainer = nativeContainer;
36110 this.mouseEventTarget = null;
36111 this.eventMask = 0;
36112 }, "java.awt.Container");
36113 Clazz_defineMethod (c$, "dispose", 
36114 function () {
36115 this.stopListeningForOtherDrags ();
36116 this.mouseEventTarget = null;
36117 });
36118 Clazz_defineMethod (c$, "enableEvents", 
36119 function (events) {
36120 this.eventMask |= events;
36121 }, "~N");
36122 Clazz_defineMethod (c$, "dispatchEvent", 
36123 function (e) {
36124 var ret = false;
36125 if (Clazz_instanceOf (e, java.awt.event.MouseEvent) && (this.eventMask & 131120) != 0) {
36126 var me = e;
36127 ret = this.processMouseEvent (me);
36128 }return ret;
36129 }, "java.awt.AWTEvent");
36130 Clazz_defineMethod (c$, "isMouseGrab", 
36131  function (e) {
36132 var modifiers = e.getModifiersEx ();
36133 if (e.getID () == 501 || e.getID () == 502) {
36134 switch (e.getButton ()) {
36135 case 1:
36136 modifiers ^= 1024;
36137 break;
36138 case 2:
36139 modifiers ^= 2048;
36140 break;
36141 case 3:
36142 modifiers ^= 4096;
36143 break;
36144 }
36145 }return ((modifiers & (7168)) != 0);
36146 }, "java.awt.event.MouseEvent");
36147 Clazz_defineMethod (c$, "processMouseEvent", 
36148  function (e) {
36149 var id = e.getID ();
36150 var mouseOver = this.nativeContainer.getMouseEventTarget (e.getX (), e.getY (), true);
36151 this.trackMouseEnterExit (mouseOver, e);
36152 if (!this.isMouseGrab (e) && id != 500) {
36153 this.mouseEventTarget = (mouseOver !== this.nativeContainer) ? mouseOver : null;
36154 }if (this.mouseEventTarget != null) {
36155 switch (id) {
36156 case 504:
36157 case 505:
36158 break;
36159 case 501:
36160 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36161 break;
36162 case 502:
36163 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36164 break;
36165 case 500:
36166 if (mouseOver === this.mouseEventTarget) {
36167 this.retargetMouseEvent (mouseOver, id, e);
36168 }break;
36169 case 503:
36170 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36171 break;
36172 case 506:
36173 if (this.isMouseGrab (e)) {
36174 this.retargetMouseEvent (this.mouseEventTarget, id, e);
36175 }break;
36176 case 507:
36177 this.retargetMouseEvent (mouseOver, id, e);
36178 break;
36179 }
36180 e.consume ();
36181 }return e.isConsumed ();
36182 }, "java.awt.event.MouseEvent");
36183 Clazz_defineMethod (c$, "trackMouseEnterExit", 
36184  function (targetOver, e) {
36185 var targetEnter = null;
36186 var id = e.getID ();
36187 if (id != 505 && id != 506 && id != 1500 && this.isMouseInNativeContainer == false) {
36188 this.isMouseInNativeContainer = true;
36189 this.startListeningForOtherDrags ();
36190 } else if (id == 505) {
36191 this.isMouseInNativeContainer = false;
36192 this.stopListeningForOtherDrags ();
36193 }if (this.isMouseInNativeContainer) {
36194 targetEnter = targetOver;
36195 }if (this.targetLastEntered === targetEnter) {
36196 return;
36197 }if (this.targetLastEntered != null) {
36198 this.retargetMouseEvent (this.targetLastEntered, 505, e);
36199 }if (id == 505) {
36200 e.consume ();
36201 }if (targetEnter != null) {
36202 this.retargetMouseEvent (targetEnter, 504, e);
36203 }if (id == 504) {
36204 e.consume ();
36205 }this.targetLastEntered = targetEnter;
36206 }, "java.awt.Component,java.awt.event.MouseEvent");
36207 Clazz_defineMethod (c$, "startListeningForOtherDrags", 
36208  function () {
36209 });
36210 Clazz_defineMethod (c$, "stopListeningForOtherDrags", 
36211  function () {
36212 });
36213 Clazz_overrideMethod (c$, "eventDispatched", 
36214 function (e) {
36215 var isForeignDrag = (Clazz_instanceOf (e, java.awt.event.MouseEvent)) && (e.id == 506) && (e.getSource () !== this.nativeContainer);
36216 if (!isForeignDrag) {
36217 return;
36218 }var srcEvent = e;
36219 var me;
36220 {
36221 var srcComponent = srcEvent.getComponent ();
36222 if (!srcComponent.isShowing ()) {
36223 return;
36224 }var c = this.nativeContainer;
36225 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
36226 c = c.getParent_NoClientCode ();
36227 }
36228 if ((c == null) || (c).isModalBlocked ()) {
36229 return;
36230 }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 ());
36231 (srcEvent).copyPrivateDataInto (me);
36232 }var targetOver = this.nativeContainer.getMouseEventTarget (me.getX (), me.getY (), true);
36233 this.trackMouseEnterExit (targetOver, me);
36234 }, "java.awt.AWTEvent");
36235 Clazz_defineMethod (c$, "retargetMouseEvent", 
36236 function (target, id, e) {
36237 if (target == null) {
36238 return;
36239 }var x = e.getX ();
36240 var y = e.getY ();
36241 var component;
36242 for (component = target; component != null && component !== this.nativeContainer; component = component.getParent ()) {
36243 x -= component.x;
36244 y -= component.y;
36245 }
36246 var retargeted;
36247 if (component != null) {
36248 if (id == 507) {
36249 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 ());
36250 } else {
36251 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 ());
36252 }(e).copyPrivateDataInto (retargeted);
36253 if (target === this.nativeContainer) {
36254 (target).dispatchEventToSelf (retargeted);
36255 } else {
36256 if (this.nativeContainer.modalComp != null) {
36257 if ((this.nativeContainer.modalComp).isAncestorOf (target)) {
36258 target.dispatchEvent (retargeted);
36259 } else {
36260 e.consume ();
36261 }} else {
36262 target.dispatchEvent (retargeted);
36263 }}}}, "java.awt.Component,~N,java.awt.event.MouseEvent");
36264 Clazz_defineStatics (c$,
36265 "LWD_MOUSE_DRAGGED_OVER", 1500,
36266 "MOUSE_MASK", 131120);
36267 });
36268 Clazz_declarePackage ("java.awt");
36269 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 () {
36270 c$ = Clazz_decorateAsClass (function () {
36271 this.threadGroup = null;
36272 this.myThread = null;
36273 this.peer = null;
36274 this.parent = null;
36275 this.appContext = null;
36276 this.x = 0;
36277 this.y = 0;
36278 this.width = 0;
36279 this.height = 0;
36280 this.foreground = null;
36281 this.background = null;
36282 this.font = null;
36283 this.peerFont = null;
36284 this.cursor = null;
36285 this.locale = null;
36286 this.visible = true;
36287 this.enabled = true;
36288 this.valid = false;
36289 this.popups = null;
36290 this.name = null;
36291 this.nameExplicitlySet = false;
36292 this.focusable = true;
36293 this.$isFocusTraversableOverridden = 0;
36294 this.focusTraversalKeysEnabled = false;
36295 this.minSize = null;
36296 this.minSizeSet = false;
36297 this.prefSize = null;
36298 this.prefSizeSet = false;
36299 this.maxSize = null;
36300 this.maxSizeSet = false;
36301 this.componentOrientation = null;
36302 this.newEventsOnly = false;
36303 this.componentListener = null;
36304 this.focusListener = null;
36305 this.hierarchyListener = null;
36306 this.hierarchyBoundsListener = null;
36307 this.keyListener = null;
36308 this.mouseListener = null;
36309 this.mouseMotionListener = null;
36310 this.mouseWheelListener = null;
36311 this.inputMethodListener = null;
36312 this.windowClosingException = null;
36313 this.eventMask = 4096;
36314 this.changeSupport = null;
36315 this.changeSupportLock = null;
36316 this.isPacked = false;
36317 this.boundsOp = 3;
36318 this.isAddNotifyComplete = false;
36319 this.backgroundEraseDisabled = false;
36320 this.htmlName = null;
36321 this.num = 0;
36322 this.graphicsConfig = null;
36323 this.eventCache = null;
36324 this.coalescingEnabled = false;
36325 this.autoFocusTransferOnDisposal = true;
36326 Clazz_instantialize (this, arguments);
36327 }, java.awt, "Component", null, java.awt.image.ImageObserver);
36328 Clazz_prepareFields (c$, function () {
36329 this.componentOrientation = java.awt.ComponentOrientation.UNKNOWN;
36330 this.changeSupportLock =  new Clazz._O ();
36331 this.coalescingEnabled = this.checkCoalescing ();
36332 });
36333 Clazz_defineMethod (c$, "getAppContext", 
36334 function () {
36335 return this.appContext;
36336 });
36337 Clazz_defineMethod (c$, "getChangeSupportLock", 
36338  function () {
36339 return this.changeSupportLock;
36340 });
36341 Clazz_defineMethod (c$, "getBoundsOp", 
36342 function () {
36343 return this.boundsOp;
36344 });
36345 Clazz_defineMethod (c$, "setBoundsOp", 
36346 function (op) {
36347 if (op == 5) {
36348 this.boundsOp = 3;
36349 } else if (this.boundsOp == 3) {
36350 this.boundsOp = op;
36351 }}, "~N");
36352 Clazz_makeConstructor (c$, 
36353 function () {
36354 this.setAppContext ();
36355 });
36356 Clazz_defineMethod (c$, "setAppContext", 
36357 function () {
36358 this.appContext = jssun.awt.AppContext.getAppContext ();
36359 this.num = ++java.awt.Component.incr;
36360 });
36361 Clazz_defineMethod (c$, "getHTMLName", 
36362 function (uid) {
36363 return (this.htmlName == null ? this.htmlName = this.appContext.getThreadGroup ().getName () + "_" + uid + "_" + this.num : this.htmlName);
36364 }, "~S");
36365 Clazz_defineMethod (c$, "constructComponentName", 
36366 function () {
36367 return null;
36368 });
36369 Clazz_defineMethod (c$, "getName", 
36370 function () {
36371 if (this.name == null && !this.nameExplicitlySet) {
36372 {
36373 if (this.name == null && !this.nameExplicitlySet) this.name = this.constructComponentName ();
36374 }}return this.name;
36375 });
36376 Clazz_defineMethod (c$, "setName", 
36377 function (name) {
36378 var oldName;
36379 {
36380 oldName = this.name;
36381 this.name = name;
36382 this.nameExplicitlySet = true;
36383 }this.firePropertyChangeObject ("name", oldName, name);
36384 }, "~S");
36385 Clazz_defineMethod (c$, "getParent", 
36386 function () {
36387 return this.getParent_NoClientCode ();
36388 });
36389 Clazz_defineMethod (c$, "getParent_NoClientCode", 
36390 function () {
36391 return this.parent;
36392 });
36393 Clazz_defineMethod (c$, "getContainer", 
36394 function () {
36395 return this.getParent ();
36396 });
36397 Clazz_defineMethod (c$, "getPeer", 
36398 function () {
36399 return this.peer;
36400 });
36401 Clazz_defineMethod (c$, "getGraphicsConfiguration", 
36402 function () {
36403 return swingjs.JSToolkit.getGraphicsConfiguration ();
36404 });
36405 Clazz_defineMethod (c$, "resetGC", 
36406 function () {
36407 });
36408 Clazz_defineMethod (c$, "getToolkit", 
36409 function () {
36410 return this.getToolkitImpl ();
36411 });
36412 Clazz_defineMethod (c$, "getToolkitImpl", 
36413 function () {
36414 var peer = this.peer;
36415 if ((peer != null) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
36416 return peer.getToolkit ();
36417 }var parent = this.parent;
36418 if (parent != null) {
36419 return parent.getToolkitImpl ();
36420 }return java.awt.Toolkit.getDefaultToolkit ();
36421 });
36422 Clazz_defineMethod (c$, "isValid", 
36423 function () {
36424 return this.valid;
36425 });
36426 Clazz_defineMethod (c$, "isDisplayable", 
36427 function () {
36428 return true;
36429 });
36430 Clazz_defineMethod (c$, "isVisible", 
36431 function () {
36432 return this.isVisible_NoClientCode ();
36433 });
36434 Clazz_defineMethod (c$, "isVisible_NoClientCode", 
36435 function () {
36436 return this.visible;
36437 });
36438 Clazz_defineMethod (c$, "isRecursivelyVisible", 
36439 function () {
36440 return this.visible && (this.parent == null || this.parent.isRecursivelyVisible ());
36441 });
36442 Clazz_defineMethod (c$, "pointRelativeToComponent", 
36443 function (absolute) {
36444 var compCoords = this.getLocationOnScreen ();
36445 return  new java.awt.Point (absolute.x - compCoords.x, absolute.y - compCoords.y);
36446 }, "java.awt.Point");
36447 Clazz_defineMethod (c$, "getMousePosition", 
36448 function () {
36449 return null;
36450 });
36451 Clazz_defineMethod (c$, "isSameOrAncestorOf", 
36452 function (comp, allowChildren) {
36453 return comp === this;
36454 }, "java.awt.Component,~B");
36455 Clazz_defineMethod (c$, "isShowing", 
36456 function () {
36457 if (this.visible) {
36458 var parent = this.parent;
36459 return (parent == null) || parent.isShowing ();
36460 }return false;
36461 });
36462 Clazz_defineMethod (c$, "isEnabled", 
36463 function () {
36464 return this.isEnabledImpl ();
36465 });
36466 Clazz_defineMethod (c$, "isEnabledImpl", 
36467 function () {
36468 return this.enabled;
36469 });
36470 Clazz_defineMethod (c$, "setEnabled", 
36471 function (b) {
36472 this.enable (b);
36473 }, "~B");
36474 Clazz_defineMethod (c$, "enable", 
36475 function () {
36476 if (!this.enabled) {
36477 this.enabled = true;
36478 var peer = this.peer;
36479 if (peer != null) {
36480 peer.setEnabled (true);
36481 if (this.visible) {
36482 this.updateCursorImmediately ();
36483 }}}});
36484 Clazz_defineMethod (c$, "enable", 
36485 function (b) {
36486 if (b) {
36487 this.enable ();
36488 } else {
36489 this.disable ();
36490 }}, "~B");
36491 Clazz_defineMethod (c$, "disable", 
36492 function () {
36493 if (this.enabled) {
36494 this.enabled = false;
36495 var peer = this.peer;
36496 if (peer != null) {
36497 peer.setEnabled (false);
36498 if (this.visible) {
36499 this.updateCursorImmediately ();
36500 }}}});
36501 Clazz_defineMethod (c$, "isDoubleBuffered", 
36502 function () {
36503 return false;
36504 });
36505 Clazz_defineMethod (c$, "setVisible", 
36506 function (b) {
36507 this.show (b);
36508 }, "~B");
36509 Clazz_defineMethod (c$, "show", 
36510 function () {
36511 if (!this.visible) {
36512 this.visible = true;
36513 var peer = this.peer;
36514 if (peer != null) {
36515 peer.setVisible (true);
36516 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36517 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36518 this.repaint ();
36519 }this.updateCursorImmediately ();
36520 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36521 var e =  new java.awt.event.ComponentEvent (this, 102);
36522 java.awt.Toolkit.getEventQueue ().postEvent (e);
36523 }}var parent = this.parent;
36524 if (parent != null) {
36525 parent.invalidate ();
36526 }});
36527 Clazz_defineMethod (c$, "containsFocus", 
36528 function () {
36529 return this.isFocusOwner ();
36530 });
36531 Clazz_defineMethod (c$, "clearCurrentFocusCycleRootOnHide", 
36532 function () {
36533 });
36534 Clazz_defineMethod (c$, "hide", 
36535 function () {
36536 this.isPacked = false;
36537 if (this.visible) {
36538 this.clearCurrentFocusCycleRootOnHide ();
36539 this.visible = false;
36540 this.mixOnHiding (this.isLightweight ());
36541 var peer = this.peer;
36542 if (peer != null) {
36543 peer.setVisible (false);
36544 this.createHierarchyEvents (1400, this, this.parent, 4, java.awt.Toolkit.enabledOnToolkit (32768));
36545 if (Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
36546 this.repaint ();
36547 }this.updateCursorImmediately ();
36548 }if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36549 var e =  new java.awt.event.ComponentEvent (this, 103);
36550 java.awt.Toolkit.getEventQueue ().postEvent (e);
36551 }}var parent = this.parent;
36552 if (parent != null) {
36553 parent.invalidate ();
36554 }});
36555 Clazz_defineMethod (c$, "getForeground", 
36556 function () {
36557 var foreground = this.foreground;
36558 if (foreground != null) {
36559 return foreground;
36560 }var parent = this.parent;
36561 return (parent != null) ? parent.getForeground () : null;
36562 });
36563 Clazz_defineMethod (c$, "setForeground", 
36564 function (c) {
36565 var oldColor = this.foreground;
36566 var peer = this.peer;
36567 this.foreground = c;
36568 if (peer != null) {
36569 c = this.getForeground ();
36570 if (c != null) {
36571 peer.setForeground (c);
36572 }}this.firePropertyChangeObject ("foreground", oldColor, c);
36573 }, "java.awt.Color");
36574 Clazz_defineMethod (c$, "isForegroundSet", 
36575 function () {
36576 return (this.foreground != null);
36577 });
36578 Clazz_defineMethod (c$, "getBackground", 
36579 function () {
36580 var background = this.background;
36581 if (background != null) {
36582 return background;
36583 }var parent = this.parent;
36584 return (parent != null) ? parent.getBackground () : null;
36585 });
36586 Clazz_defineMethod (c$, "setBackground", 
36587 function (c) {
36588 var oldColor = this.background;
36589 var peer = this.peer;
36590 this.background = c;
36591 if (peer != null) {
36592 c = this.getBackground ();
36593 if (c != null) {
36594 peer.setBackground (c);
36595 }}this.firePropertyChangeObject ("background", oldColor, c);
36596 }, "java.awt.Color");
36597 Clazz_defineMethod (c$, "isBackgroundSet", 
36598 function () {
36599 return (this.background != null);
36600 });
36601 Clazz_defineMethod (c$, "getFont", 
36602 function () {
36603 return this.getFont_NoClientCode ();
36604 });
36605 Clazz_defineMethod (c$, "getFont_NoClientCode", 
36606 function () {
36607 var font = this.font;
36608 if (font != null) {
36609 return font;
36610 }var parent = this.parent;
36611 return (parent != null) ? parent.getFont_NoClientCode () : null;
36612 });
36613 Clazz_defineMethod (c$, "setFont", 
36614 function (f) {
36615 this.setFontComp (f);
36616 }, "java.awt.Font");
36617 Clazz_defineMethod (c$, "setFontComp", 
36618 function (f) {
36619 var oldFont;
36620 var newFont;
36621 oldFont = this.font;
36622 newFont = this.font = f;
36623 {
36624 {
36625 }var peer = this.peer;
36626 if (peer != null) {
36627 f = this.getFont ();
36628 if (f != null) {
36629 peer.setFont (f);
36630 this.peerFont = f;
36631 }}}this.firePropertyChangeObject ("font", oldFont, newFont);
36632 if (f !== oldFont && (oldFont == null || !oldFont.equals (f))) {
36633 this.invalidateIfValid ();
36634 }}, "java.awt.Font");
36635 Clazz_defineMethod (c$, "isFontSet", 
36636 function () {
36637 return (this.font != null);
36638 });
36639 Clazz_defineMethod (c$, "getLocale", 
36640 function () {
36641 var locale = this.locale;
36642 if (locale != null) {
36643 return locale;
36644 }var parent = this.parent;
36645 if (parent == null) {
36646 throw  new java.awt.IllegalComponentStateException ("This component must have a parent in order to determine its locale");
36647 } else {
36648 return parent.getLocale ();
36649 }});
36650 Clazz_defineMethod (c$, "setLocale", 
36651 function (l) {
36652 var oldValue = this.locale;
36653 this.locale = l;
36654 this.firePropertyChangeObject ("locale", oldValue, l);
36655 this.invalidateIfValid ();
36656 }, "java.util.Locale");
36657 Clazz_defineMethod (c$, "getLocation", 
36658 function () {
36659 return this.location ();
36660 });
36661 Clazz_defineMethod (c$, "getLocationOnScreen", 
36662 function () {
36663 return this.getLocationOnScreen_NoTreeLock ();
36664 });
36665 Clazz_defineMethod (c$, "getLocationOnScreen_NoTreeLock", 
36666 function () {
36667 if (this.isShowing ()) {
36668 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
36669 var host = this.getNativeContainer ();
36670 var pt = host.peer.getLocationOnScreen ();
36671 for (var c = this; c !== host; c = c.getParent ()) {
36672 pt.x += c.x;
36673 pt.y += c.y;
36674 }
36675 return pt;
36676 } else {
36677 var pt = this.peer.getLocationOnScreen ();
36678 return pt;
36679 }} else {
36680 throw  new java.awt.IllegalComponentStateException ("component must be showing on the screen to determine its location");
36681 }});
36682 Clazz_defineMethod (c$, "location", 
36683 function () {
36684 return this.location_NoClientCode ();
36685 });
36686 Clazz_defineMethod (c$, "location_NoClientCode", 
36687  function () {
36688 return  new java.awt.Point (this.x, this.y);
36689 });
36690 Clazz_defineMethod (c$, "setLocation", 
36691 function (x, y) {
36692 this.setBoundsOp (1);
36693 this.setBounds (x, y, this.width, this.height);
36694 }, "~N,~N");
36695 Clazz_defineMethod (c$, "setLocation", 
36696 function (p) {
36697 this.setLocation (p.x, p.y);
36698 }, "java.awt.Point");
36699 Clazz_defineMethod (c$, "getSize", 
36700 function () {
36701 return this.size ();
36702 });
36703 Clazz_defineMethod (c$, "size", 
36704 function () {
36705 return  new java.awt.Dimension (this.width, this.height);
36706 });
36707 Clazz_defineMethod (c$, "setSize", 
36708 function (width, height) {
36709 {
36710 if (arguments.length == 1) {
36711 var d = arguments[0];
36712 width = d.width;
36713 height = d.height;
36714 }
36715 }this.resize (width, height);
36716 }, "~N,~N");
36717 Clazz_defineMethod (c$, "resize", 
36718 function (width, height) {
36719 this.setBoundsOp (2);
36720 this.setBounds (this.x, this.y, width, height);
36721 }, "~N,~N");
36722 Clazz_defineMethod (c$, "setBounds", 
36723 function (x, y, width, height) {
36724 this.reshape (x, y, width, height);
36725 }, "~N,~N,~N,~N");
36726 Clazz_defineMethod (c$, "setBounds", 
36727 function (r) {
36728 this.setBounds (r.x, r.y, r.width, r.height);
36729 }, "java.awt.Rectangle");
36730 Clazz_defineMethod (c$, "reshape", 
36731 function (x, y, width, height) {
36732 try {
36733 this.setBoundsOp (3);
36734 var resized = (this.width != width) || (this.height != height);
36735 var moved = (this.x != x) || (this.y != y);
36736 if (!resized && !moved) {
36737 return;
36738 }var oldX = this.x;
36739 var oldY = this.y;
36740 var oldWidth = this.width;
36741 var oldHeight = this.height;
36742 this.x = x;
36743 this.y = y;
36744 this.width = width;
36745 this.height = height;
36746 if (resized) {
36747 this.isPacked = false;
36748 System.out.println ("C " + swingjs.JSToolkit.getClassName (this) + " resized to " + this.getBounds ());
36749 }var needNotify = true;
36750 this.mixOnReshaping ();
36751 if (this.peer != null) {
36752 this.reshapeNativePeer (x, y, width, height, this.getBoundsOp ());
36753 resized = (oldWidth != this.width) || (oldHeight != this.height);
36754 moved = (oldX != this.x) || (oldY != this.y);
36755 if (Clazz_instanceOf (this, java.awt.Window)) {
36756 needNotify = false;
36757 }if (resized) {
36758 this.invalidate ();
36759 }if (this.parent != null) {
36760 this.parent.invalidateIfValid ();
36761 }}if (needNotify) {
36762 this.notifyNewBounds (resized, moved);
36763 }this.repaintParentIfNeeded (oldX, oldY, oldWidth, oldHeight);
36764 } finally {
36765 this.setBoundsOp (5);
36766 }
36767 }, "~N,~N,~N,~N");
36768 Clazz_defineMethod (c$, "repaintParentIfNeeded", 
36769  function (oldX, oldY, oldWidth, oldHeight) {
36770 if (this.parent != null && Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer) && this.isShowing ()) {
36771 this.parent.repaint (oldX, oldY, oldWidth, oldHeight);
36772 this.repaint ();
36773 }}, "~N,~N,~N,~N");
36774 Clazz_defineMethod (c$, "reshapeNativePeer", 
36775  function (x, y, width, height, op) {
36776 var nativeX = x;
36777 var nativeY = y;
36778 for (var c = this.parent; (c != null) && (Clazz_instanceOf (c.peer, java.awt.peer.LightweightPeer)); c = c.parent) {
36779 nativeX += c.x;
36780 nativeY += c.y;
36781 }
36782 this.peer.setBounds (nativeX, nativeY, width, height, op);
36783 }, "~N,~N,~N,~N,~N");
36784 Clazz_defineMethod (c$, "notifyNewBounds", 
36785  function (resized, moved) {
36786 if (this.componentListener != null || (this.eventMask & 1) != 0 || java.awt.Toolkit.enabledOnToolkit (1)) {
36787 if (resized) {
36788 var e =  new java.awt.event.ComponentEvent (this, 101);
36789 java.awt.Toolkit.getEventQueue ().postEvent (e);
36790 }if (moved) {
36791 var e =  new java.awt.event.ComponentEvent (this, 100);
36792 java.awt.Toolkit.getEventQueue ().postEvent (e);
36793 }} else {
36794 if (Clazz_instanceOf (this, java.awt.Container) && (this).countComponents () > 0) {
36795 var enabledOnToolkit = java.awt.Toolkit.enabledOnToolkit (65536);
36796 if (resized) {
36797 (this).createChildHierarchyEvents (1402, 0, enabledOnToolkit);
36798 }if (moved) {
36799 (this).createChildHierarchyEvents (1401, 0, enabledOnToolkit);
36800 }}}}, "~B,~B");
36801 Clazz_defineMethod (c$, "getX", 
36802 function () {
36803 return this.x;
36804 });
36805 Clazz_defineMethod (c$, "getY", 
36806 function () {
36807 return this.y;
36808 });
36809 Clazz_defineMethod (c$, "getWidth", 
36810 function () {
36811 return this.width;
36812 });
36813 Clazz_defineMethod (c$, "getHeight", 
36814 function () {
36815 return this.height;
36816 });
36817 Clazz_defineMethod (c$, "getBounds", 
36818 function (rv) {
36819 if (rv == null) return  new java.awt.Rectangle (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36820 rv.reshape (this.getX (), this.getY (), this.getWidth (), this.getHeight ());
36821 return rv;
36822 }, "java.awt.Rectangle");
36823 Clazz_defineMethod (c$, "getSize", 
36824 function (rv) {
36825 if (rv == null) {
36826 return  new java.awt.Dimension (this.getWidth (), this.getHeight ());
36827 } else {
36828 rv.setSize (this.getWidth (), this.getHeight ());
36829 return rv;
36830 }}, "java.awt.Dimension");
36831 Clazz_defineMethod (c$, "getLocation", 
36832 function (rv) {
36833 if (rv == null) {
36834 return  new java.awt.Point (this.getX (), this.getY ());
36835 } else {
36836 rv.setLocation (this.getX (), this.getY ());
36837 return rv;
36838 }}, "java.awt.Point");
36839 Clazz_defineMethod (c$, "isOpaque", 
36840 function () {
36841 return true;
36842 });
36843 Clazz_defineMethod (c$, "isLightweight", 
36844 function () {
36845 return false;
36846 });
36847 Clazz_defineMethod (c$, "setPreferredSize", 
36848 function (preferredSize) {
36849 this.setPrefSizeComp (preferredSize);
36850 }, "java.awt.Dimension");
36851 Clazz_defineMethod (c$, "setPrefSizeComp", 
36852 function (preferredSize) {
36853 var old = (this.prefSizeSet ? this.prefSize : null);
36854 this.prefSize = preferredSize;
36855 this.prefSizeSet = (preferredSize != null);
36856 this.firePropertyChangeObject ("preferredSize", old, preferredSize);
36857 }, "java.awt.Dimension");
36858 Clazz_defineMethod (c$, "isPreferredSizeSet", 
36859 function () {
36860 return this.prefSizeSet;
36861 });
36862 Clazz_defineMethod (c$, "getPreferredSize", 
36863 function () {
36864 return this.preferredSize ();
36865 });
36866 Clazz_defineMethod (c$, "preferredSize", 
36867 function () {
36868 return this.prefSizeComp ();
36869 });
36870 Clazz_defineMethod (c$, "prefSizeComp", 
36871 function () {
36872 var dim = this.prefSize;
36873 if (dim == null || !(this.isPreferredSizeSet () || this.isValid ())) {
36874 this.prefSize = this.getMinimumSize ();
36875 dim = this.prefSize;
36876 }return  new java.awt.Dimension (dim);
36877 });
36878 Clazz_defineMethod (c$, "setMinimumSize", 
36879 function (minimumSize) {
36880 var old;
36881 if (this.minSizeSet) {
36882 old = this.minSize;
36883 } else {
36884 old = null;
36885 }this.minSize = minimumSize;
36886 this.minSizeSet = (minimumSize != null);
36887 this.firePropertyChangeObject ("minimumSize", old, minimumSize);
36888 }, "java.awt.Dimension");
36889 Clazz_defineMethod (c$, "isMinimumSizeSet", 
36890 function () {
36891 return this.minSizeSet;
36892 });
36893 Clazz_defineMethod (c$, "getMinimumSize", 
36894 function () {
36895 return this.minimumSize ();
36896 });
36897 Clazz_defineMethod (c$, "minimumSize", 
36898 function () {
36899 var dim = this.minSize;
36900 if (dim == null || !(this.isMinimumSizeSet () || this.isValid ())) {
36901 this.minSize = this.getSize ();
36902 dim = this.minSize;
36903 }return  new java.awt.Dimension (dim);
36904 });
36905 Clazz_defineMethod (c$, "setMaximumSize", 
36906 function (maximumSize) {
36907 var old;
36908 if (this.maxSizeSet) {
36909 old = this.maxSize;
36910 } else {
36911 old = null;
36912 }this.maxSize = maximumSize;
36913 this.maxSizeSet = (maximumSize != null);
36914 this.firePropertyChangeObject ("maximumSize", old, maximumSize);
36915 }, "java.awt.Dimension");
36916 Clazz_defineMethod (c$, "isMaximumSizeSet", 
36917 function () {
36918 return this.maxSizeSet;
36919 });
36920 Clazz_defineMethod (c$, "getMaximumSize", 
36921 function () {
36922 return this.getMaxSizeComp ();
36923 });
36924 Clazz_defineMethod (c$, "getMaxSizeComp", 
36925 function () {
36926 if (this.isMaximumSizeSet ()) {
36927 return  new java.awt.Dimension (this.maxSize);
36928 }return  new java.awt.Dimension (32767, 32767);
36929 });
36930 Clazz_defineMethod (c$, "getAlignmentX", 
36931 function () {
36932 return this.getAlignmentXComp ();
36933 });
36934 Clazz_defineMethod (c$, "getAlignmentXComp", 
36935 function () {
36936 return 0.5;
36937 });
36938 Clazz_defineMethod (c$, "getAlignmentY", 
36939 function () {
36940 return this.getAlignmentYComp ();
36941 });
36942 Clazz_defineMethod (c$, "getAlignmentYComp", 
36943 function () {
36944 return 0.5;
36945 });
36946 Clazz_defineMethod (c$, "getBaseline", 
36947 function (width, height) {
36948 if (width < 0 || height < 0) {
36949 throw  new IllegalArgumentException ("Width and height must be >= 0");
36950 }return -1;
36951 }, "~N,~N");
36952 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
36953 function () {
36954 return java.awt.Component.BaselineResizeBehavior.OTHER;
36955 });
36956 Clazz_defineMethod (c$, "doLayout", 
36957 function () {
36958 this.layout ();
36959 });
36960 Clazz_defineMethod (c$, "layout", 
36961 function () {
36962 });
36963 Clazz_defineMethod (c$, "validate", 
36964 function () {
36965 this.validateComponent ();
36966 });
36967 Clazz_defineMethod (c$, "validateComponent", 
36968 function () {
36969 {
36970 var peer = this.peer;
36971 var wasValid = this.isValid ();
36972 if (!wasValid && peer != null) {
36973 var newfont = this.getFont ();
36974 var oldfont = this.peerFont;
36975 if (newfont !== oldfont && (oldfont == null || !oldfont.equals (newfont))) {
36976 peer.setFont (newfont);
36977 this.peerFont = newfont;
36978 }peer.layout ();
36979 }this.valid = true;
36980 if (!wasValid) {
36981 this.mixOnValidating ();
36982 }}});
36983 Clazz_defineMethod (c$, "invalidate", 
36984 function () {
36985 this.invalidateComp ();
36986 });
36987 Clazz_defineMethod (c$, "invalidateComp", 
36988 function () {
36989 this.valid = false;
36990 if (!this.isPreferredSizeSet ()) {
36991 this.prefSize = null;
36992 }if (!this.isMinimumSizeSet ()) {
36993 this.minSize = null;
36994 }if (!this.isMaximumSizeSet ()) {
36995 this.maxSize = null;
36996 }if (this.parent != null) {
36997 this.parent.invalidateIfValid ();
36998 }});
36999 Clazz_defineMethod (c$, "invalidateIfValid", 
37000 function () {
37001 if (this.isValid ()) {
37002 this.invalidate ();
37003 }});
37004 Clazz_defineMethod (c$, "getGraphics", 
37005 function () {
37006 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37007 if (this.parent == null) return null;
37008 var g = this.parent.getGraphics ();
37009 if (g == null) return null;
37010 g.setFont (this.getFont ());
37011 return g;
37012 } else {
37013 var peer = this.peer;
37014 return (peer != null) ? peer.getGraphics () : null;
37015 }});
37016 Clazz_defineMethod (c$, "getTreeLock", 
37017 function () {
37018 return this;
37019 });
37020 Clazz_defineMethod (c$, "getFontMetrics", 
37021 function (font) {
37022 return jssun.font.FontDesignMetrics.getMetrics (font);
37023 }, "java.awt.Font");
37024 Clazz_defineMethod (c$, "setCursor", 
37025 function (cursor) {
37026 this.cursor = cursor;
37027 this.updateCursorImmediately ();
37028 }, "java.awt.Cursor");
37029 Clazz_defineMethod (c$, "updateCursorImmediately", 
37030 function () {
37031 });
37032 Clazz_defineMethod (c$, "getCursor", 
37033 function () {
37034 return this.getCursor_NoClientCode ();
37035 });
37036 Clazz_defineMethod (c$, "getCursor_NoClientCode", 
37037 function () {
37038 var cursor = this.cursor;
37039 if (cursor != null) {
37040 return cursor;
37041 }var parent = this.parent;
37042 if (parent != null) {
37043 return parent.getCursor_NoClientCode ();
37044 } else {
37045 return java.awt.Cursor.getPredefinedCursor (0);
37046 }});
37047 Clazz_defineMethod (c$, "isCursorSet", 
37048 function () {
37049 return (this.cursor != null);
37050 });
37051 Clazz_defineMethod (c$, "paint", 
37052 function (g) {
37053 }, "java.awt.Graphics");
37054 Clazz_defineMethod (c$, "update", 
37055 function (g) {
37056 this.paint (g);
37057 }, "java.awt.Graphics");
37058 Clazz_defineMethod (c$, "paintAll", 
37059 function (g) {
37060 }, "java.awt.Graphics");
37061 Clazz_defineMethod (c$, "lightweightPaint", 
37062 function (g) {
37063 this.lwPaintComp (g);
37064 }, "java.awt.Graphics");
37065 Clazz_defineMethod (c$, "lwPaintComp", 
37066 function (g) {
37067 this.paint (g);
37068 }, "java.awt.Graphics");
37069 Clazz_defineMethod (c$, "paintHeavyweightComponents", 
37070 function (g) {
37071 }, "java.awt.Graphics");
37072 Clazz_defineMethod (c$, "repaint", 
37073 function () {
37074 this.repaintImpl (0, 0, 0, this.width, this.height);
37075 });
37076 Clazz_defineMethod (c$, "repaint", 
37077 function (tm) {
37078 this.repaintImpl (tm, 0, 0, this.width, this.height);
37079 }, "~N");
37080 Clazz_defineMethod (c$, "repaint", 
37081 function (x, y, width, height) {
37082 this.repaintImpl (0, x, y, width, height);
37083 }, "~N,~N,~N,~N");
37084 Clazz_defineMethod (c$, "repaint", 
37085 function (tm, x, y, width, height) {
37086 this.repaintImpl (tm, x, y, width, height);
37087 }, "~N,~N,~N,~N,~N");
37088 Clazz_defineMethod (c$, "repaintImpl", 
37089 function (tm, x, y, width, height) {
37090 if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37091 if (this.parent != null) {
37092 var px = this.x + ((x < 0) ? 0 : x);
37093 var py = this.y + ((y < 0) ? 0 : y);
37094 var pwidth = (width > this.width) ? this.width : width;
37095 var pheight = (height > this.height) ? this.height : height;
37096 this.parent.repaint (tm, px, py, pwidth, pheight);
37097 }} else {
37098 if (this.isVisible () && (this.peer != null) && (width > 0) && (height > 0)) {
37099 var e =  new java.awt.event.PaintEvent (this, 801,  new java.awt.Rectangle (x, y, width, height));
37100 java.awt.Toolkit.getEventQueue ().postEvent (e);
37101 }}}, "~N,~N,~N,~N,~N");
37102 Clazz_defineMethod (c$, "print", 
37103 function (g) {
37104 this.paint (g);
37105 }, "java.awt.Graphics");
37106 Clazz_defineMethod (c$, "printAll", 
37107 function (g) {
37108 }, "java.awt.Graphics");
37109 Clazz_defineMethod (c$, "printHeavyweightComponents", 
37110 function (g) {
37111 }, "java.awt.Graphics");
37112 Clazz_overrideMethod (c$, "imageUpdate", 
37113 function (img, infoflags, x, y, w, h) {
37114 return false;
37115 }, "java.awt.Image,~N,~N,~N,~N,~N");
37116 Clazz_defineMethod (c$, "createImage", 
37117 function (producer) {
37118 return this.getToolkit ().createImage (producer);
37119 }, "java.awt.image.ImageProducer");
37120 Clazz_defineMethod (c$, "createImage", 
37121 function (width, height) {
37122 return java.awt.Toolkit.getDefaultToolkit ().createImage (null, width, height);
37123 }, "~N,~N");
37124 Clazz_defineMethod (c$, "createVolatileImage", 
37125 function (width, height) {
37126 return null;
37127 }, "~N,~N");
37128 Clazz_defineMethod (c$, "createVolatileImage", 
37129 function (width, height, caps) {
37130 return this.createVolatileImage (width, height);
37131 }, "~N,~N,java.awt.ImageCapabilities");
37132 Clazz_defineMethod (c$, "prepareImage", 
37133 function (image, observer) {
37134 return this.prepareImage (image, -1, -1, observer);
37135 }, "java.awt.Image,java.awt.image.ImageObserver");
37136 Clazz_defineMethod (c$, "prepareImage", 
37137 function (image, width, height, observer) {
37138 return false;
37139 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37140 Clazz_defineMethod (c$, "checkImage", 
37141 function (image, observer) {
37142 return this.checkImage (image, -1, -1, observer);
37143 }, "java.awt.Image,java.awt.image.ImageObserver");
37144 Clazz_defineMethod (c$, "checkImage", 
37145 function (image, width, height, observer) {
37146 return 0;
37147 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
37148 Clazz_defineMethod (c$, "setIgnoreRepaint", 
37149 function (ignoreRepaint) {
37150 }, "~B");
37151 Clazz_defineMethod (c$, "getIgnoreRepaint", 
37152 function () {
37153 return false;
37154 });
37155 Clazz_defineMethod (c$, "contains", 
37156 function (x, y) {
37157 return this.inside (x, y);
37158 }, "~N,~N");
37159 Clazz_defineMethod (c$, "inside", 
37160 function (x, y) {
37161 return (x >= 0) && (x < this.width) && (y >= 0) && (y < this.height);
37162 }, "~N,~N");
37163 Clazz_defineMethod (c$, "getComponentAt", 
37164 function (x, y) {
37165 return this.locate (x, y);
37166 }, "~N,~N");
37167 Clazz_defineMethod (c$, "locate", 
37168 function (x, y) {
37169 return this.contains (x, y) ? this : null;
37170 }, "~N,~N");
37171 Clazz_defineMethod (c$, "getComponentAt", 
37172 function (p) {
37173 return this.getComponentAt (p.x, p.y);
37174 }, "java.awt.Point");
37175 Clazz_defineMethod (c$, "deliverEvent", 
37176 function (e) {
37177 this.postEvent (e);
37178 }, "java.awt.Event");
37179 Clazz_defineMethod (c$, "dispatchEvent", 
37180 function (e) {
37181 this.dispatchEventImpl (e);
37182 }, "java.awt.AWTEvent");
37183 Clazz_defineMethod (c$, "dispatchEventImpl", 
37184 function (e) {
37185 this.dispatchEventImplComp (e);
37186 }, "java.awt.AWTEvent");
37187 Clazz_defineMethod (c$, "dispatchEventImplComp", 
37188 function (e) {
37189 var id = e.getID ();
37190 java.awt.EventQueue.setCurrentEventAndMostRecentTime (e);
37191 if (!e.focusManagerIsDispatching) {
37192 if (e.isPosted) {
37193 e.isPosted = true;
37194 }}if (!e.isConsumed ()) {
37195 if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37196 if (e.isConsumed ()) {
37197 return;
37198 }}}if (this.areInputMethodsEnabled ()) {
37199 if ((Clazz_instanceOf (e, java.awt.event.InputEvent)) || (Clazz_instanceOf (e, java.awt.event.FocusEvent))) {
37200 }} else {
37201 if (id == 1004) {
37202 }}switch (id) {
37203 case 401:
37204 case 402:
37205 var p = ((Clazz_instanceOf (this, java.awt.Container)) ? this : this.parent);
37206 if (p != null) {
37207 p.preProcessKeyEvent (e);
37208 }break;
37209 case 201:
37210 break;
37211 default:
37212 break;
37213 }
37214 if (this.newEventsOnly) {
37215 if (this.eventEnabled (e)) {
37216 this.processEvent (e);
37217 }} else if (id == 507) {
37218 this.autoProcessMouseWheel (e);
37219 } else if (!(Clazz_instanceOf (e, java.awt.event.MouseEvent) && !this.postsOldMouseEvents ())) {
37220 }if (id == 201 && !e.isConsumed ()) {
37221 }if (!(Clazz_instanceOf (e, java.awt.event.KeyEvent))) {
37222 }}, "java.awt.AWTEvent");
37223 Clazz_defineMethod (c$, "autoProcessMouseWheel", 
37224 function (e) {
37225 }, "java.awt.event.MouseWheelEvent");
37226 Clazz_defineMethod (c$, "dispatchMouseWheelToAncestor", 
37227 function (e) {
37228 var newX;
37229 var newY;
37230 newX = e.getX () + this.getX ();
37231 newY = e.getY () + this.getY ();
37232 var newMWE;
37233 {
37234 var anc = this.getParent ();
37235 while (anc != null && !anc.eventEnabled (e)) {
37236 newX += anc.getX ();
37237 newY += anc.getY ();
37238 if (!(Clazz_instanceOf (anc, java.awt.Window))) {
37239 anc = anc.getParent ();
37240 } else {
37241 break;
37242 }}
37243 if (anc != null && anc.eventEnabled (e)) {
37244 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 ());
37245 (e).copyPrivateDataInto (newMWE);
37246 anc.dispatchEventToSelf (newMWE);
37247 }}return true;
37248 }, "java.awt.event.MouseWheelEvent");
37249 Clazz_defineMethod (c$, "checkWindowClosingException", 
37250 function () {
37251 if (this.windowClosingException != null) {
37252 if (Clazz_instanceOf (this, java.awt.Dialog)) {
37253 (this).interruptBlocking ();
37254 } else {
37255 this.windowClosingException.fillInStackTrace ();
37256 this.windowClosingException.printStackTrace ();
37257 this.windowClosingException = null;
37258 }return true;
37259 }return false;
37260 });
37261 Clazz_defineMethod (c$, "areInputMethodsEnabled", 
37262 function () {
37263 return ((this.eventMask & 4096) != 0) && ((this.eventMask & 8) != 0 || this.keyListener != null);
37264 });
37265 Clazz_defineMethod (c$, "eventEnabled", 
37266 function (e) {
37267 return this.eventTypeEnabled (e.id);
37268 }, "java.awt.AWTEvent");
37269 Clazz_defineMethod (c$, "eventTypeEnabled", 
37270 function (type) {
37271 switch (type) {
37272 case 100:
37273 case 101:
37274 case 102:
37275 case 103:
37276 if ((this.eventMask & 1) != 0 || this.componentListener != null) {
37277 return true;
37278 }break;
37279 case 1004:
37280 case 1005:
37281 if ((this.eventMask & 4) != 0 || this.focusListener != null) {
37282 return true;
37283 }break;
37284 case 401:
37285 case 402:
37286 case 400:
37287 if ((this.eventMask & 8) != 0 || this.keyListener != null) {
37288 return true;
37289 }break;
37290 case 501:
37291 case 502:
37292 case 504:
37293 case 505:
37294 case 500:
37295 if ((this.eventMask & 16) != 0 || this.mouseListener != null) {
37296 return true;
37297 }break;
37298 case 503:
37299 case 506:
37300 if ((this.eventMask & 32) != 0 || this.mouseMotionListener != null) {
37301 return true;
37302 }break;
37303 case 507:
37304 if ((this.eventMask & 131072) != 0 || this.mouseWheelListener != null) {
37305 return true;
37306 }break;
37307 case 1100:
37308 case 1101:
37309 if ((this.eventMask & 2048) != 0 || this.inputMethodListener != null) {
37310 return true;
37311 }break;
37312 case 1400:
37313 if ((this.eventMask & 32768) != 0 || this.hierarchyListener != null) {
37314 return true;
37315 }break;
37316 case 1401:
37317 case 1402:
37318 if ((this.eventMask & 65536) != 0 || this.hierarchyBoundsListener != null) {
37319 return true;
37320 }break;
37321 case 1001:
37322 if ((this.eventMask & 128) != 0) {
37323 return true;
37324 }break;
37325 case 900:
37326 if ((this.eventMask & 1024) != 0) {
37327 return true;
37328 }break;
37329 case 701:
37330 if ((this.eventMask & 512) != 0) {
37331 return true;
37332 }break;
37333 case 601:
37334 if ((this.eventMask & 256) != 0) {
37335 return true;
37336 }break;
37337 default:
37338 break;
37339 }
37340 if (type > 1999) {
37341 return true;
37342 }return false;
37343 }, "~N");
37344 Clazz_defineMethod (c$, "postEvent", 
37345 function (e) {
37346 if (this.handleEvent (e)) {
37347 e.consume ();
37348 return true;
37349 }var parent = this.parent;
37350 var eventx = e.x;
37351 var eventy = e.y;
37352 if (parent != null) {
37353 e.translate (this.x, this.y);
37354 if (parent.postEvent (e)) {
37355 e.consume ();
37356 return true;
37357 }e.x = eventx;
37358 e.y = eventy;
37359 }return false;
37360 }, "java.awt.Event");
37361 Clazz_defineMethod (c$, "addComponentListener", 
37362 function (l) {
37363 if (l == null) {
37364 return;
37365 }this.componentListener = java.awt.AWTEventMulticaster.add (this.componentListener, l);
37366 this.newEventsOnly = true;
37367 }, "java.awt.event.ComponentListener");
37368 Clazz_defineMethod (c$, "removeComponentListener", 
37369 function (l) {
37370 if (l == null) {
37371 return;
37372 }this.componentListener = java.awt.AWTEventMulticaster.remove (this.componentListener, l);
37373 }, "java.awt.event.ComponentListener");
37374 Clazz_defineMethod (c$, "getComponentListeners", 
37375 function () {
37376 return (this.getListeners (java.awt.event.ComponentListener));
37377 });
37378 Clazz_defineMethod (c$, "addFocusListener", 
37379 function (l) {
37380 if (l == null) {
37381 return;
37382 }this.focusListener = java.awt.AWTEventMulticaster.add (this.focusListener, l);
37383 this.newEventsOnly = true;
37384 }, "java.awt.event.FocusListener");
37385 Clazz_defineMethod (c$, "removeFocusListener", 
37386 function (l) {
37387 if (l == null) {
37388 return;
37389 }this.focusListener = java.awt.AWTEventMulticaster.remove (this.focusListener, l);
37390 }, "java.awt.event.FocusListener");
37391 Clazz_defineMethod (c$, "getFocusListeners", 
37392 function () {
37393 return (this.getListeners (java.awt.event.FocusListener));
37394 });
37395 Clazz_defineMethod (c$, "addHierarchyListener", 
37396 function (l) {
37397 }, "java.awt.event.HierarchyListener");
37398 Clazz_defineMethod (c$, "removeHierarchyListener", 
37399 function (l) {
37400 }, "java.awt.event.HierarchyListener");
37401 Clazz_defineMethod (c$, "getHierarchyListeners", 
37402 function () {
37403 return (this.getListeners (java.awt.event.HierarchyListener));
37404 });
37405 Clazz_defineMethod (c$, "addHierarchyBoundsListener", 
37406 function (l) {
37407 if (l == null) {
37408 return;
37409 }var notifyAncestors;
37410 {
37411 notifyAncestors = (this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0);
37412 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.add (this.hierarchyBoundsListener, l);
37413 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener != null);
37414 this.newEventsOnly = true;
37415 }if (notifyAncestors) {
37416 {
37417 this.adjustListeningChildrenOnParent (65536, 1);
37418 }}}, "java.awt.event.HierarchyBoundsListener");
37419 Clazz_defineMethod (c$, "removeHierarchyBoundsListener", 
37420 function (l) {
37421 if (l == null) {
37422 return;
37423 }var notifyAncestors;
37424 {
37425 notifyAncestors = (this.hierarchyBoundsListener != null && (this.eventMask & 65536) == 0);
37426 this.hierarchyBoundsListener = java.awt.AWTEventMulticaster.remove (this.hierarchyBoundsListener, l);
37427 notifyAncestors = (notifyAncestors && this.hierarchyBoundsListener == null);
37428 }if (notifyAncestors) {
37429 {
37430 this.adjustListeningChildrenOnParent (65536, -1);
37431 }}}, "java.awt.event.HierarchyBoundsListener");
37432 Clazz_defineMethod (c$, "numListening", 
37433 function (mask) {
37434 return this.numListeningMask (mask);
37435 }, "~N");
37436 Clazz_defineMethod (c$, "numListeningMask", 
37437 function (mask) {
37438 if ((mask == 32768 && (this.hierarchyListener != null || (this.eventMask & 32768) != 0)) || (mask == 65536 && (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0))) {
37439 return 1;
37440 } else {
37441 return 0;
37442 }}, "~N");
37443 Clazz_defineMethod (c$, "countHierarchyMembers", 
37444 function () {
37445 return 1;
37446 });
37447 Clazz_defineMethod (c$, "createHierarchyEvents", 
37448 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37449 return this.createHierEventsComp (id, changed, changedParent, changeFlags, enabledOnToolkit);
37450 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37451 Clazz_defineMethod (c$, "createHierEventsComp", 
37452 function (id, changed, changedParent, changeFlags, enabledOnToolkit) {
37453 switch (id) {
37454 case 1400:
37455 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || enabledOnToolkit) {
37456 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent, changeFlags);
37457 this.dispatchEvent (e);
37458 return 1;
37459 }break;
37460 case 1401:
37461 case 1402:
37462 if (this.hierarchyBoundsListener != null || (this.eventMask & 65536) != 0 || enabledOnToolkit) {
37463 var e =  new java.awt.event.HierarchyEvent (this, id, changed, changedParent);
37464 this.dispatchEvent (e);
37465 return 1;
37466 }break;
37467 default:
37468 break;
37469 }
37470 return 0;
37471 }, "~N,java.awt.Component,java.awt.Container,~N,~B");
37472 Clazz_defineMethod (c$, "getHierarchyBoundsListeners", 
37473 function () {
37474 return (this.getListeners (java.awt.event.HierarchyBoundsListener));
37475 });
37476 Clazz_defineMethod (c$, "adjustListeningChildrenOnParent", 
37477 function (mask, num) {
37478 if (this.parent != null) {
37479 this.parent.adjustListeningChildren (mask, num);
37480 }}, "~N,~N");
37481 Clazz_defineMethod (c$, "addKeyListener", 
37482 function (l) {
37483 if (l == null) {
37484 return;
37485 }this.keyListener = java.awt.AWTEventMulticaster.add (this.keyListener, l);
37486 this.newEventsOnly = true;
37487 }, "java.awt.event.KeyListener");
37488 Clazz_defineMethod (c$, "removeKeyListener", 
37489 function (l) {
37490 if (l == null) {
37491 return;
37492 }this.keyListener = java.awt.AWTEventMulticaster.remove (this.keyListener, l);
37493 }, "java.awt.event.KeyListener");
37494 Clazz_defineMethod (c$, "getKeyListeners", 
37495 function () {
37496 return (this.getListeners (java.awt.event.KeyListener));
37497 });
37498 Clazz_defineMethod (c$, "addMouseListener", 
37499 function (l) {
37500 if (l == null) {
37501 return;
37502 }System.out.println ("C adding mouse listener " + l);
37503 this.mouseListener = java.awt.AWTEventMulticaster.add (this.mouseListener, l);
37504 this.newEventsOnly = true;
37505 }, "java.awt.event.MouseListener");
37506 Clazz_defineMethod (c$, "removeMouseListener", 
37507 function (l) {
37508 if (l == null) {
37509 return;
37510 }this.mouseListener = java.awt.AWTEventMulticaster.remove (this.mouseListener, l);
37511 }, "java.awt.event.MouseListener");
37512 Clazz_defineMethod (c$, "getMouseListeners", 
37513 function () {
37514 return (this.getListeners (java.awt.event.MouseListener));
37515 });
37516 Clazz_defineMethod (c$, "addMouseMotionListener", 
37517 function (l) {
37518 if (l == null) {
37519 return;
37520 }this.mouseMotionListener = java.awt.AWTEventMulticaster.add (this.mouseMotionListener, l);
37521 this.newEventsOnly = true;
37522 }, "java.awt.event.MouseMotionListener");
37523 Clazz_defineMethod (c$, "removeMouseMotionListener", 
37524 function (l) {
37525 if (l == null) {
37526 return;
37527 }this.mouseMotionListener = java.awt.AWTEventMulticaster.remove (this.mouseMotionListener, l);
37528 }, "java.awt.event.MouseMotionListener");
37529 Clazz_defineMethod (c$, "getMouseMotionListeners", 
37530 function () {
37531 return (this.getListeners (java.awt.event.MouseMotionListener));
37532 });
37533 Clazz_defineMethod (c$, "addMouseWheelListener", 
37534 function (l) {
37535 if (l == null) {
37536 return;
37537 }this.mouseWheelListener = java.awt.AWTEventMulticaster.add (this.mouseWheelListener, l);
37538 this.newEventsOnly = true;
37539 }, "java.awt.event.MouseWheelListener");
37540 Clazz_defineMethod (c$, "removeMouseWheelListener", 
37541 function (l) {
37542 if (l == null) {
37543 return;
37544 }this.mouseWheelListener = java.awt.AWTEventMulticaster.remove (this.mouseWheelListener, l);
37545 }, "java.awt.event.MouseWheelListener");
37546 Clazz_defineMethod (c$, "getMouseWheelListeners", 
37547 function () {
37548 return (this.getListeners (java.awt.event.MouseWheelListener));
37549 });
37550 Clazz_defineMethod (c$, "addInputMethodListener", 
37551 function (l) {
37552 if (l == null) {
37553 return;
37554 }this.inputMethodListener = java.awt.AWTEventMulticaster.add (this.inputMethodListener, l);
37555 this.newEventsOnly = true;
37556 }, "java.awt.event.InputMethodListener");
37557 Clazz_defineMethod (c$, "removeInputMethodListener", 
37558 function (l) {
37559 if (l == null) {
37560 return;
37561 }this.inputMethodListener = java.awt.AWTEventMulticaster.remove (this.inputMethodListener, l);
37562 }, "java.awt.event.InputMethodListener");
37563 Clazz_defineMethod (c$, "getInputMethodListeners", 
37564 function () {
37565 return (this.getListeners (java.awt.event.InputMethodListener));
37566 });
37567 Clazz_defineMethod (c$, "getListeners", 
37568 function (listenerType) {
37569 return this.getListenersComp (listenerType);
37570 }, "Class");
37571 Clazz_defineMethod (c$, "getListenersComp", 
37572 function (listenerType) {
37573 var l = null;
37574 if (listenerType === java.awt.event.ComponentListener) {
37575 l = this.componentListener;
37576 } else if (listenerType === java.awt.event.FocusListener) {
37577 l = this.focusListener;
37578 } else if (listenerType === java.awt.event.HierarchyListener) {
37579 l = this.hierarchyListener;
37580 } else if (listenerType === java.awt.event.HierarchyBoundsListener) {
37581 l = this.hierarchyBoundsListener;
37582 } else if (listenerType === java.awt.event.KeyListener) {
37583 l = this.keyListener;
37584 } else if (listenerType === java.awt.event.MouseListener) {
37585 l = this.mouseListener;
37586 } else if (listenerType === java.awt.event.MouseMotionListener) {
37587 l = this.mouseMotionListener;
37588 } else if (listenerType === java.awt.event.MouseWheelListener) {
37589 l = this.mouseWheelListener;
37590 } else if (listenerType === java.awt.event.InputMethodListener) {
37591 l = this.inputMethodListener;
37592 } else if (listenerType === java.beans.PropertyChangeListener) {
37593 return this.getPropertyChangeListeners ();
37594 }return java.awt.AWTEventMulticaster.getListeners (l, listenerType);
37595 }, "Class");
37596 Clazz_defineMethod (c$, "enableEvents", 
37597 function (eventsToEnable) {
37598 var notifyAncestors = 0;
37599 {
37600 if ((eventsToEnable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) == 0) {
37601 notifyAncestors |= 32768;
37602 }if ((eventsToEnable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) == 0) {
37603 notifyAncestors |= 65536;
37604 }this.eventMask |= eventsToEnable;
37605 this.newEventsOnly = true;
37606 }if (Clazz_instanceOf (this.peer, java.awt.peer.LightweightPeer)) {
37607 this.parent.proxyEnableEvents (this.eventMask);
37608 }if (notifyAncestors != 0) {
37609 {
37610 this.adjustListeningChildrenOnParent (notifyAncestors, 1);
37611 }}}, "~N");
37612 Clazz_defineMethod (c$, "disableEvents", 
37613 function (eventsToDisable) {
37614 var notifyAncestors = 0;
37615 {
37616 if ((eventsToDisable & 32768) != 0 && this.hierarchyListener == null && (this.eventMask & 32768) != 0) {
37617 notifyAncestors |= 32768;
37618 }if ((eventsToDisable & 65536) != 0 && this.hierarchyBoundsListener == null && (this.eventMask & 65536) != 0) {
37619 notifyAncestors |= 65536;
37620 }this.eventMask &= ~eventsToDisable;
37621 }if (notifyAncestors != 0) {
37622 {
37623 this.adjustListeningChildrenOnParent (notifyAncestors, -1);
37624 }}}, "~N");
37625 Clazz_defineMethod (c$, "checkCoalescing", 
37626  function () {
37627 if (this.getClass ().getClassLoader () == null) {
37628 return false;
37629 }var clazz = this.getClass ();
37630 {
37631 var value = java.awt.Component.coalesceMap.get (clazz);
37632 if (value != null) {
37633 return value;
37634 }var enabled = Boolean.$valueOf (swingjs.JSToolkit.checkClassMethod (this, "coalesceEvents", "\\java.awt.AWTEvent\\java.awt.AWTEvent"));
37635 java.awt.Component.coalesceMap.put (clazz, enabled);
37636 return enabled;
37637 }});
37638 Clazz_defineMethod (c$, "isCoalescingEnabled", 
37639 function () {
37640 return this.coalescingEnabled;
37641 });
37642 Clazz_defineMethod (c$, "coalesceEvents", 
37643 function (existingEvent, newEvent) {
37644 return null;
37645 }, "java.awt.AWTEvent,java.awt.AWTEvent");
37646 Clazz_defineMethod (c$, "processEvent", 
37647 function (e) {
37648 this.processEventComp (e);
37649 }, "java.awt.AWTEvent");
37650 Clazz_defineMethod (c$, "processEventComp", 
37651 function (e) {
37652 if (Clazz_instanceOf (e, java.awt.event.FocusEvent)) {
37653 this.processFocusEvent (e);
37654 } else if (Clazz_instanceOf (e, java.awt.event.MouseEvent)) {
37655 switch (e.getID ()) {
37656 case 501:
37657 case 502:
37658 case 500:
37659 case 504:
37660 case 505:
37661 this.processMouseEvent (e);
37662 break;
37663 case 503:
37664 case 506:
37665 this.processMouseMotionEvent (e);
37666 break;
37667 case 507:
37668 this.processMouseWheelEvent (e);
37669 break;
37670 }
37671 } else if (Clazz_instanceOf (e, java.awt.event.KeyEvent)) {
37672 this.processKeyEvent (e);
37673 } else if (Clazz_instanceOf (e, java.awt.event.ComponentEvent)) {
37674 this.processComponentEvent (e);
37675 } else if (Clazz_instanceOf (e, java.awt.event.InputMethodEvent)) {
37676 this.processInputMethodEvent (e);
37677 } else if (Clazz_instanceOf (e, java.awt.event.HierarchyEvent)) {
37678 switch (e.getID ()) {
37679 case 1400:
37680 this.processHierarchyEvent (e);
37681 break;
37682 case 1401:
37683 case 1402:
37684 this.processHierarchyBoundsEvent (e);
37685 break;
37686 }
37687 }}, "java.awt.AWTEvent");
37688 Clazz_defineMethod (c$, "processComponentEvent", 
37689 function (e) {
37690 var listener = this.componentListener;
37691 if (listener != null) {
37692 var id = e.getID ();
37693 switch (id) {
37694 case 101:
37695 listener.componentResized (e);
37696 break;
37697 case 100:
37698 listener.componentMoved (e);
37699 break;
37700 case 102:
37701 listener.componentShown (e);
37702 break;
37703 case 103:
37704 listener.componentHidden (e);
37705 break;
37706 }
37707 }}, "java.awt.event.ComponentEvent");
37708 Clazz_defineMethod (c$, "processFocusEvent", 
37709 function (e) {
37710 var listener = this.focusListener;
37711 if (listener != null) {
37712 var id = e.getID ();
37713 switch (id) {
37714 case 1004:
37715 listener.focusGained (e);
37716 break;
37717 case 1005:
37718 listener.focusLost (e);
37719 break;
37720 }
37721 }}, "java.awt.event.FocusEvent");
37722 Clazz_defineMethod (c$, "processKeyEvent", 
37723 function (e) {
37724 var listener = this.keyListener;
37725 if (listener != null) {
37726 var id = e.getID ();
37727 switch (id) {
37728 case 400:
37729 listener.keyTyped (e);
37730 break;
37731 case 401:
37732 listener.keyPressed (e);
37733 break;
37734 case 402:
37735 listener.keyReleased (e);
37736 break;
37737 }
37738 }}, "java.awt.event.KeyEvent");
37739 Clazz_defineMethod (c$, "processMouseEvent", 
37740 function (e) {
37741 var listener = this.mouseListener;
37742 if (listener != null) {
37743 var id = e.getID ();
37744 switch (id) {
37745 case 501:
37746 listener.mousePressed (e);
37747 break;
37748 case 502:
37749 listener.mouseReleased (e);
37750 break;
37751 case 500:
37752 listener.mouseClicked (e);
37753 break;
37754 case 505:
37755 listener.mouseExited (e);
37756 break;
37757 case 504:
37758 listener.mouseEntered (e);
37759 break;
37760 }
37761 }}, "java.awt.event.MouseEvent");
37762 Clazz_defineMethod (c$, "processMouseMotionEvent", 
37763 function (e) {
37764 var listener = this.mouseMotionListener;
37765 if (listener != null) {
37766 var id = e.getID ();
37767 switch (id) {
37768 case 503:
37769 listener.mouseMoved (e);
37770 break;
37771 case 506:
37772 listener.mouseDragged (e);
37773 break;
37774 }
37775 }}, "java.awt.event.MouseEvent");
37776 Clazz_defineMethod (c$, "processMouseWheelEvent", 
37777 function (e) {
37778 var listener = this.mouseWheelListener;
37779 if (listener != null) {
37780 var id = e.getID ();
37781 switch (id) {
37782 case 507:
37783 listener.mouseWheelMoved (e);
37784 break;
37785 }
37786 }}, "java.awt.event.MouseWheelEvent");
37787 Clazz_defineMethod (c$, "postsOldMouseEvents", 
37788 function () {
37789 return false;
37790 });
37791 Clazz_defineMethod (c$, "processInputMethodEvent", 
37792 function (e) {
37793 var listener = this.inputMethodListener;
37794 if (listener != null) {
37795 var id = e.getID ();
37796 switch (id) {
37797 case 1100:
37798 listener.inputMethodTextChanged (e);
37799 break;
37800 case 1101:
37801 listener.caretPositionChanged (e);
37802 break;
37803 }
37804 }}, "java.awt.event.InputMethodEvent");
37805 Clazz_defineMethod (c$, "processHierarchyEvent", 
37806 function (e) {
37807 var listener = this.hierarchyListener;
37808 if (listener != null) {
37809 var id = e.getID ();
37810 switch (id) {
37811 case 1400:
37812 listener.hierarchyChanged (e);
37813 break;
37814 }
37815 }}, "java.awt.event.HierarchyEvent");
37816 Clazz_defineMethod (c$, "processHierarchyBoundsEvent", 
37817 function (e) {
37818 var listener = this.hierarchyBoundsListener;
37819 if (listener != null) {
37820 var id = e.getID ();
37821 switch (id) {
37822 case 1401:
37823 listener.ancestorMoved (e);
37824 break;
37825 case 1402:
37826 listener.ancestorResized (e);
37827 break;
37828 }
37829 }}, "java.awt.event.HierarchyEvent");
37830 Clazz_defineMethod (c$, "handleEvent", 
37831 function (evt) {
37832 switch (evt.id) {
37833 case 504:
37834 return this.mouseEnter (evt, evt.x, evt.y);
37835 case 505:
37836 return this.mouseExit (evt, evt.x, evt.y);
37837 case 503:
37838 return this.mouseMove (evt, evt.x, evt.y);
37839 case 501:
37840 return this.mouseDown (evt, evt.x, evt.y);
37841 case 506:
37842 return this.mouseDrag (evt, evt.x, evt.y);
37843 case 502:
37844 return this.mouseUp (evt, evt.x, evt.y);
37845 case 401:
37846 case 403:
37847 return this.keyDown (evt, evt.key);
37848 case 402:
37849 case 404:
37850 return this.keyUp (evt, evt.key);
37851 case 1001:
37852 return this.action (evt, evt.arg);
37853 case 1004:
37854 return this.gotFocus (evt, evt.arg);
37855 case 1005:
37856 return this.lostFocus (evt, evt.arg);
37857 }
37858 return false;
37859 }, "java.awt.Event");
37860 Clazz_defineMethod (c$, "mouseDown", 
37861 function (evt, x, y) {
37862 return false;
37863 }, "java.awt.Event,~N,~N");
37864 Clazz_defineMethod (c$, "mouseDrag", 
37865 function (evt, x, y) {
37866 return false;
37867 }, "java.awt.Event,~N,~N");
37868 Clazz_defineMethod (c$, "mouseUp", 
37869 function (evt, x, y) {
37870 return false;
37871 }, "java.awt.Event,~N,~N");
37872 Clazz_defineMethod (c$, "mouseMove", 
37873 function (evt, x, y) {
37874 return false;
37875 }, "java.awt.Event,~N,~N");
37876 Clazz_defineMethod (c$, "mouseEnter", 
37877 function (evt, x, y) {
37878 return false;
37879 }, "java.awt.Event,~N,~N");
37880 Clazz_defineMethod (c$, "mouseExit", 
37881 function (evt, x, y) {
37882 return false;
37883 }, "java.awt.Event,~N,~N");
37884 Clazz_defineMethod (c$, "keyDown", 
37885 function (evt, key) {
37886 return false;
37887 }, "java.awt.Event,~N");
37888 Clazz_defineMethod (c$, "keyUp", 
37889 function (evt, key) {
37890 return false;
37891 }, "java.awt.Event,~N");
37892 Clazz_defineMethod (c$, "action", 
37893 function (evt, what) {
37894 return false;
37895 }, "java.awt.Event,~O");
37896 Clazz_defineMethod (c$, "addNotify", 
37897 function () {
37898 this.addNotifyComp ();
37899 });
37900 Clazz_defineMethod (c$, "addNotifyComp", 
37901 function () {
37902 {
37903 var peer = this.peer;
37904 if (peer == null || Clazz_instanceOf (peer, java.awt.peer.LightweightPeer)) {
37905 if (peer == null) {
37906 this.peer = peer = this.getToolkit ().createComponent (this);
37907 }if (this.parent != null) {
37908 var mask = 0;
37909 if ((this.mouseListener != null) || ((this.eventMask & 16) != 0)) {
37910 mask |= 16;
37911 }if ((this.mouseMotionListener != null) || ((this.eventMask & 32) != 0)) {
37912 mask |= 32;
37913 }if ((this.mouseWheelListener != null) || ((this.eventMask & 131072) != 0)) {
37914 mask |= 131072;
37915 }if (this.focusListener != null || (this.eventMask & 4) != 0) {
37916 mask |= 4;
37917 }if (this.keyListener != null || (this.eventMask & 8) != 0) {
37918 mask |= 8;
37919 }if (mask != 0) {
37920 this.parent.proxyEnableEvents (mask);
37921 }}} else {
37922 var parent = this.parent;
37923 if (parent != null && Clazz_instanceOf (parent.peer, java.awt.peer.LightweightPeer)) {
37924 this.relocateComponent ();
37925 }}this.invalidate ();
37926 this.peerFont = this.getFont ();
37927 if (this.getContainer () != null && !this.isAddNotifyComplete) {
37928 this.getContainer ().increaseComponentCount (this);
37929 }if (this.parent != null && this.parent.peer != null) {
37930 var parentContPeer = this.parent.peer;
37931 if (Clazz_instanceOf (parentContPeer, java.awt.peer.LightweightPeer) && !(Clazz_instanceOf (peer, java.awt.peer.LightweightPeer))) {
37932 var hwParent = this.getNativeContainer ();
37933 if (hwParent != null && hwParent.peer != null) {
37934 parentContPeer = hwParent.peer;
37935 }}}if (!this.isAddNotifyComplete) {
37936 this.mixOnShowing ();
37937 }this.isAddNotifyComplete = true;
37938 if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
37939 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
37940 this.dispatchEvent (e);
37941 }}});
37942 Clazz_defineMethod (c$, "getNativeContainer", 
37943 function () {
37944 var p = this.parent;
37945 while (p != null && Clazz_instanceOf (p.peer, java.awt.peer.LightweightPeer)) {
37946 p = p.getParent ();
37947 }
37948 return p;
37949 });
37950 Clazz_defineMethod (c$, "removeNotify", 
37951 function () {
37952 this.removeNotifyComp ();
37953 });
37954 Clazz_defineMethod (c$, "removeNotifyComp", 
37955 function () {
37956 {
37957 if (this.getContainer () != null && this.isAddNotifyComplete) {
37958 this.getContainer ().decreaseComponentCount (this);
37959 }var p = this.peer;
37960 if (p != null) {
37961 var isLightweight = this.isLightweight ();
37962 this.peer = null;
37963 this.peerFont = null;
37964 java.awt.Toolkit.getEventQueue ().removeSourceEvents (this, false);
37965 p.dispose ();
37966 this.mixOnHiding (isLightweight);
37967 this.isAddNotifyComplete = false;
37968 }if (this.hierarchyListener != null || (this.eventMask & 32768) != 0 || java.awt.Toolkit.enabledOnToolkit (32768)) {
37969 var e =  new java.awt.event.HierarchyEvent (this, 1400, this, this.parent, 2 | ((this.isRecursivelyVisible ()) ? 4 : 0));
37970 this.dispatchEvent (e);
37971 }}});
37972 Clazz_defineMethod (c$, "gotFocus", 
37973 function (evt, what) {
37974 return false;
37975 }, "java.awt.Event,~O");
37976 Clazz_defineMethod (c$, "lostFocus", 
37977 function (evt, what) {
37978 return false;
37979 }, "java.awt.Event,~O");
37980 Clazz_defineMethod (c$, "isFocusTraversable", 
37981 function () {
37982 if (this.$isFocusTraversableOverridden == 0) {
37983 this.$isFocusTraversableOverridden = 1;
37984 }return this.focusable;
37985 });
37986 Clazz_defineMethod (c$, "isFocusable", 
37987 function () {
37988 return this.isFocusTraversable ();
37989 });
37990 Clazz_defineMethod (c$, "setFocusable", 
37991 function (focusable) {
37992 var oldFocusable;
37993 {
37994 oldFocusable = this.focusable;
37995 this.focusable = focusable;
37996 }this.$isFocusTraversableOverridden = 2;
37997 this.firePropertyChangeObject ("focusable", new Boolean (oldFocusable), new Boolean (focusable));
37998 }, "~B");
37999 Clazz_defineMethod (c$, "isFocusTraversableOverridden", 
38000 function () {
38001 return (this.$isFocusTraversableOverridden != 1);
38002 });
38003 Clazz_defineMethod (c$, "getFocusTraversalKeysEnabled", 
38004 function () {
38005 return this.focusTraversalKeysEnabled;
38006 });
38007 Clazz_defineMethod (c$, "requestFocus", 
38008 function () {
38009 swingjs.JSToolkit.requestFocus (this);
38010 });
38011 Clazz_defineMethod (c$, "requestFocus", 
38012 function (temporary) {
38013 return swingjs.JSToolkit.requestFocus (this);
38014 }, "~B");
38015 Clazz_defineMethod (c$, "requestFocusInWindow", 
38016 function () {
38017 return swingjs.JSToolkit.requestFocus (this);
38018 });
38019 Clazz_defineMethod (c$, "requestFocusInWindow", 
38020 function (temporary) {
38021 return swingjs.JSToolkit.requestFocus (this);
38022 }, "~B");
38023 Clazz_defineMethod (c$, "getFocusCycleRootAncestor", 
38024 function () {
38025 var rootAncestor = this.parent;
38026 while (rootAncestor != null && !rootAncestor.isFocusCycleRoot ()) {
38027 rootAncestor = rootAncestor.parent;
38028 }
38029 return rootAncestor;
38030 });
38031 Clazz_defineMethod (c$, "isFocusCycleRoot", 
38032 function (container) {
38033 return this.isFocusCycleRootComp (container);
38034 }, "java.awt.Container");
38035 Clazz_defineMethod (c$, "isFocusCycleRootComp", 
38036 function (container) {
38037 var rootAncestor = this.getFocusCycleRootAncestor ();
38038 return (rootAncestor === container);
38039 }, "java.awt.Container");
38040 Clazz_defineMethod (c$, "hasFocus", 
38041 function () {
38042 return swingjs.JSToolkit.hasFocus (this);
38043 });
38044 Clazz_defineMethod (c$, "isFocusOwner", 
38045 function () {
38046 return this.hasFocus ();
38047 });
38048 Clazz_defineMethod (c$, "setAutoFocusTransferOnDisposal", 
38049 function (value) {
38050 this.autoFocusTransferOnDisposal = value;
38051 }, "~B");
38052 Clazz_defineMethod (c$, "isAutoFocusTransferOnDisposal", 
38053 function () {
38054 return this.autoFocusTransferOnDisposal;
38055 });
38056 Clazz_defineMethod (c$, "paramString", 
38057 function () {
38058 return this.paramStringComp ();
38059 });
38060 Clazz_defineMethod (c$, "paramStringComp", 
38061 function () {
38062 var thisName = this.getName ();
38063 var str = (thisName != null ? thisName : "");
38064 if (!this.isValid ()) {
38065 str += ",invalid";
38066 }if (!this.visible) {
38067 str += ",hidden";
38068 }if (!this.enabled) {
38069 str += ",disabled";
38070 }str += ",parent:" + (this.parent == null ? null : this.parent.getName ()) + "," + this.x + "," + this.y + "," + this.width + "x" + this.height;
38071 return str;
38072 });
38073 Clazz_overrideMethod (c$, "toString", 
38074 function () {
38075 return this.getClass ().getName () + "[" + this.paramString () + "]";
38076 });
38077 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38078 function (listener) {
38079 this.addPropChangeListenerComp (listener);
38080 }, "java.beans.PropertyChangeListener");
38081 Clazz_defineMethod (c$, "addPropChangeListenerComp", 
38082 function (listener) {
38083 {
38084 if (listener == null) {
38085 return;
38086 }if (this.changeSupport == null) {
38087 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38088 }this.changeSupport.addPropertyChangeListener1 (listener);
38089 }}, "java.beans.PropertyChangeListener");
38090 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38091 function (listener) {
38092 {
38093 if (listener == null || this.changeSupport == null) {
38094 return;
38095 }this.changeSupport.removePropertyChangeListener (listener);
38096 }}, "java.beans.PropertyChangeListener");
38097 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38098 function () {
38099 {
38100 if (this.changeSupport == null) {
38101 return  new Array (0);
38102 }return this.changeSupport.getPropertyChangeListeners ();
38103 }});
38104 Clazz_defineMethod (c$, "addPropertyChangeListener", 
38105 function (propertyName, listener) {
38106 this.addPropChangeListComp (propertyName, listener);
38107 }, "~S,java.beans.PropertyChangeListener");
38108 Clazz_defineMethod (c$, "addPropChangeListComp", 
38109 function (propertyName, listener) {
38110 {
38111 if (arguments.length == 1) {
38112 addPropertyChangeListener1(propertyName); return; }
38113 }{
38114 if (listener == null) {
38115 return;
38116 }if (this.changeSupport == null) {
38117 this.changeSupport =  new java.beans.PropertyChangeSupport (this);
38118 }this.changeSupport.addPropertyChangeListener2 (propertyName, listener);
38119 }}, "~S,java.beans.PropertyChangeListener");
38120 Clazz_defineMethod (c$, "removePropertyChangeListener", 
38121 function (propertyName, listener) {
38122 {
38123 if (listener == null || this.changeSupport == null) {
38124 return;
38125 }this.changeSupport.removePropertyChangeListener (propertyName, listener);
38126 }}, "~S,java.beans.PropertyChangeListener");
38127 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
38128 function (propertyName) {
38129 {
38130 if (this.changeSupport == null) {
38131 return  new Array (0);
38132 }return this.changeSupport.getPropertyChangeListeners (propertyName);
38133 }}, "~S");
38134 Clazz_defineMethod (c$, "firePropertyChange", 
38135 function (propertyName, oldValue, newValue) {
38136 this.firePropertyChangeObject (propertyName, oldValue, newValue);
38137 }, "~S,~O,~O");
38138 Clazz_defineMethod (c$, "firePropertyChangeObject", 
38139 function (propertyName, oldValue, newValue) {
38140 var changeSupport;
38141 {
38142 changeSupport = this.changeSupport;
38143 }if (changeSupport == null || (oldValue != null && newValue != null && oldValue.equals (newValue))) {
38144 return;
38145 }changeSupport.firePropertyChange (propertyName, oldValue, newValue);
38146 }, "~S,~O,~O");
38147 Clazz_defineMethod (c$, "firePropertyChange", 
38148 function (propertyName, oldValue, newValue) {
38149 this.firePropertyChangeBool (propertyName, oldValue, newValue);
38150 }, "~S,~B,~B");
38151 Clazz_defineMethod (c$, "firePropertyChangeBool", 
38152 function (propertyName, oldValue, newValue) {
38153 var changeSupport = this.changeSupport;
38154 if (changeSupport == null || oldValue == newValue) {
38155 return;
38156 }changeSupport.firePropertyChange (propertyName, Boolean.$valueOf (oldValue), Boolean.$valueOf (newValue));
38157 }, "~S,~B,~B");
38158 Clazz_defineMethod (c$, "firePropertyChange", 
38159 function (propertyName, oldValue, newValue) {
38160 this.firePropertyChangeInt (propertyName, oldValue, newValue);
38161 }, "~S,~N,~N");
38162 Clazz_defineMethod (c$, "firePropertyChangeInt", 
38163 function (propertyName, oldValue, newValue) {
38164 var changeSupport = this.changeSupport;
38165 if (changeSupport == null || oldValue == newValue) {
38166 return;
38167 }changeSupport.firePropertyChange (propertyName, Integer.$valueOf (oldValue), Integer.$valueOf (newValue));
38168 }, "~S,~N,~N");
38169 Clazz_defineMethod (c$, "firePropertyChange", 
38170 function (propertyName, oldValue, newValue) {
38171 this.firePropertyChangeChar (propertyName, oldValue, newValue);
38172 }, "~S,~S,~S");
38173 Clazz_defineMethod (c$, "firePropertyChangeChar", 
38174 function (propertyName, oldValue, newValue) {
38175 if (this.changeSupport == null || oldValue == newValue) {
38176 return;
38177 }this.firePropertyChangeObject (propertyName,  new Character (oldValue),  new Character (newValue));
38178 }, "~S,~S,~S");
38179 Clazz_defineMethod (c$, "firePropertyChangeShort", 
38180 function (propertyName, oldValue, newValue) {
38181 if (this.changeSupport == null || oldValue == newValue) {
38182 return;
38183 }this.firePropertyChangeObject (propertyName, Short.$valueOf (oldValue), Short.$valueOf (newValue));
38184 }, "~S,~N,~N");
38185 Clazz_defineMethod (c$, "firePropertyChangeLong", 
38186 function (propertyName, oldValue, newValue) {
38187 if (this.changeSupport == null || oldValue == newValue) {
38188 return;
38189 }this.firePropertyChangeObject (propertyName, Long.$valueOf (oldValue), Long.$valueOf (newValue));
38190 }, "~S,~N,~N");
38191 Clazz_defineMethod (c$, "firePropertyChangeFloat", 
38192 function (propertyName, oldValue, newValue) {
38193 if (this.changeSupport == null || oldValue == newValue) {
38194 return;
38195 }this.firePropertyChangeObject (propertyName, Float.$valueOf (oldValue), Float.$valueOf (newValue));
38196 }, "~S,~N,~N");
38197 Clazz_defineMethod (c$, "firePropertyChangeDouble", 
38198 function (propertyName, oldValue, newValue) {
38199 if (this.changeSupport == null || oldValue == newValue) {
38200 return;
38201 }this.firePropertyChangeObject (propertyName, Double.$valueOf (oldValue), Double.$valueOf (newValue));
38202 }, "~S,~N,~N");
38203 Clazz_defineMethod (c$, "setComponentOrientation", 
38204 function (o) {
38205 var oldValue = this.componentOrientation;
38206 this.componentOrientation = o;
38207 this.firePropertyChangeObject ("componentOrientation", oldValue, o);
38208 this.invalidateIfValid ();
38209 }, "java.awt.ComponentOrientation");
38210 Clazz_defineMethod (c$, "getComponentOrientation", 
38211 function () {
38212 return this.componentOrientation;
38213 });
38214 Clazz_defineMethod (c$, "applyComponentOrientation", 
38215 function (orientation) {
38216 this.applyCompOrientComp (orientation);
38217 }, "java.awt.ComponentOrientation");
38218 Clazz_defineMethod (c$, "applyCompOrientComp", 
38219 function (orientation) {
38220 if (orientation == null) {
38221 throw  new NullPointerException ();
38222 }this.setComponentOrientation (orientation);
38223 }, "java.awt.ComponentOrientation");
38224 Clazz_defineMethod (c$, "canBeFocusOwner", 
38225 function () {
38226 if (this.isEnabled () && this.isDisplayable () && this.isVisible () && this.isFocusable ()) {
38227 return true;
38228 }return false;
38229 });
38230 Clazz_defineMethod (c$, "canBeFocusOwnerRecursively", 
38231 function () {
38232 if (!this.canBeFocusOwner ()) {
38233 return false;
38234 }if (this.parent != null) {
38235 return this.parent.canContainFocusOwner (this);
38236 }return true;
38237 });
38238 Clazz_defineMethod (c$, "relocateComponent", 
38239 function () {
38240 });
38241 Clazz_defineMethod (c$, "getContainingWindow", 
38242 function () {
38243 return jssun.awt.SunToolkit.getContainingWindow (this);
38244 });
38245 c$.isInstanceOf = Clazz_defineMethod (c$, "isInstanceOf", 
38246 function (obj, className) {
38247 if (obj == null) return false;
38248 if (className == null) return false;
38249 var cls = obj.getClass ();
38250 while (cls != null) {
38251 if (cls.getName ().equals (className)) {
38252 return true;
38253 }cls = cls.getSuperclass ();
38254 }
38255 return false;
38256 }, "~O,~S");
38257 Clazz_defineMethod (c$, "areBoundsValid", 
38258 function () {
38259 var cont = this.getContainer ();
38260 return cont == null || cont.isValid () || cont.getLayout () == null;
38261 });
38262 Clazz_defineMethod (c$, "getLocationOnWindow", 
38263 function () {
38264 var curLocation = this.getLocation ();
38265 for (var parent = this.getContainer (); parent != null && !(Clazz_instanceOf (parent, java.awt.Window)); parent = parent.getContainer ()) {
38266 curLocation.x += parent.getX ();
38267 curLocation.y += parent.getY ();
38268 }
38269 return curLocation;
38270 });
38271 Clazz_defineMethod (c$, "getSiblingIndexAbove", 
38272 function () {
38273 var parent = this.getContainer ();
38274 if (parent == null) {
38275 return -1;
38276 }var nextAbove = parent.getComponentZOrder (this) - 1;
38277 return nextAbove < 0 ? -1 : nextAbove;
38278 });
38279 Clazz_defineMethod (c$, "getSiblingIndexBelow", 
38280 function () {
38281 var parent = this.getContainer ();
38282 if (parent == null) {
38283 return -1;
38284 }var nextBelow = parent.getComponentZOrder (this) + 1;
38285 return nextBelow >= parent.getComponentCount () ? -1 : nextBelow;
38286 });
38287 Clazz_defineMethod (c$, "mixOnShowing", 
38288 function () {
38289 });
38290 Clazz_defineMethod (c$, "mixOnHiding", 
38291 function (isLightweight) {
38292 }, "~B");
38293 Clazz_defineMethod (c$, "mixOnReshaping", 
38294 function () {
38295 swingjs.JSToolkit.taintUI (this);
38296 });
38297 Clazz_defineMethod (c$, "mixOnZOrderChanging", 
38298 function (oldZorder, newZorder) {
38299 }, "~N,~N");
38300 Clazz_defineMethod (c$, "mixOnValidating", 
38301 function () {
38302 });
38303 c$.doesClassImplement = Clazz_defineMethod (c$, "doesClassImplement", 
38304  function (cls, interfaceName) {
38305 if (cls == null) return false;
38306 for (var c, $c = 0, $$c = cls.getInterfaces (); $c < $$c.length && ((c = $$c[$c]) || true); $c++) {
38307 if (c.getName ().equals (interfaceName)) {
38308 return true;
38309 }}
38310 return java.awt.Component.doesClassImplement (cls.getSuperclass (), interfaceName);
38311 }, "Class,~S");
38312 c$.doesImplement = Clazz_defineMethod (c$, "doesImplement", 
38313 function (obj, interfaceName) {
38314 if (obj == null) return false;
38315 if (interfaceName == null) return false;
38316 return java.awt.Component.doesClassImplement (obj.getClass (), interfaceName);
38317 }, "~O,~S");
38318 Clazz_pu$h(self.c$);
38319 c$ = Clazz_declareType (java.awt.Component, "BaselineResizeBehavior", Enum);
38320 Clazz_defineEnumConstant (c$, "CONSTANT_ASCENT", 0, []);
38321 Clazz_defineEnumConstant (c$, "CONSTANT_DESCENT", 1, []);
38322 Clazz_defineEnumConstant (c$, "CENTER_OFFSET", 2, []);
38323 Clazz_defineEnumConstant (c$, "OTHER", 3, []);
38324 c$ = Clazz_p0p ();
38325 Clazz_pu$h(self.c$);
38326 c$ = Clazz_declareType (java.awt.Component, "AWTTreeLock");
38327 c$ = Clazz_p0p ();
38328 Clazz_defineStatics (c$,
38329 "FOCUS_TRAVERSABLE_UNKNOWN", 0,
38330 "FOCUS_TRAVERSABLE_DEFAULT", 1,
38331 "FOCUS_TRAVERSABLE_SET", 2,
38332 "actionListenerK", "actionL",
38333 "adjustmentListenerK", "adjustmentL",
38334 "componentListenerK", "componentL",
38335 "containerListenerK", "containerL",
38336 "focusListenerK", "focusL",
38337 "itemListenerK", "itemL",
38338 "keyListenerK", "keyL",
38339 "mouseListenerK", "mouseL",
38340 "mouseMotionListenerK", "mouseMotionL",
38341 "mouseWheelListenerK", "mouseWheelL",
38342 "textListenerK", "textL",
38343 "ownedWindowK", "ownedL",
38344 "windowListenerK", "windowL",
38345 "inputMethodListenerK", "inputMethodL",
38346 "hierarchyListenerK", "hierarchyL",
38347 "hierarchyBoundsListenerK", "hierarchyBoundsL",
38348 "windowStateListenerK", "windowStateL",
38349 "windowFocusListenerK", "windowFocusL",
38350 "isInc", false,
38351 "incRate", 0,
38352 "TOP_ALIGNMENT", 0.0,
38353 "CENTER_ALIGNMENT", 0.5,
38354 "BOTTOM_ALIGNMENT", 1.0,
38355 "LEFT_ALIGNMENT", 0.0,
38356 "RIGHT_ALIGNMENT", 1.0,
38357 "incr", 0);
38358 c$.coalesceMap = c$.prototype.coalesceMap =  new java.util.HashMap ();
38359 });
38360 Clazz_declarePackage ("jssun.awt");
38361 Clazz_load (null, "jssun.awt.SunGraphicsCallback", ["java.awt.Container", "$.Graphics2D", "jssun.awt.ConstrainableGraphics", "$.Graphics2Delegate"], function () {
38362 c$ = Clazz_declareType (jssun.awt, "SunGraphicsCallback");
38363 Clazz_defineMethod (c$, "constrainGraphics", 
38364 function (g, bounds) {
38365 if (Clazz_instanceOf (g, jssun.awt.ConstrainableGraphics)) {
38366 (g).constrain (bounds.x, bounds.y, bounds.width, bounds.height);
38367 } else {
38368 g.translate (bounds.x, bounds.y);
38369 }g.clipRect (0, 0, bounds.width, bounds.height);
38370 }, "java.awt.Graphics,java.awt.Rectangle");
38371 Clazz_defineMethod (c$, "runOneComponent", 
38372 function (comp, bounds, g, clip, weightFlags) {
38373 if (comp == null || !comp.isLightweight () || !comp.isVisible ()) {
38374 return;
38375 }var lightweight = comp.isLightweight ();
38376 if ((lightweight && (weightFlags & 2) == 0) || (!lightweight && (weightFlags & 1) == 0)) {
38377 return;
38378 }if (bounds == null) {
38379 bounds = comp.getBounds ();
38380 }if (clip == null || clip.intersects (bounds)) {
38381 var cg = g.createSwingJS ();
38382 try {
38383 this.constrainGraphics (cg, bounds);
38384 cg.setFont (comp.getFont ());
38385 cg.setColor (comp.getForeground ());
38386 if (Clazz_instanceOf (cg, java.awt.Graphics2D)) {
38387 (cg).setBackground (comp.getBackground ());
38388 } else if (Clazz_instanceOf (cg, jssun.awt.Graphics2Delegate)) {
38389 (cg).setBackground (comp.getBackground ());
38390 }this.run (comp, cg);
38391 } finally {
38392 cg.dispose ();
38393 }
38394 }}, "java.awt.Component,java.awt.Rectangle,java.awt.Graphics,java.awt.Shape,~N");
38395 Clazz_defineMethod (c$, "runComponents", 
38396 function (comps, g, weightFlags) {
38397 var ncomponents = comps.length;
38398 var clip = g.getClip ();
38399 for (var i = ncomponents - 1; i >= 0; i--) {
38400 this.runOneComponent (comps[i], null, g, clip, weightFlags);
38401 }
38402 }, "~A,java.awt.Graphics,~N");
38403 Clazz_pu$h(self.c$);
38404 c$ = Clazz_declareType (jssun.awt.SunGraphicsCallback, "PaintHeavyweightComponentsCallback", jssun.awt.SunGraphicsCallback);
38405 Clazz_makeConstructor (c$, 
38406  function () {
38407 Clazz_superConstructor (this, jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback, []);
38408 });
38409 Clazz_overrideMethod (c$, "run", 
38410 function (a, b) {
38411 if (!a.isLightweight ()) {
38412 a.paintAll (b);
38413 } else if (Clazz_instanceOf (a, java.awt.Container)) {
38414 this.runComponents ((a).getComponents (), b, 3);
38415 }}, "java.awt.Component,java.awt.Graphics");
38416 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
38417 function () {
38418 return jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback.instance;
38419 });
38420 c$.instance = c$.prototype.instance =  new jssun.awt.SunGraphicsCallback.PaintHeavyweightComponentsCallback ();
38421 c$ = Clazz_p0p ();
38422 Clazz_defineStatics (c$,
38423 "HEAVYWEIGHTS", 0x1,
38424 "LIGHTWEIGHTS", 0x2,
38425 "TWO_PASSES", 0x4);
38426 });
38427 Clazz_declarePackage ("javax.swing");
38428 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 () {
38429 c$ = Clazz_decorateAsClass (function () {
38430 this.volatileMap = null;
38431 this.hwDirtyComponents = null;
38432 this.dirtyComponents = null;
38433 this.tmpDirtyComponents = null;
38434 this.invalidComponents = null;
38435 this.runnableList = null;
38436 this.paintDepth = 0;
38437 this.painting = false;
38438 this.repaintRoot = null;
38439 this.paintThread = null;
38440 this.processingRunnable = null;
38441 this.myComponent = null;
38442 this.tmp = null;
38443 if (!Clazz_isClassDefined ("javax.swing.RepaintManager.ProcessingRunnable")) {
38444 javax.swing.RepaintManager.$RepaintManager$ProcessingRunnable$ ();
38445 }
38446 Clazz_instantialize (this, arguments);
38447 }, javax.swing, "RepaintManager");
38448 Clazz_prepareFields (c$, function () {
38449 this.volatileMap =  new java.util.HashMap (1);
38450 this.tmp =  new java.awt.Rectangle ();
38451 });
38452 c$.currentManager = Clazz_defineMethod (c$, "currentManager", 
38453 function (c) {
38454 var appContext = jssun.awt.AppContext.getAppContext ();
38455 var rm = appContext.get (javax.swing.RepaintManager.repaintManagerKey);
38456 if (rm == null) {
38457 rm =  new javax.swing.RepaintManager ();
38458 rm.set (c);
38459 appContext.put (javax.swing.RepaintManager.repaintManagerKey, rm);
38460 }return rm;
38461 }, "java.awt.Component");
38462 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
38463 function (aRepaintManager) {
38464 if (aRepaintManager != null) {
38465 javax.swing.SwingUtilities.appContextPut (javax.swing.RepaintManager.repaintManagerKey, aRepaintManager);
38466 } else {
38467 javax.swing.SwingUtilities.appContextRemove (javax.swing.RepaintManager.repaintManagerKey);
38468 }}, "javax.swing.RepaintManager");
38469 Clazz_makeConstructor (c$, 
38470  function () {
38471 this.processingRunnable = Clazz_innerTypeInstance (javax.swing.RepaintManager.ProcessingRunnable, this, null);
38472 });
38473 Clazz_defineMethod (c$, "set", 
38474  function (c) {
38475 this.myComponent = c;
38476 this.dirtyComponents =  new java.util.IdentityHashMap ();
38477 this.tmpDirtyComponents =  new java.util.IdentityHashMap ();
38478 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38479 }, "java.awt.Component");
38480 Clazz_defineMethod (c$, "addInvalidComponent", 
38481 function (invalidComponent) {
38482 var validateRoot = null;
38483 for (var c = invalidComponent; c != null; c = c.getParent ()) {
38484 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane))) {
38485 return;
38486 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
38487 validateRoot = c;
38488 break;
38489 }}
38490 if (validateRoot == null) {
38491 return;
38492 }var root = null;
38493 for (var c = validateRoot; c != null; c = c.getParent ()) {
38494 if (!c.isVisible ()) {
38495 return;
38496 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
38497 root = c;
38498 break;
38499 }}
38500 if (root == null) {
38501 return;
38502 }if (this.invalidComponents == null) {
38503 this.invalidComponents =  new java.util.ArrayList ();
38504 } else {
38505 var n = this.invalidComponents.size ();
38506 for (var i = 0; i < n; i++) {
38507 if (validateRoot === this.invalidComponents.get (i)) {
38508 return;
38509 }}
38510 }this.invalidComponents.add (validateRoot);
38511 this.scheduleProcessingRunnable (root);
38512 }, "javax.swing.JComponent");
38513 Clazz_defineMethod (c$, "removeInvalidComponent", 
38514 function (component) {
38515 if (this.invalidComponents != null) {
38516 var index = this.invalidComponents.indexOf (component);
38517 if (index != -1) {
38518 this.invalidComponents.remove (index);
38519 }}}, "javax.swing.JComponent");
38520 Clazz_defineMethod (c$, "addDirtyRegion0", 
38521  function (c, x, y, w, h) {
38522 {
38523 var g = c.getGraphics();
38524 if (g == null || g.gc == null)return;
38525 }if ((w <= 0) || (h <= 0) || (c == null)) {
38526 return;
38527 }if ((c.getWidth () <= 0) || (c.getHeight () <= 0)) {
38528 return;
38529 }if (this.extendDirtyRegion (c, x, y, w, h)) {
38530 return;
38531 }var root = null;
38532 for (var p = c; p != null; p = p.getParent ()) {
38533 if (!p.isVisible () || p.getPeer () == null) {
38534 return;
38535 }if ((Clazz_instanceOf (p, java.awt.Window)) || (Clazz_instanceOf (p, java.applet.Applet))) {
38536 if (Clazz_instanceOf (p, java.awt.Frame) && ((p).getExtendedState () & 1) == 1) {
38537 return;
38538 }root = p;
38539 break;
38540 }}
38541 if (root == null) return;
38542 {
38543 if (this.extendDirtyRegion (c, x, y, w, h)) {
38544 return;
38545 }this.dirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38546 }this.scheduleProcessingRunnable (c);
38547 }, "java.awt.Container,~N,~N,~N,~N");
38548 Clazz_defineMethod (c$, "addDirtyRegion", 
38549 function (c, x, y, w, h) {
38550 this.addDirtyRegion0 (c, x, y, w, h);
38551 }, "javax.swing.JComponent,~N,~N,~N,~N");
38552 Clazz_defineMethod (c$, "addDirtyRegion", 
38553 function (window, x, y, w, h) {
38554 this.addDirtyRegion0 (window, x, y, w, h);
38555 }, "java.awt.Window,~N,~N,~N,~N");
38556 Clazz_defineMethod (c$, "addDirtyRegion", 
38557 function (applet, x, y, w, h) {
38558 this.addDirtyRegion0 (applet, x, y, w, h);
38559 }, "java.applet.Applet,~N,~N,~N,~N");
38560 Clazz_defineMethod (c$, "scheduleHeavyWeightPaints", 
38561 function () {
38562 var hws;
38563 {
38564 if (this.hwDirtyComponents.size () == 0) {
38565 return;
38566 }hws = this.hwDirtyComponents;
38567 this.hwDirtyComponents =  new java.util.IdentityHashMap ();
38568 }for (var hw, $hw = hws.keySet ().iterator (); $hw.hasNext () && ((hw = $hw.next ()) || true);) {
38569 var dirty = hws.get (hw);
38570 if (Clazz_instanceOf (hw, java.awt.Window)) {
38571 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38572 } else if (Clazz_instanceOf (hw, java.applet.Applet)) {
38573 this.addDirtyRegion (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38574 } else {
38575 this.addDirtyRegion0 (hw, dirty.x, dirty.y, dirty.width, dirty.height);
38576 }}
38577 });
38578 Clazz_defineMethod (c$, "nativeAddDirtyRegion", 
38579 function (appContext, c, x, y, w, h) {
38580 if (w > 0 && h > 0) {
38581 {
38582 var dirty = this.hwDirtyComponents.get (c);
38583 if (dirty == null) {
38584 this.hwDirtyComponents.put (c,  new java.awt.Rectangle (x, y, w, h));
38585 } else {
38586 this.hwDirtyComponents.put (c, javax.swing.SwingUtilities.computeUnion (x, y, w, h, dirty));
38587 }}this.scheduleProcessingRunnable (appContext);
38588 }}, "jssun.awt.AppContext,java.awt.Container,~N,~N,~N,~N");
38589 Clazz_defineMethod (c$, "extendDirtyRegion", 
38590  function (c, x, y, w, h) {
38591 var r = this.dirtyComponents.get (c);
38592 if (r != null) {
38593 javax.swing.SwingUtilities.computeUnion (x, y, w, h, r);
38594 return true;
38595 }return false;
38596 }, "java.awt.Component,~N,~N,~N,~N");
38597 Clazz_defineMethod (c$, "getDirtyRegion", 
38598 function (aComponent) {
38599 var r = null;
38600 {
38601 r = this.dirtyComponents.get (aComponent);
38602 }if (r == null) return  new java.awt.Rectangle (0, 0, 0, 0);
38603  else return  new java.awt.Rectangle (r);
38604 }, "javax.swing.JComponent");
38605 Clazz_defineMethod (c$, "markCompletelyDirty", 
38606 function (aComponent) {
38607 this.addDirtyRegion (aComponent, 0, 0, 2147483647, 2147483647);
38608 }, "javax.swing.JComponent");
38609 Clazz_defineMethod (c$, "markCompletelyClean", 
38610 function (aComponent) {
38611 {
38612 this.dirtyComponents.remove (aComponent);
38613 }}, "javax.swing.JComponent");
38614 Clazz_defineMethod (c$, "isCompletelyDirty", 
38615 function (aComponent) {
38616 var r;
38617 r = this.getDirtyRegion (aComponent);
38618 if (r.width == 2147483647 && r.height == 2147483647) return true;
38619  else return false;
38620 }, "javax.swing.JComponent");
38621 Clazz_defineMethod (c$, "validateInvalidComponents", 
38622 function () {
38623 var ic;
38624 {
38625 if (this.invalidComponents == null) {
38626 return;
38627 }ic = this.invalidComponents;
38628 this.invalidComponents = null;
38629 }var n = ic.size ();
38630 for (var i = 0; i < n; i++) {
38631 var c = ic.get (i);
38632 c.validate ();
38633 }
38634 });
38635 Clazz_defineMethod (c$, "prePaintDirtyRegions", 
38636  function () {
38637 var dirtyComponents;
38638 var runnableList;
38639 {
38640 dirtyComponents = this.dirtyComponents;
38641 runnableList = this.runnableList;
38642 this.runnableList = null;
38643 }if (runnableList != null) {
38644 for (var runnable, $runnable = runnableList.iterator (); $runnable.hasNext () && ((runnable = $runnable.next ()) || true);) {
38645 runnable.run ();
38646 }
38647 }this.paintDirtyRegions ();
38648 if (dirtyComponents.size () > 0) {
38649 this.paintDirtyRegions1 (dirtyComponents);
38650 }});
38651 Clazz_defineMethod (c$, "updateWindows", 
38652  function (dirtyComponents) {
38653 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
38654 if (!(Clazz_instanceOf (toolkit, jssun.awt.SunToolkit) && (toolkit).needUpdateWindow ())) {
38655 return dirtyComponents;
38656 }var windows =  new java.util.HashSet ();
38657 var dirtyComps = dirtyComponents.keySet ();
38658 for (var it = dirtyComps.iterator (); it.hasNext (); ) {
38659 var dirty = it.next ();
38660 var window = Clazz_instanceOf (dirty, java.awt.Window) ? dirty : javax.swing.SwingUtilities.getWindowAncestor (dirty);
38661 if (window != null && !jssun.awt.AWTAccessor.getWindowAccessor ().isOpaque (window)) {
38662 it.remove ();
38663 windows.add (window);
38664 }}
38665 for (var window, $window = windows.iterator (); $window.hasNext () && ((window = $window.next ()) || true);) {
38666 jssun.awt.AWTAccessor.getWindowAccessor ().updateWindow (window, null);
38667 }
38668 return dirtyComponents;
38669 }, "java.util.Map");
38670 Clazz_defineMethod (c$, "paintDirtyRegions", 
38671 function () {
38672 {
38673 var tmp = this.tmpDirtyComponents;
38674 this.tmpDirtyComponents = this.dirtyComponents;
38675 this.dirtyComponents = tmp;
38676 this.dirtyComponents.clear ();
38677 }this.paintDirtyRegions1 (this.tmpDirtyComponents);
38678 });
38679 Clazz_defineMethod (c$, "paintDirtyRegions1", 
38680  function (tmpDirtyComponents) {
38681 if (tmpDirtyComponents.isEmpty ()) {
38682 return;
38683 }this.updateWindows (tmpDirtyComponents);
38684 var roots =  new java.util.ArrayList (tmpDirtyComponents.size ());
38685 for (var dirty, $dirty = tmpDirtyComponents.keySet ().iterator (); $dirty.hasNext () && ((dirty = $dirty.next ()) || true);) {
38686 this.collectDirtyComponents (tmpDirtyComponents, dirty, roots);
38687 }
38688 var count = roots.size ();
38689 this.painting = true;
38690 try {
38691 for (var j = 0; j < count; j++) {
38692 var i = j;
38693 var dirtyComponent = roots.get (j);
38694 var rect = tmpDirtyComponents.get (dirtyComponent);
38695 var localBoundsH = dirtyComponent.getHeight ();
38696 var localBoundsW = dirtyComponent.getWidth ();
38697 javax.swing.SwingUtilities.computeIntersection (0, 0, localBoundsW, localBoundsH, rect);
38698 if (Clazz_instanceOf (dirtyComponent, javax.swing.JComponent)) {
38699 (dirtyComponent).paintImmediately (rect.x, rect.y, rect.width, rect.height);
38700 } else if (dirtyComponent.isShowing ()) {
38701 var g = javax.swing.JComponent.safelyGetGraphics (dirtyComponent, dirtyComponent);
38702 if (g != null) {
38703 try {
38704 dirtyComponent.paint (g);
38705 } finally {
38706 g.dispose ();
38707 }
38708 }}if (this.repaintRoot != null) {
38709 this.adjustRoots (this.repaintRoot, roots, i + 1);
38710 count = roots.size ();
38711 this.repaintRoot.paintImmediately (0, 0, this.repaintRoot.getWidth (), this.repaintRoot.getHeight ());
38712 this.repaintRoot = null;
38713 }}
38714 } finally {
38715 this.painting = false;
38716 }
38717 tmpDirtyComponents.clear ();
38718 }, "java.util.Map");
38719 Clazz_defineMethod (c$, "adjustRoots", 
38720  function (root, roots, index) {
38721 for (var i = roots.size () - 1; i >= index; i--) {
38722 var c = roots.get (i);
38723 for (; ; ) {
38724 if (c === root || c == null || !(Clazz_instanceOf (c, javax.swing.JComponent))) {
38725 break;
38726 }c = c.getParent ();
38727 }
38728 if (c === root) {
38729 roots.remove (i);
38730 }}
38731 }, "javax.swing.JComponent,java.util.List,~N");
38732 Clazz_defineMethod (c$, "collectDirtyComponents", 
38733 function (dirtyComponents, dirtyComponent, roots) {
38734 var dx;
38735 var dy;
38736 var rootDx;
38737 var rootDy;
38738 var component;
38739 var rootDirtyComponent;
38740 var parent;
38741 component = rootDirtyComponent = dirtyComponent;
38742 var x = dirtyComponent.getX ();
38743 var y = dirtyComponent.getY ();
38744 var w = dirtyComponent.getWidth ();
38745 var h = dirtyComponent.getHeight ();
38746 dx = rootDx = 0;
38747 dy = rootDy = 0;
38748 this.tmp.setBounds (dirtyComponents.get (dirtyComponent));
38749 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38750 if (this.tmp.isEmpty ()) {
38751 return;
38752 }for (; ; ) {
38753 if (!(Clazz_instanceOf (component, javax.swing.JComponent))) break;
38754 parent = component.getParent ();
38755 if (parent == null) break;
38756 component = parent;
38757 dx += x;
38758 dy += y;
38759 this.tmp.setLocation (this.tmp.x + x, this.tmp.y + y);
38760 x = component.getX ();
38761 y = component.getY ();
38762 w = component.getWidth ();
38763 h = component.getHeight ();
38764 this.tmp = javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, this.tmp);
38765 if (this.tmp.isEmpty ()) {
38766 return;
38767 }if (dirtyComponents.get (component) != null) {
38768 rootDirtyComponent = component;
38769 rootDx = dx;
38770 rootDy = dy;
38771 }}
38772 if (dirtyComponent !== rootDirtyComponent) {
38773 var r;
38774 this.tmp.setLocation (this.tmp.x + rootDx - dx, this.tmp.y + rootDy - dy);
38775 r = dirtyComponents.get (rootDirtyComponent);
38776 javax.swing.SwingUtilities.computeUnion (this.tmp.x, this.tmp.y, this.tmp.width, this.tmp.height, r);
38777 }if (!roots.contains (rootDirtyComponent)) roots.add (rootDirtyComponent);
38778 }, "java.util.Map,java.awt.Component,java.util.List");
38779 Clazz_overrideMethod (c$, "toString", 
38780 function () {
38781 var sb =  new StringBuffer ();
38782 if (this.dirtyComponents != null) sb.append ("" + this.dirtyComponents);
38783 return sb.toString ();
38784 });
38785 Clazz_defineMethod (c$, "getOffscreenBuffer", 
38786 function (c, proposedWidth, proposedHeight) {
38787 return null;
38788 }, "java.awt.Component,~N,~N");
38789 Clazz_defineMethod (c$, "getVolatileOffscreenBuffer", 
38790 function (c, proposedWidth, proposedHeight) {
38791 var config = c.getGraphicsConfiguration ();
38792 var maxSize = this.getDoubleBufferMaximumSize ();
38793 var width = proposedWidth < 1 ? 1 : (proposedWidth > maxSize.width ? maxSize.width : proposedWidth);
38794 var height = proposedHeight < 1 ? 1 : (proposedHeight > maxSize.height ? maxSize.height : proposedHeight);
38795 var image = this.volatileMap.get (config);
38796 if (image == null || image.getWidth () < width || image.getHeight () < height) {
38797 if (image != null) {
38798 image.flush ();
38799 }image = config.createCompatibleVolatileImage (width, height);
38800 this.volatileMap.put (config, image);
38801 }return image;
38802 }, "java.awt.Component,~N,~N");
38803 Clazz_defineMethod (c$, "setDoubleBufferMaximumSize", 
38804 function (d) {
38805 }, "java.awt.Dimension");
38806 Clazz_defineMethod (c$, "getDoubleBufferMaximumSize", 
38807 function () {
38808 return null;
38809 });
38810 Clazz_defineMethod (c$, "setDoubleBufferingEnabled", 
38811 function (aFlag) {
38812 }, "~B");
38813 Clazz_defineMethod (c$, "resetDoubleBuffer", 
38814 function () {
38815 });
38816 Clazz_defineMethod (c$, "resetVolatileDoubleBuffer", 
38817 function (gc) {
38818 var image = this.volatileMap.remove (gc);
38819 if (image != null) {
38820 image.flush ();
38821 }}, "java.awt.GraphicsConfiguration");
38822 Clazz_defineMethod (c$, "useVolatileDoubleBuffer", 
38823 function () {
38824 return javax.swing.RepaintManager.volatileImageBufferEnabled;
38825 });
38826 Clazz_defineMethod (c$, "isPaintingThread", 
38827  function () {
38828 return (Thread.currentThread () === this.paintThread);
38829 });
38830 Clazz_defineMethod (c$, "paint", 
38831 function (paintingComponent, bufferComponent, g, x, y, w, h) {
38832 paintingComponent.paintToOffscreen (g, x, y, w, h, x + w, y + h);
38833 }, "javax.swing.JComponent,javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N");
38834 Clazz_defineMethod (c$, "beginPaint", 
38835 function () {
38836 var multiThreadedPaint = false;
38837 var paintDepth = 0;
38838 var currentThread = Thread.currentThread ();
38839 {
38840 paintDepth = this.paintDepth;
38841 if (this.paintThread == null || currentThread === this.paintThread) {
38842 this.paintThread = currentThread;
38843 this.paintDepth++;
38844 } else {
38845 multiThreadedPaint = true;
38846 }}});
38847 Clazz_defineMethod (c$, "endPaint", 
38848 function () {
38849 if (this.isPaintingThread ()) {
38850 }});
38851 Clazz_defineMethod (c$, "doubleBufferingChanged", 
38852 function (rootPane) {
38853 }, "javax.swing.JRootPane");
38854 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38855  function (c) {
38856 this.scheduleProcessingRunnable (c.getAppContext ());
38857 }, "java.awt.Component");
38858 Clazz_defineMethod (c$, "scheduleProcessingRunnable", 
38859  function (context) {
38860 if (this.processingRunnable.markPending ()) {
38861 jssun.awt.SunToolkit.getSystemEventQueueImplPP (context).postEvent ( new java.awt.event.InvocationEvent (java.awt.Toolkit.getDefaultToolkit (), this.processingRunnable));
38862 }}, "jssun.awt.AppContext");
38863 c$.$RepaintManager$ProcessingRunnable$ = function () {
38864 Clazz_pu$h(self.c$);
38865 c$ = Clazz_decorateAsClass (function () {
38866 Clazz_prepareCallback (this, arguments);
38867 this.pending = false;
38868 Clazz_instantialize (this, arguments);
38869 }, javax.swing.RepaintManager, "ProcessingRunnable", null, Runnable);
38870 Clazz_defineMethod (c$, "markPending", 
38871 function () {
38872 if (!this.pending) {
38873 this.pending = true;
38874 return true;
38875 }return false;
38876 });
38877 Clazz_overrideMethod (c$, "run", 
38878 function () {
38879 {
38880 this.pending = false;
38881 }this.b$["javax.swing.RepaintManager"].scheduleHeavyWeightPaints ();
38882 this.b$["javax.swing.RepaintManager"].validateInvalidComponents ();
38883 this.b$["javax.swing.RepaintManager"].prePaintDirtyRegions ();
38884 swingjs.JSToolkit.forceRepaint (this.b$["javax.swing.RepaintManager"].myComponent);
38885 });
38886 c$ = Clazz_p0p ();
38887 };
38888 Clazz_defineStatics (c$,
38889 "HANDLE_TOP_LEVEL_PAINT", false);
38890 c$.repaintManagerKey = c$.prototype.repaintManagerKey = javax.swing.RepaintManager;
38891 Clazz_defineStatics (c$,
38892 "volatileImageBufferEnabled", true);
38893 {
38894 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38895 var headless = false;
38896 if (javax.swing.RepaintManager.volatileImageBufferEnabled && headless) {
38897 javax.swing.RepaintManager.volatileImageBufferEnabled = false;
38898 }javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT = true;
38899 }});
38900 Clazz_declarePackage ("jssun.awt");
38901 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 () {
38902 c$ = Clazz_decorateAsClass (function () {
38903 this.windowClosingListener = null;
38904 Clazz_instantialize (this, arguments);
38905 }, jssun.awt, "SunToolkit", java.awt.Toolkit, [jssun.awt.WindowClosingSupport, jssun.awt.WindowClosingListener, jssun.awt.ComponentFactory]);
38906 Clazz_makeConstructor (c$, 
38907 function () {
38908 Clazz_superConstructor (this, jssun.awt.SunToolkit, []);
38909 var eventQueue;
38910 eventQueue =  new java.awt.EventQueue ();
38911 var appContext = jssun.awt.AppContext.getAppContext ();
38912 if (appContext != null) {
38913 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38914 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38915 appContext.put ("PostEventQueue", postEventQueue);
38916 }});
38917 Clazz_defineMethod (c$, "useBufferPerWindow", 
38918 function () {
38919 return false;
38920 });
38921 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38922 function () {
38923 var threadGroup = Thread.currentThread ().getThreadGroup ();
38924 return jssun.awt.SunToolkit.createNewAppContext (threadGroup);
38925 });
38926 c$.createNewAppContext = Clazz_defineMethod (c$, "createNewAppContext", 
38927 function (threadGroup) {
38928 var eventQueue;
38929 var eqName = System.getProperty ("AWT.EventQueueClass", "java.awt.EventQueue");
38930 try {
38931 eventQueue = Clazz._4Name (eqName).newInstance ();
38932 } catch (e) {
38933 if (Clazz_exceptionOf (e, Exception)) {
38934 System.err.println ("Failed loading " + eqName + ": " + e);
38935 eventQueue =  new java.awt.EventQueue ();
38936 } else {
38937 throw e;
38938 }
38939 }
38940 var appContext =  new jssun.awt.AppContext (threadGroup);
38941 appContext.put (jssun.awt.AppContext.EVENT_QUEUE_KEY, eventQueue);
38942 var postEventQueue =  new jssun.awt.PostEventQueue (eventQueue);
38943 appContext.put ("PostEventQueue", postEventQueue);
38944 return appContext;
38945 }, "ThreadGroup");
38946 c$.wakeupEventQueue = Clazz_defineMethod (c$, "wakeupEventQueue", 
38947 function (q, isShutdown) {
38948 q.wakeup (isShutdown);
38949 }, "java.awt.EventQueue,~B");
38950 c$.targetToPeer = Clazz_defineMethod (c$, "targetToPeer", 
38951 function (target) {
38952 if (target != null) {
38953 return jssun.awt.AWTAutoShutdown.getInstance ().getPeer (target);
38954 }return null;
38955 }, "~O");
38956 c$.targetCreatedPeer = Clazz_defineMethod (c$, "targetCreatedPeer", 
38957 function (target, peer) {
38958 if (target != null && peer != null) {
38959 jssun.awt.AWTAutoShutdown.getInstance ().registerPeer (target, peer);
38960 }}, "~O,~O");
38961 c$.targetDisposedPeer = Clazz_defineMethod (c$, "targetDisposedPeer", 
38962 function (target, peer) {
38963 if (target != null && peer != null) {
38964 jssun.awt.AWTAutoShutdown.getInstance ().unregisterPeer (target, peer);
38965 }}, "~O,~O");
38966 c$.setAppContext = Clazz_defineMethod (c$, "setAppContext", 
38967  function (target, context) {
38968 if (Clazz_instanceOf (target, java.awt.Component)) {
38969 jssun.awt.AWTAccessor.getComponentAccessor ().setAppContext (target, context);
38970 } else {
38971 return false;
38972 }return true;
38973 }, "~O,jssun.awt.AppContext");
38974 c$.getAppContext = Clazz_defineMethod (c$, "getAppContext", 
38975  function (target) {
38976 if (Clazz_instanceOf (target, java.awt.Component)) {
38977 {
38978 return target.appContext;
38979 }} else {
38980 return null;
38981 }}, "~O");
38982 c$.targetToAppContext = Clazz_defineMethod (c$, "targetToAppContext", 
38983 function (target) {
38984 if (target == null) {
38985 return null;
38986 }var context = jssun.awt.SunToolkit.getAppContext (target);
38987 if (context == null) {
38988 context = jssun.awt.SunToolkit.appContextMap.get (target);
38989 }return context;
38990 }, "~O");
38991 c$.setLWRequestStatus = Clazz_defineMethod (c$, "setLWRequestStatus", 
38992 function (changed, status) {
38993 jssun.awt.AWTAccessor.getWindowAccessor ().setLWRequestStatus (changed, status);
38994 }, "java.awt.Window,~B");
38995 c$.checkAndSetPolicy = Clazz_defineMethod (c$, "checkAndSetPolicy", 
38996 function (cont, isSwingCont) {
38997 }, "java.awt.Container,~B");
38998 c$.insertTargetMapping = Clazz_defineMethod (c$, "insertTargetMapping", 
38999 function (target, appContext) {
39000 if (!jssun.awt.SunToolkit.setAppContext (target, appContext)) {
39001 jssun.awt.SunToolkit.appContextMap.put (target, appContext);
39002 }}, "~O,jssun.awt.AppContext");
39003 c$.postEvent = Clazz_defineMethod (c$, "postEvent", 
39004 function (appContext, event) {
39005 if (event == null) {
39006 throw  new NullPointerException ();
39007 }var postEventQueue = appContext.get ("PostEventQueue");
39008 if (postEventQueue != null) {
39009 postEventQueue.postEvent (event);
39010 }}, "jssun.awt.AppContext,java.awt.AWTEvent");
39011 c$.postPriorityEvent = Clazz_defineMethod (c$, "postPriorityEvent", 
39012 function (e) {
39013 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);
39014 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (e.getSource ()), pe);
39015 }, "java.awt.AWTEvent");
39016 c$.flushPendingEvents = Clazz_defineMethod (c$, "flushPendingEvents", 
39017 function () {
39018 var appContext = jssun.awt.AppContext.getAppContext ();
39019 var postEventQueue = appContext.get ("PostEventQueue");
39020 if (postEventQueue != null) {
39021 postEventQueue.flush ();
39022 }});
39023 c$.isPostEventQueueEmpty = Clazz_defineMethod (c$, "isPostEventQueueEmpty", 
39024 function () {
39025 var appContext = jssun.awt.AppContext.getAppContext ();
39026 var postEventQueue = appContext.get ("PostEventQueue");
39027 return (postEventQueue == null || postEventQueue.noEvents ());
39028 });
39029 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39030 function (target, runnable) {
39031 jssun.awt.SunToolkit.executeOnEventHandlerThread ( new jssun.awt.PeerEvent (target, runnable, 1));
39032 }, "~O,Runnable");
39033 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39034 function (target, runnable, when) {
39035 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)));
39036 }, "~O,Runnable,~N");
39037 c$.executeOnEventHandlerThread = Clazz_defineMethod (c$, "executeOnEventHandlerThread", 
39038 function (peerEvent) {
39039 jssun.awt.SunToolkit.postEvent (jssun.awt.SunToolkit.targetToAppContext (peerEvent.getSource ()), peerEvent);
39040 }, "jssun.awt.PeerEvent");
39041 c$.invokeLaterOnAppContext = Clazz_defineMethod (c$, "invokeLaterOnAppContext", 
39042 function (appContext, dispatcher) {
39043 jssun.awt.SunToolkit.postEvent (appContext,  new jssun.awt.PeerEvent (java.awt.Toolkit.getDefaultToolkit (), dispatcher, 1));
39044 }, "jssun.awt.AppContext,Runnable");
39045 c$.isDispatchThreadForAppContext = Clazz_defineMethod (c$, "isDispatchThreadForAppContext", 
39046 function (target) {
39047 var appContext = jssun.awt.SunToolkit.targetToAppContext (target);
39048 var eq = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39049 var next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39050 while (next != null) {
39051 eq = next;
39052 next = jssun.awt.AWTAccessor.getEventQueueAccessor ().getNextQueue (eq);
39053 }
39054 return (Thread.currentThread () === jssun.awt.AWTAccessor.getEventQueueAccessor ().getDispatchThread (eq));
39055 }, "~O");
39056 Clazz_overrideMethod (c$, "getScreenSize", 
39057 function () {
39058 return  new java.awt.Dimension (this.getScreenWidth (), this.getScreenHeight ());
39059 });
39060 Clazz_overrideMethod (c$, "getFontMetrics", 
39061 function (font) {
39062 return jssun.font.FontDesignMetrics.getMetrics (font);
39063 }, "java.awt.Font");
39064 Clazz_overrideMethod (c$, "getFontList", 
39065 function () {
39066 var hardwiredFontList =  Clazz_newArray (-1, ["Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
39067 return hardwiredFontList;
39068 });
39069 Clazz_overrideMethod (c$, "createPanel", 
39070 function (target) {
39071 return this.createComponent (target);
39072 }, "java.awt.Panel");
39073 Clazz_defineMethod (c$, "disableBackgroundErase", 
39074 function (component) {
39075 this.disableBackgroundEraseImpl (component);
39076 }, "java.awt.Component");
39077 Clazz_defineMethod (c$, "disableBackgroundEraseImpl", 
39078  function (component) {
39079 jssun.awt.AWTAccessor.getComponentAccessor ().setBackgroundEraseDisabled (component, true);
39080 }, "java.awt.Component");
39081 c$.getSunAwtNoerasebackground = Clazz_defineMethod (c$, "getSunAwtNoerasebackground", 
39082 function () {
39083 return false;
39084 });
39085 c$.getSunAwtErasebackgroundonresize = Clazz_defineMethod (c$, "getSunAwtErasebackgroundonresize", 
39086 function () {
39087 return true;
39088 });
39089 Clazz_defineMethod (c$, "setOverrideRedirect", 
39090 function (target) {
39091 }, "java.awt.Window");
39092 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39093 function (tk, url) {
39094 var img = jssun.awt.SunToolkit.imgCache.get (url);
39095 if (img == null) {
39096 try {
39097 img = tk.createImage (url);
39098 jssun.awt.SunToolkit.imgCache.put (url, img);
39099 } catch (e) {
39100 if (Clazz_exceptionOf (e, Exception)) {
39101 } else {
39102 throw e;
39103 }
39104 }
39105 }return img;
39106 }, "java.awt.Toolkit,java.net.URL");
39107 c$.getImageFromHash = Clazz_defineMethod (c$, "getImageFromHash", 
39108 function (tk, filename) {
39109 var img = jssun.awt.SunToolkit.imgCache.get (filename);
39110 if (img == null) {
39111 try {
39112 tk.createImage (filename);
39113 jssun.awt.SunToolkit.imgCache.put (filename, img);
39114 } catch (e) {
39115 if (Clazz_exceptionOf (e, Exception)) {
39116 } else {
39117 throw e;
39118 }
39119 }
39120 }return img;
39121 }, "java.awt.Toolkit,~S");
39122 Clazz_defineMethod (c$, "getImage", 
39123 function (filename) {
39124 return jssun.awt.SunToolkit.getImageFromHash (this, filename);
39125 }, "~S");
39126 Clazz_defineMethod (c$, "getImage", 
39127 function (url) {
39128 return jssun.awt.SunToolkit.getImageFromHash (this, url);
39129 }, "java.net.URL");
39130 Clazz_overrideMethod (c$, "checkImage", 
39131 function (img, w, h, o) {
39132 return 0;
39133 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39134 Clazz_overrideMethod (c$, "prepareImage", 
39135 function (img, w, h, o) {
39136 if (w == 0 || h == 0) {
39137 return true;
39138 }return true;
39139 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
39140 Clazz_overrideMethod (c$, "getSystemEventQueueImpl", 
39141 function () {
39142 return jssun.awt.SunToolkit.getSystemEventQueueImplPP ();
39143 });
39144 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39145 function () {
39146 return jssun.awt.SunToolkit.getSystemEventQueueImplPP (jssun.awt.AppContext.getAppContext ());
39147 });
39148 c$.getSystemEventQueueImplPP = Clazz_defineMethod (c$, "getSystemEventQueueImplPP", 
39149 function (appContext) {
39150 var theEventQueue = appContext.get (jssun.awt.AppContext.EVENT_QUEUE_KEY);
39151 return theEventQueue;
39152 }, "jssun.awt.AppContext");
39153 c$.getNativeContainer = Clazz_defineMethod (c$, "getNativeContainer", 
39154 function (c) {
39155 return java.awt.Toolkit.getNativeContainer (c);
39156 }, "java.awt.Component");
39157 Clazz_defineMethod (c$, "enableInputMethodsForTextComponent", 
39158 function () {
39159 return false;
39160 });
39161 c$.getStartupLocale = Clazz_defineMethod (c$, "getStartupLocale", 
39162 function () {
39163 if (jssun.awt.SunToolkit.startupLocale == null) {
39164 {
39165 }}return jssun.awt.SunToolkit.startupLocale;
39166 });
39167 Clazz_defineMethod (c$, "getDefaultKeyboardLocale", 
39168 function () {
39169 return jssun.awt.SunToolkit.getStartupLocale ();
39170 });
39171 c$.setDataTransfererClassName = Clazz_defineMethod (c$, "setDataTransfererClassName", 
39172 function (className) {
39173 jssun.awt.SunToolkit.dataTransfererClassName = className;
39174 }, "~S");
39175 c$.getDataTransfererClassName = Clazz_defineMethod (c$, "getDataTransfererClassName", 
39176 function () {
39177 if (jssun.awt.SunToolkit.dataTransfererClassName == null) {
39178 java.awt.Toolkit.getDefaultToolkit ();
39179 }return jssun.awt.SunToolkit.dataTransfererClassName;
39180 });
39181 Clazz_overrideMethod (c$, "getWindowClosingListener", 
39182 function () {
39183 return this.windowClosingListener;
39184 });
39185 Clazz_overrideMethod (c$, "setWindowClosingListener", 
39186 function (wcl) {
39187 this.windowClosingListener = wcl;
39188 }, "jssun.awt.WindowClosingListener");
39189 Clazz_defineMethod (c$, "windowClosingNotify", 
39190 function (event) {
39191 if (this.windowClosingListener != null) {
39192 return this.windowClosingListener.windowClosingNotify (event);
39193 } else {
39194 return null;
39195 }}, "java.awt.event.WindowEvent");
39196 Clazz_defineMethod (c$, "windowClosingDelivered", 
39197 function (event) {
39198 if (this.windowClosingListener != null) {
39199 return this.windowClosingListener.windowClosingDelivered (event);
39200 } else {
39201 return null;
39202 }}, "java.awt.event.WindowEvent");
39203 c$.isModalExcluded = Clazz_defineMethod (c$, "isModalExcluded", 
39204 function (window) {
39205 return true;
39206 }, "java.awt.Window");
39207 c$.isLightweightOrUnknown = Clazz_defineMethod (c$, "isLightweightOrUnknown", 
39208 function (comp) {
39209 if (comp.isLightweight () || !(Clazz_instanceOf (java.awt.Toolkit.getDefaultToolkit (), jssun.awt.SunToolkit))) {
39210 return true;
39211 }return !(Clazz_instanceOf (comp, java.awt.Panel) || Clazz_instanceOf (comp, java.awt.Window));
39212 }, "java.awt.Component");
39213 Clazz_defineMethod (c$, "getDesktopAAHints", 
39214 function () {
39215 return null;
39216 });
39217 c$.getContainingWindow = Clazz_defineMethod (c$, "getContainingWindow", 
39218 function (comp) {
39219 while (comp != null && !(Clazz_instanceOf (comp, java.awt.Window))) {
39220 comp = comp.getParent ();
39221 }
39222 return comp;
39223 }, "java.awt.Component");
39224 Clazz_defineMethod (c$, "isNativeGTKAvailable", 
39225 function () {
39226 return false;
39227 });
39228 Clazz_defineMethod (c$, "isWindowOpacitySupported", 
39229 function () {
39230 return false;
39231 });
39232 Clazz_defineMethod (c$, "isWindowShapingSupported", 
39233 function () {
39234 return false;
39235 });
39236 Clazz_defineMethod (c$, "isWindowTranslucencySupported", 
39237 function () {
39238 return false;
39239 });
39240 Clazz_defineMethod (c$, "isTranslucencyCapable", 
39241 function (gc) {
39242 return false;
39243 }, "java.awt.GraphicsConfiguration");
39244 Clazz_defineMethod (c$, "needUpdateWindow", 
39245 function () {
39246 return false;
39247 });
39248 c$.$SunToolkit$1$ = function () {
39249 Clazz_pu$h(self.c$);
39250 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$1", null, Runnable);
39251 Clazz_overrideMethod (c$, "run", 
39252 function () {
39253 jssun.awt.AWTAccessor.getAWTEventAccessor ().setPosted (this.f$.e);
39254 (this.f$.e.getSource ()).dispatchEvent (this.f$.e);
39255 });
39256 c$ = Clazz_p0p ();
39257 };
39258 c$.$SunToolkit$2$ = function () {
39259 Clazz_pu$h(self.c$);
39260 c$ = Clazz_declareAnonymous (jssun.awt, "SunToolkit$2", jssun.awt.PeerEvent);
39261 Clazz_overrideMethod (c$, "getWhen", 
39262 function () {
39263 return this.f$.when;
39264 });
39265 c$ = Clazz_p0p ();
39266 };
39267 Clazz_defineStatics (c$,
39268 "GRAB_EVENT_MASK", 0x80000000,
39269 "POST_EVENT_QUEUE_KEY", "PostEventQueue");
39270 c$.appContextMap = c$.prototype.appContextMap =  new java.util.HashMap ();
39271 c$.imgCache = c$.prototype.imgCache =  new java.util.HashMap ();
39272 Clazz_defineStatics (c$,
39273 "startupLocale", null,
39274 "dataTransfererClassName", null,
39275 "DESKTOPFONTHINTS", "awt.font.desktophints");
39276 });
39277 Clazz_declarePackage ("java.awt");
39278 Clazz_declareInterface (java.awt, "Conditional");
39279 Clazz_declarePackage ("java.awt.event");
39280 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.PaintEvent", null, function () {
39281 c$ = Clazz_decorateAsClass (function () {
39282 this.updateRect = null;
39283 Clazz_instantialize (this, arguments);
39284 }, java.awt.event, "PaintEvent", java.awt.event.ComponentEvent);
39285 Clazz_makeConstructor (c$, 
39286 function (source, id, updateRect) {
39287 Clazz_superConstructor (this, java.awt.event.PaintEvent, [source, id]);
39288 this.updateRect = updateRect;
39289 }, "java.awt.Component,~N,java.awt.Rectangle");
39290 Clazz_defineMethod (c$, "getUpdateRect", 
39291 function () {
39292 return this.updateRect;
39293 });
39294 Clazz_defineMethod (c$, "setUpdateRect", 
39295 function (updateRect) {
39296 this.updateRect = updateRect;
39297 }, "java.awt.Rectangle");
39298 Clazz_overrideMethod (c$, "paramString", 
39299 function () {
39300 var typeStr;
39301 switch (this.id) {
39302 case 800:
39303 typeStr = "PAINT";
39304 break;
39305 case 801:
39306 typeStr = "UPDATE";
39307 break;
39308 default:
39309 typeStr = "unknown type";
39310 }
39311 return typeStr + ",updateRect=" + (this.updateRect != null ? this.updateRect.toString () : "null");
39312 });
39313 Clazz_defineStatics (c$,
39314 "PAINT_FIRST", 800,
39315 "PAINT_LAST", 801,
39316 "PAINT", 800,
39317 "UPDATE", 801);
39318 });
39319 Clazz_declarePackage ("java.awt");
39320 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 () {
39321 c$ = Clazz_decorateAsClass (function () {
39322 this.theQueue = null;
39323 this.eventFilters = null;
39324 this.modalFiltersCount = 0;
39325 this.filter = null;
39326 this.cond = null;
39327 this.id = 0;
39328 this.doDispatch = true;
39329 if (!Clazz_isClassDefined ("java.awt.EventDispatchThread.StopDispatchEvent")) {
39330 java.awt.EventDispatchThread.$EventDispatchThread$StopDispatchEvent$ ();
39331 }
39332 Clazz_instantialize (this, arguments);
39333 }, java.awt, "EventDispatchThread", swingjs.JSThread);
39334 Clazz_prepareFields (c$, function () {
39335 this.eventFilters =  new java.util.Vector ();
39336 });
39337 Clazz_makeConstructor (c$, 
39338 function (group, name, queue) {
39339 Clazz_superConstructor (this, java.awt.EventDispatchThread, [group, name]);
39340 this.theQueue = queue;
39341 }, "ThreadGroup,~S,java.awt.EventQueue");
39342 Clazz_defineMethod (c$, "stopDispatchingImpl", 
39343 function (wait) {
39344 var stopEvent = Clazz_innerTypeInstance (java.awt.EventDispatchThread.StopDispatchEvent, this, null);
39345 if (Thread.currentThread () !== this) {
39346 this.theQueue.postEventPrivate (stopEvent);
39347 if (wait) {
39348 try {
39349 this.join ();
39350 } catch (e) {
39351 if (Clazz_exceptionOf (e, InterruptedException)) {
39352 } else {
39353 throw e;
39354 }
39355 }
39356 }} else {
39357 stopEvent.dispatch ();
39358 }{
39359 if (this.theQueue.getDispatchThread () === this) {
39360 this.theQueue.detachDispatchThread ();
39361 }}}, "~B");
39362 Clazz_defineMethod (c$, "stopDispatching", 
39363 function () {
39364 this.stopDispatchingImpl (true);
39365 });
39366 Clazz_defineMethod (c$, "stopDispatchingLater", 
39367 function () {
39368 this.stopDispatchingImpl (false);
39369 });
39370 Clazz_overrideMethod (c$, "run", 
39371 function () {
39372 this.pumpEvents (-1, null);
39373 });
39374 Clazz_defineMethod (c$, "pumpEvents", 
39375 function (id, cond) {
39376 this.pumpEventsForHierarchy (id, cond, null);
39377 }, "~N,java.awt.Conditional");
39378 Clazz_defineMethod (c$, "pumpEventsForHierarchy", 
39379 function (id, cond, modalComponent) {
39380 this.pumpEventsForFilter (id, cond,  new java.awt.EventDispatchThread.HierarchyEventFilter (modalComponent));
39381 }, "~N,java.awt.Conditional,java.awt.Component");
39382 Clazz_defineMethod (c$, "pumpEventsForFilter", 
39383 function (id, cond, filter) {
39384 this.filter = filter;
39385 this.cond = cond;
39386 this.id = id;
39387 this.run1 (0);
39388 }, "~N,java.awt.Conditional,java.awt.EventFilter");
39389 Clazz_overrideMethod (c$, "run1", 
39390 function (mode) {
39391 try {
39392 while (true) switch (mode) {
39393 case 0:
39394 this.addEventFilter (this.filter);
39395 mode = 1;
39396 case 1:
39397 if (!this.doDispatch || this.cond != null && !this.cond.evaluate () || this.isInterrupted ()) {
39398 this.doDispatch = false;
39399 return;
39400 }var myid = this.id;
39401 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)));
39402 this.dispatchAndReturn (r, mode);
39403 if (this.isJS) return;
39404 break;
39405 case 2:
39406 this.doDispatch = false;
39407 return;
39408 }
39409
39410 } finally {
39411 if (!this.doDispatch) this.finish ();
39412 }
39413 }, "~N");
39414 Clazz_defineMethod (c$, "dispatchAndReturn", 
39415 function (r, mode) {
39416 var f = null;
39417 var me = this;
39418 {
39419 f = function() {r.run();me.run1(mode)
39420 };
39421 }swingjs.JSToolkit.setTimeout (f, 0, 0);
39422 }, "Runnable,~N");
39423 Clazz_defineMethod (c$, "finish", 
39424  function () {
39425 this.doDispatch = false;
39426 this.removeEventFilter (this.filter);
39427 {
39428 if (this.theQueue.getDispatchThread () === this) {
39429 this.theQueue.detachDispatchThread ();
39430 }if (this.theQueue.peekEvent () != null || !jssun.awt.SunToolkit.isPostEventQueueEmpty ()) {
39431 this.theQueue.initDispatchThread ();
39432 }jssun.awt.AWTAutoShutdown.getInstance ().notifyThreadFree (this);
39433 }});
39434 Clazz_defineMethod (c$, "addEventFilter", 
39435 function (filter) {
39436 {
39437 if (!this.eventFilters.contains (filter)) {
39438 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39439 var newFilter = filter;
39440 var k = 0;
39441 for (k = 0; k < this.eventFilters.size (); k++) {
39442 var f = this.eventFilters.get (k);
39443 if (Clazz_instanceOf (f, java.awt.ModalEventFilter)) {
39444 var cf = f;
39445 if (cf.compareTo (newFilter) > 0) {
39446 break;
39447 }}}
39448 this.eventFilters.add (k, filter);
39449 this.modalFiltersCount++;
39450 } else {
39451 this.eventFilters.add (filter);
39452 }}}}, "java.awt.EventFilter");
39453 Clazz_defineMethod (c$, "removeEventFilter", 
39454 function (filter) {
39455 {
39456 if (this.eventFilters.contains (filter)) {
39457 if (Clazz_instanceOf (filter, java.awt.ModalEventFilter)) {
39458 this.modalFiltersCount--;
39459 }this.eventFilters.remove (filter);
39460 }}}, "java.awt.EventFilter");
39461 Clazz_defineMethod (c$, "pumpOneEventForFilters", 
39462 function (id) {
39463 try {
39464 var event;
39465 var eventOK;
39466 do {
39467 event = (id == -1) ? this.theQueue.getNextEvent () : this.theQueue.getNextEventForID (id);
39468 if (event == null) return (this.doDispatch = false);
39469 eventOK = true;
39470 {
39471 for (var i = this.eventFilters.size () - 1; i >= 0; i--) {
39472 var f = this.eventFilters.get (i);
39473 var accept = f.acceptEvent (event);
39474 if (accept === java.awt.EventFilter.FilterAction.REJECT) {
39475 eventOK = false;
39476 break;
39477 } else if (accept === java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY) {
39478 break;
39479 }}
39480 }if (!eventOK) {
39481 event.consume ();
39482 }} while (eventOK == false);
39483 this.theQueue.dispatchEvent (event);
39484 return this.doDispatch = true;
39485 } catch (e$$) {
39486 if (Clazz_exceptionOf (e$$, ThreadDeath)) {
39487 var death = e$$;
39488 {
39489 return this.doDispatch = false;
39490 }
39491 } else if (Clazz_exceptionOf (e$$, InterruptedException)) {
39492 var interruptedException = e$$;
39493 {
39494 return this.doDispatch = false;
39495 }
39496 } else {
39497 var e = e$$;
39498 {
39499 this.processException (e, this.modalFiltersCount > 0);
39500 }
39501 }
39502 }
39503 return this.doDispatch = true;
39504 }, "~N");
39505 Clazz_defineMethod (c$, "processException", 
39506  function (e, isModal) {
39507 if (!this.handleException (e)) {
39508 if (isModal) {
39509 System.err.println ("Exception occurred during event dispatching:");
39510 e.printStackTrace ();
39511 } else if (Clazz_instanceOf (e, RuntimeException)) {
39512 throw e;
39513 } else if (Clazz_instanceOf (e, Error)) {
39514 throw e;
39515 }}}, "Throwable,~B");
39516 Clazz_defineMethod (c$, "handleException", 
39517  function (thrown) {
39518 return false;
39519 }, "Throwable");
39520 Clazz_defineMethod (c$, "isDispatching", 
39521 function (eq) {
39522 return this.theQueue.equals (eq);
39523 }, "java.awt.EventQueue");
39524 Clazz_defineMethod (c$, "getEventQueue", 
39525 function () {
39526 return this.theQueue;
39527 });
39528 c$.$EventDispatchThread$StopDispatchEvent$ = function () {
39529 Clazz_pu$h(self.c$);
39530 c$ = Clazz_decorateAsClass (function () {
39531 Clazz_prepareCallback (this, arguments);
39532 Clazz_instantialize (this, arguments);
39533 }, java.awt.EventDispatchThread, "StopDispatchEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39534 Clazz_makeConstructor (c$, 
39535 function () {
39536 Clazz_superConstructor (this, java.awt.EventDispatchThread.StopDispatchEvent, [this.b$["java.awt.EventDispatchThread"], 0]);
39537 });
39538 Clazz_overrideMethod (c$, "dispatch", 
39539 function () {
39540 this.b$["java.awt.EventDispatchThread"].doDispatch = false;
39541 });
39542 c$ = Clazz_p0p ();
39543 };
39544 c$.$EventDispatchThread$1$ = function () {
39545 Clazz_pu$h(self.c$);
39546 c$ = Clazz_declareAnonymous (java.awt, "EventDispatchThread$1", null, Runnable);
39547 Clazz_overrideMethod (c$, "run", 
39548 function () {
39549 this.b$["java.awt.EventDispatchThread"].pumpOneEventForFilters (this.f$.myid);
39550 });
39551 c$ = Clazz_p0p ();
39552 };
39553 Clazz_pu$h(self.c$);
39554 c$ = Clazz_decorateAsClass (function () {
39555 this.modalComponent = null;
39556 Clazz_instantialize (this, arguments);
39557 }, java.awt.EventDispatchThread, "HierarchyEventFilter", null, java.awt.EventFilter);
39558 Clazz_makeConstructor (c$, 
39559 function (a) {
39560 this.modalComponent = a;
39561 }, "java.awt.Component");
39562 Clazz_overrideMethod (c$, "acceptEvent", 
39563 function (a) {
39564 if (this.modalComponent != null) {
39565 var b = a.getID ();
39566 var c = (b >= 500) && (b <= 507);
39567 var d = (b >= 1001) && (b <= 1001);
39568 var e = (b == 201);
39569 if (java.awt.Component.isInstanceOf (this.modalComponent, "javax.swing.JInternalFrame")) {
39570 return e ? java.awt.EventFilter.FilterAction.REJECT : java.awt.EventFilter.FilterAction.ACCEPT;
39571 }if (c || d || e) {
39572 var f = a.getSource ();
39573 if (Clazz_instanceOf (f, jssun.awt.ModalExclude)) {
39574 return java.awt.EventFilter.FilterAction.ACCEPT;
39575 } else if (Clazz_instanceOf (f, java.awt.Component)) {
39576 var g = f;
39577 var h = false;
39578 if (Clazz_instanceOf (this.modalComponent, java.awt.Container)) {
39579 while (g !== this.modalComponent && g != null) {
39580 if ((Clazz_instanceOf (g, java.awt.Window)) && (jssun.awt.SunToolkit.isModalExcluded (g))) {
39581 h = true;
39582 break;
39583 }g = g.getParent ();
39584 }
39585 }if (!h && (g !== this.modalComponent)) {
39586 return java.awt.EventFilter.FilterAction.REJECT;
39587 }}}}return java.awt.EventFilter.FilterAction.ACCEPT;
39588 }, "java.awt.AWTEvent");
39589 c$ = Clazz_p0p ();
39590 Clazz_defineStatics (c$,
39591 "ANY_EVENT", -1);
39592 });
39593 Clazz_declarePackage ("java.awt");
39594 Clazz_load (["java.lang.Enum"], "java.awt.EventFilter", null, function () {
39595 Clazz_declareInterface (java.awt, "EventFilter");
39596 Clazz_pu$h(self.c$);
39597 c$ = Clazz_declareType (java.awt.EventFilter, "FilterAction", Enum);
39598 Clazz_defineEnumConstant (c$, "ACCEPT", 0, []);
39599 Clazz_defineEnumConstant (c$, "REJECT", 1, []);
39600 Clazz_defineEnumConstant (c$, "ACCEPT_IMMEDIATELY", 2, []);
39601 c$ = Clazz_p0p ();
39602 });
39603 Clazz_declarePackage ("java.awt");
39604 Clazz_load (["java.awt.EventFilter"], "java.awt.ModalEventFilter", ["java.awt.Component", "$.Dialog", "$.Window", "jssun.awt.ModalExclude"], function () {
39605 c$ = Clazz_decorateAsClass (function () {
39606 this.modalDialog = null;
39607 this.disabled = false;
39608 Clazz_instantialize (this, arguments);
39609 }, java.awt, "ModalEventFilter", null, java.awt.EventFilter);
39610 Clazz_makeConstructor (c$, 
39611 function (modalDialog) {
39612 this.modalDialog = modalDialog;
39613 this.disabled = false;
39614 }, "java.awt.Dialog");
39615 Clazz_defineMethod (c$, "getModalDialog", 
39616 function () {
39617 return this.modalDialog;
39618 });
39619 Clazz_overrideMethod (c$, "acceptEvent", 
39620 function (event) {
39621 if (this.disabled || !this.modalDialog.isVisible ()) {
39622 return java.awt.EventFilter.FilterAction.ACCEPT;
39623 }var eventID = event.getID ();
39624 if ((eventID >= 500 && eventID <= 507) || (eventID >= 1001 && eventID <= 1001) || eventID == 201) {
39625 var o = event.getSource ();
39626 if (Clazz_instanceOf (o, jssun.awt.ModalExclude)) {
39627 } else if (Clazz_instanceOf (o, java.awt.Component)) {
39628 var c = o;
39629 while ((c != null) && !(Clazz_instanceOf (c, java.awt.Window))) {
39630 c = c.getParent_NoClientCode ();
39631 }
39632 if (c != null) {
39633 return this.acceptWindow (c);
39634 }}}return java.awt.EventFilter.FilterAction.ACCEPT;
39635 }, "java.awt.AWTEvent");
39636 Clazz_defineMethod (c$, "disable", 
39637 function () {
39638 this.disabled = true;
39639 });
39640 Clazz_defineMethod (c$, "compareTo", 
39641 function (another) {
39642 var anotherDialog = another.getModalDialog ();
39643 var c = this.modalDialog;
39644 while (c != null) {
39645 if (c === anotherDialog) {
39646 return 1;
39647 }c = c.getParent_NoClientCode ();
39648 }
39649 c = anotherDialog;
39650 while (c != null) {
39651 if (c === this.modalDialog) {
39652 return -1;
39653 }c = c.getParent_NoClientCode ();
39654 }
39655 var blocker = this.modalDialog.getModalBlocker ();
39656 while (blocker != null) {
39657 if (blocker === anotherDialog) {
39658 return -1;
39659 }blocker = blocker.getModalBlocker ();
39660 }
39661 blocker = anotherDialog.getModalBlocker ();
39662 while (blocker != null) {
39663 if (blocker === this.modalDialog) {
39664 return 1;
39665 }blocker = blocker.getModalBlocker ();
39666 }
39667 return this.modalDialog.getModalityType ().compareTo (anotherDialog.getModalityType ());
39668 }, "java.awt.ModalEventFilter");
39669 c$.createFilterForDialog = Clazz_defineMethod (c$, "createFilterForDialog", 
39670 function (modalDialog) {
39671 switch (modalDialog.getModalityType ()) {
39672 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
39673 return  new java.awt.ModalEventFilter.DocumentModalEventFilter (modalDialog);
39674 case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
39675 return  new java.awt.ModalEventFilter.ApplicationModalEventFilter (modalDialog);
39676 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
39677 return  new java.awt.ModalEventFilter.ToolkitModalEventFilter (modalDialog);
39678 }
39679 return null;
39680 }, "java.awt.Dialog");
39681 Clazz_pu$h(self.c$);
39682 c$ = Clazz_decorateAsClass (function () {
39683 this.appContext = null;
39684 Clazz_instantialize (this, arguments);
39685 }, java.awt.ModalEventFilter, "ToolkitModalEventFilter", java.awt.ModalEventFilter);
39686 Clazz_makeConstructor (c$, 
39687 function (a) {
39688 Clazz_superConstructor (this, java.awt.ModalEventFilter.ToolkitModalEventFilter, [a]);
39689 this.appContext = a.appContext;
39690 }, "java.awt.Dialog");
39691 Clazz_overrideMethod (c$, "acceptWindow", 
39692 function (a) {
39693 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE)) {
39694 return java.awt.EventFilter.FilterAction.ACCEPT;
39695 }if (a.appContext !== this.appContext) {
39696 return java.awt.EventFilter.FilterAction.REJECT;
39697 }while (a != null) {
39698 if (a === this.modalDialog) {
39699 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39700 }a = a.getOwner ();
39701 }
39702 return java.awt.EventFilter.FilterAction.REJECT;
39703 }, "java.awt.Window");
39704 c$ = Clazz_p0p ();
39705 Clazz_pu$h(self.c$);
39706 c$ = Clazz_decorateAsClass (function () {
39707 this.appContext = null;
39708 Clazz_instantialize (this, arguments);
39709 }, java.awt.ModalEventFilter, "ApplicationModalEventFilter", java.awt.ModalEventFilter);
39710 Clazz_makeConstructor (c$, 
39711 function (a) {
39712 Clazz_superConstructor (this, java.awt.ModalEventFilter.ApplicationModalEventFilter, [a]);
39713 this.appContext = a.appContext;
39714 }, "java.awt.Dialog");
39715 Clazz_overrideMethod (c$, "acceptWindow", 
39716 function (a) {
39717 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39718 return java.awt.EventFilter.FilterAction.ACCEPT;
39719 }if (a.appContext === this.appContext) {
39720 while (a != null) {
39721 if (a === this.modalDialog) {
39722 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39723 }a = a.getOwner ();
39724 }
39725 return java.awt.EventFilter.FilterAction.REJECT;
39726 }return java.awt.EventFilter.FilterAction.ACCEPT;
39727 }, "java.awt.Window");
39728 c$ = Clazz_p0p ();
39729 Clazz_pu$h(self.c$);
39730 c$ = Clazz_decorateAsClass (function () {
39731 this.documentRoot = null;
39732 Clazz_instantialize (this, arguments);
39733 }, java.awt.ModalEventFilter, "DocumentModalEventFilter", java.awt.ModalEventFilter);
39734 Clazz_makeConstructor (c$, 
39735 function (a) {
39736 Clazz_superConstructor (this, java.awt.ModalEventFilter.DocumentModalEventFilter, [a]);
39737 this.documentRoot = a.getDocumentRoot ();
39738 }, "java.awt.Dialog");
39739 Clazz_overrideMethod (c$, "acceptWindow", 
39740 function (a) {
39741 if (a.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
39742 var b = this.modalDialog.getOwner ();
39743 while (b != null) {
39744 if (b === a) {
39745 return java.awt.EventFilter.FilterAction.REJECT;
39746 }b = b.getOwner ();
39747 }
39748 return java.awt.EventFilter.FilterAction.ACCEPT;
39749 }while (a != null) {
39750 if (a === this.modalDialog) {
39751 return java.awt.EventFilter.FilterAction.ACCEPT_IMMEDIATELY;
39752 }if (a === this.documentRoot) {
39753 return java.awt.EventFilter.FilterAction.REJECT;
39754 }a = a.getOwner ();
39755 }
39756 return java.awt.EventFilter.FilterAction.ACCEPT;
39757 }, "java.awt.Window");
39758 c$ = Clazz_p0p ();
39759 });
39760 Clazz_declarePackage ("java.awt.peer");
39761 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.CanvasPeer", null, function () {
39762 Clazz_declareInterface (java.awt.peer, "CanvasPeer", java.awt.peer.ComponentPeer);
39763 });
39764 Clazz_declarePackage ("java.awt.peer");
39765 c$ = Clazz_declareInterface (java.awt.peer, "ComponentPeer");
39766 Clazz_defineStatics (c$,
39767 "SET_LOCATION", 1,
39768 "SET_SIZE", 2,
39769 "SET_BOUNDS", 3,
39770 "SET_CLIENT_SIZE", 4,
39771 "RESET_OPERATION", 5,
39772 "NO_EMBEDDED_CHECK", (16384),
39773 "DEFAULT_OPERATION", 3);
39774 Clazz_declarePackage ("java.awt.peer");
39775 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.ContainerPeer", null, function () {
39776 Clazz_declareInterface (java.awt.peer, "ContainerPeer", java.awt.peer.ComponentPeer);
39777 });
39778 Clazz_declarePackage ("java.awt.peer");
39779 Clazz_load (["java.awt.peer.WindowPeer"], "java.awt.peer.FramePeer", null, function () {
39780 Clazz_declareInterface (java.awt.peer, "FramePeer", java.awt.peer.WindowPeer);
39781 });
39782 Clazz_declarePackage ("java.awt.peer");
39783 Clazz_load (["java.awt.peer.ComponentPeer"], "java.awt.peer.LightweightPeer", null, function () {
39784 Clazz_declareInterface (java.awt.peer, "LightweightPeer", java.awt.peer.ComponentPeer);
39785 });
39786 Clazz_declarePackage ("java.awt.peer");
39787 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.PanelPeer", null, function () {
39788 Clazz_declareInterface (java.awt.peer, "PanelPeer", java.awt.peer.ContainerPeer);
39789 });
39790 Clazz_declarePackage ("java.awt.peer");
39791 Clazz_load (["java.awt.peer.ContainerPeer"], "java.awt.peer.WindowPeer", null, function () {
39792 Clazz_declareInterface (java.awt.peer, "WindowPeer", java.awt.peer.ContainerPeer);
39793 });
39794 Clazz_declarePackage ("java.awt");
39795 Clazz_load (["java.awt.AWTEvent", "$.ActiveEvent"], "java.awt.SentEvent", ["java.awt.Toolkit", "jssun.awt.SunToolkit"], function () {
39796 c$ = Clazz_decorateAsClass (function () {
39797 this.$dispatched = false;
39798 this.nested = null;
39799 this.toNotify = null;
39800 Clazz_instantialize (this, arguments);
39801 }, java.awt, "SentEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39802 Clazz_makeConstructor (c$, 
39803 function () {
39804 this.construct (null);
39805 });
39806 Clazz_makeConstructor (c$, 
39807 function (nested) {
39808 this.construct (nested, null);
39809 }, "java.awt.AWTEvent");
39810 Clazz_makeConstructor (c$, 
39811 function (nested, toNotify) {
39812 Clazz_superConstructor (this, java.awt.SentEvent, [(nested != null) ? nested.getSource () : java.awt.Toolkit.getDefaultToolkit (), 1007]);
39813 this.nested = nested;
39814 this.toNotify = toNotify;
39815 }, "java.awt.AWTEvent,jssun.awt.AppContext");
39816 Clazz_overrideMethod (c$, "dispatch", 
39817 function () {
39818 try {
39819 if (this.nested != null) {
39820 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39821 }} finally {
39822 this.$dispatched = true;
39823 if (this.toNotify != null) {
39824 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39825 }{
39826 this.notifyAll ();
39827 }}
39828 });
39829 Clazz_defineMethod (c$, "dispose", 
39830 function () {
39831 this.$dispatched = true;
39832 if (this.toNotify != null) {
39833 jssun.awt.SunToolkit.postEvent (this.toNotify,  new java.awt.SentEvent ());
39834 }{
39835 this.notifyAll ();
39836 }});
39837 Clazz_defineStatics (c$,
39838 "ID", 1007);
39839 });
39840 Clazz_declarePackage ("java.awt");
39841 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 () {
39842 c$ = Clazz_decorateAsClass (function () {
39843 this.nested = null;
39844 this.appContext = null;
39845 this.disposed = false;
39846 Clazz_instantialize (this, arguments);
39847 }, java.awt, "SequencedEvent", java.awt.AWTEvent, java.awt.ActiveEvent);
39848 Clazz_makeConstructor (c$, 
39849 function (nested) {
39850 Clazz_superConstructor (this, java.awt.SequencedEvent, [nested.getSource (), 1006]);
39851 this.nested = nested;
39852 {
39853 java.awt.SequencedEvent.list.add (this);
39854 }}, "java.awt.AWTEvent");
39855 Clazz_overrideMethod (c$, "dispatch", 
39856 function () {
39857 try {
39858 this.appContext = jssun.awt.AppContext.getAppContext ();
39859 if (java.awt.SequencedEvent.getFirst () !== this) {
39860 if (java.awt.EventQueue.isDispatchThread ()) {
39861 var edt = Thread.currentThread ();
39862 edt.pumpEvents (1007, ((Clazz_isClassDefined ("java.awt.SequencedEvent$1") ? 0 : java.awt.SequencedEvent.$SequencedEvent$1$ ()), Clazz_innerTypeInstance (java.awt.SequencedEvent$1, this, null)));
39863 } else {
39864 while (!this.isFirstOrDisposed ()) {
39865 {
39866 try {
39867 swingjs.JSToolkit.warn ("Cannot wait in SequenceEvent");
39868 java.awt.SequencedEvent.wait (1000);
39869 } catch (e) {
39870 if (Clazz_exceptionOf (e, InterruptedException)) {
39871 break;
39872 } else {
39873 throw e;
39874 }
39875 }
39876 }}
39877 }}if (!this.disposed) {
39878 java.awt.Toolkit.getEventQueue ().dispatchEvent (this.nested);
39879 }} finally {
39880 this.dispose ();
39881 }
39882 });
39883 c$.isOwnerAppContextDisposed = Clazz_defineMethod (c$, "isOwnerAppContextDisposed", 
39884  function (se) {
39885 if (se != null) {
39886 var target = se.nested.getSource ();
39887 if (Clazz_instanceOf (target, java.awt.Component)) {
39888 return (target).appContext.isDisposed ();
39889 }}return false;
39890 }, "java.awt.SequencedEvent");
39891 Clazz_defineMethod (c$, "isFirstOrDisposed", 
39892 function () {
39893 if (this.disposed) {
39894 return true;
39895 }return this === java.awt.SequencedEvent.getFirstWithContext () || this.disposed;
39896 });
39897 c$.getFirst = Clazz_defineMethod (c$, "getFirst", 
39898  function () {
39899 return java.awt.SequencedEvent.list.getFirst ();
39900 });
39901 c$.getFirstWithContext = Clazz_defineMethod (c$, "getFirstWithContext", 
39902  function () {
39903 var first = java.awt.SequencedEvent.getFirst ();
39904 while (java.awt.SequencedEvent.isOwnerAppContextDisposed (first)) {
39905 first.dispose ();
39906 first = java.awt.SequencedEvent.getFirst ();
39907 }
39908 return first;
39909 });
39910 Clazz_defineMethod (c$, "dispose", 
39911 function () {
39912 {
39913 if (this.disposed) {
39914 return;
39915 }this.disposed = true;
39916 }if (this.appContext != null) {
39917 jssun.awt.SunToolkit.postEvent (this.appContext,  new java.awt.SentEvent ());
39918 }var next = null;
39919 {
39920 java.awt.SequencedEvent.notifyAll ();
39921 if (java.awt.SequencedEvent.list.getFirst () === this) {
39922 java.awt.SequencedEvent.list.removeFirst ();
39923 if (!java.awt.SequencedEvent.list.isEmpty ()) {
39924 next = java.awt.SequencedEvent.list.getFirst ();
39925 }} else {
39926 java.awt.SequencedEvent.list.remove (this);
39927 }}if (next != null && next.appContext != null) {
39928 jssun.awt.SunToolkit.postEvent (next.appContext,  new java.awt.SentEvent ());
39929 }});
39930 c$.$SequencedEvent$1$ = function () {
39931 Clazz_pu$h(self.c$);
39932 c$ = Clazz_declareAnonymous (java.awt, "SequencedEvent$1", null, java.awt.Conditional);
39933 Clazz_overrideMethod (c$, "evaluate", 
39934 function () {
39935 return !this.b$["java.awt.SequencedEvent"].isFirstOrDisposed ();
39936 });
39937 c$ = Clazz_p0p ();
39938 };
39939 Clazz_defineStatics (c$,
39940 "ID", 1006);
39941 c$.list = c$.prototype.list =  new java.util.LinkedList ();
39942 });
39943 Clazz_load(["java.util.AbstractList"],"java.util.AbstractSequentialList",["java.lang.IndexOutOfBoundsException"],function(){
39944 c$=Clazz_declareType(java.util,"AbstractSequentialList",java.util.AbstractList);
39945 Clazz_defineMethod(c$,"add",
39946 function(location,object){
39947 this.listIterator(location).add(object);
39948 },"~N,~O");
39949 Clazz_defineMethod(c$,"addAll",
39950 function(location,collection){
39951 var it=this.listIterator(location);
39952 var colIt=collection.iterator();
39953 var next=it.nextIndex();
39954 while(colIt.hasNext()){
39955 it.add(colIt.next());
39956 it.previous();
39957 }
39958 return next!=it.nextIndex();
39959 },"~N,java.util.Collection");
39960 Clazz_overrideMethod(c$,"get",
39961 function(location){
39962 try{
39963 return this.listIterator(location).next();
39964 }catch(e){
39965 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
39966 throw new IndexOutOfBoundsException();
39967 }else{
39968 throw e;
39969 }
39970 }
39971 },"~N");
39972 Clazz_overrideMethod(c$,"iterator",
39973 function(){
39974 return this.listIterator(0);
39975 });
39976 Clazz_defineMethod(c$,"remove",
39977 function(location){
39978 try{
39979 var it=this.listIterator(location);
39980 var result=it.next();
39981 it.remove();
39982 return result;
39983 }catch(e){
39984 if(Clazz_instanceOf(e,java.util.NoSuchElementException)){
39985 throw new IndexOutOfBoundsException();
39986 }else{
39987 throw e;
39988 }
39989 }
39990 },"~N");
39991 Clazz_overrideMethod(c$,"set",
39992 function(location,object){
39993 var it=this.listIterator(location);
39994 var result=it.next();
39995 it.set(object);
39996 return result;
39997 },"~N,~O");
39998 });
39999 Clazz_load(["java.util.AbstractSequentialList","$.List","$.ListIterator","$.Queue"],"java.util.LinkedList",["java.lang.IllegalStateException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.ConcurrentModificationException","$.NoSuchElementException"],function(){
40000 c$=Clazz_decorateAsClass(function(){
40001 this.$size=0;
40002 this.voidLink=null;
40003 Clazz_instantialize(this,arguments);
40004 },java.util,"LinkedList",java.util.AbstractSequentialList,[java.util.List,java.util.Queue,Cloneable,java.io.Serializable]);
40005 Clazz_makeConstructor(c$,
40006 function(){
40007 Clazz_superConstructor(this,java.util.LinkedList,[]);
40008 this.voidLink=new java.util.LinkedList.Link(null,null,null);
40009 this.voidLink.previous=this.voidLink;
40010 this.voidLink.next=this.voidLink;
40011 });
40012 Clazz_makeConstructor(c$,
40013 function(collection){
40014 this.construct();
40015 this.addAll(collection);
40016 },"java.util.Collection");
40017 Clazz_defineMethod(c$,"add",
40018 function(location,object){
40019 if(0<=location&&location<=this.$size){
40020 var link=this.voidLink;
40021 if(location<(Math.floor(this.$size/2))){
40022 for(var i=0;i<=location;i++){
40023 link=link.next;
40024 }
40025 }else{
40026 for(var i=this.$size;i>location;i--){
40027 link=link.previous;
40028 }
40029 }var previous=link.previous;
40030 var newLink=new java.util.LinkedList.Link(object,previous,link);
40031 previous.next=newLink;
40032 link.previous=newLink;
40033 this.$size++;
40034 this.modCount++;
40035 }else{
40036 throw new IndexOutOfBoundsException();
40037 }},"~N,~O");
40038 Clazz_defineMethod(c$,"add",
40039 function(object){
40040 var oldLast=this.voidLink.previous;
40041 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40042 this.voidLink.previous=newLink;
40043 oldLast.next=newLink;
40044 this.$size++;
40045 this.modCount++;
40046 return true;
40047 },"~O");
40048 Clazz_defineMethod(c$,"addAll",
40049 function(location,collection){
40050 if(location<0||location>this.$size){
40051 throw new IndexOutOfBoundsException();
40052 }var adding=collection.size();
40053 if(adding==0){
40054 return false;
40055 }var previous=this.voidLink;
40056 if(location<(Math.floor(this.$size/2))){
40057 for(var i=0;i<location;i++){
40058 previous=previous.next;
40059 }
40060 }else{
40061 for(var i=this.$size;i>=location;i--){
40062 previous=previous.previous;
40063 }
40064 }var next=previous.next;
40065 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40066 var newLink=new java.util.LinkedList.Link(e,previous,null);
40067 previous.next=newLink;
40068 previous=newLink;
40069 }
40070 previous.next=next;
40071 next.previous=previous;
40072 this.$size+=adding;
40073 this.modCount++;
40074 return true;
40075 },"~N,java.util.Collection");
40076 Clazz_defineMethod(c$,"addAll",
40077 function(collection){
40078 var adding=collection.size();
40079 if(adding==0){
40080 return false;
40081 }var previous=this.voidLink.previous;
40082 for(var e,$e=collection.iterator();$e.hasNext()&&((e=$e.next())||true);){
40083 var newLink=new java.util.LinkedList.Link(e,previous,null);
40084 previous.next=newLink;
40085 previous=newLink;
40086 }
40087 previous.next=this.voidLink;
40088 this.voidLink.previous=previous;
40089 this.$size+=adding;
40090 this.modCount++;
40091 return true;
40092 },"java.util.Collection");
40093 Clazz_defineMethod(c$,"addFirst",
40094 function(object){
40095 var oldFirst=this.voidLink.next;
40096 var newLink=new java.util.LinkedList.Link(object,this.voidLink,oldFirst);
40097 this.voidLink.next=newLink;
40098 oldFirst.previous=newLink;
40099 this.$size++;
40100 this.modCount++;
40101 },"~O");
40102 Clazz_defineMethod(c$,"addLast",
40103 function(object){
40104 var oldLast=this.voidLink.previous;
40105 var newLink=new java.util.LinkedList.Link(object,oldLast,this.voidLink);
40106 this.voidLink.previous=newLink;
40107 oldLast.next=newLink;
40108 this.$size++;
40109 this.modCount++;
40110 },"~O");
40111 Clazz_overrideMethod(c$,"clear",
40112 function(){
40113 if(this.$size>0){
40114 this.$size=0;
40115 this.voidLink.next=this.voidLink;
40116 this.voidLink.previous=this.voidLink;
40117 this.modCount++;
40118 }});
40119 Clazz_overrideMethod(c$,"clone",
40120 function(){
40121 return new java.util.LinkedList(this);
40122 });
40123 Clazz_overrideMethod(c$,"contains",
40124 function(object){
40125 var link=this.voidLink.next;
40126 if(object!=null){
40127 while(link!==this.voidLink){
40128 if(object.equals(link.data)){
40129 return true;
40130 }link=link.next;
40131 }
40132 }else{
40133 while(link!==this.voidLink){
40134 if(link.data==null){
40135 return true;
40136 }link=link.next;
40137 }
40138 }return false;
40139 },"~O");
40140 Clazz_overrideMethod(c$,"get",
40141 function(location){
40142 if(0<=location&&location<this.$size){
40143 var link=this.voidLink;
40144 if(location<(Math.floor(this.$size/2))){
40145 for(var i=0;i<=location;i++){
40146 link=link.next;
40147 }
40148 }else{
40149 for(var i=this.$size;i>location;i--){
40150 link=link.previous;
40151 }
40152 }return link.data;
40153 }throw new IndexOutOfBoundsException();
40154 },"~N");
40155 Clazz_defineMethod(c$,"getFirst",
40156 function(){
40157 var first=this.voidLink.next;
40158 if(first!==this.voidLink){
40159 return first.data;
40160 }throw new java.util.NoSuchElementException();
40161 });
40162 Clazz_defineMethod(c$,"getLast",
40163 function(){
40164 var last=this.voidLink.previous;
40165 if(last!==this.voidLink){
40166 return last.data;
40167 }throw new java.util.NoSuchElementException();
40168 });
40169 Clazz_overrideMethod(c$,"indexOf",
40170 function(object){
40171 var pos=0;
40172 var link=this.voidLink.next;
40173 if(object!=null){
40174 while(link!==this.voidLink){
40175 if(object.equals(link.data)){
40176 return pos;
40177 }link=link.next;
40178 pos++;
40179 }
40180 }else{
40181 while(link!==this.voidLink){
40182 if(link.data==null){
40183 return pos;
40184 }link=link.next;
40185 pos++;
40186 }
40187 }return-1;
40188 },"~O");
40189 Clazz_overrideMethod(c$,"lastIndexOf",
40190 function(object){
40191 var pos=this.$size;
40192 var link=this.voidLink.previous;
40193 if(object!=null){
40194 while(link!==this.voidLink){
40195 pos--;
40196 if(object.equals(link.data)){
40197 return pos;
40198 }link=link.previous;
40199 }
40200 }else{
40201 while(link!==this.voidLink){
40202 pos--;
40203 if(link.data==null){
40204 return pos;
40205 }link=link.previous;
40206 }
40207 }return-1;
40208 },"~O");
40209 Clazz_defineMethod(c$,"listIterator",
40210 function(location){
40211 return new java.util.LinkedList.LinkIterator(this,location);
40212 },"~N");
40213 Clazz_defineMethod(c$,"remove",
40214 function(location){
40215 if(0<=location&&location<this.$size){
40216 var link=this.voidLink;
40217 if(location<(Math.floor(this.$size/2))){
40218 for(var i=0;i<=location;i++){
40219 link=link.next;
40220 }
40221 }else{
40222 for(var i=this.$size;i>location;i--){
40223 link=link.previous;
40224 }
40225 }var previous=link.previous;
40226 var next=link.next;
40227 previous.next=next;
40228 next.previous=previous;
40229 this.$size--;
40230 this.modCount++;
40231 return link.data;
40232 }throw new IndexOutOfBoundsException();
40233 },"~N");
40234 Clazz_defineMethod(c$,"remove",
40235 function(object){
40236 var link=this.voidLink.next;
40237 if(object!=null){
40238 while(link!==this.voidLink&&!object.equals(link.data)){
40239 link=link.next;
40240 }
40241 }else{
40242 while(link!==this.voidLink&&link.data!=null){
40243 link=link.next;
40244 }
40245 }if(link===this.voidLink){
40246 return false;
40247 }var next=link.next;
40248 var previous=link.previous;
40249 previous.next=next;
40250 next.previous=previous;
40251 this.$size--;
40252 this.modCount++;
40253 return true;
40254 },"~O");
40255 Clazz_defineMethod(c$,"removeFirst",
40256 function(){
40257 var first=this.voidLink.next;
40258 if(first!==this.voidLink){
40259 var next=first.next;
40260 this.voidLink.next=next;
40261 next.previous=this.voidLink;
40262 this.$size--;
40263 this.modCount++;
40264 return first.data;
40265 }throw new java.util.NoSuchElementException();
40266 });
40267 Clazz_defineMethod(c$,"removeLast",
40268 function(){
40269 var last=this.voidLink.previous;
40270 if(last!==this.voidLink){
40271 var previous=last.previous;
40272 this.voidLink.previous=previous;
40273 previous.next=this.voidLink;
40274 this.$size--;
40275 this.modCount++;
40276 return last.data;
40277 }throw new java.util.NoSuchElementException();
40278 });
40279 Clazz_overrideMethod(c$,"set",
40280 function(location,object){
40281 if(0<=location&&location<this.$size){
40282 var link=this.voidLink;
40283 if(location<(Math.floor(this.$size/2))){
40284 for(var i=0;i<=location;i++){
40285 link=link.next;
40286 }
40287 }else{
40288 for(var i=this.$size;i>location;i--){
40289 link=link.previous;
40290 }
40291 }var result=link.data;
40292 link.data=object;
40293 return result;
40294 }throw new IndexOutOfBoundsException();
40295 },"~N,~O");
40296 Clazz_overrideMethod(c$,"size",
40297 function(){
40298 return this.$size;
40299 });
40300 Clazz_overrideMethod(c$,"offer",
40301 function(o){
40302 this.add(o);
40303 return true;
40304 },"~O");
40305 Clazz_overrideMethod(c$,"poll",
40306 function(){
40307 return this.$size==0?null:this.removeFirst();
40308 });
40309 Clazz_defineMethod(c$,"remove",
40310 function(){
40311 return this.removeFirst();
40312 });
40313 Clazz_overrideMethod(c$,"peek",
40314 function(){
40315 var first=this.voidLink.next;
40316 return first===this.voidLink?null:first.data;
40317 });
40318 Clazz_overrideMethod(c$,"element",
40319 function(){
40320 return this.getFirst();
40321 });
40322 Clazz_defineMethod(c$,"toArray",
40323 function(){
40324 var index=0;
40325 var contents=new Array(this.$size);
40326 var link=this.voidLink.next;
40327 while(link!==this.voidLink){
40328 contents[index++]=link.data;
40329 link=link.next;
40330 }
40331 return contents;
40332 });
40333 Clazz_defineMethod(c$,"toArray",
40334 function(contents){
40335 var index=0;
40336 if(this.$size>contents.length){
40337 var ct=contents.getClass().getComponentType();
40338 contents=java.lang.reflect.Array.newInstance(ct,this.$size);
40339 }var link=this.voidLink.next;
40340 while(link!==this.voidLink){
40341 contents[index++]=link.data;
40342 link=link.next;
40343 }
40344 if(index<contents.length){
40345 contents[index]=null;
40346 }return contents;
40347 },"~A");
40348 Clazz_pu$h(self.c$);
40349 c$=Clazz_decorateAsClass(function(){
40350 this.data=null;
40351 this.previous=null;
40352 this.next=null;
40353 Clazz_instantialize(this,arguments);
40354 },java.util.LinkedList,"Link");
40355 Clazz_makeConstructor(c$,
40356 function(a,b,c){
40357 this.data=a;
40358 this.previous=b;
40359 this.next=c;
40360 },"~O,java.util.LinkedList.Link,java.util.LinkedList.Link");
40361 c$=Clazz_p0p();
40362 Clazz_pu$h(self.c$);
40363 c$=Clazz_decorateAsClass(function(){
40364 this.pos=0;
40365 this.expectedModCount=0;
40366 this.list=null;
40367 this.link=null;
40368 this.lastLink=null;
40369 Clazz_instantialize(this,arguments);
40370 },java.util.LinkedList,"LinkIterator",null,java.util.ListIterator);
40371 Clazz_makeConstructor(c$,
40372 function(a,b){
40373 this.list=a;
40374 this.expectedModCount=this.list.modCount;
40375 if(0<=b&&b<=this.list.$size){
40376 this.link=this.list.voidLink;
40377 if(b<Math.floor(this.list.$size/2)){
40378 for(this.pos=-1;this.pos+1<b;this.pos++){
40379 this.link=this.link.next;
40380 }
40381 }else{
40382 for(this.pos=this.list.$size;this.pos>=b;this.pos--){
40383 this.link=this.link.previous;
40384 }
40385 }}else{
40386 throw new IndexOutOfBoundsException();
40387 }},"java.util.LinkedList,~N");
40388 Clazz_overrideMethod(c$,"add",
40389 function(a){
40390 if(this.expectedModCount==this.list.modCount){
40391 var b=this.link.next;
40392 var c=new java.util.LinkedList.Link(a,this.link,b);
40393 this.link.next=c;
40394 b.previous=c;
40395 this.link=c;
40396 this.lastLink=null;
40397 this.pos++;
40398 this.expectedModCount++;
40399 this.list.$size++;
40400 this.list.modCount++;
40401 }else{
40402 throw new java.util.ConcurrentModificationException();
40403 }},"~O");
40404 Clazz_overrideMethod(c$,"hasNext",
40405 function(){
40406 return this.link.next!==this.list.voidLink;
40407 });
40408 Clazz_overrideMethod(c$,"hasPrevious",
40409 function(){
40410 return this.link!==this.list.voidLink;
40411 });
40412 Clazz_overrideMethod(c$,"next",
40413 function(){
40414 if(this.expectedModCount==this.list.modCount){
40415 var a=this.link.next;
40416 if(a!==this.list.voidLink){
40417 this.lastLink=this.link=a;
40418 this.pos++;
40419 return this.link.data;
40420 }throw new java.util.NoSuchElementException();
40421 }throw new java.util.ConcurrentModificationException();
40422 });
40423 Clazz_overrideMethod(c$,"nextIndex",
40424 function(){
40425 return this.pos+1;
40426 });
40427 Clazz_overrideMethod(c$,"previous",
40428 function(){
40429 if(this.expectedModCount==this.list.modCount){
40430 if(this.link!==this.list.voidLink){
40431 this.lastLink=this.link;
40432 this.link=this.link.previous;
40433 this.pos--;
40434 return this.lastLink.data;
40435 }throw new java.util.NoSuchElementException();
40436 }throw new java.util.ConcurrentModificationException();
40437 });
40438 Clazz_overrideMethod(c$,"previousIndex",
40439 function(){
40440 return this.pos;
40441 });
40442 Clazz_overrideMethod(c$,"remove",
40443 function(){
40444 if(this.expectedModCount==this.list.modCount){
40445 if(this.lastLink!=null){
40446 var a=this.lastLink.next;
40447 var b=this.lastLink.previous;
40448 a.previous=b;
40449 b.next=a;
40450 if(this.lastLink===this.link){
40451 this.pos--;
40452 }this.link=b;
40453 this.lastLink=null;
40454 this.expectedModCount++;
40455 this.list.$size--;
40456 this.list.modCount++;
40457 }else{
40458 throw new IllegalStateException();
40459 }}else{
40460 throw new java.util.ConcurrentModificationException();
40461 }});
40462 Clazz_overrideMethod(c$,"set",
40463 function(a){
40464 if(this.expectedModCount==this.list.modCount){
40465 if(this.lastLink!=null){
40466 this.lastLink.data=a;
40467 }else{
40468 throw new IllegalStateException();
40469 }}else{
40470 throw new java.util.ConcurrentModificationException();
40471 }},"~O");
40472 c$=Clazz_p0p();
40473 });
40474 Clazz_declarePackage ("JU");
40475 Clazz_load (["JU.T3"], "JU.V3", null, function () {
40476 c$ = Clazz_declareType (JU, "V3", JU.T3);
40477 Clazz_makeConstructor (c$, 
40478 function () {
40479 });
40480 c$.newV = Clazz_defineMethod (c$, "newV", 
40481 function (t) {
40482 return JU.V3.new3 (t.x, t.y, t.z);
40483 }, "JU.T3");
40484 c$.newVsub = Clazz_defineMethod (c$, "newVsub", 
40485 function (t1, t2) {
40486 return JU.V3.new3 (t1.x - t2.x, t1.y - t2.y, t1.z - t2.z);
40487 }, "JU.T3,JU.T3");
40488 c$.new3 = Clazz_defineMethod (c$, "new3", 
40489 function (x, y, z) {
40490 var v =  new JU.V3 ();
40491 v.x = x;
40492 v.y = y;
40493 v.z = z;
40494 return v;
40495 }, "~N,~N,~N");
40496 Clazz_defineMethod (c$, "angle", 
40497 function (v1) {
40498 var xx = this.y * v1.z - this.z * v1.y;
40499 var yy = this.z * v1.x - this.x * v1.z;
40500 var zz = this.x * v1.y - this.y * v1.x;
40501 var cross = Math.sqrt (xx * xx + yy * yy + zz * zz);
40502 return Math.abs (Math.atan2 (cross, this.dot (v1)));
40503 }, "JU.V3");
40504 });
40505 Clazz_declarePackage ("javax.swing");
40506 Clazz_load (["java.util.Vector"], "javax.swing.ButtonGroup", null, function () {
40507 c$ = Clazz_decorateAsClass (function () {
40508 this.buttons = null;
40509 this.selection = null;
40510 Clazz_instantialize (this, arguments);
40511 }, javax.swing, "ButtonGroup");
40512 Clazz_prepareFields (c$, function () {
40513 this.buttons =  new java.util.Vector ();
40514 });
40515 Clazz_makeConstructor (c$, 
40516 function () {
40517 });
40518 Clazz_defineMethod (c$, "add", 
40519 function (b) {
40520 if (b == null) {
40521 return;
40522 }this.buttons.addElement (b);
40523 if (b.isSelected ()) {
40524 if (this.selection == null) {
40525 this.selection = b.getModel ();
40526 } else {
40527 b.setSelected (false);
40528 }}b.getModel ().setGroup (this);
40529 }, "javax.swing.AbstractButton");
40530 Clazz_defineMethod (c$, "remove", 
40531 function (b) {
40532 if (b == null) {
40533 return;
40534 }this.buttons.removeElement (b);
40535 if (b.getModel () === this.selection) {
40536 this.selection = null;
40537 }b.getModel ().setGroup (null);
40538 }, "javax.swing.AbstractButton");
40539 Clazz_defineMethod (c$, "clearSelection", 
40540 function () {
40541 if (this.selection != null) {
40542 var oldSelection = this.selection;
40543 this.selection = null;
40544 oldSelection.setSelected (false);
40545 }});
40546 Clazz_defineMethod (c$, "getElements", 
40547 function () {
40548 return this.buttons.elements ();
40549 });
40550 Clazz_defineMethod (c$, "getSelection", 
40551 function () {
40552 return this.selection;
40553 });
40554 Clazz_defineMethod (c$, "setSelected", 
40555 function (m, b) {
40556 if (b && m != null && m !== this.selection) {
40557 var oldSelection = this.selection;
40558 this.selection = m;
40559 if (oldSelection != null) {
40560 oldSelection.setSelected (false);
40561 }m.setSelected (true);
40562 }}, "javax.swing.ButtonModel,~B");
40563 Clazz_defineMethod (c$, "isSelected", 
40564 function (m) {
40565 return (m === this.selection);
40566 }, "javax.swing.ButtonModel");
40567 Clazz_defineMethod (c$, "getButtonCount", 
40568 function () {
40569 if (this.buttons == null) {
40570 return 0;
40571 } else {
40572 return this.buttons.size ();
40573 }});
40574 });
40575 Clazz_declarePackage ("javax.swing");
40576 Clazz_load (["jssun.awt.PaintEventDispatcher"], "javax.swing.SwingPaintEventDispatcher", ["javax.swing.RootPaneContainer", "jssun.awt.SunToolkit"], function () {
40577 c$ = Clazz_declareType (javax.swing, "SwingPaintEventDispatcher", jssun.awt.PaintEventDispatcher);
40578 Clazz_overrideMethod (c$, "shouldDoNativeBackgroundErase", 
40579 function (c) {
40580 return javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND || !(Clazz_instanceOf (c, javax.swing.RootPaneContainer));
40581 }, "java.awt.Component");
40582 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40583 function (c, r) {
40584 if (Clazz_instanceOf (c, javax.swing.RootPaneContainer)) {
40585 var appContext = jssun.awt.SunToolkit.targetToAppContext (c);
40586 return true;
40587 }return Clazz_superCall (this, javax.swing.SwingPaintEventDispatcher, "queueSurfaceDataReplacing", [c, r]);
40588 }, "java.awt.Component,Runnable");
40589 Clazz_defineStatics (c$,
40590 "SHOW_FROM_DOUBLE_BUFFER", false,
40591 "ERASE_BACKGROUND", false);
40592 {
40593 javax.swing.SwingPaintEventDispatcher.SHOW_FROM_DOUBLE_BUFFER = false;
40594 javax.swing.SwingPaintEventDispatcher.ERASE_BACKGROUND = true;
40595 }});
40596 Clazz_declarePackage ("jssun.awt");
40597 Clazz_load (["java.util.HashSet", "$.IdentityHashMap"], "jssun.awt.AWTAutoShutdown", ["java.awt.AWTEvent"], function () {
40598 c$ = Clazz_decorateAsClass (function () {
40599 this.busyThreadSet = null;
40600 this.toolkitThreadBusy = false;
40601 this.peerMap = null;
40602 Clazz_instantialize (this, arguments);
40603 }, jssun.awt, "AWTAutoShutdown", null, Runnable);
40604 Clazz_prepareFields (c$, function () {
40605 this.busyThreadSet =  new java.util.HashSet (7);
40606 this.peerMap =  new java.util.IdentityHashMap ();
40607 });
40608 Clazz_makeConstructor (c$, 
40609  function () {
40610 });
40611 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
40612 function () {
40613 return (jssun.awt.AWTAutoShutdown.theInstance == null ? (jssun.awt.AWTAutoShutdown.theInstance =  new jssun.awt.AWTAutoShutdown ()) : jssun.awt.AWTAutoShutdown.theInstance);
40614 });
40615 c$.notifyToolkitThreadBusy = Clazz_defineMethod (c$, "notifyToolkitThreadBusy", 
40616 function () {
40617 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (true);
40618 });
40619 c$.notifyToolkitThreadFree = Clazz_defineMethod (c$, "notifyToolkitThreadFree", 
40620 function () {
40621 jssun.awt.AWTAutoShutdown.getInstance ().setToolkitBusy (false);
40622 });
40623 Clazz_defineMethod (c$, "notifyThreadBusy", 
40624 function (thread) {
40625 this.busyThreadSet.add (thread);
40626 }, "Thread");
40627 Clazz_defineMethod (c$, "notifyThreadFree", 
40628 function (thread) {
40629 this.busyThreadSet.remove (thread);
40630 }, "Thread");
40631 Clazz_defineMethod (c$, "notifyPeerMapUpdated", 
40632 function () {
40633 if (!this.isReadyToShutdown ()) {
40634 this.activateBlockerThread ();
40635 }});
40636 Clazz_defineMethod (c$, "isReadyToShutdown", 
40637  function () {
40638 return (!this.toolkitThreadBusy && this.peerMap.isEmpty () && this.busyThreadSet.isEmpty ());
40639 });
40640 Clazz_defineMethod (c$, "setToolkitBusy", 
40641  function (busy) {
40642 if (busy != this.toolkitThreadBusy) {
40643 if (busy != this.toolkitThreadBusy) {
40644 if (busy) {
40645 this.toolkitThreadBusy = busy;
40646 } else {
40647 this.toolkitThreadBusy = busy;
40648 }}}}, "~B");
40649 Clazz_overrideMethod (c$, "run", 
40650 function () {
40651 });
40652 c$.getShutdownEvent = Clazz_defineMethod (c$, "getShutdownEvent", 
40653 function () {
40654 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));
40655 });
40656 Clazz_defineMethod (c$, "activateBlockerThread", 
40657  function () {
40658 });
40659 Clazz_defineMethod (c$, "registerPeer", 
40660 function (target, peer) {
40661 this.peerMap.put (target, peer);
40662 this.notifyPeerMapUpdated ();
40663 }, "~O,~O");
40664 Clazz_defineMethod (c$, "unregisterPeer", 
40665 function (target, peer) {
40666 if (this.peerMap.get (target) === peer) {
40667 this.peerMap.remove (target);
40668 }}, "~O,~O");
40669 Clazz_defineMethod (c$, "getPeer", 
40670 function (target) {
40671 return this.peerMap.get (target);
40672 }, "~O");
40673 Clazz_defineMethod (c$, "dumpPeers", 
40674 function (aLog) {
40675 aLog.fine ("Mapped peers:");
40676 for (var key, $key = this.peerMap.keySet ().iterator (); $key.hasNext () && ((key = $key.next ()) || true);) {
40677 aLog.fine (key + "->" + this.peerMap.get (key));
40678 }
40679 }, "java.util.logging.Logger");
40680 c$.$AWTAutoShutdown$1$ = function () {
40681 Clazz_pu$h(self.c$);
40682 c$ = Clazz_declareAnonymous (jssun.awt, "AWTAutoShutdown$1", java.awt.AWTEvent);
40683 c$ = Clazz_p0p ();
40684 };
40685 Clazz_defineStatics (c$,
40686 "theInstance", null);
40687 });
40688 Clazz_declarePackage ("jssun.awt");
40689 c$ = Clazz_decorateAsClass (function () {
40690 this.event = null;
40691 this.next = null;
40692 Clazz_instantialize (this, arguments);
40693 }, jssun.awt, "EventQueueItem");
40694 Clazz_makeConstructor (c$, 
40695 function (evt) {
40696 this.event = evt;
40697 }, "java.awt.AWTEvent");
40698 Clazz_declarePackage ("jssun.awt");
40699 Clazz_declareInterface (jssun.awt, "ModalExclude");
40700 Clazz_declarePackage ("jssun.awt");
40701 Clazz_load (["java.awt.peer.CanvasPeer", "$.LightweightPeer", "$.PanelPeer"], "jssun.awt.NullComponentPeer", ["java.lang.IllegalStateException", "$.UnsupportedOperationException", "java.awt.Dimension", "$.Insets", "$.Point", "$.Rectangle"], function () {
40702 c$ = Clazz_declareType (jssun.awt, "NullComponentPeer", null, [java.awt.peer.LightweightPeer, java.awt.peer.CanvasPeer, java.awt.peer.PanelPeer]);
40703 Clazz_overrideMethod (c$, "isObscured", 
40704 function () {
40705 return false;
40706 });
40707 Clazz_overrideMethod (c$, "canDetermineObscurity", 
40708 function () {
40709 return false;
40710 });
40711 Clazz_overrideMethod (c$, "isFocusable", 
40712 function () {
40713 return false;
40714 });
40715 Clazz_overrideMethod (c$, "setVisible", 
40716 function (b) {
40717 }, "~B");
40718 Clazz_defineMethod (c$, "show", 
40719 function () {
40720 });
40721 Clazz_defineMethod (c$, "hide", 
40722 function () {
40723 });
40724 Clazz_overrideMethod (c$, "setEnabled", 
40725 function (b) {
40726 }, "~B");
40727 Clazz_defineMethod (c$, "enable", 
40728 function () {
40729 });
40730 Clazz_defineMethod (c$, "disable", 
40731 function () {
40732 });
40733 Clazz_overrideMethod (c$, "paint", 
40734 function (g) {
40735 }, "java.awt.Graphics");
40736 Clazz_overrideMethod (c$, "repaint", 
40737 function (tm, x, y, width, height) {
40738 }, "~N,~N,~N,~N,~N");
40739 Clazz_overrideMethod (c$, "print", 
40740 function (g) {
40741 }, "java.awt.Graphics");
40742 Clazz_overrideMethod (c$, "setBounds", 
40743 function (x, y, width, height, op) {
40744 }, "~N,~N,~N,~N,~N");
40745 Clazz_defineMethod (c$, "reshape", 
40746 function (x, y, width, height) {
40747 }, "~N,~N,~N,~N");
40748 Clazz_overrideMethod (c$, "coalescePaintEvent", 
40749 function (e) {
40750 }, "java.awt.event.PaintEvent");
40751 Clazz_defineMethod (c$, "handleEvent", 
40752 function (e) {
40753 return false;
40754 }, "java.awt.Event");
40755 Clazz_defineMethod (c$, "handleEvent", 
40756 function (arg0) {
40757 }, "java.awt.AWTEvent");
40758 Clazz_overrideMethod (c$, "getPreferredSize", 
40759 function () {
40760 return  new java.awt.Dimension (1, 1);
40761 });
40762 Clazz_overrideMethod (c$, "getMinimumSize", 
40763 function () {
40764 return  new java.awt.Dimension (1, 1);
40765 });
40766 Clazz_overrideMethod (c$, "getToolkit", 
40767 function () {
40768 return null;
40769 });
40770 Clazz_overrideMethod (c$, "getColorModel", 
40771 function () {
40772 return null;
40773 });
40774 Clazz_overrideMethod (c$, "getGraphics", 
40775 function () {
40776 return null;
40777 });
40778 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
40779 function () {
40780 return null;
40781 });
40782 Clazz_overrideMethod (c$, "getFontMetrics", 
40783 function (font) {
40784 return null;
40785 }, "java.awt.Font");
40786 Clazz_overrideMethod (c$, "dispose", 
40787 function () {
40788 });
40789 Clazz_overrideMethod (c$, "setForeground", 
40790 function (c) {
40791 }, "java.awt.Color");
40792 Clazz_overrideMethod (c$, "setBackground", 
40793 function (c) {
40794 }, "java.awt.Color");
40795 Clazz_overrideMethod (c$, "setFont", 
40796 function (f) {
40797 }, "java.awt.Font");
40798 Clazz_overrideMethod (c$, "updateCursorImmediately", 
40799 function () {
40800 });
40801 Clazz_defineMethod (c$, "setCursor", 
40802 function (cursor) {
40803 }, "java.awt.Cursor");
40804 Clazz_overrideMethod (c$, "requestFocus", 
40805 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
40806 return false;
40807 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
40808 Clazz_defineMethod (c$, "createImage", 
40809 function (producer) {
40810 return null;
40811 }, "java.awt.image.ImageProducer");
40812 Clazz_defineMethod (c$, "createImage", 
40813 function (width, height) {
40814 return null;
40815 }, "~N,~N");
40816 Clazz_overrideMethod (c$, "prepareImage", 
40817 function (img, w, h, o) {
40818 return false;
40819 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40820 Clazz_overrideMethod (c$, "checkImage", 
40821 function (img, w, h, o) {
40822 return 0;
40823 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
40824 Clazz_defineMethod (c$, "preferredSize", 
40825 function () {
40826 return this.getPreferredSize ();
40827 });
40828 Clazz_defineMethod (c$, "minimumSize", 
40829 function () {
40830 return this.getMinimumSize ();
40831 });
40832 Clazz_overrideMethod (c$, "getLocationOnScreen", 
40833 function () {
40834 return  new java.awt.Point (0, 0);
40835 });
40836 Clazz_overrideMethod (c$, "getInsets", 
40837 function () {
40838 return this.insets ();
40839 });
40840 Clazz_overrideMethod (c$, "beginValidate", 
40841 function () {
40842 });
40843 Clazz_overrideMethod (c$, "endValidate", 
40844 function () {
40845 });
40846 Clazz_defineMethod (c$, "insets", 
40847 function () {
40848 return  new java.awt.Insets (0, 0, 0, 0);
40849 });
40850 Clazz_defineMethod (c$, "isPaintPending", 
40851 function () {
40852 return false;
40853 });
40854 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
40855 function () {
40856 return false;
40857 });
40858 Clazz_overrideMethod (c$, "createVolatileImage", 
40859 function (width, height) {
40860 return null;
40861 }, "~N,~N");
40862 Clazz_overrideMethod (c$, "beginLayout", 
40863 function () {
40864 });
40865 Clazz_overrideMethod (c$, "endLayout", 
40866 function () {
40867 });
40868 Clazz_overrideMethod (c$, "getBackBuffer", 
40869 function () {
40870 throw  new IllegalStateException ("Page-flipping is not allowed on a lightweight component");
40871 });
40872 Clazz_overrideMethod (c$, "destroyBuffers", 
40873 function () {
40874 });
40875 Clazz_overrideMethod (c$, "isReparentSupported", 
40876 function () {
40877 return false;
40878 });
40879 Clazz_overrideMethod (c$, "reparent", 
40880 function (newNativeParent) {
40881 throw  new UnsupportedOperationException ();
40882 }, "java.awt.peer.ContainerPeer");
40883 Clazz_defineMethod (c$, "restack", 
40884 function () {
40885 throw  new UnsupportedOperationException ();
40886 });
40887 Clazz_defineMethod (c$, "isRestackSupported", 
40888 function () {
40889 return false;
40890 });
40891 Clazz_overrideMethod (c$, "layout", 
40892 function () {
40893 });
40894 Clazz_overrideMethod (c$, "getBounds", 
40895 function () {
40896 return  new java.awt.Rectangle (0, 0, 0, 0);
40897 });
40898 });
40899 Clazz_declarePackage ("jssun.awt");
40900 Clazz_load (null, "jssun.awt.PaintEventDispatcher", ["java.awt.Rectangle", "java.awt.event.PaintEvent"], function () {
40901 c$ = Clazz_declareType (jssun.awt, "PaintEventDispatcher");
40902 c$.setPaintEventDispatcher = Clazz_defineMethod (c$, "setPaintEventDispatcher", 
40903 function (dispatcher) {
40904 {
40905 jssun.awt.PaintEventDispatcher.dispatcher = dispatcher;
40906 }}, "jssun.awt.PaintEventDispatcher");
40907 c$.getPaintEventDispatcher = Clazz_defineMethod (c$, "getPaintEventDispatcher", 
40908 function () {
40909 {
40910 if (jssun.awt.PaintEventDispatcher.dispatcher == null) {
40911 jssun.awt.PaintEventDispatcher.dispatcher =  new jssun.awt.PaintEventDispatcher ();
40912 }return jssun.awt.PaintEventDispatcher.dispatcher;
40913 }});
40914 Clazz_defineMethod (c$, "createPaintEvent", 
40915 function (target, x, y, w, h) {
40916 return  new java.awt.event.PaintEvent (target, 800,  new java.awt.Rectangle (x, y, w, h));
40917 }, "java.awt.Component,~N,~N,~N,~N");
40918 Clazz_defineMethod (c$, "shouldDoNativeBackgroundErase", 
40919 function (c) {
40920 return true;
40921 }, "java.awt.Component");
40922 Clazz_defineMethod (c$, "queueSurfaceDataReplacing", 
40923 function (c, r) {
40924 return false;
40925 }, "java.awt.Component,Runnable");
40926 Clazz_defineStatics (c$,
40927 "dispatcher", null);
40928 });
40929 Clazz_declarePackage ("jssun.awt");
40930 Clazz_load (null, "jssun.awt.PostEventQueue", ["jssun.awt.EventQueueItem", "$.SunToolkit", "swingjs.JSToolkit"], function () {
40931 c$ = Clazz_decorateAsClass (function () {
40932 this.queueHead = null;
40933 this.queueTail = null;
40934 this.eventQueue = null;
40935 Clazz_instantialize (this, arguments);
40936 }, jssun.awt, "PostEventQueue");
40937 Clazz_makeConstructor (c$, 
40938 function (eq) {
40939 this.eventQueue = eq;
40940 }, "java.awt.EventQueue");
40941 Clazz_defineMethod (c$, "noEvents", 
40942 function () {
40943 return this.queueHead == null;
40944 });
40945 Clazz_defineMethod (c$, "flush", 
40946 function () {
40947 if (this.queueHead != null) {
40948 var tempQueue;
40949 {
40950 tempQueue = this.queueHead;
40951 this.queueHead = this.queueTail = null;
40952 while (tempQueue != null) {
40953 swingjs.JSToolkit.alert ("postevent IS NOT IMPLEMENTED " + tempQueue.event);
40954 this.eventQueue.postEvent (tempQueue.event);
40955 tempQueue = tempQueue.next;
40956 }
40957 }}});
40958 Clazz_defineMethod (c$, "postEvent", 
40959 function (event) {
40960 var item =  new jssun.awt.EventQueueItem (event);
40961 {
40962 if (this.queueHead == null) {
40963 this.queueHead = this.queueTail = item;
40964 } else {
40965 this.queueTail.next = item;
40966 this.queueTail = item;
40967 }}jssun.awt.SunToolkit.wakeupEventQueue (this.eventQueue, false);
40968 }, "java.awt.AWTEvent");
40969 });
40970 Clazz_declarePackage ("jssun.java2d");
40971 Clazz_load (["java.awt.Graphics2D"], "jssun.java2d.SunGraphics2D", ["java.awt.geom.AffineTransform"], function () {
40972 c$ = Clazz_decorateAsClass (function () {
40973 this.transformState = 0;
40974 this.foregroundColor = null;
40975 this.backgroundColor = null;
40976 this.$transform = null;
40977 this.transX = 0;
40978 this.transY = 0;
40979 this.hints = null;
40980 Clazz_instantialize (this, arguments);
40981 }, jssun.java2d, "SunGraphics2D", java.awt.Graphics2D);
40982 Clazz_defineMethod (c$, "clone", 
40983 function () {
40984 return this.clone0 ();
40985 });
40986 Clazz_defineMethod (c$, "clone0", 
40987 function () {
40988 try {
40989 var g;
40990 {
40991 g = Clazz_clone(this);
40992 }g.$transform =  new java.awt.geom.AffineTransform (this.$transform);
40993 if (this.hints != null) {
40994 g.hints = this.hints.clone ();
40995 }return g;
40996 } catch (e) {
40997 if (Clazz_exceptionOf (e, CloneNotSupportedException)) {
40998 } else {
40999 throw e;
41000 }
41001 }
41002 return null;
41003 });
41004 Clazz_defineMethod (c$, "create", 
41005 function () {
41006 return this.clone0 ();
41007 });
41008 Clazz_defineStatics (c$,
41009 "TRANSFORM_GENERIC", 4,
41010 "TRANSFORM_TRANSLATESCALE", 3,
41011 "TRANSFORM_ANY_TRANSLATE", 2,
41012 "TRANSFORM_INT_TRANSLATE", 1,
41013 "TRANSFORM_ISIDENT", 0);
41014 });
41015 Clazz_declarePackage ("javax.swing");
41016 Clazz_load (null, "javax.swing.UIManager", ["java.util.ArrayList", "java.util.Locale", "javax.swing.RepaintManager", "$.SwingPaintEventDispatcher", "$.SwingUtilities", "jssun.awt.PaintEventDispatcher", "swingjs.JSToolkit"], function () {
41017 c$ = Clazz_declareType (javax.swing, "UIManager");
41018 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
41019 function () {
41020 return javax.swing.UIManager.uid;
41021 });
41022 c$.getInstalledLookAndFeels = Clazz_defineMethod (c$, "getInstalledLookAndFeels", 
41023 function () {
41024 return javax.swing.UIManager.installedLAFs;
41025 });
41026 c$.setInstalledLookAndFeels = Clazz_defineMethod (c$, "setInstalledLookAndFeels", 
41027 function (infos) {
41028 swingjs.JSToolkit.notImplemented (null);
41029 }, "~A");
41030 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41031 function (info) {
41032 swingjs.JSToolkit.notImplemented (null);
41033 }, "javax.swing.UIManager.LookAndFeelInfo");
41034 c$.installLookAndFeel = Clazz_defineMethod (c$, "installLookAndFeel", 
41035 function (name, className) {
41036 swingjs.JSToolkit.notImplemented (null);
41037 }, "~S,~S");
41038 c$.getLookAndFeel = Clazz_defineMethod (c$, "getLookAndFeel", 
41039 function () {
41040 return (javax.swing.UIManager.laf == null ? (javax.swing.UIManager.laf = swingjs.JSToolkit.getInstance ("swingjs.plaf.HTML5LookAndFeel")) : javax.swing.UIManager.laf);
41041 });
41042 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41043 function (newLookAndFeel) {
41044 }, "javax.swing.LookAndFeel");
41045 c$.setLookAndFeel = Clazz_defineMethod (c$, "setLookAndFeel", 
41046 function (className) {
41047 var lnfClass = javax.swing.SwingUtilities.loadSystemClass (className);
41048 javax.swing.UIManager.setLookAndFeel ((lnfClass.newInstance ()));
41049 }, "~S");
41050 c$.getSystemLookAndFeelClassName = Clazz_defineMethod (c$, "getSystemLookAndFeelClassName", 
41051 function () {
41052 return javax.swing.UIManager.getCrossPlatformLookAndFeelClassName ();
41053 });
41054 c$.getCrossPlatformLookAndFeelClassName = Clazz_defineMethod (c$, "getCrossPlatformLookAndFeelClassName", 
41055 function () {
41056 return "swingjs.plaf.HTML5LookAndFeel";
41057 });
41058 c$.getDefaults = Clazz_defineMethod (c$, "getDefaults", 
41059 function () {
41060 javax.swing.UIManager.maybeInitialize ();
41061 return javax.swing.UIManager.uid;
41062 });
41063 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41064 function (key) {
41065 return javax.swing.UIManager.getDefaults ().getFont (key);
41066 }, "~O");
41067 c$.getFont = Clazz_defineMethod (c$, "getFont", 
41068 function (key, l) {
41069 return javax.swing.UIManager.getDefaults ().getFont (key, l);
41070 }, "~O,java.util.Locale");
41071 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41072 function (key) {
41073 return javax.swing.UIManager.getDefaults ().getColor (key);
41074 }, "~O");
41075 c$.getColor = Clazz_defineMethod (c$, "getColor", 
41076 function (key, l) {
41077 return javax.swing.UIManager.getDefaults ().getColor (key, l);
41078 }, "~O,java.util.Locale");
41079 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41080 function (key) {
41081 return javax.swing.UIManager.getDefaults ().getIcon (key);
41082 }, "~O");
41083 c$.getIcon = Clazz_defineMethod (c$, "getIcon", 
41084 function (key, l) {
41085 return javax.swing.UIManager.getDefaults ().getIcon (key, l);
41086 }, "~O,java.util.Locale");
41087 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41088 function (key) {
41089 return javax.swing.UIManager.getDefaults ().getBorder (key);
41090 }, "~O");
41091 c$.getBorder = Clazz_defineMethod (c$, "getBorder", 
41092 function (key, l) {
41093 return javax.swing.UIManager.getDefaults ().getBorder (key, l);
41094 }, "~O,java.util.Locale");
41095 c$.getString = Clazz_defineMethod (c$, "getString", 
41096 function (key) {
41097 return javax.swing.UIManager.getDefaults ().getString (key);
41098 }, "~O");
41099 c$.getString = Clazz_defineMethod (c$, "getString", 
41100 function (key, l) {
41101 return javax.swing.UIManager.getDefaults ().getString (key, l);
41102 }, "~O,java.util.Locale");
41103 c$.getString = Clazz_defineMethod (c$, "getString", 
41104 function (key, c) {
41105 var l = (c == null) ? java.util.Locale.getDefault () : c.getLocale ();
41106 return javax.swing.UIManager.getString (key, l);
41107 }, "~O,java.awt.Component");
41108 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41109 function (key) {
41110 return javax.swing.UIManager.getDefaults ().getInt (key);
41111 }, "~O");
41112 c$.getInt = Clazz_defineMethod (c$, "getInt", 
41113 function (key, l) {
41114 return javax.swing.UIManager.getDefaults ().getInt (key, l);
41115 }, "~O,java.util.Locale");
41116 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41117 function (key) {
41118 return javax.swing.UIManager.getDefaults ().getBoolean (key);
41119 }, "~O");
41120 c$.getBoolean = Clazz_defineMethod (c$, "getBoolean", 
41121 function (key, l) {
41122 return javax.swing.UIManager.getDefaults ().getBoolean (key, l);
41123 }, "~O,java.util.Locale");
41124 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41125 function (key) {
41126 return javax.swing.UIManager.getDefaults ().getInsets (key);
41127 }, "~O");
41128 c$.getInsets = Clazz_defineMethod (c$, "getInsets", 
41129 function (key, l) {
41130 return javax.swing.UIManager.getDefaults ().getInsets (key, l);
41131 }, "~O,java.util.Locale");
41132 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41133 function (key) {
41134 return javax.swing.UIManager.getDefaults ().getDimension (key);
41135 }, "~O");
41136 c$.getDimension = Clazz_defineMethod (c$, "getDimension", 
41137 function (key, l) {
41138 return javax.swing.UIManager.getDefaults ().getDimension (key, l);
41139 }, "~O,java.util.Locale");
41140 c$.get = Clazz_defineMethod (c$, "get", 
41141 function (key) {
41142 return javax.swing.UIManager.getDefaults ().get (key);
41143 }, "~O");
41144 c$.get = Clazz_defineMethod (c$, "get", 
41145 function (key, l) {
41146 return javax.swing.UIManager.getDefaults ().get (key, l);
41147 }, "~O,java.util.Locale");
41148 c$.put = Clazz_defineMethod (c$, "put", 
41149 function (key, value) {
41150 return javax.swing.UIManager.getDefaults ().put (key, value);
41151 }, "~O,~O");
41152 c$.getUI = Clazz_defineMethod (c$, "getUI", 
41153 function (target) {
41154 javax.swing.UIManager.maybeInitialize ();
41155 var ui = null;
41156 ui = javax.swing.UIManager.getDefaults ().getUI (target);
41157 if (ui == null) System.out.println (target.getUIClassID () + " has not been implemented");
41158 return ui;
41159 }, "javax.swing.JComponent");
41160 c$.addPropertyChangeListener = Clazz_defineMethod (c$, "addPropertyChangeListener", 
41161 function (listener) {
41162 }, "java.beans.PropertyChangeListener");
41163 c$.removePropertyChangeListener = Clazz_defineMethod (c$, "removePropertyChangeListener", 
41164 function (listener) {
41165 }, "java.beans.PropertyChangeListener");
41166 c$.getPropertyChangeListeners = Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41167 function () {
41168 return  new Array (0);
41169 });
41170 c$.maybeInitialize = Clazz_defineMethod (c$, "maybeInitialize", 
41171  function () {
41172 if (javax.swing.UIManager.uid == null) {
41173 javax.swing.UIManager.uid = swingjs.JSToolkit.getLookAndFeelDefaults ();
41174 javax.swing.UIManager.initialize ();
41175 }});
41176 c$.initialize = Clazz_defineMethod (c$, "initialize", 
41177  function () {
41178 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
41179 jssun.awt.PaintEventDispatcher.setPaintEventDispatcher ( new javax.swing.SwingPaintEventDispatcher ());
41180 }});
41181 Clazz_pu$h(self.c$);
41182 c$ = Clazz_decorateAsClass (function () {
41183 this.name = null;
41184 this.className = null;
41185 Clazz_instantialize (this, arguments);
41186 }, javax.swing.UIManager, "LookAndFeelInfo");
41187 Clazz_makeConstructor (c$, 
41188 function (a, b) {
41189 this.name = a;
41190 this.className = b;
41191 }, "~S,~S");
41192 Clazz_defineMethod (c$, "getName", 
41193 function () {
41194 return this.name;
41195 });
41196 Clazz_defineMethod (c$, "getClassName", 
41197 function () {
41198 return this.className;
41199 });
41200 Clazz_overrideMethod (c$, "toString", 
41201 function () {
41202 return this.getClass ().getName () + "[" + this.getName () + " " + this.getClassName () + "]";
41203 });
41204 c$ = Clazz_p0p ();
41205 Clazz_defineStatics (c$,
41206 "installedLAFs", null);
41207 {
41208 var iLAFs =  new java.util.ArrayList (4);
41209 iLAFs.add ( new javax.swing.UIManager.LookAndFeelInfo ("HTML5", "swingjs.plaf.HTML5LookAndFeel"));
41210 javax.swing.UIManager.installedLAFs = iLAFs.toArray ( new Array (iLAFs.size ()));
41211 }Clazz_defineStatics (c$,
41212 "laf", null,
41213 "uid", null);
41214 });
41215 Clazz_declarePackage ("javax.swing");
41216 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 () {
41217 c$ = Clazz_decorateAsClass (function () {
41218 this.changeSupport = null;
41219 this.resourceBundles = null;
41220 this.defaultLocale = null;
41221 this.resourceCache = null;
41222 Clazz_instantialize (this, arguments);
41223 }, javax.swing, "UIDefaults", java.util.Hashtable);
41224 Clazz_prepareFields (c$, function () {
41225 this.defaultLocale = java.util.Locale.getDefault ();
41226 });
41227 Clazz_makeConstructor (c$, 
41228 function () {
41229 this.construct (700, .75);
41230 });
41231 Clazz_makeConstructor (c$, 
41232 function (initialCapacity, loadFactor) {
41233 Clazz_superConstructor (this, javax.swing.UIDefaults, [initialCapacity, loadFactor]);
41234 this.resourceCache =  new java.util.HashMap ();
41235 }, "~N,~N");
41236 Clazz_makeConstructor (c$, 
41237 function (keyValueList) {
41238 Clazz_superConstructor (this, javax.swing.UIDefaults, [Clazz_doubleToInt (keyValueList.length / 2)]);
41239 for (var i = 0; i < keyValueList.length; i += 2) {
41240 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], keyValueList[i + 1]]);
41241 }
41242 }, "~A");
41243 Clazz_defineMethod (c$, "get", 
41244 function (key) {
41245 var value = this.getFromHashtable (key);
41246 return (value != null) ? value : this.getFromResourceBundle (key, null);
41247 }, "~O");
41248 Clazz_defineMethod (c$, "getFromHashtable", 
41249  function (key) {
41250 var value = Clazz_superCall (this, javax.swing.UIDefaults, "get", [key]);
41251 if (value == null && (Clazz_instanceOf (key, String))) {
41252 var skey = key;
41253 if (skey.endsWith (".font") || skey.endsWith (".background") || skey.endsWith (".foreground")) value = Clazz_superCall (this, javax.swing.UIDefaults, "get", ["*" + skey.substring (skey.lastIndexOf ("."))]);
41254 }if ((value !== javax.swing.UIDefaults.PENDING) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue)) && !(Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue))) {
41255 return value;
41256 }if (!(Clazz_instanceOf (value, javax.swing.UIDefaults.ActiveValue))) {
41257 return value;
41258 }if (Clazz_instanceOf (value, javax.swing.UIDefaults.LazyValue)) {
41259 try {
41260 value = (value).createValue (this);
41261 } finally {
41262 if (value == null) {
41263 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]);
41264 } else {
41265 Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41266 }}
41267 } else {
41268 value = (value).createValue (this);
41269 }return value;
41270 }, "~O");
41271 Clazz_defineMethod (c$, "get", 
41272 function (key, l) {
41273 var value = this.getFromHashtable (key);
41274 return (value != null) ? value : this.getFromResourceBundle (key, l);
41275 }, "~O,java.util.Locale");
41276 Clazz_defineMethod (c$, "getFromResourceBundle", 
41277  function (key, l) {
41278 if (this.resourceBundles == null || this.resourceBundles.isEmpty () || !(Clazz_instanceOf (key, String))) {
41279 return null;
41280 }if (l == null) {
41281 if (this.defaultLocale == null) return null;
41282  else l = this.defaultLocale;
41283 }{
41284 return this.getResourceCache (l).get (key);
41285 }}, "~O,java.util.Locale");
41286 Clazz_defineMethod (c$, "getResourceCache", 
41287  function (l) {
41288 return null;
41289 }, "java.util.Locale");
41290 Clazz_defineMethod (c$, "put", 
41291 function (key, value) {
41292 var oldValue = (value == null) ? Clazz_superCall (this, javax.swing.UIDefaults, "remove", [key]) : Clazz_superCall (this, javax.swing.UIDefaults, "put", [key, value]);
41293 if (Clazz_instanceOf (key, String)) {
41294 this.firePropertyChange (key, oldValue, value);
41295 }return oldValue;
41296 }, "~O,~O");
41297 Clazz_defineMethod (c$, "putDefaults", 
41298 function (keyValueList) {
41299 for (var i = 0, max = keyValueList.length; i < max; i += 2) {
41300 var value = keyValueList[i + 1];
41301 if (value == null) {
41302 Clazz_superCall (this, javax.swing.UIDefaults, "remove", [keyValueList[i]]);
41303 } else {
41304 Clazz_superCall (this, javax.swing.UIDefaults, "put", [keyValueList[i], value]);
41305 }}
41306 this.firePropertyChange ("UIDefaults", null, null);
41307 }, "~A");
41308 Clazz_defineMethod (c$, "getFont", 
41309 function (key) {
41310 var value = this.get (key);
41311 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41312 }, "~O");
41313 Clazz_defineMethod (c$, "getFont", 
41314 function (key, l) {
41315 var value = this.get (key, l);
41316 return (Clazz_instanceOf (value, java.awt.Font)) ? value : null;
41317 }, "~O,java.util.Locale");
41318 Clazz_defineMethod (c$, "getColor", 
41319 function (key) {
41320 var value = this.get (key);
41321 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41322 }, "~O");
41323 Clazz_defineMethod (c$, "getColor", 
41324 function (key, l) {
41325 var value = this.get (key, l);
41326 return (Clazz_instanceOf (value, java.awt.Color)) ? value : null;
41327 }, "~O,java.util.Locale");
41328 Clazz_defineMethod (c$, "getIcon", 
41329 function (key) {
41330 var value = this.get (key);
41331 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41332 }, "~O");
41333 Clazz_defineMethod (c$, "getIcon", 
41334 function (key, l) {
41335 var value = this.get (key, l);
41336 return (Clazz_instanceOf (value, javax.swing.Icon)) ? value : null;
41337 }, "~O,java.util.Locale");
41338 Clazz_defineMethod (c$, "getBorder", 
41339 function (key) {
41340 var value = this.get (key);
41341 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41342 }, "~O");
41343 Clazz_defineMethod (c$, "getBorder", 
41344 function (key, l) {
41345 var value = this.get (key, l);
41346 return (Clazz_instanceOf (value, javax.swing.border.Border)) ? value : null;
41347 }, "~O,java.util.Locale");
41348 Clazz_defineMethod (c$, "getString", 
41349 function (key) {
41350 var value = this.get (key);
41351 return (Clazz_instanceOf (value, String)) ? value : null;
41352 }, "~O");
41353 Clazz_defineMethod (c$, "getString", 
41354 function (key, l) {
41355 var value = this.get (key, l);
41356 return (Clazz_instanceOf (value, String)) ? value : null;
41357 }, "~O,java.util.Locale");
41358 Clazz_defineMethod (c$, "getInt", 
41359 function (key) {
41360 var value = this.get (key);
41361 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41362 }, "~O");
41363 Clazz_defineMethod (c$, "getInt", 
41364 function (key, l) {
41365 var value = this.get (key, l);
41366 return (Clazz_instanceOf (value, Integer)) ? (value).intValue () : 0;
41367 }, "~O,java.util.Locale");
41368 Clazz_defineMethod (c$, "getBoolean", 
41369 function (key) {
41370 var value = this.get (key);
41371 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41372 }, "~O");
41373 Clazz_defineMethod (c$, "getBoolean", 
41374 function (key, l) {
41375 var value = this.get (key, l);
41376 return (Clazz_instanceOf (value, Boolean)) ? (value).booleanValue () : false;
41377 }, "~O,java.util.Locale");
41378 Clazz_defineMethod (c$, "getInsets", 
41379 function (key) {
41380 var value = this.get (key);
41381 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41382 }, "~O");
41383 Clazz_defineMethod (c$, "getInsets", 
41384 function (key, l) {
41385 var value = this.get (key, l);
41386 return (Clazz_instanceOf (value, java.awt.Insets)) ? value : null;
41387 }, "~O,java.util.Locale");
41388 Clazz_defineMethod (c$, "getDimension", 
41389 function (key) {
41390 var value = this.get (key);
41391 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41392 }, "~O");
41393 Clazz_defineMethod (c$, "getDimension", 
41394 function (key, l) {
41395 var value = this.get (key, l);
41396 return (Clazz_instanceOf (value, java.awt.Dimension)) ? value : null;
41397 }, "~O,java.util.Locale");
41398 Clazz_defineMethod (c$, "getUIClass", 
41399 function (uiClassID, uiClassLoader) {
41400 try {
41401 var className = this.get (uiClassID);
41402 if (className != null) {
41403 var cls = this.get (className);
41404 if (cls == null) {
41405 if (uiClassLoader == null) {
41406 cls = javax.swing.SwingUtilities.loadSystemClass (className);
41407 } else {
41408 cls = uiClassLoader.loadClass (className);
41409 }if (cls != null) {
41410 this.put (className, cls);
41411 }}return cls;
41412 }} catch (e$$) {
41413 if (Clazz_exceptionOf (e$$, ClassNotFoundException)) {
41414 var e = e$$;
41415 {
41416 return null;
41417 }
41418 } else if (Clazz_exceptionOf (e$$, ClassCastException)) {
41419 var e = e$$;
41420 {
41421 return null;
41422 }
41423 } else {
41424 throw e$$;
41425 }
41426 }
41427 return null;
41428 }, "~S,ClassLoader");
41429 Clazz_defineMethod (c$, "getUIClass", 
41430 function (uiClassID) {
41431 return this.getUIClass (uiClassID, null);
41432 }, "~S");
41433 Clazz_defineMethod (c$, "getUIError", 
41434 function (msg) {
41435 System.err.println ("UIDefaults.getUI() failed: " + msg);
41436 try {
41437 throw  new Error ();
41438 } catch (e) {
41439 e.printStackTrace ();
41440 }
41441 }, "~S");
41442 Clazz_defineMethod (c$, "getUI", 
41443 function (target) {
41444 return swingjs.JSToolkit.getComponentUI (target);
41445 }, "javax.swing.JComponent");
41446 Clazz_defineMethod (c$, "addPropertyChangeListener", 
41447 function (listener) {
41448 if (this.changeSupport == null) {
41449 this.changeSupport =  new javax.swing.event.SwingPropertyChangeSupport (this);
41450 }this.changeSupport.addPropertyChangeListener (listener);
41451 }, "java.beans.PropertyChangeListener");
41452 Clazz_defineMethod (c$, "removePropertyChangeListener", 
41453 function (listener) {
41454 if (this.changeSupport != null) {
41455 this.changeSupport.removePropertyChangeListener (listener);
41456 }}, "java.beans.PropertyChangeListener");
41457 Clazz_defineMethod (c$, "getPropertyChangeListeners", 
41458 function () {
41459 if (this.changeSupport == null) {
41460 return  new Array (0);
41461 }return this.changeSupport.getPropertyChangeListeners ();
41462 });
41463 Clazz_defineMethod (c$, "firePropertyChange", 
41464 function (propertyName, oldValue, newValue) {
41465 if (this.changeSupport != null) {
41466 this.changeSupport.firePropertyChange (propertyName, oldValue, newValue);
41467 }}, "~S,~O,~O");
41468 Clazz_defineMethod (c$, "addResourceBundle", 
41469 function (bundleName) {
41470 if (bundleName == null) {
41471 return;
41472 }if (this.resourceBundles == null) {
41473 this.resourceBundles =  new java.util.Vector (5);
41474 }if (!this.resourceBundles.contains (bundleName)) {
41475 this.resourceBundles.add (bundleName);
41476 this.resourceCache.clear ();
41477 }}, "~S");
41478 Clazz_defineMethod (c$, "removeResourceBundle", 
41479 function (bundleName) {
41480 if (this.resourceBundles != null) {
41481 this.resourceBundles.remove (bundleName);
41482 }this.resourceCache.clear ();
41483 }, "~S");
41484 Clazz_defineMethod (c$, "setDefaultLocale", 
41485 function (l) {
41486 this.defaultLocale = l;
41487 }, "java.util.Locale");
41488 Clazz_defineMethod (c$, "getDefaultLocale", 
41489 function () {
41490 return this.defaultLocale;
41491 });
41492 Clazz_declareInterface (javax.swing.UIDefaults, "LazyValue");
41493 Clazz_declareInterface (javax.swing.UIDefaults, "ActiveValue");
41494 c$.PENDING = c$.prototype.PENDING =  String.instantialize ("Pending");
41495 });
41496 Clazz_declarePackage ("javax.swing");
41497 Clazz_load (null, "javax.swing.LookAndFeel", ["javax.swing.JPasswordField", "$.UIManager", "javax.swing.plaf.UIResource", "jssun.swing.DefaultLayoutStyle", "swingjs.JSToolkit"], function () {
41498 c$ = Clazz_declareType (javax.swing, "LookAndFeel");
41499 c$.installColors = Clazz_defineMethod (c$, "installColors", 
41500 function (c, defaultBgName, defaultFgName) {
41501 var bg = c.getBackground ();
41502 if (bg == null || Clazz_instanceOf (bg, javax.swing.plaf.UIResource)) c.setBackground (javax.swing.UIManager.getColor (defaultBgName));
41503 var fg = c.getForeground ();
41504 if (fg == null || Clazz_instanceOf (fg, javax.swing.plaf.UIResource)) c.setForeground (javax.swing.UIManager.getColor (defaultFgName));
41505 }, "javax.swing.JComponent,~S,~S");
41506 c$.installColorsAndFont = Clazz_defineMethod (c$, "installColorsAndFont", 
41507 function (c, defaultBgName, defaultFgName, defaultFontName) {
41508 var f = c.getFont ();
41509 if (f == null || Clazz_instanceOf (f, javax.swing.plaf.UIResource)) {
41510 c.setFont (javax.swing.UIManager.getFont (defaultFontName));
41511 }javax.swing.LookAndFeel.installColors (c, defaultBgName, defaultFgName);
41512 }, "javax.swing.JComponent,~S,~S,~S");
41513 c$.installBorder = Clazz_defineMethod (c$, "installBorder", 
41514 function (c, defaultBorderName) {
41515 swingjs.JSToolkit.notImplemented (null);
41516 }, "javax.swing.JComponent,~S");
41517 c$.uninstallBorder = Clazz_defineMethod (c$, "uninstallBorder", 
41518 function (c) {
41519 swingjs.JSToolkit.notImplemented (null);
41520 }, "javax.swing.JComponent");
41521 c$.installProperty = Clazz_defineMethod (c$, "installProperty", 
41522 function (c, propertyName, propertyValue) {
41523 if (Clazz_instanceOf (c, javax.swing.JPasswordField)) {
41524 if (!(c).customSetUIProperty (propertyName, propertyValue)) {
41525 c.setUIProperty (propertyName, propertyValue);
41526 }} else {
41527 c.setUIProperty (propertyName, propertyValue);
41528 }}, "javax.swing.JComponent,~S,~O");
41529 c$.makeKeyBindings = Clazz_defineMethod (c$, "makeKeyBindings", 
41530 function (keyBindingList) {
41531 swingjs.JSToolkit.notImplemented (null);
41532 return null;
41533 }, "~A");
41534 c$.makeInputMap = Clazz_defineMethod (c$, "makeInputMap", 
41535 function (keys) {
41536 swingjs.JSToolkit.notImplemented (null);
41537 return null;
41538 }, "~A");
41539 c$.makeComponentInputMap = Clazz_defineMethod (c$, "makeComponentInputMap", 
41540 function (c, keys) {
41541 swingjs.JSToolkit.notImplemented (null);
41542 return null;
41543 }, "javax.swing.JComponent,~A");
41544 c$.loadKeyBindings = Clazz_defineMethod (c$, "loadKeyBindings", 
41545 function (retMap, keys) {
41546 swingjs.JSToolkit.notImplemented (null);
41547 }, "javax.swing.InputMap,~A");
41548 c$.makeIcon = Clazz_defineMethod (c$, "makeIcon", 
41549 function (baseClass, gifFile) {
41550 swingjs.JSToolkit.notImplemented (null);
41551 return null;
41552 }, "Class,~S");
41553 Clazz_defineMethod (c$, "getLayoutStyle", 
41554 function () {
41555 return jssun.swing.DefaultLayoutStyle.getInstance ();
41556 });
41557 Clazz_defineMethod (c$, "provideErrorFeedback", 
41558 function (component) {
41559 swingjs.JSToolkit.notImplemented (null);
41560 }, "java.awt.Component");
41561 c$.getDesktopPropertyValue = Clazz_defineMethod (c$, "getDesktopPropertyValue", 
41562 function (systemPropertyName, fallbackValue) {
41563 swingjs.JSToolkit.notImplemented (null);
41564 return fallbackValue;
41565 }, "~S,~O");
41566 Clazz_defineMethod (c$, "getDisabledIcon", 
41567 function (component, icon) {
41568 swingjs.JSToolkit.notImplemented (null);
41569 return null;
41570 }, "javax.swing.JComponent,javax.swing.Icon");
41571 Clazz_defineMethod (c$, "getDisabledSelectedIcon", 
41572 function (component, icon) {
41573 return this.getDisabledIcon (component, icon);
41574 }, "javax.swing.JComponent,javax.swing.Icon");
41575 Clazz_defineMethod (c$, "getSupportsWindowDecorations", 
41576 function () {
41577 return false;
41578 });
41579 Clazz_defineMethod (c$, "initialize", 
41580 function () {
41581 });
41582 Clazz_defineMethod (c$, "uninitialize", 
41583 function () {
41584 });
41585 Clazz_defineMethod (c$, "getDefaults", 
41586 function () {
41587 return null;
41588 });
41589 Clazz_overrideMethod (c$, "toString", 
41590 function () {
41591 return "[" + this.getDescription () + " - " + this.getClass ().getName () + "]";
41592 });
41593 });
41594 Clazz_declarePackage ("javax.swing");
41595 Clazz_load (["java.lang.Enum"], "javax.swing.DropMode", null, function () {
41596 c$ = Clazz_declareType (javax.swing, "DropMode", Enum);
41597 Clazz_defineEnumConstant (c$, "USE_SELECTION", 0, []);
41598 Clazz_defineEnumConstant (c$, "ON", 1, []);
41599 Clazz_defineEnumConstant (c$, "INSERT", 2, []);
41600 Clazz_defineEnumConstant (c$, "INSERT_ROWS", 3, []);
41601 Clazz_defineEnumConstant (c$, "INSERT_COLS", 4, []);
41602 Clazz_defineEnumConstant (c$, "ON_OR_INSERT", 5, []);
41603 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_ROWS", 6, []);
41604 Clazz_defineEnumConstant (c$, "ON_OR_INSERT_COLS", 7, []);
41605 });
41606 Clazz_declarePackage ("java.awt.font");
41607 Clazz_load (null, "java.awt.font.FontRenderContext", ["java.awt.RenderingHints", "java.awt.geom.AffineTransform"], function () {
41608 c$ = Clazz_decorateAsClass (function () {
41609 this.tx = null;
41610 this.aaHintValue = null;
41611 this.fmHintValue = null;
41612 this.defaulting = false;
41613 Clazz_instantialize (this, arguments);
41614 }, java.awt.font, "FontRenderContext");
41615 Clazz_makeConstructor (c$, 
41616 function () {
41617 this.defaulting = true;
41618 });
41619 Clazz_makeConstructor (c$, 
41620 function (tx, isAntiAliased, usesFractionalMetrics) {
41621 if (tx != null && !tx.isIdentity ()) {
41622 this.tx =  new java.awt.geom.AffineTransform (tx);
41623 }}, "java.awt.geom.AffineTransform,~B,~B");
41624 Clazz_makeConstructor (c$, 
41625 function (tx, aaHint, fmHint) {
41626 if (tx != null && !tx.isIdentity ()) {
41627 this.tx =  new java.awt.geom.AffineTransform (tx);
41628 }this.aaHintValue = aaHint;
41629 this.fmHintValue = fmHint;
41630 }, "java.awt.geom.AffineTransform,~O,~O");
41631 Clazz_defineMethod (c$, "isTransformed", 
41632 function () {
41633 if (!this.defaulting) {
41634 return this.tx != null;
41635 } else {
41636 return !this.getTransform ().isIdentity ();
41637 }});
41638 Clazz_defineMethod (c$, "getTransformType", 
41639 function () {
41640 if (!this.defaulting) {
41641 if (this.tx == null) {
41642 return 0;
41643 } else {
41644 return this.tx.getType ();
41645 }} else {
41646 return this.getTransform ().getType ();
41647 }});
41648 Clazz_defineMethod (c$, "getTransform", 
41649 function () {
41650 return (this.tx == null) ?  new java.awt.geom.AffineTransform () :  new java.awt.geom.AffineTransform (this.tx);
41651 });
41652 Clazz_defineMethod (c$, "isAntiAliased", 
41653 function () {
41654 return !(this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF || this.aaHintValue === java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
41655 });
41656 Clazz_defineMethod (c$, "usesFractionalMetrics", 
41657 function () {
41658 return !(this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF || this.fmHintValue === java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT);
41659 });
41660 Clazz_defineMethod (c$, "getAntiAliasingHint", 
41661 function () {
41662 if (this.defaulting) {
41663 if (this.isAntiAliased ()) {
41664 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON;
41665 } else {
41666 return java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF;
41667 }}return this.aaHintValue;
41668 });
41669 Clazz_defineMethod (c$, "getFractionalMetricsHint", 
41670 function () {
41671 if (this.defaulting) {
41672 if (this.usesFractionalMetrics ()) {
41673 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_ON;
41674 } else {
41675 return java.awt.RenderingHints.VALUE_FRACTIONALMETRICS_OFF;
41676 }}return this.fmHintValue;
41677 });
41678 Clazz_defineMethod (c$, "equals", 
41679 function (obj) {
41680 try {
41681 return this.equals (obj);
41682 } catch (e) {
41683 if (Clazz_exceptionOf (e, ClassCastException)) {
41684 return false;
41685 } else {
41686 throw e;
41687 }
41688 }
41689 }, "~O");
41690 Clazz_defineMethod (c$, "equals", 
41691 function (rhs) {
41692 if (this === rhs) {
41693 return true;
41694 }if (rhs == null) {
41695 return false;
41696 }if (!rhs.defaulting && !this.defaulting) {
41697 if (rhs.aaHintValue === this.aaHintValue && rhs.fmHintValue === this.fmHintValue) {
41698 return this.tx == null ? rhs.tx == null : this.tx.equals (rhs.tx);
41699 }return false;
41700 } else {
41701 return rhs.getAntiAliasingHint () === this.getAntiAliasingHint () && rhs.getFractionalMetricsHint () === this.getFractionalMetricsHint () && rhs.getTransform ().equals (this.getTransform ());
41702 }}, "java.awt.font.FontRenderContext");
41703 Clazz_defineMethod (c$, "hashCode", 
41704 function () {
41705 var hash = this.tx == null ? 0 : this.tx.hashCode ();
41706 if (this.defaulting) {
41707 hash += this.getAntiAliasingHint ().hashCode ();
41708 hash += this.getFractionalMetricsHint ().hashCode ();
41709 } else {
41710 hash += this.aaHintValue.hashCode ();
41711 hash += this.fmHintValue.hashCode ();
41712 }return hash;
41713 });
41714 });
41715 Clazz_declarePackage ("java.awt.event");
41716 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.InputMethodEvent", null, function () {
41717 c$ = Clazz_decorateAsClass (function () {
41718 this.when = 0;
41719 this.text = null;
41720 this.committedCharacterCount = 0;
41721 Clazz_instantialize (this, arguments);
41722 }, java.awt.event, "InputMethodEvent", java.awt.AWTEvent);
41723 Clazz_defineMethod (c$, "getText", 
41724 function () {
41725 return this.text;
41726 });
41727 Clazz_defineMethod (c$, "getCommittedCharacterCount", 
41728 function () {
41729 return this.committedCharacterCount;
41730 });
41731 Clazz_defineMethod (c$, "getWhen", 
41732 function () {
41733 return this.when;
41734 });
41735 Clazz_defineStatics (c$,
41736 "INPUT_METHOD_FIRST", 1100,
41737 "INPUT_METHOD_TEXT_CHANGED", 1100,
41738 "CARET_POSITION_CHANGED", 1101,
41739 "INPUT_METHOD_LAST", 1101);
41740 });
41741 Clazz_declarePackage ("javax.swing");
41742 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 () {
41743 c$ = Clazz_decorateAsClass (function () {
41744 this.isViewSizeSet = false;
41745 this.lastPaintPosition = null;
41746 this.backingStore = false;
41747 this.backingStoreImage = null;
41748 this.scrollUnderway = false;
41749 this.viewListener = null;
41750 this.changeEvent = null;
41751 this.scrollMode = 1;
41752 this.repaintAll = false;
41753 this.waitingForRepaint = false;
41754 this.inBlitPaint = false;
41755 this.hasHadValidView = false;
41756 if (!Clazz_isClassDefined ("javax.swing.JViewport.ViewListener")) {
41757 javax.swing.JViewport.$JViewport$ViewListener$ ();
41758 }
41759 Clazz_instantialize (this, arguments);
41760 }, javax.swing, "JViewport", javax.swing.JComponent);
41761 Clazz_makeConstructor (c$, 
41762 function () {
41763 Clazz_superConstructor (this, javax.swing.JViewport);
41764 this.setLayout (this.createLayoutManager ());
41765 this.setOpaque (true);
41766 this.updateUI ();
41767 this.setInheritsPopupMenu (true);
41768 });
41769 Clazz_overrideMethod (c$, "getUI", 
41770 function () {
41771 return this.ui;
41772 });
41773 Clazz_overrideMethod (c$, "updateUI", 
41774 function () {
41775 this.setUI (javax.swing.UIManager.getUI (this));
41776 });
41777 Clazz_overrideMethod (c$, "getUIClassID", 
41778 function () {
41779 return "ViewportUI";
41780 });
41781 Clazz_overrideMethod (c$, "addImpl", 
41782 function (child, constraints, index) {
41783 this.setView (child);
41784 return child;
41785 }, "java.awt.Component,~O,~N");
41786 Clazz_defineMethod (c$, "remove", 
41787 function (child) {
41788 child.removeComponentListener (this.viewListener);
41789 this.removeChild (child);
41790 }, "java.awt.Component");
41791 Clazz_overrideMethod (c$, "scrollRectToVisible", 
41792 function (contentRect) {
41793 var view = this.getView ();
41794 if (view == null) {
41795 return;
41796 } else {
41797 if (!view.isValid ()) {
41798 this.validateView ();
41799 }var dx = 0;
41800 var dy = 0;
41801 dx = this.positionAdjustment (this.getWidth (), contentRect.width, contentRect.x);
41802 dy = this.positionAdjustment (this.getHeight (), contentRect.height, contentRect.y);
41803 if (dx != 0 || dy != 0) {
41804 var viewPosition = this.getViewPosition ();
41805 var viewSize = view.getSize ();
41806 var startX = viewPosition.x;
41807 var startY = viewPosition.y;
41808 var extent = this.getExtentSize ();
41809 viewPosition.x -= dx;
41810 viewPosition.y -= dy;
41811 if (view.isValid ()) {
41812 if (this.getParent ().getComponentOrientation ().isLeftToRight ()) {
41813 if (viewPosition.x + extent.width > viewSize.width) {
41814 viewPosition.x = Math.max (0, viewSize.width - extent.width);
41815 } else if (viewPosition.x < 0) {
41816 viewPosition.x = 0;
41817 }} else {
41818 if (extent.width > viewSize.width) {
41819 viewPosition.x = viewSize.width - extent.width;
41820 } else {
41821 viewPosition.x = Math.max (0, Math.min (viewSize.width - extent.width, viewPosition.x));
41822 }}if (viewPosition.y + extent.height > viewSize.height) {
41823 viewPosition.y = Math.max (0, viewSize.height - extent.height);
41824 } else if (viewPosition.y < 0) {
41825 viewPosition.y = 0;
41826 }}if (viewPosition.x != startX || viewPosition.y != startY) {
41827 this.setViewPosition (viewPosition);
41828 this.scrollUnderway = false;
41829 }}}}, "java.awt.Rectangle");
41830 Clazz_defineMethod (c$, "validateView", 
41831  function () {
41832 var validateRoot = null;
41833 for (var c = this; c != null; c = c.getParent ()) {
41834 if ((Clazz_instanceOf (c, javax.swing.CellRendererPane)) || !c.isLightweight ()) {
41835 return;
41836 }if ((Clazz_instanceOf (c, javax.swing.JComponent)) && ((c).isValidateRoot ())) {
41837 validateRoot = c;
41838 break;
41839 }}
41840 if (validateRoot == null) {
41841 return;
41842 }var root = null;
41843 for (var c = validateRoot; c != null; c = c.getParent ()) {
41844 if (!c.isLightweight ()) {
41845 return;
41846 }if ((Clazz_instanceOf (c, java.awt.Window)) || (Clazz_instanceOf (c, java.applet.Applet))) {
41847 root = c;
41848 break;
41849 }}
41850 if (root == null) {
41851 return;
41852 }validateRoot.validate ();
41853 var rm = javax.swing.RepaintManager.currentManager (this);
41854 if (rm != null) {
41855 rm.removeInvalidComponent (validateRoot);
41856 }});
41857 Clazz_defineMethod (c$, "positionAdjustment", 
41858  function (parentWidth, childWidth, childAt) {
41859 if (childAt >= 0 && childWidth + childAt <= parentWidth) {
41860 return 0;
41861 }if (childAt <= 0 && childWidth + childAt >= parentWidth) {
41862 return 0;
41863 }if (childAt > 0 && childWidth <= parentWidth) {
41864 return -childAt + parentWidth - childWidth;
41865 }if (childAt >= 0 && childWidth >= parentWidth) {
41866 return -childAt;
41867 }if (childAt <= 0 && childWidth <= parentWidth) {
41868 return -childAt;
41869 }if (childAt < 0 && childWidth >= parentWidth) {
41870 return -childAt + parentWidth - childWidth;
41871 }return 0;
41872 }, "~N,~N,~N");
41873 Clazz_overrideMethod (c$, "setBorder", 
41874 function (border) {
41875 if (border != null) {
41876 throw  new IllegalArgumentException ("JViewport.setBorder() not supported");
41877 }}, "javax.swing.border.Border");
41878 Clazz_defineMethod (c$, "getInsets", 
41879 function () {
41880 return  new java.awt.Insets (0, 0, 0, 0);
41881 });
41882 Clazz_defineMethod (c$, "getInsets", 
41883 function (insets) {
41884 insets.left = insets.top = insets.right = insets.bottom = 0;
41885 return insets;
41886 }, "java.awt.Insets");
41887 Clazz_defineMethod (c$, "getBackingStoreGraphics", 
41888  function (g) {
41889 var bsg = this.backingStoreImage.getGraphics ();
41890 bsg.setColor (g.getColor ());
41891 bsg.setFont (g.getFont ());
41892 bsg.setClip (g.getClipBounds ());
41893 return bsg;
41894 }, "java.awt.Graphics");
41895 Clazz_defineMethod (c$, "paintViaBackingStore", 
41896  function (g) {
41897 var bsg = this.getBackingStoreGraphics (g);
41898 try {
41899 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41900 g.drawImage (this.backingStoreImage, 0, 0, this);
41901 } finally {
41902 bsg.dispose ();
41903 }
41904 }, "java.awt.Graphics");
41905 Clazz_defineMethod (c$, "paintViaBackingStore", 
41906  function (g, oClip) {
41907 var bsg = this.getBackingStoreGraphics (g);
41908 try {
41909 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41910 g.setClip (oClip);
41911 g.drawImage (this.backingStoreImage, 0, 0, this);
41912 } finally {
41913 bsg.dispose ();
41914 }
41915 }, "java.awt.Graphics,java.awt.Rectangle");
41916 Clazz_defineMethod (c$, "isOptimizedDrawingEnabled", 
41917 function () {
41918 return false;
41919 });
41920 Clazz_overrideMethod (c$, "isPaintingOrigin", 
41921 function () {
41922 if (this.scrollMode == 2) {
41923 return true;
41924 }return false;
41925 });
41926 Clazz_defineMethod (c$, "getViewLocation", 
41927  function () {
41928 var view = this.getView ();
41929 if (view != null) {
41930 return view.getLocation ();
41931 } else {
41932 return  new java.awt.Point (0, 0);
41933 }});
41934 Clazz_defineMethod (c$, "paint", 
41935 function (g) {
41936 var width = this.getWidth ();
41937 var height = this.getHeight ();
41938 if ((width <= 0) || (height <= 0)) {
41939 return;
41940 }if (this.inBlitPaint) {
41941 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
41942 return;
41943 }if (this.repaintAll) {
41944 this.repaintAll = false;
41945 var clipB = g.getClipBounds ();
41946 } else if (this.waitingForRepaint) {
41947 var clipB = g.getClipBounds ();
41948 if (clipB.width >= this.getWidth () && clipB.height >= this.getHeight ()) {
41949 this.waitingForRepaint = false;
41950 }}if (!this.backingStore || this.isBlitting () || this.getView () == null) {
41951 Clazz_superCall (this, javax.swing.JViewport, "paint", [g]);
41952 this.lastPaintPosition = this.getViewLocation ();
41953 return;
41954 }var viewBounds = this.getView ().getBounds ();
41955 if (!this.isOpaque ()) {
41956 g.clipRect (0, 0, viewBounds.width, viewBounds.height);
41957 }if (this.backingStoreImage == null) {
41958 this.backingStoreImage = this.createImage (width, height);
41959 var clip = g.getClipBounds ();
41960 if (clip.width != width || clip.height != height) {
41961 if (!this.isOpaque ()) {
41962 g.setClip (0, 0, Math.min (viewBounds.width, width), Math.min (viewBounds.height, height));
41963 } else {
41964 g.setClip (0, 0, width, height);
41965 }this.paintViaBackingStore (g, clip);
41966 } else {
41967 this.paintViaBackingStore (g);
41968 }} else {
41969 if (!this.scrollUnderway || this.lastPaintPosition.equals (this.getViewLocation ())) {
41970 this.paintViaBackingStore (g);
41971 } else {
41972 var blitFrom =  new java.awt.Point ();
41973 var blitTo =  new java.awt.Point ();
41974 var blitSize =  new java.awt.Dimension ();
41975 var blitPaint =  new java.awt.Rectangle ();
41976 var newLocation = this.getViewLocation ();
41977 var dx = newLocation.x - this.lastPaintPosition.x;
41978 var dy = newLocation.y - this.lastPaintPosition.y;
41979 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
41980 if (!canBlit) {
41981 this.paintViaBackingStore (g);
41982 } else {
41983 var bdx = blitTo.x - blitFrom.x;
41984 var bdy = blitTo.y - blitFrom.y;
41985 var clip = g.getClipBounds ();
41986 g.setClip (0, 0, width, height);
41987 var bsg = this.getBackingStoreGraphics (g);
41988 try {
41989 bsg.copyArea (blitFrom.x, blitFrom.y, blitSize.width, blitSize.height, bdx, bdy);
41990 g.setClip (clip.x, clip.y, clip.width, clip.height);
41991 var r = viewBounds.intersection (blitPaint);
41992 bsg.setClip (r);
41993 Clazz_superCall (this, javax.swing.JViewport, "paint", [bsg]);
41994 g.drawImage (this.backingStoreImage, 0, 0, this);
41995 } finally {
41996 bsg.dispose ();
41997 }
41998 }}}this.lastPaintPosition = this.getViewLocation ();
41999 this.scrollUnderway = false;
42000 }, "java.awt.Graphics");
42001 Clazz_defineMethod (c$, "reshape", 
42002 function (x, y, w, h) {
42003 var sizeChanged = (this.getWidth () != w) || (this.getHeight () != h);
42004 if (sizeChanged) {
42005 this.backingStoreImage = null;
42006 }Clazz_superCall (this, javax.swing.JViewport, "reshape", [x, y, w, h]);
42007 if (sizeChanged) {
42008 this.fireStateChanged ();
42009 }}, "~N,~N,~N,~N");
42010 Clazz_defineMethod (c$, "setScrollMode", 
42011 function (mode) {
42012 this.scrollMode = mode;
42013 if (mode == 2) {
42014 this.backingStore = true;
42015 } else {
42016 this.backingStore = false;
42017 }}, "~N");
42018 Clazz_defineMethod (c$, "getScrollMode", 
42019 function () {
42020 return this.scrollMode;
42021 });
42022 Clazz_defineMethod (c$, "isBackingStoreEnabled", 
42023 function () {
42024 return this.scrollMode == 2;
42025 });
42026 Clazz_defineMethod (c$, "setBackingStoreEnabled", 
42027 function (enabled) {
42028 if (enabled) {
42029 this.setScrollMode (2);
42030 } else {
42031 this.setScrollMode (1);
42032 }}, "~B");
42033 Clazz_defineMethod (c$, "isBlitting", 
42034  function () {
42035 var view = this.getView ();
42036 return (this.scrollMode == 1) && (Clazz_instanceOf (view, javax.swing.JComponent)) && (view).isOpaque ();
42037 });
42038 Clazz_defineMethod (c$, "getView", 
42039 function () {
42040 return (this.getComponentCount () > 0) ? this.getComponent (0) : null;
42041 });
42042 Clazz_defineMethod (c$, "setView", 
42043 function (view) {
42044 var n = this.getComponentCount ();
42045 for (var i = n - 1; i >= 0; i--) {
42046 this.remove (this.getComponent (i));
42047 }
42048 this.isViewSizeSet = false;
42049 if (view != null) {
42050 this.addImplSAEM (view, null, -1);
42051 this.viewListener = this.createViewListener ();
42052 view.addComponentListener (this.viewListener);
42053 }if (this.hasHadValidView) {
42054 this.fireStateChanged ();
42055 } else if (view != null) {
42056 this.hasHadValidView = true;
42057 }this.revalidate ();
42058 this.repaint ();
42059 }, "java.awt.Component");
42060 Clazz_defineMethod (c$, "getViewSize", 
42061 function () {
42062 var view = this.getView ();
42063 if (view == null) {
42064 return  new java.awt.Dimension (0, 0);
42065 } else if (this.isViewSizeSet) {
42066 return view.getSize ();
42067 } else {
42068 return view.getPreferredSize ();
42069 }});
42070 Clazz_defineMethod (c$, "setViewSize", 
42071 function (newSize) {
42072 var view = this.getView ();
42073 if (view != null) {
42074 var oldSize = view.getSize ();
42075 if (!newSize.equals (oldSize)) {
42076 this.scrollUnderway = false;
42077 view.setSize (newSize);
42078 this.isViewSizeSet = true;
42079 this.fireStateChanged ();
42080 }}}, "java.awt.Dimension");
42081 Clazz_defineMethod (c$, "getViewPosition", 
42082 function () {
42083 var view = this.getView ();
42084 if (view != null) {
42085 var p = view.getLocation ();
42086 p.x = -p.x;
42087 p.y = -p.y;
42088 return p;
42089 } else {
42090 return  new java.awt.Point (0, 0);
42091 }});
42092 Clazz_defineMethod (c$, "setViewPosition", 
42093 function (p) {
42094 var view = this.getView ();
42095 if (view == null) {
42096 return;
42097 }var oldX;
42098 var oldY;
42099 var x = p.x;
42100 var y = p.y;
42101 if (Clazz_instanceOf (view, javax.swing.JComponent)) {
42102 var c = view;
42103 oldX = c.getX ();
42104 oldY = c.getY ();
42105 } else {
42106 var r = view.getBounds ();
42107 oldX = r.x;
42108 oldY = r.y;
42109 }var newX = -x;
42110 var newY = -y;
42111 if ((oldX != newX) || (oldY != newY)) {
42112 if (!this.waitingForRepaint && this.isBlitting () && this.canUseWindowBlitter ()) {
42113 var rm = javax.swing.RepaintManager.currentManager (this);
42114 var jview = view;
42115 var dirty = rm.getDirtyRegion (jview);
42116 if (dirty == null || !dirty.contains (jview.getVisibleRect ())) {
42117 rm.beginPaint ();
42118 try {
42119 var g = javax.swing.JComponent.safelyGetGraphics (this, javax.swing.SwingUtilities.getRoot (this));
42120 this.flushViewDirtyRegion (g, dirty);
42121 view.setLocation (newX, newY);
42122 g.setClip (0, 0, this.getWidth (), Math.min (this.getHeight (), jview.getHeight ()));
42123 this.repaintAll = (this.windowBlitPaint (g) && this.needsRepaintAfterBlit ());
42124 g.dispose ();
42125 rm.markCompletelyClean (this.getParent ());
42126 rm.markCompletelyClean (this);
42127 rm.markCompletelyClean (jview);
42128 } finally {
42129 rm.endPaint ();
42130 }
42131 } else {
42132 view.setLocation (newX, newY);
42133 this.repaintAll = false;
42134 }} else {
42135 this.scrollUnderway = true;
42136 view.setLocation (newX, newY);
42137 this.repaintAll = false;
42138 }this.fireStateChanged ();
42139 }}, "java.awt.Point");
42140 Clazz_defineMethod (c$, "getViewRect", 
42141 function () {
42142 return  new java.awt.Rectangle (this.getViewPosition (), this.getExtentSize ());
42143 });
42144 Clazz_defineMethod (c$, "computeBlit", 
42145 function (dx, dy, blitFrom, blitTo, blitSize, blitPaint) {
42146 var dxAbs = Math.abs (dx);
42147 var dyAbs = Math.abs (dy);
42148 var extentSize = this.getExtentSize ();
42149 if ((dx == 0) && (dy != 0) && (dyAbs < extentSize.height)) {
42150 if (dy < 0) {
42151 blitFrom.y = -dy;
42152 blitTo.y = 0;
42153 blitPaint.y = extentSize.height + dy;
42154 } else {
42155 blitFrom.y = 0;
42156 blitTo.y = dy;
42157 blitPaint.y = 0;
42158 }blitPaint.x = blitFrom.x = blitTo.x = 0;
42159 blitSize.width = extentSize.width;
42160 blitSize.height = extentSize.height - dyAbs;
42161 blitPaint.width = extentSize.width;
42162 blitPaint.height = dyAbs;
42163 return true;
42164 } else if ((dy == 0) && (dx != 0) && (dxAbs < extentSize.width)) {
42165 if (dx < 0) {
42166 blitFrom.x = -dx;
42167 blitTo.x = 0;
42168 blitPaint.x = extentSize.width + dx;
42169 } else {
42170 blitFrom.x = 0;
42171 blitTo.x = dx;
42172 blitPaint.x = 0;
42173 }blitPaint.y = blitFrom.y = blitTo.y = 0;
42174 blitSize.width = extentSize.width - dxAbs;
42175 blitSize.height = extentSize.height;
42176 blitPaint.width = dxAbs;
42177 blitPaint.height = extentSize.height;
42178 return true;
42179 } else {
42180 return false;
42181 }}, "~N,~N,java.awt.Point,java.awt.Point,java.awt.Dimension,java.awt.Rectangle");
42182 Clazz_defineMethod (c$, "getExtentSize", 
42183 function () {
42184 return this.getSize ();
42185 });
42186 Clazz_defineMethod (c$, "toViewCoordinates", 
42187 function (size) {
42188 return  new java.awt.Dimension (size);
42189 }, "java.awt.Dimension");
42190 Clazz_defineMethod (c$, "toViewCoordinates", 
42191 function (p) {
42192 return  new java.awt.Point (p);
42193 }, "java.awt.Point");
42194 Clazz_defineMethod (c$, "setExtentSize", 
42195 function (newExtent) {
42196 var oldExtent = this.getExtentSize ();
42197 if (!newExtent.equals (oldExtent)) {
42198 this.setSize (newExtent);
42199 this.fireStateChanged ();
42200 }}, "java.awt.Dimension");
42201 Clazz_defineMethod (c$, "createViewListener", 
42202 function () {
42203 return Clazz_innerTypeInstance (javax.swing.JViewport.ViewListener, this, null);
42204 });
42205 Clazz_defineMethod (c$, "createLayoutManager", 
42206 function () {
42207 return javax.swing.ViewportLayout.SHARED_INSTANCE;
42208 });
42209 Clazz_defineMethod (c$, "addChangeListener", 
42210 function (l) {
42211 this.listenerList.add (javax.swing.event.ChangeListener, l);
42212 }, "javax.swing.event.ChangeListener");
42213 Clazz_defineMethod (c$, "removeChangeListener", 
42214 function (l) {
42215 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42216 }, "javax.swing.event.ChangeListener");
42217 Clazz_defineMethod (c$, "getChangeListeners", 
42218 function () {
42219 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42220 });
42221 Clazz_defineMethod (c$, "fireStateChanged", 
42222 function () {
42223 var listeners = this.listenerList.getListenerList ();
42224 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42225 if (listeners[i] === javax.swing.event.ChangeListener) {
42226 if (this.changeEvent == null) {
42227 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42228 }(listeners[i + 1]).stateChanged (this.changeEvent);
42229 }}
42230 });
42231 Clazz_defineMethod (c$, "repaint", 
42232 function (tm, x, y, w, h) {
42233 var parent = this.getParent ();
42234 if (parent != null) parent.repaint (tm, x + this.getX (), y + this.getY (), w, h);
42235  else Clazz_superCall (this, javax.swing.JViewport, "repaint", [tm, x, y, w, h]);
42236 }, "~N,~N,~N,~N,~N");
42237 Clazz_defineMethod (c$, "paramString", 
42238 function () {
42239 var isViewSizeSetString = (this.isViewSizeSet ? "true" : "false");
42240 var lastPaintPositionString = (this.lastPaintPosition != null ? this.lastPaintPosition.toString () : "");
42241 var scrollUnderwayString = (this.scrollUnderway ? "true" : "false");
42242 return Clazz_superCall (this, javax.swing.JViewport, "paramString", []) + ",isViewSizeSet=" + isViewSizeSetString + ",lastPaintPosition=" + lastPaintPositionString + ",scrollUnderway=" + scrollUnderwayString;
42243 });
42244 Clazz_defineMethod (c$, "firePropertyChangeObject", 
42245 function (propertyName, oldValue, newValue) {
42246 Clazz_superCall (this, javax.swing.JViewport, "firePropertyChangeObject", [propertyName, oldValue, newValue]);
42247 if (propertyName.equals (javax.swing.JViewport.EnableWindowBlit)) {
42248 if (newValue != null) {
42249 this.setScrollMode (1);
42250 } else {
42251 this.setScrollMode (0);
42252 }}}, "~S,~O,~O");
42253 Clazz_defineMethod (c$, "needsRepaintAfterBlit", 
42254  function () {
42255 var heavyParent = this.getParent ();
42256 while (heavyParent != null && heavyParent.isLightweight ()) {
42257 heavyParent = heavyParent.getParent ();
42258 }
42259 if (heavyParent != null) {
42260 }return true;
42261 });
42262 Clazz_defineMethod (c$, "flushViewDirtyRegion", 
42263  function (g, dirty) {
42264 var view = this.getView ();
42265 if (dirty != null && dirty.width > 0 && dirty.height > 0) {
42266 dirty.x += view.getX ();
42267 dirty.y += view.getY ();
42268 var clip = g.getClipBounds ();
42269 if (clip == null) {
42270 g.setClip (0, 0, this.getWidth (), this.getHeight ());
42271 }g.clipRect (dirty.x, dirty.y, dirty.width, dirty.height);
42272 clip = g.getClipBounds ();
42273 if (clip.width > 0 && clip.height > 0) {
42274 this.paintView (g);
42275 }}}, "java.awt.Graphics,java.awt.Rectangle");
42276 Clazz_defineMethod (c$, "windowBlitPaint", 
42277  function (g) {
42278 var width = this.getWidth ();
42279 var height = this.getHeight ();
42280 if ((width == 0) || (height == 0)) {
42281 return false;
42282 }var retValue;
42283 var rm = javax.swing.RepaintManager.currentManager (this);
42284 var view = this.getView ();
42285 if (this.lastPaintPosition == null || this.lastPaintPosition.equals (this.getViewLocation ())) {
42286 this.paintView (g);
42287 retValue = false;
42288 } else {
42289 var blitFrom =  new java.awt.Point ();
42290 var blitTo =  new java.awt.Point ();
42291 var blitSize =  new java.awt.Dimension ();
42292 var blitPaint =  new java.awt.Rectangle ();
42293 var newLocation = this.getViewLocation ();
42294 var dx = newLocation.x - this.lastPaintPosition.x;
42295 var dy = newLocation.y - this.lastPaintPosition.y;
42296 var canBlit = this.computeBlit (dx, dy, blitFrom, blitTo, blitSize, blitPaint);
42297 if (!canBlit) {
42298 this.paintView (g);
42299 retValue = false;
42300 } else {
42301 var r = view.getBounds ().intersection (blitPaint);
42302 r.x -= view.getX ();
42303 r.y -= view.getY ();
42304 this.blitDoubleBuffered (view, g, r.x, r.y, r.width, r.height, blitFrom.x, blitFrom.y, blitTo.x, blitTo.y, blitSize.width, blitSize.height);
42305 retValue = true;
42306 }}this.lastPaintPosition = this.getViewLocation ();
42307 return retValue;
42308 }, "java.awt.Graphics");
42309 Clazz_defineMethod (c$, "blitDoubleBuffered", 
42310  function (view, g, clipX, clipY, clipW, clipH, blitFromX, blitFromY, blitToX, blitToY, blitW, blitH) {
42311 var rm = javax.swing.RepaintManager.currentManager (this);
42312 var bdx = blitToX - blitFromX;
42313 var bdy = blitToY - blitFromY;
42314 var x = view.getX ();
42315 var y = view.getY ();
42316 g.translate (x, y);
42317 g.setClip (clipX, clipY, clipW, clipH);
42318 view.paintForceDoubleBuffered (g);
42319 g.translate (-x, -y);
42320 }, "javax.swing.JComponent,java.awt.Graphics,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");
42321 Clazz_defineMethod (c$, "paintView", 
42322  function (g) {
42323 var clip = g.getClipBounds ();
42324 var view = this.getView ();
42325 if (view.getWidth () >= this.getWidth ()) {
42326 var x = view.getX ();
42327 var y = view.getY ();
42328 g.translate (x, y);
42329 g.setClip (clip.x - x, clip.y - y, clip.width, clip.height);
42330 view.paintForceDoubleBuffered (g);
42331 g.translate (-x, -y);
42332 g.setClip (clip.x, clip.y, clip.width, clip.height);
42333 } else {
42334 try {
42335 this.inBlitPaint = true;
42336 this.paintForceDoubleBuffered (g);
42337 } finally {
42338 this.inBlitPaint = false;
42339 }
42340 }}, "java.awt.Graphics");
42341 Clazz_defineMethod (c$, "canUseWindowBlitter", 
42342  function () {
42343 if (!this.isShowing () || (!(Clazz_instanceOf (this.getParent (), javax.swing.JComponent)) && !(Clazz_instanceOf (this.getView (), javax.swing.JComponent)))) {
42344 return false;
42345 }if (this.isPainting ()) {
42346 return false;
42347 }var dirtyRegion = javax.swing.RepaintManager.currentManager (this).getDirtyRegion (this.getParent ());
42348 if (dirtyRegion != null && dirtyRegion.width > 0 && dirtyRegion.height > 0) {
42349 return false;
42350 }var clip =  new java.awt.Rectangle (0, 0, this.getWidth (), this.getHeight ());
42351 var oldClip =  new java.awt.Rectangle ();
42352 var tmp2 = null;
42353 var parent;
42354 var lastParent = null;
42355 var x;
42356 var y;
42357 var w;
42358 var h;
42359 for (parent = this; parent != null && javax.swing.JComponent.isLightweightComponent (parent); parent = parent.getParent ()) {
42360 x = parent.getX ();
42361 y = parent.getY ();
42362 w = parent.getWidth ();
42363 h = parent.getHeight ();
42364 oldClip.setBounds (clip);
42365 javax.swing.SwingUtilities.computeIntersection (0, 0, w, h, clip);
42366 if (!clip.equals (oldClip)) return false;
42367 if (lastParent != null && Clazz_instanceOf (parent, javax.swing.JComponent) && !(parent).isOptimizedDrawingEnabled ()) {
42368 var comps = parent.getComponents ();
42369 var index = 0;
42370 for (var i = comps.length - 1; i >= 0; i--) {
42371 if (comps[i] === lastParent) {
42372 index = i - 1;
42373 break;
42374 }}
42375 while (index >= 0) {
42376 tmp2 = comps[index].getBounds (tmp2);
42377 if (tmp2.intersects (clip)) return false;
42378 index--;
42379 }
42380 }clip.x += x;
42381 clip.y += y;
42382 lastParent = parent;
42383 }
42384 if (parent == null) {
42385 return false;
42386 }return true;
42387 });
42388 c$.$JViewport$ViewListener$ = function () {
42389 Clazz_pu$h(self.c$);
42390 c$ = Clazz_decorateAsClass (function () {
42391 Clazz_prepareCallback (this, arguments);
42392 Clazz_instantialize (this, arguments);
42393 }, javax.swing.JViewport, "ViewListener", java.awt.event.ComponentAdapter);
42394 Clazz_overrideMethod (c$, "componentResized", 
42395 function (a) {
42396 this.b$["javax.swing.JViewport"].fireStateChanged ();
42397 this.b$["javax.swing.JViewport"].revalidate ();
42398 }, "java.awt.event.ComponentEvent");
42399 c$ = Clazz_p0p ();
42400 };
42401 Clazz_defineStatics (c$,
42402 "$uiClassID", "ViewportUI",
42403 "EnableWindowBlit", "EnableWindowBlit",
42404 "BLIT_SCROLL_MODE", 1,
42405 "BACKINGSTORE_SCROLL_MODE", 2,
42406 "SIMPLE_SCROLL_MODE", 0);
42407 });
42408 Clazz_declarePackage ("java.awt.event");
42409 Clazz_load (["java.awt.event.ComponentListener"], "java.awt.event.ComponentAdapter", null, function () {
42410 c$ = Clazz_declareType (java.awt.event, "ComponentAdapter", null, java.awt.event.ComponentListener);
42411 Clazz_overrideMethod (c$, "componentResized", 
42412 function (e) {
42413 }, "java.awt.event.ComponentEvent");
42414 Clazz_overrideMethod (c$, "componentMoved", 
42415 function (e) {
42416 }, "java.awt.event.ComponentEvent");
42417 Clazz_overrideMethod (c$, "componentShown", 
42418 function (e) {
42419 }, "java.awt.event.ComponentEvent");
42420 Clazz_overrideMethod (c$, "componentHidden", 
42421 function (e) {
42422 }, "java.awt.event.ComponentEvent");
42423 });
42424 Clazz_declarePackage ("javax.swing");
42425 Clazz_load (["java.awt.Container"], "javax.swing.CellRendererPane", null, function () {
42426 c$ = Clazz_declareType (javax.swing, "CellRendererPane", java.awt.Container);
42427 Clazz_makeConstructor (c$, 
42428 function () {
42429 Clazz_superConstructor (this, javax.swing.CellRendererPane);
42430 this.setLayout (null);
42431 this.setVisible (false);
42432 });
42433 Clazz_overrideMethod (c$, "invalidate", 
42434 function () {
42435 });
42436 Clazz_overrideMethod (c$, "paint", 
42437 function (g) {
42438 }, "java.awt.Graphics");
42439 Clazz_overrideMethod (c$, "update", 
42440 function (g) {
42441 }, "java.awt.Graphics");
42442 Clazz_overrideMethod (c$, "addImpl", 
42443 function (x, constraints, index) {
42444 if (x.getParent () === this) {
42445 return null;
42446 } else {
42447 return this.addImplSAEM (x, constraints, index);
42448 }}, "java.awt.Component,~O,~N");
42449 Clazz_defineMethod (c$, "paintComponent", 
42450 function (g, c, p, x, y, w, h, shouldValidate) {
42451 if (c == null) {
42452 if (p != null) {
42453 var oldColor = g.getColor ();
42454 g.setColor (p.getBackground ());
42455 g.fillRect (x, y, w, h);
42456 g.setColor (oldColor);
42457 }return;
42458 }if (c.getParent () !== this) {
42459 this.add (c);
42460 }c.setBounds (x, y, w, h);
42461 if (shouldValidate) {
42462 c.validate ();
42463 }var cg = g.create4 (x, y, w, h);
42464 try {
42465 c.paint (cg);
42466 } finally {
42467 cg.dispose ();
42468 }
42469 c.setBounds (-w, -h, 0, 0);
42470 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N,~B");
42471 Clazz_defineMethod (c$, "paintComponent", 
42472 function (g, c, p, x, y, w, h) {
42473 this.paintComponent (g, c, p, x, y, w, h, false);
42474 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,~N,~N,~N,~N");
42475 Clazz_defineMethod (c$, "paintComponent", 
42476 function (g, c, p, r) {
42477 this.paintComponent (g, c, p, r.x, r.y, r.width, r.height);
42478 }, "java.awt.Graphics,java.awt.Component,java.awt.Container,java.awt.Rectangle");
42479 });
42480 Clazz_declarePackage ("jssun.awt");
42481 c$ = Clazz_declareType (jssun.awt, "AWTAccessor");
42482 c$.setWindowAccessor = Clazz_defineMethod (c$, "setWindowAccessor", 
42483 function (wa) {
42484 jssun.awt.AWTAccessor.windowAccessor = wa;
42485 }, "jssun.awt.AWTAccessor.WindowAccessor");
42486 c$.getWindowAccessor = Clazz_defineMethod (c$, "getWindowAccessor", 
42487 function () {
42488 return jssun.awt.AWTAccessor.windowAccessor;
42489 });
42490 c$.setComponentAccessor = Clazz_defineMethod (c$, "setComponentAccessor", 
42491 function (ca) {
42492 jssun.awt.AWTAccessor.componentAccessor = ca;
42493 }, "jssun.awt.AWTAccessor.ComponentAccessor");
42494 c$.getComponentAccessor = Clazz_defineMethod (c$, "getComponentAccessor", 
42495 function () {
42496 return jssun.awt.AWTAccessor.componentAccessor;
42497 });
42498 c$.setAWTEventAccessor = Clazz_defineMethod (c$, "setAWTEventAccessor", 
42499 function (aea) {
42500 jssun.awt.AWTAccessor.awtEventAccessor = aea;
42501 }, "jssun.awt.AWTAccessor.AWTEventAccessor");
42502 c$.getAWTEventAccessor = Clazz_defineMethod (c$, "getAWTEventAccessor", 
42503 function () {
42504 return jssun.awt.AWTAccessor.awtEventAccessor;
42505 });
42506 c$.setEventQueueAccessor = Clazz_defineMethod (c$, "setEventQueueAccessor", 
42507 function (eqa) {
42508 jssun.awt.AWTAccessor.eventQueueAccessor = eqa;
42509 }, "jssun.awt.AWTAccessor.EventQueueAccessor");
42510 c$.getEventQueueAccessor = Clazz_defineMethod (c$, "getEventQueueAccessor", 
42511 function () {
42512 return jssun.awt.AWTAccessor.eventQueueAccessor;
42513 });
42514 Clazz_declareInterface (jssun.awt.AWTAccessor, "WindowAccessor");
42515 Clazz_declareInterface (jssun.awt.AWTAccessor, "ComponentAccessor");
42516 Clazz_declareInterface (jssun.awt.AWTAccessor, "KeyboardFocusManagerAccessor");
42517 Clazz_declareInterface (jssun.awt.AWTAccessor, "AWTEventAccessor");
42518 Clazz_declareInterface (jssun.awt.AWTAccessor, "EventQueueAccessor");
42519 Clazz_declareInterface (jssun.awt.AWTAccessor, "CursorAccessor");
42520 Clazz_declareInterface (jssun.awt.AWTAccessor, "ClientPropertyKeyAccessor");
42521 Clazz_defineStatics (c$,
42522 "componentAccessor", null,
42523 "windowAccessor", null,
42524 "awtEventAccessor", null,
42525 "eventQueueAccessor", null);
42526 Clazz_declarePackage ("javax.swing");
42527 Clazz_load (["java.awt.LayoutManager"], "javax.swing.ViewportLayout", ["java.awt.Dimension", "javax.swing.Scrollable"], function () {
42528 c$ = Clazz_declareType (javax.swing, "ViewportLayout", null, java.awt.LayoutManager);
42529 Clazz_overrideMethod (c$, "addLayoutComponent", 
42530 function (name, c) {
42531 }, "~S,java.awt.Component");
42532 Clazz_overrideMethod (c$, "removeLayoutComponent", 
42533 function (c) {
42534 }, "java.awt.Component");
42535 Clazz_overrideMethod (c$, "preferredLayoutSize", 
42536 function (parent) {
42537 var view = (parent).getView ();
42538 if (view == null) {
42539 return  new java.awt.Dimension (0, 0);
42540 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42541 return (view).getPreferredScrollableViewportSize ();
42542 } else {
42543 return view.getPreferredSize ();
42544 }}, "java.awt.Container");
42545 Clazz_overrideMethod (c$, "minimumLayoutSize", 
42546 function (parent) {
42547 return  new java.awt.Dimension (4, 4);
42548 }, "java.awt.Container");
42549 Clazz_overrideMethod (c$, "layoutContainer", 
42550 function (parent) {
42551 var vp = parent;
42552 var view = vp.getView ();
42553 var scrollableView = null;
42554 if (view == null) {
42555 return;
42556 } else if (Clazz_instanceOf (view, javax.swing.Scrollable)) {
42557 scrollableView = view;
42558 }var insets = vp.getInsets ();
42559 var viewPrefSize = view.getPreferredSize ();
42560 var vpSize = vp.getSize ();
42561 var extentSize = vp.toViewCoordinates (vpSize);
42562 var viewSize =  new java.awt.Dimension (viewPrefSize);
42563 if (scrollableView != null) {
42564 if (scrollableView.getScrollableTracksViewportWidth ()) {
42565 viewSize.width = vpSize.width;
42566 }if (scrollableView.getScrollableTracksViewportHeight ()) {
42567 viewSize.height = vpSize.height;
42568 }}var viewPosition = vp.getViewPosition ();
42569 if (scrollableView == null || vp.getParent () == null || vp.getParent ().getComponentOrientation ().isLeftToRight ()) {
42570 if ((viewPosition.x + extentSize.width) > viewSize.width) {
42571 viewPosition.x = Math.max (0, viewSize.width - extentSize.width);
42572 }} else {
42573 if (extentSize.width > viewSize.width) {
42574 viewPosition.x = viewSize.width - extentSize.width;
42575 } else {
42576 viewPosition.x = Math.max (0, Math.min (viewSize.width - extentSize.width, viewPosition.x));
42577 }}if ((viewPosition.y + extentSize.height) > viewSize.height) {
42578 viewPosition.y = Math.max (0, viewSize.height - extentSize.height);
42579 }if (scrollableView == null) {
42580 if ((viewPosition.x == 0) && (vpSize.width > viewPrefSize.width)) {
42581 viewSize.width = vpSize.width;
42582 }if ((viewPosition.y == 0) && (vpSize.height > viewPrefSize.height)) {
42583 viewSize.height = vpSize.height;
42584 }}vp.setViewPosition (viewPosition);
42585 vp.setViewSize (viewSize);
42586 }, "java.awt.Container");
42587 c$.SHARED_INSTANCE = c$.prototype.SHARED_INSTANCE =  new javax.swing.ViewportLayout ();
42588 });
42589 Clazz_declarePackage ("javax.swing.event");
42590 Clazz_load (["java.util.EventListener"], "javax.swing.event.CaretListener", null, function () {
42591 Clazz_declareInterface (javax.swing.event, "CaretListener", java.util.EventListener);
42592 });
42593 Clazz_declarePackage ("javax.swing");
42594 Clazz_load (["javax.swing.BoundedRangeModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultBoundedRangeModel", ["java.lang.IllegalArgumentException", "javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
42595 c$ = Clazz_decorateAsClass (function () {
42596 this.changeEvent = null;
42597 this.listenerList = null;
42598 this.value = 0;
42599 this.extent = 0;
42600 this.min = 0;
42601 this.max = 100;
42602 this.isAdjusting = false;
42603 Clazz_instantialize (this, arguments);
42604 }, javax.swing, "DefaultBoundedRangeModel", null, javax.swing.BoundedRangeModel);
42605 Clazz_prepareFields (c$, function () {
42606 this.listenerList =  new javax.swing.event.EventListenerList ();
42607 });
42608 Clazz_makeConstructor (c$, 
42609 function () {
42610 });
42611 Clazz_makeConstructor (c$, 
42612 function (value, extent, min, max) {
42613 if ((max >= min) && (value >= min) && ((value + extent) >= value) && ((value + extent) <= max)) {
42614 this.value = value;
42615 this.extent = extent;
42616 this.min = min;
42617 this.max = max;
42618 } else {
42619 throw  new IllegalArgumentException ("invalid range properties");
42620 }}, "~N,~N,~N,~N");
42621 Clazz_overrideMethod (c$, "getValue", 
42622 function () {
42623 return this.value;
42624 });
42625 Clazz_overrideMethod (c$, "getExtent", 
42626 function () {
42627 return this.extent;
42628 });
42629 Clazz_overrideMethod (c$, "getMinimum", 
42630 function () {
42631 return this.min;
42632 });
42633 Clazz_overrideMethod (c$, "getMaximum", 
42634 function () {
42635 return this.max;
42636 });
42637 Clazz_overrideMethod (c$, "setValue", 
42638 function (n) {
42639 n = Math.min (n, 2147483647 - this.extent);
42640 var newValue = Math.max (n, this.min);
42641 if (newValue + this.extent > this.max) {
42642 newValue = this.max - this.extent;
42643 }this.setRangeProperties (newValue, this.extent, this.min, this.max, this.isAdjusting);
42644 }, "~N");
42645 Clazz_overrideMethod (c$, "setExtent", 
42646 function (n) {
42647 var newExtent = Math.max (0, n);
42648 if (this.value + newExtent > this.max) {
42649 newExtent = this.max - this.value;
42650 }this.setRangeProperties (this.value, newExtent, this.min, this.max, this.isAdjusting);
42651 }, "~N");
42652 Clazz_overrideMethod (c$, "setMinimum", 
42653 function (n) {
42654 var newMax = Math.max (n, this.max);
42655 var newValue = Math.max (n, this.value);
42656 var newExtent = Math.min (newMax - newValue, this.extent);
42657 this.setRangeProperties (newValue, newExtent, n, newMax, this.isAdjusting);
42658 }, "~N");
42659 Clazz_overrideMethod (c$, "setMaximum", 
42660 function (n) {
42661 var newMin = Math.min (n, this.min);
42662 var newExtent = Math.min (n - newMin, this.extent);
42663 var newValue = Math.min (n - newExtent, this.value);
42664 this.setRangeProperties (newValue, newExtent, newMin, n, this.isAdjusting);
42665 }, "~N");
42666 Clazz_overrideMethod (c$, "setValueIsAdjusting", 
42667 function (b) {
42668 this.setRangeProperties (this.value, this.extent, this.min, this.max, b);
42669 }, "~B");
42670 Clazz_overrideMethod (c$, "getValueIsAdjusting", 
42671 function () {
42672 return this.isAdjusting;
42673 });
42674 Clazz_overrideMethod (c$, "setRangeProperties", 
42675 function (newValue, newExtent, newMin, newMax, adjusting) {
42676 if (newMin > newMax) {
42677 newMin = newMax;
42678 }if (newValue > newMax) {
42679 newMax = newValue;
42680 }if (newValue < newMin) {
42681 newMin = newValue;
42682 }if ((newExtent + newValue) > newMax) {
42683 newExtent = newMax - newValue;
42684 }if (newExtent < 0) {
42685 newExtent = 0;
42686 }var isChange = (newValue != this.value) || (newExtent != this.extent) || (newMin != this.min) || (newMax != this.max) || (adjusting != this.isAdjusting);
42687 if (isChange) {
42688 this.value = newValue;
42689 this.extent = newExtent;
42690 this.min = newMin;
42691 this.max = newMax;
42692 this.isAdjusting = adjusting;
42693 this.fireStateChanged ();
42694 }}, "~N,~N,~N,~N,~B");
42695 Clazz_overrideMethod (c$, "addChangeListener", 
42696 function (l) {
42697 this.listenerList.add (javax.swing.event.ChangeListener, l);
42698 }, "javax.swing.event.ChangeListener");
42699 Clazz_overrideMethod (c$, "removeChangeListener", 
42700 function (l) {
42701 this.listenerList.remove (javax.swing.event.ChangeListener, l);
42702 }, "javax.swing.event.ChangeListener");
42703 Clazz_defineMethod (c$, "getChangeListeners", 
42704 function () {
42705 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
42706 });
42707 Clazz_defineMethod (c$, "fireStateChanged", 
42708 function () {
42709 var listeners = this.listenerList.getListenerList ();
42710 for (var i = listeners.length - 2; i >= 0; i -= 2) {
42711 if (listeners[i] === javax.swing.event.ChangeListener) {
42712 if (this.changeEvent == null) {
42713 this.changeEvent =  new javax.swing.event.ChangeEvent (this);
42714 }(listeners[i + 1]).stateChanged (this.changeEvent);
42715 }}
42716 });
42717 Clazz_overrideMethod (c$, "toString", 
42718 function () {
42719 var modelString = "value=" + this.getValue () + ", " + "extent=" + this.getExtent () + ", " + "min=" + this.getMinimum () + ", " + "max=" + this.getMaximum () + ", " + "adj=" + this.getValueIsAdjusting ();
42720 return this.getClass ().getName () + "[" + modelString + "]";
42721 });
42722 Clazz_defineMethod (c$, "getListeners", 
42723 function (listenerType) {
42724 return this.listenerList.getListeners (listenerType);
42725 }, "Class");
42726 });
42727 Clazz_declarePackage ("javax.swing");
42728 Clazz_declareInterface (javax.swing, "BoundedRangeModel");
42729 Clazz_declarePackage ("javax.swing");
42730 Clazz_load (["java.awt.AWTKeyStroke"], "javax.swing.KeyStroke", null, function () {
42731 c$ = Clazz_declareType (javax.swing, "KeyStroke", java.awt.AWTKeyStroke);
42732 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42733 function (keyChar) {
42734 {
42735 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42736 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar);
42737 }}, "~S");
42738 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42739 function (keyChar, onKeyRelease) {
42740 return  new javax.swing.KeyStroke (keyChar, 0, 0, onKeyRelease);
42741 }, "~S,~B");
42742 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42743 function (keyChar, modifiers) {
42744 {
42745 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42746 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyChar, modifiers);
42747 }}, "Character,~N");
42748 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42749 function (keyCode, modifiers, onKeyRelease) {
42750 {
42751 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42752 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers, onKeyRelease);
42753 }}, "~N,~N,~B");
42754 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42755 function (keyCode, modifiers) {
42756 {
42757 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42758 return java.awt.AWTKeyStroke.getAWTKeyStroke (keyCode, modifiers);
42759 }}, "~N,~N");
42760 c$.getKeyStrokeForEvent = Clazz_defineMethod (c$, "getKeyStrokeForEvent", 
42761 function (anEvent) {
42762 {
42763 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42764 return java.awt.AWTKeyStroke.getAWTKeyStrokeForEvent (anEvent);
42765 }}, "java.awt.event.KeyEvent");
42766 c$.getKeyStroke = Clazz_defineMethod (c$, "getKeyStroke", 
42767 function (s) {
42768 if (s == null || s.length == 0) {
42769 return null;
42770 }{
42771 java.awt.AWTKeyStroke.registerSubclass (javax.swing.KeyStroke);
42772 try {
42773 return java.awt.AWTKeyStroke.getAWTKeyStroke (s);
42774 } catch (e) {
42775 if (Clazz_exceptionOf (e, IllegalArgumentException)) {
42776 return null;
42777 } else {
42778 throw e;
42779 }
42780 }
42781 }}, "~S");
42782 });
42783 Clazz_declarePackage ("java.awt");
42784 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 () {
42785 c$ = Clazz_decorateAsClass (function () {
42786 this.keyChar = '\uffff';
42787 this.keyCode = 0;
42788 this.modifiers = 0;
42789 this.onKeyRelease = false;
42790 Clazz_instantialize (this, arguments);
42791 }, java.awt, "AWTKeyStroke");
42792 c$.getAWTKeyStrokeClass = Clazz_defineMethod (c$, "getAWTKeyStrokeClass", 
42793  function () {
42794 var clazz = jssun.awt.AppContext.getAppContext ().get (java.awt.AWTKeyStroke);
42795 if (clazz == null) {
42796 clazz = java.awt.AWTKeyStroke;
42797 jssun.awt.AppContext.getAppContext ().put (java.awt.AWTKeyStroke, java.awt.AWTKeyStroke);
42798 }return clazz;
42799 });
42800 Clazz_makeConstructor (c$, 
42801 function () {
42802 });
42803 Clazz_makeConstructor (c$, 
42804 function (keyChar, keyCode, modifiers, onKeyRelease) {
42805 this.keyChar = keyChar;
42806 this.keyCode = keyCode;
42807 this.modifiers = modifiers;
42808 this.onKeyRelease = onKeyRelease;
42809 }, "~S,~N,~N,~B");
42810 c$.registerSubclass = Clazz_defineMethod (c$, "registerSubclass", 
42811 function (subclass) {
42812 }, "Class");
42813 c$.getCachedStroke = Clazz_defineMethod (c$, "getCachedStroke", 
42814  function (keyChar, keyCode, modifiers, onKeyRelease) {
42815 return null;
42816 }, "~S,~N,~N,~B");
42817 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42818 function (keyChar) {
42819 return java.awt.AWTKeyStroke.getCachedStroke (keyChar, 0, 0, false);
42820 }, "~S");
42821 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42822 function (keyChar, modifiers) {
42823 if (keyChar == null) {
42824 throw  new IllegalArgumentException ("keyChar cannot be null");
42825 }return java.awt.AWTKeyStroke.getCachedStroke (keyChar.charValue (), 0, modifiers, false);
42826 }, "Character,~N");
42827 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42828 function (keyCode, modifiers, onKeyRelease) {
42829 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, onKeyRelease);
42830 }, "~N,~N,~B");
42831 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42832 function (keyCode, modifiers) {
42833 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, modifiers, false);
42834 }, "~N,~N");
42835 c$.getAWTKeyStrokeForEvent = Clazz_defineMethod (c$, "getAWTKeyStrokeForEvent", 
42836 function (anEvent) {
42837 var id = anEvent.getID ();
42838 switch (id) {
42839 case 401:
42840 case 402:
42841 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', anEvent.getKeyCode (), anEvent.getModifiers (), (id == 402));
42842 case 400:
42843 return java.awt.AWTKeyStroke.getCachedStroke (anEvent.getKeyChar (), 0, anEvent.getModifiers (), false);
42844 default:
42845 return null;
42846 }
42847 }, "java.awt.event.KeyEvent");
42848 c$.getAWTKeyStroke = Clazz_defineMethod (c$, "getAWTKeyStroke", 
42849 function (s) {
42850 if (s == null) {
42851 throw  new IllegalArgumentException ("String cannot be null");
42852 }var errmsg = "String formatted incorrectly";
42853 var st =  new java.util.StringTokenizer (s, " ");
42854 var mask = 0;
42855 var released = false;
42856 var typed = false;
42857 var pressed = false;
42858 {
42859 if (java.awt.AWTKeyStroke.modifierKeywords == null) {
42860 var uninitializedMap =  new java.util.HashMap (8, 1.0);
42861 uninitializedMap.put ("shift", Integer.$valueOf (65));
42862 uninitializedMap.put ("control", Integer.$valueOf (130));
42863 uninitializedMap.put ("ctrl", Integer.$valueOf (130));
42864 uninitializedMap.put ("meta", Integer.$valueOf (260));
42865 uninitializedMap.put ("alt", Integer.$valueOf (520));
42866 uninitializedMap.put ("altGraph", Integer.$valueOf (8224));
42867 uninitializedMap.put ("button1", Integer.$valueOf (1024));
42868 uninitializedMap.put ("button2", Integer.$valueOf (2048));
42869 uninitializedMap.put ("button3", Integer.$valueOf (4096));
42870 java.awt.AWTKeyStroke.modifierKeywords = java.util.Collections.synchronizedMap (uninitializedMap);
42871 }}var count = st.countTokens ();
42872 for (var i = 1; i <= count; i++) {
42873 var token = st.nextToken ();
42874 if (typed) {
42875 if (token.length != 1 || i != count) {
42876 throw  new IllegalArgumentException ("String formatted incorrectly");
42877 }return java.awt.AWTKeyStroke.getCachedStroke (token.charAt (0), 0, mask, false);
42878 }if (pressed || released || i == count) {
42879 if (i != count) {
42880 throw  new IllegalArgumentException ("String formatted incorrectly");
42881 }var keyCodeName = "VK_" + token;
42882 var keyCode = java.awt.AWTKeyStroke.getVKValue (keyCodeName);
42883 return java.awt.AWTKeyStroke.getCachedStroke ('\uffff', keyCode, mask, released);
42884 }if (token.equals ("released")) {
42885 released = true;
42886 continue;
42887 }if (token.equals ("pressed")) {
42888 pressed = true;
42889 continue;
42890 }if (token.equals ("typed")) {
42891 typed = true;
42892 continue;
42893 }var tokenMask = java.awt.AWTKeyStroke.modifierKeywords.get (token);
42894 if (tokenMask != null) {
42895 mask |= tokenMask.intValue ();
42896 } else {
42897 throw  new IllegalArgumentException ("String formatted incorrectly");
42898 }}
42899 throw  new IllegalArgumentException ("String formatted incorrectly");
42900 }, "~S");
42901 c$.getVKCollection = Clazz_defineMethod (c$, "getVKCollection", 
42902  function () {
42903 if (java.awt.AWTKeyStroke.vks == null) {
42904 java.awt.AWTKeyStroke.vks =  new java.awt.VKCollection ();
42905 }return java.awt.AWTKeyStroke.vks;
42906 });
42907 c$.getVKValue = Clazz_defineMethod (c$, "getVKValue", 
42908  function (key) {
42909 var vkCollect = java.awt.AWTKeyStroke.getVKCollection ();
42910 var value = vkCollect.findCode (key);
42911 if (value == null) {
42912 var keyCode = 0;
42913 var errmsg = "String formatted incorrectly";
42914 try {
42915 keyCode = java.awt.event.KeyEvent.getField (key).getInt (java.awt.event.KeyEvent);
42916 } catch (e$$) {
42917 if (Clazz_exceptionOf (e$$, NoSuchFieldException)) {
42918 var nsfe = e$$;
42919 {
42920 throw  new IllegalArgumentException ("String formatted incorrectly");
42921 }
42922 } else if (Clazz_exceptionOf (e$$, IllegalAccessException)) {
42923 var iae = e$$;
42924 {
42925 throw  new IllegalArgumentException ("String formatted incorrectly");
42926 }
42927 } else {
42928 throw e$$;
42929 }
42930 }
42931 value = Integer.$valueOf (keyCode);
42932 vkCollect.put (key, value);
42933 }return value.intValue ();
42934 }, "~S");
42935 Clazz_defineMethod (c$, "getKeyChar", 
42936 function () {
42937 return this.keyChar;
42938 });
42939 Clazz_defineMethod (c$, "getKeyCode", 
42940 function () {
42941 return this.keyCode;
42942 });
42943 Clazz_defineMethod (c$, "getModifiers", 
42944 function () {
42945 return this.modifiers;
42946 });
42947 Clazz_defineMethod (c$, "isOnKeyRelease", 
42948 function () {
42949 return this.onKeyRelease;
42950 });
42951 Clazz_defineMethod (c$, "getKeyEventType", 
42952 function () {
42953 if (this.keyCode == 0) {
42954 return 400;
42955 } else {
42956 return (this.onKeyRelease) ? 402 : 401;
42957 }});
42958 Clazz_overrideMethod (c$, "hashCode", 
42959 function () {
42960 return (((this.keyChar).charCodeAt (0)) + 1) * (2 * (this.keyCode + 1)) * (this.modifiers + 1) + (this.onKeyRelease ? 1 : 2);
42961 });
42962 Clazz_defineMethod (c$, "equals", 
42963 function (anObject) {
42964 if (Clazz_instanceOf (anObject, java.awt.AWTKeyStroke)) {
42965 var ks = anObject;
42966 return (ks.keyChar == this.keyChar && ks.keyCode == this.keyCode && ks.onKeyRelease == this.onKeyRelease && ks.modifiers == this.modifiers);
42967 }return false;
42968 }, "~O");
42969 Clazz_overrideMethod (c$, "toString", 
42970 function () {
42971 if (this.keyCode == 0) {
42972 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + "typed " + this.keyChar;
42973 } else {
42974 return java.awt.AWTKeyStroke.getModifiersText (this.modifiers) + (this.onKeyRelease ? "released" : "pressed") + " " + java.awt.AWTKeyStroke.getVKText (this.keyCode);
42975 }});
42976 c$.getModifiersText = Clazz_defineMethod (c$, "getModifiersText", 
42977 function (modifiers) {
42978 var buf =  new StringBuilder ();
42979 if ((modifiers & 64) != 0) {
42980 buf.append ("shift ");
42981 }if ((modifiers & 128) != 0) {
42982 buf.append ("ctrl ");
42983 }if ((modifiers & 256) != 0) {
42984 buf.append ("meta ");
42985 }if ((modifiers & 512) != 0) {
42986 buf.append ("alt ");
42987 }if ((modifiers & 8192) != 0) {
42988 buf.append ("altGraph ");
42989 }if ((modifiers & 1024) != 0) {
42990 buf.append ("button1 ");
42991 }if ((modifiers & 2048) != 0) {
42992 buf.append ("button2 ");
42993 }if ((modifiers & 4096) != 0) {
42994 buf.append ("button3 ");
42995 }return buf.toString ();
42996 }, "~N");
42997 c$.getVKText = Clazz_defineMethod (c$, "getVKText", 
42998 function (keyCode) {
42999 return "UNKNOWN";
43000 }, "~N");
43001 Clazz_defineMethod (c$, "readResolve", 
43002 function () {
43003 {
43004 var newClass = this.getClass ();
43005 var awtKeyStrokeClass = java.awt.AWTKeyStroke.getAWTKeyStrokeClass ();
43006 if (!newClass.equals (awtKeyStrokeClass)) {
43007 java.awt.AWTKeyStroke.registerSubclass (newClass);
43008 }return java.awt.AWTKeyStroke.getCachedStroke (this.keyChar, this.keyCode, this.modifiers, this.onKeyRelease);
43009 }});
43010 Clazz_defineStatics (c$,
43011 "modifierKeywords", null,
43012 "vks", null);
43013 c$ = Clazz_decorateAsClass (function () {
43014 this.code2name = null;
43015 this.name2code = null;
43016 Clazz_instantialize (this, arguments);
43017 }, java.awt, "VKCollection");
43018 Clazz_makeConstructor (c$, 
43019 function () {
43020 this.code2name =  new java.util.HashMap ();
43021 this.name2code =  new java.util.HashMap ();
43022 });
43023 Clazz_defineMethod (c$, "put", 
43024 function (name, code) {
43025 this.code2name.put (code, name);
43026 this.name2code.put (name, code);
43027 }, "~S,Integer");
43028 Clazz_defineMethod (c$, "findCode", 
43029 function (name) {
43030 return this.name2code.get (name);
43031 }, "~S");
43032 Clazz_defineMethod (c$, "findName", 
43033 function (code) {
43034 return this.code2name.get (code);
43035 }, "Integer");
43036 });
43037 Clazz_load(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){
43038 c$=Clazz_decorateAsClass(function(){
43039 this.string=null;
43040 this.delimiters=null;
43041 this.returnDelimiters=false;
43042 this.position=0;
43043 Clazz_instantialize(this,arguments);
43044 },java.util,"StringTokenizer",null,java.util.Enumeration);
43045 Clazz_makeConstructor(c$,
43046 function(string){
43047 this.construct(string," \t\n\r\f",false);
43048 },"~S");
43049 Clazz_makeConstructor(c$,
43050 function(string,delimiters){
43051 this.construct(string,delimiters,false);
43052 },"~S,~S");
43053 Clazz_makeConstructor(c$,
43054 function(string,delimiters,returnDelimiters){
43055 if(string!=null){
43056 this.string=string;
43057 this.delimiters=delimiters;
43058 this.returnDelimiters=returnDelimiters;
43059 this.position=0;
43060 }else throw new NullPointerException();
43061 },"~S,~S,~B");
43062 Clazz_defineMethod(c$,"countTokens",
43063 function(){
43064 var count=0;
43065 var inToken=false;
43066 for(var i=this.position,length=this.string.length;i<length;i++){
43067 if(this.delimiters.indexOf(this.string.charAt(i),0)>=0){
43068 if(this.returnDelimiters)count++;
43069 if(inToken){
43070 count++;
43071 inToken=false;
43072 }}else{
43073 inToken=true;
43074 }}
43075 if(inToken)count++;
43076 return count;
43077 });
43078 Clazz_overrideMethod(c$,"hasMoreElements",
43079 function(){
43080 return this.hasMoreTokens();
43081 });
43082 Clazz_defineMethod(c$,"hasMoreTokens",
43083 function(){
43084 var length=this.string.length;
43085 if(this.position<length){
43086 if(this.returnDelimiters)return true;
43087 for(var i=this.position;i<length;i++)if(this.delimiters.indexOf(this.string.charAt(i),0)==-1)return true;
43088
43089 }return false;
43090 });
43091 Clazz_overrideMethod(c$,"nextElement",
43092 function(){
43093 return this.nextToken();
43094 });
43095 Clazz_defineMethod(c$,"nextToken",
43096 function(){
43097 var i=this.position;
43098 var length=this.string.length;
43099 if(i<length){
43100 if(this.returnDelimiters){
43101 if(this.delimiters.indexOf(this.string.charAt(this.position),0)>=0)return String.valueOf(this.string.charAt(this.position++));
43102 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);
43103
43104 return this.string.substring(i);
43105 }while(i<length&&this.delimiters.indexOf(this.string.charAt(i),0)>=0)i++;
43106
43107 this.position=i;
43108 if(i<length){
43109 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);
43110
43111 return this.string.substring(i);
43112 }}throw new java.util.NoSuchElementException();
43113 });
43114 Clazz_defineMethod(c$,"nextToken",
43115 function(delims){
43116 this.delimiters=delims;
43117 return this.nextToken();
43118 },"~S");
43119 });
43120 Clazz_declarePackage ("javax.swing");
43121 Clazz_load (["javax.swing.InputMap"], "javax.swing.ComponentInputMap", ["java.lang.IllegalArgumentException"], function () {
43122 c$ = Clazz_decorateAsClass (function () {
43123 this.component = null;
43124 Clazz_instantialize (this, arguments);
43125 }, javax.swing, "ComponentInputMap", javax.swing.InputMap);
43126 Clazz_makeConstructor (c$, 
43127 function (component) {
43128 Clazz_superConstructor (this, javax.swing.ComponentInputMap, []);
43129 this.component = component;
43130 if (component == null) {
43131 throw  new IllegalArgumentException ("ComponentInputMaps must be associated with a non-null JComponent");
43132 }}, "javax.swing.JComponent");
43133 Clazz_defineMethod (c$, "setParent", 
43134 function (map) {
43135 if (this.getParent () === map) {
43136 return;
43137 }if (map != null && (!(Clazz_instanceOf (map, javax.swing.ComponentInputMap)) || (map).getComponent () !== this.getComponent ())) {
43138 throw  new IllegalArgumentException ("ComponentInputMaps must have a parent ComponentInputMap associated with the same component");
43139 }Clazz_superCall (this, javax.swing.ComponentInputMap, "setParent", [map]);
43140 this.getComponent ().componentInputMapChanged (this);
43141 }, "javax.swing.InputMap");
43142 Clazz_defineMethod (c$, "getComponent", 
43143 function () {
43144 return this.component;
43145 });
43146 Clazz_defineMethod (c$, "put", 
43147 function (keyStroke, actionMapKey) {
43148 Clazz_superCall (this, javax.swing.ComponentInputMap, "put", [keyStroke, actionMapKey]);
43149 if (this.getComponent () != null) {
43150 this.getComponent ().componentInputMapChanged (this);
43151 }}, "javax.swing.KeyStroke,~O");
43152 Clazz_defineMethod (c$, "remove", 
43153 function (key) {
43154 Clazz_superCall (this, javax.swing.ComponentInputMap, "remove", [key]);
43155 if (this.getComponent () != null) {
43156 this.getComponent ().componentInputMapChanged (this);
43157 }}, "javax.swing.KeyStroke");
43158 Clazz_defineMethod (c$, "clear", 
43159 function () {
43160 var oldSize = this.size ();
43161 Clazz_superCall (this, javax.swing.ComponentInputMap, "clear", []);
43162 if (oldSize > 0 && this.getComponent () != null) {
43163 this.getComponent ().componentInputMapChanged (this);
43164 }});
43165 });
43166 Clazz_declarePackage ("jssun.swing");
43167 Clazz_load (["javax.swing.LayoutStyle"], "jssun.swing.DefaultLayoutStyle", ["java.lang.IllegalArgumentException", "$.NullPointerException", "javax.swing.Icon", "$.JCheckBox", "$.JLabel", "$.JRadioButton", "$.UIManager", "javax.swing.plaf.UIResource"], function () {
43168 c$ = Clazz_declareType (jssun.swing, "DefaultLayoutStyle", javax.swing.LayoutStyle);
43169 c$.getInstance = Clazz_overrideMethod (c$, "getInstance", 
43170 function () {
43171 return jssun.swing.DefaultLayoutStyle.INSTANCE;
43172 });
43173 Clazz_overrideMethod (c$, "getPreferredGap", 
43174 function (component1, component2, type, position, parent) {
43175 if (component1 == null || component2 == null || type == null) {
43176 throw  new NullPointerException ();
43177 }this.checkPosition (position);
43178 if (type === javax.swing.LayoutStyle.ComponentPlacement.INDENT && (position == 3 || position == 7)) {
43179 var indent = this.getIndent (component1, position);
43180 if (indent > 0) {
43181 return indent;
43182 }}return (type === javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) ? 12 : 6;
43183 }, "javax.swing.JComponent,javax.swing.JComponent,javax.swing.LayoutStyle.ComponentPlacement,~N,java.awt.Container");
43184 Clazz_overrideMethod (c$, "getContainerGap", 
43185 function (component, position, parent) {
43186 if (component == null) {
43187 throw  new NullPointerException ();
43188 }this.checkPosition (position);
43189 return 6;
43190 }, "javax.swing.JComponent,~N,java.awt.Container");
43191 Clazz_defineMethod (c$, "isLabelAndNonlabel", 
43192 function (c1, c2, position) {
43193 if (position == 3 || position == 7) {
43194 var c1Label = (Clazz_instanceOf (c1, javax.swing.JLabel));
43195 var c2Label = (Clazz_instanceOf (c2, javax.swing.JLabel));
43196 return ((c1Label || c2Label) && (c1Label != c2Label));
43197 }return false;
43198 }, "javax.swing.JComponent,javax.swing.JComponent,~N");
43199 Clazz_defineMethod (c$, "getButtonGap", 
43200 function (source, target, position, offset) {
43201 offset -= this.getButtonGap (source, position);
43202 if (offset > 0) {
43203 offset -= this.getButtonGap (target, this.flipDirection (position));
43204 }if (offset < 0) {
43205 return 0;
43206 }return offset;
43207 }, "javax.swing.JComponent,javax.swing.JComponent,~N,~N");
43208 Clazz_defineMethod (c$, "getButtonGap", 
43209 function (source, position, offset) {
43210 offset -= this.getButtonGap (source, position);
43211 return Math.max (offset, 0);
43212 }, "javax.swing.JComponent,~N,~N");
43213 Clazz_defineMethod (c$, "getButtonGap", 
43214 function (c, position) {
43215 var classID = c.getUIClassID ();
43216 if ((classID === "CheckBoxUI" || classID === "RadioButtonUI") && !(c).isBorderPainted ()) {
43217 var border = c.getBorder ();
43218 if (Clazz_instanceOf (border, javax.swing.plaf.UIResource)) {
43219 return this.getInset (c, position);
43220 }}return 0;
43221 }, "javax.swing.JComponent,~N");
43222 Clazz_defineMethod (c$, "checkPosition", 
43223  function (position) {
43224 if (position != 1 && position != 5 && position != 7 && position != 3) {
43225 throw  new IllegalArgumentException ();
43226 }}, "~N");
43227 Clazz_defineMethod (c$, "flipDirection", 
43228 function (position) {
43229 switch (position) {
43230 case 1:
43231 return 5;
43232 case 5:
43233 return 1;
43234 case 3:
43235 return 7;
43236 case 7:
43237 return 3;
43238 }
43239 return 0;
43240 }, "~N");
43241 Clazz_defineMethod (c$, "getIndent", 
43242 function (c, position) {
43243 var classID = c.getUIClassID ();
43244 if (classID === "CheckBoxUI" || classID === "RadioButtonUI") {
43245 var button = c;
43246 var insets = c.getInsets ();
43247 var icon = this.getIcon (button);
43248 var gap = button.getIconTextGap ();
43249 if (this.isLeftAligned (button, position)) {
43250 return insets.left + icon.getIconWidth () + gap;
43251 } else if (this.isRightAligned (button, position)) {
43252 return insets.right + icon.getIconWidth () + gap;
43253 }}return 0;
43254 }, "javax.swing.JComponent,~N");
43255 Clazz_defineMethod (c$, "getIcon", 
43256  function (button) {
43257 var icon = button.getIcon ();
43258 if (icon != null) {
43259 return icon;
43260 }var key = null;
43261 if (Clazz_instanceOf (button, javax.swing.JCheckBox)) {
43262 key = "CheckBox.icon";
43263 } else if (Clazz_instanceOf (button, javax.swing.JRadioButton)) {
43264 key = "RadioButton.icon";
43265 }if (key != null) {
43266 var oIcon = javax.swing.UIManager.get (key);
43267 if (Clazz_instanceOf (oIcon, javax.swing.Icon)) {
43268 return oIcon;
43269 }}return null;
43270 }, "javax.swing.AbstractButton");
43271 Clazz_defineMethod (c$, "isLeftAligned", 
43272  function (button, position) {
43273 if (position == 7) {
43274 var ltr = button.getComponentOrientation ().isLeftToRight ();
43275 var hAlign = button.getHorizontalAlignment ();
43276 return ((ltr && (hAlign == 2 || hAlign == 10)) || (!ltr && (hAlign == 11)));
43277 }return false;
43278 }, "javax.swing.AbstractButton,~N");
43279 Clazz_defineMethod (c$, "isRightAligned", 
43280  function (button, position) {
43281 if (position == 3) {
43282 var ltr = button.getComponentOrientation ().isLeftToRight ();
43283 var hAlign = button.getHorizontalAlignment ();
43284 return ((ltr && (hAlign == 4 || hAlign == 11)) || (!ltr && (hAlign == 10)));
43285 }return false;
43286 }, "javax.swing.AbstractButton,~N");
43287 Clazz_defineMethod (c$, "getInset", 
43288  function (c, position) {
43289 return this.getInset (c.getInsets (), position);
43290 }, "javax.swing.JComponent,~N");
43291 Clazz_defineMethod (c$, "getInset", 
43292  function (insets, position) {
43293 if (insets == null) {
43294 return 0;
43295 }switch (position) {
43296 case 1:
43297 return insets.top;
43298 case 5:
43299 return insets.bottom;
43300 case 3:
43301 return insets.right;
43302 case 7:
43303 return insets.left;
43304 }
43305 return 0;
43306 }, "java.awt.Insets,~N");
43307 c$.INSTANCE = c$.prototype.INSTANCE =  new jssun.swing.DefaultLayoutStyle ();
43308 });
43309 Clazz_declarePackage ("javax.swing");
43310 Clazz_load (["java.lang.Enum"], "javax.swing.LayoutStyle", ["javax.swing.UIManager", "jssun.awt.AppContext"], function () {
43311 c$ = Clazz_declareType (javax.swing, "LayoutStyle");
43312 c$.setInstance = Clazz_defineMethod (c$, "setInstance", 
43313 function (style) {
43314 {
43315 if (style == null) {
43316 jssun.awt.AppContext.getAppContext ().remove (javax.swing.LayoutStyle);
43317 } else {
43318 jssun.awt.AppContext.getAppContext ().put (javax.swing.LayoutStyle, style);
43319 }}}, "javax.swing.LayoutStyle");
43320 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
43321 function () {
43322 var style;
43323 {
43324 style = jssun.awt.AppContext.getAppContext ().get (javax.swing.LayoutStyle);
43325 }if (style == null) {
43326 return javax.swing.UIManager.getLookAndFeel ().getLayoutStyle ();
43327 }return style;
43328 });
43329 Clazz_makeConstructor (c$, 
43330 function () {
43331 });
43332 Clazz_pu$h(self.c$);
43333 c$ = Clazz_declareType (javax.swing.LayoutStyle, "ComponentPlacement", Enum);
43334 Clazz_defineEnumConstant (c$, "RELATED", 0, []);
43335 Clazz_defineEnumConstant (c$, "UNRELATED", 1, []);
43336 Clazz_defineEnumConstant (c$, "INDENT", 2, []);
43337 c$ = Clazz_p0p ();
43338 });
43339 Clazz_declarePackage ("javax.swing");
43340 Clazz_load (["javax.swing.JToggleButton"], "javax.swing.JCheckBox", ["java.lang.Boolean", "javax.swing.UIManager"], function () {
43341 c$ = Clazz_decorateAsClass (function () {
43342 this.flat = false;
43343 Clazz_instantialize (this, arguments);
43344 }, javax.swing, "JCheckBox", javax.swing.JToggleButton);
43345 Clazz_makeConstructor (c$, 
43346 function () {
43347 this.construct (null, null, false);
43348 });
43349 Clazz_makeConstructor (c$, 
43350 function (icon) {
43351 this.construct (null, icon, false);
43352 }, "javax.swing.Icon");
43353 Clazz_makeConstructor (c$, 
43354 function (icon, selected) {
43355 this.construct (null, icon, selected);
43356 }, "javax.swing.Icon,~B");
43357 Clazz_makeConstructor (c$, 
43358 function (text) {
43359 this.construct (text, null, false);
43360 }, "~S");
43361 Clazz_makeConstructor (c$, 
43362 function (a) {
43363 this.construct ();
43364 this.setAction (a);
43365 }, "javax.swing.Action");
43366 Clazz_makeConstructor (c$, 
43367 function (text, selected) {
43368 this.construct (text, null, selected);
43369 }, "~S,~B");
43370 Clazz_makeConstructor (c$, 
43371 function (text, icon) {
43372 this.construct (text, icon, false);
43373 }, "~S,javax.swing.Icon");
43374 Clazz_makeConstructor (c$, 
43375 function (text, icon, selected) {
43376 Clazz_superConstructor (this, javax.swing.JCheckBox, [text, icon, selected]);
43377 this.setUIProperty ("borderPainted", Boolean.FALSE);
43378 this.setHorizontalAlignment (10);
43379 }, "~S,javax.swing.Icon,~B");
43380 Clazz_defineMethod (c$, "setBorderPaintedFlat", 
43381 function (b) {
43382 var oldValue = this.flat;
43383 this.flat = b;
43384 this.firePropertyChangeBool ("borderPaintedFlat", oldValue, this.flat);
43385 if (b != oldValue) {
43386 this.revalidate ();
43387 this.repaint ();
43388 }}, "~B");
43389 Clazz_defineMethod (c$, "isBorderPaintedFlat", 
43390 function () {
43391 return this.flat;
43392 });
43393 Clazz_overrideMethod (c$, "updateUI", 
43394 function () {
43395 this.setUI (javax.swing.UIManager.getUI (this));
43396 });
43397 Clazz_overrideMethod (c$, "getUIClassID", 
43398 function () {
43399 return "CheckBoxUI";
43400 });
43401 Clazz_overrideMethod (c$, "setIconFromAction", 
43402 function (a) {
43403 }, "javax.swing.Action");
43404 Clazz_defineStatics (c$,
43405 "BORDER_PAINTED_FLAT_CHANGED_PROPERTY", "borderPaintedFlat",
43406 "$$uiClassID", "CheckBoxUI");
43407 });
43408 Clazz_declarePackage ("java.awt");
43409 Clazz_declareInterface (java.awt, "ItemSelectable");
43410 Clazz_declarePackage ("java.awt.event");
43411 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.ItemEvent", null, function () {
43412 c$ = Clazz_decorateAsClass (function () {
43413 this.item = null;
43414 this.stateChange = 0;
43415 Clazz_instantialize (this, arguments);
43416 }, java.awt.event, "ItemEvent", java.awt.AWTEvent);
43417 Clazz_makeConstructor (c$, 
43418 function (source, id, item, stateChange) {
43419 Clazz_superConstructor (this, java.awt.event.ItemEvent, [source, id]);
43420 this.item = item;
43421 this.stateChange = stateChange;
43422 }, "java.awt.ItemSelectable,~N,~O,~N");
43423 Clazz_defineMethod (c$, "getItemSelectable", 
43424 function () {
43425 return this.source;
43426 });
43427 Clazz_defineMethod (c$, "getItem", 
43428 function () {
43429 return this.item;
43430 });
43431 Clazz_defineMethod (c$, "getStateChange", 
43432 function () {
43433 return this.stateChange;
43434 });
43435 Clazz_overrideMethod (c$, "paramString", 
43436 function () {
43437 var typeStr;
43438 switch (this.id) {
43439 case 701:
43440 typeStr = "ITEM_STATE_CHANGED";
43441 break;
43442 default:
43443 typeStr = "unknown type";
43444 }
43445 var stateStr;
43446 switch (this.stateChange) {
43447 case 1:
43448 stateStr = "SELECTED";
43449 break;
43450 case 2:
43451 stateStr = "DESELECTED";
43452 break;
43453 default:
43454 stateStr = "unknown type";
43455 }
43456 return typeStr + ",item=" + this.item + ",stateChange=" + stateStr;
43457 });
43458 Clazz_defineStatics (c$,
43459 "ITEM_FIRST", 701,
43460 "ITEM_LAST", 701,
43461 "ITEM_STATE_CHANGED", 701,
43462 "SELECTED", 1,
43463 "DESELECTED", 2);
43464 });
43465 Clazz_declarePackage ("javax.swing");
43466 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 () {
43467 c$ = Clazz_decorateAsClass (function () {
43468 this.stateMask = 0;
43469 this.actionCommand = null;
43470 this.group = null;
43471 this.mnemonic = 0;
43472 this.changeEvent = null;
43473 this.listenerList = null;
43474 this.menuItem = false;
43475 Clazz_instantialize (this, arguments);
43476 }, javax.swing, "DefaultButtonModel", null, javax.swing.ButtonModel);
43477 Clazz_prepareFields (c$, function () {
43478 this.listenerList =  new javax.swing.event.EventListenerList ();
43479 });
43480 Clazz_makeConstructor (c$, 
43481 function () {
43482 this.stateMask = 0;
43483 this.setEnabled (true);
43484 });
43485 Clazz_overrideMethod (c$, "setActionCommand", 
43486 function (actionCommand) {
43487 this.actionCommand = actionCommand;
43488 }, "~S");
43489 Clazz_overrideMethod (c$, "getActionCommand", 
43490 function () {
43491 return this.actionCommand;
43492 });
43493 Clazz_overrideMethod (c$, "isArmed", 
43494 function () {
43495 return (this.stateMask & 1) != 0;
43496 });
43497 Clazz_overrideMethod (c$, "isSelected", 
43498 function () {
43499 return (this.stateMask & 2) != 0;
43500 });
43501 Clazz_overrideMethod (c$, "isEnabled", 
43502 function () {
43503 return (this.stateMask & 8) != 0;
43504 });
43505 Clazz_overrideMethod (c$, "isPressed", 
43506 function () {
43507 return (this.stateMask & 4) != 0;
43508 });
43509 Clazz_overrideMethod (c$, "isRollover", 
43510 function () {
43511 return (this.stateMask & 16) != 0;
43512 });
43513 Clazz_overrideMethod (c$, "setArmed", 
43514 function (b) {
43515 if (this.isMenuItem () && javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
43516 if ((this.isArmed () == b)) {
43517 return;
43518 }} else {
43519 if ((this.isArmed () == b) || !this.isEnabled ()) {
43520 return;
43521 }}if (b) {
43522 this.stateMask |= 1;
43523 } else {
43524 this.stateMask &= -2;
43525 }this.fireStateChanged ();
43526 }, "~B");
43527 Clazz_overrideMethod (c$, "setEnabled", 
43528 function (b) {
43529 if (this.isEnabled () == b) {
43530 return;
43531 }if (b) {
43532 this.stateMask |= 8;
43533 } else {
43534 this.stateMask &= -9;
43535 this.stateMask &= -2;
43536 this.stateMask &= -5;
43537 }this.fireStateChanged ();
43538 }, "~B");
43539 Clazz_overrideMethod (c$, "setSelected", 
43540 function (b) {
43541 if (this.isSelected () == b) {
43542 return;
43543 }if (b) {
43544 this.stateMask |= 2;
43545 } else {
43546 this.stateMask &= -3;
43547 }this.fireItemStateChanged ( new java.awt.event.ItemEvent (this, 701, this, b ? 1 : 2));
43548 this.fireStateChanged ();
43549 }, "~B");
43550 Clazz_overrideMethod (c$, "setPressed", 
43551 function (b) {
43552 if ((this.isPressed () == b) || !this.isEnabled ()) {
43553 return;
43554 }if (b) {
43555 this.stateMask |= 4;
43556 } else {
43557 this.stateMask &= -5;
43558 }if (!this.isPressed () && this.isArmed ()) {
43559 var modifiers = 0;
43560 var currentEvent = java.awt.EventQueue.getCurrentEvent ();
43561 if (Clazz_instanceOf (currentEvent, java.awt.event.InputEvent)) {
43562 modifiers = (currentEvent).getModifiers ();
43563 } else if (Clazz_instanceOf (currentEvent, java.awt.event.ActionEvent)) {
43564 modifiers = (currentEvent).getModifiers ();
43565 }this.fireActionPerformed ( new java.awt.event.ActionEvent (this, 1001, this.getActionCommand (), java.awt.EventQueue.getMostRecentEventTime (), modifiers));
43566 }this.fireStateChanged ();
43567 }, "~B");
43568 Clazz_overrideMethod (c$, "setRollover", 
43569 function (b) {
43570 if ((this.isRollover () == b) || !this.isEnabled ()) {
43571 return;
43572 }if (b) {
43573 this.stateMask |= 16;
43574 } else {
43575 this.stateMask &= -17;
43576 }this.fireStateChanged ();
43577 }, "~B");
43578 Clazz_overrideMethod (c$, "setMnemonic", 
43579 function (key) {
43580 this.mnemonic = key;
43581 this.fireStateChanged ();
43582 }, "~N");
43583 Clazz_overrideMethod (c$, "getMnemonic", 
43584 function () {
43585 return this.mnemonic;
43586 });
43587 Clazz_overrideMethod (c$, "addChangeListener", 
43588 function (l) {
43589 this.listenerList.add (javax.swing.event.ChangeListener, l);
43590 }, "javax.swing.event.ChangeListener");
43591 Clazz_overrideMethod (c$, "removeChangeListener", 
43592 function (l) {
43593 this.listenerList.remove (javax.swing.event.ChangeListener, l);
43594 }, "javax.swing.event.ChangeListener");
43595 Clazz_defineMethod (c$, "getChangeListeners", 
43596 function () {
43597 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
43598 });
43599 Clazz_defineMethod (c$, "fireStateChanged", 
43600 function () {
43601 var listeners = this.listenerList.getListenerList ();
43602 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43603 if (listeners[i] === javax.swing.event.ChangeListener) {
43604 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
43605 (listeners[i + 1]).stateChanged (this.changeEvent);
43606 }}
43607 });
43608 Clazz_overrideMethod (c$, "addActionListener", 
43609 function (l) {
43610 this.listenerList.add (java.awt.event.ActionListener, l);
43611 }, "java.awt.event.ActionListener");
43612 Clazz_overrideMethod (c$, "removeActionListener", 
43613 function (l) {
43614 this.listenerList.remove (java.awt.event.ActionListener, l);
43615 }, "java.awt.event.ActionListener");
43616 Clazz_defineMethod (c$, "getActionListeners", 
43617 function () {
43618 return this.listenerList.getListeners (java.awt.event.ActionListener);
43619 });
43620 Clazz_defineMethod (c$, "fireActionPerformed", 
43621 function (e) {
43622 var listeners = this.listenerList.getListenerList ();
43623 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43624 if (listeners[i] === java.awt.event.ActionListener) {
43625 (listeners[i + 1]).actionPerformed (e);
43626 }}
43627 }, "java.awt.event.ActionEvent");
43628 Clazz_overrideMethod (c$, "addItemListener", 
43629 function (l) {
43630 this.listenerList.add (java.awt.event.ItemListener, l);
43631 }, "java.awt.event.ItemListener");
43632 Clazz_overrideMethod (c$, "removeItemListener", 
43633 function (l) {
43634 this.listenerList.remove (java.awt.event.ItemListener, l);
43635 }, "java.awt.event.ItemListener");
43636 Clazz_defineMethod (c$, "getItemListeners", 
43637 function () {
43638 return this.listenerList.getListeners (java.awt.event.ItemListener);
43639 });
43640 Clazz_defineMethod (c$, "fireItemStateChanged", 
43641 function (e) {
43642 var listeners = this.listenerList.getListenerList ();
43643 for (var i = listeners.length - 2; i >= 0; i -= 2) {
43644 if (listeners[i] === java.awt.event.ItemListener) {
43645 (listeners[i + 1]).itemStateChanged (e);
43646 }}
43647 }, "java.awt.event.ItemEvent");
43648 Clazz_defineMethod (c$, "getListeners", 
43649 function (listenerType) {
43650 return this.listenerList.getListeners (listenerType);
43651 }, "Class");
43652 Clazz_overrideMethod (c$, "getSelectedObjects", 
43653 function () {
43654 return null;
43655 });
43656 Clazz_overrideMethod (c$, "setGroup", 
43657 function (group) {
43658 this.group = group;
43659 }, "javax.swing.ButtonGroup");
43660 Clazz_defineMethod (c$, "getGroup", 
43661 function () {
43662 return this.group;
43663 });
43664 Clazz_defineMethod (c$, "isMenuItem", 
43665 function () {
43666 return this.menuItem;
43667 });
43668 Clazz_defineMethod (c$, "setMenuItem", 
43669 function (menuItem) {
43670 this.menuItem = menuItem;
43671 }, "~B");
43672 Clazz_defineStatics (c$,
43673 "ARMED", 1,
43674 "SELECTED", 2,
43675 "PRESSED", 4,
43676 "ENABLED", 8,
43677 "ROLLOVER", 16);
43678 });
43679 Clazz_declarePackage ("javax.swing");
43680 Clazz_load (["java.awt.LayoutManager2"], "javax.swing.OverlayLayout", ["java.awt.AWTError", "$.Dimension", "javax.swing.SizeRequirements"], function () {
43681 c$ = Clazz_decorateAsClass (function () {
43682 this.target = null;
43683 this.xChildren = null;
43684 this.yChildren = null;
43685 this.xTotal = null;
43686 this.yTotal = null;
43687 Clazz_instantialize (this, arguments);
43688 }, javax.swing, "OverlayLayout", null, java.awt.LayoutManager2);
43689 Clazz_makeConstructor (c$, 
43690 function (target) {
43691 this.target = target;
43692 }, "java.awt.Container");
43693 Clazz_defineMethod (c$, "getTarget", 
43694 function () {
43695 return this.target;
43696 });
43697 Clazz_overrideMethod (c$, "invalidateLayout", 
43698 function (target) {
43699 this.checkContainer (target);
43700 this.xChildren = null;
43701 this.yChildren = null;
43702 this.xTotal = null;
43703 this.yTotal = null;
43704 }, "java.awt.Container");
43705 Clazz_defineMethod (c$, "addLayoutComponent", 
43706 function (name, comp) {
43707 this.invalidateLayout (comp.getParent ());
43708 }, "~S,java.awt.Component");
43709 Clazz_overrideMethod (c$, "removeLayoutComponent", 
43710 function (comp) {
43711 this.invalidateLayout (comp.getParent ());
43712 }, "java.awt.Component");
43713 Clazz_defineMethod (c$, "addLayoutComponent", 
43714 function (comp, constraints) {
43715 this.invalidateLayout (comp.getParent ());
43716 }, "java.awt.Component,~O");
43717 Clazz_overrideMethod (c$, "preferredLayoutSize", 
43718 function (target) {
43719 this.checkContainer (target);
43720 this.checkRequests ();
43721 var size =  new java.awt.Dimension (this.xTotal.preferred, this.yTotal.preferred);
43722 var insets = target.getInsets ();
43723 size.width += insets.left + insets.right;
43724 size.height += insets.top + insets.bottom;
43725 return size;
43726 }, "java.awt.Container");
43727 Clazz_overrideMethod (c$, "minimumLayoutSize", 
43728 function (target) {
43729 this.checkContainer (target);
43730 this.checkRequests ();
43731 var size =  new java.awt.Dimension (this.xTotal.minimum, this.yTotal.minimum);
43732 var insets = target.getInsets ();
43733 size.width += insets.left + insets.right;
43734 size.height += insets.top + insets.bottom;
43735 return size;
43736 }, "java.awt.Container");
43737 Clazz_overrideMethod (c$, "maximumLayoutSize", 
43738 function (target) {
43739 this.checkContainer (target);
43740 this.checkRequests ();
43741 var size =  new java.awt.Dimension (this.xTotal.maximum, this.yTotal.maximum);
43742 var insets = target.getInsets ();
43743 size.width += insets.left + insets.right;
43744 size.height += insets.top + insets.bottom;
43745 return size;
43746 }, "java.awt.Container");
43747 Clazz_overrideMethod (c$, "getLayoutAlignmentX", 
43748 function (target) {
43749 this.checkContainer (target);
43750 this.checkRequests ();
43751 return this.xTotal.alignment;
43752 }, "java.awt.Container");
43753 Clazz_overrideMethod (c$, "getLayoutAlignmentY", 
43754 function (target) {
43755 this.checkContainer (target);
43756 this.checkRequests ();
43757 return this.yTotal.alignment;
43758 }, "java.awt.Container");
43759 Clazz_overrideMethod (c$, "layoutContainer", 
43760 function (target) {
43761 this.checkContainer (target);
43762 this.checkRequests ();
43763 var nChildren = target.getComponentCount ();
43764 var xOffsets =  Clazz_newIntArray (nChildren, 0);
43765 var xSpans =  Clazz_newIntArray (nChildren, 0);
43766 var yOffsets =  Clazz_newIntArray (nChildren, 0);
43767 var ySpans =  Clazz_newIntArray (nChildren, 0);
43768 var alloc = target.getSize ();
43769 var $in = target.getInsets ();
43770 alloc.width -= $in.left + $in.right;
43771 alloc.height -= $in.top + $in.bottom;
43772 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.width, this.xTotal, this.xChildren, xOffsets, xSpans);
43773 javax.swing.SizeRequirements.calculateAlignedPositions (alloc.height, this.yTotal, this.yChildren, yOffsets, ySpans);
43774 for (var i = 0; i < nChildren; i++) {
43775 var c = target.getComponent (i);
43776 c.setBounds ($in.left + xOffsets[i], $in.top + yOffsets[i], xSpans[i], ySpans[i]);
43777 }
43778 }, "java.awt.Container");
43779 Clazz_defineMethod (c$, "checkContainer", 
43780 function (target) {
43781 if (this.target !== target) {
43782 throw  new java.awt.AWTError ("OverlayLayout can't be shared");
43783 }}, "java.awt.Container");
43784 Clazz_defineMethod (c$, "checkRequests", 
43785 function () {
43786 if (this.xChildren == null || this.yChildren == null) {
43787 var n = this.target.getComponentCount ();
43788 this.xChildren =  new Array (n);
43789 this.yChildren =  new Array (n);
43790 for (var i = 0; i < n; i++) {
43791 var c = this.target.getComponent (i);
43792 var min = c.getMinimumSize ();
43793 var typ = c.getPreferredSize ();
43794 var max = c.getMaximumSize ();
43795 this.xChildren[i] =  new javax.swing.SizeRequirements (min.width, typ.width, max.width, c.getAlignmentX ());
43796 this.yChildren[i] =  new javax.swing.SizeRequirements (min.height, typ.height, max.height, c.getAlignmentY ());
43797 }
43798 this.xTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.xChildren);
43799 this.yTotal = javax.swing.SizeRequirements.getAlignedSizeRequirements (this.yChildren);
43800 }});
43801 });
43802 Clazz_declarePackage ("javax.swing");
43803 c$ = Clazz_decorateAsClass (function () {
43804 this.minimum = 0;
43805 this.preferred = 0;
43806 this.maximum = 0;
43807 this.alignment = 0;
43808 Clazz_instantialize (this, arguments);
43809 }, javax.swing, "SizeRequirements");
43810 Clazz_makeConstructor (c$, 
43811 function () {
43812 this.minimum = 0;
43813 this.preferred = 0;
43814 this.maximum = 0;
43815 this.alignment = 0.5;
43816 });
43817 Clazz_makeConstructor (c$, 
43818 function (min, pref, max, a) {
43819 this.minimum = min;
43820 this.preferred = pref;
43821 this.maximum = max;
43822 this.alignment = a > 1.0 ? 1.0 : a < 0.0 ? 0.0 : a;
43823 }, "~N,~N,~N,~N");
43824 Clazz_overrideMethod (c$, "toString", 
43825 function () {
43826 return "[" + this.minimum + "," + this.preferred + "," + this.maximum + "]@" + this.alignment;
43827 });
43828 c$.getTiledSizeRequirements = Clazz_defineMethod (c$, "getTiledSizeRequirements", 
43829 function (children) {
43830 var total =  new javax.swing.SizeRequirements ();
43831 for (var i = 0; i < children.length; i++) {
43832 var req = children[i];
43833 total.minimum = Math.min (total.minimum + req.minimum, 2147483647);
43834 total.preferred = Math.min (total.preferred + req.preferred, 2147483647);
43835 total.maximum = Math.min (total.maximum + req.maximum, 2147483647);
43836 }
43837 return total;
43838 }, "~A");
43839 c$.getAlignedSizeRequirements = Clazz_defineMethod (c$, "getAlignedSizeRequirements", 
43840 function (children) {
43841 var totalAscent =  new javax.swing.SizeRequirements ();
43842 var totalDescent =  new javax.swing.SizeRequirements ();
43843 for (var i = 0; i < children.length; i++) {
43844 var req = children[i];
43845 var ascent = Clazz_floatToInt (req.alignment * req.minimum);
43846 var descent = req.minimum - ascent;
43847 totalAscent.minimum = Math.max (ascent, totalAscent.minimum);
43848 totalDescent.minimum = Math.max (descent, totalDescent.minimum);
43849 ascent = Clazz_floatToInt (req.alignment * req.preferred);
43850 descent = req.preferred - ascent;
43851 totalAscent.preferred = Math.max (ascent, totalAscent.preferred);
43852 totalDescent.preferred = Math.max (descent, totalDescent.preferred);
43853 ascent = Clazz_floatToInt (req.alignment * req.maximum);
43854 descent = req.maximum - ascent;
43855 totalAscent.maximum = Math.max (ascent, totalAscent.maximum);
43856 totalDescent.maximum = Math.max (descent, totalDescent.maximum);
43857 }
43858 var min = Math.min (totalAscent.minimum + totalDescent.minimum, 2147483647);
43859 var pref = Math.min (totalAscent.preferred + totalDescent.preferred, 2147483647);
43860 var max = Math.min (totalAscent.maximum + totalDescent.maximum, 2147483647);
43861 var alignment = 0.0;
43862 if (min > 0) {
43863 alignment = totalAscent.minimum / min;
43864 alignment = alignment > 1.0 ? 1.0 : alignment < 0.0 ? 0.0 : alignment;
43865 }return  new javax.swing.SizeRequirements (min, pref, max, alignment);
43866 }, "~A");
43867 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43868 function (allocated, total, children, offsets, spans) {
43869 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, true);
43870 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43871 c$.calculateTiledPositions = Clazz_defineMethod (c$, "calculateTiledPositions", 
43872 function (allocated, total, children, offsets, spans, forward) {
43873 javax.swing.SizeRequirements.calcTiled (allocated, total, children, offsets, spans, forward);
43874 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43875 c$.calcTiled = Clazz_defineMethod (c$, "calcTiled", 
43876 function (allocated, total, children, offsets, spans, forward) {
43877 var min = 0;
43878 var pref = 0;
43879 var max = 0;
43880 for (var i = 0; i < children.length; i++) {
43881 min += children[i].minimum;
43882 pref += children[i].preferred;
43883 max += children[i].maximum;
43884 }
43885 if (allocated >= pref) {
43886 javax.swing.SizeRequirements.expandedTile (allocated, min, pref, max, children, offsets, spans, forward);
43887 } else {
43888 javax.swing.SizeRequirements.compressedTile (allocated, min, pref, max, children, offsets, spans, forward);
43889 }}, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43890 c$.compressedTile = Clazz_defineMethod (c$, "compressedTile", 
43891  function (allocated, min, pref, max, request, offsets, spans, forward) {
43892 var totalPlay = Math.min (pref - allocated, pref - min);
43893 var factor = (pref - min == 0) ? 0.0 : totalPlay / (pref - min);
43894 var totalOffset;
43895 if (forward) {
43896 totalOffset = 0;
43897 for (var i = 0; i < spans.length; i++) {
43898 offsets[i] = totalOffset;
43899 var req = request[i];
43900 var play = factor * (req.preferred - req.minimum);
43901 spans[i] = Clazz_floatToInt (req.preferred - play);
43902 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43903 }
43904 } else {
43905 totalOffset = allocated;
43906 for (var i = 0; i < spans.length; i++) {
43907 var req = request[i];
43908 var play = factor * (req.preferred - req.minimum);
43909 spans[i] = Clazz_floatToInt (req.preferred - play);
43910 offsets[i] = totalOffset - spans[i];
43911 totalOffset = Math.max (totalOffset - spans[i], 0);
43912 }
43913 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43914 c$.expandedTile = Clazz_defineMethod (c$, "expandedTile", 
43915  function (allocated, min, pref, max, request, offsets, spans, forward) {
43916 var totalPlay = Math.min (allocated - pref, max - pref);
43917 var factor = (max - pref == 0) ? 0.0 : totalPlay / (max - pref);
43918 var totalOffset;
43919 if (forward) {
43920 totalOffset = 0;
43921 for (var i = 0; i < spans.length; i++) {
43922 offsets[i] = totalOffset;
43923 var req = request[i];
43924 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43925 spans[i] = Math.min (req.preferred + play, 2147483647);
43926 totalOffset = Math.min (totalOffset + spans[i], 2147483647);
43927 }
43928 } else {
43929 totalOffset = allocated;
43930 for (var i = 0; i < spans.length; i++) {
43931 var req = request[i];
43932 var play = Clazz_floatToInt (factor * (req.maximum - req.preferred));
43933 spans[i] = Math.min (req.preferred + play, 2147483647);
43934 offsets[i] = totalOffset - spans[i];
43935 totalOffset = Math.max (totalOffset - spans[i], 0);
43936 }
43937 }}, "~N,~N,~N,~N,~A,~A,~A,~B");
43938 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
43939 function (allocated, total, children, offsets, spans) {
43940 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, true);
43941 }, "~N,javax.swing.SizeRequirements,~A,~A,~A");
43942 c$.calcAligned = Clazz_defineMethod (c$, "calcAligned", 
43943 function (allocated, total, children, offsets, spans, normal) {
43944 var totalAlignment = normal ? total.alignment : 1.0 - total.alignment;
43945 var totalAscent = Clazz_floatToInt (allocated * totalAlignment);
43946 var totalDescent = allocated - totalAscent;
43947 for (var i = 0; i < children.length; i++) {
43948 var req = children[i];
43949 var alignment = normal ? req.alignment : 1.0 - req.alignment;
43950 var maxAscent = Clazz_floatToInt (req.maximum * alignment);
43951 var maxDescent = req.maximum - maxAscent;
43952 var ascent = Math.min (totalAscent, maxAscent);
43953 var descent = Math.min (totalDescent, maxDescent);
43954 offsets[i] = totalAscent - ascent;
43955 spans[i] = Math.min (ascent + descent, 2147483647);
43956 }
43957 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43958 c$.calculateAlignedPositions = Clazz_defineMethod (c$, "calculateAlignedPositions", 
43959 function (allocated, total, children, offsets, spans, normal) {
43960 javax.swing.SizeRequirements.calcAligned (allocated, total, children, offsets, spans, normal);
43961 }, "~N,javax.swing.SizeRequirements,~A,~A,~A,~B");
43962 c$.adjustSizes = Clazz_defineMethod (c$, "adjustSizes", 
43963 function (delta, children) {
43964 return  Clazz_newIntArray (0, 0);
43965 }, "~N,~A");
43966 Clazz_declarePackage ("javax.swing");
43967 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JLabel", ["java.lang.IllegalArgumentException", "javax.swing.SwingUtilities", "$.UIManager"], function () {
43968 c$ = Clazz_decorateAsClass (function () {
43969 this.mnemonic = '\0';
43970 this.mnemonicIndex = -1;
43971 this.text = "";
43972 this.defaultIcon = null;
43973 this.disabledIcon = null;
43974 this.disabledIconSet = false;
43975 this.verticalAlignment = 0;
43976 this.horizontalAlignment = 10;
43977 this.verticalTextPosition = 0;
43978 this.horizontalTextPosition = 11;
43979 this.iconTextGap = 4;
43980 this.labelFor = null;
43981 Clazz_instantialize (this, arguments);
43982 }, javax.swing, "JLabel", javax.swing.JComponent, javax.swing.SwingConstants);
43983 Clazz_makeConstructor (c$, 
43984 function (text, icon, horizontalAlignment) {
43985 Clazz_superConstructor (this, javax.swing.JLabel, []);
43986 this.setText (text);
43987 this.setIcon (icon);
43988 this.setHorizontalAlignment (horizontalAlignment);
43989 this.updateUI ();
43990 this.setAlignmentX (0.0);
43991 }, "~S,javax.swing.Icon,~N");
43992 Clazz_makeConstructor (c$, 
43993 function (text, horizontalAlignment) {
43994 this.construct (text, null, horizontalAlignment);
43995 }, "~S,~N");
43996 Clazz_makeConstructor (c$, 
43997 function (text) {
43998 this.construct (text, null, 10);
43999 }, "~S");
44000 Clazz_makeConstructor (c$, 
44001 function (image, horizontalAlignment) {
44002 this.construct (null, image, horizontalAlignment);
44003 }, "javax.swing.Icon,~N");
44004 Clazz_makeConstructor (c$, 
44005 function (image) {
44006 this.construct (null, image, 0);
44007 }, "javax.swing.Icon");
44008 Clazz_makeConstructor (c$, 
44009 function () {
44010 this.construct ("", null, 10);
44011 });
44012 Clazz_overrideMethod (c$, "getUI", 
44013 function () {
44014 return this.ui;
44015 });
44016 Clazz_defineMethod (c$, "setUI", 
44017 function (ui) {
44018 Clazz_superCall (this, javax.swing.JLabel, "setUI", [ui]);
44019 if (!this.disabledIconSet && this.disabledIcon != null) {
44020 this.setDisabledIcon (null);
44021 }}, "javax.swing.plaf.LabelUI");
44022 Clazz_overrideMethod (c$, "updateUI", 
44023 function () {
44024 this.setUI (javax.swing.UIManager.getUI (this));
44025 });
44026 Clazz_overrideMethod (c$, "getUIClassID", 
44027 function () {
44028 return "LabelUI";
44029 });
44030 Clazz_defineMethod (c$, "getText", 
44031 function () {
44032 return this.text;
44033 });
44034 Clazz_defineMethod (c$, "setText", 
44035 function (text) {
44036 var oldValue = this.text;
44037 this.text = text;
44038 this.firePropertyChangeObject ("text", oldValue, text);
44039 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (text, this.getDisplayedMnemonic ()));
44040 if (text == null || oldValue == null || !text.equals (oldValue)) {
44041 this.revalidate ();
44042 this.repaint ();
44043 }}, "~S");
44044 Clazz_defineMethod (c$, "getIcon", 
44045 function () {
44046 return this.defaultIcon;
44047 });
44048 Clazz_defineMethod (c$, "setIcon", 
44049 function (icon) {
44050 var oldValue = this.defaultIcon;
44051 this.defaultIcon = icon;
44052 if ((this.defaultIcon !== oldValue) && !this.disabledIconSet) {
44053 this.disabledIcon = null;
44054 }this.firePropertyChangeObject ("icon", oldValue, this.defaultIcon);
44055 if (this.defaultIcon !== oldValue) {
44056 if ((this.defaultIcon == null) || (oldValue == null) || (this.defaultIcon.getIconWidth () != oldValue.getIconWidth ()) || (this.defaultIcon.getIconHeight () != oldValue.getIconHeight ())) {
44057 this.revalidate ();
44058 }this.repaint ();
44059 }}, "javax.swing.Icon");
44060 Clazz_defineMethod (c$, "getDisabledIcon", 
44061 function () {
44062 if (!this.disabledIconSet && this.disabledIcon == null && this.defaultIcon != null) {
44063 this.disabledIcon = javax.swing.UIManager.getLookAndFeel ().getDisabledIcon (this, this.defaultIcon);
44064 if (this.disabledIcon != null) {
44065 this.firePropertyChangeObject ("disabledIcon", null, this.disabledIcon);
44066 }}return this.disabledIcon;
44067 });
44068 Clazz_defineMethod (c$, "setDisabledIcon", 
44069 function (disabledIcon) {
44070 var oldValue = this.disabledIcon;
44071 this.disabledIcon = disabledIcon;
44072 this.disabledIconSet = (disabledIcon != null);
44073 this.firePropertyChangeObject ("disabledIcon", oldValue, disabledIcon);
44074 if (disabledIcon !== oldValue) {
44075 if (disabledIcon == null || oldValue == null || disabledIcon.getIconWidth () != oldValue.getIconWidth () || disabledIcon.getIconHeight () != oldValue.getIconHeight ()) {
44076 this.revalidate ();
44077 }if (!this.isEnabled ()) {
44078 this.repaint ();
44079 }}}, "javax.swing.Icon");
44080 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44081 function (key) {
44082 var oldKey = this.mnemonic;
44083 this.mnemonic = key;
44084 this.firePropertyChangeInt ("displayedMnemonic", oldKey, this.mnemonic);
44085 this.setDisplayedMnemonicIndex (javax.swing.SwingUtilities.findDisplayedMnemonicIndex (this.getText (), this.mnemonic));
44086 if (key != oldKey) {
44087 this.revalidate ();
44088 this.repaint ();
44089 }}, "~N");
44090 Clazz_defineMethod (c$, "setDisplayedMnemonic", 
44091 function (aChar) {
44092 var vk = (aChar).charCodeAt (0);
44093 if (vk >= 97 && vk <= 122) vk -= (32);
44094 this.setDisplayedMnemonic (vk);
44095 }, "~S");
44096 Clazz_defineMethod (c$, "getDisplayedMnemonic", 
44097 function () {
44098 return this.mnemonic;
44099 });
44100 Clazz_defineMethod (c$, "setDisplayedMnemonicIndex", 
44101 function (index) {
44102 var oldValue = this.mnemonicIndex;
44103 if (index == -1) {
44104 this.mnemonicIndex = -1;
44105 } else {
44106 var text = this.getText ();
44107 var textLength = (text == null) ? 0 : text.length;
44108 if (index < -1 || index >= textLength) {
44109 throw  new IllegalArgumentException ("index == " + index);
44110 }}this.mnemonicIndex = index;
44111 this.firePropertyChangeInt ("displayedMnemonicIndex", oldValue, index);
44112 if (index != oldValue) {
44113 this.revalidate ();
44114 this.repaint ();
44115 }}, "~N");
44116 Clazz_defineMethod (c$, "getDisplayedMnemonicIndex", 
44117 function () {
44118 return this.mnemonicIndex;
44119 });
44120 Clazz_defineMethod (c$, "checkHorizontalKey", 
44121 function (key, message) {
44122 if ((key == 2) || (key == 0) || (key == 4) || (key == 10) || (key == 11)) {
44123 return key;
44124 } else {
44125 throw  new IllegalArgumentException (message);
44126 }}, "~N,~S");
44127 Clazz_defineMethod (c$, "checkVerticalKey", 
44128 function (key, message) {
44129 if ((key == 1) || (key == 0) || (key == 3)) {
44130 return key;
44131 } else {
44132 throw  new IllegalArgumentException (message);
44133 }}, "~N,~S");
44134 Clazz_defineMethod (c$, "getIconTextGap", 
44135 function () {
44136 return this.iconTextGap;
44137 });
44138 Clazz_defineMethod (c$, "setIconTextGap", 
44139 function (iconTextGap) {
44140 var oldValue = this.iconTextGap;
44141 this.iconTextGap = iconTextGap;
44142 this.firePropertyChangeInt ("iconTextGap", oldValue, iconTextGap);
44143 if (iconTextGap != oldValue) {
44144 this.revalidate ();
44145 this.repaint ();
44146 }}, "~N");
44147 Clazz_defineMethod (c$, "getVerticalAlignment", 
44148 function () {
44149 return this.verticalAlignment;
44150 });
44151 Clazz_defineMethod (c$, "setVerticalAlignment", 
44152 function (alignment) {
44153 if (alignment == this.verticalAlignment) return;
44154 var oldValue = this.verticalAlignment;
44155 this.verticalAlignment = this.checkVerticalKey (alignment, "verticalAlignment");
44156 this.firePropertyChangeInt ("verticalAlignment", oldValue, this.verticalAlignment);
44157 this.repaint ();
44158 }, "~N");
44159 Clazz_defineMethod (c$, "getHorizontalAlignment", 
44160 function () {
44161 return this.horizontalAlignment;
44162 });
44163 Clazz_defineMethod (c$, "setHorizontalAlignment", 
44164 function (alignment) {
44165 if (alignment == this.horizontalAlignment) return;
44166 var oldValue = this.horizontalAlignment;
44167 this.horizontalAlignment = this.checkHorizontalKey (alignment, "horizontalAlignment");
44168 this.firePropertyChangeInt ("horizontalAlignment", oldValue, this.horizontalAlignment);
44169 this.repaint ();
44170 }, "~N");
44171 Clazz_defineMethod (c$, "getVerticalTextPosition", 
44172 function () {
44173 return this.verticalTextPosition;
44174 });
44175 Clazz_defineMethod (c$, "setVerticalTextPosition", 
44176 function (textPosition) {
44177 if (textPosition == this.verticalTextPosition) return;
44178 var old = this.verticalTextPosition;
44179 this.verticalTextPosition = this.checkVerticalKey (textPosition, "verticalTextPosition");
44180 this.firePropertyChangeInt ("verticalTextPosition", old, this.verticalTextPosition);
44181 this.revalidate ();
44182 this.repaint ();
44183 }, "~N");
44184 Clazz_defineMethod (c$, "getHorizontalTextPosition", 
44185 function () {
44186 return this.horizontalTextPosition;
44187 });
44188 Clazz_defineMethod (c$, "setHorizontalTextPosition", 
44189 function (textPosition) {
44190 var old = this.horizontalTextPosition;
44191 this.horizontalTextPosition = this.checkHorizontalKey (textPosition, "horizontalTextPosition");
44192 this.firePropertyChangeInt ("horizontalTextPosition", old, this.horizontalTextPosition);
44193 this.revalidate ();
44194 this.repaint ();
44195 }, "~N");
44196 Clazz_defineMethod (c$, "imageUpdate", 
44197 function (img, infoflags, x, y, w, h) {
44198 if (!this.isShowing () || !javax.swing.SwingUtilities.doesIconReferenceImage (this.getIcon (), img) && !javax.swing.SwingUtilities.doesIconReferenceImage (this.disabledIcon, img)) {
44199 return false;
44200 }return Clazz_superCall (this, javax.swing.JLabel, "imageUpdate", [img, infoflags, x, y, w, h]);
44201 }, "java.awt.Image,~N,~N,~N,~N,~N");
44202 Clazz_defineMethod (c$, "paramString", 
44203 function () {
44204 var textString = (this.text != null ? this.text : "");
44205 var defaultIconString = ((this.defaultIcon != null) && (this.defaultIcon !== this) ? this.defaultIcon.toString () : "");
44206 var disabledIconString = ((this.disabledIcon != null) && (this.disabledIcon !== this) ? this.disabledIcon.toString () : "");
44207 var labelForString = (this.labelFor != null ? this.labelFor.toString () : "");
44208 var verticalAlignmentString;
44209 if (this.verticalAlignment == 1) {
44210 verticalAlignmentString = "TOP";
44211 } else if (this.verticalAlignment == 0) {
44212 verticalAlignmentString = "CENTER";
44213 } else if (this.verticalAlignment == 3) {
44214 verticalAlignmentString = "BOTTOM";
44215 } else verticalAlignmentString = "";
44216 var horizontalAlignmentString;
44217 if (this.horizontalAlignment == 2) {
44218 horizontalAlignmentString = "LEFT";
44219 } else if (this.horizontalAlignment == 0) {
44220 horizontalAlignmentString = "CENTER";
44221 } else if (this.horizontalAlignment == 4) {
44222 horizontalAlignmentString = "RIGHT";
44223 } else if (this.horizontalAlignment == 10) {
44224 horizontalAlignmentString = "LEADING";
44225 } else if (this.horizontalAlignment == 11) {
44226 horizontalAlignmentString = "TRAILING";
44227 } else horizontalAlignmentString = "";
44228 var verticalTextPositionString;
44229 if (this.verticalTextPosition == 1) {
44230 verticalTextPositionString = "TOP";
44231 } else if (this.verticalTextPosition == 0) {
44232 verticalTextPositionString = "CENTER";
44233 } else if (this.verticalTextPosition == 3) {
44234 verticalTextPositionString = "BOTTOM";
44235 } else verticalTextPositionString = "";
44236 var horizontalTextPositionString;
44237 if (this.horizontalTextPosition == 2) {
44238 horizontalTextPositionString = "LEFT";
44239 } else if (this.horizontalTextPosition == 0) {
44240 horizontalTextPositionString = "CENTER";
44241 } else if (this.horizontalTextPosition == 4) {
44242 horizontalTextPositionString = "RIGHT";
44243 } else if (this.horizontalTextPosition == 10) {
44244 horizontalTextPositionString = "LEADING";
44245 } else if (this.horizontalTextPosition == 11) {
44246 horizontalTextPositionString = "TRAILING";
44247 } else horizontalTextPositionString = "";
44248 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;
44249 });
44250 Clazz_defineMethod (c$, "getLabelFor", 
44251 function () {
44252 return this.labelFor;
44253 });
44254 Clazz_defineMethod (c$, "setLabelFor", 
44255 function (c) {
44256 var oldC = this.labelFor;
44257 this.labelFor = c;
44258 this.firePropertyChangeObject ("labelFor", oldC, c);
44259 if (Clazz_instanceOf (oldC, javax.swing.JComponent)) {
44260 (oldC).putClientProperty ("labeledBy", null);
44261 }if (Clazz_instanceOf (c, javax.swing.JComponent)) {
44262 (c).putClientProperty ("labeledBy", this);
44263 }}, "java.awt.Component");
44264 Clazz_defineStatics (c$,
44265 "$uiClassID", "LabelUI",
44266 "LABELED_BY_PROPERTY", "labeledBy");
44267 });
44268 Clazz_declarePackage ("javax.swing.border");
44269 Clazz_declareInterface (javax.swing.border, "Border");
44270 Clazz_declarePackage ("javax.swing");
44271 Clazz_declareInterface (javax.swing, "RootPaneContainer");
44272 Clazz_declarePackage ("javax.swing.event");
44273 Clazz_load (["java.awt.event.MouseEvent"], "javax.swing.event.MenuDragMouseEvent", null, function () {
44274 c$ = Clazz_decorateAsClass (function () {
44275 this.path = null;
44276 this.manager = null;
44277 Clazz_instantialize (this, arguments);
44278 }, javax.swing.event, "MenuDragMouseEvent", java.awt.event.MouseEvent);
44279 Clazz_makeConstructor (c$, 
44280 function (source, id, when, modifiers, x, y, clickCount, popupTrigger, p, m) {
44281 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, clickCount, popupTrigger]);
44282 this.path = p;
44283 this.manager = m;
44284 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44285 Clazz_makeConstructor (c$, 
44286 function (source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, p, m) {
44287 Clazz_superConstructor (this, javax.swing.event.MenuDragMouseEvent, [source, id, when, modifiers, x, y, xAbs, yAbs, clickCount, popupTrigger, 0]);
44288 this.path = p;
44289 this.manager = m;
44290 }, "java.awt.Component,~N,~N,~N,~N,~N,~N,~N,~N,~B,~A,javax.swing.MenuSelectionManager");
44291 Clazz_defineMethod (c$, "getPath", 
44292 function () {
44293 return this.path;
44294 });
44295 Clazz_defineMethod (c$, "getMenuSelectionManager", 
44296 function () {
44297 return this.manager;
44298 });
44299 });
44300 Clazz_declarePackage ("jssun.swing");
44301 Clazz_load (["javax.swing.Action"], "jssun.swing.UIAction", null, function () {
44302 c$ = Clazz_decorateAsClass (function () {
44303 this.name = null;
44304 Clazz_instantialize (this, arguments);
44305 }, jssun.swing, "UIAction", null, javax.swing.Action);
44306 Clazz_makeConstructor (c$, 
44307 function (name) {
44308 this.name = name;
44309 }, "~S");
44310 Clazz_defineMethod (c$, "getName", 
44311 function () {
44312 return this.name;
44313 });
44314 Clazz_overrideMethod (c$, "getValue", 
44315 function (key) {
44316 if (key === "Name") {
44317 return this.name;
44318 }return null;
44319 }, "~S");
44320 Clazz_overrideMethod (c$, "putValue", 
44321 function (key, value) {
44322 }, "~S,~O");
44323 Clazz_overrideMethod (c$, "setEnabled", 
44324 function (b) {
44325 }, "~B");
44326 Clazz_defineMethod (c$, "isEnabled", 
44327 function () {
44328 return this.isEnabled (null);
44329 });
44330 Clazz_defineMethod (c$, "isEnabled", 
44331 function (sender) {
44332 return true;
44333 }, "~O");
44334 Clazz_overrideMethod (c$, "addPropertyChangeListener", 
44335 function (listener) {
44336 }, "java.beans.PropertyChangeListener");
44337 Clazz_overrideMethod (c$, "removePropertyChangeListener", 
44338 function (listener) {
44339 }, "java.beans.PropertyChangeListener");
44340 });
44341 Clazz_declarePackage ("jssun.awt");
44342 Clazz_declareInterface (jssun.awt, "RequestFocusController");
44343 Clazz_declarePackage ("javax.swing");
44344 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 () {
44345 c$ = Clazz_decorateAsClass (function () {
44346 this.firstInvisibleAncestor = null;
44347 this.listenerList = null;
44348 this.root = null;
44349 Clazz_instantialize (this, arguments);
44350 }, javax.swing, "AncestorNotifier", null, [java.awt.event.ComponentListener, java.beans.PropertyChangeListener]);
44351 Clazz_prepareFields (c$, function () {
44352 this.listenerList =  new javax.swing.event.EventListenerList ();
44353 });
44354 Clazz_makeConstructor (c$, 
44355 function (root) {
44356 this.root = root;
44357 this.addListeners (root, true);
44358 }, "javax.swing.JComponent");
44359 Clazz_defineMethod (c$, "addAncestorListener", 
44360 function (l) {
44361 this.listenerList.add (javax.swing.event.AncestorListener, l);
44362 }, "javax.swing.event.AncestorListener");
44363 Clazz_defineMethod (c$, "removeAncestorListener", 
44364 function (l) {
44365 this.listenerList.remove (javax.swing.event.AncestorListener, l);
44366 }, "javax.swing.event.AncestorListener");
44367 Clazz_defineMethod (c$, "getAncestorListeners", 
44368 function () {
44369 return this.listenerList.getListeners (javax.swing.event.AncestorListener);
44370 });
44371 Clazz_defineMethod (c$, "fireAncestorAdded", 
44372 function (source, id, ancestor, ancestorParent) {
44373 var listeners = this.listenerList.getListenerList ();
44374 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44375 if (listeners[i] === javax.swing.event.AncestorListener) {
44376 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44377 (listeners[i + 1]).ancestorAdded (ancestorEvent);
44378 }}
44379 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44380 Clazz_defineMethod (c$, "fireAncestorRemoved", 
44381 function (source, id, ancestor, ancestorParent) {
44382 var listeners = this.listenerList.getListenerList ();
44383 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44384 if (listeners[i] === javax.swing.event.AncestorListener) {
44385 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44386 (listeners[i + 1]).ancestorRemoved (ancestorEvent);
44387 }}
44388 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44389 Clazz_defineMethod (c$, "fireAncestorMoved", 
44390 function (source, id, ancestor, ancestorParent) {
44391 var listeners = this.listenerList.getListenerList ();
44392 for (var i = listeners.length - 2; i >= 0; i -= 2) {
44393 if (listeners[i] === javax.swing.event.AncestorListener) {
44394 var ancestorEvent =  new javax.swing.event.AncestorEvent (source, id, ancestor, ancestorParent);
44395 (listeners[i + 1]).ancestorMoved (ancestorEvent);
44396 }}
44397 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44398 Clazz_defineMethod (c$, "removeAllListeners", 
44399 function () {
44400 this.removeListeners (this.root);
44401 });
44402 Clazz_defineMethod (c$, "addListeners", 
44403 function (ancestor, addToFirst) {
44404 var a;
44405 this.firstInvisibleAncestor = null;
44406 for (a = ancestor; this.firstInvisibleAncestor == null; a = a.getParent ()) {
44407 if (addToFirst || a !== ancestor) {
44408 a.addComponentListener (this);
44409 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44410 var jAncestor = a;
44411 jAncestor.addPropertyChangeListener (this);
44412 }}if (!a.isVisible () || a.getParent () == null || Clazz_instanceOf (a, java.awt.Window)) {
44413 this.firstInvisibleAncestor = a;
44414 }}
44415 if (Clazz_instanceOf (this.firstInvisibleAncestor, java.awt.Window) && this.firstInvisibleAncestor.isVisible ()) {
44416 this.firstInvisibleAncestor = null;
44417 }}, "java.awt.Component,~B");
44418 Clazz_defineMethod (c$, "removeListeners", 
44419 function (ancestor) {
44420 var a;
44421 for (a = ancestor; a != null; a = a.getParent ()) {
44422 a.removeComponentListener (this);
44423 if (Clazz_instanceOf (a, javax.swing.JComponent)) {
44424 var jAncestor = a;
44425 jAncestor.removePropertyChangeListener (this);
44426 }if (a === this.firstInvisibleAncestor || Clazz_instanceOf (a, java.awt.Window)) {
44427 break;
44428 }}
44429 }, "java.awt.Component");
44430 Clazz_overrideMethod (c$, "componentResized", 
44431 function (e) {
44432 }, "java.awt.event.ComponentEvent");
44433 Clazz_overrideMethod (c$, "componentMoved", 
44434 function (e) {
44435 var source = e.getComponent ();
44436 this.fireAncestorMoved (this.root, 3, source, source.getParent ());
44437 }, "java.awt.event.ComponentEvent");
44438 Clazz_overrideMethod (c$, "componentShown", 
44439 function (e) {
44440 var ancestor = e.getComponent ();
44441 if (ancestor === this.firstInvisibleAncestor) {
44442 this.addListeners (ancestor, false);
44443 if (this.firstInvisibleAncestor == null) {
44444 this.fireAncestorAdded (this.root, 1, ancestor, ancestor.getParent ());
44445 }}}, "java.awt.event.ComponentEvent");
44446 Clazz_overrideMethod (c$, "componentHidden", 
44447 function (e) {
44448 var ancestor = e.getComponent ();
44449 var needsNotify = this.firstInvisibleAncestor == null;
44450 if (!(Clazz_instanceOf (ancestor, java.awt.Window))) {
44451 this.removeListeners (ancestor.getParent ());
44452 }this.firstInvisibleAncestor = ancestor;
44453 if (needsNotify) {
44454 this.fireAncestorRemoved (this.root, 2, ancestor, ancestor.getParent ());
44455 }}, "java.awt.event.ComponentEvent");
44456 Clazz_overrideMethod (c$, "propertyChange", 
44457 function (evt) {
44458 var s = evt.getPropertyName ();
44459 if (s != null && (s.equals ("parent") || s.equals ("ancestor"))) {
44460 var component = evt.getSource ();
44461 if (evt.getNewValue () != null) {
44462 if (component === this.firstInvisibleAncestor) {
44463 this.addListeners (component, false);
44464 if (this.firstInvisibleAncestor == null) {
44465 this.fireAncestorAdded (this.root, 1, component, component.getParent ());
44466 }}} else {
44467 var needsNotify = this.firstInvisibleAncestor == null;
44468 var oldParent = evt.getOldValue ();
44469 this.removeListeners (oldParent);
44470 this.firstInvisibleAncestor = component;
44471 if (needsNotify) {
44472 this.fireAncestorRemoved (this.root, 2, component, oldParent);
44473 }}}}, "java.beans.PropertyChangeEvent");
44474 });
44475 Clazz_declarePackage ("javax.swing.event");
44476 Clazz_load (["java.awt.AWTEvent"], "javax.swing.event.AncestorEvent", null, function () {
44477 c$ = Clazz_decorateAsClass (function () {
44478 this.ancestor = null;
44479 this.ancestorParent = null;
44480 Clazz_instantialize (this, arguments);
44481 }, javax.swing.event, "AncestorEvent", java.awt.AWTEvent);
44482 Clazz_makeConstructor (c$, 
44483 function (source, id, ancestor, ancestorParent) {
44484 Clazz_superConstructor (this, javax.swing.event.AncestorEvent, [source, id]);
44485 this.ancestor = ancestor;
44486 this.ancestorParent = ancestorParent;
44487 }, "javax.swing.JComponent,~N,java.awt.Container,java.awt.Container");
44488 Clazz_defineMethod (c$, "getAncestor", 
44489 function () {
44490 return this.ancestor;
44491 });
44492 Clazz_defineMethod (c$, "getAncestorParent", 
44493 function () {
44494 return this.ancestorParent;
44495 });
44496 Clazz_defineMethod (c$, "getComponent", 
44497 function () {
44498 return this.getSource ();
44499 });
44500 Clazz_defineStatics (c$,
44501 "ANCESTOR_ADDED", 1,
44502 "ANCESTOR_REMOVED", 2,
44503 "ANCESTOR_MOVED", 3);
44504 });
44505 Clazz_declarePackage ("javax.swing.event");
44506 Clazz_load (["java.util.EventListener"], "javax.swing.event.AncestorListener", null, function () {
44507 Clazz_declareInterface (javax.swing.event, "AncestorListener", java.util.EventListener);
44508 });
44509 Clazz_declarePackage ("javax.swing");
44510 Clazz_load (["java.lang.Enum"], "javax.swing.ClientPropertyKey", null, function () {
44511 c$ = Clazz_declareType (javax.swing, "ClientPropertyKey", Enum);
44512 Clazz_makeConstructor (c$, 
44513  function (reportValueNotSerializable) {
44514 }, "~B");
44515 Clazz_defineEnumConstant (c$, "JComponent_INPUT_VERIFIER", 0, [true]);
44516 Clazz_defineEnumConstant (c$, "JComponent_TRANSFER_HANDLER", 1, [true]);
44517 Clazz_defineEnumConstant (c$, "JComponent_ANCESTOR_NOTIFIER", 2, [true]);
44518 Clazz_defineEnumConstant (c$, "PopupFactory_FORCE_HEAVYWEIGHT_POPUP", 3, [true]);
44519 });
44520 Clazz_declarePackage ("javax.swing");
44521 Clazz_load (["java.awt.Dialog", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JDialog", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
44522 c$ = Clazz_decorateAsClass (function () {
44523 this.defaultCloseOperation = 1;
44524 this.rootPane = null;
44525 this.rootPaneCheckingEnabled = false;
44526 this.transferHandler = null;
44527 Clazz_instantialize (this, arguments);
44528 }, javax.swing, "JDialog", java.awt.Dialog, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
44529 Clazz_makeConstructor (c$, 
44530 function () {
44531 this.construct (Clazz_castNullAs ("java.awt.Frame"), false);
44532 });
44533 Clazz_makeConstructor (c$, 
44534 function (owner) {
44535 this.construct (owner, false);
44536 }, "java.awt.Frame");
44537 Clazz_makeConstructor (c$, 
44538 function (owner, modal) {
44539 this.construct (owner, null, modal);
44540 }, "java.awt.Frame,~B");
44541 Clazz_makeConstructor (c$, 
44542 function (owner, title) {
44543 this.construct (owner, title, false);
44544 }, "java.awt.Frame,~S");
44545 Clazz_makeConstructor (c$, 
44546 function (owner, title, modal) {
44547 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal]);
44548 if (owner == null) {
44549 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44550 this.addWindowListener (ownerShutdownListener);
44551 }this.dialogInit ();
44552 }, "java.awt.Frame,~S,~B");
44553 Clazz_makeConstructor (c$, 
44554 function (owner, title, modal, gc) {
44555 Clazz_superConstructor (this, javax.swing.JDialog, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, title, modal, gc]);
44556 if (owner == null) {
44557 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
44558 this.addWindowListener (ownerShutdownListener);
44559 }this.dialogInit ();
44560 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44561 Clazz_makeConstructor (c$, 
44562 function (owner) {
44563 this.construct (owner, false);
44564 }, "java.awt.Dialog");
44565 Clazz_makeConstructor (c$, 
44566 function (owner, modal) {
44567 this.construct (owner, null, modal);
44568 }, "java.awt.Dialog,~B");
44569 Clazz_makeConstructor (c$, 
44570 function (owner, title) {
44571 this.construct (owner, title, false);
44572 }, "java.awt.Dialog,~S");
44573 Clazz_makeConstructor (c$, 
44574 function (owner, title, modal) {
44575 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal]);
44576 this.dialogInit ();
44577 }, "java.awt.Dialog,~S,~B");
44578 Clazz_makeConstructor (c$, 
44579 function (owner, title, modal, gc) {
44580 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modal, gc]);
44581 this.dialogInit ();
44582 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44583 Clazz_makeConstructor (c$, 
44584 function (owner) {
44585 this.construct (owner, java.awt.Dialog.ModalityType.MODELESS);
44586 }, "java.awt.Window");
44587 Clazz_makeConstructor (c$, 
44588 function (owner, modalityType) {
44589 this.construct (owner, null, modalityType);
44590 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44591 Clazz_makeConstructor (c$, 
44592 function (owner, title) {
44593 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44594 }, "java.awt.Window,~S");
44595 Clazz_makeConstructor (c$, 
44596 function (owner, title, modalityType) {
44597 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType]);
44598 this.dialogInit ();
44599 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44600 Clazz_makeConstructor (c$, 
44601 function (owner, title, modalityType, gc) {
44602 Clazz_superConstructor (this, javax.swing.JDialog, [owner, title, modalityType, gc]);
44603 this.dialogInit ();
44604 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44605 Clazz_defineMethod (c$, "dialogInit", 
44606 function () {
44607 this.enableEvents (72);
44608 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
44609 this.setRootPane (this.createRootPane ());
44610 this.setRootPaneCheckingEnabled (true);
44611 if (javax.swing.JDialog.isDefaultLookAndFeelDecorated ()) {
44612 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
44613 if (supportsWindowDecorations) {
44614 this.setUndecorated (true);
44615 this.getRootPane ().setWindowDecorationStyle (2);
44616 }}});
44617 Clazz_defineMethod (c$, "createRootPane", 
44618 function () {
44619 var rp =  new javax.swing.JRootPane ();
44620 rp.setOpaque (true);
44621 return rp;
44622 });
44623 Clazz_defineMethod (c$, "processWindowEvent", 
44624 function (e) {
44625 Clazz_superCall (this, javax.swing.JDialog, "processWindowEvent", [e]);
44626 if (e.getID () == 201) {
44627 switch (this.defaultCloseOperation) {
44628 case 1:
44629 this.setVisible (false);
44630 break;
44631 case 2:
44632 this.dispose ();
44633 break;
44634 case 0:
44635 default:
44636 break;
44637 }
44638 }}, "java.awt.event.WindowEvent");
44639 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
44640 function (operation) {
44641 if (operation != 0 && operation != 1 && operation != 2) {
44642 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
44643 }var oldValue = this.defaultCloseOperation;
44644 this.defaultCloseOperation = operation;
44645 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
44646 }, "~N");
44647 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
44648 function () {
44649 return this.defaultCloseOperation;
44650 });
44651 Clazz_defineMethod (c$, "setTransferHandler", 
44652 function (newHandler) {
44653 var oldHandler = this.transferHandler;
44654 this.transferHandler = newHandler;
44655 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
44656 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
44657 }, "javax.swing.TransferHandler");
44658 Clazz_defineMethod (c$, "getTransferHandler", 
44659 function () {
44660 return this.transferHandler;
44661 });
44662 Clazz_overrideMethod (c$, "update", 
44663 function (g) {
44664 this.paint (g);
44665 }, "java.awt.Graphics");
44666 Clazz_defineMethod (c$, "setJMenuBar", 
44667 function (menu) {
44668 this.getRootPane ().setMenuBar (menu);
44669 }, "javax.swing.JMenuBar");
44670 Clazz_defineMethod (c$, "getJMenuBar", 
44671 function () {
44672 return this.getRootPane ().getMenuBar ();
44673 });
44674 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
44675 function () {
44676 return this.rootPaneCheckingEnabled;
44677 });
44678 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
44679 function (enabled) {
44680 this.rootPaneCheckingEnabled = enabled;
44681 }, "~B");
44682 Clazz_overrideMethod (c$, "addImpl", 
44683 function (comp, constraints, index) {
44684 if (this.isRootPaneCheckingEnabled ()) {
44685 return this.getContentPane ().add (comp, constraints, index);
44686 }return this.addImplSAEM (comp, constraints, index);
44687 }, "java.awt.Component,~O,~N");
44688 Clazz_defineMethod (c$, "remove", 
44689 function (comp) {
44690 if (comp === this.rootPane) {
44691 this.removeChild (comp);
44692 } else {
44693 this.getContentPane ().removeChild (comp);
44694 }}, "java.awt.Component");
44695 Clazz_defineMethod (c$, "setLayout", 
44696 function (manager) {
44697 if (this.isRootPaneCheckingEnabled ()) {
44698 this.getContentPane ().setLayout (manager);
44699 } else {
44700 Clazz_superCall (this, javax.swing.JDialog, "setLayout", [manager]);
44701 }}, "java.awt.LayoutManager");
44702 Clazz_overrideMethod (c$, "getRootPane", 
44703 function () {
44704 return this.rootPane;
44705 });
44706 Clazz_defineMethod (c$, "setRootPane", 
44707 function (root) {
44708 if (this.rootPane != null) {
44709 this.remove (this.rootPane);
44710 }this.rootPane = root;
44711 if (this.rootPane != null) {
44712 var checkingEnabled = this.isRootPaneCheckingEnabled ();
44713 try {
44714 this.setRootPaneCheckingEnabled (false);
44715 this.add (this.rootPane, "Center");
44716 } finally {
44717 this.setRootPaneCheckingEnabled (checkingEnabled);
44718 }
44719 }}, "javax.swing.JRootPane");
44720 Clazz_overrideMethod (c$, "getContentPane", 
44721 function () {
44722 return this.getRootPane ().getContentPane ();
44723 });
44724 Clazz_overrideMethod (c$, "setContentPane", 
44725 function (contentPane) {
44726 this.getRootPane ().setContentPane (contentPane);
44727 }, "java.awt.Container");
44728 Clazz_overrideMethod (c$, "getLayeredPane", 
44729 function () {
44730 return this.getRootPane ().getLayeredPane ();
44731 });
44732 Clazz_overrideMethod (c$, "setLayeredPane", 
44733 function (layeredPane) {
44734 this.getRootPane ().setLayeredPane (layeredPane);
44735 }, "javax.swing.JLayeredPane");
44736 Clazz_overrideMethod (c$, "getGlassPane", 
44737 function () {
44738 return this.getRootPane ().getGlassPane ();
44739 });
44740 Clazz_overrideMethod (c$, "setGlassPane", 
44741 function (glassPane) {
44742 this.getRootPane ().setGlassPane (glassPane);
44743 }, "java.awt.Component");
44744 Clazz_defineMethod (c$, "getGraphics", 
44745 function () {
44746 javax.swing.JComponent.getGraphicsInvoked (this);
44747 return Clazz_superCall (this, javax.swing.JDialog, "getGraphics", []);
44748 });
44749 Clazz_defineMethod (c$, "repaint", 
44750 function (time, x, y, width, height) {
44751 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
44752 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
44753 } else {
44754 Clazz_superCall (this, javax.swing.JDialog, "repaint", [time, x, y, width, height]);
44755 }}, "~N,~N,~N,~N,~N");
44756 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
44757 function (defaultLookAndFeelDecorated) {
44758 if (defaultLookAndFeelDecorated) {
44759 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
44760 } else {
44761 javax.swing.SwingUtilities.appContextPut (javax.swing.JDialog.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
44762 }}, "~B");
44763 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
44764 function () {
44765 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JDialog.defaultLookAndFeelDecoratedKey);
44766 if (defaultLookAndFeelDecorated == null) {
44767 defaultLookAndFeelDecorated = Boolean.FALSE;
44768 }return defaultLookAndFeelDecorated.booleanValue ();
44769 });
44770 Clazz_defineMethod (c$, "paramString", 
44771 function () {
44772 var defaultCloseOperationString;
44773 if (this.defaultCloseOperation == 1) {
44774 defaultCloseOperationString = "HIDE_ON_CLOSE";
44775 } else if (this.defaultCloseOperation == 2) {
44776 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
44777 } else if (this.defaultCloseOperation == 0) {
44778 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
44779 } else defaultCloseOperationString = "";
44780 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
44781 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
44782 return Clazz_superCall (this, javax.swing.JDialog, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
44783 });
44784 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
44785 });
44786 Clazz_declarePackage ("java.awt");
44787 Clazz_load (["java.lang.Enum", "java.awt.Window"], "java.awt.Dialog", ["java.lang.IllegalArgumentException", "java.awt.Frame", "$.IllegalComponentStateException"], function () {
44788 c$ = Clazz_decorateAsClass (function () {
44789 this.resizable = true;
44790 this.undecorated = false;
44791 this.modal = false;
44792 this.modalityType = null;
44793 this.title = null;
44794 this.isInHide = false;
44795 this.isInDispose = false;
44796 Clazz_instantialize (this, arguments);
44797 }, java.awt, "Dialog", java.awt.Window);
44798 Clazz_makeConstructor (c$, 
44799 function (owner) {
44800 this.construct (owner, "", false);
44801 }, "java.awt.Frame");
44802 Clazz_makeConstructor (c$, 
44803 function (owner, modal) {
44804 this.construct (owner, "", modal);
44805 }, "java.awt.Frame,~B");
44806 Clazz_makeConstructor (c$, 
44807 function (owner, title) {
44808 this.construct (owner, title, false);
44809 }, "java.awt.Frame,~S");
44810 Clazz_makeConstructor (c$, 
44811 function (owner, title, modal) {
44812 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44813 }, "java.awt.Frame,~S,~B");
44814 Clazz_makeConstructor (c$, 
44815 function (owner, title, modal, gc) {
44816 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44817 }, "java.awt.Frame,~S,~B,java.awt.GraphicsConfiguration");
44818 Clazz_makeConstructor (c$, 
44819 function (owner) {
44820 this.construct (owner, "", false);
44821 }, "java.awt.Dialog");
44822 Clazz_makeConstructor (c$, 
44823 function (owner, title) {
44824 this.construct (owner, title, false);
44825 }, "java.awt.Dialog,~S");
44826 Clazz_makeConstructor (c$, 
44827 function (owner, title, modal) {
44828 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44829 }, "java.awt.Dialog,~S,~B");
44830 Clazz_makeConstructor (c$, 
44831 function (owner, title, modal, gc) {
44832 this.construct (owner, title, modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS, gc);
44833 }, "java.awt.Dialog,~S,~B,java.awt.GraphicsConfiguration");
44834 Clazz_makeConstructor (c$, 
44835 function (owner) {
44836 this.construct (owner, null, java.awt.Dialog.ModalityType.MODELESS);
44837 }, "java.awt.Window");
44838 Clazz_makeConstructor (c$, 
44839 function (owner, title) {
44840 this.construct (owner, title, java.awt.Dialog.ModalityType.MODELESS);
44841 }, "java.awt.Window,~S");
44842 Clazz_makeConstructor (c$, 
44843 function (owner, modalityType) {
44844 this.construct (owner, null, modalityType);
44845 }, "java.awt.Window,java.awt.Dialog.ModalityType");
44846 Clazz_makeConstructor (c$, 
44847 function (owner, title, modalityType) {
44848 Clazz_superConstructor (this, java.awt.Dialog, [owner]);
44849 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44850 throw  new IllegalArgumentException ("Wrong parent window");
44851 }this.title = title;
44852 this.setModalityType (modalityType);
44853 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType");
44854 Clazz_makeConstructor (c$, 
44855 function (owner, title, modalityType, gc) {
44856 Clazz_superConstructor (this, java.awt.Dialog, [owner, gc]);
44857 if ((owner != null) && !(Clazz_instanceOf (owner, java.awt.Frame)) && !(Clazz_instanceOf (owner, java.awt.Dialog))) {
44858 throw  new IllegalArgumentException ("wrong owner window");
44859 }this.title = title;
44860 this.setModalityType (modalityType);
44861 }, "java.awt.Window,~S,java.awt.Dialog.ModalityType,java.awt.GraphicsConfiguration");
44862 Clazz_overrideMethod (c$, "constructComponentName", 
44863 function () {
44864 {
44865 return "dialog" + java.awt.Dialog.$nameCounter++;
44866 }});
44867 Clazz_defineMethod (c$, "addNotify", 
44868 function () {
44869 {
44870 if (this.parent != null) {
44871 this.parent.addNotify ();
44872 }Clazz_superCall (this, java.awt.Dialog, "addNotify", []);
44873 }});
44874 Clazz_defineMethod (c$, "isModal", 
44875 function () {
44876 return this.isModal_NoClientCode ();
44877 });
44878 Clazz_defineMethod (c$, "isModal_NoClientCode", 
44879 function () {
44880 return this.modalityType !== java.awt.Dialog.ModalityType.MODELESS;
44881 });
44882 Clazz_defineMethod (c$, "setModal", 
44883 function (modal) {
44884 this.modal = modal;
44885 this.setModalityType (modal ? java.awt.Dialog.DEFAULT_MODALITY_TYPE : java.awt.Dialog.ModalityType.MODELESS);
44886 }, "~B");
44887 Clazz_defineMethod (c$, "getModalityType", 
44888 function () {
44889 return this.modalityType;
44890 });
44891 Clazz_defineMethod (c$, "setModalityType", 
44892 function (type) {
44893 if (type == null) {
44894 type = java.awt.Dialog.ModalityType.MODELESS;
44895 }if (this.modalityType === type) {
44896 return;
44897 }this.checkModalityPermission (type);
44898 this.modalityType = type;
44899 this.modal = (this.modalityType !== java.awt.Dialog.ModalityType.MODELESS);
44900 }, "java.awt.Dialog.ModalityType");
44901 Clazz_defineMethod (c$, "getTitle", 
44902 function () {
44903 return this.title;
44904 });
44905 Clazz_defineMethod (c$, "setTitle", 
44906 function (title) {
44907 var oldTitle = this.title;
44908 {
44909 this.title = title;
44910 }this.firePropertyChangeObject ("title", oldTitle, title);
44911 }, "~S");
44912 Clazz_defineMethod (c$, "show", 
44913 function () {
44914 });
44915 Clazz_defineMethod (c$, "modalityPushed", 
44916 function () {
44917 });
44918 Clazz_defineMethod (c$, "modalityPopped", 
44919 function () {
44920 });
44921 Clazz_defineMethod (c$, "interruptBlocking", 
44922 function () {
44923 if (this.isModal ()) {
44924 this.disposeImpl ();
44925 } else if (this.windowClosingException != null) {
44926 this.windowClosingException.fillInStackTrace ();
44927 this.windowClosingException.printStackTrace ();
44928 this.windowClosingException = null;
44929 }});
44930 Clazz_defineMethod (c$, "hideAndDisposePreHandler", 
44931  function () {
44932 this.isInHide = true;
44933 });
44934 Clazz_defineMethod (c$, "hideAndDisposeHandler", 
44935  function () {
44936 this.isInHide = false;
44937 });
44938 Clazz_defineMethod (c$, "hide", 
44939 function () {
44940 this.hideAndDisposePreHandler ();
44941 Clazz_superCall (this, java.awt.Dialog, "hide", []);
44942 if (!this.isInDispose) {
44943 this.hideAndDisposeHandler ();
44944 }});
44945 Clazz_defineMethod (c$, "doDispose", 
44946 function () {
44947 this.isInDispose = true;
44948 Clazz_superCall (this, java.awt.Dialog, "doDispose", []);
44949 this.hideAndDisposeHandler ();
44950 this.isInDispose = false;
44951 });
44952 Clazz_defineMethod (c$, "isResizable", 
44953 function () {
44954 return this.resizable;
44955 });
44956 Clazz_defineMethod (c$, "setResizable", 
44957 function (resizable) {
44958 var testvalid = false;
44959 {
44960 this.resizable = resizable;
44961 }if (testvalid) {
44962 this.invalidateIfValid ();
44963 }}, "~B");
44964 Clazz_defineMethod (c$, "setUndecorated", 
44965 function (undecorated) {
44966 {
44967 if (this.isDisplayable ()) {
44968 throw  new java.awt.IllegalComponentStateException ("The dialog is displayable.");
44969 }this.undecorated = undecorated;
44970 }}, "~B");
44971 Clazz_defineMethod (c$, "isUndecorated", 
44972 function () {
44973 return this.undecorated;
44974 });
44975 Clazz_defineMethod (c$, "paramString", 
44976 function () {
44977 var str = Clazz_superCall (this, java.awt.Dialog, "paramString", []) + "," + this.modalityType;
44978 if (this.title != null) {
44979 str += ",title=" + this.title;
44980 }return str;
44981 });
44982 Clazz_defineMethod (c$, "modalShow", 
44983 function () {
44984 });
44985 Clazz_defineMethod (c$, "modalHide", 
44986 function () {
44987 });
44988 Clazz_defineMethod (c$, "shouldBlock", 
44989 function (w) {
44990 if (!this.isVisible_NoClientCode () || (!w.isVisible_NoClientCode () && !w.isInShow) || this.isInHide || (w === this) || !this.isModal_NoClientCode ()) {
44991 return false;
44992 }if ((Clazz_instanceOf (w, java.awt.Dialog)) && (w).isInHide) {
44993 return false;
44994 }var blockerToCheck = this;
44995 while (blockerToCheck != null) {
44996 var c = w;
44997 while ((c != null) && (c !== blockerToCheck)) {
44998 c = c.getParent_NoClientCode ();
44999 }
45000 if (c === blockerToCheck) {
45001 return false;
45002 }blockerToCheck = blockerToCheck.getModalBlocker ();
45003 }
45004 switch (this.modalityType) {
45005 case java.awt.Dialog.ModalityType.MODELESS:
45006 return false;
45007 case java.awt.Dialog.ModalityType.DOCUMENT_MODAL:
45008 if (w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE)) {
45009 var c = this;
45010 while ((c != null) && (c !== w)) {
45011 c = c.getParent_NoClientCode ();
45012 }
45013 return c === w;
45014 } else {
45015 return this.getDocumentRoot () === w.getDocumentRoot ();
45016 }case java.awt.Dialog.ModalityType.APPLICATION_MODAL:
45017 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE) && (this.appContext === w.appContext);
45018 case java.awt.Dialog.ModalityType.TOOLKIT_MODAL:
45019 return !w.isModalExcluded (java.awt.Dialog.ModalExclusionType.TOOLKIT_EXCLUDE);
45020 }
45021 return false;
45022 }, "java.awt.Window");
45023 Clazz_defineMethod (c$, "checkModalityPermission", 
45024  function (mt) {
45025 }, "java.awt.Dialog.ModalityType");
45026 Clazz_pu$h(self.c$);
45027 c$ = Clazz_declareType (java.awt.Dialog, "ModalityType", Enum);
45028 Clazz_defineEnumConstant (c$, "MODELESS", 0, []);
45029 Clazz_defineEnumConstant (c$, "DOCUMENT_MODAL", 1, []);
45030 Clazz_defineEnumConstant (c$, "APPLICATION_MODAL", 2, []);
45031 Clazz_defineEnumConstant (c$, "TOOLKIT_MODAL", 3, []);
45032 c$ = Clazz_p0p ();
45033 Clazz_pu$h(self.c$);
45034 c$ = Clazz_declareType (java.awt.Dialog, "ModalExclusionType", Enum);
45035 Clazz_defineEnumConstant (c$, "NO_EXCLUDE", 0, []);
45036 Clazz_defineEnumConstant (c$, "APPLICATION_EXCLUDE", 1, []);
45037 Clazz_defineEnumConstant (c$, "TOOLKIT_EXCLUDE", 2, []);
45038 c$ = Clazz_p0p ();
45039 c$.DEFAULT_MODALITY_TYPE = c$.prototype.DEFAULT_MODALITY_TYPE = java.awt.Dialog.ModalityType.APPLICATION_MODAL;
45040 Clazz_defineStatics (c$,
45041 "$base", "dialog",
45042 "$nameCounter", 0);
45043 });
45044 Clazz_declarePackage ("javax.swing");
45045 c$ = Clazz_declareInterface (javax.swing, "WindowConstants");
45046 Clazz_defineStatics (c$,
45047 "DO_NOTHING_ON_CLOSE", 0,
45048 "HIDE_ON_CLOSE", 1,
45049 "DISPOSE_ON_CLOSE", 2,
45050 "EXIT_ON_CLOSE", 3);
45051 Clazz_declarePackage ("javax.swing");
45052 Clazz_load (["java.awt.Frame", "javax.swing.RootPaneContainer", "$.WindowConstants"], "javax.swing.JFrame", ["java.lang.Boolean", "$.IllegalArgumentException", "javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities", "$.UIManager"], function () {
45053 c$ = Clazz_decorateAsClass (function () {
45054 this.defaultCloseOperation = 1;
45055 this.transferHandler = null;
45056 this.rootPane = null;
45057 this.rootPaneCheckingEnabled = false;
45058 Clazz_instantialize (this, arguments);
45059 }, javax.swing, "JFrame", java.awt.Frame, [javax.swing.WindowConstants, javax.swing.RootPaneContainer]);
45060 Clazz_makeConstructor (c$, 
45061 function () {
45062 Clazz_superConstructor (this, javax.swing.JFrame);
45063 this.frameInit ();
45064 });
45065 Clazz_makeConstructor (c$, 
45066 function (gc) {
45067 Clazz_superConstructor (this, javax.swing.JFrame, [gc]);
45068 this.frameInit ();
45069 }, "java.awt.GraphicsConfiguration");
45070 Clazz_makeConstructor (c$, 
45071 function (title) {
45072 Clazz_superConstructor (this, javax.swing.JFrame, [title]);
45073 this.frameInit ();
45074 }, "~S");
45075 Clazz_makeConstructor (c$, 
45076 function (title, gc) {
45077 Clazz_superConstructor (this, javax.swing.JFrame, [title, gc]);
45078 this.frameInit ();
45079 }, "~S,java.awt.GraphicsConfiguration");
45080 Clazz_defineMethod (c$, "frameInit", 
45081 function () {
45082 this.enableEvents (72);
45083 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45084 this.setRootPane (this.createRootPane ());
45085 this.setBackground (javax.swing.UIManager.getColor ("control"));
45086 this.setRootPaneCheckingEnabled (true);
45087 if (javax.swing.JFrame.isDefaultLookAndFeelDecorated ()) {
45088 var supportsWindowDecorations = javax.swing.UIManager.getLookAndFeel ().getSupportsWindowDecorations ();
45089 if (supportsWindowDecorations) {
45090 this.setUndecorated (true);
45091 this.getRootPane ().setWindowDecorationStyle (1);
45092 }}});
45093 Clazz_defineMethod (c$, "createRootPane", 
45094 function () {
45095 var rp =  new javax.swing.JRootPane ();
45096 rp.setOpaque (true);
45097 return rp;
45098 });
45099 Clazz_defineMethod (c$, "processWindowEvent", 
45100 function (e) {
45101 Clazz_superCall (this, javax.swing.JFrame, "processWindowEvent", [e]);
45102 if (e.getID () == 201) {
45103 switch (this.defaultCloseOperation) {
45104 case 1:
45105 this.setVisible (false);
45106 break;
45107 case 2:
45108 this.dispose ();
45109 break;
45110 case 0:
45111 default:
45112 break;
45113 case 3:
45114 System.exit (0);
45115 break;
45116 }
45117 }}, "java.awt.event.WindowEvent");
45118 Clazz_defineMethod (c$, "setDefaultCloseOperation", 
45119 function (operation) {
45120 if (operation != 0 && operation != 1 && operation != 2 && operation != 3) {
45121 throw  new IllegalArgumentException ("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
45122 }if (this.defaultCloseOperation != operation) {
45123 if (operation == 3) {
45124 var security = System.getSecurityManager ();
45125 if (security != null) {
45126 security.checkExit (0);
45127 }}var oldValue = this.defaultCloseOperation;
45128 this.defaultCloseOperation = operation;
45129 this.firePropertyChangeInt ("defaultCloseOperation", oldValue, operation);
45130 }}, "~N");
45131 Clazz_defineMethod (c$, "getDefaultCloseOperation", 
45132 function () {
45133 return this.defaultCloseOperation;
45134 });
45135 Clazz_defineMethod (c$, "setTransferHandler", 
45136 function (newHandler) {
45137 var oldHandler = this.transferHandler;
45138 this.transferHandler = newHandler;
45139 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45140 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45141 }, "javax.swing.TransferHandler");
45142 Clazz_defineMethod (c$, "getTransferHandler", 
45143 function () {
45144 return this.transferHandler;
45145 });
45146 Clazz_overrideMethod (c$, "update", 
45147 function (g) {
45148 this.paint (g);
45149 }, "java.awt.Graphics");
45150 Clazz_defineMethod (c$, "setJMenuBar", 
45151 function (menubar) {
45152 this.getRootPane ().setMenuBar (menubar);
45153 }, "javax.swing.JMenuBar");
45154 Clazz_defineMethod (c$, "getJMenuBar", 
45155 function () {
45156 return this.getRootPane ().getMenuBar ();
45157 });
45158 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45159 function () {
45160 return this.rootPaneCheckingEnabled;
45161 });
45162 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45163 function (enabled) {
45164 this.rootPaneCheckingEnabled = enabled;
45165 }, "~B");
45166 Clazz_overrideMethod (c$, "addImpl", 
45167 function (comp, constraints, index) {
45168 if (this.isRootPaneCheckingEnabled ()) {
45169 return this.getContentPane ().add (comp, constraints, index);
45170 }return this.addImplSAEM (comp, constraints, index);
45171 }, "java.awt.Component,~O,~N");
45172 Clazz_defineMethod (c$, "remove", 
45173 function (comp) {
45174 if (comp === this.rootPane) {
45175 this.removeChild (comp);
45176 } else {
45177 this.getContentPane ().removeChild (comp);
45178 }}, "java.awt.Component");
45179 Clazz_defineMethod (c$, "setLayout", 
45180 function (manager) {
45181 if (this.isRootPaneCheckingEnabled ()) {
45182 this.getContentPane ().setLayout (manager);
45183 } else {
45184 Clazz_superCall (this, javax.swing.JFrame, "setLayout", [manager]);
45185 }}, "java.awt.LayoutManager");
45186 Clazz_overrideMethod (c$, "getRootPane", 
45187 function () {
45188 return this.rootPane;
45189 });
45190 Clazz_defineMethod (c$, "setRootPane", 
45191 function (root) {
45192 if (this.rootPane != null) {
45193 this.remove (this.rootPane);
45194 }this.rootPane = root;
45195 if (this.rootPane != null) {
45196 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45197 try {
45198 this.setRootPaneCheckingEnabled (false);
45199 this.add (this.rootPane, "Center");
45200 } finally {
45201 this.setRootPaneCheckingEnabled (checkingEnabled);
45202 }
45203 }}, "javax.swing.JRootPane");
45204 Clazz_overrideMethod (c$, "getContentPane", 
45205 function () {
45206 return this.getRootPane ().getContentPane ();
45207 });
45208 Clazz_overrideMethod (c$, "setContentPane", 
45209 function (contentPane) {
45210 this.getRootPane ().setContentPane (contentPane);
45211 }, "java.awt.Container");
45212 Clazz_overrideMethod (c$, "getLayeredPane", 
45213 function () {
45214 return this.getRootPane ().getLayeredPane ();
45215 });
45216 Clazz_overrideMethod (c$, "setLayeredPane", 
45217 function (layeredPane) {
45218 this.getRootPane ().setLayeredPane (layeredPane);
45219 }, "javax.swing.JLayeredPane");
45220 Clazz_overrideMethod (c$, "getGlassPane", 
45221 function () {
45222 return this.getRootPane ().getGlassPane ();
45223 });
45224 Clazz_overrideMethod (c$, "setGlassPane", 
45225 function (glassPane) {
45226 this.getRootPane ().setGlassPane (glassPane);
45227 }, "java.awt.Component");
45228 Clazz_defineMethod (c$, "getGraphics", 
45229 function () {
45230 javax.swing.JComponent.getGraphicsInvoked (this);
45231 return Clazz_superCall (this, javax.swing.JFrame, "getGraphics", []);
45232 });
45233 Clazz_defineMethod (c$, "repaint", 
45234 function (time, x, y, width, height) {
45235 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45236 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45237 } else {
45238 Clazz_superCall (this, javax.swing.JFrame, "repaint", [time, x, y, width, height]);
45239 }}, "~N,~N,~N,~N,~N");
45240 c$.setDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "setDefaultLookAndFeelDecorated", 
45241 function (defaultLookAndFeelDecorated) {
45242 if (defaultLookAndFeelDecorated) {
45243 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.TRUE);
45244 } else {
45245 javax.swing.SwingUtilities.appContextPut (javax.swing.JFrame.defaultLookAndFeelDecoratedKey, Boolean.FALSE);
45246 }}, "~B");
45247 c$.isDefaultLookAndFeelDecorated = Clazz_defineMethod (c$, "isDefaultLookAndFeelDecorated", 
45248 function () {
45249 var defaultLookAndFeelDecorated = javax.swing.SwingUtilities.appContextGet (javax.swing.JFrame.defaultLookAndFeelDecoratedKey);
45250 if (defaultLookAndFeelDecorated == null) {
45251 defaultLookAndFeelDecorated = Boolean.FALSE;
45252 }return defaultLookAndFeelDecorated.booleanValue ();
45253 });
45254 Clazz_defineMethod (c$, "paramString", 
45255 function () {
45256 var defaultCloseOperationString;
45257 if (this.defaultCloseOperation == 1) {
45258 defaultCloseOperationString = "HIDE_ON_CLOSE";
45259 } else if (this.defaultCloseOperation == 2) {
45260 defaultCloseOperationString = "DISPOSE_ON_CLOSE";
45261 } else if (this.defaultCloseOperation == 0) {
45262 defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
45263 } else if (this.defaultCloseOperation == 3) {
45264 defaultCloseOperationString = "EXIT_ON_CLOSE";
45265 } else defaultCloseOperationString = "";
45266 var rootPaneString = (this.rootPane != null ? this.rootPane.toString () : "");
45267 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45268 return Clazz_superCall (this, javax.swing.JFrame, "paramString", []) + ",defaultCloseOperation=" + defaultCloseOperationString + ",rootPane=" + rootPaneString + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45269 });
45270 Clazz_defineStatics (c$,
45271 "EXIT_ON_CLOSE", 3);
45272 c$.defaultLookAndFeelDecoratedKey = c$.prototype.defaultLookAndFeelDecoratedKey =  new Clazz._O ();
45273 });
45274 Clazz_declarePackage ("javax.swing");
45275 Clazz_load (["java.awt.Window", "javax.swing.RootPaneContainer"], "javax.swing.JWindow", ["javax.swing.JComponent", "$.JRootPane", "$.RepaintManager", "$.SwingUtilities"], function () {
45276 c$ = Clazz_decorateAsClass (function () {
45277 this.rootPane = null;
45278 this.rootPaneCheckingEnabled = false;
45279 this.transferHandler = null;
45280 Clazz_instantialize (this, arguments);
45281 }, javax.swing, "JWindow", java.awt.Window, javax.swing.RootPaneContainer);
45282 Clazz_makeConstructor (c$, 
45283 function () {
45284 this.construct (Clazz_castNullAs ("java.awt.Frame"));
45285 });
45286 Clazz_makeConstructor (c$, 
45287 function (gc) {
45288 this.construct (null, gc);
45289 Clazz_superCall (this, javax.swing.JWindow, "setFocusableWindowState", [false]);
45290 }, "java.awt.GraphicsConfiguration");
45291 Clazz_makeConstructor (c$, 
45292 function (owner) {
45293 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45294 if (owner == null) {
45295 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45296 this.addWindowListener (ownerShutdownListener);
45297 }this.windowInit ();
45298 }, "java.awt.Frame");
45299 Clazz_makeConstructor (c$, 
45300 function (owner) {
45301 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner]);
45302 if (owner == null) {
45303 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45304 this.addWindowListener (ownerShutdownListener);
45305 }this.windowInit ();
45306 }, "java.awt.Window");
45307 Clazz_makeConstructor (c$, 
45308 function (owner, gc) {
45309 Clazz_superConstructor (this, javax.swing.JWindow, [owner == null ? javax.swing.SwingUtilities.getSharedOwnerFrame () : owner, gc]);
45310 if (owner == null) {
45311 var ownerShutdownListener = javax.swing.SwingUtilities.getSharedOwnerFrameShutdownListener ();
45312 this.addWindowListener (ownerShutdownListener);
45313 }this.windowInit ();
45314 }, "java.awt.Window,java.awt.GraphicsConfiguration");
45315 Clazz_defineMethod (c$, "windowInit", 
45316 function () {
45317 this.setLocale (javax.swing.JComponent.getDefaultLocale ());
45318 this.setRootPane (this.createRootPane ());
45319 this.setRootPaneCheckingEnabled (true);
45320 });
45321 Clazz_defineMethod (c$, "createRootPane", 
45322 function () {
45323 var rp =  new javax.swing.JRootPane ();
45324 rp.setOpaque (true);
45325 return rp;
45326 });
45327 Clazz_defineMethod (c$, "isRootPaneCheckingEnabled", 
45328 function () {
45329 return this.rootPaneCheckingEnabled;
45330 });
45331 Clazz_defineMethod (c$, "setTransferHandler", 
45332 function (newHandler) {
45333 var oldHandler = this.transferHandler;
45334 this.transferHandler = newHandler;
45335 javax.swing.SwingUtilities.installSwingDropTargetAsNecessary (this, this.transferHandler);
45336 this.firePropertyChangeObject ("transferHandler", oldHandler, newHandler);
45337 }, "javax.swing.TransferHandler");
45338 Clazz_defineMethod (c$, "getTransferHandler", 
45339 function () {
45340 return this.transferHandler;
45341 });
45342 Clazz_overrideMethod (c$, "update", 
45343 function (g) {
45344 this.paint (g);
45345 }, "java.awt.Graphics");
45346 Clazz_defineMethod (c$, "setRootPaneCheckingEnabled", 
45347 function (enabled) {
45348 this.rootPaneCheckingEnabled = enabled;
45349 }, "~B");
45350 Clazz_overrideMethod (c$, "addImpl", 
45351 function (comp, constraints, index) {
45352 if (this.isRootPaneCheckingEnabled ()) {
45353 return this.getContentPane ().add (comp, constraints, index);
45354 }return this.addImplSAEM (comp, constraints, index);
45355 }, "java.awt.Component,~O,~N");
45356 Clazz_defineMethod (c$, "remove", 
45357 function (comp) {
45358 if (comp === this.rootPane) {
45359 this.removeChild (comp);
45360 } else {
45361 this.getContentPane ().removeChild (comp);
45362 }}, "java.awt.Component");
45363 Clazz_defineMethod (c$, "setLayout", 
45364 function (manager) {
45365 if (this.isRootPaneCheckingEnabled ()) {
45366 this.getContentPane ().setLayout (manager);
45367 } else {
45368 Clazz_superCall (this, javax.swing.JWindow, "setLayout", [manager]);
45369 }}, "java.awt.LayoutManager");
45370 Clazz_overrideMethod (c$, "getRootPane", 
45371 function () {
45372 return this.rootPane;
45373 });
45374 Clazz_defineMethod (c$, "setRootPane", 
45375 function (root) {
45376 if (this.rootPane != null) {
45377 this.remove (this.rootPane);
45378 }this.rootPane = root;
45379 if (this.rootPane != null) {
45380 var checkingEnabled = this.isRootPaneCheckingEnabled ();
45381 try {
45382 this.setRootPaneCheckingEnabled (false);
45383 this.add (this.rootPane, "Center");
45384 } finally {
45385 this.setRootPaneCheckingEnabled (checkingEnabled);
45386 }
45387 }}, "javax.swing.JRootPane");
45388 Clazz_overrideMethod (c$, "getContentPane", 
45389 function () {
45390 return this.getRootPane ().getContentPane ();
45391 });
45392 Clazz_overrideMethod (c$, "setContentPane", 
45393 function (contentPane) {
45394 this.getRootPane ().setContentPane (contentPane);
45395 }, "java.awt.Container");
45396 Clazz_overrideMethod (c$, "getLayeredPane", 
45397 function () {
45398 return this.getRootPane ().getLayeredPane ();
45399 });
45400 Clazz_overrideMethod (c$, "setLayeredPane", 
45401 function (layeredPane) {
45402 this.getRootPane ().setLayeredPane (layeredPane);
45403 }, "javax.swing.JLayeredPane");
45404 Clazz_overrideMethod (c$, "getGlassPane", 
45405 function () {
45406 return this.getRootPane ().getGlassPane ();
45407 });
45408 Clazz_overrideMethod (c$, "setGlassPane", 
45409 function (glassPane) {
45410 this.getRootPane ().setGlassPane (glassPane);
45411 }, "java.awt.Component");
45412 Clazz_defineMethod (c$, "getGraphics", 
45413 function () {
45414 javax.swing.JComponent.getGraphicsInvoked (this);
45415 return Clazz_superCall (this, javax.swing.JWindow, "getGraphics", []);
45416 });
45417 Clazz_defineMethod (c$, "repaint", 
45418 function (time, x, y, width, height) {
45419 if (javax.swing.RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
45420 javax.swing.RepaintManager.currentManager (this).addDirtyRegion (this, x, y, width, height);
45421 } else {
45422 Clazz_superCall (this, javax.swing.JWindow, "repaint", [time, x, y, width, height]);
45423 }}, "~N,~N,~N,~N,~N");
45424 Clazz_defineMethod (c$, "paramString", 
45425 function () {
45426 var rootPaneCheckingEnabledString = (this.rootPaneCheckingEnabled ? "true" : "false");
45427 return Clazz_superCall (this, javax.swing.JWindow, "paramString", []) + ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
45428 });
45429 });
45430 Clazz_declarePackage ("javax.swing");
45431 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 () {
45432 c$ = Clazz_decorateAsClass (function () {
45433 this.containerMap = null;
45434 this.componentKeyStrokeMap = null;
45435 if (!Clazz_isClassDefined ("javax.swing.KeyboardManager.ComponentKeyStrokePair")) {
45436 javax.swing.KeyboardManager.$KeyboardManager$ComponentKeyStrokePair$ ();
45437 }
45438 Clazz_instantialize (this, arguments);
45439 }, javax.swing, "KeyboardManager");
45440 Clazz_prepareFields (c$, function () {
45441 this.containerMap =  new java.util.Hashtable ();
45442 this.componentKeyStrokeMap =  new java.util.Hashtable ();
45443 });
45444 c$.getCurrentManager = Clazz_defineMethod (c$, "getCurrentManager", 
45445 function () {
45446 return javax.swing.KeyboardManager.currentManager;
45447 });
45448 c$.setCurrentManager = Clazz_defineMethod (c$, "setCurrentManager", 
45449 function (km) {
45450 javax.swing.KeyboardManager.currentManager = km;
45451 }, "javax.swing.KeyboardManager");
45452 Clazz_defineMethod (c$, "registerKeyStroke", 
45453 function (k, c) {
45454 var topContainer = javax.swing.KeyboardManager.getTopAncestor (c);
45455 if (topContainer == null) {
45456 return;
45457 }var keyMap = this.containerMap.get (topContainer);
45458 if (keyMap == null) {
45459 keyMap = this.registerNewTopContainer (topContainer);
45460 }var tmp = keyMap.get (k);
45461 if (tmp == null) {
45462 keyMap.put (k, c);
45463 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45464 var v = tmp;
45465 if (!v.contains (c)) {
45466 v.addElement (c);
45467 }} else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45468 if (tmp !== c) {
45469 var v =  new java.util.Vector ();
45470 v.addElement (tmp);
45471 v.addElement (c);
45472 keyMap.put (k, v);
45473 }} else {
45474 System.out.println ("Unexpected condition in registerKeyStroke");
45475 Thread.dumpStack ();
45476 }this.componentKeyStrokeMap.put (Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, k), topContainer);
45477 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45478 c$.getTopAncestor = Clazz_defineMethod (c$, "getTopAncestor", 
45479  function (c) {
45480 for (var p = c.getParent (); p != null; p = p.getParent ()) {
45481 if (Clazz_instanceOf (p, java.awt.Window) && (p).isFocusableWindow () || Clazz_instanceOf (p, java.applet.Applet)) {
45482 return p;
45483 }}
45484 return null;
45485 }, "javax.swing.JComponent");
45486 Clazz_defineMethod (c$, "unregisterKeyStroke", 
45487 function (ks, c) {
45488 var ckp = Clazz_innerTypeInstance (javax.swing.KeyboardManager.ComponentKeyStrokePair, this, null, c, ks);
45489 var topContainer = this.componentKeyStrokeMap.get (ckp);
45490 if (topContainer == null) {
45491 return;
45492 }var keyMap = this.containerMap.get (topContainer);
45493 if (keyMap == null) {
45494 Thread.dumpStack ();
45495 return;
45496 }var tmp = keyMap.get (ks);
45497 if (tmp == null) {
45498 Thread.dumpStack ();
45499 return;
45500 }if (Clazz_instanceOf (tmp, javax.swing.JComponent) && tmp === c) {
45501 keyMap.remove (ks);
45502 } else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45503 var v = tmp;
45504 v.removeElement (c);
45505 if (v.isEmpty ()) {
45506 keyMap.remove (ks);
45507 }}if (keyMap.isEmpty ()) {
45508 this.containerMap.remove (topContainer);
45509 }this.componentKeyStrokeMap.remove (ckp);
45510 }, "javax.swing.KeyStroke,javax.swing.JComponent");
45511 Clazz_defineMethod (c$, "fireKeyboardAction", 
45512 function (e, pressed, topAncestor) {
45513 if (e.isConsumed ()) {
45514 System.out.println ("Aquired pre-used event!");
45515 Thread.dumpStack ();
45516 }var ks;
45517 if (e.getID () == 400) {
45518 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyChar ());
45519 } else {
45520 ks = javax.swing.KeyStroke.getKeyStroke (e.getKeyCode (), e.getModifiers (), !pressed);
45521 }var keyMap = this.containerMap.get (topAncestor);
45522 if (keyMap != null) {
45523 var tmp = keyMap.get (ks);
45524 if (tmp == null) {
45525 } else if (Clazz_instanceOf (tmp, javax.swing.JComponent)) {
45526 var c = tmp;
45527 if (c.isShowing () && c.isEnabled ()) {
45528 this.fireBinding (c, ks, e, pressed);
45529 }} else if (Clazz_instanceOf (tmp, java.util.Vector)) {
45530 var v = tmp;
45531 for (var counter = v.size () - 1; counter >= 0; counter--) {
45532 var c = v.elementAt (counter);
45533 if (c.isShowing () && c.isEnabled ()) {
45534 this.fireBinding (c, ks, e, pressed);
45535 if (e.isConsumed ()) return true;
45536 }}
45537 } else {
45538 System.out.println ("Unexpected condition in fireKeyboardAction " + tmp);
45539 Thread.dumpStack ();
45540 }}if (e.isConsumed ()) {
45541 return true;
45542 }if (keyMap != null) {
45543 var v = keyMap.get (javax.swing.JMenuBar);
45544 if (v != null) {
45545 var iter = v.elements ();
45546 while (iter.hasMoreElements ()) {
45547 var mb = iter.nextElement ();
45548 if (mb.isShowing () && mb.isEnabled ()) {
45549 this.fireBinding (mb, ks, e, pressed);
45550 if (e.isConsumed ()) {
45551 return true;
45552 }}}
45553 }}return e.isConsumed ();
45554 }, "java.awt.event.KeyEvent,~B,java.awt.Container");
45555 Clazz_defineMethod (c$, "fireBinding", 
45556 function (c, ks, e, pressed) {
45557 if (c.processKeyBinding (ks, e, 2, pressed)) {
45558 e.consume ();
45559 }}, "javax.swing.JComponent,javax.swing.KeyStroke,java.awt.event.KeyEvent,~B");
45560 Clazz_defineMethod (c$, "registerMenuBar", 
45561 function (mb) {
45562 var top = javax.swing.KeyboardManager.getTopAncestor (mb);
45563 if (top == null) {
45564 return;
45565 }var keyMap = this.containerMap.get (top);
45566 if (keyMap == null) {
45567 keyMap = this.registerNewTopContainer (top);
45568 }var menuBars = keyMap.get (javax.swing.JMenuBar);
45569 if (menuBars == null) {
45570 menuBars =  new java.util.Vector ();
45571 keyMap.put (javax.swing.JMenuBar, menuBars);
45572 }if (!menuBars.contains (mb)) {
45573 menuBars.addElement (mb);
45574 }}, "javax.swing.JMenuBar");
45575 Clazz_defineMethod (c$, "unregisterMenuBar", 
45576 function (mb) {
45577 var topContainer = javax.swing.KeyboardManager.getTopAncestor (mb);
45578 if (topContainer == null) {
45579 return;
45580 }var keyMap = this.containerMap.get (topContainer);
45581 if (keyMap != null) {
45582 var v = keyMap.get (javax.swing.JMenuBar);
45583 if (v != null) {
45584 v.removeElement (mb);
45585 if (v.isEmpty ()) {
45586 keyMap.remove (javax.swing.JMenuBar);
45587 if (keyMap.isEmpty ()) {
45588 this.containerMap.remove (topContainer);
45589 }}}}}, "javax.swing.JMenuBar");
45590 Clazz_defineMethod (c$, "registerNewTopContainer", 
45591 function (topContainer) {
45592 var keyMap =  new java.util.Hashtable ();
45593 this.containerMap.put (topContainer, keyMap);
45594 return keyMap;
45595 }, "java.awt.Container");
45596 c$.$KeyboardManager$ComponentKeyStrokePair$ = function () {
45597 Clazz_pu$h(self.c$);
45598 c$ = Clazz_decorateAsClass (function () {
45599 Clazz_prepareCallback (this, arguments);
45600 this.component = null;
45601 this.keyStroke = null;
45602 Clazz_instantialize (this, arguments);
45603 }, javax.swing.KeyboardManager, "ComponentKeyStrokePair");
45604 Clazz_makeConstructor (c$, 
45605 function (a, b) {
45606 this.component = a;
45607 this.keyStroke = b;
45608 }, "~O,~O");
45609 Clazz_defineMethod (c$, "equals", 
45610 function (a) {
45611 if (!(Clazz_instanceOf (a, javax.swing.KeyboardManager.ComponentKeyStrokePair))) {
45612 return false;
45613 }var b = a;
45614 return ((this.component.equals (b.component)) && (this.keyStroke.equals (b.keyStroke)));
45615 }, "~O");
45616 Clazz_defineMethod (c$, "hashCode", 
45617 function () {
45618 return this.component.hashCode () * this.keyStroke.hashCode ();
45619 });
45620 c$ = Clazz_p0p ();
45621 };
45622 c$.currentManager = c$.prototype.currentManager =  new javax.swing.KeyboardManager ();
45623 });
45624 Clazz_declarePackage ("javax.swing");
45625 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 () {
45626 c$ = Clazz_decorateAsClass (function () {
45627 this.selectionModel = null;
45628 this.$paintBorder = true;
45629 this.margin = null;
45630 Clazz_instantialize (this, arguments);
45631 }, javax.swing, "JMenuBar", javax.swing.JComponent, javax.swing.MenuElement);
45632 Clazz_makeConstructor (c$, 
45633 function () {
45634 Clazz_superConstructor (this, javax.swing.JMenuBar);
45635 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
45636 this.updateUI ();
45637 });
45638 Clazz_overrideMethod (c$, "getUI", 
45639 function () {
45640 return this.ui;
45641 });
45642 Clazz_overrideMethod (c$, "updateUI", 
45643 function () {
45644 this.setUI (javax.swing.UIManager.getUI (this));
45645 });
45646 Clazz_overrideMethod (c$, "getUIClassID", 
45647 function () {
45648 return "MenuBarUI";
45649 });
45650 Clazz_defineMethod (c$, "getSelectionModel", 
45651 function () {
45652 return this.selectionModel;
45653 });
45654 Clazz_defineMethod (c$, "setSelectionModel", 
45655 function (model) {
45656 var oldValue = this.selectionModel;
45657 this.selectionModel = model;
45658 this.firePropertyChangeObject ("selectionModel", oldValue, this.selectionModel);
45659 }, "javax.swing.SingleSelectionModel");
45660 Clazz_defineMethod (c$, "add", 
45661 function (c) {
45662 Clazz_superCall (this, javax.swing.JMenuBar, "add", [c]);
45663 return c;
45664 }, "javax.swing.JMenu");
45665 Clazz_defineMethod (c$, "getMenu", 
45666 function (index) {
45667 var c = this.getComponentAtIndex (index);
45668 if (Clazz_instanceOf (c, javax.swing.JMenu)) return c;
45669 return null;
45670 }, "~N");
45671 Clazz_defineMethod (c$, "getMenuCount", 
45672 function () {
45673 return this.getComponentCount ();
45674 });
45675 Clazz_defineMethod (c$, "setHelpMenu", 
45676 function (menu) {
45677 throw  new Error ("setHelpMenu() not yet implemented.");
45678 }, "javax.swing.JMenu");
45679 Clazz_defineMethod (c$, "getHelpMenu", 
45680 function () {
45681 throw  new Error ("getHelpMenu() not yet implemented.");
45682 });
45683 Clazz_defineMethod (c$, "getComponentAtIndex", 
45684 function (i) {
45685 if (i < 0 || i >= this.getComponentCount ()) {
45686 return null;
45687 }return this.getComponent (i);
45688 }, "~N");
45689 Clazz_defineMethod (c$, "getComponentIndex", 
45690 function (c) {
45691 var ncomponents = this.getComponentCount ();
45692 var component = this.getComponents ();
45693 for (var i = 0; i < ncomponents; i++) {
45694 var comp = component[i];
45695 if (comp === c) return i;
45696 }
45697 return -1;
45698 }, "java.awt.Component");
45699 Clazz_defineMethod (c$, "setSelected", 
45700 function (sel) {
45701 var model = this.getSelectionModel ();
45702 var index = this.getComponentIndex (sel);
45703 model.setSelectedIndex (index);
45704 }, "java.awt.Component");
45705 Clazz_defineMethod (c$, "isSelected", 
45706 function () {
45707 return this.selectionModel.isSelected ();
45708 });
45709 Clazz_defineMethod (c$, "isBorderPainted", 
45710 function () {
45711 return this.$paintBorder;
45712 });
45713 Clazz_defineMethod (c$, "setBorderPainted", 
45714 function (b) {
45715 var oldValue = this.$paintBorder;
45716 this.$paintBorder = b;
45717 this.firePropertyChangeBool ("borderPainted", oldValue, this.$paintBorder);
45718 if (b != oldValue) {
45719 this.revalidate ();
45720 this.repaint ();
45721 }}, "~B");
45722 Clazz_defineMethod (c$, "paintBorder", 
45723 function (g) {
45724 if (this.isBorderPainted ()) {
45725 Clazz_superCall (this, javax.swing.JMenuBar, "paintBorder", [g]);
45726 }}, "java.awt.Graphics");
45727 Clazz_defineMethod (c$, "setMargin", 
45728 function (m) {
45729 var old = this.margin;
45730 this.margin = m;
45731 this.firePropertyChangeObject ("margin", old, m);
45732 if (old == null || !old.equals (m)) {
45733 this.revalidate ();
45734 this.repaint ();
45735 }}, "java.awt.Insets");
45736 Clazz_defineMethod (c$, "getMargin", 
45737 function () {
45738 if (this.margin == null) {
45739 return  new java.awt.Insets (0, 0, 0, 0);
45740 } else {
45741 return this.margin;
45742 }});
45743 Clazz_defineMethod (c$, "processMouseEvent", 
45744 function (event, path, manager) {
45745 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
45746 Clazz_defineMethod (c$, "processKeyEvent", 
45747 function (e, path, manager) {
45748 }, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
45749 Clazz_overrideMethod (c$, "menuSelectionChanged", 
45750 function (isIncluded) {
45751 }, "~B");
45752 Clazz_defineMethod (c$, "getSubElements", 
45753 function () {
45754 var result;
45755 var tmp =  new java.util.Vector ();
45756 var c = this.getComponentCount ();
45757 var i;
45758 var m;
45759 for (i = 0; i < c; i++) {
45760 m = this.getComponent (i);
45761 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
45762 }
45763 result =  new Array (tmp.size ());
45764 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
45765
45766 return result;
45767 });
45768 Clazz_defineMethod (c$, "getComponent", 
45769 function () {
45770 return this;
45771 });
45772 Clazz_defineMethod (c$, "paramString", 
45773 function () {
45774 var paintBorderString = (this.$paintBorder ? "true" : "false");
45775 var marginString = (this.margin != null ? this.margin.toString () : "");
45776 return Clazz_superCall (this, javax.swing.JMenuBar, "paramString", []) + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
45777 });
45778 Clazz_defineMethod (c$, "processKeyBinding", 
45779 function (ks, e, condition, pressed) {
45780 var retValue = Clazz_superCall (this, javax.swing.JMenuBar, "processKeyBinding", [ks, e, condition, pressed]);
45781 if (!retValue) {
45782 var subElements = this.getSubElements ();
45783 for (var i = 0; i < subElements.length; i++) {
45784 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45785 return true;
45786 }}
45787 }return retValue;
45788 }, "javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45789 c$.processBindingForKeyStrokeRecursive = Clazz_defineMethod (c$, "processBindingForKeyStrokeRecursive", 
45790 function (elem, ks, e, condition, pressed) {
45791 if (elem == null) {
45792 return false;
45793 }var c = elem.getComponent ();
45794 if (!(c.isVisible () || (Clazz_instanceOf (c, javax.swing.JPopupMenu))) || !c.isEnabled ()) {
45795 return false;
45796 }if (c != null && Clazz_instanceOf (c, javax.swing.JComponent) && (c).processKeyBinding (ks, e, condition, pressed)) {
45797 return true;
45798 }var subElements = elem.getSubElements ();
45799 for (var i = 0; i < subElements.length; i++) {
45800 if (javax.swing.JMenuBar.processBindingForKeyStrokeRecursive (subElements[i], ks, e, condition, pressed)) {
45801 return true;
45802 }}
45803 return false;
45804 }, "javax.swing.MenuElement,javax.swing.KeyStroke,java.awt.event.KeyEvent,~N,~B");
45805 Clazz_defineMethod (c$, "addNotify", 
45806 function () {
45807 Clazz_superCall (this, javax.swing.JMenuBar, "addNotify", []);
45808 javax.swing.KeyboardManager.getCurrentManager ().registerMenuBar (this);
45809 });
45810 Clazz_defineMethod (c$, "removeNotify", 
45811 function () {
45812 Clazz_superCall (this, javax.swing.JMenuBar, "removeNotify", []);
45813 javax.swing.KeyboardManager.getCurrentManager ().unregisterMenuBar (this);
45814 });
45815 Clazz_defineStatics (c$,
45816 "$uiClassID", "MenuBarUI");
45817 });
45818 Clazz_declarePackage ("javax.swing");
45819 Clazz_declareInterface (javax.swing, "MenuElement");
45820 Clazz_declarePackage ("javax.swing");
45821 Clazz_load (["javax.swing.SingleSelectionModel", "javax.swing.event.EventListenerList"], "javax.swing.DefaultSingleSelectionModel", ["javax.swing.event.ChangeEvent", "$.ChangeListener"], function () {
45822 c$ = Clazz_decorateAsClass (function () {
45823 this.changeEvent = null;
45824 this.listenerList = null;
45825 this.index = -1;
45826 Clazz_instantialize (this, arguments);
45827 }, javax.swing, "DefaultSingleSelectionModel", null, javax.swing.SingleSelectionModel);
45828 Clazz_prepareFields (c$, function () {
45829 this.listenerList =  new javax.swing.event.EventListenerList ();
45830 });
45831 Clazz_overrideMethod (c$, "getSelectedIndex", 
45832 function () {
45833 return this.index;
45834 });
45835 Clazz_overrideMethod (c$, "setSelectedIndex", 
45836 function (index) {
45837 if (this.index != index) {
45838 this.index = index;
45839 this.fireStateChanged ();
45840 }}, "~N");
45841 Clazz_overrideMethod (c$, "clearSelection", 
45842 function () {
45843 this.setSelectedIndex (-1);
45844 });
45845 Clazz_overrideMethod (c$, "isSelected", 
45846 function () {
45847 var ret = false;
45848 if (this.getSelectedIndex () != -1) {
45849 ret = true;
45850 }return ret;
45851 });
45852 Clazz_overrideMethod (c$, "addChangeListener", 
45853 function (l) {
45854 this.listenerList.add (javax.swing.event.ChangeListener, l);
45855 }, "javax.swing.event.ChangeListener");
45856 Clazz_overrideMethod (c$, "removeChangeListener", 
45857 function (l) {
45858 this.listenerList.remove (javax.swing.event.ChangeListener, l);
45859 }, "javax.swing.event.ChangeListener");
45860 Clazz_defineMethod (c$, "getChangeListeners", 
45861 function () {
45862 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
45863 });
45864 Clazz_defineMethod (c$, "fireStateChanged", 
45865 function () {
45866 var listeners = this.listenerList.getListenerList ();
45867 for (var i = listeners.length - 2; i >= 0; i -= 2) {
45868 if (listeners[i] === javax.swing.event.ChangeListener) {
45869 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
45870 (listeners[i + 1]).stateChanged (this.changeEvent);
45871 }}
45872 });
45873 Clazz_defineMethod (c$, "getListeners", 
45874 function (listenerType) {
45875 return this.listenerList.getListeners (listenerType);
45876 }, "Class");
45877 });
45878 Clazz_declarePackage ("javax.swing");
45879 Clazz_declareInterface (javax.swing, "SingleSelectionModel");
45880 Clazz_declarePackage ("javax.swing");
45881 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 () {
45882 c$ = Clazz_decorateAsClass (function () {
45883 this.$popupMenu = null;
45884 this.menuChangeListener = null;
45885 this.menuEvent = null;
45886 this.delay = 0;
45887 this.customMenuLocation = null;
45888 this.popupListener = null;
45889 if (!Clazz_isClassDefined ("javax.swing.JMenu.MenuChangeListener")) {
45890 javax.swing.JMenu.$JMenu$MenuChangeListener$ ();
45891 }
45892 if (!Clazz_isClassDefined ("javax.swing.JMenu.WinListener")) {
45893 javax.swing.JMenu.$JMenu$WinListener$ ();
45894 }
45895 Clazz_instantialize (this, arguments);
45896 }, javax.swing, "JMenu", javax.swing.JMenuItem, javax.swing.MenuElement);
45897 Clazz_makeConstructor (c$, 
45898 function () {
45899 Clazz_superConstructor (this, javax.swing.JMenu, []);
45900 this.init0 ("", null, -2147483648);
45901 });
45902 Clazz_makeConstructor (c$, 
45903 function (s) {
45904 Clazz_superConstructor (this, javax.swing.JMenu, []);
45905 this.init0 (s, null, -2147483648);
45906 }, "~S");
45907 Clazz_makeConstructor (c$, 
45908 function (a) {
45909 Clazz_superConstructor (this, javax.swing.JMenu, []);
45910 this.init0 ("", null, -2147483648);
45911 this.setAction (a);
45912 }, "javax.swing.Action");
45913 Clazz_makeConstructor (c$, 
45914 function (s, b) {
45915 Clazz_superConstructor (this, javax.swing.JMenu, []);
45916 this.init0 (s, null, -2147483648);
45917 }, "~S,~B");
45918 Clazz_overrideMethod (c$, "initFocusability", 
45919 function () {
45920 });
45921 Clazz_overrideMethod (c$, "updateUI", 
45922 function () {
45923 this.setUI (javax.swing.UIManager.getUI (this));
45924 if (this.$popupMenu != null) {
45925 this.$popupMenu.setUI (javax.swing.UIManager.getUI (this.$popupMenu));
45926 }});
45927 Clazz_overrideMethod (c$, "getUIClassID", 
45928 function () {
45929 return "MenuUI";
45930 });
45931 Clazz_defineMethod (c$, "setModel", 
45932 function (newModel) {
45933 var oldModel = this.getModel ();
45934 Clazz_superCall (this, javax.swing.JMenu, "setModel", [newModel]);
45935 if (oldModel != null && this.menuChangeListener != null) {
45936 oldModel.removeChangeListener (this.menuChangeListener);
45937 this.menuChangeListener = null;
45938 }this.model = newModel;
45939 if (newModel != null) {
45940 this.menuChangeListener = this.createMenuChangeListener ();
45941 newModel.addChangeListener (this.menuChangeListener);
45942 }}, "javax.swing.ButtonModel");
45943 Clazz_overrideMethod (c$, "isSelected", 
45944 function () {
45945 return this.getModel ().isSelected ();
45946 });
45947 Clazz_overrideMethod (c$, "setSelected", 
45948 function (b) {
45949 var model = this.getModel ();
45950 if (b != model.isSelected ()) {
45951 this.getModel ().setSelected (b);
45952 }}, "~B");
45953 Clazz_defineMethod (c$, "isPopupMenuVisible", 
45954 function () {
45955 this.ensurePopupMenuCreated ();
45956 return this.$popupMenu.isVisible ();
45957 });
45958 Clazz_defineMethod (c$, "setPopupMenuVisible", 
45959 function (b) {
45960 var isVisible = this.isPopupMenuVisible ();
45961 if (b != isVisible && (this.isEnabled () || !b)) {
45962 this.ensurePopupMenuCreated ();
45963 if ((b == true) && this.isShowing ()) {
45964 var p = this.getCustomMenuLocation ();
45965 if (p == null) {
45966 p = this.getPopupMenuOrigin ();
45967 }this.getPopupMenu ().show (this, p.x, p.y);
45968 } else {
45969 this.getPopupMenu ().setVisible (false);
45970 }}}, "~B");
45971 Clazz_defineMethod (c$, "getPopupMenuOrigin", 
45972 function () {
45973 var x = 0;
45974 var y = 0;
45975 var pm = this.getPopupMenu ();
45976 var s = this.getSize ();
45977 var pmSize = pm.getSize ();
45978 if (pmSize.width == 0) {
45979 pmSize = pm.getPreferredSize ();
45980 }var position = this.getLocationOnScreen ();
45981 var toolkit = java.awt.Toolkit.getDefaultToolkit ();
45982 var gc = this.getGraphicsConfiguration ();
45983 var screenBounds =  new java.awt.Rectangle (toolkit.getScreenSize ());
45984 if (gc != null) {
45985 screenBounds = gc.getBounds ();
45986 var screenInsets = toolkit.getScreenInsets (gc);
45987 screenBounds.width -= Math.abs (screenInsets.left + screenInsets.right);
45988 screenBounds.height -= Math.abs (screenInsets.top + screenInsets.bottom);
45989 position.x -= Math.abs (screenInsets.left);
45990 position.y -= Math.abs (screenInsets.top);
45991 }var parent = this.getParent ();
45992 if (Clazz_instanceOf (parent, javax.swing.JPopupMenu)) {
45993 var xOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetX");
45994 var yOffset = javax.swing.UIManager.getInt ("Menu.submenuPopupOffsetY");
45995 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
45996 x = s.width + xOffset;
45997 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
45998 x = 0 - xOffset - pmSize.width;
45999 }} else {
46000 x = 0 - xOffset - pmSize.width;
46001 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46002 x = s.width + xOffset;
46003 }}y = yOffset;
46004 if (position.y + y + pmSize.height >= screenBounds.height + screenBounds.y && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46005 y = s.height - yOffset - pmSize.height;
46006 }} else {
46007 var xOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetX");
46008 var yOffset = javax.swing.UIManager.getInt ("Menu.menuPopupOffsetY");
46009 if (javax.swing.SwingUtilities.isLeftToRight (this)) {
46010 x = xOffset;
46011 if (position.x + x + pmSize.width >= screenBounds.width + screenBounds.x && screenBounds.width - s.width < 2 * (position.x - screenBounds.x)) {
46012 x = s.width - xOffset - pmSize.width;
46013 }} else {
46014 x = s.width - xOffset - pmSize.width;
46015 if (position.x + x < screenBounds.x && screenBounds.width - s.width > 2 * (position.x - screenBounds.x)) {
46016 x = xOffset;
46017 }}y = s.height + yOffset;
46018 if (position.y + y + pmSize.height >= screenBounds.height && screenBounds.height - s.height < 2 * (position.y - screenBounds.y)) {
46019 y = 0 - yOffset - pmSize.height;
46020 }}return  new java.awt.Point (x, y);
46021 });
46022 Clazz_defineMethod (c$, "getDelay", 
46023 function () {
46024 return this.delay;
46025 });
46026 Clazz_defineMethod (c$, "setDelay", 
46027 function (d) {
46028 if (d < 0) throw  new IllegalArgumentException ("Delay must be a positive integer");
46029 this.delay = d;
46030 }, "~N");
46031 Clazz_defineMethod (c$, "ensurePopupMenuCreated", 
46032  function () {
46033 if (this.$popupMenu == null) {
46034 this.$popupMenu =  new javax.swing.JPopupMenu ();
46035 this.$popupMenu.setInvoker (this);
46036 this.popupListener = this.createWinListener (this.$popupMenu);
46037 }});
46038 Clazz_defineMethod (c$, "getCustomMenuLocation", 
46039  function () {
46040 return this.customMenuLocation;
46041 });
46042 Clazz_defineMethod (c$, "setMenuLocation", 
46043 function (x, y) {
46044 this.customMenuLocation =  new java.awt.Point (x, y);
46045 if (this.$popupMenu != null) this.$popupMenu.setLocation (x, y);
46046 }, "~N,~N");
46047 Clazz_defineMethod (c$, "add", 
46048 function (menuItem) {
46049 this.ensurePopupMenuCreated ();
46050 return this.$popupMenu.add (menuItem);
46051 }, "javax.swing.JMenuItem");
46052 Clazz_defineMethod (c$, "add", 
46053 function (c) {
46054 this.ensurePopupMenuCreated ();
46055 this.$popupMenu.add (c);
46056 return c;
46057 }, "java.awt.Component");
46058 Clazz_defineMethod (c$, "add", 
46059 function (c, index) {
46060 this.ensurePopupMenuCreated ();
46061 this.$popupMenu.add (c, index);
46062 return c;
46063 }, "java.awt.Component,~N");
46064 Clazz_defineMethod (c$, "add", 
46065 function (s) {
46066 return this.add ( new javax.swing.JMenuItem (s));
46067 }, "~S");
46068 Clazz_defineMethod (c$, "add", 
46069 function (a) {
46070 var mi = this.createActionComponent (a);
46071 mi.setAction (a);
46072 this.add (mi);
46073 return mi;
46074 }, "javax.swing.Action");
46075 Clazz_defineMethod (c$, "createActionComponent", 
46076 function (a) {
46077 var mi = ((Clazz_isClassDefined ("javax.swing.JMenu$1") ? 0 : javax.swing.JMenu.$JMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JMenu$1, this, null));
46078 mi.setHorizontalTextPosition (11);
46079 mi.setVerticalTextPosition (0);
46080 return mi;
46081 }, "javax.swing.Action");
46082 Clazz_defineMethod (c$, "createActionChangeListener", 
46083 function (b) {
46084 return b.createActionPropertyChangeListener0 (b.getAction ());
46085 }, "javax.swing.JMenuItem");
46086 Clazz_defineMethod (c$, "addSeparator", 
46087 function () {
46088 this.ensurePopupMenuCreated ();
46089 this.$popupMenu.addSeparator ();
46090 });
46091 Clazz_defineMethod (c$, "insert", 
46092 function (s, pos) {
46093 if (pos < 0) {
46094 throw  new IllegalArgumentException ("index less than zero.");
46095 }this.ensurePopupMenuCreated ();
46096 this.$popupMenu.insert ( new javax.swing.JMenuItem (s), pos);
46097 }, "~S,~N");
46098 Clazz_defineMethod (c$, "insert", 
46099 function (mi, pos) {
46100 if (pos < 0) {
46101 throw  new IllegalArgumentException ("index less than zero.");
46102 }this.ensurePopupMenuCreated ();
46103 this.$popupMenu.insert (mi, pos);
46104 return mi;
46105 }, "javax.swing.JMenuItem,~N");
46106 Clazz_defineMethod (c$, "insert", 
46107 function (a, pos) {
46108 if (pos < 0) {
46109 throw  new IllegalArgumentException ("index less than zero.");
46110 }this.ensurePopupMenuCreated ();
46111 var mi =  new javax.swing.JMenuItem (a);
46112 mi.setHorizontalTextPosition (11);
46113 mi.setVerticalTextPosition (0);
46114 this.$popupMenu.insert (mi, pos);
46115 return mi;
46116 }, "javax.swing.Action,~N");
46117 Clazz_defineMethod (c$, "insertSeparator", 
46118 function (index) {
46119 if (index < 0) {
46120 throw  new IllegalArgumentException ("index less than zero.");
46121 }this.ensurePopupMenuCreated ();
46122 this.$popupMenu.insert ( new javax.swing.JPopupMenu.Separator (), index);
46123 }, "~N");
46124 Clazz_defineMethod (c$, "getItem", 
46125 function (pos) {
46126 if (pos < 0) {
46127 throw  new IllegalArgumentException ("index less than zero.");
46128 }var c = this.getMenuComponent (pos);
46129 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) {
46130 var mi = c;
46131 return mi;
46132 }return null;
46133 }, "~N");
46134 Clazz_defineMethod (c$, "getItemCount", 
46135 function () {
46136 return this.getMenuComponentCount ();
46137 });
46138 Clazz_defineMethod (c$, "isTearOff", 
46139 function () {
46140 throw  new Error ("boolean isTearOff() {} not yet implemented");
46141 });
46142 Clazz_defineMethod (c$, "remove", 
46143 function (pos) {
46144 if (pos < 0) {
46145 throw  new IllegalArgumentException ("index less than zero.");
46146 }if (pos > this.getItemCount ()) {
46147 throw  new IllegalArgumentException ("index greater than the number of items.");
46148 }if (this.$popupMenu != null) this.$popupMenu.remove (pos);
46149 }, "~N");
46150 Clazz_defineMethod (c$, "remove", 
46151 function (c) {
46152 if (Clazz_instanceOf (c, javax.swing.JMenuItem)) if (this.$popupMenu != null) this.$popupMenu.remove (c);
46153 if (this.$popupMenu != null) this.$popupMenu.remove (c);
46154 }, "java.awt.Component");
46155 Clazz_defineMethod (c$, "removeAll", 
46156 function () {
46157 if (this.$popupMenu != null) this.$popupMenu.removeAll ();
46158 });
46159 Clazz_defineMethod (c$, "getMenuComponentCount", 
46160 function () {
46161 var componentCount = 0;
46162 if (this.$popupMenu != null) componentCount = this.$popupMenu.getComponentCount ();
46163 return componentCount;
46164 });
46165 Clazz_defineMethod (c$, "getMenuComponent", 
46166 function (n) {
46167 if (this.$popupMenu != null) return this.$popupMenu.getComponent (n);
46168 return null;
46169 }, "~N");
46170 Clazz_defineMethod (c$, "getMenuComponents", 
46171 function () {
46172 if (this.$popupMenu != null) return this.$popupMenu.getComponents ();
46173 return  new Array (0);
46174 });
46175 Clazz_defineMethod (c$, "isTopLevelMenu", 
46176 function () {
46177 if (Clazz_instanceOf (this.getParent (), javax.swing.JMenuBar)) return true;
46178 return false;
46179 });
46180 Clazz_defineMethod (c$, "isMenuComponent", 
46181 function (c) {
46182 if (c === this) return true;
46183 if (Clazz_instanceOf (c, javax.swing.JPopupMenu)) {
46184 var comp = c;
46185 if (comp === this.getPopupMenu ()) return true;
46186 }var ncomponents = this.getMenuComponentCount ();
46187 var component = this.getMenuComponents ();
46188 for (var i = 0; i < ncomponents; i++) {
46189 var comp = component[i];
46190 if (comp === c) return true;
46191 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
46192 var subMenu = comp;
46193 if (subMenu.isMenuComponent (c)) return true;
46194 }}
46195 return false;
46196 }, "java.awt.Component");
46197 Clazz_defineMethod (c$, "getPopupMenu", 
46198 function () {
46199 this.ensurePopupMenuCreated ();
46200 return this.$popupMenu;
46201 });
46202 Clazz_defineMethod (c$, "addMenuListener", 
46203 function (l) {
46204 this.listenerList.add (javax.swing.event.MenuListener, l);
46205 }, "javax.swing.event.MenuListener");
46206 Clazz_defineMethod (c$, "removeMenuListener", 
46207 function (l) {
46208 this.listenerList.remove (javax.swing.event.MenuListener, l);
46209 }, "javax.swing.event.MenuListener");
46210 Clazz_defineMethod (c$, "getMenuListeners", 
46211 function () {
46212 return this.listenerList.getListeners (javax.swing.event.MenuListener);
46213 });
46214 Clazz_defineMethod (c$, "fireMenuSelected", 
46215 function () {
46216 var listeners = this.listenerList.getListenerList ();
46217 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46218 if (listeners[i] === javax.swing.event.MenuListener) {
46219 if (listeners[i + 1] == null) {
46220 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46221 } else {
46222 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46223 (listeners[i + 1]).menuSelected (this.menuEvent);
46224 }}}
46225 });
46226 Clazz_defineMethod (c$, "fireMenuDeselected", 
46227 function () {
46228 var listeners = this.listenerList.getListenerList ();
46229 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46230 if (listeners[i] === javax.swing.event.MenuListener) {
46231 if (listeners[i + 1] == null) {
46232 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46233 } else {
46234 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46235 (listeners[i + 1]).menuDeselected (this.menuEvent);
46236 }}}
46237 });
46238 Clazz_defineMethod (c$, "fireMenuCanceled", 
46239 function () {
46240 var listeners = this.listenerList.getListenerList ();
46241 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46242 if (listeners[i] === javax.swing.event.MenuListener) {
46243 if (listeners[i + 1] == null) {
46244 throw  new Error (this.getText () + " has a NULL Listener!! " + i);
46245 } else {
46246 if (this.menuEvent == null) this.menuEvent =  new javax.swing.event.MenuEvent (this);
46247 (listeners[i + 1]).menuCanceled (this.menuEvent);
46248 }}}
46249 });
46250 Clazz_overrideMethod (c$, "configureAcceleratorFromAction", 
46251 function (a) {
46252 }, "javax.swing.Action");
46253 Clazz_defineMethod (c$, "createMenuChangeListener", 
46254  function () {
46255 return Clazz_innerTypeInstance (javax.swing.JMenu.MenuChangeListener, this, null);
46256 });
46257 Clazz_defineMethod (c$, "createWinListener", 
46258 function (p) {
46259 return Clazz_innerTypeInstance (javax.swing.JMenu.WinListener, this, null, p);
46260 }, "javax.swing.JPopupMenu");
46261 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46262 function (isIncluded) {
46263 this.setSelected (isIncluded);
46264 }, "~B");
46265 Clazz_overrideMethod (c$, "getSubElements", 
46266 function () {
46267 if (this.$popupMenu == null) return  new Array (0);
46268  else {
46269 var result =  new Array (1);
46270 result[0] = this.$popupMenu;
46271 return result;
46272 }});
46273 Clazz_defineMethod (c$, "getComponent", 
46274 function () {
46275 return this;
46276 });
46277 Clazz_defineMethod (c$, "applyComponentOrientation", 
46278 function (o) {
46279 Clazz_superCall (this, javax.swing.JMenu, "applyComponentOrientation", [o]);
46280 if (this.$popupMenu != null) {
46281 var ncomponents = this.getMenuComponentCount ();
46282 for (var i = 0; i < ncomponents; ++i) {
46283 this.getMenuComponent (i).applyComponentOrientation (o);
46284 }
46285 this.$popupMenu.setComponentOrientation (o);
46286 }}, "java.awt.ComponentOrientation");
46287 Clazz_defineMethod (c$, "setComponentOrientation", 
46288 function (o) {
46289 Clazz_superCall (this, javax.swing.JMenu, "setComponentOrientation", [o]);
46290 if (this.$popupMenu != null) {
46291 this.$popupMenu.setComponentOrientation (o);
46292 }}, "java.awt.ComponentOrientation");
46293 Clazz_overrideMethod (c$, "setAccelerator", 
46294 function (keyStroke) {
46295 throw  new Error ("setAccelerator() is not defined for JMenu.  Use setMnemonic() instead.");
46296 }, "javax.swing.KeyStroke");
46297 Clazz_defineMethod (c$, "processKeyEvent", 
46298 function (evt) {
46299 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46300 if (evt.isConsumed ()) return;
46301 Clazz_superCall (this, javax.swing.JMenu, "processKeyEvent", [evt]);
46302 }, "java.awt.event.KeyEvent");
46303 Clazz_defineMethod (c$, "doClick", 
46304 function (pressTime) {
46305 var me = this.buildMenuElementArray (this);
46306 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
46307 }, "~N");
46308 Clazz_defineMethod (c$, "buildMenuElementArray", 
46309  function (leaf) {
46310 var elements =  new java.util.Vector ();
46311 var current = leaf.getPopupMenu ();
46312 var pop;
46313 var menu;
46314 var bar;
46315 while (true) {
46316 if (Clazz_instanceOf (current, javax.swing.JPopupMenu)) {
46317 pop = current;
46318 elements.insertElementAt (pop, 0);
46319 current = pop.getInvoker ();
46320 } else if (Clazz_instanceOf (current, javax.swing.JMenu)) {
46321 menu = current;
46322 elements.insertElementAt (menu, 0);
46323 current = menu.getParent ();
46324 } else if (Clazz_instanceOf (current, javax.swing.JMenuBar)) {
46325 bar = current;
46326 elements.insertElementAt (bar, 0);
46327 var me =  new Array (elements.size ());
46328 elements.copyInto (me);
46329 return me;
46330 }}
46331 }, "javax.swing.JMenu");
46332 c$.$JMenu$MenuChangeListener$ = function () {
46333 Clazz_pu$h(self.c$);
46334 c$ = Clazz_decorateAsClass (function () {
46335 Clazz_prepareCallback (this, arguments);
46336 this.isSelected = false;
46337 Clazz_instantialize (this, arguments);
46338 }, javax.swing.JMenu, "MenuChangeListener", null, javax.swing.event.ChangeListener);
46339 Clazz_overrideMethod (c$, "stateChanged", 
46340 function (a) {
46341 var b = a.getSource ();
46342 var c = b.isSelected ();
46343 if (c != this.isSelected) {
46344 if (c == true) {
46345 this.b$["javax.swing.JMenu"].fireMenuSelected ();
46346 } else {
46347 this.b$["javax.swing.JMenu"].fireMenuDeselected ();
46348 }this.isSelected = c;
46349 }}, "javax.swing.event.ChangeEvent");
46350 c$ = Clazz_p0p ();
46351 };
46352 c$.$JMenu$WinListener$ = function () {
46353 Clazz_pu$h(self.c$);
46354 c$ = Clazz_decorateAsClass (function () {
46355 Clazz_prepareCallback (this, arguments);
46356 this.popupMenu = null;
46357 Clazz_instantialize (this, arguments);
46358 }, javax.swing.JMenu, "WinListener", java.awt.event.WindowAdapter);
46359 Clazz_makeConstructor (c$, 
46360 function (a) {
46361 Clazz_superConstructor (this, javax.swing.JMenu.WinListener, []);
46362 this.popupMenu = a;
46363 }, "javax.swing.JPopupMenu");
46364 Clazz_overrideMethod (c$, "windowClosing", 
46365 function (a) {
46366 this.b$["javax.swing.JMenu"].setSelected (false);
46367 }, "java.awt.event.WindowEvent");
46368 c$ = Clazz_p0p ();
46369 };
46370 c$.$JMenu$1$ = function () {
46371 Clazz_pu$h(self.c$);
46372 c$ = Clazz_declareAnonymous (javax.swing, "JMenu$1", javax.swing.JMenuItem);
46373 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
46374 function (a) {
46375 var pcl = this.b$["javax.swing.JMenu"].createActionChangeListener (this);
46376 if (pcl == null) {
46377 pcl = Clazz_superCall (this, javax.swing.JMenu$1, "createActionPropertyChangeListener", [a]);
46378 }return pcl;
46379 }, "javax.swing.Action");
46380 c$ = Clazz_p0p ();
46381 };
46382 Clazz_defineStatics (c$,
46383 "$$uiClassID", "MenuUI");
46384 });
46385 Clazz_declarePackage ("java.awt.event");
46386 Clazz_load (["java.awt.event.WindowFocusListener", "$.WindowListener", "$.WindowStateListener"], "java.awt.event.WindowAdapter", null, function () {
46387 c$ = Clazz_declareType (java.awt.event, "WindowAdapter", null, [java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.awt.event.WindowFocusListener]);
46388 Clazz_overrideMethod (c$, "windowOpened", 
46389 function (e) {
46390 }, "java.awt.event.WindowEvent");
46391 Clazz_overrideMethod (c$, "windowClosing", 
46392 function (e) {
46393 }, "java.awt.event.WindowEvent");
46394 Clazz_overrideMethod (c$, "windowClosed", 
46395 function (e) {
46396 }, "java.awt.event.WindowEvent");
46397 Clazz_overrideMethod (c$, "windowIconified", 
46398 function (e) {
46399 }, "java.awt.event.WindowEvent");
46400 Clazz_overrideMethod (c$, "windowDeiconified", 
46401 function (e) {
46402 }, "java.awt.event.WindowEvent");
46403 Clazz_overrideMethod (c$, "windowActivated", 
46404 function (e) {
46405 }, "java.awt.event.WindowEvent");
46406 Clazz_overrideMethod (c$, "windowDeactivated", 
46407 function (e) {
46408 }, "java.awt.event.WindowEvent");
46409 Clazz_overrideMethod (c$, "windowStateChanged", 
46410 function (e) {
46411 }, "java.awt.event.WindowEvent");
46412 Clazz_overrideMethod (c$, "windowGainedFocus", 
46413 function (e) {
46414 }, "java.awt.event.WindowEvent");
46415 Clazz_overrideMethod (c$, "windowLostFocus", 
46416 function (e) {
46417 }, "java.awt.event.WindowEvent");
46418 });
46419 Clazz_declarePackage ("javax.swing");
46420 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 () {
46421 c$ = Clazz_decorateAsClass (function () {
46422 this.isMouseDragged = false;
46423 this.accelerator = null;
46424 Clazz_instantialize (this, arguments);
46425 }, javax.swing, "JMenuItem", javax.swing.AbstractButton, javax.swing.MenuElement);
46426 Clazz_makeConstructor (c$, 
46427 function () {
46428 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46429 this.init0 (null, null, -2147483648);
46430 });
46431 Clazz_makeConstructor (c$, 
46432 function (icon) {
46433 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46434 this.init0 (null, icon, -2147483648);
46435 }, "javax.swing.Icon");
46436 Clazz_makeConstructor (c$, 
46437 function (text) {
46438 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46439 this.init0 (text, null, -2147483648);
46440 }, "~S");
46441 Clazz_makeConstructor (c$, 
46442 function (a) {
46443 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46444 this.init0 (null, null, -2147483648);
46445 this.setAction (a);
46446 }, "javax.swing.Action");
46447 Clazz_makeConstructor (c$, 
46448 function (text, icon) {
46449 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46450 this.init0 (text, icon, -2147483648);
46451 }, "~S,javax.swing.Icon");
46452 Clazz_makeConstructor (c$, 
46453 function (text, mnemonic) {
46454 Clazz_superConstructor (this, javax.swing.JMenuItem, []);
46455 this.init0 (text, null, mnemonic);
46456 }, "~S,~N");
46457 Clazz_defineMethod (c$, "setModel", 
46458 function (newModel) {
46459 Clazz_superCall (this, javax.swing.JMenuItem, "setModel", [newModel]);
46460 if (Clazz_instanceOf (newModel, javax.swing.DefaultButtonModel)) {
46461 (newModel).setMenuItem (true);
46462 }}, "javax.swing.ButtonModel");
46463 Clazz_defineMethod (c$, "initFocusability", 
46464 function () {
46465 this.setFocusable (false);
46466 });
46467 Clazz_defineMethod (c$, "init0", 
46468 function (text, icon, mnemonic) {
46469 this.setModel ( new javax.swing.DefaultButtonModel ());
46470 this.init (text, icon);
46471 if (mnemonic >= 0) this.setMnemonic (mnemonic);
46472 this.initFocusability ();
46473 }, "~S,javax.swing.Icon,~N");
46474 Clazz_overrideMethod (c$, "init", 
46475 function (text, icon) {
46476 this.updateUI ();
46477 if (text != null) this.setText (text);
46478 if (icon != null) this.setIcon (icon);
46479 this.addFocusListener ( new javax.swing.JMenuItem.MenuItemFocusListener ());
46480 this.setUIProperty ("borderPainted", Boolean.FALSE);
46481 this.setFocusPainted (false);
46482 this.setHorizontalTextPosition (11);
46483 this.setHorizontalAlignment (10);
46484 }, "~S,javax.swing.Icon");
46485 Clazz_overrideMethod (c$, "updateUI", 
46486 function () {
46487 this.setUI (javax.swing.UIManager.getUI (this));
46488 });
46489 Clazz_overrideMethod (c$, "getUIClassID", 
46490 function () {
46491 return "MenuItemUI";
46492 });
46493 Clazz_defineMethod (c$, "setArmed", 
46494 function (b) {
46495 var model = this.getModel ();
46496 if (model.isArmed () != b) {
46497 model.setArmed (b);
46498 }}, "~B");
46499 Clazz_defineMethod (c$, "isArmed", 
46500 function () {
46501 var model = this.getModel ();
46502 return model.isArmed ();
46503 });
46504 Clazz_defineMethod (c$, "setEnabled", 
46505 function (b) {
46506 if (!b && !javax.swing.UIManager.getBoolean ("MenuItem.disabledAreNavigable")) {
46507 this.setArmed (false);
46508 }Clazz_superCall (this, javax.swing.JMenuItem, "setEnabled", [b]);
46509 }, "~B");
46510 Clazz_overrideMethod (c$, "alwaysOnTop", 
46511 function () {
46512 return true;
46513 });
46514 Clazz_defineMethod (c$, "setAccelerator", 
46515 function (keyStroke) {
46516 var oldAccelerator = this.accelerator;
46517 this.accelerator = keyStroke;
46518 this.repaint ();
46519 this.revalidate ();
46520 this.firePropertyChangeObject ("accelerator", oldAccelerator, this.accelerator);
46521 }, "javax.swing.KeyStroke");
46522 Clazz_defineMethod (c$, "getAccelerator", 
46523 function () {
46524 return this.accelerator;
46525 });
46526 Clazz_defineMethod (c$, "configurePropertiesFromAction", 
46527 function (a) {
46528 Clazz_superCall (this, javax.swing.JMenuItem, "configurePropertiesFromAction", [a]);
46529 this.configureAcceleratorFromAction (a);
46530 }, "javax.swing.Action");
46531 Clazz_overrideMethod (c$, "setIconFromAction", 
46532 function (a) {
46533 var icon = null;
46534 if (a != null) {
46535 icon = a.getValue ("SmallIcon");
46536 }this.setIcon (icon);
46537 }, "javax.swing.Action");
46538 Clazz_overrideMethod (c$, "largeIconChanged", 
46539 function (a) {
46540 }, "javax.swing.Action");
46541 Clazz_overrideMethod (c$, "smallIconChanged", 
46542 function (a) {
46543 this.setIconFromAction (a);
46544 }, "javax.swing.Action");
46545 Clazz_defineMethod (c$, "configureAcceleratorFromAction", 
46546 function (a) {
46547 var ks = (a == null) ? null : a.getValue ("AcceleratorKey");
46548 this.setAccelerator (ks);
46549 }, "javax.swing.Action");
46550 Clazz_defineMethod (c$, "actionPropertyChanged", 
46551 function (action, propertyName) {
46552 if (propertyName === "AcceleratorKey") {
46553 this.configureAcceleratorFromAction (action);
46554 } else {
46555 Clazz_superCall (this, javax.swing.JMenuItem, "actionPropertyChanged", [action, propertyName]);
46556 }}, "javax.swing.Action,~S");
46557 Clazz_defineMethod (c$, "processMouseEvent", 
46558 function (e, path, manager) {
46559 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));
46560 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
46561 Clazz_defineMethod (c$, "processKeyEvent", 
46562 function (e, path, manager) {
46563 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
46564 this.processMenuKeyEvent (mke);
46565 if (mke.isConsumed ()) {
46566 e.consume ();
46567 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
46568 Clazz_defineMethod (c$, "processMenuDragMouseEvent", 
46569 function (e) {
46570 switch (e.getID ()) {
46571 case 504:
46572 this.isMouseDragged = false;
46573 this.fireMenuDragMouseEntered (e);
46574 break;
46575 case 505:
46576 this.isMouseDragged = false;
46577 this.fireMenuDragMouseExited (e);
46578 break;
46579 case 506:
46580 this.isMouseDragged = true;
46581 this.fireMenuDragMouseDragged (e);
46582 break;
46583 case 502:
46584 if (this.isMouseDragged) this.fireMenuDragMouseReleased (e);
46585 break;
46586 default:
46587 break;
46588 }
46589 }, "javax.swing.event.MenuDragMouseEvent");
46590 Clazz_defineMethod (c$, "processMenuKeyEvent", 
46591 function (e) {
46592 switch (e.getID ()) {
46593 case 401:
46594 this.fireMenuKeyPressed (e);
46595 break;
46596 case 402:
46597 this.fireMenuKeyReleased (e);
46598 break;
46599 case 400:
46600 this.fireMenuKeyTyped (e);
46601 break;
46602 default:
46603 break;
46604 }
46605 }, "javax.swing.event.MenuKeyEvent");
46606 Clazz_defineMethod (c$, "fireMenuDragMouseEntered", 
46607 function (event) {
46608 var listeners = this.listenerList.getListenerList ();
46609 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46610 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46611 (listeners[i + 1]).menuDragMouseEntered (event);
46612 }}
46613 }, "javax.swing.event.MenuDragMouseEvent");
46614 Clazz_defineMethod (c$, "fireMenuDragMouseExited", 
46615 function (event) {
46616 var listeners = this.listenerList.getListenerList ();
46617 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46618 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46619 (listeners[i + 1]).menuDragMouseExited (event);
46620 }}
46621 }, "javax.swing.event.MenuDragMouseEvent");
46622 Clazz_defineMethod (c$, "fireMenuDragMouseDragged", 
46623 function (event) {
46624 var listeners = this.listenerList.getListenerList ();
46625 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46626 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46627 (listeners[i + 1]).menuDragMouseDragged (event);
46628 }}
46629 }, "javax.swing.event.MenuDragMouseEvent");
46630 Clazz_defineMethod (c$, "fireMenuDragMouseReleased", 
46631 function (event) {
46632 var listeners = this.listenerList.getListenerList ();
46633 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46634 if (listeners[i] === javax.swing.event.MenuDragMouseListener) {
46635 (listeners[i + 1]).menuDragMouseReleased (event);
46636 }}
46637 }, "javax.swing.event.MenuDragMouseEvent");
46638 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
46639 function (event) {
46640 var listeners = this.listenerList.getListenerList ();
46641 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46642 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46643 (listeners[i + 1]).menuKeyPressed (event);
46644 }}
46645 }, "javax.swing.event.MenuKeyEvent");
46646 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
46647 function (event) {
46648 var listeners = this.listenerList.getListenerList ();
46649 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46650 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46651 (listeners[i + 1]).menuKeyReleased (event);
46652 }}
46653 }, "javax.swing.event.MenuKeyEvent");
46654 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
46655 function (event) {
46656 var listeners = this.listenerList.getListenerList ();
46657 for (var i = listeners.length - 2; i >= 0; i -= 2) {
46658 if (listeners[i] === javax.swing.event.MenuKeyListener) {
46659 (listeners[i + 1]).menuKeyTyped (event);
46660 }}
46661 }, "javax.swing.event.MenuKeyEvent");
46662 Clazz_overrideMethod (c$, "menuSelectionChanged", 
46663 function (isIncluded) {
46664 this.setArmed (isIncluded);
46665 }, "~B");
46666 Clazz_overrideMethod (c$, "getSubElements", 
46667 function () {
46668 return  new Array (0);
46669 });
46670 Clazz_defineMethod (c$, "getComponent", 
46671 function () {
46672 return this;
46673 });
46674 Clazz_defineMethod (c$, "addMenuDragMouseListener", 
46675 function (l) {
46676 this.listenerList.add (javax.swing.event.MenuDragMouseListener, l);
46677 }, "javax.swing.event.MenuDragMouseListener");
46678 Clazz_defineMethod (c$, "removeMenuDragMouseListener", 
46679 function (l) {
46680 this.listenerList.remove (javax.swing.event.MenuDragMouseListener, l);
46681 }, "javax.swing.event.MenuDragMouseListener");
46682 Clazz_defineMethod (c$, "getMenuDragMouseListeners", 
46683 function () {
46684 return this.listenerList.getListeners (javax.swing.event.MenuDragMouseListener);
46685 });
46686 Clazz_defineMethod (c$, "addMenuKeyListener", 
46687 function (l) {
46688 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
46689 }, "javax.swing.event.MenuKeyListener");
46690 Clazz_defineMethod (c$, "removeMenuKeyListener", 
46691 function (l) {
46692 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
46693 }, "javax.swing.event.MenuKeyListener");
46694 Clazz_defineMethod (c$, "getMenuKeyListeners", 
46695 function () {
46696 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
46697 });
46698 Clazz_pu$h(self.c$);
46699 c$ = Clazz_declareType (javax.swing.JMenuItem, "MenuItemFocusListener", null, java.awt.event.FocusListener);
46700 Clazz_overrideMethod (c$, "focusGained", 
46701 function (a) {
46702 }, "java.awt.event.FocusEvent");
46703 Clazz_overrideMethod (c$, "focusLost", 
46704 function (a) {
46705 var b = a.getSource ();
46706 if (b.isFocusPainted ()) {
46707 b.repaint ();
46708 }}, "java.awt.event.FocusEvent");
46709 c$ = Clazz_p0p ();
46710 Clazz_defineStatics (c$,
46711 "$uiClassID", "MenuItemUI");
46712 });
46713 Clazz_declarePackage ("javax.swing");
46714 Clazz_load (["javax.swing.JMenuItem", "$.SwingConstants"], "javax.swing.JCheckBoxMenuItem", ["javax.swing.JToggleButton"], function () {
46715 c$ = Clazz_declareType (javax.swing, "JCheckBoxMenuItem", javax.swing.JMenuItem, javax.swing.SwingConstants);
46716 Clazz_makeConstructor (c$, 
46717 function () {
46718 this.construct (null, null, false);
46719 });
46720 Clazz_makeConstructor (c$, 
46721 function (icon) {
46722 this.construct (null, icon, false);
46723 }, "javax.swing.Icon");
46724 Clazz_makeConstructor (c$, 
46725 function (text) {
46726 this.construct (text, null, false);
46727 }, "~S");
46728 Clazz_makeConstructor (c$, 
46729 function (a) {
46730 this.construct ();
46731 this.setAction (a);
46732 }, "javax.swing.Action");
46733 Clazz_makeConstructor (c$, 
46734 function (text, icon) {
46735 this.construct (text, icon, false);
46736 }, "~S,javax.swing.Icon");
46737 Clazz_makeConstructor (c$, 
46738 function (text, b) {
46739 this.construct (text, null, b);
46740 }, "~S,~B");
46741 Clazz_makeConstructor (c$, 
46742 function (text, icon, b) {
46743 Clazz_superConstructor (this, javax.swing.JCheckBoxMenuItem, [text, icon]);
46744 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46745 this.setSelected (b);
46746 this.setFocusable (false);
46747 }, "~S,javax.swing.Icon,~B");
46748 Clazz_overrideMethod (c$, "getUIClassID", 
46749 function () {
46750 return "CheckBoxMenuItemUI";
46751 });
46752 Clazz_defineMethod (c$, "getState", 
46753 function () {
46754 return this.isSelected ();
46755 });
46756 Clazz_defineMethod (c$, "setState", 
46757 function (b) {
46758 this.setSelected (b);
46759 }, "~B");
46760 Clazz_overrideMethod (c$, "getSelectedObjects", 
46761 function () {
46762 if (this.isSelected () == false) return null;
46763 var selectedObjects =  new Array (1);
46764 selectedObjects[0] = this.getText ();
46765 return selectedObjects;
46766 });
46767 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46768 function () {
46769 return true;
46770 });
46771 Clazz_defineStatics (c$,
46772 "$$uiClassID", "CheckBoxMenuItemUI");
46773 });
46774 Clazz_declarePackage ("javax.swing");
46775 Clazz_load (["javax.swing.JMenuItem"], "javax.swing.JRadioButtonMenuItem", ["javax.swing.JToggleButton"], function () {
46776 c$ = Clazz_declareType (javax.swing, "JRadioButtonMenuItem", javax.swing.JMenuItem);
46777 Clazz_makeConstructor (c$, 
46778 function () {
46779 this.construct (null, null, false);
46780 });
46781 Clazz_makeConstructor (c$, 
46782 function (icon) {
46783 this.construct (null, icon, false);
46784 }, "javax.swing.Icon");
46785 Clazz_makeConstructor (c$, 
46786 function (text) {
46787 this.construct (text, null, false);
46788 }, "~S");
46789 Clazz_makeConstructor (c$, 
46790 function (a) {
46791 this.construct ();
46792 this.setAction (a);
46793 }, "javax.swing.Action");
46794 Clazz_makeConstructor (c$, 
46795 function (text, icon) {
46796 this.construct (text, icon, false);
46797 }, "~S,javax.swing.Icon");
46798 Clazz_makeConstructor (c$, 
46799 function (text, selected) {
46800 this.construct (text);
46801 this.setSelected (selected);
46802 }, "~S,~B");
46803 Clazz_makeConstructor (c$, 
46804 function (icon, selected) {
46805 this.construct (null, icon, selected);
46806 }, "javax.swing.Icon,~B");
46807 Clazz_makeConstructor (c$, 
46808 function (text, icon, selected) {
46809 Clazz_superConstructor (this, javax.swing.JRadioButtonMenuItem, [text, icon]);
46810 this.setModel ( new javax.swing.JToggleButton.ToggleButtonModel ());
46811 this.setSelected (selected);
46812 this.setFocusable (false);
46813 }, "~S,javax.swing.Icon,~B");
46814 Clazz_overrideMethod (c$, "getUIClassID", 
46815 function () {
46816 return "RadioButtonMenuItemUI";
46817 });
46818 Clazz_overrideMethod (c$, "shouldUpdateSelectedStateFromAction", 
46819 function () {
46820 return true;
46821 });
46822 Clazz_defineStatics (c$,
46823 "$$uiClassID", "RadioButtonMenuItemUI");
46824 });
46825 Clazz_declarePackage ("javax.swing.event");
46826 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuDragMouseListener", null, function () {
46827 Clazz_declareInterface (javax.swing.event, "MenuDragMouseListener", java.util.EventListener);
46828 });
46829 Clazz_declarePackage ("javax.swing.event");
46830 Clazz_load (["java.awt.event.KeyEvent"], "javax.swing.event.MenuKeyEvent", null, function () {
46831 c$ = Clazz_decorateAsClass (function () {
46832 this.path = null;
46833 this.manager = null;
46834 Clazz_instantialize (this, arguments);
46835 }, javax.swing.event, "MenuKeyEvent", java.awt.event.KeyEvent);
46836 Clazz_makeConstructor (c$, 
46837 function (source, id, when, modifiers, keyCode, keyChar, p, m) {
46838 Clazz_superConstructor (this, javax.swing.event.MenuKeyEvent, [source, id, when, modifiers, keyCode, keyChar]);
46839 this.path = p;
46840 this.manager = m;
46841 }, "java.awt.Component,~N,~N,~N,~N,~S,~A,javax.swing.MenuSelectionManager");
46842 Clazz_defineMethod (c$, "getPath", 
46843 function () {
46844 return this.path;
46845 });
46846 Clazz_defineMethod (c$, "getMenuSelectionManager", 
46847 function () {
46848 return this.manager;
46849 });
46850 });
46851 Clazz_declarePackage ("javax.swing.event");
46852 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuKeyListener", null, function () {
46853 Clazz_declareInterface (javax.swing.event, "MenuKeyListener", java.util.EventListener);
46854 });
46855 Clazz_declarePackage ("javax.swing");
46856 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 () {
46857 c$ = Clazz_decorateAsClass (function () {
46858 this.invoker = null;
46859 this.popup = null;
46860 this.frame = null;
46861 this.desiredLocationX = 0;
46862 this.desiredLocationY = 0;
46863 this.label = null;
46864 this.$paintBorder = true;
46865 this.margin = null;
46866 this.lightWeightPopup = true;
46867 this.selectionModel = null;
46868 Clazz_instantialize (this, arguments);
46869 }, javax.swing, "JPopupMenu", javax.swing.JComponent, javax.swing.MenuElement);
46870 c$.setDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "setDefaultLightWeightPopupEnabled", 
46871 function (aFlag) {
46872 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.$valueOf (aFlag));
46873 }, "~B");
46874 c$.getDefaultLightWeightPopupEnabled = Clazz_defineMethod (c$, "getDefaultLightWeightPopupEnabled", 
46875 function () {
46876 var b = javax.swing.SwingUtilities.appContextGet (javax.swing.JPopupMenu.defaultLWPopupEnabledKey);
46877 if (b == null) {
46878 javax.swing.SwingUtilities.appContextPut (javax.swing.JPopupMenu.defaultLWPopupEnabledKey, Boolean.TRUE);
46879 return true;
46880 }return b.booleanValue ();
46881 });
46882 Clazz_makeConstructor (c$, 
46883 function () {
46884 this.construct (null);
46885 });
46886 Clazz_makeConstructor (c$, 
46887 function (label) {
46888 Clazz_superConstructor (this, javax.swing.JPopupMenu, []);
46889 this.label = label;
46890 this.lightWeightPopup = javax.swing.JPopupMenu.getDefaultLightWeightPopupEnabled ();
46891 this.setSelectionModel ( new javax.swing.DefaultSingleSelectionModel ());
46892 this.enableEvents (16);
46893 this.updateUI ();
46894 }, "~S");
46895 Clazz_overrideMethod (c$, "getUI", 
46896 function () {
46897 return this.ui;
46898 });
46899 Clazz_overrideMethod (c$, "updateUI", 
46900 function () {
46901 this.setUI (javax.swing.UIManager.getUI (this));
46902 });
46903 Clazz_overrideMethod (c$, "getUIClassID", 
46904 function () {
46905 return "PopupMenuUI";
46906 });
46907 Clazz_defineMethod (c$, "processKeyEvent", 
46908 function (evt) {
46909 javax.swing.MenuSelectionManager.defaultManager ().processKeyEvent (evt);
46910 if (evt.isConsumed ()) {
46911 return;
46912 }Clazz_superCall (this, javax.swing.JPopupMenu, "processKeyEvent", [evt]);
46913 }, "java.awt.event.KeyEvent");
46914 Clazz_defineMethod (c$, "getSelectionModel", 
46915 function () {
46916 return this.selectionModel;
46917 });
46918 Clazz_defineMethod (c$, "setSelectionModel", 
46919 function (model) {
46920 this.selectionModel = model;
46921 }, "javax.swing.SingleSelectionModel");
46922 Clazz_defineMethod (c$, "add", 
46923 function (menuItem) {
46924 Clazz_superCall (this, javax.swing.JPopupMenu, "add", [menuItem]);
46925 return menuItem;
46926 }, "javax.swing.JMenuItem");
46927 Clazz_defineMethod (c$, "add", 
46928 function (s) {
46929 return this.add ( new javax.swing.JMenuItem (s));
46930 }, "~S");
46931 Clazz_defineMethod (c$, "add", 
46932 function (a) {
46933 var mi = this.createActionComponent (a);
46934 mi.setAction (a);
46935 this.add (mi);
46936 return mi;
46937 }, "javax.swing.Action");
46938 Clazz_defineMethod (c$, "adjustPopupLocationToFitScreen", 
46939 function (xposition, yposition) {
46940 var p =  new java.awt.Point (xposition, yposition);
46941 if (javax.swing.JPopupMenu.popupPostionFixDisabled == true || java.awt.GraphicsEnvironment.isHeadless ()) return p;
46942 return p;
46943 }, "~N,~N");
46944 Clazz_defineMethod (c$, "createActionComponent", 
46945 function (a) {
46946 var mi = ((Clazz_isClassDefined ("javax.swing.JPopupMenu$1") ? 0 : javax.swing.JPopupMenu.$JPopupMenu$1$ ()), Clazz_innerTypeInstance (javax.swing.JPopupMenu$1, this, null));
46947 mi.setHorizontalTextPosition (11);
46948 mi.setVerticalTextPosition (0);
46949 return mi;
46950 }, "javax.swing.Action");
46951 Clazz_defineMethod (c$, "createActionChangeListener", 
46952 function (b) {
46953 return b.createActionPropertyChangeListener0 (b.getAction ());
46954 }, "javax.swing.JMenuItem");
46955 Clazz_defineMethod (c$, "remove", 
46956 function (pos) {
46957 if (pos < 0) {
46958 throw  new IllegalArgumentException ("index less than zero.");
46959 }if (pos > this.getComponentCount () - 1) {
46960 throw  new IllegalArgumentException ("index greater than the number of items.");
46961 }Clazz_superCall (this, javax.swing.JPopupMenu, "remove", [pos]);
46962 }, "~N");
46963 Clazz_defineMethod (c$, "setLightWeightPopupEnabled", 
46964 function (aFlag) {
46965 this.lightWeightPopup = aFlag;
46966 }, "~B");
46967 Clazz_defineMethod (c$, "isLightWeightPopupEnabled", 
46968 function () {
46969 return this.lightWeightPopup;
46970 });
46971 Clazz_defineMethod (c$, "getLabel", 
46972 function () {
46973 return this.label;
46974 });
46975 Clazz_defineMethod (c$, "setLabel", 
46976 function (label) {
46977 var oldValue = this.label;
46978 this.label = label;
46979 this.firePropertyChangeObject ("label", oldValue, label);
46980 this.invalidate ();
46981 this.repaint ();
46982 }, "~S");
46983 Clazz_defineMethod (c$, "addSeparator", 
46984 function () {
46985 this.add ( new javax.swing.JPopupMenu.Separator ());
46986 });
46987 Clazz_defineMethod (c$, "insert", 
46988 function (a, index) {
46989 var mi = this.createActionComponent (a);
46990 mi.setAction (a);
46991 this.insert (mi, index);
46992 }, "javax.swing.Action,~N");
46993 Clazz_defineMethod (c$, "insert", 
46994 function (component, index) {
46995 if (index < 0) {
46996 throw  new IllegalArgumentException ("index less than zero.");
46997 }var nitems = this.getComponentCount ();
46998 var tempItems =  new java.util.Vector ();
46999 for (var i = index; i < nitems; i++) {
47000 tempItems.addElement (this.getComponent (index));
47001 this.remove (index);
47002 }
47003 this.add (component);
47004 for (var i = 0; i < tempItems.size (); i++) {
47005 this.add (tempItems.elementAt (i));
47006 }
47007 }, "java.awt.Component,~N");
47008 Clazz_defineMethod (c$, "addPopupMenuListener", 
47009 function (l) {
47010 this.listenerList.add (javax.swing.event.PopupMenuListener, l);
47011 }, "javax.swing.event.PopupMenuListener");
47012 Clazz_defineMethod (c$, "removePopupMenuListener", 
47013 function (l) {
47014 this.listenerList.remove (javax.swing.event.PopupMenuListener, l);
47015 }, "javax.swing.event.PopupMenuListener");
47016 Clazz_defineMethod (c$, "getPopupMenuListeners", 
47017 function () {
47018 return this.listenerList.getListeners (javax.swing.event.PopupMenuListener);
47019 });
47020 Clazz_defineMethod (c$, "addMenuKeyListener", 
47021 function (l) {
47022 this.listenerList.add (javax.swing.event.MenuKeyListener, l);
47023 }, "javax.swing.event.MenuKeyListener");
47024 Clazz_defineMethod (c$, "removeMenuKeyListener", 
47025 function (l) {
47026 this.listenerList.remove (javax.swing.event.MenuKeyListener, l);
47027 }, "javax.swing.event.MenuKeyListener");
47028 Clazz_defineMethod (c$, "getMenuKeyListeners", 
47029 function () {
47030 return this.listenerList.getListeners (javax.swing.event.MenuKeyListener);
47031 });
47032 Clazz_defineMethod (c$, "firePopupMenuWillBecomeVisible", 
47033 function () {
47034 var listeners = this.listenerList.getListenerList ();
47035 var e = null;
47036 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47037 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47038 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47039 (listeners[i + 1]).popupMenuWillBecomeVisible (e);
47040 }}
47041 });
47042 Clazz_defineMethod (c$, "firePopupMenuWillBecomeInvisible", 
47043 function () {
47044 var listeners = this.listenerList.getListenerList ();
47045 var e = null;
47046 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47047 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47048 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47049 (listeners[i + 1]).popupMenuWillBecomeInvisible (e);
47050 }}
47051 });
47052 Clazz_defineMethod (c$, "firePopupMenuCanceled", 
47053 function () {
47054 var listeners = this.listenerList.getListenerList ();
47055 var e = null;
47056 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47057 if (listeners[i] === javax.swing.event.PopupMenuListener) {
47058 if (e == null) e =  new javax.swing.event.PopupMenuEvent (this);
47059 (listeners[i + 1]).popupMenuCanceled (e);
47060 }}
47061 });
47062 Clazz_overrideMethod (c$, "alwaysOnTop", 
47063 function () {
47064 return true;
47065 });
47066 Clazz_defineMethod (c$, "pack", 
47067 function () {
47068 if (this.popup != null) {
47069 var pref = this.getPreferredSize ();
47070 if (pref == null || pref.width != this.getWidth () || pref.height != this.getHeight ()) {
47071 this.popup = this.getPopup ();
47072 } else {
47073 this.validate ();
47074 }}});
47075 Clazz_overrideMethod (c$, "setVisible", 
47076 function (b) {
47077 if (b == this.isVisible ()) return;
47078 if (b == false) {
47079 var doCanceled = this.getClientProperty ("JPopupMenu.firePopupMenuCanceled");
47080 if (doCanceled != null && doCanceled === Boolean.TRUE) {
47081 this.putClientProperty ("JPopupMenu.firePopupMenuCanceled", Boolean.FALSE);
47082 this.firePopupMenuCanceled ();
47083 }this.getSelectionModel ().clearSelection ();
47084 } else {
47085 if (this.isPopupMenu ()) {
47086 var me =  new Array (1);
47087 me[0] = this;
47088 javax.swing.MenuSelectionManager.defaultManager ().setSelectedPath (me);
47089 }}if (b) {
47090 this.firePopupMenuWillBecomeVisible ();
47091 this.popup = this.getPopup ();
47092 this.firePropertyChangeObject ("visible", Boolean.FALSE, Boolean.TRUE);
47093 } else if (this.popup != null) {
47094 this.firePopupMenuWillBecomeInvisible ();
47095 this.popup.hide ();
47096 this.popup = null;
47097 this.firePropertyChangeObject ("visible", Boolean.TRUE, Boolean.FALSE);
47098 if (this.isPopupMenu ()) {
47099 javax.swing.MenuSelectionManager.defaultManager ().clearSelectedPath ();
47100 }}}, "~B");
47101 Clazz_defineMethod (c$, "getPopup", 
47102  function () {
47103 var oldPopup = this.popup;
47104 if (oldPopup != null) {
47105 oldPopup.hide ();
47106 }var popupFactory = javax.swing.PopupFactory.getSharedInstance ();
47107 if (this.isLightWeightPopupEnabled ()) {
47108 popupFactory.setPopupType (0);
47109 } else {
47110 popupFactory.setPopupType (1);
47111 }var p = this.adjustPopupLocationToFitScreen (this.desiredLocationX, this.desiredLocationY);
47112 this.desiredLocationX = p.x;
47113 this.desiredLocationY = p.y;
47114 var newPopup = this.getUI ().getPopup (this, this.desiredLocationX, this.desiredLocationY);
47115 popupFactory.setPopupType (0);
47116 newPopup.show ();
47117 return newPopup;
47118 });
47119 Clazz_overrideMethod (c$, "isVisible", 
47120 function () {
47121 if (this.popup != null) return true;
47122  else return false;
47123 });
47124 Clazz_defineMethod (c$, "setLocation", 
47125 function (x, y) {
47126 var oldX = this.desiredLocationX;
47127 var oldY = this.desiredLocationY;
47128 this.desiredLocationX = x;
47129 this.desiredLocationY = y;
47130 if (this.popup != null && (x != oldX || y != oldY)) {
47131 this.popup = this.getPopup ();
47132 }}, "~N,~N");
47133 Clazz_defineMethod (c$, "isPopupMenu", 
47134  function () {
47135 return ((this.invoker != null) && !(Clazz_instanceOf (this.invoker, javax.swing.JMenu)));
47136 });
47137 Clazz_defineMethod (c$, "getInvoker", 
47138 function () {
47139 return this.invoker;
47140 });
47141 Clazz_defineMethod (c$, "setInvoker", 
47142 function (invoker) {
47143 var oldInvoker = this.invoker;
47144 this.invoker = invoker;
47145 if ((oldInvoker !== this.invoker) && (this.ui != null)) {
47146 this.ui.uninstallUI (this);
47147 this.ui.installUI (this);
47148 }this.invalidate ();
47149 }, "java.awt.Component");
47150 Clazz_defineMethod (c$, "show", 
47151 function (invoker, x, y) {
47152 this.setInvoker (invoker);
47153 var newFrame = javax.swing.JPopupMenu.getFrame (invoker);
47154 if (newFrame !== this.frame) {
47155 if (newFrame != null) {
47156 this.frame = newFrame;
47157 if (this.popup != null) {
47158 this.setVisible (false);
47159 }}}var invokerOrigin;
47160 if (invoker != null) {
47161 invokerOrigin = invoker.getLocationOnScreen ();
47162 var lx;
47163 var ly;
47164 lx = (invokerOrigin.x) + (x);
47165 ly = (invokerOrigin.y) + (y);
47166 if (lx > 2147483647) lx = 2147483647;
47167 if (lx < -2147483648) lx = -2147483648;
47168 if (ly > 2147483647) ly = 2147483647;
47169 if (ly < -2147483648) ly = -2147483648;
47170 this.setLocation (lx, ly);
47171 } else {
47172 this.setLocation (x, y);
47173 }this.setVisible (true);
47174 }, "java.awt.Component,~N,~N");
47175 Clazz_defineMethod (c$, "getRootPopupMenu", 
47176 function () {
47177 var mp = this;
47178 while ((mp != null) && (mp.isPopupMenu () != true) && (mp.getInvoker () != null) && (mp.getInvoker ().getParent () != null) && (Clazz_instanceOf (mp.getInvoker ().getParent (), javax.swing.JPopupMenu))) {
47179 mp = mp.getInvoker ().getParent ();
47180 }
47181 return mp;
47182 });
47183 Clazz_defineMethod (c$, "getComponentAtIndex", 
47184 function (i) {
47185 return this.getComponent (i);
47186 }, "~N");
47187 Clazz_defineMethod (c$, "getComponentIndex", 
47188 function (c) {
47189 var ncomponents = this.getComponentCount ();
47190 var component = this.getComponents ();
47191 for (var i = 0; i < ncomponents; i++) {
47192 var comp = component[i];
47193 if (comp === c) return i;
47194 }
47195 return -1;
47196 }, "java.awt.Component");
47197 Clazz_defineMethod (c$, "setPopupSize", 
47198 function (d) {
47199 var oldSize = this.getPreferredSize ();
47200 this.setPreferredSize (d);
47201 if (this.popup != null) {
47202 var newSize = this.getPreferredSize ();
47203 if (!oldSize.equals (newSize)) {
47204 this.popup = this.getPopup ();
47205 }}}, "java.awt.Dimension");
47206 Clazz_defineMethod (c$, "setPopupSize", 
47207 function (width, height) {
47208 this.setPopupSize ( new java.awt.Dimension (width, height));
47209 }, "~N,~N");
47210 Clazz_defineMethod (c$, "setSelected", 
47211 function (sel) {
47212 var model = this.getSelectionModel ();
47213 var index = this.getComponentIndex (sel);
47214 model.setSelectedIndex (index);
47215 }, "java.awt.Component");
47216 Clazz_defineMethod (c$, "isBorderPainted", 
47217 function () {
47218 return this.$paintBorder;
47219 });
47220 Clazz_defineMethod (c$, "setBorderPainted", 
47221 function (b) {
47222 this.$paintBorder = b;
47223 this.repaint ();
47224 }, "~B");
47225 Clazz_defineMethod (c$, "paintBorder", 
47226 function (g) {
47227 if (this.isBorderPainted ()) {
47228 Clazz_superCall (this, javax.swing.JPopupMenu, "paintBorder", [g]);
47229 }}, "java.awt.Graphics");
47230 Clazz_defineMethod (c$, "getMargin", 
47231 function () {
47232 if (this.margin == null) {
47233 return  new java.awt.Insets (0, 0, 0, 0);
47234 } else {
47235 return this.margin;
47236 }});
47237 Clazz_defineMethod (c$, "isSubPopupMenu", 
47238 function (popup) {
47239 var ncomponents = this.getComponentCount ();
47240 var component = this.getComponents ();
47241 for (var i = 0; i < ncomponents; i++) {
47242 var comp = component[i];
47243 if (Clazz_instanceOf (comp, javax.swing.JMenu)) {
47244 var menu = comp;
47245 var subPopup = menu.getPopupMenu ();
47246 if (subPopup === popup) return true;
47247 if (subPopup.isSubPopupMenu (popup)) return true;
47248 }}
47249 return false;
47250 }, "javax.swing.JPopupMenu");
47251 c$.getFrame = Clazz_defineMethod (c$, "getFrame", 
47252  function (c) {
47253 var w = c;
47254 while (!(Clazz_instanceOf (w, java.awt.Frame)) && (w != null)) {
47255 w = w.getParent ();
47256 }
47257 return w;
47258 }, "java.awt.Component");
47259 Clazz_defineMethod (c$, "paramString", 
47260 function () {
47261 var labelString = (this.label != null ? this.label : "");
47262 var paintBorderString = (this.$paintBorder ? "true" : "false");
47263 var marginString = (this.margin != null ? this.margin.toString () : "");
47264 var lightWeightPopupEnabledString = (this.isLightWeightPopupEnabled () ? "true" : "false");
47265 return Clazz_superCall (this, javax.swing.JPopupMenu, "paramString", []) + ",desiredLocationX=" + this.desiredLocationX + ",desiredLocationY=" + this.desiredLocationY + ",label=" + labelString + ",lightWeightPopupEnabled=" + lightWeightPopupEnabledString + ",margin=" + marginString + ",paintBorder=" + paintBorderString;
47266 });
47267 Clazz_defineMethod (c$, "processMouseEvent", 
47268 function (event, path, manager) {
47269 }, "java.awt.event.MouseEvent,~A,javax.swing.MenuSelectionManager");
47270 Clazz_defineMethod (c$, "processKeyEvent", 
47271 function (e, path, manager) {
47272 var mke =  new javax.swing.event.MenuKeyEvent (e.getComponent (), e.getID (), e.getWhen (), e.getModifiers (), e.getKeyCode (), e.getKeyChar (), path, manager);
47273 this.processMenuKeyEvent (mke);
47274 if (mke.isConsumed ()) {
47275 e.consume ();
47276 }}, "java.awt.event.KeyEvent,~A,javax.swing.MenuSelectionManager");
47277 Clazz_defineMethod (c$, "processMenuKeyEvent", 
47278  function (e) {
47279 switch (e.getID ()) {
47280 case 401:
47281 this.fireMenuKeyPressed (e);
47282 break;
47283 case 402:
47284 this.fireMenuKeyReleased (e);
47285 break;
47286 case 400:
47287 this.fireMenuKeyTyped (e);
47288 break;
47289 default:
47290 break;
47291 }
47292 }, "javax.swing.event.MenuKeyEvent");
47293 Clazz_defineMethod (c$, "fireMenuKeyPressed", 
47294  function (event) {
47295 var listeners = this.listenerList.getListenerList ();
47296 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47297 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47298 (listeners[i + 1]).menuKeyPressed (event);
47299 }}
47300 }, "javax.swing.event.MenuKeyEvent");
47301 Clazz_defineMethod (c$, "fireMenuKeyReleased", 
47302  function (event) {
47303 var listeners = this.listenerList.getListenerList ();
47304 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47305 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47306 (listeners[i + 1]).menuKeyReleased (event);
47307 }}
47308 }, "javax.swing.event.MenuKeyEvent");
47309 Clazz_defineMethod (c$, "fireMenuKeyTyped", 
47310  function (event) {
47311 var listeners = this.listenerList.getListenerList ();
47312 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47313 if (listeners[i] === javax.swing.event.MenuKeyListener) {
47314 (listeners[i + 1]).menuKeyTyped (event);
47315 }}
47316 }, "javax.swing.event.MenuKeyEvent");
47317 Clazz_overrideMethod (c$, "menuSelectionChanged", 
47318 function (isIncluded) {
47319 if (Clazz_instanceOf (this.invoker, javax.swing.JMenu)) {
47320 var m = this.invoker;
47321 if (isIncluded) m.setPopupMenuVisible (true);
47322  else m.setPopupMenuVisible (false);
47323 }if (this.isPopupMenu () && !isIncluded) this.setVisible (false);
47324 }, "~B");
47325 Clazz_overrideMethod (c$, "getSubElements", 
47326 function () {
47327 var result;
47328 var tmp =  new java.util.Vector ();
47329 var c = this.getComponentCount ();
47330 var i;
47331 var m;
47332 for (i = 0; i < c; i++) {
47333 m = this.getComponent (i);
47334 if (Clazz_instanceOf (m, javax.swing.MenuElement)) tmp.addElement (m);
47335 }
47336 result =  new Array (tmp.size ());
47337 for (i = 0, c = tmp.size (); i < c; i++) result[i] = tmp.elementAt (i);
47338
47339 return result;
47340 });
47341 Clazz_defineMethod (c$, "getComponent", 
47342 function () {
47343 return this;
47344 });
47345 Clazz_defineMethod (c$, "isPopupTrigger", 
47346 function (e) {
47347 return this.getUI ().isPopupTrigger (e);
47348 }, "java.awt.event.MouseEvent");
47349 c$.$JPopupMenu$1$ = function () {
47350 Clazz_pu$h(self.c$);
47351 c$ = Clazz_declareAnonymous (javax.swing, "JPopupMenu$1", javax.swing.JMenuItem);
47352 Clazz_defineMethod (c$, "createActionPropertyChangeListener", 
47353 function (a) {
47354 var pcl = this.b$["javax.swing.JPopupMenu"].createActionChangeListener (this);
47355 if (pcl == null) {
47356 pcl = Clazz_superCall (this, javax.swing.JPopupMenu$1, "createActionPropertyChangeListener", [a]);
47357 }return pcl;
47358 }, "javax.swing.Action");
47359 c$ = Clazz_p0p ();
47360 };
47361 Clazz_pu$h(self.c$);
47362 c$ = Clazz_declareType (javax.swing.JPopupMenu, "Separator", javax.swing.JSeparator);
47363 Clazz_makeConstructor (c$, 
47364 function () {
47365 Clazz_superConstructor (this, javax.swing.JPopupMenu.Separator, [0]);
47366 });
47367 Clazz_overrideMethod (c$, "getUIClassID", 
47368 function () {
47369 return "PopupMenuSeparatorUI";
47370 });
47371 c$ = Clazz_p0p ();
47372 Clazz_defineStatics (c$,
47373 "$uiClassID", "PopupMenuUI");
47374 c$.defaultLWPopupEnabledKey = c$.prototype.defaultLWPopupEnabledKey =  new Clazz._O ();
47375 Clazz_defineStatics (c$,
47376 "popupPostionFixDisabled", false);
47377 });
47378 Clazz_declarePackage ("javax.swing");
47379 Clazz_load (["javax.swing.JComponent", "$.SwingConstants"], "javax.swing.JSeparator", ["java.lang.IllegalArgumentException", "javax.swing.UIManager"], function () {
47380 c$ = Clazz_decorateAsClass (function () {
47381 this.orientation = 0;
47382 Clazz_instantialize (this, arguments);
47383 }, javax.swing, "JSeparator", javax.swing.JComponent, javax.swing.SwingConstants);
47384 Clazz_makeConstructor (c$, 
47385 function () {
47386 this.construct (0);
47387 });
47388 Clazz_makeConstructor (c$, 
47389 function (orientation) {
47390 Clazz_superConstructor (this, javax.swing.JSeparator, []);
47391 this.checkOrientation (orientation);
47392 this.orientation = orientation;
47393 this.setFocusable (false);
47394 this.updateUI ();
47395 }, "~N");
47396 Clazz_overrideMethod (c$, "getUI", 
47397 function () {
47398 return this.ui;
47399 });
47400 Clazz_overrideMethod (c$, "updateUI", 
47401 function () {
47402 this.setUI (javax.swing.UIManager.getUI (this));
47403 });
47404 Clazz_overrideMethod (c$, "getUIClassID", 
47405 function () {
47406 return "SeparatorUI";
47407 });
47408 Clazz_defineMethod (c$, "getOrientation", 
47409 function () {
47410 return this.orientation;
47411 });
47412 Clazz_defineMethod (c$, "setOrientation", 
47413 function (orientation) {
47414 if (this.orientation == orientation) {
47415 return;
47416 }var oldValue = this.orientation;
47417 this.checkOrientation (orientation);
47418 this.orientation = orientation;
47419 this.firePropertyChangeInt ("orientation", oldValue, orientation);
47420 this.revalidate ();
47421 this.repaint ();
47422 }, "~N");
47423 Clazz_defineMethod (c$, "checkOrientation", 
47424  function (orientation) {
47425 switch (orientation) {
47426 case 1:
47427 case 0:
47428 break;
47429 default:
47430 throw  new IllegalArgumentException ("orientation must be one of: VERTICAL, HORIZONTAL");
47431 }
47432 }, "~N");
47433 Clazz_defineMethod (c$, "paramString", 
47434 function () {
47435 var orientationString = (this.orientation == 0 ? "HORIZONTAL" : "VERTICAL");
47436 return Clazz_superCall (this, javax.swing.JSeparator, "paramString", []) + ",orientation=" + orientationString;
47437 });
47438 Clazz_defineStatics (c$,
47439 "$uiClassID", "SeparatorUI");
47440 });
47441 Clazz_declarePackage ("javax.swing");
47442 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 () {
47443 c$ = Clazz_decorateAsClass (function () {
47444 this.selection = null;
47445 this.changeEvent = null;
47446 this.listenerList = null;
47447 Clazz_instantialize (this, arguments);
47448 }, javax.swing, "MenuSelectionManager");
47449 Clazz_prepareFields (c$, function () {
47450 this.selection =  new java.util.Vector ();
47451 this.listenerList =  new javax.swing.event.EventListenerList ();
47452 });
47453 c$.defaultManager = Clazz_defineMethod (c$, "defaultManager", 
47454 function () {
47455 {
47456 var context = jssun.awt.AppContext.getAppContext ();
47457 var msm = context.get (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY);
47458 if (msm == null) {
47459 msm =  new javax.swing.MenuSelectionManager ();
47460 context.put (javax.swing.MenuSelectionManager.MENU_SELECTION_MANAGER_KEY, msm);
47461 }return msm;
47462 }});
47463 Clazz_defineMethod (c$, "setSelectedPath", 
47464 function (path) {
47465 var i;
47466 var c;
47467 var currentSelectionCount = this.selection.size ();
47468 var firstDifference = 0;
47469 if (path == null) {
47470 path =  new Array (0);
47471 }for (i = 0, c = path.length; i < c; i++) {
47472 if (i < currentSelectionCount && this.selection.elementAt (i) === path[i]) firstDifference++;
47473  else break;
47474 }
47475 for (i = currentSelectionCount - 1; i >= firstDifference; i--) {
47476 var me = this.selection.elementAt (i);
47477 this.selection.removeElementAt (i);
47478 me.menuSelectionChanged (false);
47479 }
47480 for (i = firstDifference, c = path.length; i < c; i++) {
47481 if (path[i] != null) {
47482 this.selection.addElement (path[i]);
47483 path[i].menuSelectionChanged (true);
47484 }}
47485 this.fireStateChanged ();
47486 }, "~A");
47487 Clazz_defineMethod (c$, "getSelectedPath", 
47488 function () {
47489 var res =  new Array (this.selection.size ());
47490 var i;
47491 var c;
47492 for (i = 0, c = this.selection.size (); i < c; i++) res[i] = this.selection.elementAt (i);
47493
47494 return res;
47495 });
47496 Clazz_defineMethod (c$, "clearSelectedPath", 
47497 function () {
47498 if (this.selection.size () > 0) {
47499 this.setSelectedPath (null);
47500 }});
47501 Clazz_defineMethod (c$, "addChangeListener", 
47502 function (l) {
47503 this.listenerList.add (javax.swing.event.ChangeListener, l);
47504 }, "javax.swing.event.ChangeListener");
47505 Clazz_defineMethod (c$, "removeChangeListener", 
47506 function (l) {
47507 this.listenerList.remove (javax.swing.event.ChangeListener, l);
47508 }, "javax.swing.event.ChangeListener");
47509 Clazz_defineMethod (c$, "getChangeListeners", 
47510 function () {
47511 return this.listenerList.getListeners (javax.swing.event.ChangeListener);
47512 });
47513 Clazz_defineMethod (c$, "fireStateChanged", 
47514 function () {
47515 var listeners = this.listenerList.getListenerList ();
47516 for (var i = listeners.length - 2; i >= 0; i -= 2) {
47517 if (listeners[i] === javax.swing.event.ChangeListener) {
47518 if (this.changeEvent == null) this.changeEvent =  new javax.swing.event.ChangeEvent (this);
47519 (listeners[i + 1]).stateChanged (this.changeEvent);
47520 }}
47521 });
47522 Clazz_defineMethod (c$, "processMouseEvent", 
47523 function (event) {
47524 var screenX;
47525 var screenY;
47526 var p;
47527 var i;
47528 var j;
47529 var d;
47530 var mc;
47531 var r2;
47532 var cWidth;
47533 var cHeight;
47534 var menuElement;
47535 var subElements;
47536 var path;
47537 var tmp;
47538 var selectionSize;
47539 p = event.getPoint ();
47540 var source = event.getSource ();
47541 if (!source.isShowing ()) {
47542 return;
47543 }var type = event.getID ();
47544 var modifiers = event.getModifiers ();
47545 if ((type == 504 || type == 505) && ((modifiers & (28)) != 0)) {
47546 return;
47547 }javax.swing.SwingUtilities.convertPointToScreen (p, source);
47548 screenX = p.x;
47549 screenY = p.y;
47550 tmp = this.selection.clone ();
47551 selectionSize = tmp.size ();
47552 var success = false;
47553 for (i = selectionSize - 1; i >= 0 && success == false; i--) {
47554 menuElement = tmp.elementAt (i);
47555 subElements = menuElement.getSubElements ();
47556 path = null;
47557 for (j = 0, d = subElements.length; j < d && success == false; j++) {
47558 if (subElements[j] == null) continue;
47559 mc = subElements[j].getComponent ();
47560 if (!mc.isShowing ()) continue;
47561 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47562 cWidth = (mc).getWidth ();
47563 cHeight = (mc).getHeight ();
47564 } else {
47565 r2 = mc.getBounds ();
47566 cWidth = r2.width;
47567 cHeight = r2.height;
47568 }p.x = screenX;
47569 p.y = screenY;
47570 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47571 if ((p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight)) {
47572 var k;
47573 if (path == null) {
47574 path =  new Array (i + 2);
47575 for (k = 0; k <= i; k++) path[k] = tmp.elementAt (k);
47576
47577 }path[i + 1] = subElements[j];
47578 var currentSelection = this.getSelectedPath ();
47579 if (currentSelection[currentSelection.length - 1] !== path[i + 1] && (currentSelection.length < 2 || currentSelection[currentSelection.length - 2] !== path[i + 1])) {
47580 var oldMC = currentSelection[currentSelection.length - 1].getComponent ();
47581 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);
47582 currentSelection[currentSelection.length - 1].processMouseEvent (exitEvent, path, this);
47583 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);
47584 subElements[j].processMouseEvent (enterEvent, path, this);
47585 }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);
47586 subElements[j].processMouseEvent (mouseEvent, path, this);
47587 success = true;
47588 event.consume ();
47589 }}
47590 }
47591 }, "java.awt.event.MouseEvent");
47592 Clazz_defineMethod (c$, "componentForPoint", 
47593 function (source, sourcePoint) {
47594 var screenX;
47595 var screenY;
47596 var p = sourcePoint;
47597 var i;
47598 var j;
47599 var d;
47600 var mc;
47601 var r2;
47602 var cWidth;
47603 var cHeight;
47604 var menuElement;
47605 var subElements;
47606 var tmp;
47607 var selectionSize;
47608 javax.swing.SwingUtilities.convertPointToScreen (p, source);
47609 screenX = p.x;
47610 screenY = p.y;
47611 tmp = this.selection.clone ();
47612 selectionSize = tmp.size ();
47613 for (i = selectionSize - 1; i >= 0; i--) {
47614 menuElement = tmp.elementAt (i);
47615 subElements = menuElement.getSubElements ();
47616 for (j = 0, d = subElements.length; j < d; j++) {
47617 if (subElements[j] == null) continue;
47618 mc = subElements[j].getComponent ();
47619 if (!mc.isShowing ()) continue;
47620 if (Clazz_instanceOf (mc, javax.swing.JComponent)) {
47621 cWidth = (mc).getWidth ();
47622 cHeight = (mc).getHeight ();
47623 } else {
47624 r2 = mc.getBounds ();
47625 cWidth = r2.width;
47626 cHeight = r2.height;
47627 }p.x = screenX;
47628 p.y = screenY;
47629 javax.swing.SwingUtilities.convertPointFromScreen (p, mc);
47630 if (p.x >= 0 && p.x < cWidth && p.y >= 0 && p.y < cHeight) {
47631 return mc;
47632 }}
47633 }
47634 return null;
47635 }, "java.awt.Component,java.awt.Point");
47636 Clazz_defineMethod (c$, "processKeyEvent", 
47637 function (e) {
47638 var sel2 =  new Array (0);
47639 sel2 = this.selection.toArray (sel2);
47640 var selSize = sel2.length;
47641 var path;
47642 if (selSize < 1) {
47643 return;
47644 }for (var i = selSize - 1; i >= 0; i--) {
47645 var elem = sel2[i];
47646 var subs = elem.getSubElements ();
47647 path = null;
47648 for (var j = 0; j < subs.length; j++) {
47649 if (subs[j] == null || !subs[j].getComponent ().isShowing () || !subs[j].getComponent ().isEnabled ()) {
47650 continue;
47651 }if (path == null) {
47652 path =  new Array (i + 2);
47653 System.arraycopy (sel2, 0, path, 0, i + 1);
47654 }path[i + 1] = subs[j];
47655 subs[j].processKeyEvent (e, path, this);
47656 if (e.isConsumed ()) {
47657 return;
47658 }}
47659 }
47660 path =  new Array (1);
47661 path[0] = sel2[0];
47662 path[0].processKeyEvent (e, path, this);
47663 if (e.isConsumed ()) {
47664 return;
47665 }}, "java.awt.event.KeyEvent");
47666 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47667 function (c) {
47668 if (this.selection.size () > 0) {
47669 var me = this.selection.elementAt (0);
47670 return this.isComponentPartOfCurrentMenu (me, c);
47671 } else return false;
47672 }, "java.awt.Component");
47673 Clazz_defineMethod (c$, "isComponentPartOfCurrentMenu", 
47674  function (root, c) {
47675 var children;
47676 var i;
47677 var d;
47678 if (root == null) return false;
47679 if (root.getComponent () === c) return true;
47680  else {
47681 children = root.getSubElements ();
47682 for (i = 0, d = children.length; i < d; i++) {
47683 if (this.isComponentPartOfCurrentMenu (children[i], c)) return true;
47684 }
47685 }return false;
47686 }, "javax.swing.MenuElement,java.awt.Component");
47687 c$.MENU_SELECTION_MANAGER_KEY = c$.prototype.MENU_SELECTION_MANAGER_KEY =  new Clazz._O ();
47688 });
47689 Clazz_declarePackage ("javax.swing");
47690 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 () {
47691 c$ = Clazz_decorateAsClass (function () {
47692 this.popupType = 0;
47693 Clazz_instantialize (this, arguments);
47694 }, javax.swing, "PopupFactory");
47695 c$.setSharedInstance = Clazz_defineMethod (c$, "setSharedInstance", 
47696 function (factory) {
47697 if (factory == null) {
47698 throw  new IllegalArgumentException ("PopupFactory can not be null");
47699 }javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.SharedInstanceKey, factory);
47700 }, "javax.swing.PopupFactory");
47701 c$.getSharedInstance = Clazz_defineMethod (c$, "getSharedInstance", 
47702 function () {
47703 var factory = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.SharedInstanceKey);
47704 if (factory == null) {
47705 factory =  new javax.swing.PopupFactory ();
47706 javax.swing.PopupFactory.setSharedInstance (factory);
47707 }return factory;
47708 });
47709 Clazz_defineMethod (c$, "setPopupType", 
47710 function (type) {
47711 this.popupType = type;
47712 }, "~N");
47713 Clazz_defineMethod (c$, "getPopupType", 
47714 function () {
47715 return this.popupType;
47716 });
47717 Clazz_defineMethod (c$, "getPopup", 
47718 function (owner, contents, x, y) {
47719 if (contents == null) {
47720 throw  new IllegalArgumentException ("Popup.getPopup must be passed non-null contents");
47721 }var popupType = this.getPopupType (owner, contents, x, y);
47722 var popup = this.getPopup (owner, contents, x, y, popupType);
47723 if (popup == null) {
47724 popup = this.getPopup (owner, contents, x, y, 2);
47725 }return popup;
47726 }, "java.awt.Component,java.awt.Component,~N,~N");
47727 Clazz_defineMethod (c$, "getPopupType", 
47728  function (owner, contents, ownerX, ownerY) {
47729 var popupType = this.getPopupType ();
47730 if (owner == null || this.invokerInHeavyWeightPopup (owner)) {
47731 popupType = 2;
47732 } else if (popupType == 0 && !(Clazz_instanceOf (contents, javax.swing.JToolTip)) && !(Clazz_instanceOf (contents, javax.swing.JPopupMenu))) {
47733 popupType = 1;
47734 }var c = owner;
47735 while (c != null) {
47736 if (Clazz_instanceOf (c, javax.swing.JComponent)) {
47737 if ((c).getClientProperty (javax.swing.ClientPropertyKey.PopupFactory_FORCE_HEAVYWEIGHT_POPUP) === Boolean.TRUE) {
47738 popupType = 2;
47739 break;
47740 }}c = c.getParent ();
47741 }
47742 return popupType;
47743 }, "java.awt.Component,java.awt.Component,~N,~N");
47744 Clazz_defineMethod (c$, "getPopup", 
47745  function (owner, contents, ownerX, ownerY, popupType) {
47746 switch (popupType) {
47747 case 0:
47748 return this.getLightWeightPopup (owner, contents, ownerX, ownerY);
47749 case 1:
47750 return this.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47751 case 2:
47752 return this.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47753 }
47754 return null;
47755 }, "java.awt.Component,java.awt.Component,~N,~N,~N");
47756 Clazz_defineMethod (c$, "getLightWeightPopup", 
47757  function (owner, contents, ownerX, ownerY) {
47758 return javax.swing.PopupFactory.LightWeightPopup.getLightWeightPopup (owner, contents, ownerX, ownerY);
47759 }, "java.awt.Component,java.awt.Component,~N,~N");
47760 Clazz_defineMethod (c$, "getMediumWeightPopup", 
47761  function (owner, contents, ownerX, ownerY) {
47762 return javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopup (owner, contents, ownerX, ownerY);
47763 }, "java.awt.Component,java.awt.Component,~N,~N");
47764 Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47765  function (owner, contents, ownerX, ownerY) {
47766 return javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopup (owner, contents, ownerX, ownerY);
47767 }, "java.awt.Component,java.awt.Component,~N,~N");
47768 Clazz_defineMethod (c$, "invokerInHeavyWeightPopup", 
47769  function (i) {
47770 if (i != null) {
47771 var parent;
47772 for (parent = i.getParent (); parent != null; parent = parent.getParent ()) {
47773 if (Clazz_instanceOf (parent, javax.swing.Popup.HeavyWeightWindow)) {
47774 return true;
47775 }}
47776 }return false;
47777 }, "java.awt.Component");
47778 Clazz_pu$h(self.c$);
47779 c$ = Clazz_declareType (javax.swing.PopupFactory, "HeavyWeightPopup", javax.swing.Popup);
47780 c$.getHeavyWeightPopup = Clazz_defineMethod (c$, "getHeavyWeightPopup", 
47781 function (a, b, c, d) {
47782 var e = (a != null) ? javax.swing.SwingUtilities.getWindowAncestor (a) : null;
47783 var f = null;
47784 if (e != null) {
47785 f = javax.swing.PopupFactory.HeavyWeightPopup.getRecycledHeavyWeightPopup (e);
47786 }var g = false;
47787 if (b != null && b.isFocusable ()) {
47788 if (Clazz_instanceOf (b, javax.swing.JPopupMenu)) {
47789 var h = b;
47790 var i = h.getComponents ();
47791 for (var j = 0; j < i.length; j++) {
47792 if (!(Clazz_instanceOf (i[j], javax.swing.MenuElement)) && !(Clazz_instanceOf (i[j], javax.swing.JSeparator))) {
47793 g = true;
47794 break;
47795 }}
47796 }}if (f == null || (f.getComponent ()).getFocusableWindowState () != g) {
47797 if (f != null) {
47798 f._dispose ();
47799 }f =  new javax.swing.PopupFactory.HeavyWeightPopup ();
47800 }f.reset (a, b, c, d);
47801 if (g) {
47802 var h = f.getComponent ();
47803 h.setFocusableWindowState (true);
47804 h.setName ("###focusableSwingPopup###");
47805 }return f;
47806 }, "java.awt.Component,java.awt.Component,~N,~N");
47807 c$.getRecycledHeavyWeightPopup = Clazz_defineMethod (c$, "getRecycledHeavyWeightPopup", 
47808  function (a) {
47809 {
47810 var b;
47811 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47812 if (c.containsKey (a)) {
47813 b = c.get (a);
47814 } else {
47815 return null;
47816 }var d;
47817 if ((d = b.size ()) > 0) {
47818 var e = b.get (0);
47819 b.remove (0);
47820 return e;
47821 }return null;
47822 }}, "java.awt.Window");
47823 c$.getHeavyWeightPopupCache = Clazz_defineMethod (c$, "getHeavyWeightPopupCache", 
47824  function () {
47825 {
47826 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey);
47827 if (a == null) {
47828 a =  new java.util.HashMap (2);
47829 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.HeavyWeightPopup.heavyWeightPopupCacheKey, a);
47830 }return a;
47831 }});
47832 c$.recycleHeavyWeightPopup = Clazz_defineMethod (c$, "recycleHeavyWeightPopup", 
47833  function (a) {
47834 {
47835 var b;
47836 var c = javax.swing.SwingUtilities.getWindowAncestor (a.getComponent ());
47837 var d = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47838 if (Clazz_instanceOf (c, javax.swing.Popup.DefaultFrame) || !(c).isVisible ()) {
47839 a._dispose ();
47840 return;
47841 } else if (d.containsKey (c)) {
47842 b = d.get (c);
47843 } else {
47844 b =  new java.util.ArrayList ();
47845 d.put (c, b);
47846 var e = c;
47847 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))));
47848 }if (b.size () < 5) {
47849 b.add (a);
47850 } else {
47851 a._dispose ();
47852 }}}, "javax.swing.PopupFactory.HeavyWeightPopup");
47853 Clazz_defineMethod (c$, "hide", 
47854 function () {
47855 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "hide", []);
47856 javax.swing.PopupFactory.HeavyWeightPopup.recycleHeavyWeightPopup (this);
47857 });
47858 Clazz_defineMethod (c$, "dispose", 
47859 function () {
47860 });
47861 Clazz_defineMethod (c$, "_dispose", 
47862 function () {
47863 Clazz_superCall (this, javax.swing.PopupFactory.HeavyWeightPopup, "dispose", []);
47864 });
47865 c$.$PopupFactory$HeavyWeightPopup$1$ = function () {
47866 Clazz_pu$h(self.c$);
47867 c$ = Clazz_declareAnonymous (javax.swing, "PopupFactory$HeavyWeightPopup$1", java.awt.event.WindowAdapter);
47868 Clazz_overrideMethod (c$, "windowClosed", 
47869 function (a) {
47870 var b;
47871 {
47872 var c = javax.swing.PopupFactory.HeavyWeightPopup.getHeavyWeightPopupCache ();
47873 b = c.remove (this.f$.e);
47874 }if (b != null) {
47875 for (var c = b.size () - 1; c >= 0; c--) {
47876 (b.get (c))._dispose ();
47877 }
47878 }}, "java.awt.event.WindowEvent");
47879 c$ = Clazz_p0p ();
47880 };
47881 c$.heavyWeightPopupCacheKey = c$.prototype.heavyWeightPopupCacheKey =  new Clazz._O ();
47882 c$ = Clazz_p0p ();
47883 Clazz_pu$h(self.c$);
47884 c$ = Clazz_decorateAsClass (function () {
47885 this.owner = null;
47886 this.x = 0;
47887 this.y = 0;
47888 Clazz_instantialize (this, arguments);
47889 }, javax.swing.PopupFactory, "ContainerPopup", javax.swing.Popup);
47890 Clazz_overrideMethod (c$, "hide", 
47891 function () {
47892 var a = this.getComponent ();
47893 if (a != null) {
47894 var b = a.getParent ();
47895 if (b != null) {
47896 var c = a.getBounds ();
47897 b.remove (a);
47898 b.repaint (c.x, c.y, c.width, c.height);
47899 }}this.owner = null;
47900 });
47901 Clazz_overrideMethod (c$, "pack", 
47902 function () {
47903 var a = this.getComponent ();
47904 if (a != null) {
47905 a.setSize (a.getPreferredSize ());
47906 }});
47907 Clazz_defineMethod (c$, "reset", 
47908 function (a, b, c, d) {
47909 if ((Clazz_instanceOf (a, javax.swing.JFrame)) || (Clazz_instanceOf (a, javax.swing.JDialog)) || (Clazz_instanceOf (a, javax.swing.JWindow))) {
47910 a = (a).getLayeredPane ();
47911 }Clazz_superCall (this, javax.swing.PopupFactory.ContainerPopup, "reset", [a, b, c, d]);
47912 this.x = c;
47913 this.y = d;
47914 this.owner = a;
47915 }, "java.awt.Component,java.awt.Component,~N,~N");
47916 Clazz_defineMethod (c$, "overlappedByOwnedWindow", 
47917 function () {
47918 var a = this.getComponent ();
47919 if (this.owner != null && a != null) {
47920 var b = javax.swing.SwingUtilities.getWindowAncestor (this.owner);
47921 if (b == null) {
47922 return false;
47923 }var c = b.getOwnedWindows ();
47924 if (c != null) {
47925 var d = a.getBounds ();
47926 for (var e = 0; e < c.length; e++) {
47927 var f = c[e];
47928 if (f.isVisible () && d.intersects (f.getBounds ())) {
47929 return true;
47930 }}
47931 }}return false;
47932 });
47933 Clazz_defineMethod (c$, "fitsOnScreen", 
47934 function () {
47935 var a = this.getComponent ();
47936 if (this.owner != null && a != null) {
47937 var b;
47938 var c = a.getWidth ();
47939 var d = a.getHeight ();
47940 for (b = this.owner.getParent (); b != null; b = b.getParent ()) {
47941 if (Clazz_instanceOf (b, javax.swing.JFrame) || Clazz_instanceOf (b, javax.swing.JDialog) || Clazz_instanceOf (b, javax.swing.JWindow)) {
47942 var e = b.getBounds ();
47943 var f = b.getInsets ();
47944 e.x += f.left;
47945 e.y += f.top;
47946 e.width -= (f.left + f.right);
47947 e.height -= (f.top + f.bottom);
47948 var g = b.getGraphicsConfiguration ();
47949 var h = this.getContainerPopupArea (g);
47950 return e.intersection (h).contains (this.x, this.y, c, d);
47951 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
47952 var e = b.getBounds ();
47953 var f = b.getLocationOnScreen ();
47954 e.x = f.x;
47955 e.y = f.y;
47956 return e.contains (this.x, this.y, c, d);
47957 } else if (Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) {
47958 break;
47959 }}
47960 }return false;
47961 });
47962 Clazz_defineMethod (c$, "getContainerPopupArea", 
47963 function (a) {
47964 var b;
47965 var c = java.awt.Toolkit.getDefaultToolkit ();
47966 var d;
47967 if (a != null) {
47968 b = a.getBounds ();
47969 d = c.getScreenInsets (a);
47970 } else {
47971 b =  new java.awt.Rectangle (c.getScreenSize ());
47972 d =  new java.awt.Insets (0, 0, 0, 0);
47973 }b.x += d.left;
47974 b.y += d.top;
47975 b.width -= (d.left + d.right);
47976 b.height -= (d.top + d.bottom);
47977 return b;
47978 }, "java.awt.GraphicsConfiguration");
47979 c$ = Clazz_p0p ();
47980 Clazz_pu$h(self.c$);
47981 c$ = Clazz_declareType (javax.swing.PopupFactory, "LightWeightPopup", javax.swing.PopupFactory.ContainerPopup);
47982 c$.getLightWeightPopup = Clazz_defineMethod (c$, "getLightWeightPopup", 
47983 function (a, b, c, d) {
47984 var e = null;
47985 if (e == null) {
47986 e =  new javax.swing.PopupFactory.LightWeightPopup ();
47987 }e.reset (a, b, c, d);
47988 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
47989 e.hide ();
47990 return null;
47991 }return e;
47992 }, "java.awt.Component,java.awt.Component,~N,~N");
47993 Clazz_defineMethod (c$, "hide", 
47994 function () {
47995 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "hide", []);
47996 var a = this.getComponent ();
47997 a.removeAll ();
47998 });
47999 Clazz_overrideMethod (c$, "show", 
48000 function () {
48001 var a = null;
48002 if (this.owner != null) {
48003 a = (Clazz_instanceOf (this.owner, java.awt.Container) ? this.owner : this.owner.getParent ());
48004 }for (var b = a; b != null; b = b.getParent ()) {
48005 if (Clazz_instanceOf (b, javax.swing.JRootPane)) {
48006 a = (b).getLayeredPane ();
48007 } else if (Clazz_instanceOf (b, java.awt.Window)) {
48008 if (a == null) {
48009 a = b;
48010 }break;
48011 } else if (Clazz_instanceOf (b, javax.swing.JApplet)) {
48012 break;
48013 }}
48014 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (a, this.x, this.y);
48015 var d = this.getComponent ();
48016 d.setLocation (c.x, c.y);
48017 if (Clazz_instanceOf (a, javax.swing.JLayeredPane)) {
48018 (a).add (d, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48019 } else {
48020 a.add (d);
48021 }});
48022 Clazz_overrideMethod (c$, "createComponent", 
48023 function (a) {
48024 var b =  new javax.swing.JPanel ( new java.awt.BorderLayout (), true);
48025 b.setOpaque (true);
48026 return b;
48027 }, "java.awt.Component");
48028 Clazz_defineMethod (c$, "reset", 
48029 function (a, b, c, d) {
48030 Clazz_superCall (this, javax.swing.PopupFactory.LightWeightPopup, "reset", [a, b, c, d]);
48031 var e = this.getComponent ();
48032 e.setOpaque (b.isOpaque ());
48033 e.setLocation (c, d);
48034 e.add (b, "Center");
48035 b.invalidate ();
48036 this.pack ();
48037 }, "java.awt.Component,java.awt.Component,~N,~N");
48038 c$.lightWeightPopupCacheKey = c$.prototype.lightWeightPopupCacheKey =  new Clazz._O ();
48039 c$ = Clazz_p0p ();
48040 Clazz_pu$h(self.c$);
48041 c$ = Clazz_decorateAsClass (function () {
48042 this.rootPane = null;
48043 Clazz_instantialize (this, arguments);
48044 }, javax.swing.PopupFactory, "MediumWeightPopup", javax.swing.PopupFactory.ContainerPopup);
48045 c$.getMediumWeightPopup = Clazz_defineMethod (c$, "getMediumWeightPopup", 
48046 function (a, b, c, d) {
48047 var e = javax.swing.PopupFactory.MediumWeightPopup.getRecycledMediumWeightPopup ();
48048 if (e == null) {
48049 e =  new javax.swing.PopupFactory.MediumWeightPopup ();
48050 }e.reset (a, b, c, d);
48051 if (!e.fitsOnScreen () || e.overlappedByOwnedWindow ()) {
48052 e.hide ();
48053 return null;
48054 }return e;
48055 }, "java.awt.Component,java.awt.Component,~N,~N");
48056 c$.getMediumWeightPopupCache = Clazz_defineMethod (c$, "getMediumWeightPopupCache", 
48057  function () {
48058 var a = javax.swing.SwingUtilities.appContextGet (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey);
48059 if (a == null) {
48060 a =  new java.util.ArrayList ();
48061 javax.swing.SwingUtilities.appContextPut (javax.swing.PopupFactory.MediumWeightPopup.mediumWeightPopupCacheKey, a);
48062 }return a;
48063 });
48064 c$.recycleMediumWeightPopup = Clazz_defineMethod (c$, "recycleMediumWeightPopup", 
48065  function (a) {
48066 {
48067 var b = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48068 if (b.size () < 5) {
48069 b.add (a);
48070 }}}, "javax.swing.PopupFactory.MediumWeightPopup");
48071 c$.getRecycledMediumWeightPopup = Clazz_defineMethod (c$, "getRecycledMediumWeightPopup", 
48072  function () {
48073 {
48074 var a = javax.swing.PopupFactory.MediumWeightPopup.getMediumWeightPopupCache ();
48075 var b;
48076 if ((b = a.size ()) > 0) {
48077 var c = a.get (0);
48078 a.remove (0);
48079 return c;
48080 }return null;
48081 }});
48082 Clazz_defineMethod (c$, "hide", 
48083 function () {
48084 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "hide", []);
48085 this.rootPane.getContentPane ().removeAll ();
48086 javax.swing.PopupFactory.MediumWeightPopup.recycleMediumWeightPopup (this);
48087 });
48088 Clazz_overrideMethod (c$, "show", 
48089 function () {
48090 var a = this.getComponent ();
48091 var b = null;
48092 if (this.owner != null) {
48093 b = this.owner.getParent ();
48094 }while (!(Clazz_instanceOf (b, java.awt.Window) || Clazz_instanceOf (b, java.applet.Applet)) && (b != null)) {
48095 b = b.getParent ();
48096 }
48097 if (Clazz_instanceOf (b, javax.swing.RootPaneContainer)) {
48098 b = (b).getLayeredPane ();
48099 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48100 a.setVisible (false);
48101 a.setLocation (c.x, c.y);
48102 (b).add (a, javax.swing.JLayeredPane.POPUP_LAYER, 0);
48103 } else {
48104 var c = javax.swing.SwingUtilities.convertScreenLocationToParent (b, this.x, this.y);
48105 a.setLocation (c.x, c.y);
48106 a.setVisible (false);
48107 b.add (a);
48108 }a.setVisible (true);
48109 });
48110 Clazz_overrideMethod (c$, "createComponent", 
48111 function (a) {
48112 var b =  new javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent ();
48113 this.rootPane =  new javax.swing.JRootPane ();
48114 this.rootPane.setOpaque (true);
48115 b.add (this.rootPane, "Center");
48116 return b;
48117 }, "java.awt.Component");
48118 Clazz_defineMethod (c$, "reset", 
48119 function (a, b, c, d) {
48120 Clazz_superCall (this, javax.swing.PopupFactory.MediumWeightPopup, "reset", [a, b, c, d]);
48121 var e = this.getComponent ();
48122 e.setLocation (c, d);
48123 this.rootPane.getContentPane ().add (b, "Center");
48124 b.invalidate ();
48125 e.validate ();
48126 this.pack ();
48127 }, "java.awt.Component,java.awt.Component,~N,~N");
48128 Clazz_pu$h(self.c$);
48129 c$ = Clazz_declareType (javax.swing.PopupFactory.MediumWeightPopup, "MediumWeightComponent", java.awt.Panel, javax.swing.SwingHeavyWeight);
48130 Clazz_makeConstructor (c$, 
48131 function () {
48132 Clazz_superConstructor (this, javax.swing.PopupFactory.MediumWeightPopup.MediumWeightComponent, [ new java.awt.BorderLayout ()]);
48133 });
48134 c$ = Clazz_p0p ();
48135 c$.mediumWeightPopupCacheKey = c$.prototype.mediumWeightPopupCacheKey =  new Clazz._O ();
48136 c$ = Clazz_p0p ();
48137 c$.SharedInstanceKey = c$.prototype.SharedInstanceKey =  new Clazz._O ();
48138 Clazz_defineStatics (c$,
48139 "MAX_CACHE_SIZE", 5,
48140 "LIGHT_WEIGHT_POPUP", 0,
48141 "MEDIUM_WEIGHT_POPUP", 1,
48142 "HEAVY_WEIGHT_POPUP", 2);
48143 });
48144 Clazz_declarePackage ("javax.swing");
48145 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 () {
48146 c$ = Clazz_decorateAsClass (function () {
48147 this.component = null;
48148 Clazz_instantialize (this, arguments);
48149 }, javax.swing, "Popup");
48150 Clazz_makeConstructor (c$, 
48151 function (owner, contents, x, y) {
48152 this.construct ();
48153 if (contents == null) {
48154 throw  new IllegalArgumentException ("Contents must be non-null");
48155 }this.reset (owner, contents, x, y);
48156 }, "java.awt.Component,java.awt.Component,~N,~N");
48157 Clazz_makeConstructor (c$, 
48158 function () {
48159 });
48160 Clazz_defineMethod (c$, "show", 
48161 function () {
48162 var component = this.getComponent ();
48163 if (component != null) {
48164 component.show ();
48165 }});
48166 Clazz_defineMethod (c$, "hide", 
48167 function () {
48168 var component = this.getComponent ();
48169 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48170 component.hide ();
48171 (component).getContentPane ().removeAll ();
48172 }this.dispose ();
48173 });
48174 Clazz_defineMethod (c$, "dispose", 
48175 function () {
48176 var component = this.getComponent ();
48177 var window = javax.swing.SwingUtilities.getWindowAncestor (component);
48178 if (Clazz_instanceOf (component, javax.swing.JWindow)) {
48179 (component).dispose ();
48180 component = null;
48181 }if (Clazz_instanceOf (window, javax.swing.Popup.DefaultFrame)) {
48182 window.dispose ();
48183 }});
48184 Clazz_defineMethod (c$, "reset", 
48185 function (owner, contents, ownerX, ownerY) {
48186 if (this.getComponent () == null) {
48187 this.component = this.createComponent (owner);
48188 }var c = this.getComponent ();
48189 if (Clazz_instanceOf (c, javax.swing.JWindow)) {
48190 var component = this.getComponent ();
48191 component.setLocation (ownerX, ownerY);
48192 component.getContentPane ().add (contents, "Center");
48193 contents.invalidate ();
48194 if (component.isVisible ()) {
48195 this.pack ();
48196 }}}, "java.awt.Component,java.awt.Component,~N,~N");
48197 Clazz_defineMethod (c$, "pack", 
48198 function () {
48199 var component = this.getComponent ();
48200 if (Clazz_instanceOf (component, java.awt.Window)) {
48201 (component).pack ();
48202 }});
48203 Clazz_defineMethod (c$, "getParentWindow", 
48204  function (owner) {
48205 var window = null;
48206 if (Clazz_instanceOf (owner, java.awt.Window)) {
48207 window = owner;
48208 } else if (owner != null) {
48209 window = javax.swing.SwingUtilities.getWindowAncestor (owner);
48210 }if (window == null) {
48211 window =  new javax.swing.Popup.DefaultFrame ();
48212 }return window;
48213 }, "java.awt.Component");
48214 Clazz_defineMethod (c$, "createComponent", 
48215 function (owner) {
48216 return  new javax.swing.Popup.HeavyWeightWindow (this.getParentWindow (owner));
48217 }, "java.awt.Component");
48218 Clazz_defineMethod (c$, "getComponent", 
48219 function () {
48220 return this.component;
48221 });
48222 Clazz_pu$h(self.c$);
48223 c$ = Clazz_declareType (javax.swing.Popup, "HeavyWeightWindow", javax.swing.JWindow);
48224 Clazz_makeConstructor (c$, 
48225 function (a) {
48226 Clazz_superConstructor (this, javax.swing.Popup.HeavyWeightWindow, [a]);
48227 this.setFocusableWindowState (false);
48228 var b = java.awt.Toolkit.getDefaultToolkit ();
48229 if (Clazz_instanceOf (b, jssun.awt.SunToolkit)) {
48230 (b).setOverrideRedirect (this);
48231 }this.getRootPane ().setUseTrueDoubleBuffering (false);
48232 try {
48233 this.setAlwaysOnTop (true);
48234 } catch (se) {
48235 if (Clazz_exceptionOf (se, SecurityException)) {
48236 } else {
48237 throw se;
48238 }
48239 }
48240 }, "java.awt.Window");
48241 Clazz_overrideMethod (c$, "update", 
48242 function (a) {
48243 this.paint (a);
48244 }, "java.awt.Graphics");
48245 Clazz_defineMethod (c$, "show", 
48246 function () {
48247 this.pack ();
48248 if (this.getWidth () > 0 && this.getHeight () > 0) {
48249 Clazz_superCall (this, javax.swing.Popup.HeavyWeightWindow, "show", []);
48250 }});
48251 c$ = Clazz_p0p ();
48252 Clazz_pu$h(self.c$);
48253 c$ = Clazz_declareType (javax.swing.Popup, "DefaultFrame", java.awt.Frame);
48254 c$ = Clazz_p0p ();
48255 });
48256 Clazz_declarePackage ("javax.swing");
48257 Clazz_declareInterface (javax.swing, "SwingHeavyWeight");
48258 Clazz_declarePackage ("javax.swing");
48259 Clazz_load (["javax.swing.JComponent"], "javax.swing.JToolTip", ["javax.swing.UIManager"], function () {
48260 c$ = Clazz_decorateAsClass (function () {
48261 this.tipText = null;
48262 this.$component = null;
48263 Clazz_instantialize (this, arguments);
48264 }, javax.swing, "JToolTip", javax.swing.JComponent);
48265 Clazz_makeConstructor (c$, 
48266 function () {
48267 Clazz_superConstructor (this, javax.swing.JToolTip, []);
48268 this.setOpaque (true);
48269 this.updateUI ();
48270 });
48271 Clazz_overrideMethod (c$, "getUI", 
48272 function () {
48273 return this.ui;
48274 });
48275 Clazz_overrideMethod (c$, "updateUI", 
48276 function () {
48277 this.setUI (javax.swing.UIManager.getUI (this));
48278 });
48279 Clazz_overrideMethod (c$, "getUIClassID", 
48280 function () {
48281 return "ToolTipUI";
48282 });
48283 Clazz_defineMethod (c$, "setTipText", 
48284 function (tipText) {
48285 var oldValue = this.tipText;
48286 this.tipText = tipText;
48287 this.firePropertyChangeObject ("tiptext", oldValue, tipText);
48288 }, "~S");
48289 Clazz_defineMethod (c$, "getTipText", 
48290 function () {
48291 return this.tipText;
48292 });
48293 Clazz_defineMethod (c$, "setComponent", 
48294 function (c) {
48295 var oldValue = this.$component;
48296 this.$component = c;
48297 this.firePropertyChangeObject ("component", oldValue, c);
48298 }, "javax.swing.JComponent");
48299 Clazz_defineMethod (c$, "getComponent", 
48300 function () {
48301 return this.$component;
48302 });
48303 Clazz_overrideMethod (c$, "alwaysOnTop", 
48304 function () {
48305 return true;
48306 });
48307 Clazz_defineMethod (c$, "paramString", 
48308 function () {
48309 var tipTextString = (this.tipText != null ? this.tipText : "");
48310 return Clazz_superCall (this, javax.swing.JToolTip, "paramString", []) + ",tipText=" + tipTextString;
48311 });
48312 Clazz_defineStatics (c$,
48313 "$uiClassID", "ToolTipUI");
48314 });
48315 Clazz_declarePackage ("javax.swing.event");
48316 Clazz_load (["java.util.EventObject"], "javax.swing.event.PopupMenuEvent", null, function () {
48317 c$ = Clazz_declareType (javax.swing.event, "PopupMenuEvent", java.util.EventObject);
48318 });
48319 Clazz_declarePackage ("javax.swing.event");
48320 Clazz_load (["java.util.EventListener"], "javax.swing.event.PopupMenuListener", null, function () {
48321 Clazz_declareInterface (javax.swing.event, "PopupMenuListener", java.util.EventListener);
48322 });
48323 Clazz_declarePackage ("javax.swing.event");
48324 Clazz_load (["java.util.EventObject"], "javax.swing.event.MenuEvent", null, function () {
48325 c$ = Clazz_declareType (javax.swing.event, "MenuEvent", java.util.EventObject);
48326 });
48327 Clazz_declarePackage ("javax.swing.event");
48328 Clazz_load (["java.util.EventListener"], "javax.swing.event.MenuListener", null, function () {
48329 Clazz_declareInterface (javax.swing.event, "MenuListener", java.util.EventListener);
48330 });
48331 Clazz_declarePackage ("javax.swing.border");
48332 Clazz_load (["javax.swing.border.Border"], "javax.swing.border.AbstractBorder", ["java.lang.IllegalArgumentException", "$.NullPointerException", "java.awt.Component", "$.Insets", "$.Rectangle"], function () {
48333 c$ = Clazz_declareType (javax.swing.border, "AbstractBorder", null, javax.swing.border.Border);
48334 Clazz_overrideMethod (c$, "paintBorder", 
48335 function (c, g, x, y, width, height) {
48336 }, "java.awt.Component,java.awt.Graphics,~N,~N,~N,~N");
48337 Clazz_defineMethod (c$, "getBorderInsets", 
48338 function (c) {
48339 return  new java.awt.Insets (0, 0, 0, 0);
48340 }, "java.awt.Component");
48341 Clazz_defineMethod (c$, "getBorderInsets", 
48342 function (c, insets) {
48343 insets.left = insets.top = insets.right = insets.bottom = 0;
48344 return insets;
48345 }, "java.awt.Component,java.awt.Insets");
48346 Clazz_overrideMethod (c$, "isBorderOpaque", 
48347 function () {
48348 return false;
48349 });
48350 Clazz_defineMethod (c$, "getInteriorRectangle", 
48351 function (c, x, y, width, height) {
48352 return javax.swing.border.AbstractBorder.getInteriorRectangle (c, this, x, y, width, height);
48353 }, "java.awt.Component,~N,~N,~N,~N");
48354 c$.getInteriorRectangle = Clazz_defineMethod (c$, "getInteriorRectangle", 
48355 function (c, b, x, y, width, height) {
48356 var insets;
48357 if (b != null) insets = b.getBorderInsets (c);
48358  else insets =  new java.awt.Insets (0, 0, 0, 0);
48359 return  new java.awt.Rectangle (x + insets.left, y + insets.top, width - insets.right - insets.left, height - insets.top - insets.bottom);
48360 }, "java.awt.Component,javax.swing.border.Border,~N,~N,~N,~N");
48361 Clazz_defineMethod (c$, "getBaseline", 
48362 function (c, width, height) {
48363 if (width < 0 || height < 0) {
48364 throw  new IllegalArgumentException ("Width and height must be >= 0");
48365 }return -1;
48366 }, "java.awt.Component,~N,~N");
48367 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
48368 function (c) {
48369 if (c == null) {
48370 throw  new NullPointerException ("Component must be non-null");
48371 }return java.awt.Component.BaselineResizeBehavior.OTHER;
48372 }, "java.awt.Component");
48373 c$.isLeftToRight = Clazz_defineMethod (c$, "isLeftToRight", 
48374 function (c) {
48375 return c.getComponentOrientation ().isLeftToRight ();
48376 }, "java.awt.Component");
48377 });
48378 Clazz_declarePackage ("jssun.awt");
48379 Clazz_load (["java.awt.event.InvocationEvent"], "jssun.awt.PeerEvent", null, function () {
48380 c$ = Clazz_decorateAsClass (function () {
48381 this.flags = 0;
48382 Clazz_instantialize (this, arguments);
48383 }, jssun.awt, "PeerEvent", java.awt.event.InvocationEvent);
48384 Clazz_makeConstructor (c$, 
48385 function (source, runnable, flags) {
48386 this.construct (source, runnable, null, false, flags);
48387 }, "~O,Runnable,~N");
48388 Clazz_makeConstructor (c$, 
48389 function (source, runnable, notifier, catchExceptions, flags) {
48390 Clazz_superConstructor (this, jssun.awt.PeerEvent, [source, runnable, notifier, catchExceptions]);
48391 this.flags = flags;
48392 }, "~O,Runnable,~O,~B,~N");
48393 Clazz_defineMethod (c$, "getFlags", 
48394 function () {
48395 return this.flags;
48396 });
48397 Clazz_defineMethod (c$, "coalesceEvents", 
48398 function (newEvent) {
48399 return null;
48400 }, "jssun.awt.PeerEvent");
48401 Clazz_defineStatics (c$,
48402 "PRIORITY_EVENT", 0x01,
48403 "ULTIMATE_PRIORITY_EVENT", 0x02,
48404 "LOW_PRIORITY_EVENT", 0x04);
48405 });
48406 Clazz_declarePackage ("jssun.awt.image");
48407 Clazz_load (["jssun.awt.image.InputStreamImageSource"], "jssun.awt.image.URLImageSource", ["java.net.URL"], function () {
48408 c$ = Clazz_decorateAsClass (function () {
48409 this.url = null;
48410 this.conn = null;
48411 this.actualHost = null;
48412 this.actualPort = 0;
48413 Clazz_instantialize (this, arguments);
48414 }, jssun.awt.image, "URLImageSource", jssun.awt.image.InputStreamImageSource);
48415 Clazz_makeConstructor (c$, 
48416 function (u) {
48417 Clazz_superConstructor (this, jssun.awt.image.URLImageSource, []);
48418 this.url = u;
48419 }, "java.net.URL");
48420 Clazz_makeConstructor (c$, 
48421 function (href) {
48422 this.construct ( new java.net.URL (null, href));
48423 }, "~S");
48424 Clazz_makeConstructor (c$, 
48425 function (u, uc) {
48426 this.construct (u);
48427 this.conn = uc;
48428 }, "java.net.URL,java.net.URLConnection");
48429 Clazz_makeConstructor (c$, 
48430 function (uc) {
48431 this.construct (uc.getURL (), uc);
48432 }, "java.net.URLConnection");
48433 Clazz_overrideMethod (c$, "checkSecurity", 
48434 function (context, quiet) {
48435 if (this.actualHost != null) {
48436 try {
48437 var security = System.getSecurityManager ();
48438 if (security != null) {
48439 security.checkConnect (this.actualHost, this.actualPort, context);
48440 }} catch (e) {
48441 if (Clazz_exceptionOf (e, SecurityException)) {
48442 if (!quiet) {
48443 throw e;
48444 }return false;
48445 } else {
48446 throw e;
48447 }
48448 }
48449 }return true;
48450 }, "~O,~B");
48451 Clazz_defineMethod (c$, "getDecoder", 
48452 function () {
48453 return null;
48454 });
48455 });
48456 Clazz_declarePackage ("jssun.awt.image");
48457 Clazz_load (["java.awt.image.ImageProducer", "jssun.awt.image.ImageFetchable"], "jssun.awt.image.InputStreamImageSource", ["java.lang.SecurityException", "$.Thread", "jssun.awt.image.ImageConsumerQueue", "$.ImageFetcher"], function () {
48458 c$ = Clazz_decorateAsClass (function () {
48459 this.consumers = null;
48460 this.decoder = null;
48461 this.decoders = null;
48462 this.awaitingFetch = false;
48463 Clazz_instantialize (this, arguments);
48464 }, jssun.awt.image, "InputStreamImageSource", null, [java.awt.image.ImageProducer, jssun.awt.image.ImageFetchable]);
48465 Clazz_defineMethod (c$, "countConsumers", 
48466 function (cq) {
48467 var i = 0;
48468 while (cq != null) {
48469 i++;
48470 cq = cq.next;
48471 }
48472 return i;
48473 }, "jssun.awt.image.ImageConsumerQueue");
48474 Clazz_defineMethod (c$, "countConsumers", 
48475 function () {
48476 var id = this.decoders;
48477 var i = this.countConsumers (this.consumers);
48478 while (id != null) {
48479 i += this.countConsumers (id.queue);
48480 id = id.next;
48481 }
48482 return i;
48483 });
48484 Clazz_defineMethod (c$, "addConsumer", 
48485 function (ic) {
48486 this.addConsumer (ic, false);
48487 }, "java.awt.image.ImageConsumer");
48488 Clazz_defineMethod (c$, "printQueue", 
48489 function (cq, prefix) {
48490 while (cq != null) {
48491 System.out.println (prefix + cq);
48492 cq = cq.next;
48493 }
48494 }, "jssun.awt.image.ImageConsumerQueue,~S");
48495 Clazz_defineMethod (c$, "printQueues", 
48496 function (title) {
48497 System.out.println (title + "[ -----------");
48498 this.printQueue (this.consumers, "  ");
48499 for (var id = this.decoders; id != null; id = id.next) {
48500 System.out.println ("    " + id);
48501 this.printQueue (id.queue, "      ");
48502 }
48503 System.out.println ("----------- ]" + title);
48504 }, "~S");
48505 Clazz_defineMethod (c$, "addConsumer", 
48506 function (ic, produce) {
48507 for (var id = this.decoders; id != null; id = id.next) {
48508 if (id.isConsumer (ic)) {
48509 return;
48510 }}
48511 var cq = this.consumers;
48512 while (cq != null && cq.consumer !== ic) {
48513 cq = cq.next;
48514 }
48515 if (cq == null) {
48516 cq =  new jssun.awt.image.ImageConsumerQueue (this, ic);
48517 cq.next = this.consumers;
48518 this.consumers = cq;
48519 } else {
48520 if (!cq.secure) {
48521 var context = null;
48522 var security = System.getSecurityManager ();
48523 if (security != null) {
48524 context = security.getSecurityContext ();
48525 }if (cq.securityContext == null) {
48526 cq.securityContext = context;
48527 } else if (!cq.securityContext.equals (context)) {
48528 this.errorConsumer (cq, false);
48529 throw  new SecurityException ("Applets are trading image data!");
48530 }}cq.interested = true;
48531 }if (produce && this.decoder == null) {
48532 this.startProduction ();
48533 }}, "java.awt.image.ImageConsumer,~B");
48534 Clazz_overrideMethod (c$, "isConsumer", 
48535 function (ic) {
48536 for (var id = this.decoders; id != null; id = id.next) {
48537 if (id.isConsumer (ic)) {
48538 return true;
48539 }}
48540 return jssun.awt.image.ImageConsumerQueue.isConsumer (this.consumers, ic);
48541 }, "java.awt.image.ImageConsumer");
48542 Clazz_defineMethod (c$, "errorAllConsumers", 
48543  function (cq, needReload) {
48544 while (cq != null) {
48545 if (cq.interested) {
48546 this.errorConsumer (cq, needReload);
48547 }cq = cq.next;
48548 }
48549 }, "jssun.awt.image.ImageConsumerQueue,~B");
48550 Clazz_defineMethod (c$, "errorConsumer", 
48551  function (cq, needReload) {
48552 cq.consumer.imageComplete (1);
48553 this.removeConsumer (cq.consumer);
48554 }, "jssun.awt.image.ImageConsumerQueue,~B");
48555 Clazz_overrideMethod (c$, "removeConsumer", 
48556 function (ic) {
48557 for (var id = this.decoders; id != null; id = id.next) {
48558 id.removeConsumer (ic);
48559 }
48560 this.consumers = jssun.awt.image.ImageConsumerQueue.removeConsumer (this.consumers, ic, false);
48561 }, "java.awt.image.ImageConsumer");
48562 Clazz_defineMethod (c$, "startProduction", 
48563 function (ic) {
48564 this.addConsumer (ic, true);
48565 }, "java.awt.image.ImageConsumer");
48566 Clazz_defineMethod (c$, "startProduction", 
48567  function () {
48568 if (!this.awaitingFetch) {
48569 jssun.awt.image.ImageFetcher.add (this);
48570 this.awaitingFetch = true;
48571 }});
48572 Clazz_overrideMethod (c$, "requestTopDownLeftRightResend", 
48573 function (ic) {
48574 }, "java.awt.image.ImageConsumer");
48575 Clazz_defineMethod (c$, "decoderForType", 
48576 function (is, content_type) {
48577 return null;
48578 }, "java.io.InputStream,~S");
48579 Clazz_defineMethod (c$, "getDecoder", 
48580 function (is) {
48581 return null;
48582 }, "java.io.InputStream");
48583 Clazz_overrideMethod (c$, "doFetch", 
48584 function () {
48585 {
48586 if (this.consumers == null) {
48587 this.awaitingFetch = false;
48588 return;
48589 }}var imgd = this.getDecoder ();
48590 if (imgd == null) {
48591 this.badDecoder ();
48592 } else {
48593 this.setDecoder (imgd);
48594 try {
48595 imgd.produceImage ();
48596 } catch (e$$) {
48597 if (Clazz_exceptionOf (e$$, java.io.IOException)) {
48598 var e = e$$;
48599 {
48600 e.printStackTrace ();
48601 }
48602 } else if (Clazz_exceptionOf (e$$, jssun.awt.image.ImageFormatException)) {
48603 var e = e$$;
48604 {
48605 e.printStackTrace ();
48606 }
48607 } else {
48608 throw e$$;
48609 }
48610 } finally {
48611 this.removeDecoder (imgd);
48612 if (Thread.currentThread ().isInterrupted () || !Thread.currentThread ().isAlive ()) {
48613 this.errorAllConsumers (imgd.queue, true);
48614 } else {
48615 this.errorAllConsumers (imgd.queue, false);
48616 }}
48617 }});
48618 Clazz_defineMethod (c$, "badDecoder", 
48619  function () {
48620 var cq;
48621 {
48622 cq = this.consumers;
48623 this.consumers = null;
48624 this.awaitingFetch = false;
48625 }this.errorAllConsumers (cq, false);
48626 });
48627 Clazz_defineMethod (c$, "setDecoder", 
48628  function (mydecoder) {
48629 var cq;
48630 {
48631 mydecoder.next = this.decoders;
48632 this.decoders = mydecoder;
48633 this.decoder = mydecoder;
48634 cq = this.consumers;
48635 mydecoder.queue = cq;
48636 this.consumers = null;
48637 this.awaitingFetch = false;
48638 }}, "jssun.awt.image.ImageDecoder");
48639 Clazz_defineMethod (c$, "removeDecoder", 
48640  function (mydecoder) {
48641 this.doneDecoding (mydecoder);
48642 var idprev = null;
48643 for (var id = this.decoders; id != null; id = id.next) {
48644 if (id === mydecoder) {
48645 if (idprev == null) {
48646 this.decoders = id.next;
48647 } else {
48648 idprev.next = id.next;
48649 }break;
48650 }idprev = id;
48651 }
48652 }, "jssun.awt.image.ImageDecoder");
48653 Clazz_defineMethod (c$, "doneDecoding", 
48654 function (mydecoder) {
48655 if (this.decoder === mydecoder) {
48656 this.decoder = null;
48657 if (this.consumers != null) {
48658 this.startProduction ();
48659 }}}, "jssun.awt.image.ImageDecoder");
48660 Clazz_defineMethod (c$, "latchConsumers", 
48661 function (id) {
48662 this.doneDecoding (id);
48663 }, "jssun.awt.image.ImageDecoder");
48664 Clazz_defineMethod (c$, "flush", 
48665 function () {
48666 this.decoder = null;
48667 });
48668 });
48669 Clazz_declarePackage ("java.awt.image");
48670 Clazz_declareInterface (java.awt.image, "ImageProducer");
48671 Clazz_declarePackage ("jssun.awt.image");
48672 Clazz_declareInterface (jssun.awt.image, "ImageFetchable");
48673 Clazz_declarePackage ("jssun.awt.image");
48674 c$ = Clazz_decorateAsClass (function () {
48675 this.next = null;
48676 this.consumer = null;
48677 this.interested = false;
48678 this.securityContext = null;
48679 this.secure = false;
48680 Clazz_instantialize (this, arguments);
48681 }, jssun.awt.image, "ImageConsumerQueue");
48682 c$.removeConsumer = Clazz_defineMethod (c$, "removeConsumer", 
48683 function (cqbase, ic, stillinterested) {
48684 var cqprev = null;
48685 for (var cq = cqbase; cq != null; cq = cq.next) {
48686 if (cq.consumer === ic) {
48687 if (cqprev == null) {
48688 cqbase = cq.next;
48689 } else {
48690 cqprev.next = cq.next;
48691 }cq.interested = stillinterested;
48692 break;
48693 }cqprev = cq;
48694 }
48695 return cqbase;
48696 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer,~B");
48697 c$.isConsumer = Clazz_defineMethod (c$, "isConsumer", 
48698 function (cqbase, ic) {
48699 for (var cq = cqbase; cq != null; cq = cq.next) {
48700 if (cq.consumer === ic) {
48701 return true;
48702 }}
48703 return false;
48704 }, "jssun.awt.image.ImageConsumerQueue,java.awt.image.ImageConsumer");
48705 Clazz_makeConstructor (c$, 
48706 function (src, ic) {
48707 this.consumer = ic;
48708 this.interested = true;
48709 this.secure = true;
48710 }, "jssun.awt.image.InputStreamImageSource,java.awt.image.ImageConsumer");
48711 Clazz_overrideMethod (c$, "toString", 
48712 function () {
48713 return ("[" + this.consumer + ", " + (this.interested ? "" : "not ") + "interested" + (this.securityContext != null ? ", " + this.securityContext : "") + "]");
48714 });
48715 Clazz_declarePackage ("jssun.awt.image");
48716 Clazz_load (["java.lang.Thread", "$.StringBuffer"], ["jssun.awt.image.FetcherInfo", "$.ImageFetcher"], ["java.util.Vector", "jssun.awt.AppContext"], function () {
48717 c$ = Clazz_declareType (jssun.awt.image, "ImageFetcher", Thread);
48718 Clazz_makeConstructor (c$, 
48719  function (threadGroup, index) {
48720 Clazz_superConstructor (this, jssun.awt.image.ImageFetcher, [threadGroup, "Image Fetcher " + index]);
48721 this.setDaemon (true);
48722 }, "ThreadGroup,~N");
48723 c$.add = Clazz_defineMethod (c$, "add", 
48724 function (src) {
48725 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48726 {
48727 if (!info.waitList.contains (src)) {
48728 info.waitList.addElement (src);
48729 if (info.numWaiting == 0 && info.numFetchers < info.fetchers.length) {
48730 jssun.awt.image.ImageFetcher.createFetchers (info);
48731 }info.waitList.notify ();
48732 }}}, "jssun.awt.image.ImageFetchable");
48733 c$.remove = Clazz_defineMethod (c$, "remove", 
48734 function (src) {
48735 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48736 {
48737 if (info.waitList.contains (src)) {
48738 info.waitList.removeElement (src);
48739 }}}, "jssun.awt.image.ImageFetchable");
48740 c$.isFetcher = Clazz_defineMethod (c$, "isFetcher", 
48741 function (t) {
48742 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48743 {
48744 for (var i = 0; i < info.fetchers.length; i++) {
48745 if (info.fetchers[i] === t) {
48746 return true;
48747 }}
48748 }return false;
48749 }, "Thread");
48750 c$.amFetcher = Clazz_defineMethod (c$, "amFetcher", 
48751 function () {
48752 return jssun.awt.image.ImageFetcher.isFetcher (Thread.currentThread ());
48753 });
48754 c$.nextImage = Clazz_defineMethod (c$, "nextImage", 
48755  function () {
48756 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48757 {
48758 var src = null;
48759 var end = System.currentTimeMillis () + 5000;
48760 while (src == null) {
48761 while (info.waitList.size () == 0) {
48762 var now = System.currentTimeMillis ();
48763 if (now >= end) {
48764 return null;
48765 }try {
48766 info.numWaiting++;
48767 info.waitList.wait (end - now);
48768 } catch (e) {
48769 if (Clazz_exceptionOf (e, InterruptedException)) {
48770 return null;
48771 } else {
48772 throw e;
48773 }
48774 } finally {
48775 info.numWaiting--;
48776 }
48777 }
48778 src = info.waitList.elementAt (0);
48779 info.waitList.removeElement (src);
48780 }
48781 return src;
48782 }});
48783 Clazz_overrideMethod (c$, "run", 
48784 function () {
48785 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48786 try {
48787 this.fetchloop ();
48788 } catch (e) {
48789 if (Clazz_exceptionOf (e, Exception)) {
48790 e.printStackTrace ();
48791 } else {
48792 throw e;
48793 }
48794 } finally {
48795 {
48796 var me = Thread.currentThread ();
48797 for (var i = 0; i < info.fetchers.length; i++) {
48798 if (info.fetchers[i] === me) {
48799 info.fetchers[i] = null;
48800 info.numFetchers--;
48801 }}
48802 }}
48803 });
48804 Clazz_defineMethod (c$, "fetchloop", 
48805  function () {
48806 var me = Thread.currentThread ();
48807 while (jssun.awt.image.ImageFetcher.isFetcher (me)) {
48808 Thread.interrupted ();
48809 me.setPriority (8);
48810 var src = jssun.awt.image.ImageFetcher.nextImage ();
48811 if (src == null) {
48812 return;
48813 }try {
48814 src.doFetch ();
48815 } catch (e) {
48816 if (Clazz_exceptionOf (e, Exception)) {
48817 System.err.println ("Uncaught error fetching image:");
48818 e.printStackTrace ();
48819 } else {
48820 throw e;
48821 }
48822 }
48823 jssun.awt.image.ImageFetcher.stoppingAnimation (me);
48824 }
48825 });
48826 c$.startingAnimation = Clazz_defineMethod (c$, "startingAnimation", 
48827 function () {
48828 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48829 var me = Thread.currentThread ();
48830 {
48831 for (var i = 0; i < info.fetchers.length; i++) {
48832 if (info.fetchers[i] === me) {
48833 info.fetchers[i] = null;
48834 info.numFetchers--;
48835 me.setName ("Image Animator " + i);
48836 if (info.waitList.size () > info.numWaiting) {
48837 jssun.awt.image.ImageFetcher.createFetchers (info);
48838 }return;
48839 }}
48840 }me.setPriority (2);
48841 me.setName ("Image Animator");
48842 });
48843 c$.stoppingAnimation = Clazz_defineMethod (c$, "stoppingAnimation", 
48844  function (me) {
48845 var info = jssun.awt.image.FetcherInfo.getFetcherInfo ();
48846 {
48847 var index = -1;
48848 for (var i = 0; i < info.fetchers.length; i++) {
48849 if (info.fetchers[i] === me) {
48850 return;
48851 }if (info.fetchers[i] == null) {
48852 index = i;
48853 }}
48854 if (index >= 0) {
48855 info.fetchers[index] = me;
48856 info.numFetchers++;
48857 me.setName ("Image Fetcher " + index);
48858 return;
48859 }}}, "Thread");
48860 c$.createFetchers = Clazz_defineMethod (c$, "createFetchers", 
48861  function (info) {
48862 var appContext = jssun.awt.AppContext.getAppContext ();
48863 var threadGroup = appContext.getThreadGroup ();
48864 var fetcherThreadGroup;
48865 try {
48866 if (threadGroup.getParent () != null) {
48867 fetcherThreadGroup = threadGroup;
48868 } else {
48869 threadGroup = Thread.currentThread ().getThreadGroup ();
48870 var parent = threadGroup.getParent ();
48871 while ((parent != null) && (parent.getParent () != null)) {
48872 threadGroup = parent;
48873 parent = threadGroup.getParent ();
48874 }
48875 fetcherThreadGroup = threadGroup;
48876 }} catch (e) {
48877 if (Clazz_exceptionOf (e, SecurityException)) {
48878 fetcherThreadGroup = appContext.getThreadGroup ();
48879 } else {
48880 throw e;
48881 }
48882 }
48883 var fetcherGroup = fetcherThreadGroup;
48884 for (var i = 0; i < info.fetchers.length; i++) {
48885 if (info.fetchers[i] == null) {
48886 info.fetchers[i] =  new jssun.awt.image.ImageFetcher (fetcherGroup, i);
48887 info.fetchers[i].start ();
48888 info.numFetchers++;
48889 break;
48890 }}
48891 return;
48892 }, "jssun.awt.image.FetcherInfo");
48893 Clazz_defineStatics (c$,
48894 "HIGH_PRIORITY", 8,
48895 "LOW_PRIORITY", 3,
48896 "ANIM_PRIORITY", 2,
48897 "TIMEOUT", 5000);
48898 c$ = Clazz_decorateAsClass (function () {
48899 this.fetchers = null;
48900 this.numFetchers = 0;
48901 this.numWaiting = 0;
48902 this.waitList = null;
48903 Clazz_instantialize (this, arguments);
48904 }, jssun.awt.image, "FetcherInfo");
48905 Clazz_makeConstructor (c$, 
48906  function () {
48907 this.fetchers =  new Array (4);
48908 this.numFetchers = 0;
48909 this.numWaiting = 0;
48910 this.waitList =  new java.util.Vector ();
48911 });
48912 c$.getFetcherInfo = Clazz_defineMethod (c$, "getFetcherInfo", 
48913 function () {
48914 var appContext = jssun.awt.AppContext.getAppContext ();
48915 {
48916 var info = appContext.get (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY);
48917 if (info == null) {
48918 info =  new jssun.awt.image.FetcherInfo ();
48919 appContext.put (jssun.awt.image.FetcherInfo.FETCHER_INFO_KEY, info);
48920 }return info;
48921 }});
48922 Clazz_defineStatics (c$,
48923 "MAX_NUM_FETCHERS_PER_APPCONTEXT", 4);
48924 c$.FETCHER_INFO_KEY = c$.prototype.FETCHER_INFO_KEY =  new StringBuffer ("FetcherInfo");
48925 });
48926 Clazz_declarePackage ("java.awt.event");
48927 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.FocusEvent", ["jssun.awt.AppContext", "$.SunToolkit"], function () {
48928 c$ = Clazz_decorateAsClass (function () {
48929 this.temporary = false;
48930 this.opposite = null;
48931 Clazz_instantialize (this, arguments);
48932 }, java.awt.event, "FocusEvent", java.awt.event.ComponentEvent);
48933 Clazz_makeConstructor (c$, 
48934 function (source, id, temporary, opposite) {
48935 Clazz_superConstructor (this, java.awt.event.FocusEvent, [source, id]);
48936 this.temporary = temporary;
48937 this.opposite = opposite;
48938 }, "java.awt.Component,~N,~B,java.awt.Component");
48939 Clazz_makeConstructor (c$, 
48940 function (source, id, temporary) {
48941 this.construct (source, id, temporary, null);
48942 }, "java.awt.Component,~N,~B");
48943 Clazz_makeConstructor (c$, 
48944 function (source, id) {
48945 this.construct (source, id, false);
48946 }, "java.awt.Component,~N");
48947 Clazz_defineMethod (c$, "isTemporary", 
48948 function () {
48949 return this.temporary;
48950 });
48951 Clazz_defineMethod (c$, "getOppositeComponent", 
48952 function () {
48953 if (this.opposite == null) {
48954 return null;
48955 }return (jssun.awt.SunToolkit.targetToAppContext (this.opposite) === jssun.awt.AppContext.getAppContext ()) ? this.opposite : null;
48956 });
48957 Clazz_overrideMethod (c$, "paramString", 
48958 function () {
48959 var typeStr;
48960 switch (this.id) {
48961 case 1004:
48962 typeStr = "FOCUS_GAINED";
48963 break;
48964 case 1005:
48965 typeStr = "FOCUS_LOST";
48966 break;
48967 default:
48968 typeStr = "unknown type";
48969 }
48970 return typeStr + (this.temporary ? ",temporary" : ",permanent") + ",opposite=" + this.getOppositeComponent ();
48971 });
48972 Clazz_defineStatics (c$,
48973 "FOCUS_FIRST", 1004,
48974 "FOCUS_LAST", 1005,
48975 "FOCUS_GAINED", 1004,
48976 "FOCUS_LOST", 1005);
48977 });
48978 Clazz_declarePackage ("java.awt.event");
48979 Clazz_load (["java.awt.AWTEvent"], "java.awt.event.HierarchyEvent", ["java.awt.Component"], function () {
48980 c$ = Clazz_decorateAsClass (function () {
48981 this.changed = null;
48982 this.changedParent = null;
48983 this.changeFlags = 0;
48984 Clazz_instantialize (this, arguments);
48985 }, java.awt.event, "HierarchyEvent", java.awt.AWTEvent);
48986 Clazz_makeConstructor (c$, 
48987 function (source, id, changed, changedParent) {
48988 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
48989 this.changed = changed;
48990 this.changedParent = changedParent;
48991 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container");
48992 Clazz_makeConstructor (c$, 
48993 function (source, id, changed, changedParent, changeFlags) {
48994 Clazz_superConstructor (this, java.awt.event.HierarchyEvent, [source, id]);
48995 this.changed = changed;
48996 this.changedParent = changedParent;
48997 this.changeFlags = changeFlags;
48998 }, "java.awt.Component,~N,java.awt.Component,java.awt.Container,~N");
48999 Clazz_defineMethod (c$, "getComponent", 
49000 function () {
49001 return (Clazz_instanceOf (this.source, java.awt.Component)) ? this.source : null;
49002 });
49003 Clazz_defineMethod (c$, "getChanged", 
49004 function () {
49005 return this.changed;
49006 });
49007 Clazz_defineMethod (c$, "getChangedParent", 
49008 function () {
49009 return this.changedParent;
49010 });
49011 Clazz_defineMethod (c$, "getChangeFlags", 
49012 function () {
49013 return this.changeFlags;
49014 });
49015 Clazz_overrideMethod (c$, "paramString", 
49016 function () {
49017 var typeStr;
49018 switch (this.id) {
49019 case 1401:
49020 typeStr = "ANCESTOR_MOVED (" + this.changed + "," + this.changedParent + ")";
49021 break;
49022 case 1402:
49023 typeStr = "ANCESTOR_RESIZED (" + this.changed + "," + this.changedParent + ")";
49024 break;
49025 case 1400:
49026 {
49027 typeStr = "HIERARCHY_CHANGED (";
49028 var first = true;
49029 if ((this.changeFlags & 1) != 0) {
49030 first = false;
49031 typeStr += "PARENT_CHANGED";
49032 }if ((this.changeFlags & 2) != 0) {
49033 if (first) {
49034 first = false;
49035 } else {
49036 typeStr += ",";
49037 }typeStr += "DISPLAYABILITY_CHANGED";
49038 }if ((this.changeFlags & 4) != 0) {
49039 if (first) {
49040 first = false;
49041 } else {
49042 typeStr += ",";
49043 }typeStr += "SHOWING_CHANGED";
49044 }if (!first) {
49045 typeStr += ",";
49046 }typeStr += this.changed + "," + this.changedParent + ")";
49047 break;
49048 }default:
49049 typeStr = "unknown type";
49050 }
49051 return typeStr;
49052 });
49053 Clazz_defineStatics (c$,
49054 "HIERARCHY_FIRST", 1400,
49055 "HIERARCHY_CHANGED", 1400,
49056 "ANCESTOR_MOVED", 1401,
49057 "ANCESTOR_RESIZED", 1402,
49058 "HIERARCHY_LAST", 1402,
49059 "PARENT_CHANGED", 0x1,
49060 "DISPLAYABILITY_CHANGED", 0x2,
49061 "SHOWING_CHANGED", 0x4);
49062 });
49063 Clazz_declarePackage ("jssun.awt");
49064 Clazz_declareInterface (jssun.awt, "ConstrainableGraphics");
49065 Clazz_declarePackage ("jssun.awt");
49066 Clazz_declareInterface (jssun.awt, "Graphics2Delegate");
49067 Clazz_declarePackage ("java.awt.event");
49068 Clazz_load (["java.awt.event.ComponentEvent"], "java.awt.event.ContainerEvent", ["java.awt.Container"], function () {
49069 c$ = Clazz_decorateAsClass (function () {
49070 this.child = null;
49071 Clazz_instantialize (this, arguments);
49072 }, java.awt.event, "ContainerEvent", java.awt.event.ComponentEvent);
49073 Clazz_makeConstructor (c$, 
49074 function (source, id, child) {
49075 Clazz_superConstructor (this, java.awt.event.ContainerEvent, [source, id]);
49076 this.child = child;
49077 }, "java.awt.Component,~N,java.awt.Component");
49078 Clazz_defineMethod (c$, "getContainer", 
49079 function () {
49080 return (Clazz_instanceOf (this.source, java.awt.Container)) ? this.source : null;
49081 });
49082 Clazz_defineMethod (c$, "getChild", 
49083 function () {
49084 return this.child;
49085 });
49086 Clazz_overrideMethod (c$, "paramString", 
49087 function () {
49088 var typeStr;
49089 switch (this.id) {
49090 case 300:
49091 typeStr = "COMPONENT_ADDED";
49092 break;
49093 case 301:
49094 typeStr = "COMPONENT_REMOVED";
49095 break;
49096 default:
49097 typeStr = "unknown type";
49098 }
49099 return typeStr + ",child=" + this.child.getName ();
49100 });
49101 Clazz_defineStatics (c$,
49102 "CONTAINER_FIRST", 300,
49103 "CONTAINER_LAST", 301,
49104 "COMPONENT_ADDED", 300,
49105 "COMPONENT_REMOVED", 301);
49106 });
49107 Clazz_declarePackage ("jssun.applet");
49108 Clazz_load (["java.util.EventObject"], "jssun.applet.AppletEvent", null, function () {
49109 c$ = Clazz_decorateAsClass (function () {
49110 this.arg = null;
49111 this.id = 0;
49112 Clazz_instantialize (this, arguments);
49113 }, jssun.applet, "AppletEvent", java.util.EventObject);
49114 Clazz_makeConstructor (c$, 
49115 function (source, id, argument) {
49116 Clazz_superConstructor (this, jssun.applet.AppletEvent, [source]);
49117 this.arg = argument;
49118 this.id = id;
49119 }, "~O,~N,~O");
49120 Clazz_defineMethod (c$, "getID", 
49121 function () {
49122 return this.id;
49123 });
49124 Clazz_defineMethod (c$, "getArgument", 
49125 function () {
49126 return this.arg;
49127 });
49128 Clazz_overrideMethod (c$, "toString", 
49129 function () {
49130 var str = this.getClass ().getName () + "[source=" + this.source + " + id=" + this.id;
49131 if (this.arg != null) {
49132 str += " + arg=" + this.arg;
49133 }str += " ]";
49134 return str;
49135 });
49136 });
49137 Clazz_declarePackage ("jssun.applet");
49138 Clazz_load (["jssun.applet.AppletListener"], "jssun.applet.AppletEventMulticaster", null, function () {
49139 c$ = Clazz_decorateAsClass (function () {
49140 this.a = null;
49141 this.b = null;
49142 Clazz_instantialize (this, arguments);
49143 }, jssun.applet, "AppletEventMulticaster", null, jssun.applet.AppletListener);
49144 Clazz_makeConstructor (c$, 
49145 function (a, b) {
49146 this.a = a;
49147 this.b = b;
49148 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49149 Clazz_defineMethod (c$, "appletStateChanged", 
49150 function (e) {
49151 this.a.appletStateChanged (e);
49152 this.b.appletStateChanged (e);
49153 }, "jssun.applet.AppletEvent");
49154 c$.add = Clazz_defineMethod (c$, "add", 
49155 function (a, b) {
49156 return jssun.applet.AppletEventMulticaster.addInternal (a, b);
49157 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49158 c$.remove = Clazz_defineMethod (c$, "remove", 
49159 function (l, oldl) {
49160 return jssun.applet.AppletEventMulticaster.removeInternal (l, oldl);
49161 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49162 c$.addInternal = Clazz_defineMethod (c$, "addInternal", 
49163  function (a, b) {
49164 if (a == null) return b;
49165 if (b == null) return a;
49166 return  new jssun.applet.AppletEventMulticaster (a, b);
49167 }, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49168 Clazz_defineMethod (c$, "remove", 
49169 function (oldl) {
49170 if (oldl === this.a) return this.b;
49171 if (oldl === this.b) return this.a;
49172 var a2 = jssun.applet.AppletEventMulticaster.removeInternal (this.a, oldl);
49173 var b2 = jssun.applet.AppletEventMulticaster.removeInternal (this.b, oldl);
49174 if (a2 === this.a && b2 === this.b) {
49175 return this;
49176 }return jssun.applet.AppletEventMulticaster.addInternal (a2, b2);
49177 }, "jssun.applet.AppletListener");
49178 c$.removeInternal = Clazz_defineMethod (c$, "removeInternal", 
49179  function (l, oldl) {
49180 if (l === oldl || l == null) {
49181 return null;
49182 } else if (Clazz_instanceOf (l, jssun.applet.AppletEventMulticaster)) {
49183 return (l).remove (oldl);
49184 } else {
49185 return l;
49186 }}, "jssun.applet.AppletListener,jssun.applet.AppletListener");
49187 });
49188 Clazz_declarePackage ("jssun.applet");
49189 Clazz_load (["java.util.EventListener"], "jssun.applet.AppletListener", null, function () {
49190 Clazz_declareInterface (jssun.applet, "AppletListener", java.util.EventListener);
49191 });
49192 Clazz_declarePackage ("jssun.misc");
49193 Clazz_load (["java.util.Enumeration"], ["jssun.misc.Queue", "$.LIFOQueueEnumerator", "$.FIFOQueueEnumerator", "$.QueueElement"], ["java.util.NoSuchElementException", "swingjs.JSToolkit"], function () {
49194 c$ = Clazz_decorateAsClass (function () {
49195 this.length = 0;
49196 this.head = null;
49197 this.tail = null;
49198 Clazz_instantialize (this, arguments);
49199 }, jssun.misc, "Queue");
49200 Clazz_makeConstructor (c$, 
49201 function () {
49202 });
49203 Clazz_defineMethod (c$, "enqueue", 
49204 function (obj) {
49205 var newElt =  new jssun.misc.QueueElement (obj);
49206 if (this.head == null) {
49207 this.head = newElt;
49208 this.tail = newElt;
49209 this.length = 1;
49210 } else {
49211 newElt.next = this.head;
49212 this.head.prev = newElt;
49213 this.head = newElt;
49214 this.length++;
49215 }this.notify ();
49216 }, "~O");
49217 Clazz_defineMethod (c$, "dequeue", 
49218 function () {
49219 return this.dequeue (0);
49220 });
49221 Clazz_defineMethod (c$, "dequeue", 
49222 function (timeOut) {
49223 while (this.tail == null) {
49224 swingjs.JSToolkit.warn ("Cannot wait in Queue.java");
49225 this.wait (timeOut);
49226 }
49227 var elt = this.tail;
49228 this.tail = elt.prev;
49229 if (this.tail == null) {
49230 this.head = null;
49231 } else {
49232 this.tail.next = null;
49233 }this.length--;
49234 return elt.obj;
49235 }, "~N");
49236 Clazz_defineMethod (c$, "isEmpty", 
49237 function () {
49238 return (this.tail == null);
49239 });
49240 Clazz_defineMethod (c$, "elements", 
49241 function () {
49242 return  new jssun.misc.LIFOQueueEnumerator (this);
49243 });
49244 Clazz_defineMethod (c$, "reverseElements", 
49245 function () {
49246 return  new jssun.misc.FIFOQueueEnumerator (this);
49247 });
49248 Clazz_defineMethod (c$, "dump", 
49249 function (msg) {
49250 System.err.println (">> " + msg);
49251 System.err.println ("[" + this.length + " elt(s); head = " + (this.head == null ? "null" : (this.head.obj) + "") + " tail = " + (this.tail == null ? "null" : (this.tail.obj) + ""));
49252 var cursor = this.head;
49253 var last = null;
49254 while (cursor != null) {
49255 System.err.println ("  " + cursor);
49256 last = cursor;
49257 cursor = cursor.next;
49258 }
49259 if (last !== this.tail) {
49260 System.err.println ("  tail != last: " + this.tail + ", " + last);
49261 }System.err.println ("]");
49262 }, "~S");
49263 c$ = Clazz_decorateAsClass (function () {
49264 this.queue = null;
49265 this.cursor = null;
49266 Clazz_instantialize (this, arguments);
49267 }, jssun.misc, "FIFOQueueEnumerator", null, java.util.Enumeration);
49268 Clazz_makeConstructor (c$, 
49269 function (q) {
49270 this.queue = q;
49271 this.cursor = q.tail;
49272 }, "jssun.misc.Queue");
49273 Clazz_overrideMethod (c$, "hasMoreElements", 
49274 function () {
49275 return (this.cursor != null);
49276 });
49277 Clazz_overrideMethod (c$, "nextElement", 
49278 function () {
49279 {
49280 if (this.cursor != null) {
49281 var result = this.cursor;
49282 this.cursor = this.cursor.prev;
49283 return result.obj;
49284 }}throw  new java.util.NoSuchElementException ("FIFOQueueEnumerator");
49285 });
49286 c$ = Clazz_decorateAsClass (function () {
49287 this.queue = null;
49288 this.cursor = null;
49289 Clazz_instantialize (this, arguments);
49290 }, jssun.misc, "LIFOQueueEnumerator", null, java.util.Enumeration);
49291 Clazz_makeConstructor (c$, 
49292 function (q) {
49293 this.queue = q;
49294 this.cursor = q.head;
49295 }, "jssun.misc.Queue");
49296 Clazz_overrideMethod (c$, "hasMoreElements", 
49297 function () {
49298 return (this.cursor != null);
49299 });
49300 Clazz_overrideMethod (c$, "nextElement", 
49301 function () {
49302 {
49303 if (this.cursor != null) {
49304 var result = this.cursor;
49305 this.cursor = this.cursor.next;
49306 return result.obj;
49307 }}throw  new java.util.NoSuchElementException ("LIFOQueueEnumerator");
49308 });
49309 c$ = Clazz_decorateAsClass (function () {
49310 this.next = null;
49311 this.prev = null;
49312 this.obj = null;
49313 Clazz_instantialize (this, arguments);
49314 }, jssun.misc, "QueueElement");
49315 Clazz_makeConstructor (c$, 
49316 function (obj) {
49317 this.obj = obj;
49318 }, "~O");
49319 Clazz_overrideMethod (c$, "toString", 
49320 function () {
49321 return "QueueElement[obj=" + this.obj + (this.prev == null ? " null" : " prev") + (this.next == null ? " null" : " next") + "]";
49322 });
49323 });
49324 Clazz_declarePackage ("javax.swing.plaf");
49325 Clazz_declareInterface (javax.swing.plaf, "UIResource");
49326 Clazz_declarePackage ("javax.swing.plaf");
49327 Clazz_load (["javax.swing.InputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.InputMapUIResource", null, function () {
49328 c$ = Clazz_declareType (javax.swing.plaf, "InputMapUIResource", javax.swing.InputMap, javax.swing.plaf.UIResource);
49329 Clazz_makeConstructor (c$, 
49330 function () {
49331 Clazz_superConstructor (this, javax.swing.plaf.InputMapUIResource, []);
49332 });
49333 });
49334 Clazz_declarePackage ("javax.swing.plaf");
49335 Clazz_load (["javax.swing.ActionMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ActionMapUIResource", null, function () {
49336 c$ = Clazz_declareType (javax.swing.plaf, "ActionMapUIResource", javax.swing.ActionMap, javax.swing.plaf.UIResource);
49337 Clazz_makeConstructor (c$, 
49338 function () {
49339 Clazz_superConstructor (this, javax.swing.plaf.ActionMapUIResource, []);
49340 });
49341 });
49342 Clazz_declarePackage ("javax.swing.plaf");
49343 Clazz_load (["java.awt.peer.LightweightPeer"], "javax.swing.plaf.ComponentUI", ["java.lang.Error", "java.awt.Component"], function () {
49344 c$ = Clazz_declareType (javax.swing.plaf, "ComponentUI", null, java.awt.peer.LightweightPeer);
49345 Clazz_makeConstructor (c$, 
49346 function () {
49347 });
49348 Clazz_defineMethod (c$, "installUI", 
49349 function (c) {
49350 }, "javax.swing.JComponent");
49351 Clazz_defineMethod (c$, "uninstallUI", 
49352 function (c) {
49353 }, "javax.swing.JComponent");
49354 Clazz_defineMethod (c$, "paint", 
49355 function (g, c) {
49356 }, "java.awt.Graphics,javax.swing.JComponent");
49357 Clazz_defineMethod (c$, "update", 
49358 function (g, c) {
49359 }, "java.awt.Graphics,javax.swing.JComponent");
49360 Clazz_defineMethod (c$, "getPreferredSize", 
49361 function (c) {
49362 return null;
49363 }, "javax.swing.JComponent");
49364 Clazz_defineMethod (c$, "getMinimumSize", 
49365 function (c) {
49366 return this.getPreferredSize (c);
49367 }, "javax.swing.JComponent");
49368 Clazz_defineMethod (c$, "getMaximumSize", 
49369 function (c) {
49370 return null;
49371 }, "javax.swing.JComponent");
49372 Clazz_defineMethod (c$, "contains", 
49373 function (c, x, y) {
49374 return c.inside (x, y);
49375 }, "javax.swing.JComponent,~N,~N");
49376 c$.createUI = Clazz_defineMethod (c$, "createUI", 
49377 function (c) {
49378 throw  new Error ("ComponentUI.createUI not implemented.");
49379 }, "javax.swing.JComponent");
49380 Clazz_defineMethod (c$, "getBaseline", 
49381 function (c, width, height) {
49382 return -1;
49383 }, "javax.swing.JComponent,~N,~N");
49384 Clazz_defineMethod (c$, "getBaselineResizeBehavior", 
49385 function (c) {
49386 return java.awt.Component.BaselineResizeBehavior.OTHER;
49387 }, "javax.swing.JComponent");
49388 });
49389 Clazz_declarePackage ("javax.swing.plaf");
49390 Clazz_load (["java.awt.Font", "javax.swing.plaf.UIResource"], "javax.swing.plaf.FontUIResource", null, function () {
49391 c$ = Clazz_declareType (javax.swing.plaf, "FontUIResource", java.awt.Font, javax.swing.plaf.UIResource);
49392 });
49393 Clazz_declarePackage ("javax.swing.plaf");
49394 Clazz_load (["java.awt.Color", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ColorUIResource", null, function () {
49395 c$ = Clazz_declareType (javax.swing.plaf, "ColorUIResource", java.awt.Color, javax.swing.plaf.UIResource);
49396 });
49397 Clazz_declarePackage ("javax.swing.plaf");
49398 Clazz_load (["javax.swing.ComponentInputMap", "javax.swing.plaf.UIResource"], "javax.swing.plaf.ComponentInputMapUIResource", null, function () {
49399 c$ = Clazz_declareType (javax.swing.plaf, "ComponentInputMapUIResource", javax.swing.ComponentInputMap, javax.swing.plaf.UIResource);
49400 });
49401 Clazz_declarePackage ("swingjs.api");
49402 Clazz_declareInterface (swingjs.api, "JSFunction");
49403 Clazz_declarePackage ("swingjs.api");
49404 Clazz_declareInterface (swingjs.api, "JSInterface");
49405 Clazz_declarePackage ("swingjs.api");
49406 c$ = Clazz_declareType (swingjs.api, "Interface");
49407 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49408 function (name, isQuiet) {
49409 try {
49410 {
49411 Clazz._isQuiet = isQuiet;
49412 }System.out.println ("swingjs.api.Interface creating instance of " + name);
49413 var x = Clazz._4Name (name);
49414 {
49415 Clazz._isQuiet = false;
49416 }return (x == null ? null : x.newInstance ());
49417 } catch (e) {
49418 if (Clazz_exceptionOf (e, Exception)) {
49419 System.out.println ("Interface.java Error creating instance for " + name + ": \n" + e);
49420 return null;
49421 } else {
49422 throw e;
49423 }
49424 }
49425 }, "~S,~B");
49426 Clazz_declarePackage ("swingjs.api");
49427 c$ = Clazz_declareType (swingjs.api, "DOMNode");
49428 c$.createElement = Clazz_defineMethod (c$, "createElement", 
49429 function (key, id) {
49430 var obj = null;
49431 {
49432 obj = document.createElement(key);
49433 obj.id = id;
49434 }return obj;
49435 }, "~S,~S");
49436 c$.getParent = Clazz_defineMethod (c$, "getParent", 
49437 function (obj) {
49438 {
49439 return obj.parentNode;
49440 }}, "swingjs.api.DOMNode");
49441 c$.remove = Clazz_defineMethod (c$, "remove", 
49442 function (obj) {
49443 {
49444 try {
49445 var p = obj.parentNode;
49446 p.removeNode(obj);
49447 } catch(e) {};
49448 return p;
49449 }}, "swingjs.api.DOMNode");
49450 c$.add = Clazz_defineMethod (c$, "add", 
49451 function (parent, child) {
49452 {
49453 parent && parent.appendChild(child);
49454 }}, "swingjs.api.DOMNode,swingjs.api.DOMNode");
49455 c$.getAttr = Clazz_defineMethod (c$, "getAttr", 
49456 function (obj, attr) {
49457 {
49458 if (obj)return obj[attr];
49459 }}, "swingjs.api.DOMNode,~S");
49460 Clazz_defineMethod (c$, "getStyle", 
49461 function (style) {
49462 {
49463 if (obj)return obj.style[style];
49464 }}, "~S");
49465 c$.setAttr = Clazz_defineMethod (c$, "setAttr", 
49466 function (obj, attr, val) {
49467 {
49468 obj[attr] = (val == "TRUE" ? true : val);
49469 }return obj;
49470 }, "swingjs.api.DOMNode,~S,~O");
49471 c$.setStyles = Clazz_defineMethod (c$, "setStyles", 
49472 function (obj, attr) {
49473 {
49474 for (var i = 0; i < attr.length;) {
49475 //System.out.println(["DOMNode.setStyles ",attr[i],attr[i+1]])
49476 ;
49477 obj.style[attr[i++]] = attr[i++]; }
49478 }return obj;
49479 }, "swingjs.api.DOMNode,~A");
49480 c$.setSize = Clazz_defineMethod (c$, "setSize", 
49481 function (obj, width, height) {
49482 return swingjs.api.DOMNode.setStyles (obj, ["width", width + "px", "height", height + "px"]);
49483 }, "swingjs.api.DOMNode,~N,~N");
49484 Clazz_declarePackage ("swingjs");
49485 c$ = Clazz_declareType (swingjs, "JSUtil");
49486 c$.split = Clazz_defineMethod (c$, "split", 
49487 function (text, run) {
49488 if (text.length == 0) return  new Array (0);
49489 var n = 1;
49490 var i = text.indexOf (run);
49491 var lines;
49492 var runLen = run.length;
49493 if (i < 0 || runLen == 0) {
49494 lines =  new Array (1);
49495 lines[0] = text;
49496 return lines;
49497 }var len = text.length - runLen;
49498 for (; i >= 0 && i < len; n++) i = text.indexOf (run, i + runLen);
49499
49500 lines =  new Array (n);
49501 i = 0;
49502 var ipt = 0;
49503 var pt = 0;
49504 for (; (ipt = text.indexOf (run, i)) >= 0 && pt + 1 < n; ) {
49505 lines[pt++] = text.substring (i, ipt);
49506 i = ipt + runLen;
49507 }
49508 if (text.indexOf (run, len) != len) len += runLen;
49509 lines[pt] = text.substring (i, len);
49510 return lines;
49511 }, "~S,~S");
49512 Clazz_declarePackage ("swingjs");
49513 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 () {
49514 c$ = Clazz_decorateAsClass (function () {
49515 this.imageKit = null;
49516 Clazz_instantialize (this, arguments);
49517 }, swingjs, "JSToolkit", jssun.awt.SunToolkit);
49518 Clazz_makeConstructor (c$, 
49519 function () {
49520 Clazz_superConstructor (this, swingjs.JSToolkit);
49521 System.out.println ("JSToolkit initialized");
49522 });
49523 c$.warn = Clazz_defineMethod (c$, "warn", 
49524 function (msg) {
49525 swingjs.JSToolkit.alert (msg);
49526 }, "~S");
49527 c$.alert = Clazz_defineMethod (c$, "alert", 
49528 function (object) {
49529 {
49530 console.log("[JSToolkit] " + object);
49531 alert("[JSToolkit] " + object);
49532 }}, "~O");
49533 c$.log = Clazz_defineMethod (c$, "log", 
49534 function (msg) {
49535 {
49536 System.out.println(msg);
49537 console.log(msg);
49538 }}, "~S");
49539 c$.confirm = Clazz_defineMethod (c$, "confirm", 
49540 function (msg) {
49541 {
49542 return confirm(msg);
49543 }}, "~S");
49544 c$.prompt = Clazz_defineMethod (c$, "prompt", 
49545 function (msg, defaultRet) {
49546 {
49547 return confirm(msg, defaultRet);
49548 }}, "~S,~S");
49549 c$.getPostEventQueue = Clazz_defineMethod (c$, "getPostEventQueue", 
49550 function (isPost) {
49551 return (isPost ? jssun.awt.AppContext.getAppContext ().get ("PostEventQueue") : jssun.awt.AppContext.getAppContext ().get (jssun.awt.AppContext.EVENT_QUEUE_KEY));
49552 }, "~B");
49553 Clazz_overrideMethod (c$, "getScreenSize", 
49554 function () {
49555 var d =  new java.awt.Dimension (0, 0);
49556 var jq = swingjs.JSToolkit.getJQuery ();
49557 {
49558 d.setSize(jq.$(window).width(), jq.$(window).height()); return
49559 d;
49560 }});
49561 Clazz_overrideMethod (c$, "getScreenResolution", 
49562 function () {
49563 return 0;
49564 });
49565 Clazz_overrideMethod (c$, "getColorModel", 
49566 function () {
49567 return java.awt.image.ColorModel.getRGBdefault ();
49568 });
49569 Clazz_overrideMethod (c$, "getFontList", 
49570 function () {
49571 var hardwiredFontList =  Clazz_newArray (-1, ["SansSerif", "SansSerif", "Serif", "Monospaced", "DialogInput"]);
49572 return hardwiredFontList;
49573 });
49574 Clazz_overrideMethod (c$, "sync", 
49575 function () {
49576 });
49577 Clazz_overrideMethod (c$, "isModalExclusionTypeSupported", 
49578 function (modalExclusionType) {
49579 return true;
49580 }, "java.awt.Dialog.ModalExclusionType");
49581 Clazz_overrideMethod (c$, "isModalityTypeSupported", 
49582 function (modalityType) {
49583 return false;
49584 }, "java.awt.Dialog.ModalityType");
49585 Clazz_overrideMethod (c$, "isTraySupported", 
49586 function () {
49587 return false;
49588 });
49589 Clazz_overrideMethod (c$, "getScreenWidth", 
49590 function () {
49591 return 0;
49592 });
49593 Clazz_overrideMethod (c$, "getScreenHeight", 
49594 function () {
49595 return 0;
49596 });
49597 Clazz_overrideMethod (c$, "grab", 
49598 function (w) {
49599 }, "java.awt.Window");
49600 Clazz_overrideMethod (c$, "ungrab", 
49601 function (w) {
49602 }, "java.awt.Window");
49603 c$.getPropertyObject = Clazz_defineMethod (c$, "getPropertyObject", 
49604 function (t, key, def) {
49605 return def;
49606 }, "~O,~S,~O");
49607 c$.getInstance = Clazz_defineMethod (c$, "getInstance", 
49608 function (className) {
49609 return swingjs.api.Interface.getInstance (className, false);
49610 }, "~S");
49611 c$.getGraphicsConfiguration = Clazz_defineMethod (c$, "getGraphicsConfiguration", 
49612 function () {
49613 return (swingjs.JSToolkit.gc == null ? swingjs.JSToolkit.gc = swingjs.JSToolkit.getInstance ("swingjs.JSGraphicsConfiguration") : swingjs.JSToolkit.gc);
49614 });
49615 c$.isFocused = Clazz_defineMethod (c$, "isFocused", 
49616 function (window) {
49617 return false;
49618 }, "java.awt.Window");
49619 c$.getCSSFont = Clazz_defineMethod (c$, "getCSSFont", 
49620 function (font) {
49621 var css = "";
49622 if (font.isItalic ()) css += "font-style:italic;";
49623 if (font.isBold ()) css += "font-weight:bold;";
49624 css += "font-size:" + font.getSize () + "px;";
49625 css += "font-family:" + font.getFamily () + ";";
49626 return css;
49627 }, "java.awt.Font");
49628 c$.getStringWidth = Clazz_defineMethod (c$, "getStringWidth", 
49629 function (context, font, text) {
49630 var fontInfo = swingjs.JSToolkit.getCanvasFont (font);
49631 if (context == null) context = swingjs.JSToolkit.getDefaultCanvasContext2d ();
49632 var w = 0;
49633 {
49634 context.font = fontInfo;
49635 w = Math.ceil(context.measureText(text).width);
49636 }return w;
49637 }, "swingjs.api.HTML5CanvasContext2D,java.awt.Font,~S");
49638 c$.getDefaultCanvasContext2d = Clazz_defineMethod (c$, "getDefaultCanvasContext2d", 
49639 function () {
49640 {
49641 if (this.defaultContext == null) this.defaultContext =
49642 document.createElement( 'canvas' ).getContext('2d');
49643 }return swingjs.JSToolkit.defaultContext;
49644 });
49645 c$.getCanvasFont = Clazz_defineMethod (c$, "getCanvasFont", 
49646 function (font) {
49647 var strStyle = "";
49648 if (font.isItalic ()) strStyle += "italic ";
49649 if (font.isBold ()) strStyle += "bold ";
49650 return strStyle + font.getSize () + "px " + font.getFamily ();
49651 }, "java.awt.Font");
49652 c$.getFontFamily = Clazz_defineMethod (c$, "getFontFamily", 
49653 function (font) {
49654 return font.getName ();
49655 }, "java.awt.Font");
49656 Clazz_overrideMethod (c$, "getFontMetrics", 
49657 function (font) {
49658 var fm = swingjs.JSToolkit.getInstance ("swingjs.JSFontMetrics");
49659 fm.setFont (font);
49660 return fm;
49661 }, "java.awt.Font");
49662 c$.getCSSColor = Clazz_defineMethod (c$, "getCSSColor", 
49663 function (c) {
49664 var s = "000000" + Integer.toHexString (c.getRGB () & 0xFFFFFF);
49665 return "#" + s.substring (s.length - 6);
49666 }, "java.awt.Color");
49667 c$.notImplemented = Clazz_defineMethod (c$, "notImplemented", 
49668 function (msg) {
49669 var s = null;
49670 if (swingjs.JSToolkit.mapNotImpl == null) swingjs.JSToolkit.mapNotImpl =  new java.util.Hashtable ();
49671 {
49672 s = arguments.callee.caller; s = s.__CLASS_NAME__ ||
49673 s.claxxOwner.__CLASS_NAME__; s += "." +
49674 arguments.callee.caller.exName;
49675 }if (swingjs.JSToolkit.mapNotImpl.containsKey (s)) return;
49676 swingjs.JSToolkit.mapNotImpl.put (s, Boolean.TRUE);
49677 System.out.println (s + " has not been implemented in SwingJS. " + (msg === "" ? "" : (msg == null ? "" : msg) + swingjs.JSToolkit.getStackTrace (-5)));
49678 }, "~S");
49679 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49680 function () {
49681 {
49682 return Clazz_getStackTrace();
49683 }});
49684 c$.getStackTrace = Clazz_defineMethod (c$, "getStackTrace", 
49685 function (n) {
49686 {
49687 return Clazz_getStackTrace(n);
49688 }}, "~N");
49689 c$.getLookAndFeelDefaults = Clazz_defineMethod (c$, "getLookAndFeelDefaults", 
49690 function () {
49691 if (swingjs.JSToolkit.uid == null) swingjs.JSToolkit.uid = javax.swing.UIManager.getLookAndFeel ().getDefaults ();
49692 return swingjs.JSToolkit.uid;
49693 });
49694 c$.getComponentUI = Clazz_defineMethod (c$, "getComponentUI", 
49695 function (target) {
49696 var c = swingjs.api.Interface.getInstance ("swingjs.plaf.JS" + target.getUIClassID (), true);
49697 if (c != null) c.set (target);
49698 return c;
49699 }, "javax.swing.JComponent");
49700 c$.getSwingDivId = Clazz_defineMethod (c$, "getSwingDivId", 
49701 function () {
49702 return Thread.currentThread ().getName () + "_swingdiv";
49703 });
49704 c$.getJQuery = Clazz_defineMethod (c$, "getJQuery", 
49705 function () {
49706 {
49707 if (!window.jQuery) alert(
49708 "jQuery is required for SwingJS, but window.jQuery is not defined."
49709 ); jQuery.$ || (jQuery.$ = jQuery); return(jQuery);
49710 }});
49711 c$.getJavaResource = Clazz_defineMethod (c$, "getJavaResource", 
49712 function (resourceName) {
49713 System.out.println ("JSToolkit getting Java resource " + resourceName);
49714 {
49715 return SwingJS.getJavaResource(resourceName);
49716 }}, "~S");
49717 c$.dispatchSystemEvent = Clazz_defineMethod (c$, "dispatchSystemEvent", 
49718 function (runnable) {
49719 var f = null;
49720 {
49721 System.out.println("JST dispatchSystemEvent " +
49722 runnable.run.toString()); f =
49723 function(_JSToolkit_dispatchSystemEvent) {
49724 System.out.println("JST running " +
49725 runnable.run.toString());runnable.run()};
49726 }swingjs.JSToolkit.setTimeout (f, 0, 0);
49727 }, "Runnable");
49728 c$.dispatchEvent = Clazz_defineMethod (c$, "dispatchEvent", 
49729 function (event, src, andWait) {
49730 var f = null;
49731 var id = ++swingjs.JSToolkit.dispatchID;
49732 {
49733 f = function()
49734 {
49735 if
49736 (src == null) event.dispatch(); else src.dispatchEvent(event);
49737 };
49738 }if (andWait) swingjs.JSToolkit.invokeAndWait (f, id);
49739  else swingjs.JSToolkit.setTimeout (f, 0, id);
49740 }, "java.awt.AWTEvent,~O,~B");
49741 c$.setTimeout = Clazz_defineMethod (c$, "setTimeout", 
49742 function (f, msDelay, id) {
49743 {
49744 var thread = java.lang.Thread.thisThread;
49745 var thread0 = thread;
49746 var id0 = SwingJS.eventID || 0;
49747 setTimeout(function(_JSToolkit_setTimeout) {
49748 SwingJS.eventID = id;
49749 java.lang.Thread.thisThread = thread;
49750 try {
49751 if (f.run)
49752 f.run();
49753 else
49754 f();
49755 } catch (e) {
49756 var s = "JSToolkit.setTimeout(" + id +"): " + e;
49757 System.out.println(s);
49758 alert(s)}
49759 SwingJS.eventID = id0;
49760 java.lang.Thread.thisThread = thread0;
49761 }, msDelay);
49762 }}, "~O,~N,~N");
49763 c$.invokeAndWait = Clazz_defineMethod (c$, "invokeAndWait", 
49764  function (f, id) {
49765 {
49766 var thread = java.lang.Thread.thisThread;
49767 var thread0 = thread;
49768 (function(_JSToolkit_setTimeout) {
49769 var id0 = SwingJS.eventID || 0;
49770 System.out.println("runNow " + id); SwingJS.eventID = id;
49771 java.lang.Thread.thisThread = thread;
49772 if (f.run)
49773 f.run();
49774 else
49775 f();
49776 SwingJS.eventID = id0;
49777 java.lang.Thread.thisThread = thread0;
49778 })();
49779 }}, "swingjs.api.JSFunction,~N");
49780 c$.isDispatchThread = Clazz_defineMethod (c$, "isDispatchThread", 
49781 function () {
49782 {
49783 return (!!SwingJS.eventID);
49784 }});
49785 c$.checkClassMethod = Clazz_defineMethod (c$, "checkClassMethod", 
49786 function (component, fname, signature) {
49787 {
49788 return component[fname] && component[fname][signature];
49789 }}, "java.awt.Component,~S,~S");
49790 c$.readyCallback = Clazz_defineMethod (c$, "readyCallback", 
49791 function (aname, fname, a, me) {
49792 {
49793 Jmol._readyCallback(aname, fname, true,a, me);
49794 }}, "~S,~S,~O,~O");
49795 c$.forceRepaint = Clazz_defineMethod (c$, "forceRepaint", 
49796 function (c) {
49797 }, "java.awt.Component");
49798 c$.getHTML5Applet = Clazz_defineMethod (c$, "getHTML5Applet", 
49799 function (c) {
49800 return (c.getAppContext ().getThreadGroup ()).getHtmlApplet ();
49801 }, "javax.swing.JComponent");
49802 c$.taintUI = Clazz_defineMethod (c$, "taintUI", 
49803 function (c) {
49804 {
49805 c.getUI && c.getUI() && c.getUI().setTainted();
49806 }}, "java.awt.Component");
49807 Clazz_overrideMethod (c$, "createComponent", 
49808 function (target) {
49809 System.out.println ("JSToolkit creating LightweightPeer for " + target);
49810 var peer = swingjs.JSToolkit.getUI (target, true);
49811 return (peer == null ?  new swingjs.JSComponentPeer (target) : peer);
49812 }, "java.awt.Component");
49813 c$.getPlainDocument = Clazz_defineMethod (c$, "getPlainDocument", 
49814 function (c) {
49815 return swingjs.JSToolkit.getInstance ("swingjs.JSPlainDocument");
49816 }, "javax.swing.JComponent");
49817 c$.getClassName = Clazz_defineMethod (c$, "getClassName", 
49818 function (c) {
49819 {
49820 return c.__CLASS_NAME__;
49821 }}, "~O");
49822 c$.getSignedStreamBytes = Clazz_defineMethod (c$, "getSignedStreamBytes", 
49823 function (bis) {
49824 try {
49825 return JU.AU.ensureSignedBytes (JU.Rdr.getStreamAsBytes (bis, null));
49826 } catch (e) {
49827 if (Clazz_exceptionOf (e, java.io.IOException)) {
49828 return null;
49829 } else {
49830 throw e;
49831 }
49832 }
49833 }, "java.io.BufferedInputStream");
49834 c$.getFileContents = Clazz_defineMethod (c$, "getFileContents", 
49835 function (uri) {
49836 {
49837 return Jmol._getFileData(uri);
49838 }}, "~S");
49839 Clazz_defineMethod (c$, "getFileAsBytes", 
49840 function (filename) {
49841 var data = swingjs.JSToolkit.getFileContents (filename);
49842 var b = null;
49843 if (JU.AU.isAB (data)) b = data;
49844  else if (Clazz_instanceOf (data, String)) b = (data).getBytes ();
49845  else if (Clazz_instanceOf (data, JU.SB)) b = JU.Rdr.getBytesFromSB (data);
49846  else if (Clazz_instanceOf (data, java.io.InputStream)) try {
49847 b = JU.Rdr.getLimitedStreamBytes (data, -1);
49848 } catch (e) {
49849 if (Clazz_exceptionOf (e, java.io.IOException)) {
49850 } else {
49851 throw e;
49852 }
49853 }
49854 return JU.AU.ensureSignedBytes (b);
49855 }, "~S");
49856 Clazz_defineMethod (c$, "getImagekit", 
49857  function () {
49858 return (this.imageKit == null ? this.imageKit = swingjs.api.Interface.getInstance ("swingjs.JSImagekit", false) : this.imageKit);
49859 });
49860 Clazz_defineMethod (c$, "createImage", 
49861 function (producer) {
49862 producer.startProduction (null);
49863 return null;
49864 }, "java.awt.image.ImageProducer");
49865 Clazz_defineMethod (c$, "createImage", 
49866 function (filename) {
49867 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream ( new java.io.ByteArrayInputStream (this.getFileAsBytes (filename)))), 0, -1);
49868 }, "~S");
49869 Clazz_defineMethod (c$, "createImage", 
49870 function (url) {
49871 try {
49872 return this.getImagekit ().createImageFromBytes (swingjs.JSToolkit.getSignedStreamBytes ( new java.io.BufferedInputStream (url.openStream ())), 0, -1);
49873 } catch (e) {
49874 if (Clazz_exceptionOf (e, java.io.IOException)) {
49875 return null;
49876 } else {
49877 throw e;
49878 }
49879 }
49880 }, "java.net.URL");
49881 Clazz_defineMethod (c$, "createImage", 
49882 function (data, imageoffset, imagelength) {
49883 return this.getImagekit ().createImageFromBytes (data, imageoffset, imagelength);
49884 }, "~A,~N,~N");
49885 Clazz_overrideMethod (c$, "checkImage", 
49886 function (image, width, height, observer) {
49887 return 63;
49888 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49889 Clazz_overrideMethod (c$, "prepareImage", 
49890 function (image, width, height, observer) {
49891 return true;
49892 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
49893 c$.hasFocus = Clazz_defineMethod (c$, "hasFocus", 
49894 function (c) {
49895 var ui = swingjs.JSToolkit.getUI (c, false);
49896 return (ui != null && ui.hasFocus ());
49897 }, "java.awt.Component");
49898 c$.getUI = Clazz_defineMethod (c$, "getUI", 
49899 function (c, isQuiet) {
49900 var ui = null;
49901 {
49902 ui = c.getUI && c.getUI();
49903 }if (ui == null) {
49904 var s = "[JSToolkit] Component " + c.getClass ().getName () + " has no cooresponding JSComponentUI.";
49905 System.out.println (s);
49906 }return ui;
49907 }, "java.awt.Component,~B");
49908 c$.requestFocus = Clazz_defineMethod (c$, "requestFocus", 
49909 function (c) {
49910 var ui = swingjs.JSToolkit.getUI (c, false);
49911 if (ui == null || !ui.isFocusable ()) return false;
49912 var r = ((Clazz_isClassDefined ("swingjs.JSToolkit$1") ? 0 : swingjs.JSToolkit.$JSToolkit$1$ ()), Clazz_innerTypeInstance (swingjs.JSToolkit$1, this, Clazz_cloneFinals ("ui", ui)));
49913 swingjs.JSToolkit.setTimeout (r, 50, 0);
49914 return true;
49915 }, "java.awt.Component");
49916 c$.getCompositor = Clazz_defineMethod (c$, "getCompositor", 
49917 function () {
49918 return (swingjs.JSToolkit.compositor == null ? swingjs.JSToolkit.compositor = swingjs.api.Interface.getInstance ("swingjs.JSGraphicsCompositor", false) : swingjs.JSToolkit.compositor);
49919 });
49920 c$.setGraphicsCompositeAlpha = Clazz_defineMethod (c$, "setGraphicsCompositeAlpha", 
49921 function (g, rule) {
49922 return swingjs.JSToolkit.getCompositor ().setGraphicsCompositeAlpha (g, rule);
49923 }, "swingjs.JSGraphics2D,~N");
49924 c$.drawImageOp = Clazz_defineMethod (c$, "drawImageOp", 
49925 function (g, img, op, x, y) {
49926 return swingjs.JSToolkit.getCompositor ().drawImageOp (g, img, op, x, y);
49927 }, "swingjs.JSGraphics2D,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
49928 c$.filterRaster = Clazz_defineMethod (c$, "filterRaster", 
49929 function (src, dst, op) {
49930 return swingjs.JSToolkit.getCompositor ().filterRaster (src, dst, op);
49931 }, "java.awt.image.Raster,java.awt.image.WritableRaster,java.awt.image.RasterOp");
49932 c$.filterImage = Clazz_defineMethod (c$, "filterImage", 
49933 function (src, dst, op) {
49934 return swingjs.JSToolkit.getCompositor ().filterImage (src, dst, op);
49935 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImage,java.awt.image.BufferedImageOp");
49936 c$.getZIndex = Clazz_defineMethod (c$, "getZIndex", 
49937 function (ui, what) {
49938 {
49939 if (what) return getHTML5Applet(ui.c)._z[what];
49940 var c = ui.domNode; var z;
49941 while (c && !(z = c.style["z-index"])) {
49942 c = c.parentNode;
49943 }
49944 return z || 100000;
49945 }}, "swingjs.plaf.JSComponentUI,~S");
49946 Clazz_overrideMethod (c$, "createFrame", 
49947 function (target) {
49948 return this.createWindowPeer (target, true);
49949 }, "java.awt.Frame");
49950 Clazz_overrideMethod (c$, "createWindow", 
49951 function (target) {
49952 return this.createWindowPeer (target, false);
49953 }, "java.awt.Window");
49954 Clazz_defineMethod (c$, "createWindowPeer", 
49955  function (target, isFrame) {
49956 return (swingjs.JSToolkit.getInstance ("swingjs.JSWindowPeer")).setFrame (target, true);
49957 }, "java.awt.Window,~B");
49958 c$.$JSToolkit$1$ = function () {
49959 Clazz_pu$h(self.c$);
49960 c$ = Clazz_declareAnonymous (swingjs, "JSToolkit$1", null, Runnable);
49961 Clazz_overrideMethod (c$, "run", 
49962 function () {
49963 this.f$.ui.requestFocus (null, false, false, 0, null);
49964 });
49965 c$ = Clazz_p0p ();
49966 };
49967 Clazz_defineStatics (c$,
49968 "gc", null,
49969 "defaultContext", null,
49970 "mapNotImpl", null,
49971 "uid", null,
49972 "dispatchID", 0,
49973 "compositor", null);
49974 });
49975 Clazz_declarePackage ("swingjs");
49976 Clazz_load (["java.awt.event.InvocationEvent"], "swingjs.JSEvent", null, function () {
49977 c$ = Clazz_declareType (swingjs, "JSEvent", java.awt.event.InvocationEvent);
49978 Clazz_makeConstructor (c$, 
49979 function (t, r) {
49980 Clazz_superConstructor (this, swingjs.JSEvent, [t, 1201, r, null, false]);
49981 }, "swingjs.JSThread,Runnable");
49982 });
49983 Clazz_declarePackage ("swingjs");
49984 Clazz_load (["java.awt.FontMetrics"], "swingjs.JSFontMetrics", ["swingjs.JSToolkit"], function () {
49985 c$ = Clazz_decorateAsClass (function () {
49986 this.widths = null;
49987 this.iwidths = null;
49988 Clazz_instantialize (this, arguments);
49989 }, swingjs, "JSFontMetrics", java.awt.FontMetrics);
49990 Clazz_makeConstructor (c$, 
49991 function () {
49992 Clazz_superConstructor (this, swingjs.JSFontMetrics, [null]);
49993 });
49994 Clazz_defineMethod (c$, "setFont", 
49995 function (f) {
49996 this.font = f;
49997 }, "java.awt.Font");
49998 Clazz_overrideMethod (c$, "getLeading", 
49999 function () {
50000 return Clazz_doubleToInt (this.font.getSize () / 20) + 1;
50001 });
50002 Clazz_overrideMethod (c$, "getAscent", 
50003 function () {
50004 return this.font.getSize ();
50005 });
50006 Clazz_overrideMethod (c$, "getDescent", 
50007 function () {
50008 return Clazz_doubleToInt (this.font.getSize () / 4) + 1;
50009 });
50010 Clazz_defineMethod (c$, "charWidth", 
50011 function (pt) {
50012 return (pt.charCodeAt (0) < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt.charCodeAt (0)]) : this.stringWidth ("" + pt));
50013 }, "~S");
50014 Clazz_defineMethod (c$, "charWidth", 
50015 function (pt) {
50016 return (pt < 256 ? Clazz_floatToInt (this.getWidthsFloat ()[pt]) : this.stringWidth ("" + String.fromCharCode (pt)));
50017 }, "~N");
50018 Clazz_overrideMethod (c$, "stringWidth", 
50019 function (s) {
50020 return Clazz_floatToInt (swingjs.JSToolkit.getStringWidth (null, this.font, s));
50021 }, "~S");
50022 Clazz_overrideMethod (c$, "getWidths", 
50023 function () {
50024 if (this.iwidths != null) return this.iwidths;
50025 this.iwidths =  Clazz_newIntArray (256, 0);
50026 this.getWidthsFloat ();
50027 for (var ch = 0; ch < 256; ch++) {
50028 this.iwidths[ch] = Clazz_floatToInt (this.widths[ch]);
50029 }
50030 return this.iwidths;
50031 });
50032 Clazz_defineMethod (c$, "getWidthsFloat", 
50033 function () {
50034 if (this.widths != null) return this.widths;
50035 this.widths =  Clazz_newFloatArray (256, 0);
50036 for (var ch = 0; ch < 256; ch++) {
50037 this.widths[ch] = swingjs.JSToolkit.getStringWidth (null, this.font, "" + String.fromCharCode (ch));
50038 }
50039 return this.widths;
50040 });
50041 });
50042 Clazz_declarePackage ("swingjs");
50043 Clazz_load (["java.lang.Thread", "swingjs.api.JSFunction"], "swingjs.JSThread", null, function () {
50044 c$ = Clazz_decorateAsClass (function () {
50045 this.isJS = false;
50046 Clazz_instantialize (this, arguments);
50047 }, swingjs, "JSThread", Thread, swingjs.api.JSFunction);
50048 Clazz_makeConstructor (c$, 
50049 function (group, name) {
50050 Clazz_superConstructor (this, swingjs.JSThread, [group, name]);
50051 {
50052 this.isJS = true;
50053 }}, "ThreadGroup,~S");
50054 Clazz_overrideMethod (c$, "run", 
50055 function () {
50056 this.run1 (0);
50057 });
50058 Clazz_defineMethod (c$, "start", 
50059 function () {
50060 {
50061 swingjs.JSToolkit.setTimeout(this, 1, 0);
50062 }});
50063 Clazz_defineMethod (c$, "sleepAndReturn", 
50064 function (delay, state) {
50065 if (!this.isJS) {
50066 Thread.sleep (delay);
50067 return false;
50068 }var me = this;
50069 var r = ((Clazz_isClassDefined ("swingjs.JSThread$1") ? 0 : swingjs.JSThread.$JSThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSThread$1, this, Clazz_cloneFinals ("me", me, "state", state)));
50070 {
50071 setTimeout(
50072 function() {java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(new java.awt.event.InvocationEvent(me, r))},
50073 delay
50074 );
50075 }return true;
50076 }, "~N,~N");
50077 c$.$JSThread$1$ = function () {
50078 Clazz_pu$h(self.c$);
50079 c$ = Clazz_declareAnonymous (swingjs, "JSThread$1", null, Runnable);
50080 Clazz_overrideMethod (c$, "run", 
50081 function () {
50082 this.f$.me.run1 (this.f$.state);
50083 });
50084 c$ = Clazz_p0p ();
50085 };
50086 Clazz_defineStatics (c$,
50087 "INIT", 0,
50088 "LOOP", 1,
50089 "DONE", 2);
50090 });
50091 Clazz_declarePackage ("swingjs");
50092 Clazz_load (["java.lang.ThreadGroup"], "swingjs.JSThreadGroup", null, function () {
50093 c$ = Clazz_decorateAsClass (function () {
50094 this.html5Applet = null;
50095 Clazz_instantialize (this, arguments);
50096 }, swingjs, "JSThreadGroup", ThreadGroup);
50097 Clazz_defineMethod (c$, "setHtmlApplet", 
50098 function (html5Applet) {
50099 this.html5Applet = html5Applet;
50100 }, "swingjs.api.HTML5Applet");
50101 Clazz_defineMethod (c$, "getHtmlApplet", 
50102 function () {
50103 return this.html5Applet;
50104 });
50105 });
50106 Clazz_declarePackage ("swingjs");
50107 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 () {
50108 c$ = Clazz_decorateAsClass (function () {
50109 this.params = null;
50110 this.html5Applet = null;
50111 this.fullName = null;
50112 this.appletCodeBase = null;
50113 this.appletIdiomaBase = null;
50114 this.appletDocumentBase = null;
50115 this.maximumSize = 2147483647;
50116 this.appletName = null;
50117 this.syncId = null;
50118 this.testAsync = false;
50119 this.async = false;
50120 this.strJavaVersion = null;
50121 this.strJavaVendor = null;
50122 this.display = null;
50123 this.canvas = null;
50124 this.jsgraphics = null;
50125 this.applet = null;
50126 this.defaultAppletSize = null;
50127 this.currentAppletSize = null;
50128 this.nextStatus = 0;
50129 this.status = 0;
50130 this.listeners = null;
50131 this.mouse = null;
50132 Clazz_instantialize (this, arguments);
50133 }, swingjs, "JSAppletPanel", java.awt.Panel, [java.applet.AppletStub, java.applet.AppletContext, swingjs.api.JSInterface]);
50134 Clazz_prepareFields (c$, function () {
50135 this.defaultAppletSize =  new java.awt.Dimension (10, 10);
50136 this.currentAppletSize =  new java.awt.Dimension (10, 10);
50137 });
50138 Clazz_makeConstructor (c$, 
50139 function (params) {
50140 Clazz_superConstructor (this, swingjs.JSAppletPanel, []);
50141 this.setPanel ();
50142 this.set (params);
50143 }, "java.util.Hashtable");
50144 Clazz_defineMethod (c$, "set", 
50145  function (params) {
50146 System.out.println ("JSAppletPanel initializing");
50147 this.params = params;
50148 this.htmlName = swingjs.JSUtil.split ("" + this.getParameter ("name"), "_object")[0];
50149 this.appletName = swingjs.JSUtil.split (this.htmlName + "_", "_")[0];
50150 this.syncId = this.getParameter ("syncId");
50151 this.fullName = this.htmlName + "__" + this.syncId + "__";
50152 params.put ("fullName", this.fullName);
50153 var o = params.get ("codePath");
50154 if (o == null) o = "../java/";
50155 this.appletCodeBase = o.toString ();
50156 this.appletIdiomaBase = this.appletCodeBase.substring (0, this.appletCodeBase.lastIndexOf ("/", this.appletCodeBase.length - 2) + 1) + "idioma";
50157 o = params.get ("documentBase");
50158 this.appletDocumentBase = (o == null ? "" : o.toString ());
50159 if (params.containsKey ("maximumSize")) Math.max ((params.get ("maximumSize")).intValue (), 100);
50160 this.async = (this.testAsync || params.containsKey ("async"));
50161 var applet = null;
50162 var javaver = "?";
50163 {
50164 if(self.Jmol) { applet =
50165 Jmol._applets[this.htmlName.split("_object")[0]]; javaver =
50166 Jmol._version; }
50167 }this.html5Applet = applet;
50168 this.strJavaVersion = javaver;
50169 this.strJavaVendor = "Java2Script/Java 1.6 (HTML5)";
50170 this.display = params.get ("display");
50171 this.threadGroup =  new swingjs.JSThreadGroup (this.appletName);
50172 this.myThread =  new swingjs.JSAppletThread (this, this.threadGroup, this.appletName);
50173 (this.threadGroup).setHtmlApplet (this.html5Applet);
50174 {
50175 Jmol._applets[this.appletName + "_thread"] =
50176 java.lang.Thread.thisThread = this.myThread;
50177 }this.appContext = swingjs.JSToolkit.createNewAppContext ();
50178 java.awt.Toolkit.getDefaultToolkit ();
50179 try {
50180 java.net.URL.setURLStreamHandlerFactory (swingjs.api.Interface.getInstance ("JU.AjaxURLStreamHandlerFactory", false));
50181 } catch (e) {
50182 }
50183 System.out.println ("JSAppletPanel initialized");
50184 }, "java.util.Hashtable");
50185 Clazz_defineMethod (c$, "start", 
50186 function () {
50187 if (this.status == 0) this.myThread.start ();
50188  else this.showStatus ("already started");
50189 });
50190 Clazz_defineMethod (c$, "addAppletListener", 
50191 function (l) {
50192 this.listeners = jssun.applet.AppletEventMulticaster.add (this.listeners, l);
50193 }, "jssun.applet.AppletListener");
50194 Clazz_defineMethod (c$, "removeAppletListener", 
50195 function (l) {
50196 this.listeners = jssun.applet.AppletEventMulticaster.remove (this.listeners, l);
50197 }, "jssun.applet.AppletListener");
50198 Clazz_defineMethod (c$, "dispatchAppletEvent", 
50199 function (id, argument) {
50200 if (this.listeners != null) {
50201 var evt =  new jssun.applet.AppletEvent (this, id, argument);
50202 this.listeners.appletStateChanged (evt);
50203 }}, "~N,~O");
50204 Clazz_defineMethod (c$, "getCode", 
50205  function () {
50206 return this.getParameter ("code");
50207 });
50208 Clazz_defineMethod (c$, "getCanvas", 
50209  function () {
50210 return (this.canvas == null ? (this.canvas = this.html5Applet._getHtml5Canvas ()) : this.canvas);
50211 });
50212 Clazz_overrideMethod (c$, "isActive", 
50213 function () {
50214 return true;
50215 });
50216 Clazz_overrideMethod (c$, "appletResize", 
50217 function (width, height) {
50218 var currentSize =  new java.awt.Dimension (this.currentAppletSize.width, this.currentAppletSize.height);
50219 this.currentAppletSize.width = width;
50220 this.currentAppletSize.height = height;
50221 this.applet.setBounds (0, 0, this.getWidth (), this.getHeight ());
50222 this.applet.getRootPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50223 this.applet.getContentPane ().setBounds (0, 0, this.getWidth (), this.getHeight ());
50224 (this.applet.getContentPane ()).revalidate ();
50225 this.dispatchAppletEvent (51234, currentSize);
50226 }, "~N,~N");
50227 Clazz_overrideMethod (c$, "getDocumentBase", 
50228 function () {
50229 try {
50230 return  new java.net.URL (this.params.get ("documentBase"));
50231 } catch (e) {
50232 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50233 return null;
50234 } else {
50235 throw e;
50236 }
50237 }
50238 });
50239 Clazz_overrideMethod (c$, "getCodeBase", 
50240 function () {
50241 try {
50242 return  new java.net.URL (this.params.get ("codePath"));
50243 } catch (e) {
50244 if (Clazz_exceptionOf (e, java.net.MalformedURLException)) {
50245 return null;
50246 } else {
50247 throw e;
50248 }
50249 }
50250 });
50251 Clazz_overrideMethod (c$, "getParameter", 
50252 function (name) {
50253 var s = this.params.get (name);
50254 System.out.println ("get parameter: " + name + " = " + s);
50255 return (s == null ? null : "" + s);
50256 }, "~S");
50257 Clazz_overrideMethod (c$, "getAppletContext", 
50258 function () {
50259 return this;
50260 });
50261 Clazz_defineMethod (c$, "getHeight", 
50262 function () {
50263 return this.html5Applet._getHeight ();
50264 });
50265 Clazz_defineMethod (c$, "getWidth", 
50266 function () {
50267 return this.html5Applet._getWidth ();
50268 });
50269 Clazz_defineMethod (c$, "setBounds", 
50270 function (x, y, width, height) {
50271 this.reshape (x, y, width, height);
50272 this.currentAppletSize.width = width;
50273 this.currentAppletSize.height = height;
50274 }, "~N,~N,~N,~N");
50275 Clazz_overrideMethod (c$, "getImage", 
50276 function (url) {
50277 return null;
50278 }, "java.net.URL");
50279 Clazz_overrideMethod (c$, "getApplet", 
50280 function (name) {
50281 var applet = null;
50282 {
50283 applet = Jmol._applets[name]; applet && (applet =
50284 applet._applet);
50285 }return applet;
50286 }, "~S");
50287 Clazz_overrideMethod (c$, "getApplets", 
50288 function () {
50289 return null;
50290 });
50291 Clazz_defineMethod (c$, "showDocument", 
50292 function (url) {
50293 {
50294 window.open(url.toString());
50295 }}, "java.net.URL");
50296 Clazz_defineMethod (c$, "showDocument", 
50297 function (url, target) {
50298 {
50299 window.open(url.toString(), target);
50300 }}, "java.net.URL,~S");
50301 Clazz_defineMethod (c$, "showStatus", 
50302 function (status) {
50303 swingjs.JSToolkit.log (status);
50304 {
50305 Clazz._LoaderProgressMonitor.showStatus(status, true);
50306 }}, "~S");
50307 Clazz_overrideMethod (c$, "cacheFileByName", 
50308 function (fileName, isAdd) {
50309 return 0;
50310 }, "~S,~B");
50311 Clazz_overrideMethod (c$, "cachePut", 
50312 function (key, data) {
50313 }, "~S,~O");
50314 Clazz_overrideMethod (c$, "destroy", 
50315 function () {
50316 });
50317 Clazz_overrideMethod (c$, "getFullName", 
50318 function () {
50319 return this.fullName;
50320 });
50321 Clazz_overrideMethod (c$, "openFileAsyncSpecial", 
50322 function (fileName, flags) {
50323 }, "~S,~N");
50324 Clazz_defineMethod (c$, "processMouseEvent", 
50325 function (id, x, y, modifiers, time) {
50326 this.getMouse ().processEvent (id, x, y, modifiers, time);
50327 return false;
50328 }, "~N,~N,~N,~N,~N");
50329 Clazz_defineMethod (c$, "getMouse", 
50330  function () {
50331 return (this.mouse == null ? this.mouse =  new swingjs.JSMouse (this) : this.mouse);
50332 });
50333 Clazz_overrideMethod (c$, "processTwoPointGesture", 
50334 function (touches) {
50335 this.getMouse ().processTwoPointGesture (touches);
50336 }, "~A");
50337 Clazz_overrideMethod (c$, "setDisplay", 
50338 function (canvas) {
50339 this.canvas = canvas;
50340 }, "swingjs.api.HTML5Canvas");
50341 Clazz_overrideMethod (c$, "setScreenDimension", 
50342 function (width, height) {
50343 this.setGraphics (this.jsgraphics = null);
50344 if (this.applet != null) this.applet.resize (width, height);
50345 }, "~N,~N");
50346 Clazz_overrideMethod (c$, "setStatusDragDropped", 
50347 function (mode, x, y, fileName) {
50348 return false;
50349 }, "~N,~N,~N,~S");
50350 Clazz_overrideMethod (c$, "startHoverWatcher", 
50351 function (enable) {
50352 }, "~B");
50353 Clazz_overrideMethod (c$, "paint", 
50354 function (g) {
50355 this.applet.paint (this.setGraphics (g));
50356 }, "java.awt.Graphics");
50357 Clazz_defineMethod (c$, "setGraphics", 
50358  function (g) {
50359 return (g == null ? this.getGraphics () : g);
50360 }, "java.awt.Graphics");
50361 Clazz_overrideMethod (c$, "getGraphics", 
50362 function () {
50363 if (this.jsgraphics == null) {
50364 this.jsgraphics =  new swingjs.JSGraphics2D (this.getCanvas ());
50365 this.jsgraphics.setWindowParameters (this.getWidth (), this.getHeight ());
50366 }return this.jsgraphics;
50367 });
50368 Clazz_defineMethod (c$, "showAppletStatus", 
50369  function (status) {
50370 this.getAppletContext ().showStatus (this.htmlName + " " + status);
50371 }, "~S");
50372 Clazz_defineMethod (c$, "showAppletException", 
50373  function (t) {
50374 {
50375 this.showAppletStatus("error " + (t.getMessage ?
50376 t.getMessage() : t)); t.printStackTrace &&
50377 t.printStackTrace();
50378 }this.repaint ();
50379 }, "Throwable");
50380 Clazz_defineMethod (c$, "run1", 
50381 function (mode) {
50382 var ok = false;
50383 switch (mode) {
50384 case 0:
50385 this.currentAppletSize.width = this.defaultAppletSize.width = this.getWidth ();
50386 this.currentAppletSize.height = this.defaultAppletSize.height = this.getHeight ();
50387 this.setLayout ( new java.awt.BorderLayout ());
50388 this.nextStatus = 1;
50389 ok = true;
50390 break;
50391 case 1:
50392 switch (this.nextStatus) {
50393 case 1:
50394 if (this.status != 0) {
50395 this.showAppletStatus ("notdisposed");
50396 this.status = 7;
50397 break;
50398 }System.out.println ("JSAppletPanel runloader");
50399 this.runLoader ();
50400 this.nextStatus = 2;
50401 ok = true;
50402 break;
50403 case 2:
50404 if (this.status != 1 && this.status != 5) {
50405 this.showAppletStatus ("notloaded");
50406 break;
50407 }System.out.println ("JSAppletPanel init");
50408 this.setFont ( new java.awt.Font ("Dialog", 0, 12));
50409 this.applet.resize (this.defaultAppletSize);
50410 this.applet.init ();
50411 this.validate ();
50412 this.status = 2;
50413 this.showAppletStatus ("initialized");
50414 this.nextStatus = 3;
50415 ok = true;
50416 break;
50417 case 3:
50418 if (this.status != 2 && this.status != 4) {
50419 this.showAppletStatus ("notstarted");
50420 this.status = 7;
50421 break;
50422 }this.applet.getRootPane ().addNotify ();
50423 System.out.println ("JSAppletPanel start" + this.currentAppletSize);
50424 this.applet.resize (this.currentAppletSize);
50425 this.applet.start ();
50426 this.status = 3;
50427 this.showAppletStatus ("started");
50428 this.nextStatus = 35;
50429 ok = true;
50430 break;
50431 case 35:
50432 swingjs.JSToolkit.readyCallback (this.appletName, this.fullName, this.applet, this);
50433 break;
50434 case 4:
50435 if (this.status == 3) {
50436 this.status = 4;
50437 this.applet.setVisible (false);
50438 this.applet.stop ();
50439 this.showAppletStatus ("stopped");
50440 } else {
50441 this.showAppletStatus ("notstopped");
50442 this.status = 7;
50443 }break;
50444 case 5:
50445 if (this.status == 4 || this.status == 2) {
50446 this.status = 5;
50447 this.applet.destroy ();
50448 this.showAppletStatus ("destroyed");
50449 } else {
50450 this.showAppletStatus ("notdestroyed");
50451 this.status = 7;
50452 }break;
50453 case 75:
50454 if (this.status == 5 || this.status == 1) {
50455 this.showAppletStatus ("notdisposed");
50456 this.status = 7;
50457 } else {
50458 this.status = 0;
50459 this.removeChild (this.applet);
50460 this.applet = null;
50461 this.showAppletStatus ("disposed");
50462 }break;
50463 case 6:
50464 break;
50465 default:
50466 System.out.println ("unrecognized JSAppletPanel status: " + this.nextStatus);
50467 break;
50468 }
50469 break;
50470 default:
50471 System.out.println ("unrecognized JSAppletThread mode: " + mode);
50472 break;
50473 }
50474 return (ok ? 1 : 2);
50475 }, "~N");
50476 Clazz_defineMethod (c$, "runLoader", 
50477  function () {
50478 this.dispatchAppletEvent (51235, null);
50479 this.status = 1;
50480 var code = this.getCode ();
50481 try {
50482 if (code == null) {
50483 System.err.println ("runloader.err-- \"code\" must be specified.");
50484 throw  new InstantiationException ("\"code\" must be specified.");
50485 }this.applet = swingjs.JSToolkit.getInstance (code);
50486 if (this.applet == null) {
50487 System.out.println (code + " could not be launched");
50488 this.status = 7;
50489 } else if (!(Clazz_instanceOf (this.applet, javax.swing.JApplet))) {
50490 System.out.println (code + " is not a JApplet!?");
50491 this.status = 7;
50492 }} catch (e$$) {
50493 if (Clazz_exceptionOf (e$$, InstantiationException)) {
50494 var e = e$$;
50495 {
50496 this.status = 7;
50497 this.showAppletException (e);
50498 return;
50499 }
50500 } else if (Clazz_exceptionOf (e$$, Exception)) {
50501 var e = e$$;
50502 {
50503 this.status = 7;
50504 this.showAppletException (e);
50505 return;
50506 }
50507 } else if (Clazz_exceptionOf (e$$, ThreadDeath)) {
50508 var e = e$$;
50509 {
50510 this.status = 7;
50511 this.showAppletStatus ("death");
50512 return;
50513 }
50514 } else if (Clazz_exceptionOf (e$$, Error)) {
50515 var e = e$$;
50516 {
50517 this.status = 7;
50518 this.showAppletException (e);
50519 return;
50520 }
50521 } else {
50522 throw e$$;
50523 }
50524 } finally {
50525 this.dispatchAppletEvent (51236, null);
50526 }
50527 if (this.applet != null) {
50528 this.applet.setStub (this);
50529 this.applet.setVisible (false);
50530 this.add ("Center", this.applet);
50531 this.applet.setDispatcher ();
50532 this.applet.addNotify ();
50533 this.showAppletStatus ("loaded");
50534 this.validate ();
50535 }});
50536 Clazz_defineMethod (c$, "getUI", 
50537 function () {
50538 return null;
50539 });
50540 Clazz_overrideMethod (c$, "repaintImpl", 
50541 function (tm, x, y, width, height) {
50542 if (this.applet.isVisible () && this.applet.getWidth () > 0 && this.applet.getHeight () > 0) {
50543 this.applet.getContentPane ().repaint (tm, x, y, width, height);
50544 }}, "~N,~N,~N,~N,~N");
50545 Clazz_defineStatics (c$,
50546 "APPLET_UNINITIALIZED", 0,
50547 "APPLET_LOAD", 1,
50548 "APPLET_INIT", 2,
50549 "APPLET_START", 3,
50550 "APPLET_READY", 35,
50551 "APPLET_STOP", 4,
50552 "APPLET_DESTROY", 5,
50553 "APPLET_QUIT", 6,
50554 "APPLET_ERROR", 7,
50555 "APPLET_DISPOSE", 75,
50556 "APPLET_RESIZE", 51234,
50557 "APPLET_LOADING", 51235,
50558 "APPLET_LOADING_COMPLETED", 51236);
50559 });
50560 Clazz_declarePackage ("swingjs");
50561 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 () {
50562 c$ = Clazz_decorateAsClass (function () {
50563 this.constrainX = 0;
50564 this.constrainY = 0;
50565 this.windowWidth = 0;
50566 this.windowHeight = 0;
50567 this.canvas = null;
50568 this.ctx = null;
50569 this.gc = null;
50570 this.paintState = 0;
50571 this.compositeState = -2147483648;
50572 this.strokeState = 0;
50573 this.$transformState = 0;
50574 this.clipState = 0;
50575 this.isShifted = false;
50576 this.font = null;
50577 this.inPath = false;
50578 this.currentClip = null;
50579 Clazz_instantialize (this, arguments);
50580 }, swingjs, "JSGraphics2D", jssun.java2d.SunGraphics2D, Cloneable);
50581 Clazz_makeConstructor (c$, 
50582 function (canvas) {
50583 Clazz_superConstructor (this, swingjs.JSGraphics2D, []);
50584 this.hints =  new java.awt.RenderingHints ( new java.util.HashMap ());
50585 this.canvas = canvas;
50586 this.ctx = this.canvas.getContext ("2d");
50587 this.$transform =  new java.awt.geom.AffineTransform ();
50588 {
50589 this.gc = SwingJS;
50590 }}, "~O");
50591 Clazz_overrideMethod (c$, "getDeviceConfiguration", 
50592 function () {
50593 return this.gc;
50594 });
50595 Clazz_overrideMethod (c$, "drawLine", 
50596 function (x0, y0, x1, y1) {
50597 var inPath = this.inPath;
50598 if (!inPath) this.ctx.beginPath ();
50599 this.ctx.moveTo (x0, y0);
50600 this.ctx.lineTo (x1, y1);
50601 if (!inPath) this.ctx.stroke ();
50602 }, "~N,~N,~N,~N");
50603 Clazz_defineMethod (c$, "drawCircle", 
50604 function (x, y, diameter) {
50605 this.drawArc (x, y, diameter, diameter, 0, 360);
50606 }, "~N,~N,~N");
50607 Clazz_overrideMethod (c$, "fillArc", 
50608 function (x, y, width, height, startAngle, arcAngle) {
50609 this.doArc (x, y, width, height, startAngle, arcAngle, true);
50610 }, "~N,~N,~N,~N,~N,~N");
50611 Clazz_overrideMethod (c$, "drawArc", 
50612 function (x, y, width, height, startAngle, arcAngle) {
50613 this.doArc (x, y, width, height, startAngle, arcAngle, false);
50614 }, "~N,~N,~N,~N,~N,~N");
50615 Clazz_defineMethod (c$, "save", 
50616  function () {
50617 this.ctx.save ();
50618 });
50619 Clazz_defineMethod (c$, "restore", 
50620  function () {
50621 this.ctx.restore ();
50622 });
50623 Clazz_defineMethod (c$, "doArc", 
50624  function (x, y, width, height, startAngle, arcAngle, fill) {
50625 var isCircle = (arcAngle - startAngle == 360);
50626 this.save ();
50627 this.ctx.translate (x, y);
50628 this.ctx.scale (Clazz_doubleToInt (width / height), height);
50629 this.ctx.beginPath ();
50630 if (fill) {
50631 }this.ctx.arc (0.5, 0.5, 0.5, this.toRad (startAngle), this.toRad (arcAngle), false);
50632 if (isCircle) this.ctx.closePath ();
50633 this.ctx.stroke ();
50634 this.restore ();
50635 }, "~N,~N,~N,~N,~N,~N,~B");
50636 Clazz_defineMethod (c$, "toRad", 
50637  function (a) {
50638 return a * 3.141592653589793 / 180;
50639 }, "~N");
50640 Clazz_defineMethod (c$, "drawPolygon", 
50641 function (ayPoints, axPoints, nPoints) {
50642 this.doPoly (ayPoints, axPoints, nPoints, false);
50643 }, "~A,~A,~N");
50644 Clazz_defineMethod (c$, "doPoly", 
50645  function (axPoints, ayPoints, nPoints, doFill) {
50646 this.ctx.beginPath ();
50647 this.ctx.moveTo (axPoints[0], ayPoints[0]);
50648 for (var i = 1; i < nPoints; i++) this.ctx.lineTo (axPoints[i], ayPoints[i]);
50649
50650 if (doFill) this.ctx.fill ();
50651  else this.ctx.stroke ();
50652 }, "~A,~A,~N,~B");
50653 Clazz_overrideMethod (c$, "drawRect", 
50654 function (x, y, width, height) {
50655 this.ctx.beginPath ();
50656 this.ctx.rect (x, y, width, height);
50657 this.ctx.stroke ();
50658 }, "~N,~N,~N,~N");
50659 Clazz_defineMethod (c$, "drawString", 
50660 function (s, x, y) {
50661 this.ctx.fillText (s, x, y);
50662 }, "~S,~N,~N");
50663 Clazz_defineMethod (c$, "background", 
50664 function (bgcolor) {
50665 this.backgroundColor = bgcolor;
50666 if (bgcolor == null) {
50667 if (!this.isShifted) this.ctx.translate (-0.5, -0.5);
50668 this.isShifted = true;
50669 return;
50670 }this.ctx.clearRect (0, 0, this.windowWidth, this.windowHeight);
50671 this.setGraphicsColor (bgcolor);
50672 this.fillRect (0, 0, this.windowWidth, this.windowHeight);
50673 }, "java.awt.Color");
50674 Clazz_defineMethod (c$, "fillCircle", 
50675 function (x, y, diameter) {
50676 var r = diameter / 2;
50677 this.ctx.beginPath ();
50678 this.ctx.arc (x + r, y + r, r, 0, 6.283185307179586, false);
50679 this.ctx.fill ();
50680 }, "~N,~N,~N");
50681 Clazz_defineMethod (c$, "fillPolygon", 
50682 function (ayPoints, axPoints, nPoints) {
50683 this.doPoly (ayPoints, axPoints, nPoints, true);
50684 }, "~A,~A,~N");
50685 Clazz_overrideMethod (c$, "fillRect", 
50686 function (x, y, width, height) {
50687 this.ctx.fillRect (x, y, width, height);
50688 }, "~N,~N,~N,~N");
50689 Clazz_defineMethod (c$, "setGraphicsColor", 
50690 function (c) {
50691 var s = swingjs.JSToolkit.getCSSColor (c);
50692 {
50693 this.ctx.fillStyle = s; this.ctx.strokeStyle = s;
50694 }}, "java.awt.Color");
50695 Clazz_overrideMethod (c$, "setFont", 
50696 function (font) {
50697 this.font = font;
50698 if (this.ctx == null) return;
50699 var s = swingjs.JSToolkit.getCanvasFont (font);
50700 {
50701 this.ctx.font = s;
50702 }}, "java.awt.Font");
50703 Clazz_defineMethod (c$, "setStrokeBold", 
50704 function (tf) {
50705 this.setLineWidth (tf ? 2. : 1.);
50706 }, "~B");
50707 Clazz_defineMethod (c$, "setLineWidth", 
50708  function (d) {
50709 {
50710 this.ctx.lineWidth = d;
50711 }}, "~N");
50712 Clazz_defineMethod (c$, "setWindowParameters", 
50713 function (width, height) {
50714 this.windowWidth = width;
50715 this.windowHeight = height;
50716 }, "~N,~N");
50717 Clazz_defineMethod (c$, "canDoLineTo", 
50718 function () {
50719 return true;
50720 });
50721 Clazz_defineMethod (c$, "doStroke", 
50722 function (isBegin) {
50723 this.inPath = isBegin;
50724 if (isBegin) {
50725 this.ctx.beginPath ();
50726 } else {
50727 this.ctx.stroke ();
50728 }}, "~B");
50729 Clazz_defineMethod (c$, "lineTo", 
50730 function (x2, y2) {
50731 this.ctx.lineTo (x2, y2);
50732 }, "~N,~N");
50733 Clazz_overrideMethod (c$, "clip", 
50734 function (s) {
50735 this.doShape (s);
50736 this.ctx.clip ();
50737 }, "java.awt.Shape");
50738 Clazz_overrideMethod (c$, "draw", 
50739 function (s) {
50740 this.doShape (s);
50741 this.ctx.stroke ();
50742 }, "java.awt.Shape");
50743 Clazz_defineMethod (c$, "doShape", 
50744  function (s) {
50745 this.ctx.beginPath ();
50746 var pts =  Clazz_newDoubleArray (6, 0);
50747 var pi = s.getPathIterator (null);
50748 while (!pi.isDone ()) {
50749 switch (pi.currentSegment (pts)) {
50750 case 0:
50751 this.ctx.moveTo (pts[0], pts[1]);
50752 break;
50753 case 1:
50754 this.ctx.lineTo (pts[0], pts[1]);
50755 break;
50756 case 2:
50757 this.ctx.quadraticCurveTo (pts[0], pts[1], pts[2], pts[3]);
50758 break;
50759 case 3:
50760 this.ctx.bezeierCurveTo (pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
50761 break;
50762 case 4:
50763 this.ctx.closePath ();
50764 break;
50765 }
50766 pi.next ();
50767 }
50768 return pi.getWindingRule ();
50769 }, "java.awt.Shape");
50770 Clazz_overrideMethod (c$, "fill", 
50771 function (s) {
50772 if (this.doShape (s) == 0) {
50773 this.ctx.fill("evenodd");
50774 } else this.ctx.fill ();
50775 }, "java.awt.Shape");
50776 Clazz_defineMethod (c$, "drawImage", 
50777 function (img, x, y, observer) {
50778 System.out.println ("JSGraphics testing draw image");
50779 this.drawString ("JSGraphics testing draw img", 50, 50);
50780 if (img != null) {
50781 var imgNode = this.getImageNode (img);
50782 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, img.getWidth (observer), img.getHeight (observer));
50783 if (observer != null) this.observe (img, observer, imgNode != null);
50784 }return true;
50785 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
50786 Clazz_defineMethod (c$, "observe", 
50787  function (img, observer, isOK) {
50788 observer.imageUpdate (img, (isOK ? 0 : 192), -1, -1, -1, -1);
50789 }, "java.awt.Image,java.awt.image.ImageObserver,~B");
50790 Clazz_defineMethod (c$, "drawImage", 
50791 function (img, x, y, width, height, observer) {
50792 if (img != null) {
50793 var imgNode = this.getImageNode (img);
50794 if (imgNode != null) this.ctx.drawImage (imgNode, x, y, width, height);
50795 if (observer != null) this.observe (img, observer, imgNode != null);
50796 }return true;
50797 }, "java.awt.Image,~N,~N,~N,~N,java.awt.image.ImageObserver");
50798 Clazz_defineMethod (c$, "drawImage", 
50799 function (img, x, y, bgcolor, observer) {
50800 swingjs.JSToolkit.notImplemented (null);
50801 return this.drawImage (img, x, y, null);
50802 }, "java.awt.Image,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50803 Clazz_defineMethod (c$, "drawImage", 
50804 function (img, x, y, width, height, bgcolor, observer) {
50805 swingjs.JSToolkit.notImplemented (null);
50806 return this.drawImage (img, x, y, width, height, null);
50807 }, "java.awt.Image,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50808 Clazz_defineMethod (c$, "drawImage", 
50809 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer) {
50810 if (img != null) {
50811 var imgNode = this.getImageNode (img);
50812 if (imgNode != null) swingjs.api.HTML5CanvasContext2D.stretchImage (this.ctx, imgNode, sx1, sy1, sx2 - sx1, sy2 - sy1, dx1, dy1, dx2 - dx1, dy2 - dy1);
50813 if (observer != null) this.observe (img, observer, imgNode != null);
50814 }return true;
50815 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.image.ImageObserver");
50816 Clazz_defineMethod (c$, "getImageNode", 
50817  function (img) {
50818 var imgNode = null;
50819 {
50820 imgNode = img._imgNode;
50821 }if (imgNode == null) imgNode = swingjs.JSToolkit.getCompositor ().createImageNode (img);
50822 return imgNode;
50823 }, "java.awt.Image");
50824 Clazz_defineMethod (c$, "drawImage", 
50825 function (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, bgcolor, observer) {
50826 swingjs.JSToolkit.notImplemented (null);
50827 return this.drawImage (img, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, observer);
50828 }, "java.awt.Image,~N,~N,~N,~N,~N,~N,~N,~N,java.awt.Color,java.awt.image.ImageObserver");
50829 Clazz_defineMethod (c$, "drawImage", 
50830 function (img, xform, obs) {
50831 swingjs.JSToolkit.notImplemented (null);
50832 return false;
50833 }, "java.awt.Image,java.awt.geom.AffineTransform,java.awt.image.ImageObserver");
50834 Clazz_overrideMethod (c$, "drawRenderedImage", 
50835 function (img, xform) {
50836 swingjs.JSToolkit.notImplemented (null);
50837 }, "java.awt.image.RenderedImage,java.awt.geom.AffineTransform");
50838 Clazz_overrideMethod (c$, "drawRenderableImage", 
50839 function (img, xform) {
50840 swingjs.JSToolkit.notImplemented (null);
50841 }, "java.awt.image.renderable.RenderableImage,java.awt.geom.AffineTransform");
50842 Clazz_overrideMethod (c$, "hit", 
50843 function (rect, s, onStroke) {
50844 swingjs.JSToolkit.notImplemented (null);
50845 return false;
50846 }, "java.awt.Rectangle,java.awt.Shape,~B");
50847 Clazz_overrideMethod (c$, "setPaint", 
50848 function (paint) {
50849 swingjs.JSToolkit.notImplemented (null);
50850 }, "java.awt.Paint");
50851 Clazz_overrideMethod (c$, "setStroke", 
50852 function (s) {
50853 if (!(Clazz_instanceOf (s, java.awt.BasicStroke))) return;
50854 var b = s;
50855 var dash = b.getDashArray ();
50856 var idash =  Clazz_newIntArray (dash == null ? 0 : dash.length, 0);
50857 for (var i = idash.length; --i >= 0; ) idash[i] = Clazz_floatToInt (dash[i]);
50858
50859 this.ctx.setLineDash (idash);
50860 this.setLineWidth (b.getLineWidth ());
50861 var lineCap;
50862 var lineJoin;
50863 var miterLimit = -1;
50864 switch (b.getEndCap ()) {
50865 case 0:
50866 lineCap = "butt";
50867 break;
50868 case 2:
50869 lineCap = "square";
50870 break;
50871 case 1:
50872 default:
50873 lineCap = "round";
50874 }
50875 switch (b.getLineJoin ()) {
50876 case 2:
50877 lineJoin = "bevel";
50878 break;
50879 case 0:
50880 lineJoin = "miter";
50881 miterLimit = b.getMiterLimit ();
50882 break;
50883 case 1:
50884 lineJoin = "round";
50885 }
50886 {
50887 this.ctx.lineCap = lineCap; this.ctx.lineJoin = lineJoin; if
50888 (miterLimit >= 0) this.ctx.miterLimit = miterLimit;
50889 }}, "java.awt.Stroke");
50890 Clazz_overrideMethod (c$, "setRenderingHint", 
50891 function (hintKey, hintValue) {
50892 this.hints.put (hintKey, hintValue);
50893 }, "java.awt.RenderingHints.Key,~O");
50894 Clazz_overrideMethod (c$, "getRenderingHint", 
50895 function (hintKey) {
50896 return this.hints.get (hintKey);
50897 }, "java.awt.RenderingHints.Key");
50898 Clazz_overrideMethod (c$, "setRenderingHints", 
50899 function (hints) {
50900 this.hints =  new java.awt.RenderingHints (hints);
50901 }, "java.util.Map");
50902 Clazz_overrideMethod (c$, "addRenderingHints", 
50903 function (hints) {
50904 for (var e, $e = hints.entrySet ().iterator (); $e.hasNext () && ((e = $e.next ()) || true);) this.hints.put (e.getKey (), e.getValue ());
50905
50906 }, "java.util.Map");
50907 Clazz_overrideMethod (c$, "getRenderingHints", 
50908 function () {
50909 return this.hints;
50910 });
50911 Clazz_defineMethod (c$, "translate", 
50912 function (x, y) {
50913 this.ctx.translate (x, y);
50914 }, "~N,~N");
50915 Clazz_overrideMethod (c$, "scale", 
50916 function (sx, sy) {
50917 this.ctx.scale (sx, sy);
50918 }, "~N,~N");
50919 Clazz_overrideMethod (c$, "setBackground", 
50920 function (color) {
50921 this.background (color);
50922 }, "java.awt.Color");
50923 Clazz_overrideMethod (c$, "getBackground", 
50924 function () {
50925 return this.backgroundColor;
50926 });
50927 Clazz_overrideMethod (c$, "createSwingJS", 
50928 function () {
50929 return this.clone ();
50930 });
50931 Clazz_overrideMethod (c$, "clone", 
50932 function () {
50933 this.save ();
50934 return this.clone0 ();
50935 });
50936 Clazz_overrideMethod (c$, "dispose", 
50937 function () {
50938 if (this.compositeState >= 0) this.setComposite (null);
50939 this.restore ();
50940 });
50941 Clazz_overrideMethod (c$, "getColor", 
50942 function () {
50943 return this.foregroundColor;
50944 });
50945 Clazz_overrideMethod (c$, "setColor", 
50946 function (c) {
50947 this.foregroundColor = c;
50948 this.setGraphicsColor (c);
50949 }, "java.awt.Color");
50950 Clazz_overrideMethod (c$, "getFont", 
50951 function () {
50952 return this.font;
50953 });
50954 Clazz_defineMethod (c$, "getFontMetrics", 
50955 function (f) {
50956 return java.awt.Toolkit.getDefaultToolkit ().getFontMetrics (f);
50957 }, "java.awt.Font");
50958 Clazz_overrideMethod (c$, "clipRect", 
50959 function (x, y, width, height) {
50960 this.ctx.beginPath ();
50961 this.ctx.rect (x, y, width, height);
50962 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
50963 this.ctx.clip ();
50964 }, "~N,~N,~N,~N");
50965 Clazz_defineMethod (c$, "setClip", 
50966 function (x, y, width, height) {
50967 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
50968 {
50969 if (arguments.length == 1) { setClip1(x); return; }
50970 }this.ctx.beginPath ();
50971 this.ctx.rect (x, y, width, height);
50972 this.currentClip =  new java.awt.Rectangle (x, y, width, height);
50973 this.ctx.clip ();
50974 }, "~N,~N,~N,~N");
50975 Clazz_defineMethod (c$, "setClip1", 
50976 function (clip) {
50977 this.ctx.beginPath ();
50978 this.doShape (clip);
50979 this.ctx.clip ();
50980 }, "java.awt.Shape");
50981 Clazz_overrideMethod (c$, "clearRect", 
50982 function (x, y, width, height) {
50983 this.ctx.clearRect (x, y, width, height);
50984 }, "~N,~N,~N,~N");
50985 Clazz_overrideMethod (c$, "drawPolyline", 
50986 function (xPoints, yPoints, nPoints) {
50987 if (nPoints < 2) return;
50988 this.ctx.moveTo (xPoints[0], yPoints[0]);
50989 for (var i = 1; i < nPoints; i++) {
50990 this.ctx.lineTo (xPoints[i], yPoints[i]);
50991 }
50992 }, "~A,~A,~N");
50993 Clazz_overrideMethod (c$, "copyArea", 
50994 function (x, y, width, height, dx, dy) {
50995 swingjs.JSToolkit.notImplemented (null);
50996 }, "~N,~N,~N,~N,~N,~N");
50997 Clazz_overrideMethod (c$, "drawRoundRect", 
50998 function (x, y, width, height, arcWidth, arcHeight) {
50999 swingjs.JSToolkit.notImplemented (null);
51000 this.drawRect (x, y, width, height);
51001 }, "~N,~N,~N,~N,~N,~N");
51002 Clazz_overrideMethod (c$, "fillRoundRect", 
51003 function (x, y, width, height, arcWidth, arcHeight) {
51004 swingjs.JSToolkit.notImplemented (null);
51005 this.fillRect (x, y, width, height);
51006 }, "~N,~N,~N,~N,~N,~N");
51007 Clazz_overrideMethod (c$, "drawOval", 
51008 function (x, y, width, height) {
51009 swingjs.JSToolkit.notImplemented (null);
51010 }, "~N,~N,~N,~N");
51011 Clazz_overrideMethod (c$, "fillOval", 
51012 function (x, y, width, height) {
51013 swingjs.JSToolkit.notImplemented (null);
51014 }, "~N,~N,~N,~N");
51015 Clazz_overrideMethod (c$, "getClip", 
51016 function () {
51017 swingjs.JSToolkit.notImplemented (null);
51018 return null;
51019 });
51020 Clazz_overrideMethod (c$, "drawStringTrans", 
51021 function (str, x, y) {
51022 swingjs.JSToolkit.notImplemented (null);
51023 }, "~S,~N,~N");
51024 Clazz_defineMethod (c$, "drawString", 
51025 function (iterator, x, y) {
51026 swingjs.JSToolkit.notImplemented (null);
51027 }, "java.text.AttributedCharacterIterator,~N,~N");
51028 Clazz_overrideMethod (c$, "drawStringAttrTrans", 
51029 function (iterator, x, y) {
51030 swingjs.JSToolkit.notImplemented (null);
51031 }, "java.text.AttributedCharacterIterator,~N,~N");
51032 Clazz_overrideMethod (c$, "translateTrans", 
51033 function (tx, ty) {
51034 swingjs.JSToolkit.notImplemented (null);
51035 }, "~N,~N");
51036 Clazz_defineMethod (c$, "rotate", 
51037 function (theta) {
51038 swingjs.JSToolkit.notImplemented (null);
51039 }, "~N");
51040 Clazz_defineMethod (c$, "rotate", 
51041 function (theta, x, y) {
51042 swingjs.JSToolkit.notImplemented (null);
51043 }, "~N,~N,~N");
51044 Clazz_overrideMethod (c$, "shear", 
51045 function (shx, shy) {
51046 swingjs.JSToolkit.notImplemented (null);
51047 }, "~N,~N");
51048 Clazz_overrideMethod (c$, "transform", 
51049 function (xform) {
51050 swingjs.JSToolkit.notImplemented (null);
51051 }, "java.awt.geom.AffineTransform");
51052 Clazz_overrideMethod (c$, "setTransform", 
51053 function (Tx) {
51054 swingjs.JSToolkit.notImplemented (null);
51055 }, "java.awt.geom.AffineTransform");
51056 Clazz_overrideMethod (c$, "getTransform", 
51057 function () {
51058 swingjs.JSToolkit.notImplemented (null);
51059 return null;
51060 });
51061 Clazz_defineMethod (c$, "cloneTransform", 
51062 function () {
51063 swingjs.JSToolkit.notImplemented (null);
51064 return null;
51065 });
51066 Clazz_overrideMethod (c$, "getPaint", 
51067 function () {
51068 swingjs.JSToolkit.notImplemented (null);
51069 return null;
51070 });
51071 Clazz_overrideMethod (c$, "getStroke", 
51072 function () {
51073 swingjs.JSToolkit.notImplemented (null);
51074 return null;
51075 });
51076 Clazz_overrideMethod (c$, "getFontRenderContext", 
51077 function () {
51078 swingjs.JSToolkit.notImplemented (null);
51079 return null;
51080 });
51081 Clazz_overrideMethod (c$, "setPaintMode", 
51082 function () {
51083 swingjs.JSToolkit.notImplemented (null);
51084 });
51085 Clazz_overrideMethod (c$, "setXORMode", 
51086 function (c1) {
51087 swingjs.JSToolkit.notImplemented (null);
51088 }, "java.awt.Color");
51089 Clazz_defineMethod (c$, "getClipBounds", 
51090 function () {
51091 var r = null;
51092 {
51093 if (arguments.length == 1) r = arguments[0];
51094 }var clipRect = this.getClipBoundsImpl ();
51095 if (r == null) {
51096 r = clipRect;
51097 } else {
51098 r.x = clipRect.x;
51099 r.y = clipRect.y;
51100 r.width = clipRect.width;
51101 r.height = clipRect.height;
51102 }return r;
51103 });
51104 Clazz_defineMethod (c$, "getClipBoundsImpl", 
51105  function () {
51106 if (this.currentClip == null) {
51107 this.currentClip =  new java.awt.Rectangle (0, 0, this.windowWidth, this.windowHeight);
51108 }return this.currentClip;
51109 });
51110 Clazz_overrideMethod (c$, "setComposite", 
51111 function (comp) {
51112 var newRule = 0;
51113 var isValid = (comp == null || (Clazz_instanceOf (comp, java.awt.AlphaComposite)) && (newRule = (comp).getRule ()) != this.compositeState);
51114 if (!isValid) return;
51115 if (swingjs.JSToolkit.setGraphicsCompositeAlpha (this, newRule)) this.compositeState = newRule;
51116 }, "java.awt.Composite");
51117 Clazz_defineMethod (c$, "drawImage", 
51118 function (img, op, x, y) {
51119 swingjs.JSToolkit.drawImageOp (this, img, op, x, y);
51120 }, "java.awt.image.BufferedImage,java.awt.image.BufferedImageOp,~N,~N");
51121 Clazz_defineMethod (c$, "setAlpha", 
51122 function (f) {
51123 {
51124 this.ctx.globalAlpha = f;
51125 }}, "~N");
51126 Clazz_defineStatics (c$,
51127 "saveLevel", 0);
51128 });
51129 Clazz_declarePackage ("swingjs");
51130 Clazz_load (["swingjs.JSThread"], "swingjs.JSAppletThread", ["javax.swing.SwingUtilities"], function () {
51131 c$ = Clazz_decorateAsClass (function () {
51132 this.ap = null;
51133 Clazz_instantialize (this, arguments);
51134 }, swingjs, "JSAppletThread", swingjs.JSThread);
51135 Clazz_makeConstructor (c$, 
51136 function (ap, group, name) {
51137 Clazz_superConstructor (this, swingjs.JSAppletThread, [group, name]);
51138 this.ap = ap;
51139 }, "swingjs.JSAppletPanel,ThreadGroup,~S");
51140 Clazz_overrideMethod (c$, "run1", 
51141 function (mode) {
51142 mode = this.ap.run1 (mode);
51143 if (mode != 2) this.dispatchAndReturn (null, mode);
51144 }, "~N");
51145 Clazz_defineMethod (c$, "dispatchAndReturn", 
51146 function (r, mode) {
51147 var m = mode;
51148 javax.swing.SwingUtilities.invokeLater (((Clazz_isClassDefined ("swingjs.JSAppletThread$1") ? 0 : swingjs.JSAppletThread.$JSAppletThread$1$ ()), Clazz_innerTypeInstance (swingjs.JSAppletThread$1, this, Clazz_cloneFinals ("m", m))));
51149 }, "Runnable,~N");
51150 c$.$JSAppletThread$1$ = function () {
51151 Clazz_pu$h(self.c$);
51152 c$ = Clazz_declareAnonymous (swingjs, "JSAppletThread$1", null, Runnable);
51153 Clazz_overrideMethod (c$, "run", 
51154 function () {
51155 this.b$["swingjs.JSAppletThread"].run1 (this.f$.m);
51156 });
51157 c$ = Clazz_p0p ();
51158 };
51159 });
51160 Clazz_declarePackage ("swingjs");
51161 Clazz_load (null, "swingjs.JSMouse", ["JU.V3", "java.awt.Toolkit", "java.awt.event.MouseEvent"], function () {
51162 c$ = Clazz_decorateAsClass (function () {
51163 this.ap = null;
51164 this.isMouseDown = false;
51165 this.wheeling = false;
51166 this.xWhenPressed = 0;
51167 this.yWhenPressed = 0;
51168 this.modifiersWhenPressed10 = 0;
51169 Clazz_instantialize (this, arguments);
51170 }, swingjs, "JSMouse");
51171 Clazz_makeConstructor (c$, 
51172 function (ap) {
51173 this.ap = ap;
51174 }, "swingjs.JSAppletPanel");
51175 Clazz_defineMethod (c$, "processEvent", 
51176 function (id, x, y, modifiers, time) {
51177 if (id != -1) modifiers = swingjs.JSMouse.applyLeftMouse (modifiers);
51178 switch (id) {
51179 case -1:
51180 this.wheeled (time, x, modifiers);
51181 break;
51182 case 501:
51183 this.xWhenPressed = x;
51184 this.yWhenPressed = y;
51185 this.modifiersWhenPressed10 = modifiers;
51186 this.pressed (time, x, y, modifiers, false);
51187 break;
51188 case 506:
51189 this.dragged (time, x, y, modifiers);
51190 break;
51191 case 504:
51192 this.entry (time, x, y, false);
51193 break;
51194 case 505:
51195 this.entry (time, x, y, true);
51196 break;
51197 case 503:
51198 this.moved (time, x, y, modifiers);
51199 break;
51200 case 502:
51201 this.released (time, x, y, modifiers);
51202 if (x == this.xWhenPressed && y == this.yWhenPressed && modifiers == this.modifiersWhenPressed10) {
51203 this.clicked (time, x, y, modifiers, 1);
51204 }break;
51205 default:
51206 return false;
51207 }
51208 return true;
51209 }, "~N,~N,~N,~N,~N");
51210 Clazz_defineMethod (c$, "processTwoPointGesture", 
51211 function (touches) {
51212 if (touches[0].length < 2) return;
51213 var t1 = touches[0];
51214 var t2 = touches[1];
51215 var t1first = t1[0];
51216 var t1last = t1[t2.length - 1];
51217 var x1first = t1first[0];
51218 var x1last = t1last[0];
51219 var dx1 = x1last - x1first;
51220 var y1first = t1first[1];
51221 var y1last = t1last[1];
51222 var dy1 = y1last - y1first;
51223 var v1 = JU.V3.new3 (dx1, dy1, 0);
51224 var d1 = v1.length ();
51225 var t2first = t2[0];
51226 var t2last = t2[t2.length - 1];
51227 var x2first = t2first[0];
51228 var x2last = t2last[0];
51229 var dx2 = x2last - x2first;
51230 var y2first = t2first[1];
51231 var y2last = t2last[1];
51232 var dy2 = y2last - y2first;
51233 var v2 = JU.V3.new3 (dx2, dy2, 0);
51234 var d2 = v2.length ();
51235 if (d1 < 1 || d2 < 1) return;
51236 v1.normalize ();
51237 v2.normalize ();
51238 var cos12 = (v1.dot (v2));
51239 if (cos12 > 0.8) {
51240 var deltaX = Clazz_floatToInt (x1last - t1[t1.length - 2][0]);
51241 var deltaY = Clazz_floatToInt (y1last - t1[t1.length - 2][1]);
51242 this.translateXYBy (deltaX, deltaY);
51243 } else if (cos12 < -0.8) {
51244 v1 = JU.V3.new3 (x2first - x1first, y2first - y1first, 0);
51245 v2 = JU.V3.new3 (x2last - x1last, y2last - y1last, 0);
51246 var dx = v2.length () - v1.length ();
51247 this.wheeled (System.currentTimeMillis (), dx < 0 ? -1 : 1, 32);
51248 }}, "~A");
51249 Clazz_defineMethod (c$, "translateXYBy", 
51250  function (deltaX, deltaY) {
51251 }, "~N,~N");
51252 Clazz_defineMethod (c$, "mouseClicked", 
51253 function (e) {
51254 this.clicked (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.getClickCount ());
51255 }, "java.awt.event.MouseEvent");
51256 Clazz_defineMethod (c$, "mouseEntered", 
51257 function (e) {
51258 this.entry (e.getWhen (), e.getX (), e.getY (), false);
51259 }, "java.awt.event.MouseEvent");
51260 Clazz_defineMethod (c$, "mouseExited", 
51261 function (e) {
51262 this.entry (e.getWhen (), e.getX (), e.getY (), true);
51263 }, "java.awt.event.MouseEvent");
51264 Clazz_defineMethod (c$, "mousePressed", 
51265 function (e) {
51266 this.pressed (e.getWhen (), e.getX (), e.getY (), e.getModifiers (), e.isPopupTrigger ());
51267 }, "java.awt.event.MouseEvent");
51268 Clazz_defineMethod (c$, "mouseReleased", 
51269 function (e) {
51270 this.released (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51271 }, "java.awt.event.MouseEvent");
51272 Clazz_defineMethod (c$, "mouseDragged", 
51273 function (e) {
51274 var modifiers = e.getModifiers ();
51275 if ((modifiers & 28) == 0) modifiers |= 16;
51276 this.dragged (e.getWhen (), e.getX (), e.getY (), modifiers);
51277 }, "java.awt.event.MouseEvent");
51278 Clazz_defineMethod (c$, "mouseMoved", 
51279 function (e) {
51280 this.moved (e.getWhen (), e.getX (), e.getY (), e.getModifiers ());
51281 }, "java.awt.event.MouseEvent");
51282 Clazz_defineMethod (c$, "mouseWheelMoved", 
51283 function (e) {
51284 e.consume ();
51285 this.wheeled (e.getWhen (), e.getWheelRotation (), e.getModifiers ());
51286 }, "java.awt.event.MouseWheelEvent");
51287 Clazz_defineMethod (c$, "entry", 
51288  function (time, x, y, isExit) {
51289 this.wheeling = false;
51290 this.mouseEnterExit (time, x, y, isExit);
51291 }, "~N,~N,~N,~B");
51292 Clazz_defineMethod (c$, "clicked", 
51293  function (time, x, y, modifiers, clickCount) {
51294 this.mouseAction (500, time, x, y, 1, modifiers);
51295 }, "~N,~N,~N,~N,~N");
51296 Clazz_defineMethod (c$, "moved", 
51297  function (time, x, y, modifiers) {
51298 if (this.isMouseDown) this.mouseAction (506, time, x, y, 0, swingjs.JSMouse.applyLeftMouse (modifiers));
51299  else this.mouseAction (503, time, x, y, 0, modifiers);
51300 }, "~N,~N,~N,~N");
51301 Clazz_defineMethod (c$, "wheeled", 
51302  function (time, rotation, modifiers) {
51303 this.wheeling = true;
51304 this.mouseAction (507, time, 0, rotation, 0, modifiers & -29 | 32);
51305 }, "~N,~N,~N");
51306 Clazz_defineMethod (c$, "pressed", 
51307  function (time, x, y, modifiers, isPopupTrigger) {
51308 this.isMouseDown = true;
51309 this.wheeling = false;
51310 this.mouseAction (501, time, x, y, 0, modifiers);
51311 }, "~N,~N,~N,~N,~B");
51312 Clazz_defineMethod (c$, "released", 
51313  function (time, x, y, modifiers) {
51314 this.isMouseDown = false;
51315 this.wheeling = false;
51316 this.mouseAction (502, time, x, y, 0, modifiers);
51317 }, "~N,~N,~N,~N");
51318 Clazz_defineMethod (c$, "dragged", 
51319  function (time, x, y, modifiers) {
51320 if (this.wheeling) return;
51321 if ((modifiers & 20) == 20) modifiers = modifiers & -5 | 2;
51322 this.mouseAction (506, time, x, y, 0, modifiers);
51323 }, "~N,~N,~N,~N");
51324 c$.applyLeftMouse = Clazz_defineMethod (c$, "applyLeftMouse", 
51325  function (modifiers) {
51326 return ((modifiers & 28) == 0) ? (modifiers | 16) : modifiers;
51327 }, "~N");
51328 Clazz_defineMethod (c$, "getButton", 
51329  function (modifiers) {
51330 switch (modifiers & 28) {
51331 case 16:
51332 return 1;
51333 case 8:
51334 return 2;
51335 case 4:
51336 return 3;
51337 default:
51338 return 0;
51339 }
51340 }, "~N");
51341 Clazz_defineMethod (c$, "mouseEnterExit", 
51342  function (time, x, y, isExit) {
51343 }, "~N,~N,~N,~B");
51344 Clazz_defineMethod (c$, "mouseAction", 
51345  function (id, time, x, y, count, modifiers) {
51346 var popupTrigger = false;
51347 var button = this.getButton (modifiers);
51348 var source = this.ap.applet;
51349 var e =  new java.awt.event.MouseEvent (source, id, time, modifiers, x, y, x, y, count, popupTrigger, button);
51350 java.awt.Toolkit.getEventQueue ().postEvent (e);
51351 }, "~N,~N,~N,~N,~N,~N");
51352 Clazz_defineStatics (c$,
51353 "MOUSE_LEFT", 16,
51354 "MOUSE_MIDDLE", 8,
51355 "MOUSE_RIGHT", 4,
51356 "MOUSE_WHEEL", 32,
51357 "MAC_COMMAND", 20,
51358 "BUTTON_MASK", 28);
51359 });
51360 Clazz_declarePackage ("swingjs");
51361 Clazz_load (["java.awt.peer.LightweightPeer"], "swingjs.JSComponentPeer", ["swingjs.JSToolkit"], function () {
51362 c$ = Clazz_decorateAsClass (function () {
51363 this.target = null;
51364 this.ui = null;
51365 Clazz_instantialize (this, arguments);
51366 }, swingjs, "JSComponentPeer", null, java.awt.peer.LightweightPeer);
51367 Clazz_makeConstructor (c$, 
51368 function (target) {
51369 this.target = target;
51370 this.ui = swingjs.JSToolkit.getUI (target, false);
51371 }, "java.awt.Component");
51372 Clazz_overrideMethod (c$, "isObscured", 
51373 function () {
51374 return false;
51375 });
51376 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51377 function () {
51378 return false;
51379 });
51380 Clazz_overrideMethod (c$, "setVisible", 
51381 function (b) {
51382 }, "~B");
51383 Clazz_overrideMethod (c$, "setEnabled", 
51384 function (b) {
51385 }, "~B");
51386 Clazz_overrideMethod (c$, "paint", 
51387 function (g) {
51388 }, "java.awt.Graphics");
51389 Clazz_overrideMethod (c$, "repaint", 
51390 function (tm, x, y, width, height) {
51391 }, "~N,~N,~N,~N,~N");
51392 Clazz_overrideMethod (c$, "print", 
51393 function (g) {
51394 }, "java.awt.Graphics");
51395 Clazz_overrideMethod (c$, "setBounds", 
51396 function (x, y, width, height, op) {
51397 }, "~N,~N,~N,~N,~N");
51398 Clazz_overrideMethod (c$, "handleEvent", 
51399 function (e) {
51400 }, "java.awt.AWTEvent");
51401 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51402 function (e) {
51403 }, "java.awt.event.PaintEvent");
51404 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51405 function () {
51406 return null;
51407 });
51408 Clazz_overrideMethod (c$, "getPreferredSize", 
51409 function () {
51410 return null;
51411 });
51412 Clazz_overrideMethod (c$, "getMinimumSize", 
51413 function () {
51414 return null;
51415 });
51416 Clazz_overrideMethod (c$, "getColorModel", 
51417 function () {
51418 return null;
51419 });
51420 Clazz_overrideMethod (c$, "getToolkit", 
51421 function () {
51422 return null;
51423 });
51424 Clazz_overrideMethod (c$, "getGraphics", 
51425 function () {
51426 return null;
51427 });
51428 Clazz_overrideMethod (c$, "getFontMetrics", 
51429 function (font) {
51430 return null;
51431 }, "java.awt.Font");
51432 Clazz_overrideMethod (c$, "dispose", 
51433 function () {
51434 });
51435 Clazz_overrideMethod (c$, "setForeground", 
51436 function (c) {
51437 }, "java.awt.Color");
51438 Clazz_overrideMethod (c$, "setBackground", 
51439 function (c) {
51440 }, "java.awt.Color");
51441 Clazz_overrideMethod (c$, "setFont", 
51442 function (f) {
51443 }, "java.awt.Font");
51444 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51445 function () {
51446 });
51447 Clazz_overrideMethod (c$, "requestFocus", 
51448 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51449 return false;
51450 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51451 Clazz_overrideMethod (c$, "isFocusable", 
51452 function () {
51453 return false;
51454 });
51455 Clazz_defineMethod (c$, "createImage", 
51456 function (producer) {
51457 return null;
51458 }, "java.awt.image.ImageProducer");
51459 Clazz_defineMethod (c$, "createImage", 
51460 function (width, height) {
51461 return null;
51462 }, "~N,~N");
51463 Clazz_overrideMethod (c$, "createVolatileImage", 
51464 function (width, height) {
51465 return null;
51466 }, "~N,~N");
51467 Clazz_overrideMethod (c$, "prepareImage", 
51468 function (img, w, h, o) {
51469 return false;
51470 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51471 Clazz_overrideMethod (c$, "checkImage", 
51472 function (img, w, h, o) {
51473 return 0;
51474 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51475 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51476 function () {
51477 return null;
51478 });
51479 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51480 function () {
51481 return false;
51482 });
51483 Clazz_overrideMethod (c$, "getBackBuffer", 
51484 function () {
51485 return null;
51486 });
51487 Clazz_overrideMethod (c$, "destroyBuffers", 
51488 function () {
51489 });
51490 Clazz_overrideMethod (c$, "reparent", 
51491 function (newContainer) {
51492 }, "java.awt.peer.ContainerPeer");
51493 Clazz_overrideMethod (c$, "isReparentSupported", 
51494 function () {
51495 return false;
51496 });
51497 Clazz_overrideMethod (c$, "layout", 
51498 function () {
51499 });
51500 Clazz_overrideMethod (c$, "getBounds", 
51501 function () {
51502 return null;
51503 });
51504 });
51505 Clazz_declarePackage ("swingjs");
51506 Clazz_load (["java.awt.peer.FramePeer"], "swingjs.JSWindowPeer", ["java.lang.Thread", "java.awt.GraphicsEnvironment", "$.Insets", "$.Point", "$.Toolkit"], function () {
51507 c$ = Clazz_decorateAsClass (function () {
51508 this.window = null;
51509 this.isFrame = false;
51510 this.applet = null;
51511 this.graphics = null;
51512 this.font = null;
51513 Clazz_instantialize (this, arguments);
51514 }, swingjs, "JSWindowPeer", null, java.awt.peer.FramePeer);
51515 Clazz_overrideMethod (c$, "setFrame", 
51516 function (target, isFrame) {
51517 this.isFrame = isFrame;
51518 this.window = target;
51519 var jc = this;
51520 jc.myThread = Thread.currentThread ();
51521 jc.threadGroup = jc.myThread.getThreadGroup ();
51522 this.applet = (jc.threadGroup).getHtmlApplet ();
51523 this.graphics = (java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment ()).createGraphicsSized (target, 500, 300);
51524 return this;
51525 }, "java.awt.Window,~B");
51526 Clazz_overrideMethod (c$, "getGraphics", 
51527 function () {
51528 this.graphics.setFont (this.window.getFont ());
51529 return this.graphics;
51530 });
51531 Clazz_overrideMethod (c$, "getToolkit", 
51532 function () {
51533 return java.awt.Toolkit.getDefaultToolkit ();
51534 });
51535 Clazz_overrideMethod (c$, "getFontMetrics", 
51536 function (font) {
51537 if (!font.equals (this.font)) this.window.setFont (this.font = font);
51538 return this.graphics.getFontMetrics (font);
51539 }, "java.awt.Font");
51540 Clazz_overrideMethod (c$, "getInsets", 
51541 function () {
51542 return  new java.awt.Insets (0, 0, 0, 0);
51543 });
51544 Clazz_overrideMethod (c$, "beginValidate", 
51545 function () {
51546 });
51547 Clazz_overrideMethod (c$, "endValidate", 
51548 function () {
51549 });
51550 Clazz_overrideMethod (c$, "beginLayout", 
51551 function () {
51552 });
51553 Clazz_overrideMethod (c$, "endLayout", 
51554 function () {
51555 });
51556 Clazz_overrideMethod (c$, "isObscured", 
51557 function () {
51558 return false;
51559 });
51560 Clazz_overrideMethod (c$, "canDetermineObscurity", 
51561 function () {
51562 return false;
51563 });
51564 Clazz_overrideMethod (c$, "setVisible", 
51565 function (b) {
51566 }, "~B");
51567 Clazz_overrideMethod (c$, "setEnabled", 
51568 function (b) {
51569 }, "~B");
51570 Clazz_overrideMethod (c$, "paint", 
51571 function (g) {
51572 }, "java.awt.Graphics");
51573 Clazz_overrideMethod (c$, "repaint", 
51574 function (tm, x, y, width, height) {
51575 }, "~N,~N,~N,~N,~N");
51576 Clazz_overrideMethod (c$, "print", 
51577 function (g) {
51578 }, "java.awt.Graphics");
51579 Clazz_overrideMethod (c$, "setBounds", 
51580 function (x, y, width, height, op) {
51581 }, "~N,~N,~N,~N,~N");
51582 Clazz_overrideMethod (c$, "handleEvent", 
51583 function (e) {
51584 }, "java.awt.AWTEvent");
51585 Clazz_overrideMethod (c$, "coalescePaintEvent", 
51586 function (e) {
51587 }, "java.awt.event.PaintEvent");
51588 Clazz_overrideMethod (c$, "getLocationOnScreen", 
51589 function () {
51590 return  new java.awt.Point ();
51591 });
51592 Clazz_overrideMethod (c$, "getPreferredSize", 
51593 function () {
51594 return null;
51595 });
51596 Clazz_overrideMethod (c$, "getMinimumSize", 
51597 function () {
51598 return null;
51599 });
51600 Clazz_overrideMethod (c$, "getColorModel", 
51601 function () {
51602 return null;
51603 });
51604 Clazz_overrideMethod (c$, "dispose", 
51605 function () {
51606 });
51607 Clazz_overrideMethod (c$, "setForeground", 
51608 function (c) {
51609 }, "java.awt.Color");
51610 Clazz_overrideMethod (c$, "setBackground", 
51611 function (c) {
51612 }, "java.awt.Color");
51613 Clazz_overrideMethod (c$, "setFont", 
51614 function (f) {
51615 this.font = f;
51616 }, "java.awt.Font");
51617 Clazz_overrideMethod (c$, "updateCursorImmediately", 
51618 function () {
51619 });
51620 Clazz_overrideMethod (c$, "requestFocus", 
51621 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
51622 return false;
51623 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
51624 Clazz_overrideMethod (c$, "isFocusable", 
51625 function () {
51626 return false;
51627 });
51628 Clazz_defineMethod (c$, "createImage", 
51629 function (producer) {
51630 return null;
51631 }, "java.awt.image.ImageProducer");
51632 Clazz_defineMethod (c$, "createImage", 
51633 function (width, height) {
51634 return null;
51635 }, "~N,~N");
51636 Clazz_overrideMethod (c$, "createVolatileImage", 
51637 function (width, height) {
51638 return null;
51639 }, "~N,~N");
51640 Clazz_overrideMethod (c$, "prepareImage", 
51641 function (img, w, h, o) {
51642 return false;
51643 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51644 Clazz_overrideMethod (c$, "checkImage", 
51645 function (img, w, h, o) {
51646 return 0;
51647 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
51648 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
51649 function () {
51650 return null;
51651 });
51652 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
51653 function () {
51654 return false;
51655 });
51656 Clazz_overrideMethod (c$, "getBackBuffer", 
51657 function () {
51658 return null;
51659 });
51660 Clazz_overrideMethod (c$, "destroyBuffers", 
51661 function () {
51662 });
51663 Clazz_overrideMethod (c$, "reparent", 
51664 function (newContainer) {
51665 }, "java.awt.peer.ContainerPeer");
51666 Clazz_overrideMethod (c$, "isReparentSupported", 
51667 function () {
51668 return false;
51669 });
51670 Clazz_overrideMethod (c$, "layout", 
51671 function () {
51672 });
51673 Clazz_overrideMethod (c$, "getBounds", 
51674 function () {
51675 return null;
51676 });
51677 Clazz_overrideMethod (c$, "toFront", 
51678 function () {
51679 });
51680 Clazz_overrideMethod (c$, "toBack", 
51681 function () {
51682 });
51683 Clazz_overrideMethod (c$, "updateAlwaysOnTopState", 
51684 function () {
51685 });
51686 Clazz_overrideMethod (c$, "updateFocusableWindowState", 
51687 function () {
51688 });
51689 Clazz_overrideMethod (c$, "requestWindowFocus", 
51690 function () {
51691 return false;
51692 });
51693 Clazz_overrideMethod (c$, "setModalBlocked", 
51694 function (blocker, blocked) {
51695 }, "java.awt.Dialog,~B");
51696 Clazz_overrideMethod (c$, "updateMinimumSize", 
51697 function () {
51698 });
51699 Clazz_overrideMethod (c$, "updateIconImages", 
51700 function () {
51701 });
51702 Clazz_overrideMethod (c$, "setOpacity", 
51703 function (opacity) {
51704 }, "~N");
51705 Clazz_overrideMethod (c$, "setOpaque", 
51706 function (isOpaque) {
51707 }, "~B");
51708 Clazz_overrideMethod (c$, "updateWindow", 
51709 function (backBuffer) {
51710 }, "java.awt.image.BufferedImage");
51711 Clazz_overrideMethod (c$, "repositionSecurityWarning", 
51712 function () {
51713 });
51714 Clazz_overrideMethod (c$, "setTitle", 
51715 function (title) {
51716 }, "~S");
51717 Clazz_overrideMethod (c$, "setMenuBar", 
51718 function (mb) {
51719 }, "~O");
51720 Clazz_overrideMethod (c$, "setResizable", 
51721 function (resizeable) {
51722 }, "~B");
51723 Clazz_overrideMethod (c$, "setState", 
51724 function (state) {
51725 }, "~N");
51726 Clazz_overrideMethod (c$, "getState", 
51727 function () {
51728 return 0;
51729 });
51730 Clazz_overrideMethod (c$, "setMaximizedBounds", 
51731 function (bounds) {
51732 }, "java.awt.Rectangle");
51733 Clazz_overrideMethod (c$, "setBoundsPrivate", 
51734 function (x, y, width, height) {
51735 }, "~N,~N,~N,~N");
51736 Clazz_overrideMethod (c$, "getBoundsPrivate", 
51737 function () {
51738 return null;
51739 });
51740 });
51741 Clazz_declarePackage ("swingjs");
51742 Clazz_load (["java.awt.GraphicsEnvironment"], "swingjs.JSGraphicsEnvironment", ["swingjs.JSGraphics2D", "$.JSToolkit", "swingjs.api.DOMNode"], function () {
51743 c$ = Clazz_declareType (swingjs, "JSGraphicsEnvironment", java.awt.GraphicsEnvironment);
51744 Clazz_makeConstructor (c$, 
51745 function () {
51746 Clazz_superConstructor (this, swingjs.JSGraphicsEnvironment, []);
51747 System.out.println ("JSGraphicsEnvironment initialized");
51748 });
51749 Clazz_overrideMethod (c$, "createGraphics", 
51750 function (img) {
51751 return this.createGraphicsSized (img, img.getWidth (), img.getHeight ());
51752 }, "java.awt.image.BufferedImage");
51753 Clazz_defineMethod (c$, "createGraphicsSized", 
51754 function (img, width, height) {
51755 var g = null;
51756 {
51757 g = img._g;
51758 }if (g == null) {
51759 var canvas = swingjs.api.DOMNode.createElement ("canvas", "img" + System.currentTimeMillis ());
51760 {
51761 canvas.width = width;
51762 canvas.height = height;
51763 img._canvas = canvas;
51764 }g =  new swingjs.JSGraphics2D (canvas);
51765 {
51766 img._g = g;
51767 }}return g;
51768 }, "~O,~N,~N");
51769 Clazz_overrideMethod (c$, "getAllFonts", 
51770 function () {
51771 return null;
51772 });
51773 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51774 function () {
51775 return null;
51776 });
51777 Clazz_defineMethod (c$, "getAvailableFontFamilyNames", 
51778 function (l) {
51779 return null;
51780 }, "java.util.Locale");
51781 Clazz_overrideMethod (c$, "getDefaultScreenDevice", 
51782 function () {
51783 if (swingjs.JSGraphicsEnvironment.device == null) swingjs.JSGraphicsEnvironment.device = swingjs.JSToolkit.getInstance ("swingjs.JSScreenDevice");
51784 return swingjs.JSGraphicsEnvironment.device;
51785 });
51786 Clazz_defineStatics (c$,
51787 "device", null);
51788 });
51789 Clazz_declarePackage ("swingjs.plaf");
51790 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 () {
51791 c$ = Clazz_declareType (swingjs.plaf, "HTML5LookAndFeel", javax.swing.LookAndFeel);
51792 Clazz_overrideMethod (c$, "getDefaults", 
51793 function () {
51794 var table =  new javax.swing.UIDefaults (610, 0.75);
51795 this.initClassDefaults (table);
51796 this.initSystemColorDefaults (table);
51797 this.initComponentDefaults (table);
51798 return table;
51799 });
51800 Clazz_overrideMethod (c$, "initialize", 
51801 function () {
51802 });
51803 Clazz_defineMethod (c$, "installAWTEventListener", 
51804 function () {
51805 });
51806 Clazz_overrideMethod (c$, "uninitialize", 
51807 function () {
51808 });
51809 Clazz_defineMethod (c$, "initClassDefaults", 
51810 function (table) {
51811 var packageName = "swingjs.plaf.";
51812 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"]);
51813 table.putDefaults (uiDefaults);
51814 }, "javax.swing.UIDefaults");
51815 Clazz_defineMethod (c$, "initSystemColorDefaults", 
51816 function (table) {
51817 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"]);
51818 this.loadSystemColors (table, defaultSystemColors, this.isNativeLookAndFeel ());
51819 }, "javax.swing.UIDefaults");
51820 Clazz_defineMethod (c$, "loadSystemColors", 
51821 function (table, systemColors, useNative) {
51822 for (var i = 0; i < systemColors.length; i += 2) {
51823 var color = java.awt.Color.black;
51824 try {
51825 color = java.awt.Color.decode (systemColors[i + 1]);
51826 } catch (e) {
51827 if (Clazz_exceptionOf (e, NumberFormatException)) {
51828 e.printStackTrace ();
51829 } else {
51830 throw e;
51831 }
51832 }
51833 table.put (systemColors[i],  new javax.swing.plaf.ColorUIResource (color));
51834 }
51835 }, "javax.swing.UIDefaults,~A,~B");
51836 Clazz_defineMethod (c$, "initResourceBundle", 
51837  function (table) {
51838 }, "javax.swing.UIDefaults");
51839 Clazz_defineMethod (c$, "initComponentDefaults", 
51840 function (table) {
51841 this.initResourceBundle (table);
51842 var oneThousand =  new Long (1000);
51843 var twelve =  new Integer (12);
51844 var fontPlain =  new Integer (0);
51845 var serifPlain12 =  new javax.swing.plaf.FontUIResource ("Serif", 0, 12);
51846 var sansSerifPlain12 =  new javax.swing.plaf.FontUIResource ("SansSerif", 0, 12);
51847 var dialogPlain12 =  new javax.swing.plaf.FontUIResource ("Dialog", 0, 12);
51848 var monospacedPlain12 =  new javax.swing.plaf.FontUIResource ("Monospaced", 0, 12);
51849 var black =  new javax.swing.plaf.ColorUIResource (java.awt.Color.black);
51850 var white =  new javax.swing.plaf.ColorUIResource (java.awt.Color.white);
51851 var gray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.gray);
51852 var darkGray =  new javax.swing.plaf.ColorUIResource (java.awt.Color.darkGray);
51853 var control = table.getColor ("control");
51854 var controlText = table.getColor ("controlText");
51855 var menu = table.getColor ("menu");
51856 var menuText = table.getColor ("menuText");
51857 var textText = table.getColor ("textText");
51858 var window = table.getColor ("window");
51859 var zeroInsets =  new javax.swing.plaf.InsetsUIResource (0, 0, 0, 0);
51860 var twoInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 2);
51861 var threeInsets =  new javax.swing.plaf.InsetsUIResource (3, 3, 3, 3);
51862 var listCellRendererActiveValue = ((Clazz_isClassDefined ("swingjs.plaf.HTML5LookAndFeel$1") ? 0 : swingjs.plaf.HTML5LookAndFeel.$HTML5LookAndFeel$1$ ()), Clazz_innerTypeInstance (swingjs.plaf.HTML5LookAndFeel$1, this, null));
51863 var zero =  new Integer (0);
51864 var tabbedPaneTabInsets =  new javax.swing.plaf.InsetsUIResource (0, 4, 1, 4);
51865 var tabbedPaneTabPadInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 2, 1);
51866 var tabbedPaneTabAreaInsets =  new javax.swing.plaf.InsetsUIResource (3, 2, 0, 2);
51867 var tabbedPaneContentBorderInsets =  new javax.swing.plaf.InsetsUIResource (2, 2, 3, 3);
51868 var editorMargin = threeInsets;
51869 var four =  new Integer (4);
51870 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]);
51871 table.putDefaults (defaults);
51872 }, "javax.swing.UIDefaults");
51873 Clazz_overrideMethod (c$, "getName", 
51874 function () {
51875 return "SwingJS";
51876 });
51877 Clazz_overrideMethod (c$, "getID", 
51878 function () {
51879 return "SwingJS";
51880 });
51881 Clazz_overrideMethod (c$, "getDescription", 
51882 function () {
51883 return "SwingJS L&F";
51884 });
51885 Clazz_overrideMethod (c$, "isNativeLookAndFeel", 
51886 function () {
51887 return true;
51888 });
51889 Clazz_overrideMethod (c$, "isSupportedLookAndFeel", 
51890 function () {
51891 return true;
51892 });
51893 c$.$HTML5LookAndFeel$1$ = function () {
51894 Clazz_pu$h(self.c$);
51895 c$ = Clazz_declareAnonymous (swingjs.plaf, "HTML5LookAndFeel$1", null, javax.swing.UIDefaults.ActiveValue);
51896 Clazz_overrideMethod (c$, "createValue", 
51897 function (table) {
51898 return  new javax.swing.DefaultListCellRenderer.UIResource ();
51899 }, "javax.swing.UIDefaults");
51900 c$ = Clazz_p0p ();
51901 };
51902 });
51903 Clazz_declarePackage ("swingjs.plaf");
51904 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 () {
51905 c$ = Clazz_decorateAsClass (function () {
51906 this.id = null;
51907 this.c = null;
51908 this.outerNode = null;
51909 this.domNode = null;
51910 this.enableNode = null;
51911 this.textNode = null;
51912 this.valueNode = null;
51913 this.scrollNode = null;
51914 this.focusNode = null;
51915 this.components = null;
51916 this.num = 0;
51917 this.isTainted = true;
51918 this.x = 0;
51919 this.y = 0;
51920 this.preferredSize = null;
51921 this.isContainer = false;
51922 this.parent = null;
51923 this.currentText = null;
51924 this.scrollerNode = null;
51925 this.classID = null;
51926 this.document = null;
51927 this.body = null;
51928 this.needPreferred = false;
51929 Clazz_instantialize (this, arguments);
51930 }, swingjs.plaf, "JSComponentUI", javax.swing.plaf.ComponentUI, swingjs.plaf.JSEventHandler);
51931 Clazz_makeConstructor (c$, 
51932 function () {
51933 Clazz_superConstructor (this, swingjs.plaf.JSComponentUI, []);
51934 this.setDoc ();
51935 });
51936 Clazz_defineMethod (c$, "setDoc", 
51937 function () {
51938 {
51939 this.document = document;
51940 this.body = document.body;
51941 }});
51942 Clazz_overrideMethod (c$, "installUI", 
51943 function (c) {
51944 }, "javax.swing.JComponent");
51945 Clazz_overrideMethod (c$, "uninstallUI", 
51946 function (c) {
51947 this.uninstallJSUI ();
51948 }, "javax.swing.JComponent");
51949 Clazz_defineMethod (c$, "$", 
51950 function (node) {
51951 return swingjs.JSToolkit.getJQuery ().$ (node);
51952 }, "swingjs.api.DOMNode");
51953 Clazz_defineMethod (c$, "setTainted", 
51954 function () {
51955 this.isTainted = true;
51956 });
51957 Clazz_defineMethod (c$, "set", 
51958 function (target) {
51959 this.c = target;
51960 this.newID ();
51961 if (this.needPreferred) this.getPreferredSize (this.c);
51962 this.installJSUI ();
51963 return this;
51964 }, "javax.swing.JComponent");
51965 Clazz_defineMethod (c$, "newID", 
51966 function () {
51967 this.classID = this.c.getUIClassID ();
51968 if (this.id == null) {
51969 this.num = ++swingjs.plaf.JSComponentUI.incr;
51970 this.id = this.c.getHTMLName (this.classID) + "_" + this.num;
51971 }});
51972 Clazz_defineMethod (c$, "setCssFont", 
51973 function (obj, font) {
51974 if (font != null) {
51975 var istyle = font.getStyle ();
51976 var name = font.getFamily ();
51977 if (name === "Dialog") name = "Arial";
51978 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")]);
51979 }if (this.c.isBackgroundSet ()) this.setBackground (this.c.getBackground ());
51980 this.setForeground (this.c.getForeground ());
51981 return obj;
51982 }, "swingjs.api.DOMNode,java.awt.Font");
51983 Clazz_defineMethod (c$, "createDOMObject", 
51984 function (key, id, attr) {
51985 var obj = swingjs.api.DOMNode.createElement (key, id);
51986 for (var i = 0; i < attr.length; ) swingjs.api.DOMNode.setAttr (obj, attr[i++], attr[i++]);
51987
51988 if (!this.c.isEnabled ()) this.setEnabled (false);
51989 return obj;
51990 }, "~S,~S,~A");
51991 Clazz_defineMethod (c$, "bindMouse", 
51992 function (node) {
51993 swingjs.api.DOMNode.setAttr (node, "data-UI", this);
51994 }, "swingjs.api.DOMNode");
51995 Clazz_overrideMethod (c$, "handleJSEvent", 
51996 function (target, eventType, jQueryEvent) {
51997 return false;
51998 }, "~O,~N,~O");
51999 Clazz_defineMethod (c$, "wrap", 
52000 function (type, id, elements) {
52001 return this.append (this.createDOMObject (type, id + type, []), elements);
52002 }, "~S,~S,~A");
52003 Clazz_defineMethod (c$, "append", 
52004 function (obj, elements) {
52005 for (var i = 0; i < elements.length; i++) {
52006 obj.appendChild (elements[i]);
52007 }
52008 return obj;
52009 }, "swingjs.api.DOMNode,~A");
52010 Clazz_defineMethod (c$, "debugDump", 
52011 function (d) {
52012 System.out.println (swingjs.api.DOMNode.getAttr (d, "outerHTML"));
52013 }, "swingjs.api.DOMNode");
52014 c$.vCenter = Clazz_defineMethod (c$, "vCenter", 
52015 function (obj, offset) {
52016 swingjs.api.DOMNode.setStyles (obj, ["top", "50%", "transform", "translateY(" + offset + "%)"]);
52017 }, "swingjs.api.DOMNode,~N");
52018 Clazz_defineMethod (c$, "setHTMLSize", 
52019 function (obj, addCSS) {
52020 return this.setHTMLSize1 (obj, addCSS, true);
52021 }, "swingjs.api.DOMNode,~B");
52022 Clazz_defineMethod (c$, "setHTMLSize1", 
52023 function (node, addCSS, usePreferred) {
52024 if (node == null) return null;
52025 var h;
52026 var w;
52027 var w0 = null;
52028 var h0 = null;
52029 var parentNode = null;
52030 if (this.scrollerNode != null) {
52031 w = this.scrollerNode.c.getWidth ();
52032 h = this.scrollerNode.c.getHeight ();
52033 } else if (usePreferred && this.preferredSize != null) {
52034 w = this.preferredSize.width;
52035 h = this.preferredSize.height;
52036 } else {
52037 parentNode = swingjs.api.DOMNode.remove (node);
52038 {
52039 w0 = node.style.width;
52040 h0 = node.style.height;
52041 }swingjs.api.DOMNode.setStyles (node, ["position", null, "width", null, "height", null]);
52042 var div;
52043 if (swingjs.api.DOMNode.getAttr (node, "tagName") === "DIV") div = node;
52044  else div = this.wrap ("div", this.id + "_temp", [node]);
52045 swingjs.api.DOMNode.setStyles (div, ["position", "absolute"]);
52046 this.body.appendChild (div);
52047 w = Clazz_doubleToInt (Math.ceil (this.$ (div).width () + 0.5));
52048 h = Clazz_doubleToInt (Math.ceil (this.$ (div).height () + 0.5));
52049 this.body.removeChild (div);
52050 }var size = this.getCSSDimension (w, h);
52051 if (addCSS) {
52052 swingjs.api.DOMNode.setStyles (node, ["position", "absolute"]);
52053 swingjs.api.DOMNode.setSize (node, size.width, size.height);
52054 } else {
52055 swingjs.api.DOMNode.setStyles (node, ["position", null]);
52056 if (w0 != null) swingjs.api.DOMNode.setStyles (node, ["width", w0, "height", h0]);
52057 }if (parentNode != null) parentNode.appendChild (node);
52058 return size;
52059 }, "swingjs.api.DOMNode,~B,~B");
52060 Clazz_defineMethod (c$, "getCSSDimension", 
52061 function (w, h) {
52062 return  new java.awt.Dimension (w, h);
52063 }, "~N,~N");
52064 Clazz_defineMethod (c$, "setHTMLElement", 
52065 function () {
52066 if (!this.isTainted) return this.outerNode;
52067 var root = (this.isContainer ? this.c.getRootPane () : null);
52068 if (this.c === root) {
52069 this.isTainted = false;
52070 return this.outerNode;
52071 }this.domNode = this.getDOMObject ();
52072 if (this.outerNode == null) {
52073 this.outerNode = this.wrap ("div", this.id, [this.domNode]);
52074 if (root != null && root.getContentPane () === this.c) swingjs.JSToolkit.getHTML5Applet (this.c)._getContentLayer ().appendChild (this.outerNode);
52075 }swingjs.api.DOMNode.setStyles (this.outerNode, ["position", "absolute", "left", (this.x = this.c.getX ()) + "px", "top", (this.y = this.c.getY ()) + "px"]);
52076 if (this.isContainer) {
52077 System.out.println ("JSComponentUI container " + this.id + " " + this.c.getBounds ());
52078 swingjs.api.DOMNode.setSize (this.outerNode, this.c.getWidth (), this.c.getHeight ());
52079 var children = (this.components == null ? this.c.getComponents () : this.components);
52080 for (var i = children.length; --i >= 0; ) {
52081 var ui = swingjs.JSToolkit.getUI (children[i], false);
52082 if (ui == null) {
52083 continue;
52084 }if (ui.outerNode == null) ui.setHTMLElement ();
52085 if (ui.outerNode == null) {
52086 System.out.println ("JSCUI could not add " + ui.c.getName () + " to " + this.c.getName ());
52087 } else {
52088 this.outerNode.appendChild (ui.outerNode);
52089 }ui.parent = this;
52090 }
52091 }this.isTainted = false;
52092 return this.outerNode;
52093 });
52094 Clazz_defineMethod (c$, "getPreferredSize", 
52095 function (c) {
52096 var d = this.setHTMLSize (this.getDOMObject (), false);
52097 return d;
52098 }, "javax.swing.JComponent");
52099 Clazz_defineMethod (c$, "paint", 
52100 function (g, c) {
52101 if (c.isOpaque ()) {
52102 g.setColor (c.getBackground ());
52103 g.fillRect (0, 0, c.getWidth (), c.getHeight ());
52104 }}, "java.awt.Graphics,javax.swing.JComponent");
52105 Clazz_overrideMethod (c$, "update", 
52106 function (g, c) {
52107 var testing = false;
52108 if (testing) {
52109 g.setColor (java.awt.Color.red);
52110 g.drawRect (0, 0, c.getWidth (), c.getHeight ());
52111 System.out.println ("drawing " + c.getWidth () + " " + c.getHeight ());
52112 }this.setHTMLElement ();
52113 this.paint (g, c);
52114 }, "java.awt.Graphics,javax.swing.JComponent");
52115 Clazz_defineMethod (c$, "getMinimumSize", 
52116 function (c) {
52117 return this.getPreferredSize (c);
52118 }, "javax.swing.JComponent");
52119 Clazz_overrideMethod (c$, "getMaximumSize", 
52120 function (c) {
52121 return null;
52122 }, "javax.swing.JComponent");
52123 Clazz_overrideMethod (c$, "contains", 
52124 function (c, x, y) {
52125 return c.inside (x, y);
52126 }, "javax.swing.JComponent,~N,~N");
52127 c$.createUI = Clazz_overrideMethod (c$, "createUI", 
52128 function (c) {
52129 return null;
52130 }, "javax.swing.JComponent");
52131 Clazz_overrideMethod (c$, "getBaseline", 
52132 function (c, width, height) {
52133 if (c == null) {
52134 throw  new NullPointerException ("Component must be non-null");
52135 }if (width < 0 || height < 0) {
52136 throw  new IllegalArgumentException ("Width and height must be >= 0");
52137 }return -1;
52138 }, "javax.swing.JComponent,~N,~N");
52139 Clazz_overrideMethod (c$, "getBaselineResizeBehavior", 
52140 function (c) {
52141 if (c == null) {
52142 throw  new NullPointerException ("Component must be non-null");
52143 }return java.awt.Component.BaselineResizeBehavior.OTHER;
52144 }, "javax.swing.JComponent");
52145 Clazz_defineMethod (c$, "getJSTextValue", 
52146 function () {
52147 return swingjs.api.DOMNode.getAttr (this.domNode, this.valueNode == null ? "innerHTML" : "value");
52148 });
52149 Clazz_defineMethod (c$, "notifyPropertyChanged", 
52150 function (prop) {
52151 var obj = null;
52152 var val = null;
52153 if (prop === "text") {
52154 val = (this.c).getText ();
52155 if (val.equals (this.currentText)) return;
52156 this.currentText = val;
52157 if (this.textNode != null) {
52158 prop = "innerHTML";
52159 obj = this.textNode;
52160 } else if (this.valueNode != null) {
52161 prop = "value";
52162 obj = this.valueNode;
52163 }} else if (prop === "preferredSize") {
52164 this.preferredSize = this.c.getPreferredSize ();
52165 this.getPreferredSize ();
52166 return;
52167 }if (obj == null) {
52168 System.out.println ("JSComponentUI: unrecognized prop: " + prop);
52169 } else {
52170 System.out.println ("JSComponentUI: setting " + this.id + " " + prop);
52171 this.setProp (obj, prop, val);
52172 }}, "~S");
52173 Clazz_defineMethod (c$, "setProp", 
52174 function (obj, prop, val) {
52175 return swingjs.api.DOMNode.setAttr (obj, prop, val);
52176 }, "swingjs.api.DOMNode,~S,~S");
52177 Clazz_overrideMethod (c$, "isObscured", 
52178 function () {
52179 swingjs.JSToolkit.notImplemented ("");
52180 return false;
52181 });
52182 Clazz_overrideMethod (c$, "canDetermineObscurity", 
52183 function () {
52184 swingjs.JSToolkit.notImplemented ("");
52185 return false;
52186 });
52187 Clazz_overrideMethod (c$, "setVisible", 
52188 function (b) {
52189 swingjs.api.DOMNode.setStyles (this.outerNode, ["display", b ? "block" : "none"]);
52190 }, "~B");
52191 Clazz_overrideMethod (c$, "setEnabled", 
52192 function (b) {
52193 if (this.enableNode != null) swingjs.api.DOMNode.setAttr (this.enableNode, "disabled", (b ? null : "TRUE"));
52194 }, "~B");
52195 Clazz_defineMethod (c$, "paint", 
52196 function (g) {
52197 }, "java.awt.Graphics");
52198 Clazz_overrideMethod (c$, "repaint", 
52199 function (tm, x, y, width, height) {
52200 }, "~N,~N,~N,~N,~N");
52201 Clazz_overrideMethod (c$, "print", 
52202 function (g) {
52203 swingjs.JSToolkit.notImplemented ("");
52204 }, "java.awt.Graphics");
52205 Clazz_overrideMethod (c$, "setBounds", 
52206 function (x, y, width, height, op) {
52207 switch (op) {
52208 case 2:
52209 case 3:
52210 case 4:
52211 if (this.scrollerNode != null) {
52212 width = Math.min (width, this.scrollerNode.c.getWidth ());
52213 height = Math.min (height, this.scrollerNode.c.getHeight ());
52214 }System.out.println (this.id + " setBounds " + x + " " + y + " " + width + " " + height + " op=" + op);
52215 if (this.domNode != null) swingjs.api.DOMNode.setSize (this.domNode, width, height);
52216 break;
52217 }
52218 }, "~N,~N,~N,~N,~N");
52219 Clazz_overrideMethod (c$, "handleEvent", 
52220 function (e) {
52221 swingjs.JSToolkit.notImplemented ("");
52222 }, "java.awt.AWTEvent");
52223 Clazz_overrideMethod (c$, "coalescePaintEvent", 
52224 function (e) {
52225 swingjs.JSToolkit.notImplemented ("");
52226 }, "java.awt.event.PaintEvent");
52227 Clazz_overrideMethod (c$, "getLocationOnScreen", 
52228 function () {
52229 var offset = this.$ (this.outerNode).offset ();
52230 return  new java.awt.Point (offset.left, offset.top);
52231 });
52232 Clazz_defineMethod (c$, "getPreferredSize", 
52233 function () {
52234 return this.getPreferredSize (this.c);
52235 });
52236 Clazz_defineMethod (c$, "getMinimumSize", 
52237 function () {
52238 swingjs.JSToolkit.notImplemented ("");
52239 return this.getPreferredSize (this.c);
52240 });
52241 Clazz_overrideMethod (c$, "getColorModel", 
52242 function () {
52243 return java.awt.Toolkit.getDefaultToolkit ().getColorModel ();
52244 });
52245 Clazz_overrideMethod (c$, "getToolkit", 
52246 function () {
52247 return java.awt.Toolkit.getDefaultToolkit ();
52248 });
52249 Clazz_overrideMethod (c$, "getGraphics", 
52250 function () {
52251 return null;
52252 });
52253 Clazz_overrideMethod (c$, "getFontMetrics", 
52254 function (font) {
52255 return this.c.getFontMetrics (font);
52256 }, "java.awt.Font");
52257 Clazz_overrideMethod (c$, "dispose", 
52258 function () {
52259 swingjs.JSToolkit.notImplemented ("");
52260 });
52261 Clazz_overrideMethod (c$, "setForeground", 
52262 function (color) {
52263 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.black : color)]);
52264 }, "java.awt.Color");
52265 Clazz_overrideMethod (c$, "setBackground", 
52266 function (color) {
52267 if (this.domNode != null) swingjs.api.DOMNode.setStyles (this.domNode, ["background-color", swingjs.JSToolkit.getCSSColor (color == null ? java.awt.Color.white : color)]);
52268 }, "java.awt.Color");
52269 Clazz_overrideMethod (c$, "setFont", 
52270 function (f) {
52271 if (this.domNode != null) this.setCssFont (this.domNode, f);
52272 }, "java.awt.Font");
52273 Clazz_overrideMethod (c$, "updateCursorImmediately", 
52274 function () {
52275 swingjs.JSToolkit.notImplemented ("");
52276 });
52277 Clazz_overrideMethod (c$, "requestFocus", 
52278 function (lightweightChild, temporary, focusedWindowChangeAllowed, time, cause) {
52279 if (this.focusNode == null) return false;
52280 this.$ (this.focusNode).focus ();
52281 if (this.textNode != null) this.$ (this.textNode).select ();
52282 return true;
52283 }, "java.awt.Component,~B,~B,~N,jssun.awt.CausedFocusEvent.Cause");
52284 Clazz_overrideMethod (c$, "isFocusable", 
52285 function () {
52286 return (this.focusNode != null);
52287 });
52288 Clazz_defineMethod (c$, "createImage", 
52289 function (producer) {
52290 swingjs.JSToolkit.notImplemented ("");
52291 return null;
52292 }, "java.awt.image.ImageProducer");
52293 Clazz_defineMethod (c$, "createImage", 
52294 function (width, height) {
52295 swingjs.JSToolkit.notImplemented ("");
52296 return null;
52297 }, "~N,~N");
52298 Clazz_overrideMethod (c$, "createVolatileImage", 
52299 function (width, height) {
52300 swingjs.JSToolkit.notImplemented ("");
52301 return null;
52302 }, "~N,~N");
52303 Clazz_overrideMethod (c$, "prepareImage", 
52304 function (img, w, h, o) {
52305 swingjs.JSToolkit.notImplemented ("");
52306 return false;
52307 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52308 Clazz_overrideMethod (c$, "checkImage", 
52309 function (img, w, h, o) {
52310 swingjs.JSToolkit.notImplemented ("");
52311 return 0;
52312 }, "java.awt.Image,~N,~N,java.awt.image.ImageObserver");
52313 Clazz_overrideMethod (c$, "getGraphicsConfiguration", 
52314 function () {
52315 swingjs.JSToolkit.notImplemented ("");
52316 return null;
52317 });
52318 Clazz_overrideMethod (c$, "handlesWheelScrolling", 
52319 function () {
52320 swingjs.JSToolkit.notImplemented ("");
52321 return false;
52322 });
52323 Clazz_overrideMethod (c$, "getBackBuffer", 
52324 function () {
52325 swingjs.JSToolkit.notImplemented ("");
52326 return null;
52327 });
52328 Clazz_overrideMethod (c$, "destroyBuffers", 
52329 function () {
52330 swingjs.JSToolkit.notImplemented ("");
52331 });
52332 Clazz_overrideMethod (c$, "reparent", 
52333 function (newContainer) {
52334 swingjs.JSToolkit.notImplemented ("");
52335 }, "java.awt.peer.ContainerPeer");
52336 Clazz_overrideMethod (c$, "isReparentSupported", 
52337 function () {
52338 swingjs.JSToolkit.notImplemented ("");
52339 return false;
52340 });
52341 Clazz_overrideMethod (c$, "layout", 
52342 function () {
52343 swingjs.JSToolkit.notImplemented ("");
52344 });
52345 Clazz_overrideMethod (c$, "getBounds", 
52346 function () {
52347 swingjs.JSToolkit.notImplemented ("");
52348 return null;
52349 });
52350 Clazz_defineMethod (c$, "hasFocus", 
52351 function () {
52352 return this.focusNode != null && this.focusNode === swingjs.api.DOMNode.getAttr (this.document, "activeElement");
52353 });
52354 Clazz_defineMethod (c$, "notifyFocus", 
52355 function (focusGained) {
52356 java.awt.Toolkit.getEventQueue ().postEvent ( new java.awt.event.FocusEvent (this.c, focusGained ? 1004 : 1005));
52357 }, "~B");
52358 Clazz_defineStatics (c$,
52359 "incr", 0);
52360 });
52361 Clazz_declarePackage ("swingjs.plaf");
52362 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSPanelUI", ["java.awt.Dimension", "javax.swing.LookAndFeel"], function () {
52363 c$ = Clazz_declareType (swingjs.plaf, "JSPanelUI", swingjs.plaf.JSComponentUI);
52364 Clazz_makeConstructor (c$, 
52365 function () {
52366 Clazz_superConstructor (this, swingjs.plaf.JSPanelUI, []);
52367 this.isContainer = true;
52368 this.setDoc ();
52369 });
52370 Clazz_overrideMethod (c$, "getDOMObject", 
52371 function () {
52372 if (this.domNode == null) this.domNode = this.createDOMObject ("label", this.id, []);
52373 return this.domNode;
52374 });
52375 Clazz_overrideMethod (c$, "setHTMLSize", 
52376 function (obj, addCSS) {
52377 return  new java.awt.Dimension (this.c.getWidth (), this.c.getHeight ());
52378 }, "swingjs.api.DOMNode,~B");
52379 Clazz_defineMethod (c$, "getPreferredSize", 
52380 function (c) {
52381 return null;
52382 }, "javax.swing.JComponent");
52383 Clazz_overrideMethod (c$, "installJSUI", 
52384 function () {
52385 javax.swing.LookAndFeel.installColorsAndFont (this.c, "Panel.background", "Panel.foreground", "Panel.font");
52386 });
52387 Clazz_overrideMethod (c$, "uninstallJSUI", 
52388 function () {
52389 });
52390 });
52391 Clazz_declarePackage ("swingjs.plaf");
52392 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSRadioButtonUI", ["java.util.HashMap", "javax.swing.DefaultButtonModel", "swingjs.api.DOMNode"], function () {
52393 c$ = Clazz_decorateAsClass (function () {
52394 this.label = null;
52395 Clazz_instantialize (this, arguments);
52396 }, swingjs.plaf, "JSRadioButtonUI", swingjs.plaf.JSButtonUI);
52397 Clazz_overrideMethod (c$, "getDOMObject", 
52398 function () {
52399 return this.getButtonObject ("radio");
52400 });
52401 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52402 function () {
52403 return "RadioButton.";
52404 });
52405 Clazz_overrideMethod (c$, "setHTMLSize", 
52406 function (obj, addCSS) {
52407 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", null]);
52408 swingjs.api.DOMNode.setStyles (this.label, ["position", null]);
52409 var d = this.setHTMLSize1 (obj, addCSS, false);
52410 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52411 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute"]);
52412 return d;
52413 }, "swingjs.api.DOMNode,~B");
52414 Clazz_defineMethod (c$, "getButtonObject", 
52415 function (myType) {
52416 var b = this.c;
52417 var isNew = false;
52418 var doAll = false;
52419 if (this.domNode == null) {
52420 doAll = true;
52421 if (swingjs.plaf.JSRadioButtonUI.groupNames == null) swingjs.plaf.JSRadioButtonUI.groupNames =  new java.util.HashMap ();
52422 var bg = null;
52423 var name = this.id;
52424 isNew = true;
52425 if (Clazz_instanceOf (b.getModel (), javax.swing.DefaultButtonModel)) {
52426 bg = (b.getModel ()).getGroup ();
52427 name = swingjs.plaf.JSRadioButtonUI.groupNames.get (bg);
52428 if (name == null) swingjs.plaf.JSRadioButtonUI.groupNames.put (bg, name = this.id);
52429  else isNew = false;
52430 }this.domBtn = this.enableNode = this.createDOMObject ("input", this.id, ["type", myType, "name", name]);
52431 this.label = this.textNode = this.createDOMObject ("label", this.id + "l", ["htmlFor", this.id]);
52432 }if (b.isSelected () || isNew) swingjs.api.DOMNode.setAttr (this.domBtn, "checked", "true");
52433 this.setCssFont (swingjs.api.DOMNode.setAttr (this.label, "innerHTML", (this.c).getText ()), this.c.getFont ());
52434 var drad = this.setHTMLSize1 (this.domBtn, false, false);
52435 this.setHTMLSize1 (this.label, false, false);
52436 var obj = this.wrap ("div", "", [this.domBtn, this.label]);
52437 var dobj = this.setHTMLSize1 (obj, true, true);
52438 swingjs.plaf.JSComponentUI.vCenter (this.domBtn, -75);
52439 swingjs.plaf.JSComponentUI.vCenter (this.label, -50);
52440 swingjs.api.DOMNode.setStyles (this.label, ["position", "absolute", "left", drad.width + "px"]);
52441 swingjs.api.DOMNode.setStyles (this.domBtn, ["position", "absolute"]);
52442 if (doAll) {
52443 obj = this.wrap ("div", this.id + "_0", [this.domBtn, this.label]);
52444 swingjs.api.DOMNode.setStyles (obj, ["position", "absolute"]);
52445 } else {
52446 obj = this.domNode;
52447 obj.appendChild (this.domBtn);
52448 obj.appendChild (this.label);
52449 }return swingjs.api.DOMNode.setSize (obj, dobj.width, dobj.height);
52450 }, "~S");
52451 Clazz_defineStatics (c$,
52452 "groupNames", null);
52453 });
52454 Clazz_declarePackage ("swingjs.plaf");
52455 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSRootPaneUI", null, function () {
52456 c$ = Clazz_declareType (swingjs.plaf, "JSRootPaneUI", swingjs.plaf.JSComponentUI);
52457 Clazz_makeConstructor (c$, 
52458 function () {
52459 Clazz_superConstructor (this, swingjs.plaf.JSRootPaneUI, []);
52460 this.isContainer = true;
52461 this.setDoc ();
52462 });
52463 Clazz_overrideMethod (c$, "getDOMObject", 
52464 function () {
52465 return null;
52466 });
52467 Clazz_overrideMethod (c$, "installJSUI", 
52468 function () {
52469 });
52470 Clazz_overrideMethod (c$, "uninstallJSUI", 
52471 function () {
52472 });
52473 });
52474 Clazz_declarePackage ("swingjs.plaf");
52475 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 () {
52476 c$ = Clazz_decorateAsClass (function () {
52477 this.lastPressedTimestamp = -1;
52478 this.shouldDiscardRelease = false;
52479 this.btn = null;
52480 Clazz_instantialize (this, arguments);
52481 }, swingjs.plaf, "JSButtonListener", null, [java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.FocusListener, javax.swing.event.ChangeListener, java.beans.PropertyChangeListener]);
52482 c$.loadActionMap = Clazz_defineMethod (c$, "loadActionMap", 
52483 function (map) {
52484 map.put ( new swingjs.plaf.JSButtonListener.Actions ("pressed"));
52485 map.put ( new swingjs.plaf.JSButtonListener.Actions ("released"));
52486 }, "swingjs.plaf.LazyActionMap");
52487 Clazz_makeConstructor (c$, 
52488 function (b) {
52489 this.btn = b;
52490 }, "javax.swing.AbstractButton");
52491 Clazz_overrideMethod (c$, "propertyChange", 
52492 function (e) {
52493 var prop = e.getPropertyName ();
52494 if (prop === "mnemonic") {
52495 this.updateMnemonicBinding (e.getSource ());
52496 } else if (prop === "contentAreaFilled") {
52497 this.checkOpacity (e.getSource ());
52498 } else if (prop === "text" || "font" === prop || "foreground" === prop) {
52499 var b = e.getSource ();
52500 (b.getUI ()).notifyPropertyChanged (prop);
52501 }}, "java.beans.PropertyChangeEvent");
52502 Clazz_defineMethod (c$, "checkOpacity", 
52503 function (b) {
52504 b.setOpaque (b.isContentAreaFilled ());
52505 }, "javax.swing.AbstractButton");
52506 Clazz_defineMethod (c$, "installKeyboardActions", 
52507 function (c) {
52508 var b = c;
52509 this.updateMnemonicBinding (b);
52510 swingjs.plaf.LazyActionMap.installLazyActionMap (c, swingjs.plaf.JSButtonListener, "Button.actionMap");
52511 var km = this.getInputMap (0, c);
52512 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, km);
52513 }, "javax.swing.JComponent");
52514 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52515 function (c) {
52516 javax.swing.SwingUtilities.replaceUIInputMap (c, 2, null);
52517 javax.swing.SwingUtilities.replaceUIInputMap (c, 0, null);
52518 javax.swing.SwingUtilities.replaceUIActionMap (c, null);
52519 }, "javax.swing.JComponent");
52520 Clazz_defineMethod (c$, "getInputMap", 
52521 function (condition, c) {
52522 return null;
52523 }, "~N,javax.swing.JComponent");
52524 Clazz_defineMethod (c$, "updateMnemonicBinding", 
52525 function (b) {
52526 var m = b.getMnemonic ();
52527 if (m != 0) {
52528 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52529 if (map == null) {
52530 map =  new javax.swing.plaf.ComponentInputMapUIResource (b);
52531 javax.swing.SwingUtilities.replaceUIInputMap (b, 2, map);
52532 }map.clear ();
52533 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, false), "pressed");
52534 map.put (javax.swing.KeyStroke.getKeyStroke (m, 8, true), "released");
52535 map.put (javax.swing.KeyStroke.getKeyStroke (m, 0, true), "released");
52536 } else {
52537 var map = javax.swing.SwingUtilities.getUIInputMap (b, 2);
52538 if (map != null) {
52539 map.clear ();
52540 }}}, "javax.swing.AbstractButton");
52541 Clazz_overrideMethod (c$, "stateChanged", 
52542 function (e) {
52543 var b = e.getSource ();
52544 b.repaint ();
52545 }, "javax.swing.event.ChangeEvent");
52546 Clazz_overrideMethod (c$, "focusGained", 
52547 function (e) {
52548 }, "java.awt.event.FocusEvent");
52549 Clazz_overrideMethod (c$, "focusLost", 
52550 function (e) {
52551 var b = e.getSource ();
52552 var model = b.getModel ();
52553 model.setArmed (false);
52554 model.setPressed (false);
52555 }, "java.awt.event.FocusEvent");
52556 Clazz_overrideMethod (c$, "mouseMoved", 
52557 function (e) {
52558 }, "java.awt.event.MouseEvent");
52559 Clazz_overrideMethod (c$, "mouseDragged", 
52560 function (e) {
52561 }, "java.awt.event.MouseEvent");
52562 Clazz_overrideMethod (c$, "mouseClicked", 
52563 function (e) {
52564 }, "java.awt.event.MouseEvent");
52565 Clazz_overrideMethod (c$, "mousePressed", 
52566 function (e) {
52567 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52568 var b = e.getSource ();
52569 if (!b.contains (e.getX (), e.getY ())) return;
52570 (b.getUI ()).verifyButtonClick (false);
52571 var multiClickThreshhold = b.getMultiClickThreshhold ();
52572 var lastTime = this.lastPressedTimestamp;
52573 var currentTime = this.lastPressedTimestamp = e.getWhen ();
52574 if (lastTime != -1 && currentTime - lastTime < multiClickThreshhold) {
52575 this.shouldDiscardRelease = true;
52576 return;
52577 }var model = b.getModel ();
52578 if (!model.isEnabled ()) {
52579 return;
52580 }if (!model.isArmed ()) {
52581 model.setArmed (true);
52582 }model.setPressed (true);
52583 if (!b.hasFocus () && b.isRequestFocusEnabled ()) {
52584 b.requestFocus ();
52585 }}}, "java.awt.event.MouseEvent");
52586 Clazz_overrideMethod (c$, "mouseReleased", 
52587 function (e) {
52588 if (javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52589 if (this.shouldDiscardRelease) {
52590 this.shouldDiscardRelease = false;
52591 return;
52592 }var b = e.getSource ();
52593 if (!(b.getUI ()).verifyButtonClick (true)) return;
52594 var model = b.getModel ();
52595 model.setPressed (false);
52596 model.setArmed (false);
52597 }}, "java.awt.event.MouseEvent");
52598 Clazz_overrideMethod (c$, "mouseEntered", 
52599 function (e) {
52600 var b = e.getSource ();
52601 var model = b.getModel ();
52602 if (b.isRolloverEnabled () && !javax.swing.SwingUtilities.isLeftMouseButton (e)) {
52603 model.setRollover (true);
52604 }if (model.isPressed ()) model.setArmed (true);
52605 }, "java.awt.event.MouseEvent");
52606 Clazz_overrideMethod (c$, "mouseExited", 
52607 function (e) {
52608 var b = e.getSource ();
52609 var model = b.getModel ();
52610 if (b.isRolloverEnabled ()) {
52611 model.setRollover (false);
52612 }model.setArmed (false);
52613 }, "java.awt.event.MouseEvent");
52614 Clazz_pu$h(self.c$);
52615 c$ = Clazz_declareType (swingjs.plaf.JSButtonListener, "Actions", jssun.swing.UIAction);
52616 Clazz_overrideMethod (c$, "actionPerformed", 
52617 function (a) {
52618 var b = a.getSource ();
52619 var c = this.getName ();
52620 if (c === "pressed") {
52621 var d = b.getModel ();
52622 d.setArmed (true);
52623 d.setPressed (true);
52624 if (!b.hasFocus ()) {
52625 b.requestFocus ();
52626 }} else if (c === "released") {
52627 var d = b.getModel ();
52628 d.setPressed (false);
52629 d.setArmed (false);
52630 }}, "java.awt.event.ActionEvent");
52631 Clazz_defineMethod (c$, "isEnabled", 
52632 function (a) {
52633 if (a != null && (Clazz_instanceOf (a, javax.swing.AbstractButton)) && !(a).getModel ().isEnabled ()) {
52634 return false;
52635 } else {
52636 return true;
52637 }}, "~O");
52638 Clazz_defineStatics (c$,
52639 "PRESS", "pressed",
52640 "RELEASE", "released");
52641 c$ = Clazz_p0p ();
52642 });
52643 Clazz_declarePackage ("swingjs.plaf");
52644 Clazz_load (["swingjs.plaf.JSComponentUI"], "swingjs.plaf.JSButtonUI", ["javax.swing.LookAndFeel", "$.UIManager", "javax.swing.plaf.UIResource", "swingjs.api.DOMNode", "swingjs.plaf.JSButtonListener"], function () {
52645 c$ = Clazz_decorateAsClass (function () {
52646 this.domBtn = null;
52647 this.shiftOffset = 0;
52648 this.defaultTextShiftOffset = 0;
52649 Clazz_instantialize (this, arguments);
52650 }, swingjs.plaf, "JSButtonUI", swingjs.plaf.JSComponentUI);
52651 Clazz_overrideMethod (c$, "getDOMObject", 
52652 function () {
52653 if (this.domNode == null) this.domBtn = this.enableNode = this.valueNode = this.domNode = this.createDOMObject ("input", this.id, ["type", "button"]);
52654 this.setCssFont (swingjs.api.DOMNode.setAttr (this.domNode, "value", (this.c).getText ()), this.c.getFont ());
52655 return this.domNode;
52656 });
52657 Clazz_defineMethod (c$, "verifyButtonClick", 
52658 function (isRelease) {
52659 return true;
52660 }, "~B");
52661 Clazz_overrideMethod (c$, "installJSUI", 
52662 function () {
52663 this.installDefaults (this.c);
52664 this.installListeners (this.c);
52665 this.installKeyboardActions (this.c);
52666 });
52667 Clazz_overrideMethod (c$, "uninstallJSUI", 
52668 function () {
52669 this.uninstallKeyboardActions (this.c);
52670 this.uninstallListeners (this.c);
52671 });
52672 Clazz_defineMethod (c$, "installListeners", 
52673 function (b) {
52674 var listener =  new swingjs.plaf.JSButtonListener (b);
52675 if (listener != null) {
52676 b.addMouseListener (listener);
52677 b.addMouseMotionListener (listener);
52678 b.addFocusListener (listener);
52679 b.addPropertyChangeListener (listener);
52680 b.addChangeListener (listener);
52681 }}, "javax.swing.AbstractButton");
52682 Clazz_defineMethod (c$, "uninstallListeners", 
52683 function (b) {
52684 var listener = this.getButtonListener (b);
52685 if (listener != null) {
52686 b.removeMouseListener (listener);
52687 b.removeMouseMotionListener (listener);
52688 b.removeFocusListener (listener);
52689 b.removeChangeListener (listener);
52690 b.removePropertyChangeListener (listener);
52691 }}, "javax.swing.AbstractButton");
52692 Clazz_defineMethod (c$, "installKeyboardActions", 
52693 function (b) {
52694 var listener = this.getButtonListener (b);
52695 if (listener != null) {
52696 listener.installKeyboardActions (b);
52697 }}, "javax.swing.AbstractButton");
52698 Clazz_defineMethod (c$, "uninstallKeyboardActions", 
52699 function (b) {
52700 var listener = this.getButtonListener (b);
52701 if (listener != null) {
52702 listener.uninstallKeyboardActions (b);
52703 }}, "javax.swing.AbstractButton");
52704 Clazz_defineMethod (c$, "getButtonListener", 
52705 function (b) {
52706 var listeners = b.getMouseMotionListeners ();
52707 if (listeners != null) {
52708 for (var counter = 0; counter < listeners.length; counter++) {
52709 if (Clazz_instanceOf (listeners[counter], swingjs.plaf.JSButtonListener)) {
52710 return listeners[counter];
52711 }}
52712 }return null;
52713 }, "javax.swing.AbstractButton");
52714 Clazz_defineMethod (c$, "getPropertyPrefix", 
52715 function () {
52716 return "Button.";
52717 });
52718 Clazz_defineMethod (c$, "installDefaults", 
52719 function (b) {
52720 var pp = this.getPropertyPrefix ();
52721 this.defaultTextShiftOffset = javax.swing.UIManager.getInt (pp + "textShiftOffset");
52722 if (b.getMargin () == null || (Clazz_instanceOf (b.getMargin (), javax.swing.plaf.UIResource))) {
52723 b.setMargin (javax.swing.UIManager.getInsets (pp + "margin"));
52724 }javax.swing.LookAndFeel.installColorsAndFont (b, pp + "background", pp + "foreground", pp + "font");
52725 javax.swing.LookAndFeel.installProperty (b, "iconTextGap",  new Integer (4));
52726 }, "javax.swing.AbstractButton");
52727 });
52728 Clazz_declarePackage ("swingjs.plaf");
52729 Clazz_load (["swingjs.plaf.JSButtonUI"], "swingjs.plaf.JSToggleButtonUI", ["swingjs.api.DOMNode"], function () {
52730 c$ = Clazz_decorateAsClass (function () {
52731 this.isDomChecked = false;
52732 Clazz_instantialize (this, arguments);
52733 }, swingjs.plaf, "JSToggleButtonUI", swingjs.plaf.JSButtonUI);
52734 Clazz_overrideMethod (c$, "verifyButtonClick", 
52735 function (isRelease) {
52736 var checked = ((swingjs.api.DOMNode.getAttr (this.domBtn, "checked")).booleanValue () === true);
52737 if (isRelease && this.isDomChecked == checked) return false;
52738 this.isDomChecked = checked;
52739 return true;
52740 }, "~B");
52741 Clazz_overrideMethod (c$, "getPropertyPrefix", 
52742 function () {
52743 return "ToggleButton.";
52744 });
52745 });
52746 Clazz_declarePackage ("swingjs.plaf");
52747 Clazz_load (["javax.swing.plaf.ActionMapUIResource"], "swingjs.plaf.LazyActionMap", ["javax.swing.SwingUtilities", "$.UIManager"], function () {
52748 c$ = Clazz_decorateAsClass (function () {
52749 this._loader = null;
52750 Clazz_instantialize (this, arguments);
52751 }, swingjs.plaf, "LazyActionMap", javax.swing.plaf.ActionMapUIResource);
52752 c$.installLazyActionMap = Clazz_defineMethod (c$, "installLazyActionMap", 
52753 function (c, loaderClass, defaultsKey) {
52754 var map = javax.swing.UIManager.get (defaultsKey);
52755 if (map == null) {
52756 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52757 }javax.swing.SwingUtilities.replaceUIActionMap (c, map);
52758 }, "javax.swing.JComponent,Class,~S");
52759 c$.getActionMap = Clazz_defineMethod (c$, "getActionMap", 
52760 function (loaderClass, defaultsKey) {
52761 var map = javax.swing.UIManager.get (defaultsKey);
52762 if (map == null) {
52763 map =  new swingjs.plaf.LazyActionMap (loaderClass);
52764 }return map;
52765 }, "Class,~S");
52766 Clazz_makeConstructor (c$, 
52767  function (loader) {
52768 Clazz_superConstructor (this, swingjs.plaf.LazyActionMap, []);
52769 this._loader = loader;
52770 }, "Class");
52771 Clazz_defineMethod (c$, "put", 
52772 function (action) {
52773 this.put (action.getValue ("Name"), action);
52774 }, "javax.swing.Action");
52775 Clazz_defineMethod (c$, "put", 
52776 function (key, action) {
52777 this.loadIfNecessary ();
52778 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "put", [key, action]);
52779 }, "~O,javax.swing.Action");
52780 Clazz_defineMethod (c$, "get", 
52781 function (key) {
52782 this.loadIfNecessary ();
52783 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "get", [key]);
52784 }, "~O");
52785 Clazz_defineMethod (c$, "remove", 
52786 function (key) {
52787 this.loadIfNecessary ();
52788 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "remove", [key]);
52789 }, "~O");
52790 Clazz_defineMethod (c$, "clear", 
52791 function () {
52792 this.loadIfNecessary ();
52793 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "clear", []);
52794 });
52795 Clazz_defineMethod (c$, "keys", 
52796 function () {
52797 this.loadIfNecessary ();
52798 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "keys", []);
52799 });
52800 Clazz_defineMethod (c$, "size", 
52801 function () {
52802 this.loadIfNecessary ();
52803 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "size", []);
52804 });
52805 Clazz_defineMethod (c$, "allKeys", 
52806 function () {
52807 this.loadIfNecessary ();
52808 return Clazz_superCall (this, swingjs.plaf.LazyActionMap, "allKeys", []);
52809 });
52810 Clazz_defineMethod (c$, "setParent", 
52811 function (map) {
52812 this.loadIfNecessary ();
52813 Clazz_superCall (this, swingjs.plaf.LazyActionMap, "setParent", [map]);
52814 }, "javax.swing.ActionMap");
52815 Clazz_defineMethod (c$, "loadIfNecessary", 
52816  function () {
52817 if (this._loader != null) {
52818 {
52819 this._loader.loadActionMap(this);
52820 this._loader = null;
52821 }}});
52822 });